blob: c2f7c02fa53bb764258620dd6af7eadd8dd05e78 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jack Jansen0b06be72002-06-21 14:48:38 +00002# From configure.in Revision: 1.325 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis11437992002-04-12 09:54:03 +00004# Generated by GNU Autoconf 2.53.
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.
256PACKAGE_NAME=
257PACKAGE_TARNAME=
258PACKAGE_VERSION=
259PACKAGE_STRING=
260PACKAGE_BUGREPORT=
261
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
764\`configure' configures this package to adapt to many kinds of systems.
765
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
820
821 cat <<\_ACEOF
822
823Optional Features:
824 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
825 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
826 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
827 --enable-shared disable/enable building shared python library
828 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
829 --enable-ipv6 Enable ipv6 (with ipv4) support
830 --disable-ipv6 Disable ipv6 support
831 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
832
833Optional Packages:
834 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
835 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
836 --without-gcc never use gcc
837 --with-cxx=<compiler> enable C++ support
838 --with-suffix=.exe set executable suffix
839 --with-pydebug build with Py_DEBUG defined
840 --with-libs='lib1 ...' link against additional libs
841 --with-signal-module disable/enable signal module
842 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
843 --with(out)-threads=DIRECTORY disable/enable thread support
844 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
845 --with-pth use GNU pth threading libraries
846 --with(out)-cycle-gc disable/enable garbage collection
Jack Jansen7b8c7542002-04-14 20:12:41 +0000847 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +0000848 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 --with(out)-pymalloc disable/enable specialized mallocs
850 --with-wctype-functions use wctype.h functions
851 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
852 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
853 --with-fpectl enable SIGFPE catching
854 --with-libm=STRING math library
855 --with-libc=STRING C library
856
857Some influential environment variables:
858 CC C compiler command
859 CFLAGS C compiler flags
860 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
861 nonstandard directory <lib dir>
862 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
863 headers in a nonstandard directory <include dir>
864 CPP C preprocessor
865
866Use these variables to override the choices made by `configure' or to help
867it to find libraries and programs with nonstandard names/locations.
868
869_ACEOF
870fi
871
872if test "$ac_init_help" = "recursive"; then
873 # If there are subdirs, report their specific --help.
874 ac_popdir=`pwd`
875 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
876 test -d $ac_dir || continue
877 ac_builddir=.
878
879if test "$ac_dir" != .; then
880 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
881 # A "../" for each directory in $ac_dir_suffix.
882 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
883else
884 ac_dir_suffix= ac_top_builddir=
885fi
886
887case $srcdir in
888 .) # No --srcdir option. We are building in place.
889 ac_srcdir=.
890 if test -z "$ac_top_builddir"; then
891 ac_top_srcdir=.
892 else
893 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
894 fi ;;
895 [\\/]* | ?:[\\/]* ) # Absolute path.
896 ac_srcdir=$srcdir$ac_dir_suffix;
897 ac_top_srcdir=$srcdir ;;
898 *) # Relative path.
899 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
900 ac_top_srcdir=$ac_top_builddir$srcdir ;;
901esac
902# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
903# absolute.
904ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
905ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
906ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
907ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
908
909 cd $ac_dir
910 # Check for guested configure; otherwise get Cygnus style configure.
911 if test -f $ac_srcdir/configure.gnu; then
912 echo
913 $SHELL $ac_srcdir/configure.gnu --help=recursive
914 elif test -f $ac_srcdir/configure; then
915 echo
916 $SHELL $ac_srcdir/configure --help=recursive
917 elif test -f $ac_srcdir/configure.ac ||
918 test -f $ac_srcdir/configure.in; then
919 echo
920 $ac_configure --help
921 else
922 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
923 fi
924 cd $ac_popdir
925 done
926fi
927
928test -n "$ac_init_help" && exit 0
929if $ac_init_version; then
930 cat <<\_ACEOF
931
932Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
933Free Software Foundation, Inc.
934This configure script is free software; the Free Software Foundation
935gives unlimited permission to copy, distribute and modify it.
936_ACEOF
937 exit 0
938fi
939exec 5>config.log
940cat >&5 <<_ACEOF
941This file contains any messages produced by compilers while
942running configure, to aid debugging if configure makes a mistake.
943
944It was created by $as_me, which was
945generated by GNU Autoconf 2.53. Invocation command line was
946
947 $ $0 $@
948
949_ACEOF
950{
951cat <<_ASUNAME
952## --------- ##
953## Platform. ##
954## --------- ##
955
956hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
957uname -m = `(uname -m) 2>/dev/null || echo unknown`
958uname -r = `(uname -r) 2>/dev/null || echo unknown`
959uname -s = `(uname -s) 2>/dev/null || echo unknown`
960uname -v = `(uname -v) 2>/dev/null || echo unknown`
961
962/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
963/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
964
965/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
966/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
967/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
968hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
969/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
970/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
971/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
972
973_ASUNAME
974
975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
976for as_dir in $PATH
977do
978 IFS=$as_save_IFS
979 test -z "$as_dir" && as_dir=.
980 echo "PATH: $as_dir"
981done
982
983} >&5
984
985cat >&5 <<_ACEOF
986
987
988## ----------- ##
989## Core tests. ##
990## ----------- ##
991
992_ACEOF
993
994
995# Keep a trace of the command line.
996# Strip out --no-create and --no-recursion so they do not pile up.
997# Also quote any args containing shell meta-characters.
998ac_configure_args=
999ac_sep=
1000for ac_arg
1001do
1002 case $ac_arg in
1003 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1004 | --no-cr | --no-c | -n ) continue ;;
1005 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1006 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1007 continue ;;
1008 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1009 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1010 esac
1011 case " $ac_configure_args " in
1012 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1013 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1014 ac_sep=" " ;;
1015 esac
1016 # Get rid of the leading space.
1017done
1018
1019# When interrupted or exit'd, cleanup temporary files, and complete
1020# config.log. We remove comments because anyway the quotes in there
1021# would cause problems or look ugly.
1022# WARNING: Be sure not to use single quotes in there, as some shells,
1023# such as our DU 5.0 friend, will then `close' the trap.
1024trap 'exit_status=$?
1025 # Save into config.log some information that might help in debugging.
1026 {
1027 echo
1028 cat <<\_ASBOX
1029## ---------------- ##
1030## Cache variables. ##
1031## ---------------- ##
1032_ASBOX
1033 echo
1034 # The following way of writing the cache mishandles newlines in values,
1035{
1036 (set) 2>&1 |
1037 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1038 *ac_space=\ *)
1039 sed -n \
1040 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1041 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1042 ;;
1043 *)
1044 sed -n \
1045 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1046 ;;
1047 esac;
1048}
1049 echo
1050 if test -s confdefs.h; then
1051 cat <<\_ASBOX
1052## ----------- ##
1053## confdefs.h. ##
1054## ----------- ##
1055_ASBOX
1056 echo
1057 sed "/^$/d" confdefs.h
1058 echo
1059 fi
1060 test "$ac_signal" != 0 &&
1061 echo "$as_me: caught signal $ac_signal"
1062 echo "$as_me: exit $exit_status"
1063 } >&5
1064 rm -f core core.* *.core &&
1065 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1066 exit $exit_status
1067 ' 0
1068for ac_signal in 1 2 13 15; do
1069 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1070done
1071ac_signal=0
1072
1073# confdefs.h avoids OS command line length limits that DEFS can exceed.
1074rm -rf conftest* confdefs.h
1075# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1076echo >confdefs.h
1077
1078# Predefined preprocessor variables.
1079
1080cat >>confdefs.h <<_ACEOF
1081#define PACKAGE_NAME "$PACKAGE_NAME"
1082_ACEOF
1083
1084
1085cat >>confdefs.h <<_ACEOF
1086#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1087_ACEOF
1088
1089
1090cat >>confdefs.h <<_ACEOF
1091#define PACKAGE_VERSION "$PACKAGE_VERSION"
1092_ACEOF
1093
1094
1095cat >>confdefs.h <<_ACEOF
1096#define PACKAGE_STRING "$PACKAGE_STRING"
1097_ACEOF
1098
1099
1100cat >>confdefs.h <<_ACEOF
1101#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1102_ACEOF
1103
1104
1105# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106# Prefer explicitly selected file to automatically selected ones.
1107if test -z "$CONFIG_SITE"; then
1108 if test "x$prefix" != xNONE; then
1109 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1110 else
1111 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1112 fi
1113fi
1114for ac_site_file in $CONFIG_SITE; do
1115 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1117echo "$as_me: loading site script $ac_site_file" >&6;}
1118 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 . "$ac_site_file"
1120 fi
1121done
1122
1123if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 # Some versions of bash will fail to source /dev/null (special
1125 # files actually), so we avoid doing that.
1126 if test -f "$cache_file"; then
1127 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1128echo "$as_me: loading cache $cache_file" >&6;}
1129 case $cache_file in
1130 [\\/]* | ?:[\\/]* ) . $cache_file;;
1131 *) . ./$cache_file;;
1132 esac
1133 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134else
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1136echo "$as_me: creating cache $cache_file" >&6;}
1137 >$cache_file
1138fi
1139
1140# Check that the precious variables saved in the cache have kept the same
1141# value.
1142ac_cache_corrupted=false
1143for ac_var in `(set) 2>&1 |
1144 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1145 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1146 eval ac_new_set=\$ac_env_${ac_var}_set
1147 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1148 eval ac_new_val="\$ac_env_${ac_var}_value"
1149 case $ac_old_set,$ac_new_set in
1150 set,)
1151 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1152echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1153 ac_cache_corrupted=: ;;
1154 ,set)
1155 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1156echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1157 ac_cache_corrupted=: ;;
1158 ,);;
1159 *)
1160 if test "x$ac_old_val" != "x$ac_new_val"; then
1161 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1162echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1163 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1164echo "$as_me: former value: $ac_old_val" >&2;}
1165 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1166echo "$as_me: current value: $ac_new_val" >&2;}
1167 ac_cache_corrupted=:
1168 fi;;
1169 esac
1170 # Pass precious variables to config.status.
1171 if test "$ac_new_set" = set; then
1172 case $ac_new_val in
1173 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1174 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1175 *) ac_arg=$ac_var=$ac_new_val ;;
1176 esac
1177 case " $ac_configure_args " in
1178 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1179 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1180 esac
1181 fi
1182done
1183if $ac_cache_corrupted; then
1184 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1185echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1186 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1187echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1188 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001189fi
1190
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001193ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1194ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1195ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196
Guido van Rossum627b2d71993-12-24 10:39:16 +00001197
Michael W. Hudson54241132001-12-07 15:38:26 +00001198
1199
Guido van Rossum627b2d71993-12-24 10:39:16 +00001200
Martin v. Löwis11437992002-04-12 09:54:03 +00001201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214ac_config_headers="$ac_config_headers pyconfig.h"
1215
1216
1217# This is for stuff that absolutely must end up in pyconfig.h.
1218# Please use pyport.h instead, if possible.
1219
1220
1221
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001222# Set VERSION so we only need to edit in one place (i.e., here)
1223
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001224VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001225
Martin v. Löwis1142de32002-03-29 16:28:31 +00001226
1227SOVERSION=1.0
1228
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001229# Arguments passed to configure.
1230
1231CONFIG_ARGS="$ac_configure_args"
1232
Michael W. Hudson54241132001-12-07 15:38:26 +00001233
Jack Jansene578a632001-08-15 01:27:14 +00001234# Check whether --enable-framework or --disable-framework was given.
1235if test "${enable_framework+set}" = set; then
1236 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001237
Jack Jansene578a632001-08-15 01:27:14 +00001238 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001240 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001241 esac
1242 case $enableval in
1243 no)
1244 PYTHONFRAMEWORK=
1245 PYTHONFRAMEWORKDIR=no-framework
1246 PYTHONFRAMEWORKPREFIX=
1247 PYTHONFRAMEWORKINSTALLDIR=
1248 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001249 ;;
1250 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001251 PYTHONFRAMEWORK=Python
1252 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001253 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001254 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1255 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001256 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001257
Guido van Rossum563e7081996-09-10 18:20:48 +00001258else
Martin v. Löwis11437992002-04-12 09:54:03 +00001259
Jack Jansene578a632001-08-15 01:27:14 +00001260 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001261 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001262 PYTHONFRAMEWORKPREFIX=
1263 PYTHONFRAMEWORKINSTALLDIR=
1264 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001265
Martin v. Löwis11437992002-04-12 09:54:03 +00001266fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001267
1268
1269
1270
Jack Jansene578a632001-08-15 01:27:14 +00001271
1272##AC_ARG_WITH(dyld,
1273##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1274##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001275# Set name for machine-dependent library files
1276
Martin v. Löwis11437992002-04-12 09:54:03 +00001277echo "$as_me:$LINENO: checking MACHDEP" >&5
1278echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001279if test -z "$MACHDEP"
1280then
Guido van Rossum563e7081996-09-10 18:20:48 +00001281 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001282 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001283 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001284 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001285 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001286 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001287 ac_md_system=`echo $ac_sys_system |
1288 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1289 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001290 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001291 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001292
Guido van Rossum07397971997-04-29 21:49:50 +00001293 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001294 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001295 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001296 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001297 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001298 esac
1299fi
Guido van Rossum91922671997-10-09 20:24:13 +00001300
1301#
1302# SGI compilers allow the specification of the both the ABI and the
1303# ISA on the command line. Depending on the values of these switches,
1304# different and often incompatable code will be generated.
1305#
1306# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1307# thus supply support for various ABI/ISA combinations. The MACHDEP
1308# variable is also adjusted.
1309#
1310
1311if test ! -z "$SGI_ABI"
1312then
1313 CC="cc $SGI_ABI"
1314 LDFLAGS="$SGI_ABI $LDFLAGS"
1315 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1316fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001317echo "$as_me:$LINENO: result: $MACHDEP" >&5
1318echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001319
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001321echo "$as_me:$LINENO: checking for --without-gcc" >&5
1322echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1323
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001324# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001325if test "${with_gcc+set}" = set; then
1326 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
Guido van Rossum7f43da71994-08-01 12:15:30 +00001328 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001329 no) CC=cc
1330 without_gcc=yes;;
1331 yes) CC=gcc
1332 without_gcc=no;;
1333 *) CC=$withval
1334 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001336else
Martin v. Löwis11437992002-04-12 09:54:03 +00001337
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001338 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001339 AIX*) CC=cc_r
1340 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001341 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001342 case $BE_HOST_CPU in
1343 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001344 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001345 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +00001346 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001347 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001348 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001349 ;;
1350 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001351 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001352 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001353 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001354 ;;
1355 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001356 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1357echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1358 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001359 ;;
1360 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001361 AR="\$(srcdir)/Modules/ar_beos"
1362 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001363 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001364 Monterey*)
1365 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001366 without_gcc=;;
1367 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001368 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001369fi;
1370echo "$as_me:$LINENO: result: $without_gcc" >&5
1371echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001372
1373
Guido van Rossum95012191999-12-16 17:50:52 +00001374
Fred Drakea1a84e72001-03-06 05:52:16 +00001375MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001376echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1377echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1378
Guido van Rossum95012191999-12-16 17:50:52 +00001379# Check whether --with-cxx or --without-cxx was given.
1380if test "${with_cxx+set}" = set; then
1381 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001382
Martin v. Löwis22352952000-12-13 17:37:02 +00001383 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001384 case $withval in
1385 no) CXX=
1386 with_cxx=no;;
1387 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001388 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001389 with_cxx=$withval;;
1390 esac
1391else
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
Guido van Rossum95012191999-12-16 17:50:52 +00001393 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001394 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001395
Martin v. Löwis11437992002-04-12 09:54:03 +00001396fi;
1397echo "$as_me:$LINENO: result: $with_cxx" >&5
1398echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001399
1400if test "$with_cxx" = "yes"
1401then
Martin v. Löwis11437992002-04-12 09:54:03 +00001402 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1403echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1404 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001405fi
1406
1407
1408
1409
Martin v. Löwis11437992002-04-12 09:54:03 +00001410if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001411then
1412 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1413do
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 # 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 +00001415set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001416echo "$as_me:$LINENO: checking for $ac_word" >&5
1417echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1418if test "${ac_cv_prog_CXX+set}" = set; then
1419 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001420else
1421 if test -n "$CXX"; then
1422 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1423else
Martin v. Löwis11437992002-04-12 09:54:03 +00001424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1425for as_dir in $PATH
1426do
1427 IFS=$as_save_IFS
1428 test -z "$as_dir" && as_dir=.
1429 for ac_exec_ext in '' $ac_executable_extensions; do
1430 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1431 ac_cv_prog_CXX="$ac_prog"
1432 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1433 break 2
1434 fi
1435done
1436done
1437
Martin v. Löwis22352952000-12-13 17:37:02 +00001438fi
1439fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001440CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001441if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 echo "$as_me:$LINENO: result: $CXX" >&5
1443echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001444else
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 echo "$as_me:$LINENO: result: no" >&5
1446echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001447fi
1448
Martin v. Löwis11437992002-04-12 09:54:03 +00001449 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001450done
1451test -n "$CXX" || CXX="notfound"
1452
1453 if test "$CXX" = "notfound"
1454 then
1455 CXX=
1456 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001458ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001459ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1460ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1461ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1462 cat >conftest.$ac_ext <<_ACEOF
1463#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001464#include "confdefs.h"
1465
Martin v. Löwis11437992002-04-12 09:54:03 +00001466#ifdef F77_DUMMY_MAIN
1467# ifdef __cplusplus
1468 extern "C"
1469# endif
1470 int F77_DUMMY_MAIN() { return 1; }
1471#endif
1472int
1473main ()
1474{
Michael W. Hudson54241132001-12-07 15:38:26 +00001475
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 ;
1477 return 0;
1478}
1479_ACEOF
1480ac_clean_files_save=$ac_clean_files
1481ac_clean_files="$ac_clean_files a.out a.exe"
1482# Try to create an executable without -o first, disregard a.out.
1483# It will help us diagnose broken compilers, and finding out an intuition
1484# of exeext.
1485echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1486echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1487ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1488if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1489 (eval $ac_link_default) 2>&5
1490 ac_status=$?
1491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1492 (exit $ac_status); }; then
1493 # Find the output, starting from the most likely. This scheme is
1494# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1495# resort.
1496
1497# Be careful to initialize this variable, since it used to be cached.
1498# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1499ac_cv_exeext=
1500for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1501 ls a.out conftest 2>/dev/null;
1502 ls a.* conftest.* 2>/dev/null`; do
1503 case $ac_file in
1504 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1505 a.out ) # We found the default executable, but exeext='' is most
1506 # certainly right.
1507 break;;
1508 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1509 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1510 export ac_cv_exeext
1511 break;;
1512 * ) break;;
1513 esac
1514done
1515else
1516 echo "$as_me: failed program was:" >&5
1517cat conftest.$ac_ext >&5
1518{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1519echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1520 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001521fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001522
1523ac_exeext=$ac_cv_exeext
1524echo "$as_me:$LINENO: result: $ac_file" >&5
1525echo "${ECHO_T}$ac_file" >&6
1526
1527# Check the compiler produces executables we can run. If not, either
1528# the compiler is broken, or we cross compile.
1529echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1530echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1531# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1532# If not cross compiling, check that we can run a simple program.
1533if test "$cross_compiling" != yes; then
1534 if { ac_try='./$ac_file'
1535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1536 (eval $ac_try) 2>&5
1537 ac_status=$?
1538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1539 (exit $ac_status); }; }; then
1540 cross_compiling=no
1541 else
1542 if test "$cross_compiling" = maybe; then
1543 cross_compiling=yes
1544 else
1545 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1546If you meant to cross compile, use \`--host'." >&5
1547echo "$as_me: error: cannot run C++ compiled programs.
1548If you meant to cross compile, use \`--host'." >&2;}
1549 { (exit 1); exit 1; }; }
1550 fi
1551 fi
1552fi
1553echo "$as_me:$LINENO: result: yes" >&5
1554echo "${ECHO_T}yes" >&6
1555
1556rm -f a.out a.exe conftest$ac_cv_exeext
1557ac_clean_files=$ac_clean_files_save
1558# Check the compiler produces executables we can run. If not, either
1559# the compiler is broken, or we cross compile.
1560echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1561echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1562echo "$as_me:$LINENO: result: $cross_compiling" >&5
1563echo "${ECHO_T}$cross_compiling" >&6
1564
1565echo "$as_me:$LINENO: checking for suffix of executables" >&5
1566echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1567if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1568 (eval $ac_link) 2>&5
1569 ac_status=$?
1570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1571 (exit $ac_status); }; then
1572 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1573# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1574# work properly (i.e., refer to `conftest.exe'), while it won't with
1575# `rm'.
1576for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1577 case $ac_file in
1578 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1579 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1580 export ac_cv_exeext
1581 break;;
1582 * ) break;;
1583 esac
1584done
1585else
1586 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1587echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1588 { (exit 1); exit 1; }; }
1589fi
1590
1591rm -f conftest$ac_cv_exeext
1592echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1593echo "${ECHO_T}$ac_cv_exeext" >&6
1594
1595rm -f conftest.$ac_ext
1596EXEEXT=$ac_cv_exeext
1597ac_exeext=$EXEEXT
1598
1599 ac_ext=c
1600ac_cpp='$CPP $CPPFLAGS'
1601ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1602ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1603ac_compiler_gnu=$ac_cv_c_compiler_gnu
1604
1605
Martin v. Löwis22352952000-12-13 17:37:02 +00001606
1607 fi
1608fi
1609
Guido van Rossum8b131c51995-03-09 14:10:13 +00001610# If the user switches compilers, we can't believe the cache
1611if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1612then
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1614(it is also a good idea to do 'make clean' before compiling)" >&5
1615echo "$as_me: error: cached CC is different -- throw away $cache_file
1616(it is also a good idea to do 'make clean' before compiling)" >&2;}
1617 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001618fi
1619
Martin v. Löwis11437992002-04-12 09:54:03 +00001620ac_ext=c
1621ac_cpp='$CPP $CPPFLAGS'
1622ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1623ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1624ac_compiler_gnu=$ac_cv_c_compiler_gnu
1625if test -n "$ac_tool_prefix"; then
1626 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1627set dummy ${ac_tool_prefix}gcc; ac_word=$2
1628echo "$as_me:$LINENO: checking for $ac_word" >&5
1629echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1630if test "${ac_cv_prog_CC+set}" = set; then
1631 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001632else
1633 if test -n "$CC"; then
1634 ac_cv_prog_CC="$CC" # Let the user override the test.
1635else
Martin v. Löwis11437992002-04-12 09:54:03 +00001636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1637for as_dir in $PATH
1638do
1639 IFS=$as_save_IFS
1640 test -z "$as_dir" && as_dir=.
1641 for ac_exec_ext in '' $ac_executable_extensions; do
1642 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1643 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1644 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1645 break 2
1646 fi
1647done
1648done
1649
Jack Jansendd19cf82001-12-06 22:36:17 +00001650fi
1651fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001652CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001653if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001654 echo "$as_me:$LINENO: result: $CC" >&5
1655echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001656else
Martin v. Löwis11437992002-04-12 09:54:03 +00001657 echo "$as_me:$LINENO: result: no" >&5
1658echo "${ECHO_T}no" >&6
1659fi
1660
1661fi
1662if test -z "$ac_cv_prog_CC"; then
1663 ac_ct_CC=$CC
1664 # Extract the first word of "gcc", so it can be a program name with args.
1665set dummy gcc; ac_word=$2
1666echo "$as_me:$LINENO: checking for $ac_word" >&5
1667echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1668if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1669 echo $ECHO_N "(cached) $ECHO_C" >&6
1670else
1671 if test -n "$ac_ct_CC"; then
1672 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1673else
1674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1675for as_dir in $PATH
1676do
1677 IFS=$as_save_IFS
1678 test -z "$as_dir" && as_dir=.
1679 for ac_exec_ext in '' $ac_executable_extensions; do
1680 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1681 ac_cv_prog_ac_ct_CC="gcc"
1682 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1683 break 2
1684 fi
1685done
1686done
1687
1688fi
1689fi
1690ac_ct_CC=$ac_cv_prog_ac_ct_CC
1691if test -n "$ac_ct_CC"; then
1692 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1693echo "${ECHO_T}$ac_ct_CC" >&6
1694else
1695 echo "$as_me:$LINENO: result: no" >&5
1696echo "${ECHO_T}no" >&6
1697fi
1698
1699 CC=$ac_ct_CC
1700else
1701 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001702fi
1703
Jack Jansendd19cf82001-12-06 22:36:17 +00001704if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001705 if test -n "$ac_tool_prefix"; then
1706 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1707set dummy ${ac_tool_prefix}cc; ac_word=$2
1708echo "$as_me:$LINENO: checking for $ac_word" >&5
1709echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1710if test "${ac_cv_prog_CC+set}" = set; then
1711 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001712else
1713 if test -n "$CC"; then
1714 ac_cv_prog_CC="$CC" # Let the user override the test.
1715else
Martin v. Löwis11437992002-04-12 09:54:03 +00001716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1717for as_dir in $PATH
1718do
1719 IFS=$as_save_IFS
1720 test -z "$as_dir" && as_dir=.
1721 for ac_exec_ext in '' $ac_executable_extensions; do
1722 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1723 ac_cv_prog_CC="${ac_tool_prefix}cc"
1724 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1725 break 2
1726 fi
1727done
1728done
1729
1730fi
1731fi
1732CC=$ac_cv_prog_CC
1733if test -n "$CC"; then
1734 echo "$as_me:$LINENO: result: $CC" >&5
1735echo "${ECHO_T}$CC" >&6
1736else
1737 echo "$as_me:$LINENO: result: no" >&5
1738echo "${ECHO_T}no" >&6
1739fi
1740
1741fi
1742if test -z "$ac_cv_prog_CC"; then
1743 ac_ct_CC=$CC
1744 # Extract the first word of "cc", so it can be a program name with args.
1745set dummy cc; ac_word=$2
1746echo "$as_me:$LINENO: checking for $ac_word" >&5
1747echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1748if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1749 echo $ECHO_N "(cached) $ECHO_C" >&6
1750else
1751 if test -n "$ac_ct_CC"; then
1752 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1753else
1754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1755for as_dir in $PATH
1756do
1757 IFS=$as_save_IFS
1758 test -z "$as_dir" && as_dir=.
1759 for ac_exec_ext in '' $ac_executable_extensions; do
1760 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1761 ac_cv_prog_ac_ct_CC="cc"
1762 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1763 break 2
1764 fi
1765done
1766done
1767
1768fi
1769fi
1770ac_ct_CC=$ac_cv_prog_ac_ct_CC
1771if test -n "$ac_ct_CC"; then
1772 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1773echo "${ECHO_T}$ac_ct_CC" >&6
1774else
1775 echo "$as_me:$LINENO: result: no" >&5
1776echo "${ECHO_T}no" >&6
1777fi
1778
1779 CC=$ac_ct_CC
1780else
1781 CC="$ac_cv_prog_CC"
1782fi
1783
1784fi
1785if test -z "$CC"; then
1786 # Extract the first word of "cc", so it can be a program name with args.
1787set dummy cc; ac_word=$2
1788echo "$as_me:$LINENO: checking for $ac_word" >&5
1789echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1790if test "${ac_cv_prog_CC+set}" = set; then
1791 echo $ECHO_N "(cached) $ECHO_C" >&6
1792else
1793 if test -n "$CC"; then
1794 ac_cv_prog_CC="$CC" # Let the user override the test.
1795else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001796 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1798for as_dir in $PATH
1799do
1800 IFS=$as_save_IFS
1801 test -z "$as_dir" && as_dir=.
1802 for ac_exec_ext in '' $ac_executable_extensions; do
1803 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1804 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1805 ac_prog_rejected=yes
1806 continue
1807 fi
1808 ac_cv_prog_CC="cc"
1809 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1810 break 2
1811 fi
1812done
1813done
1814
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001815if test $ac_prog_rejected = yes; then
1816 # We found a bogon in the path, so make sure we never use it.
1817 set dummy $ac_cv_prog_CC
1818 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001819 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001820 # We chose a different compiler from the bogus one.
1821 # However, it has the same basename, so the bogon will be chosen
1822 # first if we set CC to just the basename; use the full file name.
1823 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001824 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001825 shift
1826 ac_cv_prog_CC="$@"
1827 fi
1828fi
1829fi
1830fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001831CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001832if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001833 echo "$as_me:$LINENO: result: $CC" >&5
1834echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001835else
Martin v. Löwis11437992002-04-12 09:54:03 +00001836 echo "$as_me:$LINENO: result: no" >&5
1837echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001838fi
1839
Martin v. Löwis11437992002-04-12 09:54:03 +00001840fi
1841if test -z "$CC"; then
1842 if test -n "$ac_tool_prefix"; then
1843 for ac_prog in cl
1844 do
1845 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1846set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1847echo "$as_me:$LINENO: checking for $ac_word" >&5
1848echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1849if test "${ac_cv_prog_CC+set}" = set; then
1850 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001851else
1852 if test -n "$CC"; then
1853 ac_cv_prog_CC="$CC" # Let the user override the test.
1854else
Martin v. Löwis11437992002-04-12 09:54:03 +00001855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1856for as_dir in $PATH
1857do
1858 IFS=$as_save_IFS
1859 test -z "$as_dir" && as_dir=.
1860 for ac_exec_ext in '' $ac_executable_extensions; do
1861 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1862 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1863 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1864 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001865 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001866done
1867done
1868
1869fi
1870fi
1871CC=$ac_cv_prog_CC
1872if test -n "$CC"; then
1873 echo "$as_me:$LINENO: result: $CC" >&5
1874echo "${ECHO_T}$CC" >&6
1875else
1876 echo "$as_me:$LINENO: result: no" >&5
1877echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001878fi
1879
Martin v. Löwis11437992002-04-12 09:54:03 +00001880 test -n "$CC" && break
1881 done
1882fi
1883if test -z "$CC"; then
1884 ac_ct_CC=$CC
1885 for ac_prog in cl
1886do
1887 # Extract the first word of "$ac_prog", so it can be a program name with args.
1888set dummy $ac_prog; ac_word=$2
1889echo "$as_me:$LINENO: checking for $ac_word" >&5
1890echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1891if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1892 echo $ECHO_N "(cached) $ECHO_C" >&6
1893else
1894 if test -n "$ac_ct_CC"; then
1895 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1896else
1897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1898for as_dir in $PATH
1899do
1900 IFS=$as_save_IFS
1901 test -z "$as_dir" && as_dir=.
1902 for ac_exec_ext in '' $ac_executable_extensions; do
1903 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1904 ac_cv_prog_ac_ct_CC="$ac_prog"
1905 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1906 break 2
1907 fi
1908done
1909done
Jack Jansendd19cf82001-12-06 22:36:17 +00001910
Martin v. Löwis11437992002-04-12 09:54:03 +00001911fi
1912fi
1913ac_ct_CC=$ac_cv_prog_ac_ct_CC
1914if test -n "$ac_ct_CC"; then
1915 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1916echo "${ECHO_T}$ac_ct_CC" >&6
1917else
1918 echo "$as_me:$LINENO: result: no" >&5
1919echo "${ECHO_T}no" >&6
1920fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001921
Martin v. Löwis11437992002-04-12 09:54:03 +00001922 test -n "$ac_ct_CC" && break
1923done
Michael W. Hudson54241132001-12-07 15:38:26 +00001924
Martin v. Löwis11437992002-04-12 09:54:03 +00001925 CC=$ac_ct_CC
1926fi
1927
1928fi
1929
1930
1931test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1932echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1933 { (exit 1); exit 1; }; }
1934
1935# Provide some information about the compiler.
1936echo "$as_me:$LINENO:" \
1937 "checking for C compiler version" >&5
1938ac_compiler=`set X $ac_compile; echo $2`
1939{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1940 (eval $ac_compiler --version </dev/null >&5) 2>&5
1941 ac_status=$?
1942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1943 (exit $ac_status); }
1944{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1945 (eval $ac_compiler -v </dev/null >&5) 2>&5
1946 ac_status=$?
1947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1948 (exit $ac_status); }
1949{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1950 (eval $ac_compiler -V </dev/null >&5) 2>&5
1951 ac_status=$?
1952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1953 (exit $ac_status); }
1954
1955cat >conftest.$ac_ext <<_ACEOF
1956#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001957#include "confdefs.h"
1958
Martin v. Löwis11437992002-04-12 09:54:03 +00001959#ifdef F77_DUMMY_MAIN
1960# ifdef __cplusplus
1961 extern "C"
1962# endif
1963 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001965int
1966main ()
1967{
1968
1969 ;
1970 return 0;
1971}
1972_ACEOF
1973ac_clean_files_save=$ac_clean_files
1974ac_clean_files="$ac_clean_files a.out a.exe"
1975# Try to create an executable without -o first, disregard a.out.
1976# It will help us diagnose broken compilers, and finding out an intuition
1977# of exeext.
1978echo "$as_me:$LINENO: checking for C compiler default output" >&5
1979echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1980ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1981if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1982 (eval $ac_link_default) 2>&5
1983 ac_status=$?
1984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1985 (exit $ac_status); }; then
1986 # Find the output, starting from the most likely. This scheme is
1987# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1988# resort.
1989
1990# Be careful to initialize this variable, since it used to be cached.
1991# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1992ac_cv_exeext=
1993for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1994 ls a.out conftest 2>/dev/null;
1995 ls a.* conftest.* 2>/dev/null`; do
1996 case $ac_file in
1997 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1998 a.out ) # We found the default executable, but exeext='' is most
1999 # certainly right.
2000 break;;
2001 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2002 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2003 export ac_cv_exeext
2004 break;;
2005 * ) break;;
2006 esac
2007done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002008else
Martin v. Löwis11437992002-04-12 09:54:03 +00002009 echo "$as_me: failed program was:" >&5
2010cat conftest.$ac_ext >&5
2011{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2012echo "$as_me: error: C compiler cannot create executables" >&2;}
2013 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002014fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002015
Martin v. Löwis11437992002-04-12 09:54:03 +00002016ac_exeext=$ac_cv_exeext
2017echo "$as_me:$LINENO: result: $ac_file" >&5
2018echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002019
Martin v. Löwis11437992002-04-12 09:54:03 +00002020# Check the compiler produces executables we can run. If not, either
2021# the compiler is broken, or we cross compile.
2022echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2023echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2024# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2025# If not cross compiling, check that we can run a simple program.
2026if test "$cross_compiling" != yes; then
2027 if { ac_try='./$ac_file'
2028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2029 (eval $ac_try) 2>&5
2030 ac_status=$?
2031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2032 (exit $ac_status); }; }; then
2033 cross_compiling=no
2034 else
2035 if test "$cross_compiling" = maybe; then
2036 cross_compiling=yes
2037 else
2038 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2039If you meant to cross compile, use \`--host'." >&5
2040echo "$as_me: error: cannot run C compiled programs.
2041If you meant to cross compile, use \`--host'." >&2;}
2042 { (exit 1); exit 1; }; }
2043 fi
2044 fi
2045fi
2046echo "$as_me:$LINENO: result: yes" >&5
2047echo "${ECHO_T}yes" >&6
2048
2049rm -f a.out a.exe conftest$ac_cv_exeext
2050ac_clean_files=$ac_clean_files_save
2051# Check the compiler produces executables we can run. If not, either
2052# the compiler is broken, or we cross compile.
2053echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2054echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2055echo "$as_me:$LINENO: result: $cross_compiling" >&5
2056echo "${ECHO_T}$cross_compiling" >&6
2057
2058echo "$as_me:$LINENO: checking for suffix of executables" >&5
2059echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2061 (eval $ac_link) 2>&5
2062 ac_status=$?
2063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2064 (exit $ac_status); }; then
2065 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2066# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2067# work properly (i.e., refer to `conftest.exe'), while it won't with
2068# `rm'.
2069for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2070 case $ac_file in
2071 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2072 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2073 export ac_cv_exeext
2074 break;;
2075 * ) break;;
2076 esac
2077done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002078else
Martin v. Löwis11437992002-04-12 09:54:03 +00002079 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2080echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2081 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002082fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002083
Martin v. Löwis11437992002-04-12 09:54:03 +00002084rm -f conftest$ac_cv_exeext
2085echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2086echo "${ECHO_T}$ac_cv_exeext" >&6
2087
2088rm -f conftest.$ac_ext
2089EXEEXT=$ac_cv_exeext
2090ac_exeext=$EXEEXT
2091echo "$as_me:$LINENO: checking for suffix of object files" >&5
2092echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2093if test "${ac_cv_objext+set}" = set; then
2094 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002095else
Martin v. Löwis11437992002-04-12 09:54:03 +00002096 cat >conftest.$ac_ext <<_ACEOF
2097#line $LINENO "configure"
2098#include "confdefs.h"
2099
2100#ifdef F77_DUMMY_MAIN
2101# ifdef __cplusplus
2102 extern "C"
2103# endif
2104 int F77_DUMMY_MAIN() { return 1; }
2105#endif
2106int
2107main ()
2108{
2109
2110 ;
2111 return 0;
2112}
2113_ACEOF
2114rm -f conftest.o conftest.obj
2115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2116 (eval $ac_compile) 2>&5
2117 ac_status=$?
2118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2119 (exit $ac_status); }; then
2120 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2121 case $ac_file in
2122 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2123 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2124 break;;
2125 esac
2126done
2127else
2128 echo "$as_me: failed program was:" >&5
2129cat conftest.$ac_ext >&5
2130{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2131echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2132 { (exit 1); exit 1; }; }
2133fi
2134
2135rm -f conftest.$ac_cv_objext conftest.$ac_ext
2136fi
2137echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2138echo "${ECHO_T}$ac_cv_objext" >&6
2139OBJEXT=$ac_cv_objext
2140ac_objext=$OBJEXT
2141echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2142echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2143if test "${ac_cv_c_compiler_gnu+set}" = set; then
2144 echo $ECHO_N "(cached) $ECHO_C" >&6
2145else
2146 cat >conftest.$ac_ext <<_ACEOF
2147#line $LINENO "configure"
2148#include "confdefs.h"
2149
2150#ifdef F77_DUMMY_MAIN
2151# ifdef __cplusplus
2152 extern "C"
2153# endif
2154 int F77_DUMMY_MAIN() { return 1; }
2155#endif
2156int
2157main ()
2158{
2159#ifndef __GNUC__
2160 choke me
2161#endif
2162
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167rm -f conftest.$ac_objext
2168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2169 (eval $ac_compile) 2>&5
2170 ac_status=$?
2171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2172 (exit $ac_status); } &&
2173 { ac_try='test -s conftest.$ac_objext'
2174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2175 (eval $ac_try) 2>&5
2176 ac_status=$?
2177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178 (exit $ac_status); }; }; then
2179 ac_compiler_gnu=yes
2180else
2181 echo "$as_me: failed program was:" >&5
2182cat conftest.$ac_ext >&5
2183ac_compiler_gnu=no
2184fi
2185rm -f conftest.$ac_objext conftest.$ac_ext
2186ac_cv_c_compiler_gnu=$ac_compiler_gnu
2187
2188fi
2189echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2190echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2191GCC=`test $ac_compiler_gnu = yes && echo yes`
2192ac_test_CFLAGS=${CFLAGS+set}
2193ac_save_CFLAGS=$CFLAGS
2194CFLAGS="-g"
2195echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2196echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2197if test "${ac_cv_prog_cc_g+set}" = set; then
2198 echo $ECHO_N "(cached) $ECHO_C" >&6
2199else
2200 cat >conftest.$ac_ext <<_ACEOF
2201#line $LINENO "configure"
2202#include "confdefs.h"
2203
2204#ifdef F77_DUMMY_MAIN
2205# ifdef __cplusplus
2206 extern "C"
2207# endif
2208 int F77_DUMMY_MAIN() { return 1; }
2209#endif
2210int
2211main ()
2212{
2213
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218rm -f conftest.$ac_objext
2219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2220 (eval $ac_compile) 2>&5
2221 ac_status=$?
2222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2223 (exit $ac_status); } &&
2224 { ac_try='test -s conftest.$ac_objext'
2225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2226 (eval $ac_try) 2>&5
2227 ac_status=$?
2228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2229 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002230 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002231else
Martin v. Löwis11437992002-04-12 09:54:03 +00002232 echo "$as_me: failed program was:" >&5
2233cat conftest.$ac_ext >&5
2234ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002235fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002236rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002238echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2239echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002240if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002241 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002242elif test $ac_cv_prog_cc_g = yes; then
2243 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002244 CFLAGS="-g -O2"
2245 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002246 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002247 fi
2248else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002249 if test "$GCC" = yes; then
2250 CFLAGS="-O2"
2251 else
2252 CFLAGS=
2253 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002254fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002255# Some people use a C++ compiler to compile C. Since we use `exit',
2256# in C++ we need to declare it. In case someone uses the same compiler
2257# for both compiling C and C++ we need to have the C++ compiler decide
2258# the declaration of exit, since it's the most demanding environment.
2259cat >conftest.$ac_ext <<_ACEOF
2260#ifndef __cplusplus
2261 choke me
2262#endif
2263_ACEOF
2264rm -f conftest.$ac_objext
2265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2266 (eval $ac_compile) 2>&5
2267 ac_status=$?
2268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2269 (exit $ac_status); } &&
2270 { ac_try='test -s conftest.$ac_objext'
2271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2272 (eval $ac_try) 2>&5
2273 ac_status=$?
2274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2275 (exit $ac_status); }; }; then
2276 for ac_declaration in \
2277 ''\
2278 '#include <stdlib.h>' \
2279 'extern "C" void std::exit (int) throw (); using std::exit;' \
2280 'extern "C" void std::exit (int); using std::exit;' \
2281 'extern "C" void exit (int) throw ();' \
2282 'extern "C" void exit (int);' \
2283 'void exit (int);'
2284do
2285 cat >conftest.$ac_ext <<_ACEOF
2286#line $LINENO "configure"
2287#include "confdefs.h"
2288#include <stdlib.h>
2289$ac_declaration
2290#ifdef F77_DUMMY_MAIN
2291# ifdef __cplusplus
2292 extern "C"
2293# endif
2294 int F77_DUMMY_MAIN() { return 1; }
2295#endif
2296int
2297main ()
2298{
2299exit (42);
2300 ;
2301 return 0;
2302}
2303_ACEOF
2304rm -f conftest.$ac_objext
2305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2306 (eval $ac_compile) 2>&5
2307 ac_status=$?
2308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2309 (exit $ac_status); } &&
2310 { ac_try='test -s conftest.$ac_objext'
2311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2312 (eval $ac_try) 2>&5
2313 ac_status=$?
2314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2315 (exit $ac_status); }; }; then
2316 :
2317else
2318 echo "$as_me: failed program was:" >&5
2319cat conftest.$ac_ext >&5
2320continue
2321fi
2322rm -f conftest.$ac_objext conftest.$ac_ext
2323 cat >conftest.$ac_ext <<_ACEOF
2324#line $LINENO "configure"
2325#include "confdefs.h"
2326$ac_declaration
2327#ifdef F77_DUMMY_MAIN
2328# ifdef __cplusplus
2329 extern "C"
2330# endif
2331 int F77_DUMMY_MAIN() { return 1; }
2332#endif
2333int
2334main ()
2335{
2336exit (42);
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341rm -f conftest.$ac_objext
2342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2343 (eval $ac_compile) 2>&5
2344 ac_status=$?
2345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2346 (exit $ac_status); } &&
2347 { ac_try='test -s conftest.$ac_objext'
2348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2349 (eval $ac_try) 2>&5
2350 ac_status=$?
2351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2352 (exit $ac_status); }; }; then
2353 break
2354else
2355 echo "$as_me: failed program was:" >&5
2356cat conftest.$ac_ext >&5
2357fi
2358rm -f conftest.$ac_objext conftest.$ac_ext
2359done
2360rm -f conftest*
2361if test -n "$ac_declaration"; then
2362 echo '#ifdef __cplusplus' >>confdefs.h
2363 echo $ac_declaration >>confdefs.h
2364 echo '#endif' >>confdefs.h
2365fi
2366
2367else
2368 echo "$as_me: failed program was:" >&5
2369cat conftest.$ac_ext >&5
2370fi
2371rm -f conftest.$ac_objext conftest.$ac_ext
2372ac_ext=c
2373ac_cpp='$CPP $CPPFLAGS'
2374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2376ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002377
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002378
2379# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002380
2381ac_ext=c
2382ac_cpp='$CPP $CPPFLAGS'
2383ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2384ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2385ac_compiler_gnu=$ac_cv_c_compiler_gnu
2386echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2387echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002388# On Suns, sometimes $CPP names a directory.
2389if test -n "$CPP" && test -d "$CPP"; then
2390 CPP=
2391fi
2392if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002393 if test "${ac_cv_prog_CPP+set}" = set; then
2394 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002395else
Martin v. Löwis11437992002-04-12 09:54:03 +00002396 # Double quotes because CPP needs to be expanded
2397 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2398 do
2399 ac_preproc_ok=false
2400for ac_c_preproc_warn_flag in '' yes
2401do
2402 # Use a header file that comes with gcc, so configuring glibc
2403 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002404 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002405 # not just through cpp. "Syntax error" is here to catch this case.
2406 cat >conftest.$ac_ext <<_ACEOF
2407#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002408#include "confdefs.h"
2409#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002410 Syntax error
2411_ACEOF
2412if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2413 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2414 ac_status=$?
2415 egrep -v '^ *\+' conftest.er1 >conftest.err
2416 rm -f conftest.er1
2417 cat conftest.err >&5
2418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2419 (exit $ac_status); } >/dev/null; then
2420 if test -s conftest.err; then
2421 ac_cpp_err=$ac_c_preproc_warn_flag
2422 else
2423 ac_cpp_err=
2424 fi
2425else
2426 ac_cpp_err=yes
2427fi
2428if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002429 :
2430else
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002432 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002433 # Broken: fails on valid input.
2434continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002435fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002436rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002437
Martin v. Löwis11437992002-04-12 09:54:03 +00002438 # OK, works on sane cases. Now check whether non-existent headers
2439 # can be detected and how.
2440 cat >conftest.$ac_ext <<_ACEOF
2441#line $LINENO "configure"
2442#include "confdefs.h"
2443#include <ac_nonexistent.h>
2444_ACEOF
2445if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2446 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2447 ac_status=$?
2448 egrep -v '^ *\+' conftest.er1 >conftest.err
2449 rm -f conftest.er1
2450 cat conftest.err >&5
2451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2452 (exit $ac_status); } >/dev/null; then
2453 if test -s conftest.err; then
2454 ac_cpp_err=$ac_c_preproc_warn_flag
2455 else
2456 ac_cpp_err=
2457 fi
2458else
2459 ac_cpp_err=yes
2460fi
2461if test -z "$ac_cpp_err"; then
2462 # Broken: success on invalid input.
2463continue
2464else
2465 echo "$as_me: failed program was:" >&5
2466 cat conftest.$ac_ext >&5
2467 # Passes both tests.
2468ac_preproc_ok=:
2469break
2470fi
2471rm -f conftest.err conftest.$ac_ext
2472
2473done
2474# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2475rm -f conftest.err conftest.$ac_ext
2476if $ac_preproc_ok; then
2477 break
2478fi
2479
2480 done
2481 ac_cv_prog_CPP=$CPP
2482
2483fi
2484 CPP=$ac_cv_prog_CPP
2485else
2486 ac_cv_prog_CPP=$CPP
2487fi
2488echo "$as_me:$LINENO: result: $CPP" >&5
2489echo "${ECHO_T}$CPP" >&6
2490ac_preproc_ok=false
2491for ac_c_preproc_warn_flag in '' yes
2492do
2493 # Use a header file that comes with gcc, so configuring glibc
2494 # with a fresh cross-compiler works.
2495 # On the NeXT, cc -E runs the code through the compiler's parser,
2496 # not just through cpp. "Syntax error" is here to catch this case.
2497 cat >conftest.$ac_ext <<_ACEOF
2498#line $LINENO "configure"
2499#include "confdefs.h"
2500#include <assert.h>
2501 Syntax error
2502_ACEOF
2503if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2504 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2505 ac_status=$?
2506 egrep -v '^ *\+' conftest.er1 >conftest.err
2507 rm -f conftest.er1
2508 cat conftest.err >&5
2509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2510 (exit $ac_status); } >/dev/null; then
2511 if test -s conftest.err; then
2512 ac_cpp_err=$ac_c_preproc_warn_flag
2513 else
2514 ac_cpp_err=
2515 fi
2516else
2517 ac_cpp_err=yes
2518fi
2519if test -z "$ac_cpp_err"; then
2520 :
2521else
2522 echo "$as_me: failed program was:" >&5
2523 cat conftest.$ac_ext >&5
2524 # Broken: fails on valid input.
2525continue
2526fi
2527rm -f conftest.err conftest.$ac_ext
2528
2529 # OK, works on sane cases. Now check whether non-existent headers
2530 # can be detected and how.
2531 cat >conftest.$ac_ext <<_ACEOF
2532#line $LINENO "configure"
2533#include "confdefs.h"
2534#include <ac_nonexistent.h>
2535_ACEOF
2536if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2537 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2538 ac_status=$?
2539 egrep -v '^ *\+' conftest.er1 >conftest.err
2540 rm -f conftest.er1
2541 cat conftest.err >&5
2542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2543 (exit $ac_status); } >/dev/null; then
2544 if test -s conftest.err; then
2545 ac_cpp_err=$ac_c_preproc_warn_flag
2546 else
2547 ac_cpp_err=
2548 fi
2549else
2550 ac_cpp_err=yes
2551fi
2552if test -z "$ac_cpp_err"; then
2553 # Broken: success on invalid input.
2554continue
2555else
2556 echo "$as_me: failed program was:" >&5
2557 cat conftest.$ac_ext >&5
2558 # Passes both tests.
2559ac_preproc_ok=:
2560break
2561fi
2562rm -f conftest.err conftest.$ac_ext
2563
2564done
2565# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2566rm -f conftest.err conftest.$ac_ext
2567if $ac_preproc_ok; then
2568 :
2569else
2570 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2571echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2572 { (exit 1); exit 1; }; }
2573fi
2574
2575ac_ext=c
2576ac_cpp='$CPP $CPPFLAGS'
2577ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2578ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2579ac_compiler_gnu=$ac_cv_c_compiler_gnu
2580
2581
2582
2583echo "$as_me:$LINENO: checking for AIX" >&5
2584echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2585cat >conftest.$ac_ext <<_ACEOF
2586#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002587#include "confdefs.h"
2588#ifdef _AIX
2589 yes
2590#endif
2591
Martin v. Löwis11437992002-04-12 09:54:03 +00002592_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002593if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2594 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 echo "$as_me:$LINENO: result: yes" >&5
2596echo "${ECHO_T}yes" >&6
2597cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002598#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002599_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002600
2601else
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 echo "$as_me:$LINENO: result: no" >&5
2603echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002604fi
2605rm -f conftest*
2606
Michael W. Hudson54241132001-12-07 15:38:26 +00002607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2609echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2610if test "${ac_cv_header_stdc+set}" = set; then
2611 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002612else
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 cat >conftest.$ac_ext <<_ACEOF
2614#line $LINENO "configure"
2615#include "confdefs.h"
2616#include <stdlib.h>
2617#include <stdarg.h>
2618#include <string.h>
2619#include <float.h>
2620
2621_ACEOF
2622if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2623 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2624 ac_status=$?
2625 egrep -v '^ *\+' conftest.er1 >conftest.err
2626 rm -f conftest.er1
2627 cat conftest.err >&5
2628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2629 (exit $ac_status); } >/dev/null; then
2630 if test -s conftest.err; then
2631 ac_cpp_err=$ac_c_preproc_warn_flag
2632 else
2633 ac_cpp_err=
2634 fi
2635else
2636 ac_cpp_err=yes
2637fi
2638if test -z "$ac_cpp_err"; then
2639 ac_cv_header_stdc=yes
2640else
2641 echo "$as_me: failed program was:" >&5
2642 cat conftest.$ac_ext >&5
2643 ac_cv_header_stdc=no
2644fi
2645rm -f conftest.err conftest.$ac_ext
2646
2647if test $ac_cv_header_stdc = yes; then
2648 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2649 cat >conftest.$ac_ext <<_ACEOF
2650#line $LINENO "configure"
2651#include "confdefs.h"
2652#include <string.h>
2653
2654_ACEOF
2655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2656 egrep "memchr" >/dev/null 2>&1; then
2657 :
2658else
2659 ac_cv_header_stdc=no
2660fi
2661rm -f conftest*
2662
2663fi
2664
2665if test $ac_cv_header_stdc = yes; then
2666 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2667 cat >conftest.$ac_ext <<_ACEOF
2668#line $LINENO "configure"
2669#include "confdefs.h"
2670#include <stdlib.h>
2671
2672_ACEOF
2673if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2674 egrep "free" >/dev/null 2>&1; then
2675 :
2676else
2677 ac_cv_header_stdc=no
2678fi
2679rm -f conftest*
2680
2681fi
2682
2683if test $ac_cv_header_stdc = yes; then
2684 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2685 if test "$cross_compiling" = yes; then
2686 :
2687else
2688 cat >conftest.$ac_ext <<_ACEOF
2689#line $LINENO "configure"
2690#include "confdefs.h"
2691#include <ctype.h>
2692#if ((' ' & 0x0FF) == 0x020)
2693# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2694# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2695#else
2696# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2697 || ('j' <= (c) && (c) <= 'r') \
2698 || ('s' <= (c) && (c) <= 'z'))
2699# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2700#endif
2701
2702#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2703int
2704main ()
2705{
2706 int i;
2707 for (i = 0; i < 256; i++)
2708 if (XOR (islower (i), ISLOWER (i))
2709 || toupper (i) != TOUPPER (i))
2710 exit(2);
2711 exit (0);
2712}
2713_ACEOF
2714rm -f conftest$ac_exeext
2715if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2716 (eval $ac_link) 2>&5
2717 ac_status=$?
2718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2719 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2721 (eval $ac_try) 2>&5
2722 ac_status=$?
2723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2724 (exit $ac_status); }; }; then
2725 :
2726else
2727 echo "$as_me: program exited with status $ac_status" >&5
2728echo "$as_me: failed program was:" >&5
2729cat conftest.$ac_ext >&5
2730( exit $ac_status )
2731ac_cv_header_stdc=no
2732fi
2733rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2734fi
2735fi
2736fi
2737echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2738echo "${ECHO_T}$ac_cv_header_stdc" >&6
2739if test $ac_cv_header_stdc = yes; then
2740
2741cat >>confdefs.h <<\_ACEOF
2742#define STDC_HEADERS 1
2743_ACEOF
2744
2745fi
2746
2747# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2758 inttypes.h stdint.h unistd.h
2759do
2760as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2761echo "$as_me:$LINENO: checking for $ac_header" >&5
2762echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2763if eval "test \"\${$as_ac_Header+set}\" = set"; then
2764 echo $ECHO_N "(cached) $ECHO_C" >&6
2765else
2766 cat >conftest.$ac_ext <<_ACEOF
2767#line $LINENO "configure"
2768#include "confdefs.h"
2769$ac_includes_default
2770
2771#include <$ac_header>
2772_ACEOF
2773rm -f conftest.$ac_objext
2774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2775 (eval $ac_compile) 2>&5
2776 ac_status=$?
2777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2778 (exit $ac_status); } &&
2779 { ac_try='test -s conftest.$ac_objext'
2780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2781 (eval $ac_try) 2>&5
2782 ac_status=$?
2783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2784 (exit $ac_status); }; }; then
2785 eval "$as_ac_Header=yes"
2786else
2787 echo "$as_me: failed program was:" >&5
2788cat conftest.$ac_ext >&5
2789eval "$as_ac_Header=no"
2790fi
2791rm -f conftest.$ac_objext conftest.$ac_ext
2792fi
2793echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2794echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2795if test `eval echo '${'$as_ac_Header'}'` = yes; then
2796 cat >>confdefs.h <<_ACEOF
2797#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2798_ACEOF
2799
2800fi
2801
2802done
2803
2804
2805if test "${ac_cv_header_minix_config_h+set}" = set; then
2806 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2807echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2808if test "${ac_cv_header_minix_config_h+set}" = set; then
2809 echo $ECHO_N "(cached) $ECHO_C" >&6
2810fi
2811echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2812echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2813else
2814 # Is the header compilable?
2815echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2816echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2817cat >conftest.$ac_ext <<_ACEOF
2818#line $LINENO "configure"
2819#include "confdefs.h"
2820$ac_includes_default
2821#include <minix/config.h>
2822_ACEOF
2823rm -f conftest.$ac_objext
2824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2825 (eval $ac_compile) 2>&5
2826 ac_status=$?
2827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2828 (exit $ac_status); } &&
2829 { ac_try='test -s conftest.$ac_objext'
2830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2831 (eval $ac_try) 2>&5
2832 ac_status=$?
2833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2834 (exit $ac_status); }; }; then
2835 ac_header_compiler=yes
2836else
2837 echo "$as_me: failed program was:" >&5
2838cat conftest.$ac_ext >&5
2839ac_header_compiler=no
2840fi
2841rm -f conftest.$ac_objext conftest.$ac_ext
2842echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2843echo "${ECHO_T}$ac_header_compiler" >&6
2844
2845# Is the header present?
2846echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2847echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2848cat >conftest.$ac_ext <<_ACEOF
2849#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002850#include "confdefs.h"
2851#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002852_ACEOF
2853if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2854 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2855 ac_status=$?
2856 egrep -v '^ *\+' conftest.er1 >conftest.err
2857 rm -f conftest.er1
2858 cat conftest.err >&5
2859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2860 (exit $ac_status); } >/dev/null; then
2861 if test -s conftest.err; then
2862 ac_cpp_err=$ac_c_preproc_warn_flag
2863 else
2864 ac_cpp_err=
2865 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002866else
Martin v. Löwis11437992002-04-12 09:54:03 +00002867 ac_cpp_err=yes
2868fi
2869if test -z "$ac_cpp_err"; then
2870 ac_header_preproc=yes
2871else
2872 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002873 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002874 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002875fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002876rm -f conftest.err conftest.$ac_ext
2877echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2878echo "${ECHO_T}$ac_header_preproc" >&6
2879
2880# So? What about this header?
2881case $ac_header_compiler:$ac_header_preproc in
2882 yes:no )
2883 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2884echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2885 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2886echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2887 no:yes )
2888 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2889echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2890 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2891echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2892 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2893echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2894esac
2895echo "$as_me:$LINENO: checking for minix/config.h" >&5
2896echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2897if test "${ac_cv_header_minix_config_h+set}" = set; then
2898 echo $ECHO_N "(cached) $ECHO_C" >&6
2899else
2900 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002901fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002902echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2903echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2904
2905fi
2906if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002907 MINIX=yes
2908else
Martin v. Löwis11437992002-04-12 09:54:03 +00002909 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002910fi
2911
Martin v. Löwis11437992002-04-12 09:54:03 +00002912
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002913if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002914
2915cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002916#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002917_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002918
Martin v. Löwis11437992002-04-12 09:54:03 +00002919
2920cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002921#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002922_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002923
Martin v. Löwis11437992002-04-12 09:54:03 +00002924
2925cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002926#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002927_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002928
2929fi
2930
2931
Michael W. Hudson54241132001-12-07 15:38:26 +00002932
Martin v. Löwis11437992002-04-12 09:54:03 +00002933echo "$as_me:$LINENO: checking for --with-suffix" >&5
2934echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002935
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002936# Check whether --with-suffix or --without-suffix was given.
2937if test "${with_suffix+set}" = set; then
2938 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002939
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002940 case $withval in
2941 no) EXEEXT=;;
2942 yes) EXEEXT=.exe;;
2943 *) EXEEXT=$withval;;
2944 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002945fi;
2946echo "$as_me:$LINENO: result: $EXEEXT" >&5
2947echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002948
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002949# Test whether we're running on a non-case-sensitive system, in which
2950# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002951
Martin v. Löwis11437992002-04-12 09:54:03 +00002952echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2953echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00002954if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002955then
Martin v. Löwis11437992002-04-12 09:54:03 +00002956 echo "$as_me:$LINENO: result: yes" >&5
2957echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002958 BUILDEXEEXT=.exe
2959else
Martin v. Löwis11437992002-04-12 09:54:03 +00002960 echo "$as_me:$LINENO: result: no" >&5
2961echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002962 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002963fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002964
Guido van Rossumdd997f71998-10-07 19:58:26 +00002965case $MACHDEP in
2966bsdos*)
2967 case $CC in
2968 gcc) CC="$CC -D_HAVE_BSDI";;
2969 esac;;
2970esac
2971
Guido van Rossum24b1e751997-08-21 02:29:16 +00002972case $ac_sys_system in
2973hp*|HP*)
2974 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002975 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002976 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002977Monterey*)
2978 case $CC in
2979 cc) CC="$CC -Wl,-Bexport";;
2980 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002981SunOS*)
2982 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002983
2984cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002985#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002986_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002987
2988 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002989esac
2990
Michael W. Hudson54241132001-12-07 15:38:26 +00002991
2992
Martin v. Löwis11437992002-04-12 09:54:03 +00002993echo "$as_me:$LINENO: checking LIBRARY" >&5
2994echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002995if test -z "$LIBRARY"
2996then
2997 LIBRARY='libpython$(VERSION).a'
2998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002999echo "$as_me:$LINENO: result: $LIBRARY" >&5
3000echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003001
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003002# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003003# name of the library into which to insert object files). BLDLIBRARY is also
3004# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3005# is blank as the main program is not linked directly against LDLIBRARY.
3006# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3007# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3008# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3009# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003010#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003011# RUNSHARED is used to run shared python without installed libraries
3012#
3013# INSTSONAME is the name of the shared library that will be use to install
3014# on the system - some systems like version suffix, others don't
3015
3016
Michael W. Hudson54241132001-12-07 15:38:26 +00003017
3018
3019
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003020
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003021LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003022BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003023INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003024DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003025LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003026RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003027
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003028# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003029# If CXX is set, and if it is needed to link a main function that was
3030# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3031# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003032# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003033# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003034
Martin v. Löwis11437992002-04-12 09:54:03 +00003035echo "$as_me:$LINENO: checking LINKCC" >&5
3036echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003037if test -z "$LINKCC"
3038then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003039 if test -z "$CXX"; then
3040 LINKCC="\$(PURIFY) \$(CC)"
3041 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003042 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003043 $CXX -c conftest.$ac_ext 2>&5
3044 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3045 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3046 then
3047 LINKCC="\$(PURIFY) \$(CC)"
3048 else
3049 LINKCC="\$(PURIFY) \$(CXX)"
3050 fi
3051 rm -fr conftest*
3052 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003053 case $ac_sys_system in
3054 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003055 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003056 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003057 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003058 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003059 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003060 esac
3061fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003062echo "$as_me:$LINENO: result: $LINKCC" >&5
3063echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003064
Martin v. Löwis11437992002-04-12 09:54:03 +00003065echo "$as_me:$LINENO: checking for --enable-shared" >&5
3066echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003067# Check whether --enable-shared or --disable-shared was given.
3068if test "${enable_shared+set}" = set; then
3069 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003070
Martin v. Löwis11437992002-04-12 09:54:03 +00003071fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003072
3073if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003074then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003075 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003076 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003077 enable_shared="yes";;
3078 *)
3079 enable_shared="no";;
3080 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003081fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003082echo "$as_me:$LINENO: result: $enable_shared" >&5
3083echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003084
3085
Martin v. Löwis11437992002-04-12 09:54:03 +00003086echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3087echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003088
Guido van Rossumb8552162001-09-05 14:58:11 +00003089# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3090# library that we build, but we do not want to link against it (we
3091# will find it with a -framework option). For this reason there is an
3092# extra variable BLDLIBRARY against which Python and the extension
3093# modules are linked, BLDLIBRARY. This is normally the same as
3094# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003095if test "$enable_framework"
3096then
3097 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3098 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3099 BLDLIBRARY=''
3100else
3101 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003102fi
Jack Jansene578a632001-08-15 01:27:14 +00003103
Martin v. Löwis1142de32002-03-29 16:28:31 +00003104# Other platforms follow
3105if test $enable_shared = "yes"; then
3106 case $ac_sys_system in
3107 BeOS*)
3108 LDLIBRARY='libpython$(VERSION).so'
3109 ;;
3110 CYGWIN*)
3111 LDLIBRARY='libpython$(VERSION).dll.a'
3112 DLLLIBRARY='libpython$(VERSION).dll'
3113 ;;
3114 SunOS*)
3115 LDLIBRARY='libpython$(VERSION).so'
3116 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3117 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3118 ;;
3119 Linux*)
3120 LDLIBRARY='libpython$(VERSION).so'
3121 BLDLIBRARY='-L. -lpython$(VERSION)'
3122 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3123 INSTSONAME="$LDLIBRARY".$SOVERSION
3124 ;;
3125 hp*|HP*)
3126 LDLIBRARY='libpython$(VERSION).sl'
3127 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3128 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3129 ;;
3130 OSF*)
3131 LDLIBRARY='libpython$(VERSION).so'
3132 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3133 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3134 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003135 atheos*)
3136 LDLIBRARY='libpython$(VERSION).so'
3137 BLDLIBRARY='-L. -lpython$(VERSION)'
3138 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3139 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003140 esac
3141 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3142 case $MACHDEP in
3143 dguxR4)
3144 LDLIBRARY='libpython$(VERSION).so'
3145 OPT="$OPT -pic"
3146 ;;
3147 esac
3148fi
3149
Martin v. Löwis11437992002-04-12 09:54:03 +00003150echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3151echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003152
Martin v. Löwis11437992002-04-12 09:54:03 +00003153if test -n "$ac_tool_prefix"; then
3154 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3155set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3156echo "$as_me:$LINENO: checking for $ac_word" >&5
3157echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3158if test "${ac_cv_prog_RANLIB+set}" = set; then
3159 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003160else
3161 if test -n "$RANLIB"; then
3162 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3163else
Martin v. Löwis11437992002-04-12 09:54:03 +00003164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3165for as_dir in $PATH
3166do
3167 IFS=$as_save_IFS
3168 test -z "$as_dir" && as_dir=.
3169 for ac_exec_ext in '' $ac_executable_extensions; do
3170 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3171 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3172 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3173 break 2
3174 fi
3175done
3176done
3177
Guido van Rossum627b2d71993-12-24 10:39:16 +00003178fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003179fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003180RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003181if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003182 echo "$as_me:$LINENO: result: $RANLIB" >&5
3183echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003184else
Martin v. Löwis11437992002-04-12 09:54:03 +00003185 echo "$as_me:$LINENO: result: no" >&5
3186echo "${ECHO_T}no" >&6
3187fi
3188
3189fi
3190if test -z "$ac_cv_prog_RANLIB"; then
3191 ac_ct_RANLIB=$RANLIB
3192 # Extract the first word of "ranlib", so it can be a program name with args.
3193set dummy ranlib; ac_word=$2
3194echo "$as_me:$LINENO: checking for $ac_word" >&5
3195echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3196if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3197 echo $ECHO_N "(cached) $ECHO_C" >&6
3198else
3199 if test -n "$ac_ct_RANLIB"; then
3200 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3201else
3202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3203for as_dir in $PATH
3204do
3205 IFS=$as_save_IFS
3206 test -z "$as_dir" && as_dir=.
3207 for ac_exec_ext in '' $ac_executable_extensions; do
3208 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3209 ac_cv_prog_ac_ct_RANLIB="ranlib"
3210 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3211 break 2
3212 fi
3213done
3214done
3215
3216 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3217fi
3218fi
3219ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3220if test -n "$ac_ct_RANLIB"; then
3221 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3222echo "${ECHO_T}$ac_ct_RANLIB" >&6
3223else
3224 echo "$as_me:$LINENO: result: no" >&5
3225echo "${ECHO_T}no" >&6
3226fi
3227
3228 RANLIB=$ac_ct_RANLIB
3229else
3230 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003231fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003232
3233
Guido van Rossum7f43da71994-08-01 12:15:30 +00003234for ac_prog in ar aal
3235do
Martin v. Löwis11437992002-04-12 09:54:03 +00003236 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003237set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003238echo "$as_me:$LINENO: checking for $ac_word" >&5
3239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3240if test "${ac_cv_prog_AR+set}" = set; then
3241 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003242else
3243 if test -n "$AR"; then
3244 ac_cv_prog_AR="$AR" # Let the user override the test.
3245else
Martin v. Löwis11437992002-04-12 09:54:03 +00003246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3247for as_dir in $PATH
3248do
3249 IFS=$as_save_IFS
3250 test -z "$as_dir" && as_dir=.
3251 for ac_exec_ext in '' $ac_executable_extensions; do
3252 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3253 ac_cv_prog_AR="$ac_prog"
3254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3255 break 2
3256 fi
3257done
3258done
3259
Guido van Rossum7f43da71994-08-01 12:15:30 +00003260fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003261fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003262AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003263if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003264 echo "$as_me:$LINENO: result: $AR" >&5
3265echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003266else
Martin v. Löwis11437992002-04-12 09:54:03 +00003267 echo "$as_me:$LINENO: result: no" >&5
3268echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003269fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003270
Martin v. Löwis11437992002-04-12 09:54:03 +00003271 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003272done
3273test -n "$AR" || AR="ar"
3274
Michael W. Hudson54241132001-12-07 15:38:26 +00003275
Neil Schemenauera42c8272001-03-31 00:01:55 +00003276case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003277bsdos*|hp*|HP*)
3278 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003279 if test -z "$INSTALL"
3280 then
3281 INSTALL="${srcdir}/install-sh -c"
3282 fi
3283esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003284ac_aux_dir=
3285for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3286 if test -f $ac_dir/install-sh; then
3287 ac_aux_dir=$ac_dir
3288 ac_install_sh="$ac_aux_dir/install-sh -c"
3289 break
3290 elif test -f $ac_dir/install.sh; then
3291 ac_aux_dir=$ac_dir
3292 ac_install_sh="$ac_aux_dir/install.sh -c"
3293 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003294 elif test -f $ac_dir/shtool; then
3295 ac_aux_dir=$ac_dir
3296 ac_install_sh="$ac_aux_dir/shtool install -c"
3297 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003298 fi
3299done
3300if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003301 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3302echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3303 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003304fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003305ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3306ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3307ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003308
3309# Find a good install program. We prefer a C program (faster),
3310# so one script is as good as another. But avoid the broken or
3311# incompatible versions:
3312# SysV /etc/install, /usr/sbin/install
3313# SunOS /usr/etc/install
3314# IRIX /sbin/install
3315# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003316# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003317# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3318# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3319# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3320# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003321echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3322echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003323if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003324if test "${ac_cv_path_install+set}" = set; then
3325 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003326else
Martin v. Löwis11437992002-04-12 09:54:03 +00003327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3328for as_dir in $PATH
3329do
3330 IFS=$as_save_IFS
3331 test -z "$as_dir" && as_dir=.
3332 # Account for people who put trailing slashes in PATH elements.
3333case $as_dir/ in
3334 ./ | .// | /cC/* | \
3335 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3336 /usr/ucb/* ) ;;
3337 *)
3338 # OSF1 and SCO ODT 3.0 have their own names for install.
3339 # Don't use installbsd from OSF since it installs stuff as root
3340 # by default.
3341 for ac_prog in ginstall scoinst install; do
3342 for ac_exec_ext in '' $ac_executable_extensions; do
3343 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3344 if test $ac_prog = install &&
3345 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3346 # AIX install. It has an incompatible calling convention.
3347 :
3348 elif test $ac_prog = install &&
3349 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3350 # program-specific install script used by HP pwplus--don't use.
3351 :
3352 else
3353 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3354 break 3
3355 fi
3356 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003357 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003358 done
3359 ;;
3360esac
3361done
3362
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003363
3364fi
3365 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003367 else
3368 # As a last resort, use the slow shell script. We don't cache a
3369 # path for INSTALL within a source directory, because that will
3370 # break other packages using the cache if that directory is
3371 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003372 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003373 fi
3374fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003375echo "$as_me:$LINENO: result: $INSTALL" >&5
3376echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003377
3378# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3379# It thinks the first close brace ends the variable substitution.
3380test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3381
Martin v. Löwis11437992002-04-12 09:54:03 +00003382test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003383
3384test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3385
Michael W. Hudson54241132001-12-07 15:38:26 +00003386
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003387# Not every filesystem supports hard links
3388
3389if test -z "$LN" ; then
3390 case $ac_sys_system in
3391 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003392 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003393 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003394 *) LN=ln;;
3395 esac
3396fi
3397
Fred Drake109d9862001-07-11 06:27:56 +00003398# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003399echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3400echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3401
Fred Drake109d9862001-07-11 06:27:56 +00003402# Check whether --with-pydebug or --without-pydebug was given.
3403if test "${with_pydebug+set}" = set; then
3404 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003405
Fred Drake109d9862001-07-11 06:27:56 +00003406if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003407then
3408
3409cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003410#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003411_ACEOF
3412
3413 echo "$as_me:$LINENO: result: yes" >&5
3414echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003415 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003416else echo "$as_me:$LINENO: result: no" >&5
3417echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003418fi
3419else
Martin v. Löwis11437992002-04-12 09:54:03 +00003420 echo "$as_me:$LINENO: result: no" >&5
3421echo "${ECHO_T}no" >&6
3422fi;
Fred Drake109d9862001-07-11 06:27:56 +00003423
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003424# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003425
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003426if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003427then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003428 case $GCC in
3429 yes)
3430 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003431 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003432 if test "$Py_DEBUG" = 'true' ; then
3433 # Optimization messes up debuggers, so turn it off for
3434 # debug builds.
3435 OPT="-g -Wall -Wstrict-prototypes"
3436 else
3437 OPT="-g -O3 -Wall -Wstrict-prototypes"
3438 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003439 *)
Fred Drake109d9862001-07-11 06:27:56 +00003440 OPT="-O3 -Wall -Wstrict-prototypes";;
3441 esac
3442 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003443 *)
3444 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003445 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003446 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3447 *)
3448 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003449 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003450 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003451 case $ac_sys_system in
3452 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003453 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003454 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003455fi
3456
Fred Drakee1ceaa02001-12-04 20:55:47 +00003457if test "$Py_DEBUG" = 'true'; then
3458 :
3459else
3460 OPT="-DNDEBUG $OPT"
3461fi
3462
Trent Mick635f6fb2000-08-23 21:33:05 +00003463# The current (beta) Monterey compiler dies with optimizations
3464case $ac_sys_system in
3465Monterey*) OPT="";;
3466esac
3467
Guido van Rossum563e7081996-09-10 18:20:48 +00003468if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003469then
3470 OPT="$OPT $ac_arch_flags"
3471fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003472
Martin v. Löwis11437992002-04-12 09:54:03 +00003473echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3474echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3475if test "${ac_cv_opt_olimit_ok+set}" = set; then
3476 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003477else
3478 ac_save_cc="$CC"
3479CC="$CC -OPT:Olimit=0"
3480if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003481 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003482else
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 cat >conftest.$ac_ext <<_ACEOF
3484#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003485#include "confdefs.h"
3486int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003487_ACEOF
3488rm -f conftest$ac_exeext
3489if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3490 (eval $ac_link) 2>&5
3491 ac_status=$?
3492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3493 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3495 (eval $ac_try) 2>&5
3496 ac_status=$?
3497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3498 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003499 ac_cv_opt_olimit_ok=yes
3500else
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 echo "$as_me: program exited with status $ac_status" >&5
3502echo "$as_me: failed program was:" >&5
3503cat conftest.$ac_ext >&5
3504( exit $ac_status )
3505ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003506fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003507rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003508fi
Guido van Rossum91922671997-10-09 20:24:13 +00003509CC="$ac_save_cc"
3510fi
3511
Martin v. Löwis11437992002-04-12 09:54:03 +00003512echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3513echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003514if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003515 case $ac_sys_system in
3516 Darwin*) OPT="$OPT" ;;
3517 *) OPT="$OPT -OPT:Olimit=0";;
3518 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003519else
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3521echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3522 if test "${ac_cv_olimit_ok+set}" = set; then
3523 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003524else
3525 ac_save_cc="$CC"
3526 CC="$CC -Olimit 1500"
3527 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003528 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003529else
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 cat >conftest.$ac_ext <<_ACEOF
3531#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003532#include "confdefs.h"
3533int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003534_ACEOF
3535rm -f conftest$ac_exeext
3536if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3537 (eval $ac_link) 2>&5
3538 ac_status=$?
3539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3540 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3542 (eval $ac_try) 2>&5
3543 ac_status=$?
3544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3545 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003546 ac_cv_olimit_ok=yes
3547else
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 echo "$as_me: program exited with status $ac_status" >&5
3549echo "$as_me: failed program was:" >&5
3550cat conftest.$ac_ext >&5
3551( exit $ac_status )
3552ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003554rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003555fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003556 CC="$ac_save_cc"
3557fi
3558
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3560echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003561 if test $ac_cv_olimit_ok = yes; then
3562 OPT="$OPT -Olimit 1500"
3563 fi
3564fi
3565
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003566# On some compilers, pthreads are available without further options
3567# (e.g. MacOS X). On some of these systems, the compiler will not
3568# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3569# So we have to see first whether pthreads are available without
3570# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003571echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3572echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3573if test "${ac_cv_pthread_is_default+set}" = set; then
3574 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003575else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003576 if test "$cross_compiling" = yes; then
3577 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003578else
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 cat >conftest.$ac_ext <<_ACEOF
3580#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003581#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003582
Martin v. Löwis130fb172001-07-19 11:00:41 +00003583#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003584
3585void* routine(void* p){return NULL;}
3586
3587int main(){
3588 pthread_t p;
3589 if(pthread_create(&p,NULL,routine,NULL)!=0)
3590 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003591 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003592 return 0;
3593}
3594
Martin v. Löwis11437992002-04-12 09:54:03 +00003595_ACEOF
3596rm -f conftest$ac_exeext
3597if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3598 (eval $ac_link) 2>&5
3599 ac_status=$?
3600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3601 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3603 (eval $ac_try) 2>&5
3604 ac_status=$?
3605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3606 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003607 ac_cv_pthread_is_default=yes
3608else
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 echo "$as_me: program exited with status $ac_status" >&5
3610echo "$as_me: failed program was:" >&5
3611cat conftest.$ac_ext >&5
3612( exit $ac_status )
3613ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003614fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003615rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003616fi
3617
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003618fi
3619
Martin v. Löwis11437992002-04-12 09:54:03 +00003620echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3621echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003622
Michael W. Hudson54241132001-12-07 15:38:26 +00003623
Martin v. Löwis11437992002-04-12 09:54:03 +00003624if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003625then
3626 ac_cv_kpthread=no
3627else
3628# -Kpthread, if available, provides the right #defines
3629# and linker options to make pthread_create available
3630# Some compilers won't report that they do not support -Kpthread,
3631# so we need to run a program to see whether it really made the
3632# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003633echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3634echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3635if test "${ac_cv_kpthread+set}" = set; then
3636 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003637else
3638 ac_save_cc="$CC"
3639CC="$CC -Kpthread"
3640if test "$cross_compiling" = yes; then
3641 ac_cv_kpthread=no
3642else
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 cat >conftest.$ac_ext <<_ACEOF
3644#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003645#include "confdefs.h"
3646
3647#include <pthread.h>
3648
3649void* routine(void* p){return NULL;}
3650
3651int main(){
3652 pthread_t p;
3653 if(pthread_create(&p,NULL,routine,NULL)!=0)
3654 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003655 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003656 return 0;
3657}
3658
Martin v. Löwis11437992002-04-12 09:54:03 +00003659_ACEOF
3660rm -f conftest$ac_exeext
3661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3662 (eval $ac_link) 2>&5
3663 ac_status=$?
3664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3665 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3667 (eval $ac_try) 2>&5
3668 ac_status=$?
3669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3670 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003671 ac_cv_kpthread=yes
3672else
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 echo "$as_me: program exited with status $ac_status" >&5
3674echo "$as_me: failed program was:" >&5
3675cat conftest.$ac_ext >&5
3676( exit $ac_status )
3677ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003678fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003679rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003680fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003681CC="$ac_save_cc"
3682fi
3683
Martin v. Löwis11437992002-04-12 09:54:03 +00003684echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3685echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003686fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003687
Michael W. Hudson54241132001-12-07 15:38:26 +00003688
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003689# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003690echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3691echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3692if test "${ac_cv_header_stdc+set}" = set; then
3693 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003694else
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 cat >conftest.$ac_ext <<_ACEOF
3696#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003697#include "confdefs.h"
3698#include <stdlib.h>
3699#include <stdarg.h>
3700#include <string.h>
3701#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003702
3703_ACEOF
3704if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3705 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3706 ac_status=$?
3707 egrep -v '^ *\+' conftest.er1 >conftest.err
3708 rm -f conftest.er1
3709 cat conftest.err >&5
3710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3711 (exit $ac_status); } >/dev/null; then
3712 if test -s conftest.err; then
3713 ac_cpp_err=$ac_c_preproc_warn_flag
3714 else
3715 ac_cpp_err=
3716 fi
3717else
3718 ac_cpp_err=yes
3719fi
3720if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003721 ac_cv_header_stdc=yes
3722else
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003724 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003725 ac_cv_header_stdc=no
3726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003727rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003728
3729if test $ac_cv_header_stdc = yes; then
3730 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 cat >conftest.$ac_ext <<_ACEOF
3732#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003733#include "confdefs.h"
3734#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003735
3736_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003737if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3738 egrep "memchr" >/dev/null 2>&1; then
3739 :
3740else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003741 ac_cv_header_stdc=no
3742fi
3743rm -f conftest*
3744
3745fi
3746
3747if test $ac_cv_header_stdc = yes; then
3748 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 cat >conftest.$ac_ext <<_ACEOF
3750#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003751#include "confdefs.h"
3752#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003753
3754_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3756 egrep "free" >/dev/null 2>&1; then
3757 :
3758else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003759 ac_cv_header_stdc=no
3760fi
3761rm -f conftest*
3762
3763fi
3764
3765if test $ac_cv_header_stdc = yes; then
3766 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003769else
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 cat >conftest.$ac_ext <<_ACEOF
3771#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003772#include "confdefs.h"
3773#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003774#if ((' ' & 0x0FF) == 0x020)
3775# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3776# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3777#else
3778# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3779 || ('j' <= (c) && (c) <= 'r') \
3780 || ('s' <= (c) && (c) <= 'z'))
3781# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3782#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003783
Martin v. Löwis11437992002-04-12 09:54:03 +00003784#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3785int
3786main ()
3787{
3788 int i;
3789 for (i = 0; i < 256; i++)
3790 if (XOR (islower (i), ISLOWER (i))
3791 || toupper (i) != TOUPPER (i))
3792 exit(2);
3793 exit (0);
3794}
3795_ACEOF
3796rm -f conftest$ac_exeext
3797if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3798 (eval $ac_link) 2>&5
3799 ac_status=$?
3800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3801 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3803 (eval $ac_try) 2>&5
3804 ac_status=$?
3805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3806 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003807 :
3808else
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 echo "$as_me: program exited with status $ac_status" >&5
3810echo "$as_me: failed program was:" >&5
3811cat conftest.$ac_ext >&5
3812( exit $ac_status )
3813ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003815rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003816fi
3817fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003818fi
3819echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3820echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003821if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
3823cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003824#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003825_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003826
3827fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
Martin v. Löwis11437992002-04-12 09:54:03 +00003866for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003867libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003868signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003869sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003870sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwis69532332001-10-13 09:12:41 +00003871sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003872sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003873do
Martin v. Löwis11437992002-04-12 09:54:03 +00003874as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3875if eval "test \"\${$as_ac_Header+set}\" = set"; then
3876 echo "$as_me:$LINENO: checking for $ac_header" >&5
3877echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3878if eval "test \"\${$as_ac_Header+set}\" = set"; then
3879 echo $ECHO_N "(cached) $ECHO_C" >&6
3880fi
3881echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3882echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003883else
Martin v. Löwis11437992002-04-12 09:54:03 +00003884 # Is the header compilable?
3885echo "$as_me:$LINENO: checking $ac_header usability" >&5
3886echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3887cat >conftest.$ac_ext <<_ACEOF
3888#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003889#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003890$ac_includes_default
3891#include <$ac_header>
3892_ACEOF
3893rm -f conftest.$ac_objext
3894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3895 (eval $ac_compile) 2>&5
3896 ac_status=$?
3897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3898 (exit $ac_status); } &&
3899 { ac_try='test -s conftest.$ac_objext'
3900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3901 (eval $ac_try) 2>&5
3902 ac_status=$?
3903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3904 (exit $ac_status); }; }; then
3905 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003906else
Martin v. Löwis11437992002-04-12 09:54:03 +00003907 echo "$as_me: failed program was:" >&5
3908cat conftest.$ac_ext >&5
3909ac_header_compiler=no
3910fi
3911rm -f conftest.$ac_objext conftest.$ac_ext
3912echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3913echo "${ECHO_T}$ac_header_compiler" >&6
3914
3915# Is the header present?
3916echo "$as_me:$LINENO: checking $ac_header presence" >&5
3917echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3918cat >conftest.$ac_ext <<_ACEOF
3919#line $LINENO "configure"
3920#include "confdefs.h"
3921#include <$ac_header>
3922_ACEOF
3923if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3924 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3925 ac_status=$?
3926 egrep -v '^ *\+' conftest.er1 >conftest.err
3927 rm -f conftest.er1
3928 cat conftest.err >&5
3929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3930 (exit $ac_status); } >/dev/null; then
3931 if test -s conftest.err; then
3932 ac_cpp_err=$ac_c_preproc_warn_flag
3933 else
3934 ac_cpp_err=
3935 fi
3936else
3937 ac_cpp_err=yes
3938fi
3939if test -z "$ac_cpp_err"; then
3940 ac_header_preproc=yes
3941else
3942 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003943 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003944 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003945fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003946rm -f conftest.err conftest.$ac_ext
3947echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3948echo "${ECHO_T}$ac_header_preproc" >&6
3949
3950# So? What about this header?
3951case $ac_header_compiler:$ac_header_preproc in
3952 yes:no )
3953 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3954echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3955 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3956echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3957 no:yes )
3958 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3959echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3960 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3961echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3962 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3963echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3964esac
3965echo "$as_me:$LINENO: checking for $ac_header" >&5
3966echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3967if eval "test \"\${$as_ac_Header+set}\" = set"; then
3968 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003969else
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003971fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003972echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3973echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3974
3975fi
3976if test `eval echo '${'$as_ac_Header'}'` = yes; then
3977 cat >>confdefs.h <<_ACEOF
3978#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3979_ACEOF
3980
3981fi
3982
Guido van Rossum627b2d71993-12-24 10:39:16 +00003983done
3984
Martin v. Löwis11437992002-04-12 09:54:03 +00003985
3986
3987
3988
3989
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003990ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003991for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3992 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3993echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3994echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3995if eval "test \"\${$as_ac_Header+set}\" = set"; then
3996 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003997else
Martin v. Löwis11437992002-04-12 09:54:03 +00003998 cat >conftest.$ac_ext <<_ACEOF
3999#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004000#include "confdefs.h"
4001#include <sys/types.h>
4002#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004003
4004#ifdef F77_DUMMY_MAIN
4005# ifdef __cplusplus
4006 extern "C"
4007# endif
4008 int F77_DUMMY_MAIN() { return 1; }
4009#endif
4010int
4011main ()
4012{
4013if ((DIR *) 0)
4014return 0;
4015 ;
4016 return 0;
4017}
4018_ACEOF
4019rm -f conftest.$ac_objext
4020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4021 (eval $ac_compile) 2>&5
4022 ac_status=$?
4023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4024 (exit $ac_status); } &&
4025 { ac_try='test -s conftest.$ac_objext'
4026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4027 (eval $ac_try) 2>&5
4028 ac_status=$?
4029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4030 (exit $ac_status); }; }; then
4031 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004032else
Martin v. Löwis11437992002-04-12 09:54:03 +00004033 echo "$as_me: failed program was:" >&5
4034cat conftest.$ac_ext >&5
4035eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004036fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004037rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004038fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004039echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4040echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4041if test `eval echo '${'$as_ac_Header'}'` = yes; then
4042 cat >>confdefs.h <<_ACEOF
4043#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4044_ACEOF
4045
4046ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004047fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004048
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004049done
4050# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4051if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004052 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4053echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4054if test "${ac_cv_search_opendir+set}" = set; then
4055 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004056else
Martin v. Löwis11437992002-04-12 09:54:03 +00004057 ac_func_search_save_LIBS=$LIBS
4058ac_cv_search_opendir=no
4059cat >conftest.$ac_ext <<_ACEOF
4060#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004061#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004063/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004064#ifdef __cplusplus
4065extern "C"
4066#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004067/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004068 builtin and then its argument prototype would still apply. */
4069char opendir ();
4070#ifdef F77_DUMMY_MAIN
4071# ifdef __cplusplus
4072 extern "C"
4073# endif
4074 int F77_DUMMY_MAIN() { return 1; }
4075#endif
4076int
4077main ()
4078{
4079opendir ();
4080 ;
4081 return 0;
4082}
4083_ACEOF
4084rm -f conftest.$ac_objext conftest$ac_exeext
4085if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4086 (eval $ac_link) 2>&5
4087 ac_status=$?
4088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4089 (exit $ac_status); } &&
4090 { ac_try='test -s conftest$ac_exeext'
4091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4092 (eval $ac_try) 2>&5
4093 ac_status=$?
4094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4095 (exit $ac_status); }; }; then
4096 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004097else
Martin v. Löwis11437992002-04-12 09:54:03 +00004098 echo "$as_me: failed program was:" >&5
4099cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004100fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004101rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4102if test "$ac_cv_search_opendir" = no; then
4103 for ac_lib in dir; do
4104 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4105 cat >conftest.$ac_ext <<_ACEOF
4106#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004107#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004108
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004109/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004110#ifdef __cplusplus
4111extern "C"
4112#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004113/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004114 builtin and then its argument prototype would still apply. */
4115char opendir ();
4116#ifdef F77_DUMMY_MAIN
4117# ifdef __cplusplus
4118 extern "C"
4119# endif
4120 int F77_DUMMY_MAIN() { return 1; }
4121#endif
4122int
4123main ()
4124{
4125opendir ();
4126 ;
4127 return 0;
4128}
4129_ACEOF
4130rm -f conftest.$ac_objext conftest$ac_exeext
4131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4132 (eval $ac_link) 2>&5
4133 ac_status=$?
4134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4135 (exit $ac_status); } &&
4136 { ac_try='test -s conftest$ac_exeext'
4137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4138 (eval $ac_try) 2>&5
4139 ac_status=$?
4140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4141 (exit $ac_status); }; }; then
4142 ac_cv_search_opendir="-l$ac_lib"
4143break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004144else
Martin v. Löwis11437992002-04-12 09:54:03 +00004145 echo "$as_me: failed program was:" >&5
4146cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004147fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004148rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4149 done
4150fi
4151LIBS=$ac_func_search_save_LIBS
4152fi
4153echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4154echo "${ECHO_T}$ac_cv_search_opendir" >&6
4155if test "$ac_cv_search_opendir" != no; then
4156 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004158fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004159
Michael W. Hudson54241132001-12-07 15:38:26 +00004160else
Martin v. Löwis11437992002-04-12 09:54:03 +00004161 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4162echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4163if test "${ac_cv_search_opendir+set}" = set; then
4164 echo $ECHO_N "(cached) $ECHO_C" >&6
4165else
4166 ac_func_search_save_LIBS=$LIBS
4167ac_cv_search_opendir=no
4168cat >conftest.$ac_ext <<_ACEOF
4169#line $LINENO "configure"
4170#include "confdefs.h"
4171
4172/* Override any gcc2 internal prototype to avoid an error. */
4173#ifdef __cplusplus
4174extern "C"
4175#endif
4176/* We use char because int might match the return type of a gcc2
4177 builtin and then its argument prototype would still apply. */
4178char opendir ();
4179#ifdef F77_DUMMY_MAIN
4180# ifdef __cplusplus
4181 extern "C"
4182# endif
4183 int F77_DUMMY_MAIN() { return 1; }
4184#endif
4185int
4186main ()
4187{
4188opendir ();
4189 ;
4190 return 0;
4191}
4192_ACEOF
4193rm -f conftest.$ac_objext conftest$ac_exeext
4194if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4195 (eval $ac_link) 2>&5
4196 ac_status=$?
4197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4198 (exit $ac_status); } &&
4199 { ac_try='test -s conftest$ac_exeext'
4200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4201 (eval $ac_try) 2>&5
4202 ac_status=$?
4203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4204 (exit $ac_status); }; }; then
4205 ac_cv_search_opendir="none required"
4206else
4207 echo "$as_me: failed program was:" >&5
4208cat conftest.$ac_ext >&5
4209fi
4210rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4211if test "$ac_cv_search_opendir" = no; then
4212 for ac_lib in x; do
4213 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4214 cat >conftest.$ac_ext <<_ACEOF
4215#line $LINENO "configure"
4216#include "confdefs.h"
4217
4218/* Override any gcc2 internal prototype to avoid an error. */
4219#ifdef __cplusplus
4220extern "C"
4221#endif
4222/* We use char because int might match the return type of a gcc2
4223 builtin and then its argument prototype would still apply. */
4224char opendir ();
4225#ifdef F77_DUMMY_MAIN
4226# ifdef __cplusplus
4227 extern "C"
4228# endif
4229 int F77_DUMMY_MAIN() { return 1; }
4230#endif
4231int
4232main ()
4233{
4234opendir ();
4235 ;
4236 return 0;
4237}
4238_ACEOF
4239rm -f conftest.$ac_objext conftest$ac_exeext
4240if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4241 (eval $ac_link) 2>&5
4242 ac_status=$?
4243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4244 (exit $ac_status); } &&
4245 { ac_try='test -s conftest$ac_exeext'
4246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4247 (eval $ac_try) 2>&5
4248 ac_status=$?
4249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4250 (exit $ac_status); }; }; then
4251 ac_cv_search_opendir="-l$ac_lib"
4252break
4253else
4254 echo "$as_me: failed program was:" >&5
4255cat conftest.$ac_ext >&5
4256fi
4257rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4258 done
4259fi
4260LIBS=$ac_func_search_save_LIBS
4261fi
4262echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4263echo "${ECHO_T}$ac_cv_search_opendir" >&6
4264if test "$ac_cv_search_opendir" != no; then
4265 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4266
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004267fi
4268
4269fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004270
Michael W. Hudson54241132001-12-07 15:38:26 +00004271
Guido van Rossum627b2d71993-12-24 10:39:16 +00004272# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004273was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004274echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4275echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4276cat >conftest.$ac_ext <<_ACEOF
4277#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004278#include "confdefs.h"
4279#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004280
4281_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4283 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004284 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004285else
Martin v. Löwis11437992002-04-12 09:54:03 +00004286
4287
4288cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004289#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004290_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004291
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004292
Guido van Rossum627b2d71993-12-24 10:39:16 +00004293fi
4294rm -f conftest*
4295
Martin v. Löwis11437992002-04-12 09:54:03 +00004296echo "$as_me:$LINENO: result: $was_it_defined" >&5
4297echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004298
Guido van Rossum810cc512001-09-09 23:51:39 +00004299# Two defines needed to enable largefile support on various platforms
4300# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004301
Martin v. Löwis11437992002-04-12 09:54:03 +00004302cat >>confdefs.h <<\_ACEOF
4303#define _LARGEFILE_SOURCE 1
4304_ACEOF
4305
4306
4307cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004308#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004309_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004310
Michael W. Hudson54241132001-12-07 15:38:26 +00004311
Guido van Rossum84e7b241996-08-19 21:59:00 +00004312# Add some code to confdefs.h so that the test for off_t works on SCO
4313cat >> confdefs.h <<\EOF
4314#if defined(SCO_DS)
4315#undef _OFF_T
4316#endif
4317EOF
4318
Guido van Rossumef2255b2000-03-10 22:30:29 +00004319# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004320echo "$as_me:$LINENO: checking for mode_t" >&5
4321echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4322if test "${ac_cv_type_mode_t+set}" = set; then
4323 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004324else
Martin v. Löwis11437992002-04-12 09:54:03 +00004325 cat >conftest.$ac_ext <<_ACEOF
4326#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004327#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004328$ac_includes_default
4329#ifdef F77_DUMMY_MAIN
4330# ifdef __cplusplus
4331 extern "C"
4332# endif
4333 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004335int
4336main ()
4337{
4338if ((mode_t *) 0)
4339 return 0;
4340if (sizeof (mode_t))
4341 return 0;
4342 ;
4343 return 0;
4344}
4345_ACEOF
4346rm -f conftest.$ac_objext
4347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4348 (eval $ac_compile) 2>&5
4349 ac_status=$?
4350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4351 (exit $ac_status); } &&
4352 { ac_try='test -s conftest.$ac_objext'
4353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4354 (eval $ac_try) 2>&5
4355 ac_status=$?
4356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4357 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004358 ac_cv_type_mode_t=yes
4359else
Martin v. Löwis11437992002-04-12 09:54:03 +00004360 echo "$as_me: failed program was:" >&5
4361cat conftest.$ac_ext >&5
4362ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004364rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004366echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4367echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4368if test $ac_cv_type_mode_t = yes; then
4369 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004370else
Martin v. Löwis11437992002-04-12 09:54:03 +00004371
4372cat >>confdefs.h <<_ACEOF
4373#define mode_t int
4374_ACEOF
4375
4376fi
4377
4378echo "$as_me:$LINENO: checking for off_t" >&5
4379echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4380if test "${ac_cv_type_off_t+set}" = set; then
4381 echo $ECHO_N "(cached) $ECHO_C" >&6
4382else
4383 cat >conftest.$ac_ext <<_ACEOF
4384#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004385#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004386$ac_includes_default
4387#ifdef F77_DUMMY_MAIN
4388# ifdef __cplusplus
4389 extern "C"
4390# endif
4391 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004393int
4394main ()
4395{
4396if ((off_t *) 0)
4397 return 0;
4398if (sizeof (off_t))
4399 return 0;
4400 ;
4401 return 0;
4402}
4403_ACEOF
4404rm -f conftest.$ac_objext
4405if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4406 (eval $ac_compile) 2>&5
4407 ac_status=$?
4408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4409 (exit $ac_status); } &&
4410 { ac_try='test -s conftest.$ac_objext'
4411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4412 (eval $ac_try) 2>&5
4413 ac_status=$?
4414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4415 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004416 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004417else
Martin v. Löwis11437992002-04-12 09:54:03 +00004418 echo "$as_me: failed program was:" >&5
4419cat conftest.$ac_ext >&5
4420ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004421fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004422rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004423fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004424echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4425echo "${ECHO_T}$ac_cv_type_off_t" >&6
4426if test $ac_cv_type_off_t = yes; then
4427 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004428else
Martin v. Löwis11437992002-04-12 09:54:03 +00004429
4430cat >>confdefs.h <<_ACEOF
4431#define off_t long
4432_ACEOF
4433
4434fi
4435
4436echo "$as_me:$LINENO: checking for pid_t" >&5
4437echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4438if test "${ac_cv_type_pid_t+set}" = set; then
4439 echo $ECHO_N "(cached) $ECHO_C" >&6
4440else
4441 cat >conftest.$ac_ext <<_ACEOF
4442#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004443#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004444$ac_includes_default
4445#ifdef F77_DUMMY_MAIN
4446# ifdef __cplusplus
4447 extern "C"
4448# endif
4449 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004450#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004451int
4452main ()
4453{
4454if ((pid_t *) 0)
4455 return 0;
4456if (sizeof (pid_t))
4457 return 0;
4458 ;
4459 return 0;
4460}
4461_ACEOF
4462rm -f conftest.$ac_objext
4463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4464 (eval $ac_compile) 2>&5
4465 ac_status=$?
4466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4467 (exit $ac_status); } &&
4468 { ac_try='test -s conftest.$ac_objext'
4469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4470 (eval $ac_try) 2>&5
4471 ac_status=$?
4472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4473 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004474 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004475else
Martin v. Löwis11437992002-04-12 09:54:03 +00004476 echo "$as_me: failed program was:" >&5
4477cat conftest.$ac_ext >&5
4478ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004479fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004480rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004482echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4483echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4484if test $ac_cv_type_pid_t = yes; then
4485 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004486else
Martin v. Löwis11437992002-04-12 09:54:03 +00004487
4488cat >>confdefs.h <<_ACEOF
4489#define pid_t int
4490_ACEOF
4491
4492fi
4493
4494echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4495echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4496if test "${ac_cv_type_signal+set}" = set; then
4497 echo $ECHO_N "(cached) $ECHO_C" >&6
4498else
4499 cat >conftest.$ac_ext <<_ACEOF
4500#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004501#include "confdefs.h"
4502#include <sys/types.h>
4503#include <signal.h>
4504#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004505# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004506#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004507#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004508extern "C" void (*signal (int, void (*)(int)))(int);
4509#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004510void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004511#endif
4512
Martin v. Löwis11437992002-04-12 09:54:03 +00004513#ifdef F77_DUMMY_MAIN
4514# ifdef __cplusplus
4515 extern "C"
4516# endif
4517 int F77_DUMMY_MAIN() { return 1; }
4518#endif
4519int
4520main ()
4521{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004522int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004523 ;
4524 return 0;
4525}
4526_ACEOF
4527rm -f conftest.$ac_objext
4528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4529 (eval $ac_compile) 2>&5
4530 ac_status=$?
4531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4532 (exit $ac_status); } &&
4533 { ac_try='test -s conftest.$ac_objext'
4534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4535 (eval $ac_try) 2>&5
4536 ac_status=$?
4537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4538 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004539 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004540else
Martin v. Löwis11437992002-04-12 09:54:03 +00004541 echo "$as_me: failed program was:" >&5
4542cat conftest.$ac_ext >&5
4543ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004544fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004545rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004546fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004547echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4548echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004549
Martin v. Löwis11437992002-04-12 09:54:03 +00004550cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004551#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004552_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004553
Michael W. Hudson54241132001-12-07 15:38:26 +00004554
Martin v. Löwis11437992002-04-12 09:54:03 +00004555echo "$as_me:$LINENO: checking for size_t" >&5
4556echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4557if test "${ac_cv_type_size_t+set}" = set; then
4558 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004559else
Martin v. Löwis11437992002-04-12 09:54:03 +00004560 cat >conftest.$ac_ext <<_ACEOF
4561#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004562#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004563$ac_includes_default
4564#ifdef F77_DUMMY_MAIN
4565# ifdef __cplusplus
4566 extern "C"
4567# endif
4568 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004570int
4571main ()
4572{
4573if ((size_t *) 0)
4574 return 0;
4575if (sizeof (size_t))
4576 return 0;
4577 ;
4578 return 0;
4579}
4580_ACEOF
4581rm -f conftest.$ac_objext
4582if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4583 (eval $ac_compile) 2>&5
4584 ac_status=$?
4585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4586 (exit $ac_status); } &&
4587 { ac_try='test -s conftest.$ac_objext'
4588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4589 (eval $ac_try) 2>&5
4590 ac_status=$?
4591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4592 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004593 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004594else
Martin v. Löwis11437992002-04-12 09:54:03 +00004595 echo "$as_me: failed program was:" >&5
4596cat conftest.$ac_ext >&5
4597ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004598fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004599rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004600fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004601echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4602echo "${ECHO_T}$ac_cv_type_size_t" >&6
4603if test $ac_cv_type_size_t = yes; then
4604 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004605else
Martin v. Löwis11437992002-04-12 09:54:03 +00004606
4607cat >>confdefs.h <<_ACEOF
4608#define size_t unsigned
4609_ACEOF
4610
4611fi
4612
4613echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4614echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4615if test "${ac_cv_type_uid_t+set}" = set; then
4616 echo $ECHO_N "(cached) $ECHO_C" >&6
4617else
4618 cat >conftest.$ac_ext <<_ACEOF
4619#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004620#include "confdefs.h"
4621#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004622
4623_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4625 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004626 ac_cv_type_uid_t=yes
4627else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004628 ac_cv_type_uid_t=no
4629fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004630rm -f conftest*
4631
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004633echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4634echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004635if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004636
Martin v. Löwis11437992002-04-12 09:54:03 +00004637cat >>confdefs.h <<\_ACEOF
4638#define uid_t int
4639_ACEOF
4640
4641
4642cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004643#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004644_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004645
4646fi
4647
Jack Jansendd19cf82001-12-06 22:36:17 +00004648
Michael W. Hudson54241132001-12-07 15:38:26 +00004649# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004650echo "$as_me:$LINENO: checking for int" >&5
4651echo $ECHO_N "checking for int... $ECHO_C" >&6
4652if test "${ac_cv_type_int+set}" = set; then
4653 echo $ECHO_N "(cached) $ECHO_C" >&6
4654else
4655 cat >conftest.$ac_ext <<_ACEOF
4656#line $LINENO "configure"
4657#include "confdefs.h"
4658$ac_includes_default
4659#ifdef F77_DUMMY_MAIN
4660# ifdef __cplusplus
4661 extern "C"
4662# endif
4663 int F77_DUMMY_MAIN() { return 1; }
4664#endif
4665int
4666main ()
4667{
4668if ((int *) 0)
4669 return 0;
4670if (sizeof (int))
4671 return 0;
4672 ;
4673 return 0;
4674}
4675_ACEOF
4676rm -f conftest.$ac_objext
4677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4678 (eval $ac_compile) 2>&5
4679 ac_status=$?
4680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4681 (exit $ac_status); } &&
4682 { ac_try='test -s conftest.$ac_objext'
4683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4684 (eval $ac_try) 2>&5
4685 ac_status=$?
4686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4687 (exit $ac_status); }; }; then
4688 ac_cv_type_int=yes
4689else
4690 echo "$as_me: failed program was:" >&5
4691cat conftest.$ac_ext >&5
4692ac_cv_type_int=no
4693fi
4694rm -f conftest.$ac_objext conftest.$ac_ext
4695fi
4696echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4697echo "${ECHO_T}$ac_cv_type_int" >&6
4698
4699echo "$as_me:$LINENO: checking size of int" >&5
4700echo $ECHO_N "checking size of int... $ECHO_C" >&6
4701if test "${ac_cv_sizeof_int+set}" = set; then
4702 echo $ECHO_N "(cached) $ECHO_C" >&6
4703else
4704 if test "$ac_cv_type_int" = yes; then
4705 # The cast to unsigned long works around a bug in the HP C Compiler
4706 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4707 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4708 # This bug is HP SR number 8606223364.
4709 if test "$cross_compiling" = yes; then
4710 # Depending upon the size, compute the lo and hi bounds.
4711cat >conftest.$ac_ext <<_ACEOF
4712#line $LINENO "configure"
4713#include "confdefs.h"
4714$ac_includes_default
4715#ifdef F77_DUMMY_MAIN
4716# ifdef __cplusplus
4717 extern "C"
4718# endif
4719 int F77_DUMMY_MAIN() { return 1; }
4720#endif
4721int
4722main ()
4723{
4724static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4725test_array [0] = 0
4726
4727 ;
4728 return 0;
4729}
4730_ACEOF
4731rm -f conftest.$ac_objext
4732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4733 (eval $ac_compile) 2>&5
4734 ac_status=$?
4735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4736 (exit $ac_status); } &&
4737 { ac_try='test -s conftest.$ac_objext'
4738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4739 (eval $ac_try) 2>&5
4740 ac_status=$?
4741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4742 (exit $ac_status); }; }; then
4743 ac_lo=0 ac_mid=0
4744 while :; do
4745 cat >conftest.$ac_ext <<_ACEOF
4746#line $LINENO "configure"
4747#include "confdefs.h"
4748$ac_includes_default
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{
4758static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4759test_array [0] = 0
4760
4761 ;
4762 return 0;
4763}
4764_ACEOF
4765rm -f conftest.$ac_objext
4766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4767 (eval $ac_compile) 2>&5
4768 ac_status=$?
4769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4770 (exit $ac_status); } &&
4771 { ac_try='test -s conftest.$ac_objext'
4772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4773 (eval $ac_try) 2>&5
4774 ac_status=$?
4775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4776 (exit $ac_status); }; }; then
4777 ac_hi=$ac_mid; break
4778else
4779 echo "$as_me: failed program was:" >&5
4780cat conftest.$ac_ext >&5
4781ac_lo=`expr $ac_mid + 1`
4782 if test $ac_lo -le $ac_mid; then
4783 ac_lo= ac_hi=
4784 break
4785 fi
4786 ac_mid=`expr 2 '*' $ac_mid + 1`
4787fi
4788rm -f conftest.$ac_objext conftest.$ac_ext
4789 done
4790else
4791 echo "$as_me: failed program was:" >&5
4792cat conftest.$ac_ext >&5
4793cat >conftest.$ac_ext <<_ACEOF
4794#line $LINENO "configure"
4795#include "confdefs.h"
4796$ac_includes_default
4797#ifdef F77_DUMMY_MAIN
4798# ifdef __cplusplus
4799 extern "C"
4800# endif
4801 int F77_DUMMY_MAIN() { return 1; }
4802#endif
4803int
4804main ()
4805{
4806static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4807test_array [0] = 0
4808
4809 ;
4810 return 0;
4811}
4812_ACEOF
4813rm -f conftest.$ac_objext
4814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4815 (eval $ac_compile) 2>&5
4816 ac_status=$?
4817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4818 (exit $ac_status); } &&
4819 { ac_try='test -s conftest.$ac_objext'
4820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4821 (eval $ac_try) 2>&5
4822 ac_status=$?
4823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4824 (exit $ac_status); }; }; then
4825 ac_hi=-1 ac_mid=-1
4826 while :; do
4827 cat >conftest.$ac_ext <<_ACEOF
4828#line $LINENO "configure"
4829#include "confdefs.h"
4830$ac_includes_default
4831#ifdef F77_DUMMY_MAIN
4832# ifdef __cplusplus
4833 extern "C"
4834# endif
4835 int F77_DUMMY_MAIN() { return 1; }
4836#endif
4837int
4838main ()
4839{
4840static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4841test_array [0] = 0
4842
4843 ;
4844 return 0;
4845}
4846_ACEOF
4847rm -f conftest.$ac_objext
4848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4849 (eval $ac_compile) 2>&5
4850 ac_status=$?
4851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4852 (exit $ac_status); } &&
4853 { ac_try='test -s conftest.$ac_objext'
4854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4855 (eval $ac_try) 2>&5
4856 ac_status=$?
4857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4858 (exit $ac_status); }; }; then
4859 ac_lo=$ac_mid; break
4860else
4861 echo "$as_me: failed program was:" >&5
4862cat conftest.$ac_ext >&5
4863ac_hi=`expr '(' $ac_mid ')' - 1`
4864 if test $ac_mid -le $ac_hi; then
4865 ac_lo= ac_hi=
4866 break
4867 fi
4868 ac_mid=`expr 2 '*' $ac_mid`
4869fi
4870rm -f conftest.$ac_objext conftest.$ac_ext
4871 done
4872else
4873 echo "$as_me: failed program was:" >&5
4874cat conftest.$ac_ext >&5
4875ac_lo= ac_hi=
4876fi
4877rm -f conftest.$ac_objext conftest.$ac_ext
4878fi
4879rm -f conftest.$ac_objext conftest.$ac_ext
4880# Binary search between lo and hi bounds.
4881while test "x$ac_lo" != "x$ac_hi"; do
4882 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4883 cat >conftest.$ac_ext <<_ACEOF
4884#line $LINENO "configure"
4885#include "confdefs.h"
4886$ac_includes_default
4887#ifdef F77_DUMMY_MAIN
4888# ifdef __cplusplus
4889 extern "C"
4890# endif
4891 int F77_DUMMY_MAIN() { return 1; }
4892#endif
4893int
4894main ()
4895{
4896static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4897test_array [0] = 0
4898
4899 ;
4900 return 0;
4901}
4902_ACEOF
4903rm -f conftest.$ac_objext
4904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4905 (eval $ac_compile) 2>&5
4906 ac_status=$?
4907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4908 (exit $ac_status); } &&
4909 { ac_try='test -s conftest.$ac_objext'
4910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4911 (eval $ac_try) 2>&5
4912 ac_status=$?
4913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4914 (exit $ac_status); }; }; then
4915 ac_hi=$ac_mid
4916else
4917 echo "$as_me: failed program was:" >&5
4918cat conftest.$ac_ext >&5
4919ac_lo=`expr '(' $ac_mid ')' + 1`
4920fi
4921rm -f conftest.$ac_objext conftest.$ac_ext
4922done
4923case $ac_lo in
4924?*) ac_cv_sizeof_int=$ac_lo;;
4925'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4926echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4927 { (exit 1); exit 1; }; } ;;
4928esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004929else
4930 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004931 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4932echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4933 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004934else
Martin v. Löwis11437992002-04-12 09:54:03 +00004935 cat >conftest.$ac_ext <<_ACEOF
4936#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004937#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004938$ac_includes_default
4939long longval () { return (long) (sizeof (int)); }
4940unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004941#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004942#include <stdlib.h>
4943#ifdef F77_DUMMY_MAIN
4944# ifdef __cplusplus
4945 extern "C"
4946# endif
4947 int F77_DUMMY_MAIN() { return 1; }
4948#endif
4949int
4950main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004951{
Martin v. Löwis11437992002-04-12 09:54:03 +00004952
4953 FILE *f = fopen ("conftest.val", "w");
4954 if (! f)
4955 exit (1);
4956 if (((long) (sizeof (int))) < 0)
4957 {
4958 long i = longval ();
4959 if (i != ((long) (sizeof (int))))
4960 exit (1);
4961 fprintf (f, "%ld\n", i);
4962 }
4963 else
4964 {
4965 unsigned long i = ulongval ();
4966 if (i != ((long) (sizeof (int))))
4967 exit (1);
4968 fprintf (f, "%lu\n", i);
4969 }
4970 exit (ferror (f) || fclose (f) != 0);
4971
4972 ;
4973 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004974}
Martin v. Löwis11437992002-04-12 09:54:03 +00004975_ACEOF
4976rm -f conftest$ac_exeext
4977if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4978 (eval $ac_link) 2>&5
4979 ac_status=$?
4980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4981 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4983 (eval $ac_try) 2>&5
4984 ac_status=$?
4985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4986 (exit $ac_status); }; }; then
4987 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004988else
Martin v. Löwis11437992002-04-12 09:54:03 +00004989 echo "$as_me: program exited with status $ac_status" >&5
4990echo "$as_me: failed program was:" >&5
4991cat conftest.$ac_ext >&5
4992( exit $ac_status )
4993{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4994echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4995 { (exit 1); exit 1; }; }
4996fi
4997rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4998fi
4999fi
5000rm -f conftest.val
5001else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005002 ac_cv_sizeof_int=0
5003fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005004fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005005echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5006echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5007cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005008#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005009_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005010
5011
Martin v. Löwis11437992002-04-12 09:54:03 +00005012echo "$as_me:$LINENO: checking for long" >&5
5013echo $ECHO_N "checking for long... $ECHO_C" >&6
5014if test "${ac_cv_type_long+set}" = set; then
5015 echo $ECHO_N "(cached) $ECHO_C" >&6
5016else
5017 cat >conftest.$ac_ext <<_ACEOF
5018#line $LINENO "configure"
5019#include "confdefs.h"
5020$ac_includes_default
5021#ifdef F77_DUMMY_MAIN
5022# ifdef __cplusplus
5023 extern "C"
5024# endif
5025 int F77_DUMMY_MAIN() { return 1; }
5026#endif
5027int
5028main ()
5029{
5030if ((long *) 0)
5031 return 0;
5032if (sizeof (long))
5033 return 0;
5034 ;
5035 return 0;
5036}
5037_ACEOF
5038rm -f conftest.$ac_objext
5039if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5040 (eval $ac_compile) 2>&5
5041 ac_status=$?
5042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5043 (exit $ac_status); } &&
5044 { ac_try='test -s conftest.$ac_objext'
5045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5046 (eval $ac_try) 2>&5
5047 ac_status=$?
5048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5049 (exit $ac_status); }; }; then
5050 ac_cv_type_long=yes
5051else
5052 echo "$as_me: failed program was:" >&5
5053cat conftest.$ac_ext >&5
5054ac_cv_type_long=no
5055fi
5056rm -f conftest.$ac_objext conftest.$ac_ext
5057fi
5058echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5059echo "${ECHO_T}$ac_cv_type_long" >&6
5060
5061echo "$as_me:$LINENO: checking size of long" >&5
5062echo $ECHO_N "checking size of long... $ECHO_C" >&6
5063if test "${ac_cv_sizeof_long+set}" = set; then
5064 echo $ECHO_N "(cached) $ECHO_C" >&6
5065else
5066 if test "$ac_cv_type_long" = yes; then
5067 # The cast to unsigned long works around a bug in the HP C Compiler
5068 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5069 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5070 # This bug is HP SR number 8606223364.
5071 if test "$cross_compiling" = yes; then
5072 # Depending upon the size, compute the lo and hi bounds.
5073cat >conftest.$ac_ext <<_ACEOF
5074#line $LINENO "configure"
5075#include "confdefs.h"
5076$ac_includes_default
5077#ifdef F77_DUMMY_MAIN
5078# ifdef __cplusplus
5079 extern "C"
5080# endif
5081 int F77_DUMMY_MAIN() { return 1; }
5082#endif
5083int
5084main ()
5085{
5086static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5087test_array [0] = 0
5088
5089 ;
5090 return 0;
5091}
5092_ACEOF
5093rm -f conftest.$ac_objext
5094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5095 (eval $ac_compile) 2>&5
5096 ac_status=$?
5097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5098 (exit $ac_status); } &&
5099 { ac_try='test -s conftest.$ac_objext'
5100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5101 (eval $ac_try) 2>&5
5102 ac_status=$?
5103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5104 (exit $ac_status); }; }; then
5105 ac_lo=0 ac_mid=0
5106 while :; do
5107 cat >conftest.$ac_ext <<_ACEOF
5108#line $LINENO "configure"
5109#include "confdefs.h"
5110$ac_includes_default
5111#ifdef F77_DUMMY_MAIN
5112# ifdef __cplusplus
5113 extern "C"
5114# endif
5115 int F77_DUMMY_MAIN() { return 1; }
5116#endif
5117int
5118main ()
5119{
5120static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5121test_array [0] = 0
5122
5123 ;
5124 return 0;
5125}
5126_ACEOF
5127rm -f conftest.$ac_objext
5128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5129 (eval $ac_compile) 2>&5
5130 ac_status=$?
5131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132 (exit $ac_status); } &&
5133 { ac_try='test -s conftest.$ac_objext'
5134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5135 (eval $ac_try) 2>&5
5136 ac_status=$?
5137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5138 (exit $ac_status); }; }; then
5139 ac_hi=$ac_mid; break
5140else
5141 echo "$as_me: failed program was:" >&5
5142cat conftest.$ac_ext >&5
5143ac_lo=`expr $ac_mid + 1`
5144 if test $ac_lo -le $ac_mid; then
5145 ac_lo= ac_hi=
5146 break
5147 fi
5148 ac_mid=`expr 2 '*' $ac_mid + 1`
5149fi
5150rm -f conftest.$ac_objext conftest.$ac_ext
5151 done
5152else
5153 echo "$as_me: failed program was:" >&5
5154cat conftest.$ac_ext >&5
5155cat >conftest.$ac_ext <<_ACEOF
5156#line $LINENO "configure"
5157#include "confdefs.h"
5158$ac_includes_default
5159#ifdef F77_DUMMY_MAIN
5160# ifdef __cplusplus
5161 extern "C"
5162# endif
5163 int F77_DUMMY_MAIN() { return 1; }
5164#endif
5165int
5166main ()
5167{
5168static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5169test_array [0] = 0
5170
5171 ;
5172 return 0;
5173}
5174_ACEOF
5175rm -f conftest.$ac_objext
5176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5177 (eval $ac_compile) 2>&5
5178 ac_status=$?
5179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5180 (exit $ac_status); } &&
5181 { ac_try='test -s conftest.$ac_objext'
5182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5183 (eval $ac_try) 2>&5
5184 ac_status=$?
5185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5186 (exit $ac_status); }; }; then
5187 ac_hi=-1 ac_mid=-1
5188 while :; do
5189 cat >conftest.$ac_ext <<_ACEOF
5190#line $LINENO "configure"
5191#include "confdefs.h"
5192$ac_includes_default
5193#ifdef F77_DUMMY_MAIN
5194# ifdef __cplusplus
5195 extern "C"
5196# endif
5197 int F77_DUMMY_MAIN() { return 1; }
5198#endif
5199int
5200main ()
5201{
5202static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5203test_array [0] = 0
5204
5205 ;
5206 return 0;
5207}
5208_ACEOF
5209rm -f conftest.$ac_objext
5210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5211 (eval $ac_compile) 2>&5
5212 ac_status=$?
5213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5214 (exit $ac_status); } &&
5215 { ac_try='test -s conftest.$ac_objext'
5216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5217 (eval $ac_try) 2>&5
5218 ac_status=$?
5219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5220 (exit $ac_status); }; }; then
5221 ac_lo=$ac_mid; break
5222else
5223 echo "$as_me: failed program was:" >&5
5224cat conftest.$ac_ext >&5
5225ac_hi=`expr '(' $ac_mid ')' - 1`
5226 if test $ac_mid -le $ac_hi; then
5227 ac_lo= ac_hi=
5228 break
5229 fi
5230 ac_mid=`expr 2 '*' $ac_mid`
5231fi
5232rm -f conftest.$ac_objext conftest.$ac_ext
5233 done
5234else
5235 echo "$as_me: failed program was:" >&5
5236cat conftest.$ac_ext >&5
5237ac_lo= ac_hi=
5238fi
5239rm -f conftest.$ac_objext conftest.$ac_ext
5240fi
5241rm -f conftest.$ac_objext conftest.$ac_ext
5242# Binary search between lo and hi bounds.
5243while test "x$ac_lo" != "x$ac_hi"; do
5244 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5245 cat >conftest.$ac_ext <<_ACEOF
5246#line $LINENO "configure"
5247#include "confdefs.h"
5248$ac_includes_default
5249#ifdef F77_DUMMY_MAIN
5250# ifdef __cplusplus
5251 extern "C"
5252# endif
5253 int F77_DUMMY_MAIN() { return 1; }
5254#endif
5255int
5256main ()
5257{
5258static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5259test_array [0] = 0
5260
5261 ;
5262 return 0;
5263}
5264_ACEOF
5265rm -f conftest.$ac_objext
5266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5267 (eval $ac_compile) 2>&5
5268 ac_status=$?
5269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5270 (exit $ac_status); } &&
5271 { ac_try='test -s conftest.$ac_objext'
5272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5273 (eval $ac_try) 2>&5
5274 ac_status=$?
5275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276 (exit $ac_status); }; }; then
5277 ac_hi=$ac_mid
5278else
5279 echo "$as_me: failed program was:" >&5
5280cat conftest.$ac_ext >&5
5281ac_lo=`expr '(' $ac_mid ')' + 1`
5282fi
5283rm -f conftest.$ac_objext conftest.$ac_ext
5284done
5285case $ac_lo in
5286?*) ac_cv_sizeof_long=$ac_lo;;
5287'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5288echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5289 { (exit 1); exit 1; }; } ;;
5290esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005291else
5292 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005293 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5294echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5295 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005296else
Martin v. Löwis11437992002-04-12 09:54:03 +00005297 cat >conftest.$ac_ext <<_ACEOF
5298#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005299#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005300$ac_includes_default
5301long longval () { return (long) (sizeof (long)); }
5302unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005303#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005304#include <stdlib.h>
5305#ifdef F77_DUMMY_MAIN
5306# ifdef __cplusplus
5307 extern "C"
5308# endif
5309 int F77_DUMMY_MAIN() { return 1; }
5310#endif
5311int
5312main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005313{
Martin v. Löwis11437992002-04-12 09:54:03 +00005314
5315 FILE *f = fopen ("conftest.val", "w");
5316 if (! f)
5317 exit (1);
5318 if (((long) (sizeof (long))) < 0)
5319 {
5320 long i = longval ();
5321 if (i != ((long) (sizeof (long))))
5322 exit (1);
5323 fprintf (f, "%ld\n", i);
5324 }
5325 else
5326 {
5327 unsigned long i = ulongval ();
5328 if (i != ((long) (sizeof (long))))
5329 exit (1);
5330 fprintf (f, "%lu\n", i);
5331 }
5332 exit (ferror (f) || fclose (f) != 0);
5333
5334 ;
5335 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005336}
Martin v. Löwis11437992002-04-12 09:54:03 +00005337_ACEOF
5338rm -f conftest$ac_exeext
5339if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5340 (eval $ac_link) 2>&5
5341 ac_status=$?
5342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5343 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5345 (eval $ac_try) 2>&5
5346 ac_status=$?
5347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5348 (exit $ac_status); }; }; then
5349 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005350else
Martin v. Löwis11437992002-04-12 09:54:03 +00005351 echo "$as_me: program exited with status $ac_status" >&5
5352echo "$as_me: failed program was:" >&5
5353cat conftest.$ac_ext >&5
5354( exit $ac_status )
5355{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5356echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5357 { (exit 1); exit 1; }; }
5358fi
5359rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5360fi
5361fi
5362rm -f conftest.val
5363else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005364 ac_cv_sizeof_long=0
5365fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005366fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005367echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5368echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5369cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005370#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005371_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005372
5373
Martin v. Löwis11437992002-04-12 09:54:03 +00005374echo "$as_me:$LINENO: checking for void *" >&5
5375echo $ECHO_N "checking for void *... $ECHO_C" >&6
5376if test "${ac_cv_type_void_p+set}" = set; then
5377 echo $ECHO_N "(cached) $ECHO_C" >&6
5378else
5379 cat >conftest.$ac_ext <<_ACEOF
5380#line $LINENO "configure"
5381#include "confdefs.h"
5382$ac_includes_default
5383#ifdef F77_DUMMY_MAIN
5384# ifdef __cplusplus
5385 extern "C"
5386# endif
5387 int F77_DUMMY_MAIN() { return 1; }
5388#endif
5389int
5390main ()
5391{
5392if ((void * *) 0)
5393 return 0;
5394if (sizeof (void *))
5395 return 0;
5396 ;
5397 return 0;
5398}
5399_ACEOF
5400rm -f conftest.$ac_objext
5401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5402 (eval $ac_compile) 2>&5
5403 ac_status=$?
5404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5405 (exit $ac_status); } &&
5406 { ac_try='test -s conftest.$ac_objext'
5407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5408 (eval $ac_try) 2>&5
5409 ac_status=$?
5410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5411 (exit $ac_status); }; }; then
5412 ac_cv_type_void_p=yes
5413else
5414 echo "$as_me: failed program was:" >&5
5415cat conftest.$ac_ext >&5
5416ac_cv_type_void_p=no
5417fi
5418rm -f conftest.$ac_objext conftest.$ac_ext
5419fi
5420echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5421echo "${ECHO_T}$ac_cv_type_void_p" >&6
5422
5423echo "$as_me:$LINENO: checking size of void *" >&5
5424echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5425if test "${ac_cv_sizeof_void_p+set}" = set; then
5426 echo $ECHO_N "(cached) $ECHO_C" >&6
5427else
5428 if test "$ac_cv_type_void_p" = yes; then
5429 # The cast to unsigned long works around a bug in the HP C Compiler
5430 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5431 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5432 # This bug is HP SR number 8606223364.
5433 if test "$cross_compiling" = yes; then
5434 # Depending upon the size, compute the lo and hi bounds.
5435cat >conftest.$ac_ext <<_ACEOF
5436#line $LINENO "configure"
5437#include "confdefs.h"
5438$ac_includes_default
5439#ifdef F77_DUMMY_MAIN
5440# ifdef __cplusplus
5441 extern "C"
5442# endif
5443 int F77_DUMMY_MAIN() { return 1; }
5444#endif
5445int
5446main ()
5447{
5448static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5449test_array [0] = 0
5450
5451 ;
5452 return 0;
5453}
5454_ACEOF
5455rm -f conftest.$ac_objext
5456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5457 (eval $ac_compile) 2>&5
5458 ac_status=$?
5459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5460 (exit $ac_status); } &&
5461 { ac_try='test -s conftest.$ac_objext'
5462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5463 (eval $ac_try) 2>&5
5464 ac_status=$?
5465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5466 (exit $ac_status); }; }; then
5467 ac_lo=0 ac_mid=0
5468 while :; do
5469 cat >conftest.$ac_ext <<_ACEOF
5470#line $LINENO "configure"
5471#include "confdefs.h"
5472$ac_includes_default
5473#ifdef F77_DUMMY_MAIN
5474# ifdef __cplusplus
5475 extern "C"
5476# endif
5477 int F77_DUMMY_MAIN() { return 1; }
5478#endif
5479int
5480main ()
5481{
5482static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5483test_array [0] = 0
5484
5485 ;
5486 return 0;
5487}
5488_ACEOF
5489rm -f conftest.$ac_objext
5490if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5491 (eval $ac_compile) 2>&5
5492 ac_status=$?
5493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5494 (exit $ac_status); } &&
5495 { ac_try='test -s conftest.$ac_objext'
5496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5497 (eval $ac_try) 2>&5
5498 ac_status=$?
5499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5500 (exit $ac_status); }; }; then
5501 ac_hi=$ac_mid; break
5502else
5503 echo "$as_me: failed program was:" >&5
5504cat conftest.$ac_ext >&5
5505ac_lo=`expr $ac_mid + 1`
5506 if test $ac_lo -le $ac_mid; then
5507 ac_lo= ac_hi=
5508 break
5509 fi
5510 ac_mid=`expr 2 '*' $ac_mid + 1`
5511fi
5512rm -f conftest.$ac_objext conftest.$ac_ext
5513 done
5514else
5515 echo "$as_me: failed program was:" >&5
5516cat conftest.$ac_ext >&5
5517cat >conftest.$ac_ext <<_ACEOF
5518#line $LINENO "configure"
5519#include "confdefs.h"
5520$ac_includes_default
5521#ifdef F77_DUMMY_MAIN
5522# ifdef __cplusplus
5523 extern "C"
5524# endif
5525 int F77_DUMMY_MAIN() { return 1; }
5526#endif
5527int
5528main ()
5529{
5530static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5531test_array [0] = 0
5532
5533 ;
5534 return 0;
5535}
5536_ACEOF
5537rm -f conftest.$ac_objext
5538if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5539 (eval $ac_compile) 2>&5
5540 ac_status=$?
5541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5542 (exit $ac_status); } &&
5543 { ac_try='test -s conftest.$ac_objext'
5544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5545 (eval $ac_try) 2>&5
5546 ac_status=$?
5547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5548 (exit $ac_status); }; }; then
5549 ac_hi=-1 ac_mid=-1
5550 while :; do
5551 cat >conftest.$ac_ext <<_ACEOF
5552#line $LINENO "configure"
5553#include "confdefs.h"
5554$ac_includes_default
5555#ifdef F77_DUMMY_MAIN
5556# ifdef __cplusplus
5557 extern "C"
5558# endif
5559 int F77_DUMMY_MAIN() { return 1; }
5560#endif
5561int
5562main ()
5563{
5564static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5565test_array [0] = 0
5566
5567 ;
5568 return 0;
5569}
5570_ACEOF
5571rm -f conftest.$ac_objext
5572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5573 (eval $ac_compile) 2>&5
5574 ac_status=$?
5575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5576 (exit $ac_status); } &&
5577 { ac_try='test -s conftest.$ac_objext'
5578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5579 (eval $ac_try) 2>&5
5580 ac_status=$?
5581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5582 (exit $ac_status); }; }; then
5583 ac_lo=$ac_mid; break
5584else
5585 echo "$as_me: failed program was:" >&5
5586cat conftest.$ac_ext >&5
5587ac_hi=`expr '(' $ac_mid ')' - 1`
5588 if test $ac_mid -le $ac_hi; then
5589 ac_lo= ac_hi=
5590 break
5591 fi
5592 ac_mid=`expr 2 '*' $ac_mid`
5593fi
5594rm -f conftest.$ac_objext conftest.$ac_ext
5595 done
5596else
5597 echo "$as_me: failed program was:" >&5
5598cat conftest.$ac_ext >&5
5599ac_lo= ac_hi=
5600fi
5601rm -f conftest.$ac_objext conftest.$ac_ext
5602fi
5603rm -f conftest.$ac_objext conftest.$ac_ext
5604# Binary search between lo and hi bounds.
5605while test "x$ac_lo" != "x$ac_hi"; do
5606 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5607 cat >conftest.$ac_ext <<_ACEOF
5608#line $LINENO "configure"
5609#include "confdefs.h"
5610$ac_includes_default
5611#ifdef F77_DUMMY_MAIN
5612# ifdef __cplusplus
5613 extern "C"
5614# endif
5615 int F77_DUMMY_MAIN() { return 1; }
5616#endif
5617int
5618main ()
5619{
5620static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5621test_array [0] = 0
5622
5623 ;
5624 return 0;
5625}
5626_ACEOF
5627rm -f conftest.$ac_objext
5628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5629 (eval $ac_compile) 2>&5
5630 ac_status=$?
5631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5632 (exit $ac_status); } &&
5633 { ac_try='test -s conftest.$ac_objext'
5634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5635 (eval $ac_try) 2>&5
5636 ac_status=$?
5637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5638 (exit $ac_status); }; }; then
5639 ac_hi=$ac_mid
5640else
5641 echo "$as_me: failed program was:" >&5
5642cat conftest.$ac_ext >&5
5643ac_lo=`expr '(' $ac_mid ')' + 1`
5644fi
5645rm -f conftest.$ac_objext conftest.$ac_ext
5646done
5647case $ac_lo in
5648?*) ac_cv_sizeof_void_p=$ac_lo;;
5649'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5650echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5651 { (exit 1); exit 1; }; } ;;
5652esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005653else
5654 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005655 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5656echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5657 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005658else
Martin v. Löwis11437992002-04-12 09:54:03 +00005659 cat >conftest.$ac_ext <<_ACEOF
5660#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005661#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005662$ac_includes_default
5663long longval () { return (long) (sizeof (void *)); }
5664unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005665#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005666#include <stdlib.h>
5667#ifdef F77_DUMMY_MAIN
5668# ifdef __cplusplus
5669 extern "C"
5670# endif
5671 int F77_DUMMY_MAIN() { return 1; }
5672#endif
5673int
5674main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005675{
Martin v. Löwis11437992002-04-12 09:54:03 +00005676
5677 FILE *f = fopen ("conftest.val", "w");
5678 if (! f)
5679 exit (1);
5680 if (((long) (sizeof (void *))) < 0)
5681 {
5682 long i = longval ();
5683 if (i != ((long) (sizeof (void *))))
5684 exit (1);
5685 fprintf (f, "%ld\n", i);
5686 }
5687 else
5688 {
5689 unsigned long i = ulongval ();
5690 if (i != ((long) (sizeof (void *))))
5691 exit (1);
5692 fprintf (f, "%lu\n", i);
5693 }
5694 exit (ferror (f) || fclose (f) != 0);
5695
5696 ;
5697 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005698}
Martin v. Löwis11437992002-04-12 09:54:03 +00005699_ACEOF
5700rm -f conftest$ac_exeext
5701if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5702 (eval $ac_link) 2>&5
5703 ac_status=$?
5704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5705 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5707 (eval $ac_try) 2>&5
5708 ac_status=$?
5709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5710 (exit $ac_status); }; }; then
5711 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005712else
Martin v. Löwis11437992002-04-12 09:54:03 +00005713 echo "$as_me: program exited with status $ac_status" >&5
5714echo "$as_me: failed program was:" >&5
5715cat conftest.$ac_ext >&5
5716( exit $ac_status )
5717{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5718echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5719 { (exit 1); exit 1; }; }
5720fi
5721rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5722fi
5723fi
5724rm -f conftest.val
5725else
Guido van Rossumad678af1998-10-02 14:42:15 +00005726 ac_cv_sizeof_void_p=0
5727fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005728fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005729echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5730echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5731cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005732#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005733_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005734
5735
Martin v. Löwis11437992002-04-12 09:54:03 +00005736echo "$as_me:$LINENO: checking for char" >&5
5737echo $ECHO_N "checking for char... $ECHO_C" >&6
5738if test "${ac_cv_type_char+set}" = set; then
5739 echo $ECHO_N "(cached) $ECHO_C" >&6
5740else
5741 cat >conftest.$ac_ext <<_ACEOF
5742#line $LINENO "configure"
5743#include "confdefs.h"
5744$ac_includes_default
5745#ifdef F77_DUMMY_MAIN
5746# ifdef __cplusplus
5747 extern "C"
5748# endif
5749 int F77_DUMMY_MAIN() { return 1; }
5750#endif
5751int
5752main ()
5753{
5754if ((char *) 0)
5755 return 0;
5756if (sizeof (char))
5757 return 0;
5758 ;
5759 return 0;
5760}
5761_ACEOF
5762rm -f conftest.$ac_objext
5763if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5764 (eval $ac_compile) 2>&5
5765 ac_status=$?
5766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5767 (exit $ac_status); } &&
5768 { ac_try='test -s conftest.$ac_objext'
5769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5770 (eval $ac_try) 2>&5
5771 ac_status=$?
5772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5773 (exit $ac_status); }; }; then
5774 ac_cv_type_char=yes
5775else
5776 echo "$as_me: failed program was:" >&5
5777cat conftest.$ac_ext >&5
5778ac_cv_type_char=no
5779fi
5780rm -f conftest.$ac_objext conftest.$ac_ext
5781fi
5782echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5783echo "${ECHO_T}$ac_cv_type_char" >&6
5784
5785echo "$as_me:$LINENO: checking size of char" >&5
5786echo $ECHO_N "checking size of char... $ECHO_C" >&6
5787if test "${ac_cv_sizeof_char+set}" = set; then
5788 echo $ECHO_N "(cached) $ECHO_C" >&6
5789else
5790 if test "$ac_cv_type_char" = yes; then
5791 # The cast to unsigned long works around a bug in the HP C Compiler
5792 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5793 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5794 # This bug is HP SR number 8606223364.
5795 if test "$cross_compiling" = yes; then
5796 # Depending upon the size, compute the lo and hi bounds.
5797cat >conftest.$ac_ext <<_ACEOF
5798#line $LINENO "configure"
5799#include "confdefs.h"
5800$ac_includes_default
5801#ifdef F77_DUMMY_MAIN
5802# ifdef __cplusplus
5803 extern "C"
5804# endif
5805 int F77_DUMMY_MAIN() { return 1; }
5806#endif
5807int
5808main ()
5809{
5810static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5811test_array [0] = 0
5812
5813 ;
5814 return 0;
5815}
5816_ACEOF
5817rm -f conftest.$ac_objext
5818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5819 (eval $ac_compile) 2>&5
5820 ac_status=$?
5821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5822 (exit $ac_status); } &&
5823 { ac_try='test -s conftest.$ac_objext'
5824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5825 (eval $ac_try) 2>&5
5826 ac_status=$?
5827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5828 (exit $ac_status); }; }; then
5829 ac_lo=0 ac_mid=0
5830 while :; do
5831 cat >conftest.$ac_ext <<_ACEOF
5832#line $LINENO "configure"
5833#include "confdefs.h"
5834$ac_includes_default
5835#ifdef F77_DUMMY_MAIN
5836# ifdef __cplusplus
5837 extern "C"
5838# endif
5839 int F77_DUMMY_MAIN() { return 1; }
5840#endif
5841int
5842main ()
5843{
5844static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5845test_array [0] = 0
5846
5847 ;
5848 return 0;
5849}
5850_ACEOF
5851rm -f conftest.$ac_objext
5852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5853 (eval $ac_compile) 2>&5
5854 ac_status=$?
5855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5856 (exit $ac_status); } &&
5857 { ac_try='test -s conftest.$ac_objext'
5858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5859 (eval $ac_try) 2>&5
5860 ac_status=$?
5861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5862 (exit $ac_status); }; }; then
5863 ac_hi=$ac_mid; break
5864else
5865 echo "$as_me: failed program was:" >&5
5866cat conftest.$ac_ext >&5
5867ac_lo=`expr $ac_mid + 1`
5868 if test $ac_lo -le $ac_mid; then
5869 ac_lo= ac_hi=
5870 break
5871 fi
5872 ac_mid=`expr 2 '*' $ac_mid + 1`
5873fi
5874rm -f conftest.$ac_objext conftest.$ac_ext
5875 done
5876else
5877 echo "$as_me: failed program was:" >&5
5878cat conftest.$ac_ext >&5
5879cat >conftest.$ac_ext <<_ACEOF
5880#line $LINENO "configure"
5881#include "confdefs.h"
5882$ac_includes_default
5883#ifdef F77_DUMMY_MAIN
5884# ifdef __cplusplus
5885 extern "C"
5886# endif
5887 int F77_DUMMY_MAIN() { return 1; }
5888#endif
5889int
5890main ()
5891{
5892static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5893test_array [0] = 0
5894
5895 ;
5896 return 0;
5897}
5898_ACEOF
5899rm -f conftest.$ac_objext
5900if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5901 (eval $ac_compile) 2>&5
5902 ac_status=$?
5903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5904 (exit $ac_status); } &&
5905 { ac_try='test -s conftest.$ac_objext'
5906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5907 (eval $ac_try) 2>&5
5908 ac_status=$?
5909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5910 (exit $ac_status); }; }; then
5911 ac_hi=-1 ac_mid=-1
5912 while :; do
5913 cat >conftest.$ac_ext <<_ACEOF
5914#line $LINENO "configure"
5915#include "confdefs.h"
5916$ac_includes_default
5917#ifdef F77_DUMMY_MAIN
5918# ifdef __cplusplus
5919 extern "C"
5920# endif
5921 int F77_DUMMY_MAIN() { return 1; }
5922#endif
5923int
5924main ()
5925{
5926static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5927test_array [0] = 0
5928
5929 ;
5930 return 0;
5931}
5932_ACEOF
5933rm -f conftest.$ac_objext
5934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5935 (eval $ac_compile) 2>&5
5936 ac_status=$?
5937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5938 (exit $ac_status); } &&
5939 { ac_try='test -s conftest.$ac_objext'
5940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5941 (eval $ac_try) 2>&5
5942 ac_status=$?
5943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5944 (exit $ac_status); }; }; then
5945 ac_lo=$ac_mid; break
5946else
5947 echo "$as_me: failed program was:" >&5
5948cat conftest.$ac_ext >&5
5949ac_hi=`expr '(' $ac_mid ')' - 1`
5950 if test $ac_mid -le $ac_hi; then
5951 ac_lo= ac_hi=
5952 break
5953 fi
5954 ac_mid=`expr 2 '*' $ac_mid`
5955fi
5956rm -f conftest.$ac_objext conftest.$ac_ext
5957 done
5958else
5959 echo "$as_me: failed program was:" >&5
5960cat conftest.$ac_ext >&5
5961ac_lo= ac_hi=
5962fi
5963rm -f conftest.$ac_objext conftest.$ac_ext
5964fi
5965rm -f conftest.$ac_objext conftest.$ac_ext
5966# Binary search between lo and hi bounds.
5967while test "x$ac_lo" != "x$ac_hi"; do
5968 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5969 cat >conftest.$ac_ext <<_ACEOF
5970#line $LINENO "configure"
5971#include "confdefs.h"
5972$ac_includes_default
5973#ifdef F77_DUMMY_MAIN
5974# ifdef __cplusplus
5975 extern "C"
5976# endif
5977 int F77_DUMMY_MAIN() { return 1; }
5978#endif
5979int
5980main ()
5981{
5982static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5983test_array [0] = 0
5984
5985 ;
5986 return 0;
5987}
5988_ACEOF
5989rm -f conftest.$ac_objext
5990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5991 (eval $ac_compile) 2>&5
5992 ac_status=$?
5993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5994 (exit $ac_status); } &&
5995 { ac_try='test -s conftest.$ac_objext'
5996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5997 (eval $ac_try) 2>&5
5998 ac_status=$?
5999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6000 (exit $ac_status); }; }; then
6001 ac_hi=$ac_mid
6002else
6003 echo "$as_me: failed program was:" >&5
6004cat conftest.$ac_ext >&5
6005ac_lo=`expr '(' $ac_mid ')' + 1`
6006fi
6007rm -f conftest.$ac_objext conftest.$ac_ext
6008done
6009case $ac_lo in
6010?*) ac_cv_sizeof_char=$ac_lo;;
6011'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6012echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6013 { (exit 1); exit 1; }; } ;;
6014esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006015else
6016 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006017 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6018echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6019 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006020else
Martin v. Löwis11437992002-04-12 09:54:03 +00006021 cat >conftest.$ac_ext <<_ACEOF
6022#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006023#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006024$ac_includes_default
6025long longval () { return (long) (sizeof (char)); }
6026unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006027#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006028#include <stdlib.h>
6029#ifdef F77_DUMMY_MAIN
6030# ifdef __cplusplus
6031 extern "C"
6032# endif
6033 int F77_DUMMY_MAIN() { return 1; }
6034#endif
6035int
6036main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006037{
Martin v. Löwis11437992002-04-12 09:54:03 +00006038
6039 FILE *f = fopen ("conftest.val", "w");
6040 if (! f)
6041 exit (1);
6042 if (((long) (sizeof (char))) < 0)
6043 {
6044 long i = longval ();
6045 if (i != ((long) (sizeof (char))))
6046 exit (1);
6047 fprintf (f, "%ld\n", i);
6048 }
6049 else
6050 {
6051 unsigned long i = ulongval ();
6052 if (i != ((long) (sizeof (char))))
6053 exit (1);
6054 fprintf (f, "%lu\n", i);
6055 }
6056 exit (ferror (f) || fclose (f) != 0);
6057
6058 ;
6059 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006060}
Martin v. Löwis11437992002-04-12 09:54:03 +00006061_ACEOF
6062rm -f conftest$ac_exeext
6063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6064 (eval $ac_link) 2>&5
6065 ac_status=$?
6066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6067 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6069 (eval $ac_try) 2>&5
6070 ac_status=$?
6071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6072 (exit $ac_status); }; }; then
6073 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006074else
Martin v. Löwis11437992002-04-12 09:54:03 +00006075 echo "$as_me: program exited with status $ac_status" >&5
6076echo "$as_me: failed program was:" >&5
6077cat conftest.$ac_ext >&5
6078( exit $ac_status )
6079{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6080echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6081 { (exit 1); exit 1; }; }
6082fi
6083rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6084fi
6085fi
6086rm -f conftest.val
6087else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006088 ac_cv_sizeof_char=0
6089fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006090fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006091echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6092echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6093cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006094#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006095_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006096
6097
Martin v. Löwis11437992002-04-12 09:54:03 +00006098echo "$as_me:$LINENO: checking for short" >&5
6099echo $ECHO_N "checking for short... $ECHO_C" >&6
6100if test "${ac_cv_type_short+set}" = set; then
6101 echo $ECHO_N "(cached) $ECHO_C" >&6
6102else
6103 cat >conftest.$ac_ext <<_ACEOF
6104#line $LINENO "configure"
6105#include "confdefs.h"
6106$ac_includes_default
6107#ifdef F77_DUMMY_MAIN
6108# ifdef __cplusplus
6109 extern "C"
6110# endif
6111 int F77_DUMMY_MAIN() { return 1; }
6112#endif
6113int
6114main ()
6115{
6116if ((short *) 0)
6117 return 0;
6118if (sizeof (short))
6119 return 0;
6120 ;
6121 return 0;
6122}
6123_ACEOF
6124rm -f conftest.$ac_objext
6125if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6126 (eval $ac_compile) 2>&5
6127 ac_status=$?
6128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6129 (exit $ac_status); } &&
6130 { ac_try='test -s conftest.$ac_objext'
6131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6132 (eval $ac_try) 2>&5
6133 ac_status=$?
6134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135 (exit $ac_status); }; }; then
6136 ac_cv_type_short=yes
6137else
6138 echo "$as_me: failed program was:" >&5
6139cat conftest.$ac_ext >&5
6140ac_cv_type_short=no
6141fi
6142rm -f conftest.$ac_objext conftest.$ac_ext
6143fi
6144echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6145echo "${ECHO_T}$ac_cv_type_short" >&6
6146
6147echo "$as_me:$LINENO: checking size of short" >&5
6148echo $ECHO_N "checking size of short... $ECHO_C" >&6
6149if test "${ac_cv_sizeof_short+set}" = set; then
6150 echo $ECHO_N "(cached) $ECHO_C" >&6
6151else
6152 if test "$ac_cv_type_short" = yes; then
6153 # The cast to unsigned long works around a bug in the HP C Compiler
6154 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6155 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6156 # This bug is HP SR number 8606223364.
6157 if test "$cross_compiling" = yes; then
6158 # Depending upon the size, compute the lo and hi bounds.
6159cat >conftest.$ac_ext <<_ACEOF
6160#line $LINENO "configure"
6161#include "confdefs.h"
6162$ac_includes_default
6163#ifdef F77_DUMMY_MAIN
6164# ifdef __cplusplus
6165 extern "C"
6166# endif
6167 int F77_DUMMY_MAIN() { return 1; }
6168#endif
6169int
6170main ()
6171{
6172static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6173test_array [0] = 0
6174
6175 ;
6176 return 0;
6177}
6178_ACEOF
6179rm -f conftest.$ac_objext
6180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6181 (eval $ac_compile) 2>&5
6182 ac_status=$?
6183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6184 (exit $ac_status); } &&
6185 { ac_try='test -s conftest.$ac_objext'
6186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6187 (eval $ac_try) 2>&5
6188 ac_status=$?
6189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6190 (exit $ac_status); }; }; then
6191 ac_lo=0 ac_mid=0
6192 while :; do
6193 cat >conftest.$ac_ext <<_ACEOF
6194#line $LINENO "configure"
6195#include "confdefs.h"
6196$ac_includes_default
6197#ifdef F77_DUMMY_MAIN
6198# ifdef __cplusplus
6199 extern "C"
6200# endif
6201 int F77_DUMMY_MAIN() { return 1; }
6202#endif
6203int
6204main ()
6205{
6206static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6207test_array [0] = 0
6208
6209 ;
6210 return 0;
6211}
6212_ACEOF
6213rm -f conftest.$ac_objext
6214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6215 (eval $ac_compile) 2>&5
6216 ac_status=$?
6217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6218 (exit $ac_status); } &&
6219 { ac_try='test -s conftest.$ac_objext'
6220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6221 (eval $ac_try) 2>&5
6222 ac_status=$?
6223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6224 (exit $ac_status); }; }; then
6225 ac_hi=$ac_mid; break
6226else
6227 echo "$as_me: failed program was:" >&5
6228cat conftest.$ac_ext >&5
6229ac_lo=`expr $ac_mid + 1`
6230 if test $ac_lo -le $ac_mid; then
6231 ac_lo= ac_hi=
6232 break
6233 fi
6234 ac_mid=`expr 2 '*' $ac_mid + 1`
6235fi
6236rm -f conftest.$ac_objext conftest.$ac_ext
6237 done
6238else
6239 echo "$as_me: failed program was:" >&5
6240cat conftest.$ac_ext >&5
6241cat >conftest.$ac_ext <<_ACEOF
6242#line $LINENO "configure"
6243#include "confdefs.h"
6244$ac_includes_default
6245#ifdef F77_DUMMY_MAIN
6246# ifdef __cplusplus
6247 extern "C"
6248# endif
6249 int F77_DUMMY_MAIN() { return 1; }
6250#endif
6251int
6252main ()
6253{
6254static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6255test_array [0] = 0
6256
6257 ;
6258 return 0;
6259}
6260_ACEOF
6261rm -f conftest.$ac_objext
6262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6263 (eval $ac_compile) 2>&5
6264 ac_status=$?
6265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6266 (exit $ac_status); } &&
6267 { ac_try='test -s conftest.$ac_objext'
6268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6269 (eval $ac_try) 2>&5
6270 ac_status=$?
6271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6272 (exit $ac_status); }; }; then
6273 ac_hi=-1 ac_mid=-1
6274 while :; do
6275 cat >conftest.$ac_ext <<_ACEOF
6276#line $LINENO "configure"
6277#include "confdefs.h"
6278$ac_includes_default
6279#ifdef F77_DUMMY_MAIN
6280# ifdef __cplusplus
6281 extern "C"
6282# endif
6283 int F77_DUMMY_MAIN() { return 1; }
6284#endif
6285int
6286main ()
6287{
6288static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6289test_array [0] = 0
6290
6291 ;
6292 return 0;
6293}
6294_ACEOF
6295rm -f conftest.$ac_objext
6296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6297 (eval $ac_compile) 2>&5
6298 ac_status=$?
6299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6300 (exit $ac_status); } &&
6301 { ac_try='test -s conftest.$ac_objext'
6302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6303 (eval $ac_try) 2>&5
6304 ac_status=$?
6305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6306 (exit $ac_status); }; }; then
6307 ac_lo=$ac_mid; break
6308else
6309 echo "$as_me: failed program was:" >&5
6310cat conftest.$ac_ext >&5
6311ac_hi=`expr '(' $ac_mid ')' - 1`
6312 if test $ac_mid -le $ac_hi; then
6313 ac_lo= ac_hi=
6314 break
6315 fi
6316 ac_mid=`expr 2 '*' $ac_mid`
6317fi
6318rm -f conftest.$ac_objext conftest.$ac_ext
6319 done
6320else
6321 echo "$as_me: failed program was:" >&5
6322cat conftest.$ac_ext >&5
6323ac_lo= ac_hi=
6324fi
6325rm -f conftest.$ac_objext conftest.$ac_ext
6326fi
6327rm -f conftest.$ac_objext conftest.$ac_ext
6328# Binary search between lo and hi bounds.
6329while test "x$ac_lo" != "x$ac_hi"; do
6330 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6331 cat >conftest.$ac_ext <<_ACEOF
6332#line $LINENO "configure"
6333#include "confdefs.h"
6334$ac_includes_default
6335#ifdef F77_DUMMY_MAIN
6336# ifdef __cplusplus
6337 extern "C"
6338# endif
6339 int F77_DUMMY_MAIN() { return 1; }
6340#endif
6341int
6342main ()
6343{
6344static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6345test_array [0] = 0
6346
6347 ;
6348 return 0;
6349}
6350_ACEOF
6351rm -f conftest.$ac_objext
6352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6353 (eval $ac_compile) 2>&5
6354 ac_status=$?
6355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6356 (exit $ac_status); } &&
6357 { ac_try='test -s conftest.$ac_objext'
6358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6359 (eval $ac_try) 2>&5
6360 ac_status=$?
6361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6362 (exit $ac_status); }; }; then
6363 ac_hi=$ac_mid
6364else
6365 echo "$as_me: failed program was:" >&5
6366cat conftest.$ac_ext >&5
6367ac_lo=`expr '(' $ac_mid ')' + 1`
6368fi
6369rm -f conftest.$ac_objext conftest.$ac_ext
6370done
6371case $ac_lo in
6372?*) ac_cv_sizeof_short=$ac_lo;;
6373'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6374echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6375 { (exit 1); exit 1; }; } ;;
6376esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006377else
6378 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006379 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6380echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6381 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006382else
Martin v. Löwis11437992002-04-12 09:54:03 +00006383 cat >conftest.$ac_ext <<_ACEOF
6384#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006385#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006386$ac_includes_default
6387long longval () { return (long) (sizeof (short)); }
6388unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006389#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006390#include <stdlib.h>
6391#ifdef F77_DUMMY_MAIN
6392# ifdef __cplusplus
6393 extern "C"
6394# endif
6395 int F77_DUMMY_MAIN() { return 1; }
6396#endif
6397int
6398main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006399{
Martin v. Löwis11437992002-04-12 09:54:03 +00006400
6401 FILE *f = fopen ("conftest.val", "w");
6402 if (! f)
6403 exit (1);
6404 if (((long) (sizeof (short))) < 0)
6405 {
6406 long i = longval ();
6407 if (i != ((long) (sizeof (short))))
6408 exit (1);
6409 fprintf (f, "%ld\n", i);
6410 }
6411 else
6412 {
6413 unsigned long i = ulongval ();
6414 if (i != ((long) (sizeof (short))))
6415 exit (1);
6416 fprintf (f, "%lu\n", i);
6417 }
6418 exit (ferror (f) || fclose (f) != 0);
6419
6420 ;
6421 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006422}
Martin v. Löwis11437992002-04-12 09:54:03 +00006423_ACEOF
6424rm -f conftest$ac_exeext
6425if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6426 (eval $ac_link) 2>&5
6427 ac_status=$?
6428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6429 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6431 (eval $ac_try) 2>&5
6432 ac_status=$?
6433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6434 (exit $ac_status); }; }; then
6435 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006436else
Martin v. Löwis11437992002-04-12 09:54:03 +00006437 echo "$as_me: program exited with status $ac_status" >&5
6438echo "$as_me: failed program was:" >&5
6439cat conftest.$ac_ext >&5
6440( exit $ac_status )
6441{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6442echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6443 { (exit 1); exit 1; }; }
6444fi
6445rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6446fi
6447fi
6448rm -f conftest.val
6449else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006450 ac_cv_sizeof_short=0
6451fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006452fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006453echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6454echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6455cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006456#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006457_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006458
6459
Martin v. Löwis11437992002-04-12 09:54:03 +00006460echo "$as_me:$LINENO: checking for float" >&5
6461echo $ECHO_N "checking for float... $ECHO_C" >&6
6462if test "${ac_cv_type_float+set}" = set; then
6463 echo $ECHO_N "(cached) $ECHO_C" >&6
6464else
6465 cat >conftest.$ac_ext <<_ACEOF
6466#line $LINENO "configure"
6467#include "confdefs.h"
6468$ac_includes_default
6469#ifdef F77_DUMMY_MAIN
6470# ifdef __cplusplus
6471 extern "C"
6472# endif
6473 int F77_DUMMY_MAIN() { return 1; }
6474#endif
6475int
6476main ()
6477{
6478if ((float *) 0)
6479 return 0;
6480if (sizeof (float))
6481 return 0;
6482 ;
6483 return 0;
6484}
6485_ACEOF
6486rm -f conftest.$ac_objext
6487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6488 (eval $ac_compile) 2>&5
6489 ac_status=$?
6490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6491 (exit $ac_status); } &&
6492 { ac_try='test -s conftest.$ac_objext'
6493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6494 (eval $ac_try) 2>&5
6495 ac_status=$?
6496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6497 (exit $ac_status); }; }; then
6498 ac_cv_type_float=yes
6499else
6500 echo "$as_me: failed program was:" >&5
6501cat conftest.$ac_ext >&5
6502ac_cv_type_float=no
6503fi
6504rm -f conftest.$ac_objext conftest.$ac_ext
6505fi
6506echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6507echo "${ECHO_T}$ac_cv_type_float" >&6
6508
6509echo "$as_me:$LINENO: checking size of float" >&5
6510echo $ECHO_N "checking size of float... $ECHO_C" >&6
6511if test "${ac_cv_sizeof_float+set}" = set; then
6512 echo $ECHO_N "(cached) $ECHO_C" >&6
6513else
6514 if test "$ac_cv_type_float" = yes; then
6515 # The cast to unsigned long works around a bug in the HP C Compiler
6516 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6517 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6518 # This bug is HP SR number 8606223364.
6519 if test "$cross_compiling" = yes; then
6520 # Depending upon the size, compute the lo and hi bounds.
6521cat >conftest.$ac_ext <<_ACEOF
6522#line $LINENO "configure"
6523#include "confdefs.h"
6524$ac_includes_default
6525#ifdef F77_DUMMY_MAIN
6526# ifdef __cplusplus
6527 extern "C"
6528# endif
6529 int F77_DUMMY_MAIN() { return 1; }
6530#endif
6531int
6532main ()
6533{
6534static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6535test_array [0] = 0
6536
6537 ;
6538 return 0;
6539}
6540_ACEOF
6541rm -f conftest.$ac_objext
6542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6543 (eval $ac_compile) 2>&5
6544 ac_status=$?
6545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6546 (exit $ac_status); } &&
6547 { ac_try='test -s conftest.$ac_objext'
6548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6549 (eval $ac_try) 2>&5
6550 ac_status=$?
6551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6552 (exit $ac_status); }; }; then
6553 ac_lo=0 ac_mid=0
6554 while :; do
6555 cat >conftest.$ac_ext <<_ACEOF
6556#line $LINENO "configure"
6557#include "confdefs.h"
6558$ac_includes_default
6559#ifdef F77_DUMMY_MAIN
6560# ifdef __cplusplus
6561 extern "C"
6562# endif
6563 int F77_DUMMY_MAIN() { return 1; }
6564#endif
6565int
6566main ()
6567{
6568static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6569test_array [0] = 0
6570
6571 ;
6572 return 0;
6573}
6574_ACEOF
6575rm -f conftest.$ac_objext
6576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6577 (eval $ac_compile) 2>&5
6578 ac_status=$?
6579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6580 (exit $ac_status); } &&
6581 { ac_try='test -s conftest.$ac_objext'
6582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6583 (eval $ac_try) 2>&5
6584 ac_status=$?
6585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6586 (exit $ac_status); }; }; then
6587 ac_hi=$ac_mid; break
6588else
6589 echo "$as_me: failed program was:" >&5
6590cat conftest.$ac_ext >&5
6591ac_lo=`expr $ac_mid + 1`
6592 if test $ac_lo -le $ac_mid; then
6593 ac_lo= ac_hi=
6594 break
6595 fi
6596 ac_mid=`expr 2 '*' $ac_mid + 1`
6597fi
6598rm -f conftest.$ac_objext conftest.$ac_ext
6599 done
6600else
6601 echo "$as_me: failed program was:" >&5
6602cat conftest.$ac_ext >&5
6603cat >conftest.$ac_ext <<_ACEOF
6604#line $LINENO "configure"
6605#include "confdefs.h"
6606$ac_includes_default
6607#ifdef F77_DUMMY_MAIN
6608# ifdef __cplusplus
6609 extern "C"
6610# endif
6611 int F77_DUMMY_MAIN() { return 1; }
6612#endif
6613int
6614main ()
6615{
6616static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6617test_array [0] = 0
6618
6619 ;
6620 return 0;
6621}
6622_ACEOF
6623rm -f conftest.$ac_objext
6624if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6625 (eval $ac_compile) 2>&5
6626 ac_status=$?
6627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6628 (exit $ac_status); } &&
6629 { ac_try='test -s conftest.$ac_objext'
6630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6631 (eval $ac_try) 2>&5
6632 ac_status=$?
6633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6634 (exit $ac_status); }; }; then
6635 ac_hi=-1 ac_mid=-1
6636 while :; do
6637 cat >conftest.$ac_ext <<_ACEOF
6638#line $LINENO "configure"
6639#include "confdefs.h"
6640$ac_includes_default
6641#ifdef F77_DUMMY_MAIN
6642# ifdef __cplusplus
6643 extern "C"
6644# endif
6645 int F77_DUMMY_MAIN() { return 1; }
6646#endif
6647int
6648main ()
6649{
6650static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6651test_array [0] = 0
6652
6653 ;
6654 return 0;
6655}
6656_ACEOF
6657rm -f conftest.$ac_objext
6658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6659 (eval $ac_compile) 2>&5
6660 ac_status=$?
6661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6662 (exit $ac_status); } &&
6663 { ac_try='test -s conftest.$ac_objext'
6664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6665 (eval $ac_try) 2>&5
6666 ac_status=$?
6667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6668 (exit $ac_status); }; }; then
6669 ac_lo=$ac_mid; break
6670else
6671 echo "$as_me: failed program was:" >&5
6672cat conftest.$ac_ext >&5
6673ac_hi=`expr '(' $ac_mid ')' - 1`
6674 if test $ac_mid -le $ac_hi; then
6675 ac_lo= ac_hi=
6676 break
6677 fi
6678 ac_mid=`expr 2 '*' $ac_mid`
6679fi
6680rm -f conftest.$ac_objext conftest.$ac_ext
6681 done
6682else
6683 echo "$as_me: failed program was:" >&5
6684cat conftest.$ac_ext >&5
6685ac_lo= ac_hi=
6686fi
6687rm -f conftest.$ac_objext conftest.$ac_ext
6688fi
6689rm -f conftest.$ac_objext conftest.$ac_ext
6690# Binary search between lo and hi bounds.
6691while test "x$ac_lo" != "x$ac_hi"; do
6692 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6693 cat >conftest.$ac_ext <<_ACEOF
6694#line $LINENO "configure"
6695#include "confdefs.h"
6696$ac_includes_default
6697#ifdef F77_DUMMY_MAIN
6698# ifdef __cplusplus
6699 extern "C"
6700# endif
6701 int F77_DUMMY_MAIN() { return 1; }
6702#endif
6703int
6704main ()
6705{
6706static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6707test_array [0] = 0
6708
6709 ;
6710 return 0;
6711}
6712_ACEOF
6713rm -f conftest.$ac_objext
6714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6715 (eval $ac_compile) 2>&5
6716 ac_status=$?
6717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6718 (exit $ac_status); } &&
6719 { ac_try='test -s conftest.$ac_objext'
6720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6721 (eval $ac_try) 2>&5
6722 ac_status=$?
6723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6724 (exit $ac_status); }; }; then
6725 ac_hi=$ac_mid
6726else
6727 echo "$as_me: failed program was:" >&5
6728cat conftest.$ac_ext >&5
6729ac_lo=`expr '(' $ac_mid ')' + 1`
6730fi
6731rm -f conftest.$ac_objext conftest.$ac_ext
6732done
6733case $ac_lo in
6734?*) ac_cv_sizeof_float=$ac_lo;;
6735'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6736echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6737 { (exit 1); exit 1; }; } ;;
6738esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006739else
6740 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006741 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6742echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6743 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006744else
Martin v. Löwis11437992002-04-12 09:54:03 +00006745 cat >conftest.$ac_ext <<_ACEOF
6746#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006747#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006748$ac_includes_default
6749long longval () { return (long) (sizeof (float)); }
6750unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006751#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006752#include <stdlib.h>
6753#ifdef F77_DUMMY_MAIN
6754# ifdef __cplusplus
6755 extern "C"
6756# endif
6757 int F77_DUMMY_MAIN() { return 1; }
6758#endif
6759int
6760main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006761{
Martin v. Löwis11437992002-04-12 09:54:03 +00006762
6763 FILE *f = fopen ("conftest.val", "w");
6764 if (! f)
6765 exit (1);
6766 if (((long) (sizeof (float))) < 0)
6767 {
6768 long i = longval ();
6769 if (i != ((long) (sizeof (float))))
6770 exit (1);
6771 fprintf (f, "%ld\n", i);
6772 }
6773 else
6774 {
6775 unsigned long i = ulongval ();
6776 if (i != ((long) (sizeof (float))))
6777 exit (1);
6778 fprintf (f, "%lu\n", i);
6779 }
6780 exit (ferror (f) || fclose (f) != 0);
6781
6782 ;
6783 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006784}
Martin v. Löwis11437992002-04-12 09:54:03 +00006785_ACEOF
6786rm -f conftest$ac_exeext
6787if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6788 (eval $ac_link) 2>&5
6789 ac_status=$?
6790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6791 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6793 (eval $ac_try) 2>&5
6794 ac_status=$?
6795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6796 (exit $ac_status); }; }; then
6797 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006798else
Martin v. Löwis11437992002-04-12 09:54:03 +00006799 echo "$as_me: program exited with status $ac_status" >&5
6800echo "$as_me: failed program was:" >&5
6801cat conftest.$ac_ext >&5
6802( exit $ac_status )
6803{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6804echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6805 { (exit 1); exit 1; }; }
6806fi
6807rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6808fi
6809fi
6810rm -f conftest.val
6811else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006812 ac_cv_sizeof_float=0
6813fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006815echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6816echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6817cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006818#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006819_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006820
6821
Martin v. Löwis11437992002-04-12 09:54:03 +00006822echo "$as_me:$LINENO: checking for double" >&5
6823echo $ECHO_N "checking for double... $ECHO_C" >&6
6824if test "${ac_cv_type_double+set}" = set; then
6825 echo $ECHO_N "(cached) $ECHO_C" >&6
6826else
6827 cat >conftest.$ac_ext <<_ACEOF
6828#line $LINENO "configure"
6829#include "confdefs.h"
6830$ac_includes_default
6831#ifdef F77_DUMMY_MAIN
6832# ifdef __cplusplus
6833 extern "C"
6834# endif
6835 int F77_DUMMY_MAIN() { return 1; }
6836#endif
6837int
6838main ()
6839{
6840if ((double *) 0)
6841 return 0;
6842if (sizeof (double))
6843 return 0;
6844 ;
6845 return 0;
6846}
6847_ACEOF
6848rm -f conftest.$ac_objext
6849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6850 (eval $ac_compile) 2>&5
6851 ac_status=$?
6852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6853 (exit $ac_status); } &&
6854 { ac_try='test -s conftest.$ac_objext'
6855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6856 (eval $ac_try) 2>&5
6857 ac_status=$?
6858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6859 (exit $ac_status); }; }; then
6860 ac_cv_type_double=yes
6861else
6862 echo "$as_me: failed program was:" >&5
6863cat conftest.$ac_ext >&5
6864ac_cv_type_double=no
6865fi
6866rm -f conftest.$ac_objext conftest.$ac_ext
6867fi
6868echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6869echo "${ECHO_T}$ac_cv_type_double" >&6
6870
6871echo "$as_me:$LINENO: checking size of double" >&5
6872echo $ECHO_N "checking size of double... $ECHO_C" >&6
6873if test "${ac_cv_sizeof_double+set}" = set; then
6874 echo $ECHO_N "(cached) $ECHO_C" >&6
6875else
6876 if test "$ac_cv_type_double" = yes; then
6877 # The cast to unsigned long works around a bug in the HP C Compiler
6878 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6879 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6880 # This bug is HP SR number 8606223364.
6881 if test "$cross_compiling" = yes; then
6882 # Depending upon the size, compute the lo and hi bounds.
6883cat >conftest.$ac_ext <<_ACEOF
6884#line $LINENO "configure"
6885#include "confdefs.h"
6886$ac_includes_default
6887#ifdef F77_DUMMY_MAIN
6888# ifdef __cplusplus
6889 extern "C"
6890# endif
6891 int F77_DUMMY_MAIN() { return 1; }
6892#endif
6893int
6894main ()
6895{
6896static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6897test_array [0] = 0
6898
6899 ;
6900 return 0;
6901}
6902_ACEOF
6903rm -f conftest.$ac_objext
6904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6905 (eval $ac_compile) 2>&5
6906 ac_status=$?
6907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6908 (exit $ac_status); } &&
6909 { ac_try='test -s conftest.$ac_objext'
6910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6911 (eval $ac_try) 2>&5
6912 ac_status=$?
6913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6914 (exit $ac_status); }; }; then
6915 ac_lo=0 ac_mid=0
6916 while :; do
6917 cat >conftest.$ac_ext <<_ACEOF
6918#line $LINENO "configure"
6919#include "confdefs.h"
6920$ac_includes_default
6921#ifdef F77_DUMMY_MAIN
6922# ifdef __cplusplus
6923 extern "C"
6924# endif
6925 int F77_DUMMY_MAIN() { return 1; }
6926#endif
6927int
6928main ()
6929{
6930static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6931test_array [0] = 0
6932
6933 ;
6934 return 0;
6935}
6936_ACEOF
6937rm -f conftest.$ac_objext
6938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6939 (eval $ac_compile) 2>&5
6940 ac_status=$?
6941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6942 (exit $ac_status); } &&
6943 { ac_try='test -s conftest.$ac_objext'
6944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6945 (eval $ac_try) 2>&5
6946 ac_status=$?
6947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6948 (exit $ac_status); }; }; then
6949 ac_hi=$ac_mid; break
6950else
6951 echo "$as_me: failed program was:" >&5
6952cat conftest.$ac_ext >&5
6953ac_lo=`expr $ac_mid + 1`
6954 if test $ac_lo -le $ac_mid; then
6955 ac_lo= ac_hi=
6956 break
6957 fi
6958 ac_mid=`expr 2 '*' $ac_mid + 1`
6959fi
6960rm -f conftest.$ac_objext conftest.$ac_ext
6961 done
6962else
6963 echo "$as_me: failed program was:" >&5
6964cat conftest.$ac_ext >&5
6965cat >conftest.$ac_ext <<_ACEOF
6966#line $LINENO "configure"
6967#include "confdefs.h"
6968$ac_includes_default
6969#ifdef F77_DUMMY_MAIN
6970# ifdef __cplusplus
6971 extern "C"
6972# endif
6973 int F77_DUMMY_MAIN() { return 1; }
6974#endif
6975int
6976main ()
6977{
6978static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6979test_array [0] = 0
6980
6981 ;
6982 return 0;
6983}
6984_ACEOF
6985rm -f conftest.$ac_objext
6986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6987 (eval $ac_compile) 2>&5
6988 ac_status=$?
6989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6990 (exit $ac_status); } &&
6991 { ac_try='test -s conftest.$ac_objext'
6992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6993 (eval $ac_try) 2>&5
6994 ac_status=$?
6995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6996 (exit $ac_status); }; }; then
6997 ac_hi=-1 ac_mid=-1
6998 while :; do
6999 cat >conftest.$ac_ext <<_ACEOF
7000#line $LINENO "configure"
7001#include "confdefs.h"
7002$ac_includes_default
7003#ifdef F77_DUMMY_MAIN
7004# ifdef __cplusplus
7005 extern "C"
7006# endif
7007 int F77_DUMMY_MAIN() { return 1; }
7008#endif
7009int
7010main ()
7011{
7012static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7013test_array [0] = 0
7014
7015 ;
7016 return 0;
7017}
7018_ACEOF
7019rm -f conftest.$ac_objext
7020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7021 (eval $ac_compile) 2>&5
7022 ac_status=$?
7023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7024 (exit $ac_status); } &&
7025 { ac_try='test -s conftest.$ac_objext'
7026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7027 (eval $ac_try) 2>&5
7028 ac_status=$?
7029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7030 (exit $ac_status); }; }; then
7031 ac_lo=$ac_mid; break
7032else
7033 echo "$as_me: failed program was:" >&5
7034cat conftest.$ac_ext >&5
7035ac_hi=`expr '(' $ac_mid ')' - 1`
7036 if test $ac_mid -le $ac_hi; then
7037 ac_lo= ac_hi=
7038 break
7039 fi
7040 ac_mid=`expr 2 '*' $ac_mid`
7041fi
7042rm -f conftest.$ac_objext conftest.$ac_ext
7043 done
7044else
7045 echo "$as_me: failed program was:" >&5
7046cat conftest.$ac_ext >&5
7047ac_lo= ac_hi=
7048fi
7049rm -f conftest.$ac_objext conftest.$ac_ext
7050fi
7051rm -f conftest.$ac_objext conftest.$ac_ext
7052# Binary search between lo and hi bounds.
7053while test "x$ac_lo" != "x$ac_hi"; do
7054 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7055 cat >conftest.$ac_ext <<_ACEOF
7056#line $LINENO "configure"
7057#include "confdefs.h"
7058$ac_includes_default
7059#ifdef F77_DUMMY_MAIN
7060# ifdef __cplusplus
7061 extern "C"
7062# endif
7063 int F77_DUMMY_MAIN() { return 1; }
7064#endif
7065int
7066main ()
7067{
7068static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7069test_array [0] = 0
7070
7071 ;
7072 return 0;
7073}
7074_ACEOF
7075rm -f conftest.$ac_objext
7076if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7077 (eval $ac_compile) 2>&5
7078 ac_status=$?
7079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7080 (exit $ac_status); } &&
7081 { ac_try='test -s conftest.$ac_objext'
7082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7083 (eval $ac_try) 2>&5
7084 ac_status=$?
7085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7086 (exit $ac_status); }; }; then
7087 ac_hi=$ac_mid
7088else
7089 echo "$as_me: failed program was:" >&5
7090cat conftest.$ac_ext >&5
7091ac_lo=`expr '(' $ac_mid ')' + 1`
7092fi
7093rm -f conftest.$ac_objext conftest.$ac_ext
7094done
7095case $ac_lo in
7096?*) ac_cv_sizeof_double=$ac_lo;;
7097'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7098echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7099 { (exit 1); exit 1; }; } ;;
7100esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007101else
7102 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007103 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7104echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7105 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007106else
Martin v. Löwis11437992002-04-12 09:54:03 +00007107 cat >conftest.$ac_ext <<_ACEOF
7108#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007109#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007110$ac_includes_default
7111long longval () { return (long) (sizeof (double)); }
7112unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007113#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007114#include <stdlib.h>
7115#ifdef F77_DUMMY_MAIN
7116# ifdef __cplusplus
7117 extern "C"
7118# endif
7119 int F77_DUMMY_MAIN() { return 1; }
7120#endif
7121int
7122main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007123{
Martin v. Löwis11437992002-04-12 09:54:03 +00007124
7125 FILE *f = fopen ("conftest.val", "w");
7126 if (! f)
7127 exit (1);
7128 if (((long) (sizeof (double))) < 0)
7129 {
7130 long i = longval ();
7131 if (i != ((long) (sizeof (double))))
7132 exit (1);
7133 fprintf (f, "%ld\n", i);
7134 }
7135 else
7136 {
7137 unsigned long i = ulongval ();
7138 if (i != ((long) (sizeof (double))))
7139 exit (1);
7140 fprintf (f, "%lu\n", i);
7141 }
7142 exit (ferror (f) || fclose (f) != 0);
7143
7144 ;
7145 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007146}
Martin v. Löwis11437992002-04-12 09:54:03 +00007147_ACEOF
7148rm -f conftest$ac_exeext
7149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7150 (eval $ac_link) 2>&5
7151 ac_status=$?
7152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7153 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7155 (eval $ac_try) 2>&5
7156 ac_status=$?
7157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7158 (exit $ac_status); }; }; then
7159 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007160else
Martin v. Löwis11437992002-04-12 09:54:03 +00007161 echo "$as_me: program exited with status $ac_status" >&5
7162echo "$as_me: failed program was:" >&5
7163cat conftest.$ac_ext >&5
7164( exit $ac_status )
7165{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7166echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7167 { (exit 1); exit 1; }; }
7168fi
7169rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7170fi
7171fi
7172rm -f conftest.val
7173else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007174 ac_cv_sizeof_double=0
7175fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007176fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007177echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7178echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7179cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007180#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007181_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007182
7183
Martin v. Löwis11437992002-04-12 09:54:03 +00007184echo "$as_me:$LINENO: checking for fpos_t" >&5
7185echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7186if test "${ac_cv_type_fpos_t+set}" = set; then
7187 echo $ECHO_N "(cached) $ECHO_C" >&6
7188else
7189 cat >conftest.$ac_ext <<_ACEOF
7190#line $LINENO "configure"
7191#include "confdefs.h"
7192$ac_includes_default
7193#ifdef F77_DUMMY_MAIN
7194# ifdef __cplusplus
7195 extern "C"
7196# endif
7197 int F77_DUMMY_MAIN() { return 1; }
7198#endif
7199int
7200main ()
7201{
7202if ((fpos_t *) 0)
7203 return 0;
7204if (sizeof (fpos_t))
7205 return 0;
7206 ;
7207 return 0;
7208}
7209_ACEOF
7210rm -f conftest.$ac_objext
7211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7212 (eval $ac_compile) 2>&5
7213 ac_status=$?
7214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7215 (exit $ac_status); } &&
7216 { ac_try='test -s conftest.$ac_objext'
7217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7218 (eval $ac_try) 2>&5
7219 ac_status=$?
7220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7221 (exit $ac_status); }; }; then
7222 ac_cv_type_fpos_t=yes
7223else
7224 echo "$as_me: failed program was:" >&5
7225cat conftest.$ac_ext >&5
7226ac_cv_type_fpos_t=no
7227fi
7228rm -f conftest.$ac_objext conftest.$ac_ext
7229fi
7230echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7231echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7232
7233echo "$as_me:$LINENO: checking size of fpos_t" >&5
7234echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7235if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7236 echo $ECHO_N "(cached) $ECHO_C" >&6
7237else
7238 if test "$ac_cv_type_fpos_t" = yes; then
7239 # The cast to unsigned long works around a bug in the HP C Compiler
7240 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7241 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7242 # This bug is HP SR number 8606223364.
7243 if test "$cross_compiling" = yes; then
7244 # Depending upon the size, compute the lo and hi bounds.
7245cat >conftest.$ac_ext <<_ACEOF
7246#line $LINENO "configure"
7247#include "confdefs.h"
7248$ac_includes_default
7249#ifdef F77_DUMMY_MAIN
7250# ifdef __cplusplus
7251 extern "C"
7252# endif
7253 int F77_DUMMY_MAIN() { return 1; }
7254#endif
7255int
7256main ()
7257{
7258static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7259test_array [0] = 0
7260
7261 ;
7262 return 0;
7263}
7264_ACEOF
7265rm -f conftest.$ac_objext
7266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7267 (eval $ac_compile) 2>&5
7268 ac_status=$?
7269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7270 (exit $ac_status); } &&
7271 { ac_try='test -s conftest.$ac_objext'
7272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7273 (eval $ac_try) 2>&5
7274 ac_status=$?
7275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7276 (exit $ac_status); }; }; then
7277 ac_lo=0 ac_mid=0
7278 while :; do
7279 cat >conftest.$ac_ext <<_ACEOF
7280#line $LINENO "configure"
7281#include "confdefs.h"
7282$ac_includes_default
7283#ifdef F77_DUMMY_MAIN
7284# ifdef __cplusplus
7285 extern "C"
7286# endif
7287 int F77_DUMMY_MAIN() { return 1; }
7288#endif
7289int
7290main ()
7291{
7292static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7293test_array [0] = 0
7294
7295 ;
7296 return 0;
7297}
7298_ACEOF
7299rm -f conftest.$ac_objext
7300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7301 (eval $ac_compile) 2>&5
7302 ac_status=$?
7303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7304 (exit $ac_status); } &&
7305 { ac_try='test -s conftest.$ac_objext'
7306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7307 (eval $ac_try) 2>&5
7308 ac_status=$?
7309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7310 (exit $ac_status); }; }; then
7311 ac_hi=$ac_mid; break
7312else
7313 echo "$as_me: failed program was:" >&5
7314cat conftest.$ac_ext >&5
7315ac_lo=`expr $ac_mid + 1`
7316 if test $ac_lo -le $ac_mid; then
7317 ac_lo= ac_hi=
7318 break
7319 fi
7320 ac_mid=`expr 2 '*' $ac_mid + 1`
7321fi
7322rm -f conftest.$ac_objext conftest.$ac_ext
7323 done
7324else
7325 echo "$as_me: failed program was:" >&5
7326cat conftest.$ac_ext >&5
7327cat >conftest.$ac_ext <<_ACEOF
7328#line $LINENO "configure"
7329#include "confdefs.h"
7330$ac_includes_default
7331#ifdef F77_DUMMY_MAIN
7332# ifdef __cplusplus
7333 extern "C"
7334# endif
7335 int F77_DUMMY_MAIN() { return 1; }
7336#endif
7337int
7338main ()
7339{
7340static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7341test_array [0] = 0
7342
7343 ;
7344 return 0;
7345}
7346_ACEOF
7347rm -f conftest.$ac_objext
7348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7349 (eval $ac_compile) 2>&5
7350 ac_status=$?
7351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7352 (exit $ac_status); } &&
7353 { ac_try='test -s conftest.$ac_objext'
7354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7355 (eval $ac_try) 2>&5
7356 ac_status=$?
7357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7358 (exit $ac_status); }; }; then
7359 ac_hi=-1 ac_mid=-1
7360 while :; do
7361 cat >conftest.$ac_ext <<_ACEOF
7362#line $LINENO "configure"
7363#include "confdefs.h"
7364$ac_includes_default
7365#ifdef F77_DUMMY_MAIN
7366# ifdef __cplusplus
7367 extern "C"
7368# endif
7369 int F77_DUMMY_MAIN() { return 1; }
7370#endif
7371int
7372main ()
7373{
7374static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7375test_array [0] = 0
7376
7377 ;
7378 return 0;
7379}
7380_ACEOF
7381rm -f conftest.$ac_objext
7382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7383 (eval $ac_compile) 2>&5
7384 ac_status=$?
7385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7386 (exit $ac_status); } &&
7387 { ac_try='test -s conftest.$ac_objext'
7388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7389 (eval $ac_try) 2>&5
7390 ac_status=$?
7391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7392 (exit $ac_status); }; }; then
7393 ac_lo=$ac_mid; break
7394else
7395 echo "$as_me: failed program was:" >&5
7396cat conftest.$ac_ext >&5
7397ac_hi=`expr '(' $ac_mid ')' - 1`
7398 if test $ac_mid -le $ac_hi; then
7399 ac_lo= ac_hi=
7400 break
7401 fi
7402 ac_mid=`expr 2 '*' $ac_mid`
7403fi
7404rm -f conftest.$ac_objext conftest.$ac_ext
7405 done
7406else
7407 echo "$as_me: failed program was:" >&5
7408cat conftest.$ac_ext >&5
7409ac_lo= ac_hi=
7410fi
7411rm -f conftest.$ac_objext conftest.$ac_ext
7412fi
7413rm -f conftest.$ac_objext conftest.$ac_ext
7414# Binary search between lo and hi bounds.
7415while test "x$ac_lo" != "x$ac_hi"; do
7416 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7417 cat >conftest.$ac_ext <<_ACEOF
7418#line $LINENO "configure"
7419#include "confdefs.h"
7420$ac_includes_default
7421#ifdef F77_DUMMY_MAIN
7422# ifdef __cplusplus
7423 extern "C"
7424# endif
7425 int F77_DUMMY_MAIN() { return 1; }
7426#endif
7427int
7428main ()
7429{
7430static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7431test_array [0] = 0
7432
7433 ;
7434 return 0;
7435}
7436_ACEOF
7437rm -f conftest.$ac_objext
7438if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7439 (eval $ac_compile) 2>&5
7440 ac_status=$?
7441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7442 (exit $ac_status); } &&
7443 { ac_try='test -s conftest.$ac_objext'
7444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7445 (eval $ac_try) 2>&5
7446 ac_status=$?
7447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7448 (exit $ac_status); }; }; then
7449 ac_hi=$ac_mid
7450else
7451 echo "$as_me: failed program was:" >&5
7452cat conftest.$ac_ext >&5
7453ac_lo=`expr '(' $ac_mid ')' + 1`
7454fi
7455rm -f conftest.$ac_objext conftest.$ac_ext
7456done
7457case $ac_lo in
7458?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7459'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7460echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7461 { (exit 1); exit 1; }; } ;;
7462esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007463else
7464 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007465 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7466echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7467 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007468else
Martin v. Löwis11437992002-04-12 09:54:03 +00007469 cat >conftest.$ac_ext <<_ACEOF
7470#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007471#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007472$ac_includes_default
7473long longval () { return (long) (sizeof (fpos_t)); }
7474unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007475#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007476#include <stdlib.h>
7477#ifdef F77_DUMMY_MAIN
7478# ifdef __cplusplus
7479 extern "C"
7480# endif
7481 int F77_DUMMY_MAIN() { return 1; }
7482#endif
7483int
7484main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007485{
Martin v. Löwis11437992002-04-12 09:54:03 +00007486
7487 FILE *f = fopen ("conftest.val", "w");
7488 if (! f)
7489 exit (1);
7490 if (((long) (sizeof (fpos_t))) < 0)
7491 {
7492 long i = longval ();
7493 if (i != ((long) (sizeof (fpos_t))))
7494 exit (1);
7495 fprintf (f, "%ld\n", i);
7496 }
7497 else
7498 {
7499 unsigned long i = ulongval ();
7500 if (i != ((long) (sizeof (fpos_t))))
7501 exit (1);
7502 fprintf (f, "%lu\n", i);
7503 }
7504 exit (ferror (f) || fclose (f) != 0);
7505
7506 ;
7507 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007508}
Martin v. Löwis11437992002-04-12 09:54:03 +00007509_ACEOF
7510rm -f conftest$ac_exeext
7511if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7512 (eval $ac_link) 2>&5
7513 ac_status=$?
7514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7517 (eval $ac_try) 2>&5
7518 ac_status=$?
7519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7520 (exit $ac_status); }; }; then
7521 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007522else
Martin v. Löwis11437992002-04-12 09:54:03 +00007523 echo "$as_me: program exited with status $ac_status" >&5
7524echo "$as_me: failed program was:" >&5
7525cat conftest.$ac_ext >&5
7526( exit $ac_status )
7527{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7528echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7529 { (exit 1); exit 1; }; }
7530fi
7531rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7532fi
7533fi
7534rm -f conftest.val
7535else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007536 ac_cv_sizeof_fpos_t=0
7537fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007538fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007539echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7540echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7541cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007542#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007543_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007544
Michael W. Hudson54241132001-12-07 15:38:26 +00007545
7546
Martin v. Löwis11437992002-04-12 09:54:03 +00007547echo "$as_me:$LINENO: checking for long long support" >&5
7548echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007549have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007550cat >conftest.$ac_ext <<_ACEOF
7551#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007552#include "confdefs.h"
7553
Martin v. Löwis11437992002-04-12 09:54:03 +00007554#ifdef F77_DUMMY_MAIN
7555# ifdef __cplusplus
7556 extern "C"
7557# endif
7558 int F77_DUMMY_MAIN() { return 1; }
7559#endif
7560int
7561main ()
7562{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007563long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007564 ;
7565 return 0;
7566}
7567_ACEOF
7568rm -f conftest.$ac_objext
7569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7570 (eval $ac_compile) 2>&5
7571 ac_status=$?
7572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7573 (exit $ac_status); } &&
7574 { ac_try='test -s conftest.$ac_objext'
7575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7576 (eval $ac_try) 2>&5
7577 ac_status=$?
7578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7579 (exit $ac_status); }; }; then
7580
7581
7582cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007583#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007584_ACEOF
7585
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007586 have_long_long=yes
7587
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007588else
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 echo "$as_me: failed program was:" >&5
7590cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007592rm -f conftest.$ac_objext conftest.$ac_ext
7593echo "$as_me:$LINENO: result: $have_long_long" >&5
7594echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007595if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007596echo "$as_me:$LINENO: checking for long long" >&5
7597echo $ECHO_N "checking for long long... $ECHO_C" >&6
7598if test "${ac_cv_type_long_long+set}" = set; then
7599 echo $ECHO_N "(cached) $ECHO_C" >&6
7600else
7601 cat >conftest.$ac_ext <<_ACEOF
7602#line $LINENO "configure"
7603#include "confdefs.h"
7604$ac_includes_default
7605#ifdef F77_DUMMY_MAIN
7606# ifdef __cplusplus
7607 extern "C"
7608# endif
7609 int F77_DUMMY_MAIN() { return 1; }
7610#endif
7611int
7612main ()
7613{
7614if ((long long *) 0)
7615 return 0;
7616if (sizeof (long long))
7617 return 0;
7618 ;
7619 return 0;
7620}
7621_ACEOF
7622rm -f conftest.$ac_objext
7623if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7624 (eval $ac_compile) 2>&5
7625 ac_status=$?
7626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7627 (exit $ac_status); } &&
7628 { ac_try='test -s conftest.$ac_objext'
7629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7630 (eval $ac_try) 2>&5
7631 ac_status=$?
7632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7633 (exit $ac_status); }; }; then
7634 ac_cv_type_long_long=yes
7635else
7636 echo "$as_me: failed program was:" >&5
7637cat conftest.$ac_ext >&5
7638ac_cv_type_long_long=no
7639fi
7640rm -f conftest.$ac_objext conftest.$ac_ext
7641fi
7642echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7643echo "${ECHO_T}$ac_cv_type_long_long" >&6
7644
7645echo "$as_me:$LINENO: checking size of long long" >&5
7646echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7647if test "${ac_cv_sizeof_long_long+set}" = set; then
7648 echo $ECHO_N "(cached) $ECHO_C" >&6
7649else
7650 if test "$ac_cv_type_long_long" = yes; then
7651 # The cast to unsigned long works around a bug in the HP C Compiler
7652 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7653 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7654 # This bug is HP SR number 8606223364.
7655 if test "$cross_compiling" = yes; then
7656 # Depending upon the size, compute the lo and hi bounds.
7657cat >conftest.$ac_ext <<_ACEOF
7658#line $LINENO "configure"
7659#include "confdefs.h"
7660$ac_includes_default
7661#ifdef F77_DUMMY_MAIN
7662# ifdef __cplusplus
7663 extern "C"
7664# endif
7665 int F77_DUMMY_MAIN() { return 1; }
7666#endif
7667int
7668main ()
7669{
7670static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7671test_array [0] = 0
7672
7673 ;
7674 return 0;
7675}
7676_ACEOF
7677rm -f conftest.$ac_objext
7678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7679 (eval $ac_compile) 2>&5
7680 ac_status=$?
7681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7682 (exit $ac_status); } &&
7683 { ac_try='test -s conftest.$ac_objext'
7684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7685 (eval $ac_try) 2>&5
7686 ac_status=$?
7687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7688 (exit $ac_status); }; }; then
7689 ac_lo=0 ac_mid=0
7690 while :; do
7691 cat >conftest.$ac_ext <<_ACEOF
7692#line $LINENO "configure"
7693#include "confdefs.h"
7694$ac_includes_default
7695#ifdef F77_DUMMY_MAIN
7696# ifdef __cplusplus
7697 extern "C"
7698# endif
7699 int F77_DUMMY_MAIN() { return 1; }
7700#endif
7701int
7702main ()
7703{
7704static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7705test_array [0] = 0
7706
7707 ;
7708 return 0;
7709}
7710_ACEOF
7711rm -f conftest.$ac_objext
7712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7713 (eval $ac_compile) 2>&5
7714 ac_status=$?
7715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7716 (exit $ac_status); } &&
7717 { ac_try='test -s conftest.$ac_objext'
7718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7719 (eval $ac_try) 2>&5
7720 ac_status=$?
7721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7722 (exit $ac_status); }; }; then
7723 ac_hi=$ac_mid; break
7724else
7725 echo "$as_me: failed program was:" >&5
7726cat conftest.$ac_ext >&5
7727ac_lo=`expr $ac_mid + 1`
7728 if test $ac_lo -le $ac_mid; then
7729 ac_lo= ac_hi=
7730 break
7731 fi
7732 ac_mid=`expr 2 '*' $ac_mid + 1`
7733fi
7734rm -f conftest.$ac_objext conftest.$ac_ext
7735 done
7736else
7737 echo "$as_me: failed program was:" >&5
7738cat conftest.$ac_ext >&5
7739cat >conftest.$ac_ext <<_ACEOF
7740#line $LINENO "configure"
7741#include "confdefs.h"
7742$ac_includes_default
7743#ifdef F77_DUMMY_MAIN
7744# ifdef __cplusplus
7745 extern "C"
7746# endif
7747 int F77_DUMMY_MAIN() { return 1; }
7748#endif
7749int
7750main ()
7751{
7752static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7753test_array [0] = 0
7754
7755 ;
7756 return 0;
7757}
7758_ACEOF
7759rm -f conftest.$ac_objext
7760if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7761 (eval $ac_compile) 2>&5
7762 ac_status=$?
7763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7764 (exit $ac_status); } &&
7765 { ac_try='test -s conftest.$ac_objext'
7766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7767 (eval $ac_try) 2>&5
7768 ac_status=$?
7769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7770 (exit $ac_status); }; }; then
7771 ac_hi=-1 ac_mid=-1
7772 while :; do
7773 cat >conftest.$ac_ext <<_ACEOF
7774#line $LINENO "configure"
7775#include "confdefs.h"
7776$ac_includes_default
7777#ifdef F77_DUMMY_MAIN
7778# ifdef __cplusplus
7779 extern "C"
7780# endif
7781 int F77_DUMMY_MAIN() { return 1; }
7782#endif
7783int
7784main ()
7785{
7786static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7787test_array [0] = 0
7788
7789 ;
7790 return 0;
7791}
7792_ACEOF
7793rm -f conftest.$ac_objext
7794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7795 (eval $ac_compile) 2>&5
7796 ac_status=$?
7797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7798 (exit $ac_status); } &&
7799 { ac_try='test -s conftest.$ac_objext'
7800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7801 (eval $ac_try) 2>&5
7802 ac_status=$?
7803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7804 (exit $ac_status); }; }; then
7805 ac_lo=$ac_mid; break
7806else
7807 echo "$as_me: failed program was:" >&5
7808cat conftest.$ac_ext >&5
7809ac_hi=`expr '(' $ac_mid ')' - 1`
7810 if test $ac_mid -le $ac_hi; then
7811 ac_lo= ac_hi=
7812 break
7813 fi
7814 ac_mid=`expr 2 '*' $ac_mid`
7815fi
7816rm -f conftest.$ac_objext conftest.$ac_ext
7817 done
7818else
7819 echo "$as_me: failed program was:" >&5
7820cat conftest.$ac_ext >&5
7821ac_lo= ac_hi=
7822fi
7823rm -f conftest.$ac_objext conftest.$ac_ext
7824fi
7825rm -f conftest.$ac_objext conftest.$ac_ext
7826# Binary search between lo and hi bounds.
7827while test "x$ac_lo" != "x$ac_hi"; do
7828 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7829 cat >conftest.$ac_ext <<_ACEOF
7830#line $LINENO "configure"
7831#include "confdefs.h"
7832$ac_includes_default
7833#ifdef F77_DUMMY_MAIN
7834# ifdef __cplusplus
7835 extern "C"
7836# endif
7837 int F77_DUMMY_MAIN() { return 1; }
7838#endif
7839int
7840main ()
7841{
7842static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7843test_array [0] = 0
7844
7845 ;
7846 return 0;
7847}
7848_ACEOF
7849rm -f conftest.$ac_objext
7850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7851 (eval $ac_compile) 2>&5
7852 ac_status=$?
7853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7854 (exit $ac_status); } &&
7855 { ac_try='test -s conftest.$ac_objext'
7856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7857 (eval $ac_try) 2>&5
7858 ac_status=$?
7859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7860 (exit $ac_status); }; }; then
7861 ac_hi=$ac_mid
7862else
7863 echo "$as_me: failed program was:" >&5
7864cat conftest.$ac_ext >&5
7865ac_lo=`expr '(' $ac_mid ')' + 1`
7866fi
7867rm -f conftest.$ac_objext conftest.$ac_ext
7868done
7869case $ac_lo in
7870?*) ac_cv_sizeof_long_long=$ac_lo;;
7871'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7872echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7873 { (exit 1); exit 1; }; } ;;
7874esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007875else
7876 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007877 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7878echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7879 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007880else
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 cat >conftest.$ac_ext <<_ACEOF
7882#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007883#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007884$ac_includes_default
7885long longval () { return (long) (sizeof (long long)); }
7886unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007887#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007888#include <stdlib.h>
7889#ifdef F77_DUMMY_MAIN
7890# ifdef __cplusplus
7891 extern "C"
7892# endif
7893 int F77_DUMMY_MAIN() { return 1; }
7894#endif
7895int
7896main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007897{
Martin v. Löwis11437992002-04-12 09:54:03 +00007898
7899 FILE *f = fopen ("conftest.val", "w");
7900 if (! f)
7901 exit (1);
7902 if (((long) (sizeof (long long))) < 0)
7903 {
7904 long i = longval ();
7905 if (i != ((long) (sizeof (long long))))
7906 exit (1);
7907 fprintf (f, "%ld\n", i);
7908 }
7909 else
7910 {
7911 unsigned long i = ulongval ();
7912 if (i != ((long) (sizeof (long long))))
7913 exit (1);
7914 fprintf (f, "%lu\n", i);
7915 }
7916 exit (ferror (f) || fclose (f) != 0);
7917
7918 ;
7919 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007920}
Martin v. Löwis11437992002-04-12 09:54:03 +00007921_ACEOF
7922rm -f conftest$ac_exeext
7923if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7924 (eval $ac_link) 2>&5
7925 ac_status=$?
7926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7927 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7929 (eval $ac_try) 2>&5
7930 ac_status=$?
7931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7932 (exit $ac_status); }; }; then
7933 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007934else
Martin v. Löwis11437992002-04-12 09:54:03 +00007935 echo "$as_me: program exited with status $ac_status" >&5
7936echo "$as_me: failed program was:" >&5
7937cat conftest.$ac_ext >&5
7938( exit $ac_status )
7939{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7940echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7941 { (exit 1); exit 1; }; }
7942fi
7943rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7944fi
7945fi
7946rm -f conftest.val
7947else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007948 ac_cv_sizeof_long_long=0
7949fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007950fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007951echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7952echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7953cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007954#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007955_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007956
Michael W. Hudson54241132001-12-07 15:38:26 +00007957
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007958fi
7959
Martin v. Löwis11437992002-04-12 09:54:03 +00007960echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7961echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007962have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007963cat >conftest.$ac_ext <<_ACEOF
7964#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007965#include "confdefs.h"
7966
Martin v. Löwis11437992002-04-12 09:54:03 +00007967#ifdef F77_DUMMY_MAIN
7968# ifdef __cplusplus
7969 extern "C"
7970# endif
7971 int F77_DUMMY_MAIN() { return 1; }
7972#endif
7973int
7974main ()
7975{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007976uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007977 ;
7978 return 0;
7979}
7980_ACEOF
7981rm -f conftest.$ac_objext
7982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7983 (eval $ac_compile) 2>&5
7984 ac_status=$?
7985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7986 (exit $ac_status); } &&
7987 { ac_try='test -s conftest.$ac_objext'
7988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7989 (eval $ac_try) 2>&5
7990 ac_status=$?
7991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7992 (exit $ac_status); }; }; then
7993
7994
7995cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007996#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007997_ACEOF
7998
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007999 have_uintptr_t=yes
8000
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008001else
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 echo "$as_me: failed program was:" >&5
8003cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008004fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008005rm -f conftest.$ac_objext conftest.$ac_ext
8006echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8007echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008008if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008009echo "$as_me:$LINENO: checking for uintptr_t" >&5
8010echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8011if test "${ac_cv_type_uintptr_t+set}" = set; then
8012 echo $ECHO_N "(cached) $ECHO_C" >&6
8013else
8014 cat >conftest.$ac_ext <<_ACEOF
8015#line $LINENO "configure"
8016#include "confdefs.h"
8017$ac_includes_default
8018#ifdef F77_DUMMY_MAIN
8019# ifdef __cplusplus
8020 extern "C"
8021# endif
8022 int F77_DUMMY_MAIN() { return 1; }
8023#endif
8024int
8025main ()
8026{
8027if ((uintptr_t *) 0)
8028 return 0;
8029if (sizeof (uintptr_t))
8030 return 0;
8031 ;
8032 return 0;
8033}
8034_ACEOF
8035rm -f conftest.$ac_objext
8036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8037 (eval $ac_compile) 2>&5
8038 ac_status=$?
8039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8040 (exit $ac_status); } &&
8041 { ac_try='test -s conftest.$ac_objext'
8042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8043 (eval $ac_try) 2>&5
8044 ac_status=$?
8045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8046 (exit $ac_status); }; }; then
8047 ac_cv_type_uintptr_t=yes
8048else
8049 echo "$as_me: failed program was:" >&5
8050cat conftest.$ac_ext >&5
8051ac_cv_type_uintptr_t=no
8052fi
8053rm -f conftest.$ac_objext conftest.$ac_ext
8054fi
8055echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8056echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8057
8058echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8059echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8060if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8061 echo $ECHO_N "(cached) $ECHO_C" >&6
8062else
8063 if test "$ac_cv_type_uintptr_t" = yes; then
8064 # The cast to unsigned long works around a bug in the HP C Compiler
8065 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8066 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8067 # This bug is HP SR number 8606223364.
8068 if test "$cross_compiling" = yes; then
8069 # Depending upon the size, compute the lo and hi bounds.
8070cat >conftest.$ac_ext <<_ACEOF
8071#line $LINENO "configure"
8072#include "confdefs.h"
8073$ac_includes_default
8074#ifdef F77_DUMMY_MAIN
8075# ifdef __cplusplus
8076 extern "C"
8077# endif
8078 int F77_DUMMY_MAIN() { return 1; }
8079#endif
8080int
8081main ()
8082{
8083static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8084test_array [0] = 0
8085
8086 ;
8087 return 0;
8088}
8089_ACEOF
8090rm -f conftest.$ac_objext
8091if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8092 (eval $ac_compile) 2>&5
8093 ac_status=$?
8094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8095 (exit $ac_status); } &&
8096 { ac_try='test -s conftest.$ac_objext'
8097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8098 (eval $ac_try) 2>&5
8099 ac_status=$?
8100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8101 (exit $ac_status); }; }; then
8102 ac_lo=0 ac_mid=0
8103 while :; do
8104 cat >conftest.$ac_ext <<_ACEOF
8105#line $LINENO "configure"
8106#include "confdefs.h"
8107$ac_includes_default
8108#ifdef F77_DUMMY_MAIN
8109# ifdef __cplusplus
8110 extern "C"
8111# endif
8112 int F77_DUMMY_MAIN() { return 1; }
8113#endif
8114int
8115main ()
8116{
8117static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8118test_array [0] = 0
8119
8120 ;
8121 return 0;
8122}
8123_ACEOF
8124rm -f conftest.$ac_objext
8125if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8126 (eval $ac_compile) 2>&5
8127 ac_status=$?
8128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8129 (exit $ac_status); } &&
8130 { ac_try='test -s conftest.$ac_objext'
8131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8132 (eval $ac_try) 2>&5
8133 ac_status=$?
8134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8135 (exit $ac_status); }; }; then
8136 ac_hi=$ac_mid; break
8137else
8138 echo "$as_me: failed program was:" >&5
8139cat conftest.$ac_ext >&5
8140ac_lo=`expr $ac_mid + 1`
8141 if test $ac_lo -le $ac_mid; then
8142 ac_lo= ac_hi=
8143 break
8144 fi
8145 ac_mid=`expr 2 '*' $ac_mid + 1`
8146fi
8147rm -f conftest.$ac_objext conftest.$ac_ext
8148 done
8149else
8150 echo "$as_me: failed program was:" >&5
8151cat conftest.$ac_ext >&5
8152cat >conftest.$ac_ext <<_ACEOF
8153#line $LINENO "configure"
8154#include "confdefs.h"
8155$ac_includes_default
8156#ifdef F77_DUMMY_MAIN
8157# ifdef __cplusplus
8158 extern "C"
8159# endif
8160 int F77_DUMMY_MAIN() { return 1; }
8161#endif
8162int
8163main ()
8164{
8165static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8166test_array [0] = 0
8167
8168 ;
8169 return 0;
8170}
8171_ACEOF
8172rm -f conftest.$ac_objext
8173if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8174 (eval $ac_compile) 2>&5
8175 ac_status=$?
8176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8177 (exit $ac_status); } &&
8178 { ac_try='test -s conftest.$ac_objext'
8179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8180 (eval $ac_try) 2>&5
8181 ac_status=$?
8182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8183 (exit $ac_status); }; }; then
8184 ac_hi=-1 ac_mid=-1
8185 while :; do
8186 cat >conftest.$ac_ext <<_ACEOF
8187#line $LINENO "configure"
8188#include "confdefs.h"
8189$ac_includes_default
8190#ifdef F77_DUMMY_MAIN
8191# ifdef __cplusplus
8192 extern "C"
8193# endif
8194 int F77_DUMMY_MAIN() { return 1; }
8195#endif
8196int
8197main ()
8198{
8199static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8200test_array [0] = 0
8201
8202 ;
8203 return 0;
8204}
8205_ACEOF
8206rm -f conftest.$ac_objext
8207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8208 (eval $ac_compile) 2>&5
8209 ac_status=$?
8210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8211 (exit $ac_status); } &&
8212 { ac_try='test -s conftest.$ac_objext'
8213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8214 (eval $ac_try) 2>&5
8215 ac_status=$?
8216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8217 (exit $ac_status); }; }; then
8218 ac_lo=$ac_mid; break
8219else
8220 echo "$as_me: failed program was:" >&5
8221cat conftest.$ac_ext >&5
8222ac_hi=`expr '(' $ac_mid ')' - 1`
8223 if test $ac_mid -le $ac_hi; then
8224 ac_lo= ac_hi=
8225 break
8226 fi
8227 ac_mid=`expr 2 '*' $ac_mid`
8228fi
8229rm -f conftest.$ac_objext conftest.$ac_ext
8230 done
8231else
8232 echo "$as_me: failed program was:" >&5
8233cat conftest.$ac_ext >&5
8234ac_lo= ac_hi=
8235fi
8236rm -f conftest.$ac_objext conftest.$ac_ext
8237fi
8238rm -f conftest.$ac_objext conftest.$ac_ext
8239# Binary search between lo and hi bounds.
8240while test "x$ac_lo" != "x$ac_hi"; do
8241 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8242 cat >conftest.$ac_ext <<_ACEOF
8243#line $LINENO "configure"
8244#include "confdefs.h"
8245$ac_includes_default
8246#ifdef F77_DUMMY_MAIN
8247# ifdef __cplusplus
8248 extern "C"
8249# endif
8250 int F77_DUMMY_MAIN() { return 1; }
8251#endif
8252int
8253main ()
8254{
8255static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8256test_array [0] = 0
8257
8258 ;
8259 return 0;
8260}
8261_ACEOF
8262rm -f conftest.$ac_objext
8263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8264 (eval $ac_compile) 2>&5
8265 ac_status=$?
8266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8267 (exit $ac_status); } &&
8268 { ac_try='test -s conftest.$ac_objext'
8269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8270 (eval $ac_try) 2>&5
8271 ac_status=$?
8272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8273 (exit $ac_status); }; }; then
8274 ac_hi=$ac_mid
8275else
8276 echo "$as_me: failed program was:" >&5
8277cat conftest.$ac_ext >&5
8278ac_lo=`expr '(' $ac_mid ')' + 1`
8279fi
8280rm -f conftest.$ac_objext conftest.$ac_ext
8281done
8282case $ac_lo in
8283?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8284'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8285echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8286 { (exit 1); exit 1; }; } ;;
8287esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008288else
8289 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008290 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8291echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8292 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008293else
Martin v. Löwis11437992002-04-12 09:54:03 +00008294 cat >conftest.$ac_ext <<_ACEOF
8295#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008296#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008297$ac_includes_default
8298long longval () { return (long) (sizeof (uintptr_t)); }
8299unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008300#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008301#include <stdlib.h>
8302#ifdef F77_DUMMY_MAIN
8303# ifdef __cplusplus
8304 extern "C"
8305# endif
8306 int F77_DUMMY_MAIN() { return 1; }
8307#endif
8308int
8309main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008310{
Martin v. Löwis11437992002-04-12 09:54:03 +00008311
8312 FILE *f = fopen ("conftest.val", "w");
8313 if (! f)
8314 exit (1);
8315 if (((long) (sizeof (uintptr_t))) < 0)
8316 {
8317 long i = longval ();
8318 if (i != ((long) (sizeof (uintptr_t))))
8319 exit (1);
8320 fprintf (f, "%ld\n", i);
8321 }
8322 else
8323 {
8324 unsigned long i = ulongval ();
8325 if (i != ((long) (sizeof (uintptr_t))))
8326 exit (1);
8327 fprintf (f, "%lu\n", i);
8328 }
8329 exit (ferror (f) || fclose (f) != 0);
8330
8331 ;
8332 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008333}
Martin v. Löwis11437992002-04-12 09:54:03 +00008334_ACEOF
8335rm -f conftest$ac_exeext
8336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8337 (eval $ac_link) 2>&5
8338 ac_status=$?
8339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8340 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8342 (eval $ac_try) 2>&5
8343 ac_status=$?
8344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8345 (exit $ac_status); }; }; then
8346 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008347else
Martin v. Löwis11437992002-04-12 09:54:03 +00008348 echo "$as_me: program exited with status $ac_status" >&5
8349echo "$as_me: failed program was:" >&5
8350cat conftest.$ac_ext >&5
8351( exit $ac_status )
8352{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8353echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8354 { (exit 1); exit 1; }; }
8355fi
8356rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8357fi
8358fi
8359rm -f conftest.val
8360else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008361 ac_cv_sizeof_uintptr_t=0
8362fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008364echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8365echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8366cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008367#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008368_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008369
Michael W. Hudson54241132001-12-07 15:38:26 +00008370
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008371fi
8372
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008373# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008374echo "$as_me:$LINENO: checking size of off_t" >&5
8375echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8376if test "${ac_cv_sizeof_off_t+set}" = set; then
8377 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008378else
8379 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008380 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008381else
Martin v. Löwis11437992002-04-12 09:54:03 +00008382 cat >conftest.$ac_ext <<_ACEOF
8383#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008384#include "confdefs.h"
8385#include <stdio.h>
8386#include <sys/types.h>
8387main()
8388{
8389 FILE *f=fopen("conftestval", "w");
8390 if (!f) exit(1);
8391 fprintf(f, "%d\n", sizeof(off_t));
8392 exit(0);
8393}
Martin v. Löwis11437992002-04-12 09:54:03 +00008394_ACEOF
8395rm -f conftest$ac_exeext
8396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8397 (eval $ac_link) 2>&5
8398 ac_status=$?
8399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8400 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8402 (eval $ac_try) 2>&5
8403 ac_status=$?
8404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8405 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008406 ac_cv_sizeof_off_t=`cat conftestval`
8407else
Martin v. Löwis11437992002-04-12 09:54:03 +00008408 echo "$as_me: program exited with status $ac_status" >&5
8409echo "$as_me: failed program was:" >&5
8410cat conftest.$ac_ext >&5
8411( exit $ac_status )
8412ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008413fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008414rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008415fi
8416
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008417fi
8418
Martin v. Löwis11437992002-04-12 09:54:03 +00008419echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8420echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8421
8422cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008423#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008424_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008425
Michael W. Hudson54241132001-12-07 15:38:26 +00008426
Martin v. Löwis11437992002-04-12 09:54:03 +00008427echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8428echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008429if test "$have_long_long" = yes -a \
8430 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8431 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008432
Martin v. Löwis11437992002-04-12 09:54:03 +00008433cat >>confdefs.h <<\_ACEOF
8434#define HAVE_LARGEFILE_SUPPORT 1
8435_ACEOF
8436
8437 echo "$as_me:$LINENO: result: yes" >&5
8438echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008439else
Martin v. Löwis11437992002-04-12 09:54:03 +00008440 echo "$as_me:$LINENO: result: no" >&5
8441echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008442fi
8443
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008444# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008445echo "$as_me:$LINENO: checking size of time_t" >&5
8446echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8447if test "${ac_cv_sizeof_time_t+set}" = set; then
8448 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008449else
8450 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008451 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008452else
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 cat >conftest.$ac_ext <<_ACEOF
8454#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008455#include "confdefs.h"
8456#include <stdio.h>
8457#include <time.h>
8458main()
8459{
8460 FILE *f=fopen("conftestval", "w");
8461 if (!f) exit(1);
8462 fprintf(f, "%d\n", sizeof(time_t));
8463 exit(0);
8464}
Martin v. Löwis11437992002-04-12 09:54:03 +00008465_ACEOF
8466rm -f conftest$ac_exeext
8467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8468 (eval $ac_link) 2>&5
8469 ac_status=$?
8470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8471 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8473 (eval $ac_try) 2>&5
8474 ac_status=$?
8475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8476 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008477 ac_cv_sizeof_time_t=`cat conftestval`
8478else
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 echo "$as_me: program exited with status $ac_status" >&5
8480echo "$as_me: failed program was:" >&5
8481cat conftest.$ac_ext >&5
8482( exit $ac_status )
8483ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008485rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008486fi
8487
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008488fi
8489
Martin v. Löwis11437992002-04-12 09:54:03 +00008490echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8491echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8492
8493cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008494#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008495_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008496
Michael W. Hudson54241132001-12-07 15:38:26 +00008497
8498
Trent Mick635f6fb2000-08-23 21:33:05 +00008499# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008500ac_save_cc="$CC"
8501if test "$ac_cv_kpthread" = "yes"
8502then CC="$CC -Kpthread"
8503fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008504echo "$as_me:$LINENO: checking for pthread_t" >&5
8505echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008506have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008507cat >conftest.$ac_ext <<_ACEOF
8508#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008509#include "confdefs.h"
8510#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008511#ifdef F77_DUMMY_MAIN
8512# ifdef __cplusplus
8513 extern "C"
8514# endif
8515 int F77_DUMMY_MAIN() { return 1; }
8516#endif
8517int
8518main ()
8519{
Guido van Rossum12580492000-09-24 16:47:19 +00008520pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008521 ;
8522 return 0;
8523}
8524_ACEOF
8525rm -f conftest.$ac_objext
8526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8527 (eval $ac_compile) 2>&5
8528 ac_status=$?
8529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8530 (exit $ac_status); } &&
8531 { ac_try='test -s conftest.$ac_objext'
8532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8533 (eval $ac_try) 2>&5
8534 ac_status=$?
8535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8536 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008537 have_pthread_t=yes
8538else
Martin v. Löwis11437992002-04-12 09:54:03 +00008539 echo "$as_me: failed program was:" >&5
8540cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008541fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008542rm -f conftest.$ac_objext conftest.$ac_ext
8543echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8544echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008545if test "$have_pthread_t" = yes ; then
8546 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8548echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8549 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8550 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008551else
8552 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008553 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008554else
Martin v. Löwis11437992002-04-12 09:54:03 +00008555 cat >conftest.$ac_ext <<_ACEOF
8556#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008557#include "confdefs.h"
8558#include <stdio.h>
8559 #include <pthread.h>
8560 main()
8561 {
8562 FILE *f=fopen("conftestval", "w");
8563 if (!f) exit(1);
8564 fprintf(f, "%d\n", sizeof(pthread_t));
8565 exit(0);
8566 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008567_ACEOF
8568rm -f conftest$ac_exeext
8569if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8570 (eval $ac_link) 2>&5
8571 ac_status=$?
8572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8573 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8575 (eval $ac_try) 2>&5
8576 ac_status=$?
8577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8578 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008579 ac_cv_sizeof_pthread_t=`cat conftestval`
8580else
Martin v. Löwis11437992002-04-12 09:54:03 +00008581 echo "$as_me: program exited with status $ac_status" >&5
8582echo "$as_me: failed program was:" >&5
8583cat conftest.$ac_ext >&5
8584( exit $ac_status )
8585ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008586fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008587rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008588fi
8589
Trent Mick635f6fb2000-08-23 21:33:05 +00008590fi
8591
Martin v. Löwis11437992002-04-12 09:54:03 +00008592 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8593echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8594
8595cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008596#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008597_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008598
8599fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008600CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008601
Martin v. Löwis11437992002-04-12 09:54:03 +00008602echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8603echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008604# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8605if test "${enable_toolbox_glue+set}" = set; then
8606 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008607
Martin v. Löwis11437992002-04-12 09:54:03 +00008608fi;
Jack Jansene578a632001-08-15 01:27:14 +00008609
8610if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008611then
Jack Jansene578a632001-08-15 01:27:14 +00008612 case $ac_sys_system/$ac_sys_release in
8613 Darwin/*)
8614 enable_toolbox_glue="yes";;
8615 *)
8616 enable_toolbox_glue="no";;
8617 esac
8618fi
8619case "$enable_toolbox_glue" in
8620yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008621 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008622 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008623 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008624
8625cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008626#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008627_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008628
8629 ;;
8630*)
8631 extra_frameworks=""
8632 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008633 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008634 ;;
8635esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008636echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8637echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008638
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008639
8640case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008641 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008642 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008643 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8644 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008645 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8646 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008647 Darwin/*)
8648 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008649 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8650 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008651 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8652 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008653esac
8654
Martin v. Löwis11437992002-04-12 09:54:03 +00008655echo "$as_me:$LINENO: checking for --enable-framework" >&5
8656echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008657if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008658then
Jack Jansenca06bc62001-08-03 15:32:23 +00008659 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008660 # -U __environ is needed since bundles don't have access
8661 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008662 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008663 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008664
Jack Jansena3891ea2001-09-07 14:25:12 +00008665 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008666 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8667 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008668 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008669
Martin v. Löwis11437992002-04-12 09:54:03 +00008670cat >>confdefs.h <<\_ACEOF
8671#define WITH_NEXT_FRAMEWORK 1
8672_ACEOF
8673
8674 echo "$as_me:$LINENO: result: yes" >&5
8675echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008676else
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 echo "$as_me:$LINENO: result: no" >&5
8678echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008679fi
8680
Martin v. Löwis11437992002-04-12 09:54:03 +00008681echo "$as_me:$LINENO: checking for dyld" >&5
8682echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008683case $ac_sys_system/$ac_sys_release in
8684 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008685
Martin v. Löwis11437992002-04-12 09:54:03 +00008686cat >>confdefs.h <<\_ACEOF
8687#define WITH_DYLD 1
8688_ACEOF
8689
8690 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8691echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008692 ;;
8693 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 echo "$as_me:$LINENO: result: no" >&5
8695echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008696 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008697esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008698
Guido van Rossum0a516c91994-09-12 10:58:40 +00008699# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008700
Michael W. Hudson54241132001-12-07 15:38:26 +00008701
8702
8703
8704
Guido van Rossum0a516c91994-09-12 10:58:40 +00008705# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008706# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008707echo "$as_me:$LINENO: checking SO" >&5
8708echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008709if test -z "$SO"
8710then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008711 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008712 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008713 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008714 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008715 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008716fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008717echo "$as_me:$LINENO: result: $SO" >&5
8718echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008719# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008720# -- "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 +00008721# (Shared libraries in this instance are shared modules to be loaded into
8722# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008723echo "$as_me:$LINENO: checking LDSHARED" >&5
8724echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008725if test -z "$LDSHARED"
8726then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008727 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008728 AIX*)
8729 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008730 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008731 ;;
8732 BeOS*)
8733 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008734 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008735 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008736 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008737 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008738 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008739 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00008740 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008741 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008742 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00008743 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008744 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008745 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8746 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008747 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008748 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8749 if test "$enable_framework" ; then
8750 # Link against the framework. All externals should be defined.
8751 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8752 else
8753 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008754 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008755 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008756 Darwin/*)
8757 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8758 if test "$enable_framework" ; then
8759 # Link against the framework. All externals should be defined.
8760 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8761 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008762 # No framework, use the Python app as bundle-loader
8763 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8764 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008765 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008766 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008767 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008768 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008769 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008770 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008771 then
8772 LDSHARED="cc -shared ${LDFLAGS}"
8773 else
8774 LDSHARED="ld -Bshareable ${LDFLAGS}"
8775 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008776 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008777 if test "$GCC" = "yes"
8778 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008779 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008780 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008781 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008782 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008783 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008784 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008785 *) LDSHARED="ld";;
8786 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008787fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008788echo "$as_me:$LINENO: result: $LDSHARED" >&5
8789echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008790BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008791# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008792# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008793echo "$as_me:$LINENO: checking CCSHARED" >&5
8794echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008795if test -z "$CCSHARED"
8796then
Guido van Rossum07397971997-04-29 21:49:50 +00008797 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008798 SunOS*) if test "$GCC" = yes;
8799 then CCSHARED="-fPIC";
8800 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008801 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008802 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008803 else CCSHARED="+z";
8804 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008805 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008806 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008807 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008808 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008809 if test "$GCC" = "yes"
8810 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008811 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008812 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008813 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008814 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008815 IRIX*/6*) case $CC in
8816 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008817 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008818 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008819 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008820 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008821 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008822fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008823echo "$as_me:$LINENO: result: $CCSHARED" >&5
8824echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008825# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008826# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008827echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8828echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008829if test -z "$LINKFORSHARED"
8830then
Guido van Rossum07397971997-04-29 21:49:50 +00008831 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008832 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008833 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008834 LINKFORSHARED="-Wl,-E -Wl,+s";;
8835# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008836 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008837 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008838 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008840 # -u __dummy makes the linker aware of the objc runtime
8841 # in System.framework; otherwise, __objcInit (referenced in
8842 # crt1.o) gets erroneously defined as common, which breaks dynamic
8843 # loading of any modules which reference it in System.framework.
8844 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8845 # not used by the core itself but which needs to be in the core so
8846 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008847 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008848 if test "$enable_framework"
8849 then
8850 LINKFORSHARED="$LINKFORSHARED -framework Python"
8851 fi
8852 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008853 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008854 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008855 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008856 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008857 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8858 then
8859 LINKFORSHARED="-Wl,--export-dynamic"
8860 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008861 SunOS/5*) case $CC in
8862 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008863 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008864 then
8865 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008866 fi;;
8867 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008868 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008869fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008870echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8871echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008872
Michael W. Hudson54241132001-12-07 15:38:26 +00008873
Martin v. Löwis11437992002-04-12 09:54:03 +00008874echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8875echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008876if test ! "$LIBRARY" = "$LDLIBRARY"
8877then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008878 case $ac_sys_system in
8879 CYGWIN*)
8880 # Cygwin needs CCSHARED when building extension DLLs
8881 # but not when building the interpreter DLL.
8882 CFLAGSFORSHARED='';;
8883 *)
8884 CFLAGSFORSHARED='$(CCSHARED)'
8885 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008886fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008887echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8888echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008889
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008890# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8891# library (with --enable-shared).
8892# For platforms on which shared libraries are not allowed to have unresolved
8893# symbols, this must be set to $(LIBS) (expanded by make).
8894
8895echo "$as_me:$LINENO: checking SHLIBS" >&5
8896echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
8897case "$ac_sys_system" in
8898 atheos*)
8899 SHLIBS='$(LIBS)';;
8900 *)
8901 SHLIBS='';;
8902esac
8903echo "$as_me:$LINENO: result: $SHLIBS" >&5
8904echo "${ECHO_T}$SHLIBS" >&6
8905
8906
Guido van Rossum627b2d71993-12-24 10:39:16 +00008907# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008908
8909echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8910echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8911if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8912 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008913else
Martin v. Löwis11437992002-04-12 09:54:03 +00008914 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008915LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008916cat >conftest.$ac_ext <<_ACEOF
8917#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008918#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008919
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008920/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008921#ifdef __cplusplus
8922extern "C"
8923#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008924/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008925 builtin and then its argument prototype would still apply. */
8926char dlopen ();
8927#ifdef F77_DUMMY_MAIN
8928# ifdef __cplusplus
8929 extern "C"
8930# endif
8931 int F77_DUMMY_MAIN() { return 1; }
8932#endif
8933int
8934main ()
8935{
8936dlopen ();
8937 ;
8938 return 0;
8939}
8940_ACEOF
8941rm -f conftest.$ac_objext conftest$ac_exeext
8942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8943 (eval $ac_link) 2>&5
8944 ac_status=$?
8945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8946 (exit $ac_status); } &&
8947 { ac_try='test -s conftest$ac_exeext'
8948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8949 (eval $ac_try) 2>&5
8950 ac_status=$?
8951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8952 (exit $ac_status); }; }; then
8953 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008954else
Martin v. Löwis11437992002-04-12 09:54:03 +00008955 echo "$as_me: failed program was:" >&5
8956cat conftest.$ac_ext >&5
8957ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008958fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008959rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8960LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008961fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008962echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8963echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8964if test $ac_cv_lib_dl_dlopen = yes; then
8965 cat >>confdefs.h <<_ACEOF
8966#define HAVE_LIBDL 1
8967_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008968
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008969 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008970
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008971fi
8972 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008973
8974echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8975echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8976if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8977 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008978else
Martin v. Löwis11437992002-04-12 09:54:03 +00008979 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008980LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008981cat >conftest.$ac_ext <<_ACEOF
8982#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008983#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008984
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008985/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008986#ifdef __cplusplus
8987extern "C"
8988#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008989/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008990 builtin and then its argument prototype would still apply. */
8991char shl_load ();
8992#ifdef F77_DUMMY_MAIN
8993# ifdef __cplusplus
8994 extern "C"
8995# endif
8996 int F77_DUMMY_MAIN() { return 1; }
8997#endif
8998int
8999main ()
9000{
9001shl_load ();
9002 ;
9003 return 0;
9004}
9005_ACEOF
9006rm -f conftest.$ac_objext conftest$ac_exeext
9007if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9008 (eval $ac_link) 2>&5
9009 ac_status=$?
9010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9011 (exit $ac_status); } &&
9012 { ac_try='test -s conftest$ac_exeext'
9013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9014 (eval $ac_try) 2>&5
9015 ac_status=$?
9016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9017 (exit $ac_status); }; }; then
9018 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009019else
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 echo "$as_me: failed program was:" >&5
9021cat conftest.$ac_ext >&5
9022ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009023fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009024rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9025LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009026fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009027echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9028echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9029if test $ac_cv_lib_dld_shl_load = yes; then
9030 cat >>confdefs.h <<_ACEOF
9031#define HAVE_LIBDLD 1
9032_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009033
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009034 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009036fi
9037 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009038
9039echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9040echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9041if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9042 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009043else
Martin v. Löwis11437992002-04-12 09:54:03 +00009044 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009045LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009046cat >conftest.$ac_ext <<_ACEOF
9047#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009048#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009049
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009050/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009051#ifdef __cplusplus
9052extern "C"
9053#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009054/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009055 builtin and then its argument prototype would still apply. */
9056char sem_init ();
9057#ifdef F77_DUMMY_MAIN
9058# ifdef __cplusplus
9059 extern "C"
9060# endif
9061 int F77_DUMMY_MAIN() { return 1; }
9062#endif
9063int
9064main ()
9065{
9066sem_init ();
9067 ;
9068 return 0;
9069}
9070_ACEOF
9071rm -f conftest.$ac_objext conftest$ac_exeext
9072if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9073 (eval $ac_link) 2>&5
9074 ac_status=$?
9075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9076 (exit $ac_status); } &&
9077 { ac_try='test -s conftest$ac_exeext'
9078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9079 (eval $ac_try) 2>&5
9080 ac_status=$?
9081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9082 (exit $ac_status); }; }; then
9083 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009084else
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 echo "$as_me: failed program was:" >&5
9086cat conftest.$ac_ext >&5
9087ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009088fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009089rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9090LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009091fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009092echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9093echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9094if test $ac_cv_lib_rt_sem_init = yes; then
9095 cat >>confdefs.h <<_ACEOF
9096#define HAVE_LIBRT 1
9097_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009098
9099 LIBS="-lrt $LIBS"
9100
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009101fi
9102 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009103
9104# checks for system dependent C++ extensions support
9105case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9107echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9108 cat >conftest.$ac_ext <<_ACEOF
9109#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009110#include "confdefs.h"
9111#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009112#ifdef F77_DUMMY_MAIN
9113# ifdef __cplusplus
9114 extern "C"
9115# endif
9116 int F77_DUMMY_MAIN() { return 1; }
9117#endif
9118int
9119main ()
9120{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009121loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009122 ;
9123 return 0;
9124}
9125_ACEOF
9126rm -f conftest.$ac_objext conftest$ac_exeext
9127if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9128 (eval $ac_link) 2>&5
9129 ac_status=$?
9130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9131 (exit $ac_status); } &&
9132 { ac_try='test -s conftest$ac_exeext'
9133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9134 (eval $ac_try) 2>&5
9135 ac_status=$?
9136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9137 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009138
Martin v. Löwis11437992002-04-12 09:54:03 +00009139cat >>confdefs.h <<\_ACEOF
9140#define AIX_GENUINE_CPLUSPLUS 1
9141_ACEOF
9142
9143 echo "$as_me:$LINENO: result: yes" >&5
9144echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009145else
Martin v. Löwis11437992002-04-12 09:54:03 +00009146 echo "$as_me: failed program was:" >&5
9147cat conftest.$ac_ext >&5
9148echo "$as_me:$LINENO: result: no" >&5
9149echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009151rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009152 *) ;;
9153esac
9154
Guido van Rossum70c7f481998-03-26 18:44:10 +00009155# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9156# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009157# BeOS' sockets are stashed in libnet.
9158case "$ac_sys_system" in
9159IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009160*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009161echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9162echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9163if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9164 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009165else
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009167LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009168cat >conftest.$ac_ext <<_ACEOF
9169#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009170#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009171
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009172/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009173#ifdef __cplusplus
9174extern "C"
9175#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009176/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 builtin and then its argument prototype would still apply. */
9178char t_open ();
9179#ifdef F77_DUMMY_MAIN
9180# ifdef __cplusplus
9181 extern "C"
9182# endif
9183 int F77_DUMMY_MAIN() { return 1; }
9184#endif
9185int
9186main ()
9187{
9188t_open ();
9189 ;
9190 return 0;
9191}
9192_ACEOF
9193rm -f conftest.$ac_objext conftest$ac_exeext
9194if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9195 (eval $ac_link) 2>&5
9196 ac_status=$?
9197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9198 (exit $ac_status); } &&
9199 { ac_try='test -s conftest$ac_exeext'
9200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9201 (eval $ac_try) 2>&5
9202 ac_status=$?
9203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9204 (exit $ac_status); }; }; then
9205 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009206else
Martin v. Löwis11437992002-04-12 09:54:03 +00009207 echo "$as_me: failed program was:" >&5
9208cat conftest.$ac_ext >&5
9209ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009210fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009211rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9212LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009213fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009214echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9215echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9216if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009217 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009218fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009219 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009220echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9221echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9222if test "${ac_cv_lib_socket_socket+set}" = set; then
9223 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009224else
Martin v. Löwis11437992002-04-12 09:54:03 +00009225 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009226LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009227cat >conftest.$ac_ext <<_ACEOF
9228#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009229#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009230
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009231/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009232#ifdef __cplusplus
9233extern "C"
9234#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009235/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009236 builtin and then its argument prototype would still apply. */
9237char socket ();
9238#ifdef F77_DUMMY_MAIN
9239# ifdef __cplusplus
9240 extern "C"
9241# endif
9242 int F77_DUMMY_MAIN() { return 1; }
9243#endif
9244int
9245main ()
9246{
9247socket ();
9248 ;
9249 return 0;
9250}
9251_ACEOF
9252rm -f conftest.$ac_objext conftest$ac_exeext
9253if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9254 (eval $ac_link) 2>&5
9255 ac_status=$?
9256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9257 (exit $ac_status); } &&
9258 { ac_try='test -s conftest$ac_exeext'
9259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9260 (eval $ac_try) 2>&5
9261 ac_status=$?
9262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9263 (exit $ac_status); }; }; then
9264 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009265else
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 echo "$as_me: failed program was:" >&5
9267cat conftest.$ac_ext >&5
9268ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009269fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009270rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9271LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009272fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009273echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9274echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9275if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009276 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009277fi
9278 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009279;;
9280esac
9281case "$ac_sys_system" in
9282BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009283echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9284echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9285if test "${ac_cv_lib_net_socket+set}" = set; then
9286 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009287else
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009289LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009290cat >conftest.$ac_ext <<_ACEOF
9291#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009292#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009293
Guido van Rossumad678af1998-10-02 14:42:15 +00009294/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009295#ifdef __cplusplus
9296extern "C"
9297#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009298/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009299 builtin and then its argument prototype would still apply. */
9300char socket ();
9301#ifdef F77_DUMMY_MAIN
9302# ifdef __cplusplus
9303 extern "C"
9304# endif
9305 int F77_DUMMY_MAIN() { return 1; }
9306#endif
9307int
9308main ()
9309{
9310socket ();
9311 ;
9312 return 0;
9313}
9314_ACEOF
9315rm -f conftest.$ac_objext conftest$ac_exeext
9316if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9317 (eval $ac_link) 2>&5
9318 ac_status=$?
9319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9320 (exit $ac_status); } &&
9321 { ac_try='test -s conftest$ac_exeext'
9322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9323 (eval $ac_try) 2>&5
9324 ac_status=$?
9325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9326 (exit $ac_status); }; }; then
9327 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009328else
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 echo "$as_me: failed program was:" >&5
9330cat conftest.$ac_ext >&5
9331ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009332fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009333rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9334LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009335fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009336echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9337echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9338if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009339 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009340fi
9341 # BeOS
9342;;
9343esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009344
Martin v. Löwis11437992002-04-12 09:54:03 +00009345echo "$as_me:$LINENO: checking for --with-libs" >&5
9346echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9347
Guido van Rossuma68acba1996-07-31 17:36:39 +00009348# Check whether --with-libs or --without-libs was given.
9349if test "${with_libs+set}" = set; then
9350 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009351
9352echo "$as_me:$LINENO: result: $withval" >&5
9353echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009354LIBS="$withval $LIBS"
9355
9356else
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 echo "$as_me:$LINENO: result: no" >&5
9358echo "${ECHO_T}no" >&6
9359fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009360
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009361# Determine if signalmodule should be used.
9362
9363
Martin v. Löwis11437992002-04-12 09:54:03 +00009364echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9365echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9366
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009367# Check whether --with-signal-module or --without-signal-module was given.
9368if test "${with_signal_module+set}" = set; then
9369 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009370
Martin v. Löwis11437992002-04-12 09:54:03 +00009371fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009372
9373if test -z "$with_signal_module"
9374then with_signal_module="yes"
9375fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009376echo "$as_me:$LINENO: result: $with_signal_module" >&5
9377echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009378
9379if test "${with_signal_module}" = "yes"; then
9380 USE_SIGNAL_MODULE=""
9381 SIGNAL_OBJS=""
9382else
9383 USE_SIGNAL_MODULE="#"
9384 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9385fi
9386
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009387# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009388
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009389USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009390
Martin v. Löwis11437992002-04-12 09:54:03 +00009391echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9392echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9393
Guido van Rossumec2f0731997-01-22 20:54:01 +00009394
9395# Check whether --with-dec-threads or --without-dec-threads was given.
9396if test "${with_dec_threads+set}" = set; then
9397 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009398
9399echo "$as_me:$LINENO: result: $withval" >&5
9400echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009401LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009402if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009403 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009404fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009405else
Martin v. Löwis11437992002-04-12 09:54:03 +00009406 echo "$as_me:$LINENO: result: no" >&5
9407echo "${ECHO_T}no" >&6
9408fi;
9409
9410# Templates for things AC_DEFINEd more than once.
9411# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009412
9413
Martin v. Löwis11437992002-04-12 09:54:03 +00009414
9415
9416
9417
9418
9419echo "$as_me:$LINENO: checking for --with-threads" >&5
9420echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9421
Guido van Rossumec2f0731997-01-22 20:54:01 +00009422# Check whether --with-threads or --without-threads was given.
9423if test "${with_threads+set}" = set; then
9424 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009425
Martin v. Löwis11437992002-04-12 09:54:03 +00009426fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009427
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009428# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009429
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009430# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009431if test "${with_thread+set}" = set; then
9432 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009433
Martin v. Löwis11437992002-04-12 09:54:03 +00009434with_threads=$with_thread
9435fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009436
9437if test -z "$with_threads"
9438then with_threads="yes"
9439fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009440echo "$as_me:$LINENO: result: $with_threads" >&5
9441echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009442
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009443
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009444if test "$with_threads" = "no"
9445then
9446 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009447elif test "$ac_cv_pthread_is_default" = yes
9448then
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009450#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009451_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009452
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009453 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009455#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009456_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009457
9458 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009460elif test "$ac_cv_kpthread" = "yes"
9461then
9462 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009464#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009465_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009466
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009467 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009468 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009469else
9470 if test ! -z "$with_threads" -a -d "$with_threads"
9471 then LDFLAGS="$LDFLAGS -L$with_threads"
9472 fi
9473 if test ! -z "$withval" -a -d "$withval"
9474 then LDFLAGS="$LDFLAGS -L$withval"
9475 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009476
9477 # According to the POSIX spec, a pthreads implementation must
9478 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9480echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9481 cat >conftest.$ac_ext <<_ACEOF
9482#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009483#include "confdefs.h"
9484#include <unistd.h>
9485 #ifdef _POSIX_THREADS
9486 yes
9487 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009488
9489_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9491 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009492 unistd_defines_pthreads=yes
9493else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009494 unistd_defines_pthreads=no
9495fi
9496rm -f conftest*
9497
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9499echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009500
Martin v. Löwis11437992002-04-12 09:54:03 +00009501 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009502#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009503_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009504
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 if test "${ac_cv_header_cthreads_h+set}" = set; then
9506 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9507echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9508if test "${ac_cv_header_cthreads_h+set}" = set; then
9509 echo $ECHO_N "(cached) $ECHO_C" >&6
9510fi
9511echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9512echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009513else
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 # Is the header compilable?
9515echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9516echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9517cat >conftest.$ac_ext <<_ACEOF
9518#line $LINENO "configure"
9519#include "confdefs.h"
9520$ac_includes_default
9521#include <cthreads.h>
9522_ACEOF
9523rm -f conftest.$ac_objext
9524if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9525 (eval $ac_compile) 2>&5
9526 ac_status=$?
9527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9528 (exit $ac_status); } &&
9529 { ac_try='test -s conftest.$ac_objext'
9530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9531 (eval $ac_try) 2>&5
9532 ac_status=$?
9533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9534 (exit $ac_status); }; }; then
9535 ac_header_compiler=yes
9536else
9537 echo "$as_me: failed program was:" >&5
9538cat conftest.$ac_ext >&5
9539ac_header_compiler=no
9540fi
9541rm -f conftest.$ac_objext conftest.$ac_ext
9542echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9543echo "${ECHO_T}$ac_header_compiler" >&6
9544
9545# Is the header present?
9546echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9547echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9548cat >conftest.$ac_ext <<_ACEOF
9549#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009550#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009551#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009552_ACEOF
9553if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9554 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9555 ac_status=$?
9556 egrep -v '^ *\+' conftest.er1 >conftest.err
9557 rm -f conftest.er1
9558 cat conftest.err >&5
9559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9560 (exit $ac_status); } >/dev/null; then
9561 if test -s conftest.err; then
9562 ac_cpp_err=$ac_c_preproc_warn_flag
9563 else
9564 ac_cpp_err=
9565 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009566else
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 ac_cpp_err=yes
9568fi
9569if test -z "$ac_cpp_err"; then
9570 ac_header_preproc=yes
9571else
9572 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009573 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009574 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009575fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009576rm -f conftest.err conftest.$ac_ext
9577echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9578echo "${ECHO_T}$ac_header_preproc" >&6
9579
9580# So? What about this header?
9581case $ac_header_compiler:$ac_header_preproc in
9582 yes:no )
9583 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9584echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9585 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9586echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9587 no:yes )
9588 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9589echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9590 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9591echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9592 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9593echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9594esac
9595echo "$as_me:$LINENO: checking for cthreads.h" >&5
9596echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9597if test "${ac_cv_header_cthreads_h+set}" = set; then
9598 echo $ECHO_N "(cached) $ECHO_C" >&6
9599else
9600 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009601fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009602echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9603echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9604
9605fi
9606if test $ac_cv_header_cthreads_h = yes; then
9607 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009608#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009609_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009610
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009612#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009613_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009614
Martin v. Löwis11437992002-04-12 09:54:03 +00009615
9616cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009617#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009618_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009619
9620 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009621 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009622else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009623
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9625 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9626echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9627if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9628 echo $ECHO_N "(cached) $ECHO_C" >&6
9629fi
9630echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9631echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009632else
Martin v. Löwis11437992002-04-12 09:54:03 +00009633 # Is the header compilable?
9634echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9635echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9636cat >conftest.$ac_ext <<_ACEOF
9637#line $LINENO "configure"
9638#include "confdefs.h"
9639$ac_includes_default
9640#include <mach/cthreads.h>
9641_ACEOF
9642rm -f conftest.$ac_objext
9643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9644 (eval $ac_compile) 2>&5
9645 ac_status=$?
9646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9647 (exit $ac_status); } &&
9648 { ac_try='test -s conftest.$ac_objext'
9649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9650 (eval $ac_try) 2>&5
9651 ac_status=$?
9652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9653 (exit $ac_status); }; }; then
9654 ac_header_compiler=yes
9655else
9656 echo "$as_me: failed program was:" >&5
9657cat conftest.$ac_ext >&5
9658ac_header_compiler=no
9659fi
9660rm -f conftest.$ac_objext conftest.$ac_ext
9661echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9662echo "${ECHO_T}$ac_header_compiler" >&6
9663
9664# Is the header present?
9665echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9666echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9667cat >conftest.$ac_ext <<_ACEOF
9668#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009669#include "confdefs.h"
9670#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009671_ACEOF
9672if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9673 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9674 ac_status=$?
9675 egrep -v '^ *\+' conftest.er1 >conftest.err
9676 rm -f conftest.er1
9677 cat conftest.err >&5
9678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9679 (exit $ac_status); } >/dev/null; then
9680 if test -s conftest.err; then
9681 ac_cpp_err=$ac_c_preproc_warn_flag
9682 else
9683 ac_cpp_err=
9684 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009685else
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 ac_cpp_err=yes
9687fi
9688if test -z "$ac_cpp_err"; then
9689 ac_header_preproc=yes
9690else
9691 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009692 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009694fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009695rm -f conftest.err conftest.$ac_ext
9696echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9697echo "${ECHO_T}$ac_header_preproc" >&6
9698
9699# So? What about this header?
9700case $ac_header_compiler:$ac_header_preproc in
9701 yes:no )
9702 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9703echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9704 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9705echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9706 no:yes )
9707 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9708echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9709 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9710echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9711 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9712echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9713esac
9714echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9715echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9716if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9717 echo $ECHO_N "(cached) $ECHO_C" >&6
9718else
9719 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009720fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009721echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9722echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9723
9724fi
9725if test $ac_cv_header_mach_cthreads_h = yes; then
9726 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009727#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009728_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009729
Martin v. Löwis11437992002-04-12 09:54:03 +00009730 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009731#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009732_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009733
Martin v. Löwis11437992002-04-12 09:54:03 +00009734
9735cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009736#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009737_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009738
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009739 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009740else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009741
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 echo "$as_me:$LINENO: checking for --with-pth" >&5
9743echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9744
9745# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009746if test "${with_pth+set}" = set; then
9747 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009748
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 echo "$as_me:$LINENO: result: $withval" >&5
9750echo "${ECHO_T}$withval" >&6
9751 cat >>confdefs.h <<\_ACEOF
9752#define WITH_THREAD 1
9753_ACEOF
9754
9755
9756cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009757#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009758_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009759
Martin v. Löwis130fb172001-07-19 11:00:41 +00009760 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009761 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009762else
Martin v. Löwis11437992002-04-12 09:54:03 +00009763
9764 echo "$as_me:$LINENO: result: no" >&5
9765echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009766
9767 # Just looking for pthread_create in libpthread is not enough:
9768 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9769 # So we really have to include pthread.h, and then link.
9770 _libs=$LIBS
9771 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9773echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9774 cat >conftest.$ac_ext <<_ACEOF
9775#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009776#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009777#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009778
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009779void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009780#ifdef F77_DUMMY_MAIN
9781# ifdef __cplusplus
9782 extern "C"
9783# endif
9784 int F77_DUMMY_MAIN() { return 1; }
9785#endif
9786int
9787main ()
9788{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009789
9790pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 ;
9792 return 0;
9793}
9794_ACEOF
9795rm -f conftest.$ac_objext conftest$ac_exeext
9796if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9797 (eval $ac_link) 2>&5
9798 ac_status=$?
9799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9800 (exit $ac_status); } &&
9801 { ac_try='test -s conftest$ac_exeext'
9802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9803 (eval $ac_try) 2>&5
9804 ac_status=$?
9805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9806 (exit $ac_status); }; }; then
9807
9808 echo "$as_me:$LINENO: result: yes" >&5
9809echo "${ECHO_T}yes" >&6
9810 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009811#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009812_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009813
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009814 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009815 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009816else
Martin v. Löwis11437992002-04-12 09:54:03 +00009817 echo "$as_me: failed program was:" >&5
9818cat conftest.$ac_ext >&5
9819
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009820 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9822echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9823if test "${ac_cv_func_pthread_detach+set}" = set; then
9824 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009825else
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 cat >conftest.$ac_ext <<_ACEOF
9827#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009828#include "confdefs.h"
9829/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009831#include <assert.h>
9832/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009833#ifdef __cplusplus
9834extern "C"
9835#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009836/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 builtin and then its argument prototype would still apply. */
9838char pthread_detach ();
9839char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009840
Martin v. Löwis11437992002-04-12 09:54:03 +00009841#ifdef F77_DUMMY_MAIN
9842# ifdef __cplusplus
9843 extern "C"
9844# endif
9845 int F77_DUMMY_MAIN() { return 1; }
9846#endif
9847int
9848main ()
9849{
Guido van Rossumad678af1998-10-02 14:42:15 +00009850/* The GNU C library defines this for functions which it implements
9851 to always fail with ENOSYS. Some functions are actually named
9852 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009853#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009854choke me
9855#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009856f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009857#endif
9858
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 ;
9860 return 0;
9861}
9862_ACEOF
9863rm -f conftest.$ac_objext conftest$ac_exeext
9864if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9865 (eval $ac_link) 2>&5
9866 ac_status=$?
9867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9868 (exit $ac_status); } &&
9869 { ac_try='test -s conftest$ac_exeext'
9870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9871 (eval $ac_try) 2>&5
9872 ac_status=$?
9873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9874 (exit $ac_status); }; }; then
9875 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009876else
Martin v. Löwis11437992002-04-12 09:54:03 +00009877 echo "$as_me: failed program was:" >&5
9878cat conftest.$ac_ext >&5
9879ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009880fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009881rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009882fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009883echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9884echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9885if test $ac_cv_func_pthread_detach = yes; then
9886 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009887#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009888_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009889
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009890 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009891 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009892else
Guido van Rossumad678af1998-10-02 14:42:15 +00009893
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009894 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9895 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9896echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9897if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9898 echo $ECHO_N "(cached) $ECHO_C" >&6
9899fi
9900echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9901echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9902else
9903 # Is the header compilable?
9904echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
9905echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
9906cat >conftest.$ac_ext <<_ACEOF
9907#line $LINENO "configure"
9908#include "confdefs.h"
9909$ac_includes_default
9910#include <atheos/threads.h>
9911_ACEOF
9912rm -f conftest.$ac_objext
9913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9914 (eval $ac_compile) 2>&5
9915 ac_status=$?
9916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9917 (exit $ac_status); } &&
9918 { ac_try='test -s conftest.$ac_objext'
9919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9920 (eval $ac_try) 2>&5
9921 ac_status=$?
9922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9923 (exit $ac_status); }; }; then
9924 ac_header_compiler=yes
9925else
9926 echo "$as_me: failed program was:" >&5
9927cat conftest.$ac_ext >&5
9928ac_header_compiler=no
9929fi
9930rm -f conftest.$ac_objext conftest.$ac_ext
9931echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9932echo "${ECHO_T}$ac_header_compiler" >&6
9933
9934# Is the header present?
9935echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
9936echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
9937cat >conftest.$ac_ext <<_ACEOF
9938#line $LINENO "configure"
9939#include "confdefs.h"
9940#include <atheos/threads.h>
9941_ACEOF
9942if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9943 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9944 ac_status=$?
9945 egrep -v '^ *\+' conftest.er1 >conftest.err
9946 rm -f conftest.er1
9947 cat conftest.err >&5
9948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9949 (exit $ac_status); } >/dev/null; then
9950 if test -s conftest.err; then
9951 ac_cpp_err=$ac_c_preproc_warn_flag
9952 else
9953 ac_cpp_err=
9954 fi
9955else
9956 ac_cpp_err=yes
9957fi
9958if test -z "$ac_cpp_err"; then
9959 ac_header_preproc=yes
9960else
9961 echo "$as_me: failed program was:" >&5
9962 cat conftest.$ac_ext >&5
9963 ac_header_preproc=no
9964fi
9965rm -f conftest.err conftest.$ac_ext
9966echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9967echo "${ECHO_T}$ac_header_preproc" >&6
9968
9969# So? What about this header?
9970case $ac_header_compiler:$ac_header_preproc in
9971 yes:no )
9972 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9973echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9974 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9975echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9976 no:yes )
9977 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
9978echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
9979 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
9980echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
9981 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9982echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9983esac
9984echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9985echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9986if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9987 echo $ECHO_N "(cached) $ECHO_C" >&6
9988else
9989 ac_cv_header_atheos_threads_h=$ac_header_preproc
9990fi
9991echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9992echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9993
9994fi
9995if test $ac_cv_header_atheos_threads_h = yes; then
9996 cat >>confdefs.h <<\_ACEOF
9997#define WITH_THREAD 1
9998_ACEOF
9999
10000
10001cat >>confdefs.h <<\_ACEOF
10002#define ATHEOS_THREADS 1
10003_ACEOF
10004
10005 THREADOBJ="Python/thread.o"
10006else
10007
Martin v. Löwis11437992002-04-12 09:54:03 +000010008 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10009 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10010echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10011if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10012 echo $ECHO_N "(cached) $ECHO_C" >&6
10013fi
10014echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10015echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010016else
Martin v. Löwis11437992002-04-12 09:54:03 +000010017 # Is the header compilable?
10018echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10019echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10020cat >conftest.$ac_ext <<_ACEOF
10021#line $LINENO "configure"
10022#include "confdefs.h"
10023$ac_includes_default
10024#include <kernel/OS.h>
10025_ACEOF
10026rm -f conftest.$ac_objext
10027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10028 (eval $ac_compile) 2>&5
10029 ac_status=$?
10030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10031 (exit $ac_status); } &&
10032 { ac_try='test -s conftest.$ac_objext'
10033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10034 (eval $ac_try) 2>&5
10035 ac_status=$?
10036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10037 (exit $ac_status); }; }; then
10038 ac_header_compiler=yes
10039else
10040 echo "$as_me: failed program was:" >&5
10041cat conftest.$ac_ext >&5
10042ac_header_compiler=no
10043fi
10044rm -f conftest.$ac_objext conftest.$ac_ext
10045echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10046echo "${ECHO_T}$ac_header_compiler" >&6
10047
10048# Is the header present?
10049echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10050echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10051cat >conftest.$ac_ext <<_ACEOF
10052#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010053#include "confdefs.h"
10054#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010055_ACEOF
10056if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10057 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10058 ac_status=$?
10059 egrep -v '^ *\+' conftest.er1 >conftest.err
10060 rm -f conftest.er1
10061 cat conftest.err >&5
10062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10063 (exit $ac_status); } >/dev/null; then
10064 if test -s conftest.err; then
10065 ac_cpp_err=$ac_c_preproc_warn_flag
10066 else
10067 ac_cpp_err=
10068 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010069else
Martin v. Löwis11437992002-04-12 09:54:03 +000010070 ac_cpp_err=yes
10071fi
10072if test -z "$ac_cpp_err"; then
10073 ac_header_preproc=yes
10074else
10075 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010076 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010077 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010079rm -f conftest.err conftest.$ac_ext
10080echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10081echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010082
Martin v. Löwis11437992002-04-12 09:54:03 +000010083# So? What about this header?
10084case $ac_header_compiler:$ac_header_preproc in
10085 yes:no )
10086 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10087echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10088 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10089echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10090 no:yes )
10091 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10092echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10093 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10094echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10095 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10096echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10097esac
10098echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10099echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10100if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10101 echo $ECHO_N "(cached) $ECHO_C" >&6
10102else
10103 ac_cv_header_kernel_OS_h=$ac_header_preproc
10104fi
10105echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10106echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10107
10108fi
10109if test $ac_cv_header_kernel_OS_h = yes; then
10110 cat >>confdefs.h <<\_ACEOF
10111#define WITH_THREAD 1
10112_ACEOF
10113
10114
10115cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010116#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010117_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010118
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010119 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010120else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010121
Martin v. Löwis11437992002-04-12 09:54:03 +000010122 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10123echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10124if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10125 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010126else
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010128LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010129cat >conftest.$ac_ext <<_ACEOF
10130#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010131#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010132
Greg Steinadf63d62000-07-05 10:38:09 +000010133/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010134#ifdef __cplusplus
10135extern "C"
10136#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010137/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010138 builtin and then its argument prototype would still apply. */
10139char pthread_create ();
10140#ifdef F77_DUMMY_MAIN
10141# ifdef __cplusplus
10142 extern "C"
10143# endif
10144 int F77_DUMMY_MAIN() { return 1; }
10145#endif
10146int
10147main ()
10148{
10149pthread_create ();
10150 ;
10151 return 0;
10152}
10153_ACEOF
10154rm -f conftest.$ac_objext conftest$ac_exeext
10155if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10156 (eval $ac_link) 2>&5
10157 ac_status=$?
10158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10159 (exit $ac_status); } &&
10160 { ac_try='test -s conftest$ac_exeext'
10161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10162 (eval $ac_try) 2>&5
10163 ac_status=$?
10164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10165 (exit $ac_status); }; }; then
10166 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010167else
Martin v. Löwis11437992002-04-12 09:54:03 +000010168 echo "$as_me: failed program was:" >&5
10169cat conftest.$ac_ext >&5
10170ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010171fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010172rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10173LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010175echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10176echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10177if test $ac_cv_lib_pthreads_pthread_create = yes; then
10178 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010179#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010180_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010181
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010182 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010183 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010184 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010185else
Greg Steinadf63d62000-07-05 10:38:09 +000010186
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10188echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10189if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10190 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010191else
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010193LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010194cat >conftest.$ac_ext <<_ACEOF
10195#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010196#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010197
Guido van Rossum49545951997-12-02 19:28:29 +000010198/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010199#ifdef __cplusplus
10200extern "C"
10201#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010202/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010203 builtin and then its argument prototype would still apply. */
10204char pthread_create ();
10205#ifdef F77_DUMMY_MAIN
10206# ifdef __cplusplus
10207 extern "C"
10208# endif
10209 int F77_DUMMY_MAIN() { return 1; }
10210#endif
10211int
10212main ()
10213{
10214pthread_create ();
10215 ;
10216 return 0;
10217}
10218_ACEOF
10219rm -f conftest.$ac_objext conftest$ac_exeext
10220if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10221 (eval $ac_link) 2>&5
10222 ac_status=$?
10223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10224 (exit $ac_status); } &&
10225 { ac_try='test -s conftest$ac_exeext'
10226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10227 (eval $ac_try) 2>&5
10228 ac_status=$?
10229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10230 (exit $ac_status); }; }; then
10231 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010232else
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 echo "$as_me: failed program was:" >&5
10234cat conftest.$ac_ext >&5
10235ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010236fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010237rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10238LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010239fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010240echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10241echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10242if test $ac_cv_lib_c_r_pthread_create = yes; then
10243 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010244#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010245_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010246
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010247 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010248 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010249 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010250else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010251
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10253echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10254if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10255 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010256else
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010258LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010259cat >conftest.$ac_ext <<_ACEOF
10260#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010261#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010262
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010263/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010264#ifdef __cplusplus
10265extern "C"
10266#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010267/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 builtin and then its argument prototype would still apply. */
10269char __d6_pthread_create ();
10270#ifdef F77_DUMMY_MAIN
10271# ifdef __cplusplus
10272 extern "C"
10273# endif
10274 int F77_DUMMY_MAIN() { return 1; }
10275#endif
10276int
10277main ()
10278{
10279__d6_pthread_create ();
10280 ;
10281 return 0;
10282}
10283_ACEOF
10284rm -f conftest.$ac_objext conftest$ac_exeext
10285if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10286 (eval $ac_link) 2>&5
10287 ac_status=$?
10288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10289 (exit $ac_status); } &&
10290 { ac_try='test -s conftest$ac_exeext'
10291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10292 (eval $ac_try) 2>&5
10293 ac_status=$?
10294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10295 (exit $ac_status); }; }; then
10296 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010297else
Martin v. Löwis11437992002-04-12 09:54:03 +000010298 echo "$as_me: failed program was:" >&5
10299cat conftest.$ac_ext >&5
10300ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010301fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010302rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10303LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010304fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010305echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10306echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10307if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10308 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010309#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010310_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010311
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010312 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010313 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010314 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010315else
Guido van Rossum49545951997-12-02 19:28:29 +000010316
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10318echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10319if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10320 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010321else
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010323LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010324cat >conftest.$ac_ext <<_ACEOF
10325#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010326#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010327
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010328/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010329#ifdef __cplusplus
10330extern "C"
10331#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010332/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010333 builtin and then its argument prototype would still apply. */
10334char __pthread_create_system ();
10335#ifdef F77_DUMMY_MAIN
10336# ifdef __cplusplus
10337 extern "C"
10338# endif
10339 int F77_DUMMY_MAIN() { return 1; }
10340#endif
10341int
10342main ()
10343{
10344__pthread_create_system ();
10345 ;
10346 return 0;
10347}
10348_ACEOF
10349rm -f conftest.$ac_objext conftest$ac_exeext
10350if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10351 (eval $ac_link) 2>&5
10352 ac_status=$?
10353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10354 (exit $ac_status); } &&
10355 { ac_try='test -s conftest$ac_exeext'
10356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10357 (eval $ac_try) 2>&5
10358 ac_status=$?
10359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10360 (exit $ac_status); }; }; then
10361 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010362else
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 echo "$as_me: failed program was:" >&5
10364cat conftest.$ac_ext >&5
10365ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010367rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10368LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010370echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10371echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10372if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10373 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010374#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010375_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010376
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010377 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010378 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010379 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010380else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010381
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10383echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10384if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10385 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010386else
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010388LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010389cat >conftest.$ac_ext <<_ACEOF
10390#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010391#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010392
Guido van Rossumb93a8621998-05-07 13:27:32 +000010393/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010394#ifdef __cplusplus
10395extern "C"
10396#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010397/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 builtin and then its argument prototype would still apply. */
10399char pthread_create ();
10400#ifdef F77_DUMMY_MAIN
10401# ifdef __cplusplus
10402 extern "C"
10403# endif
10404 int F77_DUMMY_MAIN() { return 1; }
10405#endif
10406int
10407main ()
10408{
10409pthread_create ();
10410 ;
10411 return 0;
10412}
10413_ACEOF
10414rm -f conftest.$ac_objext conftest$ac_exeext
10415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10416 (eval $ac_link) 2>&5
10417 ac_status=$?
10418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10419 (exit $ac_status); } &&
10420 { ac_try='test -s conftest$ac_exeext'
10421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10422 (eval $ac_try) 2>&5
10423 ac_status=$?
10424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10425 (exit $ac_status); }; }; then
10426 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010427else
Martin v. Löwis11437992002-04-12 09:54:03 +000010428 echo "$as_me: failed program was:" >&5
10429cat conftest.$ac_ext >&5
10430ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10433LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010435echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10436echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10437if test $ac_cv_lib_cma_pthread_create = yes; then
10438 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010439#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010440_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010441
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010442 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010443 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010444 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010445else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010446
Martin v. Löwis130fb172001-07-19 11:00:41 +000010447 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010448fi
10449
Guido van Rossum627b2d71993-12-24 10:39:16 +000010450
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010451fi
10452
Guido van Rossum0be3e491997-05-22 20:33:33 +000010453fi
10454
Guido van Rossum49545951997-12-02 19:28:29 +000010455fi
10456
Guido van Rossumb93a8621998-05-07 13:27:32 +000010457fi
10458
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010459fi
10460
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010461
Michael W. Hudson54241132001-12-07 15:38:26 +000010462fi
10463
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010464
10465fi
10466
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010468rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10469fi;
10470fi
10471
10472
10473fi
10474
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010475
Michael W. Hudson54241132001-12-07 15:38:26 +000010476
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010477 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010478 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010479
10480cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010481#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010482_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010483
10484 fi
10485
Martin v. Löwis11437992002-04-12 09:54:03 +000010486 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10487echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10488 if test "${ac_cv_pthread_system_supported+set}" = set; then
10489 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010490else
10491 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010492 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010493else
Martin v. Löwis11437992002-04-12 09:54:03 +000010494 cat >conftest.$ac_ext <<_ACEOF
10495#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010496#include "confdefs.h"
10497#include <pthread.h>
10498 void *foo(void *parm) {
10499 return NULL;
10500 }
10501 main() {
10502 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010503 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010504 if (pthread_attr_init(&attr)) exit(-1);
10505 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010506 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010507 exit(0);
10508 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010509_ACEOF
10510rm -f conftest$ac_exeext
10511if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10512 (eval $ac_link) 2>&5
10513 ac_status=$?
10514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10517 (eval $ac_try) 2>&5
10518 ac_status=$?
10519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10520 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010521 ac_cv_pthread_system_supported=yes
10522else
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 echo "$as_me: program exited with status $ac_status" >&5
10524echo "$as_me: failed program was:" >&5
10525cat conftest.$ac_ext >&5
10526( exit $ac_status )
10527ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010528fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010529rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010530fi
10531
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010532fi
10533
Martin v. Löwis11437992002-04-12 09:54:03 +000010534 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10535echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010536 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010537
10538cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010539#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010540_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010541
10542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010543
10544for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010545do
Martin v. Löwis11437992002-04-12 09:54:03 +000010546as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10547echo "$as_me:$LINENO: checking for $ac_func" >&5
10548echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10549if eval "test \"\${$as_ac_var+set}\" = set"; then
10550 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010551else
Martin v. Löwis11437992002-04-12 09:54:03 +000010552 cat >conftest.$ac_ext <<_ACEOF
10553#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010554#include "confdefs.h"
10555/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010556 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010557#include <assert.h>
10558/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010559#ifdef __cplusplus
10560extern "C"
10561#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010562/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010563 builtin and then its argument prototype would still apply. */
10564char $ac_func ();
10565char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010566
Martin v. Löwis11437992002-04-12 09:54:03 +000010567#ifdef F77_DUMMY_MAIN
10568# ifdef __cplusplus
10569 extern "C"
10570# endif
10571 int F77_DUMMY_MAIN() { return 1; }
10572#endif
10573int
10574main ()
10575{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010576/* The GNU C library defines this for functions which it implements
10577 to always fail with ENOSYS. Some functions are actually named
10578 something starting with __ and the normal name is an alias. */
10579#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10580choke me
10581#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010582f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010583#endif
10584
Martin v. Löwis11437992002-04-12 09:54:03 +000010585 ;
10586 return 0;
10587}
10588_ACEOF
10589rm -f conftest.$ac_objext conftest$ac_exeext
10590if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10591 (eval $ac_link) 2>&5
10592 ac_status=$?
10593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10594 (exit $ac_status); } &&
10595 { ac_try='test -s conftest$ac_exeext'
10596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10597 (eval $ac_try) 2>&5
10598 ac_status=$?
10599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10600 (exit $ac_status); }; }; then
10601 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010602else
Martin v. Löwis11437992002-04-12 09:54:03 +000010603 echo "$as_me: failed program was:" >&5
10604cat conftest.$ac_ext >&5
10605eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010606fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010607rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010608fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010609echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10610echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10611if test `eval echo '${'$as_ac_var'}'` = yes; then
10612 cat >>confdefs.h <<_ACEOF
10613#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10614_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010615
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010616fi
10617done
10618
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010619 fi
10620
Martin v. Löwis11437992002-04-12 09:54:03 +000010621 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10622echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10623if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10624 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010625else
Martin v. Löwis11437992002-04-12 09:54:03 +000010626 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010627LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010628cat >conftest.$ac_ext <<_ACEOF
10629#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010630#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010631
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010632/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010633#ifdef __cplusplus
10634extern "C"
10635#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010636/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 builtin and then its argument prototype would still apply. */
10638char usconfig ();
10639#ifdef F77_DUMMY_MAIN
10640# ifdef __cplusplus
10641 extern "C"
10642# endif
10643 int F77_DUMMY_MAIN() { return 1; }
10644#endif
10645int
10646main ()
10647{
10648usconfig ();
10649 ;
10650 return 0;
10651}
10652_ACEOF
10653rm -f conftest.$ac_objext conftest$ac_exeext
10654if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10655 (eval $ac_link) 2>&5
10656 ac_status=$?
10657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10658 (exit $ac_status); } &&
10659 { ac_try='test -s conftest$ac_exeext'
10660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10661 (eval $ac_try) 2>&5
10662 ac_status=$?
10663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10664 (exit $ac_status); }; }; then
10665 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010666else
Martin v. Löwis11437992002-04-12 09:54:03 +000010667 echo "$as_me: failed program was:" >&5
10668cat conftest.$ac_ext >&5
10669ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010670fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010671rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10672LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010673fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010674echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10675echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10676if test $ac_cv_lib_mpc_usconfig = yes; then
10677 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010678#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010679_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010680
Martin v. Löwis130fb172001-07-19 11:00:41 +000010681 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010682 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010683 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010684fi
10685
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010686
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 if test $posix_threads != "yes"; then
10688 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10689echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10690if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10691 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010692else
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010694LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010695cat >conftest.$ac_ext <<_ACEOF
10696#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010697#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010698
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010699/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010700#ifdef __cplusplus
10701extern "C"
10702#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010703/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 builtin and then its argument prototype would still apply. */
10705char thr_create ();
10706#ifdef F77_DUMMY_MAIN
10707# ifdef __cplusplus
10708 extern "C"
10709# endif
10710 int F77_DUMMY_MAIN() { return 1; }
10711#endif
10712int
10713main ()
10714{
10715thr_create ();
10716 ;
10717 return 0;
10718}
10719_ACEOF
10720rm -f conftest.$ac_objext conftest$ac_exeext
10721if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10722 (eval $ac_link) 2>&5
10723 ac_status=$?
10724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10725 (exit $ac_status); } &&
10726 { ac_try='test -s conftest$ac_exeext'
10727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10728 (eval $ac_try) 2>&5
10729 ac_status=$?
10730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10731 (exit $ac_status); }; }; then
10732 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010733else
Martin v. Löwis11437992002-04-12 09:54:03 +000010734 echo "$as_me: failed program was:" >&5
10735cat conftest.$ac_ext >&5
10736ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010737fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010738rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10739LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010740fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010741echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10742echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10743if test $ac_cv_lib_thread_thr_create = yes; then
10744 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010745#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010746_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010747
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010748 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010749 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010750 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010751fi
10752
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010753 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010754
Martin v. Löwis130fb172001-07-19 11:00:41 +000010755 if test "$USE_THREAD_MODULE" != "#"
10756 then
10757 # If the above checks didn't disable threads, (at least) OSF1
10758 # needs this '-threads' argument during linking.
10759 case $ac_sys_system in
10760 OSF1) LDLAST=-threads;;
10761 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010762 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010763fi
10764
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010766
10767
10768echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10769echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770# Check whether --enable-ipv6 or --disable-ipv6 was given.
10771if test "${enable_ipv6+set}" = set; then
10772 enableval="$enable_ipv6"
10773 case "$enableval" in
10774 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010775 echo "$as_me:$LINENO: result: no" >&5
10776echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777 ipv6=no
10778 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010779 *) echo "$as_me:$LINENO: result: yes" >&5
10780echo "${ECHO_T}yes" >&6
10781 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010783_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010784
10785 ipv6=yes
10786 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010787 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788else
Martin v. Löwis11437992002-04-12 09:54:03 +000010789
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010790 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010791 echo "$as_me:$LINENO: result: no" >&5
10792echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793 ipv6=no
10794
10795else
Martin v. Löwis11437992002-04-12 09:54:03 +000010796 cat >conftest.$ac_ext <<_ACEOF
10797#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798#include "confdefs.h"
10799 /* AF_INET6 available check */
10800#include <sys/types.h>
10801#include <sys/socket.h>
10802main()
10803{
10804 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10805 exit(1);
10806 else
10807 exit(0);
10808}
10809
Martin v. Löwis11437992002-04-12 09:54:03 +000010810_ACEOF
10811rm -f conftest$ac_exeext
10812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10813 (eval $ac_link) 2>&5
10814 ac_status=$?
10815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10816 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10818 (eval $ac_try) 2>&5
10819 ac_status=$?
10820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10821 (exit $ac_status); }; }; then
10822 echo "$as_me:$LINENO: result: yes" >&5
10823echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010824 ipv6=yes
10825else
Martin v. Löwis11437992002-04-12 09:54:03 +000010826 echo "$as_me: program exited with status $ac_status" >&5
10827echo "$as_me: failed program was:" >&5
10828cat conftest.$ac_ext >&5
10829( exit $ac_status )
10830echo "$as_me:$LINENO: result: no" >&5
10831echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010832 ipv6=no
10833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010834rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835fi
10836
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010837if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010838 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10839echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10840 cat >conftest.$ac_ext <<_ACEOF
10841#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010842#include "confdefs.h"
10843#include <sys/types.h>
10844#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010845#ifdef F77_DUMMY_MAIN
10846# ifdef __cplusplus
10847 extern "C"
10848# endif
10849 int F77_DUMMY_MAIN() { return 1; }
10850#endif
10851int
10852main ()
10853{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010854struct sockaddr_in6 x;
10855x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010856 ;
10857 return 0;
10858}
10859_ACEOF
10860rm -f conftest.$ac_objext
10861if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10862 (eval $ac_compile) 2>&5
10863 ac_status=$?
10864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10865 (exit $ac_status); } &&
10866 { ac_try='test -s conftest.$ac_objext'
10867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10868 (eval $ac_try) 2>&5
10869 ac_status=$?
10870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10871 (exit $ac_status); }; }; then
10872 echo "$as_me:$LINENO: result: yes" >&5
10873echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010874 ipv6=yes
10875else
Martin v. Löwis11437992002-04-12 09:54:03 +000010876 echo "$as_me: failed program was:" >&5
10877cat conftest.$ac_ext >&5
10878echo "$as_me:$LINENO: result: no" >&5
10879echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010880 ipv6=no
10881fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010882rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010883fi
10884
10885if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010886 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010887#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010888_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010889
10890fi
10891
Martin v. Löwis11437992002-04-12 09:54:03 +000010892fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893
10894ipv6type=unknown
10895ipv6lib=none
10896ipv6trylibc=no
10897
10898if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010899 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10900echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010901 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10902 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010903 case $i in
10904 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 cat >conftest.$ac_ext <<_ACEOF
10906#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010907#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010908
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010909#include <netinet/in.h>
10910#ifdef IPV6_INRIA_VERSION
10911yes
10912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010913_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10915 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010916 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917fi
10918rm -f conftest*
10919
10920 ;;
10921 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010922 cat >conftest.$ac_ext <<_ACEOF
10923#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010924#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010925
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926#include <netinet/in.h>
10927#ifdef __KAME__
10928yes
10929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010930_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10932 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933 ipv6type=$i;
10934 ipv6lib=inet6
10935 ipv6libdir=/usr/local/v6/lib
10936 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010937fi
10938rm -f conftest*
10939
10940 ;;
10941 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010942 cat >conftest.$ac_ext <<_ACEOF
10943#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010944#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946#include <features.h>
10947#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10948yes
10949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010950_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10952 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953 ipv6type=$i;
10954 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955fi
10956rm -f conftest*
10957
10958 ;;
10959 linux-inet6)
10960 if test -d /usr/inet6; then
10961 ipv6type=$i
10962 ipv6lib=inet6
10963 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010964 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010965 fi
10966 ;;
10967 solaris)
10968 if test -f /etc/netconfig; then
10969 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10970 ipv6type=$i
10971 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010972 fi
10973 fi
10974 ;;
10975 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010976 cat >conftest.$ac_ext <<_ACEOF
10977#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010978#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010979
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010980#include <sys/param.h>
10981#ifdef _TOSHIBA_INET6
10982yes
10983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010984_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10986 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010987 ipv6type=$i;
10988 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010989 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010990fi
10991rm -f conftest*
10992
10993 ;;
10994 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010995 cat >conftest.$ac_ext <<_ACEOF
10996#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010997#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010998
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010999#include </usr/local/v6/include/sys/v6config.h>
11000#ifdef __V6D__
11001yes
11002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011003_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11005 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011006 ipv6type=$i;
11007 ipv6lib=v6;
11008 ipv6libdir=/usr/local/v6/lib;
11009 OPT="-I/usr/local/v6/include $OPT"
11010fi
11011rm -f conftest*
11012
11013 ;;
11014 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011015 cat >conftest.$ac_ext <<_ACEOF
11016#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011017#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011018
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011019#include <sys/param.h>
11020#ifdef _ZETA_MINAMI_INET6
11021yes
11022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011023_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11025 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011026 ipv6type=$i;
11027 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011028 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011029fi
11030rm -f conftest*
11031
11032 ;;
11033 esac
11034 if test "$ipv6type" != "unknown"; then
11035 break
11036 fi
11037 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 echo "$as_me:$LINENO: result: $ipv6type" >&5
11039echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011040fi
11041
11042if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11043 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11044 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11045 echo "using lib$ipv6lib"
11046 else
11047 if test $ipv6trylibc = "yes"; then
11048 echo "using libc"
11049 else
11050 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11051 echo "You need to fetch lib$ipv6lib.a from appropriate"
11052 echo 'ipv6 kit and compile beforehand.'
11053 exit 1
11054 fi
11055 fi
11056fi
11057
Barry Warsawef82cd72000-06-30 16:21:01 +000011058# Check for GC support
Martin v. Löwis11437992002-04-12 09:54:03 +000011059echo "$as_me:$LINENO: checking for --with-cycle-gc" >&5
11060echo $ECHO_N "checking for --with-cycle-gc... $ECHO_C" >&6
11061
Barry Warsawef82cd72000-06-30 16:21:01 +000011062# Check whether --with-cycle-gc or --without-cycle-gc was given.
11063if test "${with_cycle_gc+set}" = set; then
11064 withval="$with_cycle_gc"
Barry Warsawef82cd72000-06-30 16:21:01 +000011065
Martin v. Löwis11437992002-04-12 09:54:03 +000011066fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011067
11068if test -z "$with_cycle_gc"
11069then with_cycle_gc="yes"
11070fi
Neil Schemenauercf229462001-08-29 23:58:47 +000011071if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +000011072then
Martin v. Löwis11437992002-04-12 09:54:03 +000011073
11074cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011075#define WITH_CYCLE_GC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011076_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011077
11078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011079echo "$as_me:$LINENO: result: $with_cycle_gc" >&5
11080echo "${ECHO_T}$with_cycle_gc" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011081
Jack Jansen7b8c7542002-04-14 20:12:41 +000011082# Check for universal newline support
11083echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
11084echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
11085
11086# Check whether --with-universal-newlines or --without-universal-newlines was given.
11087if test "${with_universal_newlines+set}" = set; then
11088 withval="$with_universal_newlines"
11089
11090fi;
11091
11092if test -z "$with_universal_newlines"
11093then with_universal_newlines="yes"
11094fi
11095if test "$with_universal_newlines" != "no"
11096then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011097
11098cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011099#define WITH_UNIVERSAL_NEWLINES 1
11100_ACEOF
11101
11102fi
11103echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11104echo "${ECHO_T}$with_universal_newlines" >&6
11105
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011106# Check for --with-doc-strings
11107echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11108echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11109
11110# Check whether --with-doc-strings or --without-doc-strings was given.
11111if test "${with_doc_strings+set}" = set; then
11112 withval="$with_doc_strings"
11113
11114fi;
11115
11116if test -z "$with_doc_strings"
11117then with_doc_strings="yes"
11118fi
11119if test "$with_doc_strings" != "no"
11120then
11121
11122cat >>confdefs.h <<\_ACEOF
11123#define WITH_DOC_STRINGS 1
11124_ACEOF
11125
11126fi
11127echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11128echo "${ECHO_T}$with_doc_strings" >&6
11129
Neil Schemenauera35c6882001-02-27 04:45:05 +000011130# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011131echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11132echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11133
Neil Schemenauera35c6882001-02-27 04:45:05 +000011134# Check whether --with-pymalloc or --without-pymalloc was given.
11135if test "${with_pymalloc+set}" = set; then
11136 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011137
Martin v. Löwis11437992002-04-12 09:54:03 +000011138fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011139
Neil Schemenauer16c22972002-03-22 15:34:49 +000011140if test -z "$with_pymalloc"
11141then with_pymalloc="yes"
11142fi
11143if test "$with_pymalloc" != "no"
11144then
Martin v. Löwis11437992002-04-12 09:54:03 +000011145
11146cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011147#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011148_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011149
11150fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011151echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11152echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011153
Barry Warsawef82cd72000-06-30 16:21:01 +000011154# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011155echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11156echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11157
Barry Warsawef82cd72000-06-30 16:21:01 +000011158# Check whether --with-wctype-functions or --without-wctype-functions was given.
11159if test "${with_wctype_functions+set}" = set; then
11160 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011161
Barry Warsawef82cd72000-06-30 16:21:01 +000011162if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011163then
11164
11165cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011166#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011167_ACEOF
11168
11169 echo "$as_me:$LINENO: result: yes" >&5
11170echo "${ECHO_T}yes" >&6
11171else echo "$as_me:$LINENO: result: no" >&5
11172echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011173fi
11174else
Martin v. Löwis11437992002-04-12 09:54:03 +000011175 echo "$as_me:$LINENO: result: no" >&5
11176echo "${ECHO_T}no" >&6
11177fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011178
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011179# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011180
Guido van Rossum98935bf2001-09-05 19:13:16 +000011181DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011182
Martin v. Löwis11437992002-04-12 09:54:03 +000011183echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11184echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11185
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011186# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011187if test "${with_sgi_dl+set}" = set; then
11188 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011189
11190echo "$as_me:$LINENO: result: $withval" >&5
11191echo "${ECHO_T}$withval" >&6
11192
11193cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011194#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011195_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011196
Guido van Rossume97ee181999-12-20 21:27:22 +000011197DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011198dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011199if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011200then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011201else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11202echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11203 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011204fi
11205DLINCLDIR=${dldir}
11206LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011207else
Martin v. Löwis11437992002-04-12 09:54:03 +000011208 echo "$as_me:$LINENO: result: no" >&5
11209echo "${ECHO_T}no" >&6
11210fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011211
Martin v. Löwis11437992002-04-12 09:54:03 +000011212echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11213echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011214
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011215# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011216if test "${with_dl_dld+set}" = set; then
11217 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011218
11219echo "$as_me:$LINENO: result: $withval" >&5
11220echo "${ECHO_T}$withval" >&6
11221
11222cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011223#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011224_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011225
Guido van Rossume97ee181999-12-20 21:27:22 +000011226DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011227dldir=`echo "$withval" | sed 's/,.*//'`
11228dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011229if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011230then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011231else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11232echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11233 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011234fi
11235DLINCLDIR=${dldir}
11236LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011237else
Martin v. Löwis11437992002-04-12 09:54:03 +000011238 echo "$as_me:$LINENO: result: no" >&5
11239echo "${ECHO_T}no" >&6
11240fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011241
Guido van Rossume97ee181999-12-20 21:27:22 +000011242# the dlopen() function means we might want to use dynload_shlib.o. some
11243# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011244
Thomas Wouters3a584202000-08-05 23:28:51 +000011245for ac_func in dlopen
11246do
Martin v. Löwis11437992002-04-12 09:54:03 +000011247as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11248echo "$as_me:$LINENO: checking for $ac_func" >&5
11249echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11250if eval "test \"\${$as_ac_var+set}\" = set"; then
11251 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011252else
Martin v. Löwis11437992002-04-12 09:54:03 +000011253 cat >conftest.$ac_ext <<_ACEOF
11254#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011255#include "confdefs.h"
11256/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011257 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011258#include <assert.h>
11259/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011260#ifdef __cplusplus
11261extern "C"
11262#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011263/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 builtin and then its argument prototype would still apply. */
11265char $ac_func ();
11266char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011267
Martin v. Löwis11437992002-04-12 09:54:03 +000011268#ifdef F77_DUMMY_MAIN
11269# ifdef __cplusplus
11270 extern "C"
11271# endif
11272 int F77_DUMMY_MAIN() { return 1; }
11273#endif
11274int
11275main ()
11276{
Guido van Rossume97ee181999-12-20 21:27:22 +000011277/* The GNU C library defines this for functions which it implements
11278 to always fail with ENOSYS. Some functions are actually named
11279 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011280#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011281choke me
11282#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011283f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011284#endif
11285
Martin v. Löwis11437992002-04-12 09:54:03 +000011286 ;
11287 return 0;
11288}
11289_ACEOF
11290rm -f conftest.$ac_objext conftest$ac_exeext
11291if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11292 (eval $ac_link) 2>&5
11293 ac_status=$?
11294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11295 (exit $ac_status); } &&
11296 { ac_try='test -s conftest$ac_exeext'
11297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11298 (eval $ac_try) 2>&5
11299 ac_status=$?
11300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11301 (exit $ac_status); }; }; then
11302 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011303else
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 echo "$as_me: failed program was:" >&5
11305cat conftest.$ac_ext >&5
11306eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011307fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011308rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011310echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11311echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11312if test `eval echo '${'$as_ac_var'}'` = yes; then
11313 cat >>confdefs.h <<_ACEOF
11314#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11315_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011316
Guido van Rossume97ee181999-12-20 21:27:22 +000011317fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011318done
Guido van Rossume97ee181999-12-20 21:27:22 +000011319
Michael W. Hudson54241132001-12-07 15:38:26 +000011320
Guido van Rossume97ee181999-12-20 21:27:22 +000011321# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11322# loading of modules.
11323
Martin v. Löwis11437992002-04-12 09:54:03 +000011324echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11325echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011326if test -z "$DYNLOADFILE"
11327then
11328 case $ac_sys_system/$ac_sys_release in
11329 AIX*) DYNLOADFILE="dynload_aix.o";;
11330 BeOS*) DYNLOADFILE="dynload_beos.o";;
11331 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011332 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011333 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011334 *)
11335 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11336 # out any dynamic loading
11337 if test "$ac_cv_func_dlopen" = yes
11338 then DYNLOADFILE="dynload_shlib.o"
11339 else DYNLOADFILE="dynload_stub.o"
11340 fi
11341 ;;
11342 esac
11343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011344echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11345echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011346if test "$DYNLOADFILE" != "dynload_stub.o"
11347then
Martin v. Löwis11437992002-04-12 09:54:03 +000011348
11349cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011350#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011351_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011352
11353fi
11354
Neil Schemenauer4e425612001-06-19 15:44:15 +000011355# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11356
Michael W. Hudson54241132001-12-07 15:38:26 +000011357
Martin v. Löwis11437992002-04-12 09:54:03 +000011358echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11359echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011360if test -z "$MACHDEP_OBJS"
11361then
Jack Jansene578a632001-08-15 01:27:14 +000011362 MACHDEP_OBJS=$extra_machdep_objs
11363else
11364 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011366echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11367echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011368
Guido van Rossum627b2d71993-12-24 10:39:16 +000011369# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011443
Fred Drake6b3cc522002-04-15 19:20:27 +000011444
Jack Jansen0b06be72002-06-21 14:48:38 +000011445
Skip Montanaro8345f712002-06-25 05:53:48 +000011446
Martin v. Löwis244edc82001-10-04 22:44:26 +000011447for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011448 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011449 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011450 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011451 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011452 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011453 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011454 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011455 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011456 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011457 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011458do
Martin v. Löwis11437992002-04-12 09:54:03 +000011459as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11460echo "$as_me:$LINENO: checking for $ac_func" >&5
11461echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11462if eval "test \"\${$as_ac_var+set}\" = set"; then
11463 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011464else
Martin v. Löwis11437992002-04-12 09:54:03 +000011465 cat >conftest.$ac_ext <<_ACEOF
11466#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011467#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011468/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011470#include <assert.h>
11471/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011472#ifdef __cplusplus
11473extern "C"
11474#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011475/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011476 builtin and then its argument prototype would still apply. */
11477char $ac_func ();
11478char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011479
Martin v. Löwis11437992002-04-12 09:54:03 +000011480#ifdef F77_DUMMY_MAIN
11481# ifdef __cplusplus
11482 extern "C"
11483# endif
11484 int F77_DUMMY_MAIN() { return 1; }
11485#endif
11486int
11487main ()
11488{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011489/* The GNU C library defines this for functions which it implements
11490 to always fail with ENOSYS. Some functions are actually named
11491 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011492#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011493choke me
11494#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011495f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011496#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011497
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 ;
11499 return 0;
11500}
11501_ACEOF
11502rm -f conftest.$ac_objext conftest$ac_exeext
11503if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11504 (eval $ac_link) 2>&5
11505 ac_status=$?
11506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11507 (exit $ac_status); } &&
11508 { ac_try='test -s conftest$ac_exeext'
11509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11510 (eval $ac_try) 2>&5
11511 ac_status=$?
11512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11513 (exit $ac_status); }; }; then
11514 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011515else
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 echo "$as_me: failed program was:" >&5
11517cat conftest.$ac_ext >&5
11518eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011519fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011522echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11523echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11524if test `eval echo '${'$as_ac_var'}'` = yes; then
11525 cat >>confdefs.h <<_ACEOF
11526#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11527_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011528
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011529fi
11530done
11531
Michael W. Hudson54241132001-12-07 15:38:26 +000011532
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011533# check for openpty and forkpty
11534
Martin v. Löwis11437992002-04-12 09:54:03 +000011535
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011536for ac_func in openpty
11537do
Martin v. Löwis11437992002-04-12 09:54:03 +000011538as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11539echo "$as_me:$LINENO: checking for $ac_func" >&5
11540echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11541if eval "test \"\${$as_ac_var+set}\" = set"; then
11542 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011543else
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 cat >conftest.$ac_ext <<_ACEOF
11545#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011546#include "confdefs.h"
11547/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011548 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011549#include <assert.h>
11550/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011551#ifdef __cplusplus
11552extern "C"
11553#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011554/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011555 builtin and then its argument prototype would still apply. */
11556char $ac_func ();
11557char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011558
Martin v. Löwis11437992002-04-12 09:54:03 +000011559#ifdef F77_DUMMY_MAIN
11560# ifdef __cplusplus
11561 extern "C"
11562# endif
11563 int F77_DUMMY_MAIN() { return 1; }
11564#endif
11565int
11566main ()
11567{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011568/* The GNU C library defines this for functions which it implements
11569 to always fail with ENOSYS. Some functions are actually named
11570 something starting with __ and the normal name is an alias. */
11571#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11572choke me
11573#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011574f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011575#endif
11576
Martin v. Löwis11437992002-04-12 09:54:03 +000011577 ;
11578 return 0;
11579}
11580_ACEOF
11581rm -f conftest.$ac_objext conftest$ac_exeext
11582if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11583 (eval $ac_link) 2>&5
11584 ac_status=$?
11585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11586 (exit $ac_status); } &&
11587 { ac_try='test -s conftest$ac_exeext'
11588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11589 (eval $ac_try) 2>&5
11590 ac_status=$?
11591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11592 (exit $ac_status); }; }; then
11593 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011594else
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 echo "$as_me: failed program was:" >&5
11596cat conftest.$ac_ext >&5
11597eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011598fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011599rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011600fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011601echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11602echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11603if test `eval echo '${'$as_ac_var'}'` = yes; then
11604 cat >>confdefs.h <<_ACEOF
11605#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11606_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011607
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011608else
Martin v. Löwis11437992002-04-12 09:54:03 +000011609 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11610echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11611if test "${ac_cv_lib_util_openpty+set}" = set; then
11612 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011613else
Martin v. Löwis11437992002-04-12 09:54:03 +000011614 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011615LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011616cat >conftest.$ac_ext <<_ACEOF
11617#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011618#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011619
Fred Drake8cef4cf2000-06-28 16:40:38 +000011620/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011621#ifdef __cplusplus
11622extern "C"
11623#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011624/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011625 builtin and then its argument prototype would still apply. */
11626char openpty ();
11627#ifdef F77_DUMMY_MAIN
11628# ifdef __cplusplus
11629 extern "C"
11630# endif
11631 int F77_DUMMY_MAIN() { return 1; }
11632#endif
11633int
11634main ()
11635{
11636openpty ();
11637 ;
11638 return 0;
11639}
11640_ACEOF
11641rm -f conftest.$ac_objext conftest$ac_exeext
11642if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11643 (eval $ac_link) 2>&5
11644 ac_status=$?
11645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11646 (exit $ac_status); } &&
11647 { ac_try='test -s conftest$ac_exeext'
11648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11649 (eval $ac_try) 2>&5
11650 ac_status=$?
11651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11652 (exit $ac_status); }; }; then
11653 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011654else
Martin v. Löwis11437992002-04-12 09:54:03 +000011655 echo "$as_me: failed program was:" >&5
11656cat conftest.$ac_ext >&5
11657ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011658fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011659rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11660LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011661fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011662echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11663echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11664if test $ac_cv_lib_util_openpty = yes; then
11665 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011666#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011667_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011668 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011669fi
11670
11671fi
11672done
11673
Martin v. Löwis11437992002-04-12 09:54:03 +000011674
Fred Drake8cef4cf2000-06-28 16:40:38 +000011675for ac_func in forkpty
11676do
Martin v. Löwis11437992002-04-12 09:54:03 +000011677as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11678echo "$as_me:$LINENO: checking for $ac_func" >&5
11679echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11680if eval "test \"\${$as_ac_var+set}\" = set"; then
11681 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011682else
Martin v. Löwis11437992002-04-12 09:54:03 +000011683 cat >conftest.$ac_ext <<_ACEOF
11684#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011685#include "confdefs.h"
11686/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011687 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011688#include <assert.h>
11689/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011690#ifdef __cplusplus
11691extern "C"
11692#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011693/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 builtin and then its argument prototype would still apply. */
11695char $ac_func ();
11696char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011697
Martin v. Löwis11437992002-04-12 09:54:03 +000011698#ifdef F77_DUMMY_MAIN
11699# ifdef __cplusplus
11700 extern "C"
11701# endif
11702 int F77_DUMMY_MAIN() { return 1; }
11703#endif
11704int
11705main ()
11706{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011707/* The GNU C library defines this for functions which it implements
11708 to always fail with ENOSYS. Some functions are actually named
11709 something starting with __ and the normal name is an alias. */
11710#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11711choke me
11712#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011713f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011714#endif
11715
Martin v. Löwis11437992002-04-12 09:54:03 +000011716 ;
11717 return 0;
11718}
11719_ACEOF
11720rm -f conftest.$ac_objext conftest$ac_exeext
11721if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11722 (eval $ac_link) 2>&5
11723 ac_status=$?
11724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11725 (exit $ac_status); } &&
11726 { ac_try='test -s conftest$ac_exeext'
11727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11728 (eval $ac_try) 2>&5
11729 ac_status=$?
11730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11731 (exit $ac_status); }; }; then
11732 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011733else
Martin v. Löwis11437992002-04-12 09:54:03 +000011734 echo "$as_me: failed program was:" >&5
11735cat conftest.$ac_ext >&5
11736eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011737fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011738rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011740echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11741echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11742if test `eval echo '${'$as_ac_var'}'` = yes; then
11743 cat >>confdefs.h <<_ACEOF
11744#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11745_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011746
Fred Drake8cef4cf2000-06-28 16:40:38 +000011747else
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11749echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11750if test "${ac_cv_lib_util_forkpty+set}" = set; then
11751 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011752else
Martin v. Löwis11437992002-04-12 09:54:03 +000011753 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011754LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011755cat >conftest.$ac_ext <<_ACEOF
11756#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011757#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011758
Fred Drake8cef4cf2000-06-28 16:40:38 +000011759/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011760#ifdef __cplusplus
11761extern "C"
11762#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011763/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011764 builtin and then its argument prototype would still apply. */
11765char forkpty ();
11766#ifdef F77_DUMMY_MAIN
11767# ifdef __cplusplus
11768 extern "C"
11769# endif
11770 int F77_DUMMY_MAIN() { return 1; }
11771#endif
11772int
11773main ()
11774{
11775forkpty ();
11776 ;
11777 return 0;
11778}
11779_ACEOF
11780rm -f conftest.$ac_objext conftest$ac_exeext
11781if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11782 (eval $ac_link) 2>&5
11783 ac_status=$?
11784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11785 (exit $ac_status); } &&
11786 { ac_try='test -s conftest$ac_exeext'
11787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11788 (eval $ac_try) 2>&5
11789 ac_status=$?
11790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11791 (exit $ac_status); }; }; then
11792 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011793else
Martin v. Löwis11437992002-04-12 09:54:03 +000011794 echo "$as_me: failed program was:" >&5
11795cat conftest.$ac_ext >&5
11796ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011797fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011798rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11799LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011800fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011801echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11802echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11803if test $ac_cv_lib_util_forkpty = yes; then
11804 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011805#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011806_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011807 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011808fi
11809
11810fi
11811done
11812
Jack Jansendd19cf82001-12-06 22:36:17 +000011813
Michael W. Hudson54241132001-12-07 15:38:26 +000011814# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011815
11816
11817
11818
11819
11820
Fred Drake8cef4cf2000-06-28 16:40:38 +000011821for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11822do
Martin v. Löwis11437992002-04-12 09:54:03 +000011823as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11824echo "$as_me:$LINENO: checking for $ac_func" >&5
11825echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11826if eval "test \"\${$as_ac_var+set}\" = set"; then
11827 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011828else
Martin v. Löwis11437992002-04-12 09:54:03 +000011829 cat >conftest.$ac_ext <<_ACEOF
11830#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011831#include "confdefs.h"
11832/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011833 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011834#include <assert.h>
11835/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011836#ifdef __cplusplus
11837extern "C"
11838#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011839/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011840 builtin and then its argument prototype would still apply. */
11841char $ac_func ();
11842char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011843
Martin v. Löwis11437992002-04-12 09:54:03 +000011844#ifdef F77_DUMMY_MAIN
11845# ifdef __cplusplus
11846 extern "C"
11847# endif
11848 int F77_DUMMY_MAIN() { return 1; }
11849#endif
11850int
11851main ()
11852{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011853/* The GNU C library defines this for functions which it implements
11854 to always fail with ENOSYS. Some functions are actually named
11855 something starting with __ and the normal name is an alias. */
11856#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11857choke me
11858#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011859f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011860#endif
11861
Martin v. Löwis11437992002-04-12 09:54:03 +000011862 ;
11863 return 0;
11864}
11865_ACEOF
11866rm -f conftest.$ac_objext conftest$ac_exeext
11867if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11868 (eval $ac_link) 2>&5
11869 ac_status=$?
11870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11871 (exit $ac_status); } &&
11872 { ac_try='test -s conftest$ac_exeext'
11873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11874 (eval $ac_try) 2>&5
11875 ac_status=$?
11876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11877 (exit $ac_status); }; }; then
11878 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011879else
Martin v. Löwis11437992002-04-12 09:54:03 +000011880 echo "$as_me: failed program was:" >&5
11881cat conftest.$ac_ext >&5
11882eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011883fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011884rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011885fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011886echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11887echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11888if test `eval echo '${'$as_ac_var'}'` = yes; then
11889 cat >>confdefs.h <<_ACEOF
11890#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11891_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011892
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011893fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011894done
11895
Michael W. Hudson54241132001-12-07 15:38:26 +000011896
Martin v. Löwis11437992002-04-12 09:54:03 +000011897
11898
11899
11900
11901
Martin v. Löwis1142de32002-03-29 16:28:31 +000011902for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011903do
Martin v. Löwis11437992002-04-12 09:54:03 +000011904as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11905echo "$as_me:$LINENO: checking for $ac_func" >&5
11906echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11907if eval "test \"\${$as_ac_var+set}\" = set"; then
11908 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011909else
Martin v. Löwis11437992002-04-12 09:54:03 +000011910 cat >conftest.$ac_ext <<_ACEOF
11911#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011912#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011913/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011914 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011915#include <assert.h>
11916/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011917#ifdef __cplusplus
11918extern "C"
11919#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011920/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011921 builtin and then its argument prototype would still apply. */
11922char $ac_func ();
11923char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011924
Martin v. Löwis11437992002-04-12 09:54:03 +000011925#ifdef F77_DUMMY_MAIN
11926# ifdef __cplusplus
11927 extern "C"
11928# endif
11929 int F77_DUMMY_MAIN() { return 1; }
11930#endif
11931int
11932main ()
11933{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011934/* The GNU C library defines this for functions which it implements
11935 to always fail with ENOSYS. Some functions are actually named
11936 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011937#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011938choke me
11939#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011940f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011941#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011942
Martin v. Löwis11437992002-04-12 09:54:03 +000011943 ;
11944 return 0;
11945}
11946_ACEOF
11947rm -f conftest.$ac_objext conftest$ac_exeext
11948if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11949 (eval $ac_link) 2>&5
11950 ac_status=$?
11951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11952 (exit $ac_status); } &&
11953 { ac_try='test -s conftest$ac_exeext'
11954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11955 (eval $ac_try) 2>&5
11956 ac_status=$?
11957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11958 (exit $ac_status); }; }; then
11959 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011960else
Martin v. Löwis11437992002-04-12 09:54:03 +000011961 echo "$as_me: failed program was:" >&5
11962cat conftest.$ac_ext >&5
11963eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011964fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011965rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011966fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011967echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11968echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11969if test `eval echo '${'$as_ac_var'}'` = yes; then
11970 cat >>confdefs.h <<_ACEOF
11971#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11972_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011973
Martin v. Löwis1142de32002-03-29 16:28:31 +000011974else
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011976fi
11977done
11978
11979
Martin v. Löwis11437992002-04-12 09:54:03 +000011980
Martin v. Löwis1142de32002-03-29 16:28:31 +000011981for ac_func in getpgrp
11982do
Martin v. Löwis11437992002-04-12 09:54:03 +000011983as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11984echo "$as_me:$LINENO: checking for $ac_func" >&5
11985echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11986if eval "test \"\${$as_ac_var+set}\" = set"; then
11987 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011988else
Martin v. Löwis11437992002-04-12 09:54:03 +000011989 cat >conftest.$ac_ext <<_ACEOF
11990#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011991#include "confdefs.h"
11992/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011993 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011994#include <assert.h>
11995/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011996#ifdef __cplusplus
11997extern "C"
11998#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011999/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012000 builtin and then its argument prototype would still apply. */
12001char $ac_func ();
12002char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012003
Martin v. Löwis11437992002-04-12 09:54:03 +000012004#ifdef F77_DUMMY_MAIN
12005# ifdef __cplusplus
12006 extern "C"
12007# endif
12008 int F77_DUMMY_MAIN() { return 1; }
12009#endif
12010int
12011main ()
12012{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012013/* The GNU C library defines this for functions which it implements
12014 to always fail with ENOSYS. Some functions are actually named
12015 something starting with __ and the normal name is an alias. */
12016#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12017choke me
12018#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012019f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012020#endif
12021
Martin v. Löwis11437992002-04-12 09:54:03 +000012022 ;
12023 return 0;
12024}
12025_ACEOF
12026rm -f conftest.$ac_objext conftest$ac_exeext
12027if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12028 (eval $ac_link) 2>&5
12029 ac_status=$?
12030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12031 (exit $ac_status); } &&
12032 { ac_try='test -s conftest$ac_exeext'
12033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12034 (eval $ac_try) 2>&5
12035 ac_status=$?
12036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12037 (exit $ac_status); }; }; then
12038 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012039else
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 echo "$as_me: failed program was:" >&5
12041cat conftest.$ac_ext >&5
12042eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012044rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012045fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012046echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12047echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12048if test `eval echo '${'$as_ac_var'}'` = yes; then
12049 cat >>confdefs.h <<_ACEOF
12050#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12051_ACEOF
12052 cat >conftest.$ac_ext <<_ACEOF
12053#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012054#include "confdefs.h"
12055#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012056#ifdef F77_DUMMY_MAIN
12057# ifdef __cplusplus
12058 extern "C"
12059# endif
12060 int F77_DUMMY_MAIN() { return 1; }
12061#endif
12062int
12063main ()
12064{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012065getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012066 ;
12067 return 0;
12068}
12069_ACEOF
12070rm -f conftest.$ac_objext
12071if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12072 (eval $ac_compile) 2>&5
12073 ac_status=$?
12074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12075 (exit $ac_status); } &&
12076 { ac_try='test -s conftest.$ac_objext'
12077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12078 (eval $ac_try) 2>&5
12079 ac_status=$?
12080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12081 (exit $ac_status); }; }; then
12082
12083cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012084#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012085_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012086
Martin v. Löwis11437992002-04-12 09:54:03 +000012087
Guido van Rossumf78abae1997-01-21 22:02:36 +000012088else
Martin v. Löwis11437992002-04-12 09:54:03 +000012089 echo "$as_me: failed program was:" >&5
12090cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012092rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012093
Guido van Rossum627b2d71993-12-24 10:39:16 +000012094fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012095done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012096
Martin v. Löwis11437992002-04-12 09:54:03 +000012097
Thomas Wouters3a584202000-08-05 23:28:51 +000012098for ac_func in setpgrp
12099do
Martin v. Löwis11437992002-04-12 09:54:03 +000012100as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12101echo "$as_me:$LINENO: checking for $ac_func" >&5
12102echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12103if eval "test \"\${$as_ac_var+set}\" = set"; then
12104 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012105else
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 cat >conftest.$ac_ext <<_ACEOF
12107#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012108#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012109/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012111#include <assert.h>
12112/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012113#ifdef __cplusplus
12114extern "C"
12115#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012116/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012117 builtin and then its argument prototype would still apply. */
12118char $ac_func ();
12119char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012120
Martin v. Löwis11437992002-04-12 09:54:03 +000012121#ifdef F77_DUMMY_MAIN
12122# ifdef __cplusplus
12123 extern "C"
12124# endif
12125 int F77_DUMMY_MAIN() { return 1; }
12126#endif
12127int
12128main ()
12129{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012130/* The GNU C library defines this for functions which it implements
12131 to always fail with ENOSYS. Some functions are actually named
12132 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012133#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012134choke me
12135#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012136f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012137#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012138
Martin v. Löwis11437992002-04-12 09:54:03 +000012139 ;
12140 return 0;
12141}
12142_ACEOF
12143rm -f conftest.$ac_objext conftest$ac_exeext
12144if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12145 (eval $ac_link) 2>&5
12146 ac_status=$?
12147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12148 (exit $ac_status); } &&
12149 { ac_try='test -s conftest$ac_exeext'
12150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12151 (eval $ac_try) 2>&5
12152 ac_status=$?
12153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12154 (exit $ac_status); }; }; then
12155 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012156else
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 echo "$as_me: failed program was:" >&5
12158cat conftest.$ac_ext >&5
12159eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012160fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012161rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012163echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12164echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12165if test `eval echo '${'$as_ac_var'}'` = yes; then
12166 cat >>confdefs.h <<_ACEOF
12167#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12168_ACEOF
12169 cat >conftest.$ac_ext <<_ACEOF
12170#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012171#include "confdefs.h"
12172#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012173#ifdef F77_DUMMY_MAIN
12174# ifdef __cplusplus
12175 extern "C"
12176# endif
12177 int F77_DUMMY_MAIN() { return 1; }
12178#endif
12179int
12180main ()
12181{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012182setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012183 ;
12184 return 0;
12185}
12186_ACEOF
12187rm -f conftest.$ac_objext
12188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12189 (eval $ac_compile) 2>&5
12190 ac_status=$?
12191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12192 (exit $ac_status); } &&
12193 { ac_try='test -s conftest.$ac_objext'
12194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12195 (eval $ac_try) 2>&5
12196 ac_status=$?
12197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12198 (exit $ac_status); }; }; then
12199
12200cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012201#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012202_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012203
Martin v. Löwis11437992002-04-12 09:54:03 +000012204
Guido van Rossumf78abae1997-01-21 22:02:36 +000012205else
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 echo "$as_me: failed program was:" >&5
12207cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012208fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012209rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012210
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012211fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012212done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012213
Martin v. Löwis11437992002-04-12 09:54:03 +000012214
Thomas Wouters3a584202000-08-05 23:28:51 +000012215for ac_func in gettimeofday
12216do
Martin v. Löwis11437992002-04-12 09:54:03 +000012217as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12218echo "$as_me:$LINENO: checking for $ac_func" >&5
12219echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12220if eval "test \"\${$as_ac_var+set}\" = set"; then
12221 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012222else
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 cat >conftest.$ac_ext <<_ACEOF
12224#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012225#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012226/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012228#include <assert.h>
12229/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012230#ifdef __cplusplus
12231extern "C"
12232#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012233/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012234 builtin and then its argument prototype would still apply. */
12235char $ac_func ();
12236char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012237
Martin v. Löwis11437992002-04-12 09:54:03 +000012238#ifdef F77_DUMMY_MAIN
12239# ifdef __cplusplus
12240 extern "C"
12241# endif
12242 int F77_DUMMY_MAIN() { return 1; }
12243#endif
12244int
12245main ()
12246{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012247/* The GNU C library defines this for functions which it implements
12248 to always fail with ENOSYS. Some functions are actually named
12249 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012250#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012251choke me
12252#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012253f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012254#endif
12255
Martin v. Löwis11437992002-04-12 09:54:03 +000012256 ;
12257 return 0;
12258}
12259_ACEOF
12260rm -f conftest.$ac_objext conftest$ac_exeext
12261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12262 (eval $ac_link) 2>&5
12263 ac_status=$?
12264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12265 (exit $ac_status); } &&
12266 { ac_try='test -s conftest$ac_exeext'
12267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12268 (eval $ac_try) 2>&5
12269 ac_status=$?
12270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12271 (exit $ac_status); }; }; then
12272 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012273else
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 echo "$as_me: failed program was:" >&5
12275cat conftest.$ac_ext >&5
12276eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012277fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012278rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012279fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012280echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12281echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12282if test `eval echo '${'$as_ac_var'}'` = yes; then
12283 cat >>confdefs.h <<_ACEOF
12284#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12285_ACEOF
12286 cat >conftest.$ac_ext <<_ACEOF
12287#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012288#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012289#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012290#ifdef F77_DUMMY_MAIN
12291# ifdef __cplusplus
12292 extern "C"
12293# endif
12294 int F77_DUMMY_MAIN() { return 1; }
12295#endif
12296int
12297main ()
12298{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012299gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 ;
12301 return 0;
12302}
12303_ACEOF
12304rm -f conftest.$ac_objext
12305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12306 (eval $ac_compile) 2>&5
12307 ac_status=$?
12308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12309 (exit $ac_status); } &&
12310 { ac_try='test -s conftest.$ac_objext'
12311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12312 (eval $ac_try) 2>&5
12313 ac_status=$?
12314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12315 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012316 :
12317else
Martin v. Löwis11437992002-04-12 09:54:03 +000012318 echo "$as_me: failed program was:" >&5
12319cat conftest.$ac_ext >&5
12320
12321cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012322#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012323_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012324
Martin v. Löwis11437992002-04-12 09:54:03 +000012325
Guido van Rossum627b2d71993-12-24 10:39:16 +000012326fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012327rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012328
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012329fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012330done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012331
Michael W. Hudson54241132001-12-07 15:38:26 +000012332
12333
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012334# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012335# for [no]getaddrinfo in netdb.h.
12336echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12337echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12338cat >conftest.$ac_ext <<_ACEOF
12339#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012340#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012341
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012342#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012343#include <sys/socket.h>
12344#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012345#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012346
Martin v. Löwis11437992002-04-12 09:54:03 +000012347#ifdef F77_DUMMY_MAIN
12348# ifdef __cplusplus
12349 extern "C"
12350# endif
12351 int F77_DUMMY_MAIN() { return 1; }
12352#endif
12353int
12354main ()
12355{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012356
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012357getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012358
Martin v. Löwis11437992002-04-12 09:54:03 +000012359 ;
12360 return 0;
12361}
12362_ACEOF
12363rm -f conftest.$ac_objext conftest$ac_exeext
12364if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12365 (eval $ac_link) 2>&5
12366 ac_status=$?
12367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12368 (exit $ac_status); } &&
12369 { ac_try='test -s conftest$ac_exeext'
12370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12371 (eval $ac_try) 2>&5
12372 ac_status=$?
12373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12374 (exit $ac_status); }; }; then
12375
12376echo "$as_me:$LINENO: result: yes" >&5
12377echo "${ECHO_T}yes" >&6
12378echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12379echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012380if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 echo "$as_me:$LINENO: result: buggy" >&5
12382echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012383buggygetaddrinfo=yes
12384else
Martin v. Löwis11437992002-04-12 09:54:03 +000012385 cat >conftest.$ac_ext <<_ACEOF
12386#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012387#include "confdefs.h"
12388
12389#include <sys/types.h>
12390#include <netdb.h>
12391#include <string.h>
12392#include <sys/socket.h>
12393#include <netinet/in.h>
12394
12395main()
12396{
12397 int passive, gaierr, inet4 = 0, inet6 = 0;
12398 struct addrinfo hints, *ai, *aitop;
12399 char straddr[INET6_ADDRSTRLEN], strport[16];
12400
12401 for (passive = 0; passive <= 1; passive++) {
12402 memset(&hints, 0, sizeof(hints));
12403 hints.ai_family = AF_UNSPEC;
12404 hints.ai_flags = passive ? AI_PASSIVE : 0;
12405 hints.ai_socktype = SOCK_STREAM;
12406 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12407 (void)gai_strerror(gaierr);
12408 goto bad;
12409 }
12410 for (ai = aitop; ai; ai = ai->ai_next) {
12411 if (ai->ai_addr == NULL ||
12412 ai->ai_addrlen == 0 ||
12413 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12414 straddr, sizeof(straddr), strport, sizeof(strport),
12415 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12416 goto bad;
12417 }
12418 switch (ai->ai_family) {
12419 case AF_INET:
12420 if (strcmp(strport, "54321") != 0) {
12421 goto bad;
12422 }
12423 if (passive) {
12424 if (strcmp(straddr, "0.0.0.0") != 0) {
12425 goto bad;
12426 }
12427 } else {
12428 if (strcmp(straddr, "127.0.0.1") != 0) {
12429 goto bad;
12430 }
12431 }
12432 inet4++;
12433 break;
12434 case AF_INET6:
12435 if (strcmp(strport, "54321") != 0) {
12436 goto bad;
12437 }
12438 if (passive) {
12439 if (strcmp(straddr, "::") != 0) {
12440 goto bad;
12441 }
12442 } else {
12443 if (strcmp(straddr, "::1") != 0) {
12444 goto bad;
12445 }
12446 }
12447 inet6++;
12448 break;
12449 case AF_UNSPEC:
12450 goto bad;
12451 break;
12452 default:
12453 /* another family support? */
12454 break;
12455 }
12456 }
12457 }
12458
12459 if (!(inet4 == 0 || inet4 == 2))
12460 goto bad;
12461 if (!(inet6 == 0 || inet6 == 2))
12462 goto bad;
12463
12464 if (aitop)
12465 freeaddrinfo(aitop);
12466 exit(0);
12467
12468 bad:
12469 if (aitop)
12470 freeaddrinfo(aitop);
12471 exit(1);
12472}
12473
Martin v. Löwis11437992002-04-12 09:54:03 +000012474_ACEOF
12475rm -f conftest$ac_exeext
12476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12477 (eval $ac_link) 2>&5
12478 ac_status=$?
12479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12482 (eval $ac_try) 2>&5
12483 ac_status=$?
12484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12485 (exit $ac_status); }; }; then
12486 echo "$as_me:$LINENO: result: good" >&5
12487echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012488buggygetaddrinfo=no
12489else
Martin v. Löwis11437992002-04-12 09:54:03 +000012490 echo "$as_me: program exited with status $ac_status" >&5
12491echo "$as_me: failed program was:" >&5
12492cat conftest.$ac_ext >&5
12493( exit $ac_status )
12494echo "$as_me:$LINENO: result: buggy" >&5
12495echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012496buggygetaddrinfo=yes
12497fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012498rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012499fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012500else
Martin v. Löwis11437992002-04-12 09:54:03 +000012501 echo "$as_me: failed program was:" >&5
12502cat conftest.$ac_ext >&5
12503
12504echo "$as_me:$LINENO: result: no" >&5
12505echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012506buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012507
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012508fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012509rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012510
12511if test "$buggygetaddrinfo" = "yes"; then
12512 if test "$ipv6" = "yes"; then
12513 echo 'Fatal: You must get working getaddrinfo() function.'
12514 echo ' or you can specify "--disable-ipv6"'.
12515 exit 1
12516 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012517else
Martin v. Löwis11437992002-04-12 09:54:03 +000012518
12519cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012520#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012521_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012522
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012523fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012524
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012525for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012526do
Martin v. Löwis11437992002-04-12 09:54:03 +000012527as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12528echo "$as_me:$LINENO: checking for $ac_func" >&5
12529echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12530if eval "test \"\${$as_ac_var+set}\" = set"; then
12531 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012532else
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 cat >conftest.$ac_ext <<_ACEOF
12534#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012535#include "confdefs.h"
12536/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012537 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012538#include <assert.h>
12539/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012540#ifdef __cplusplus
12541extern "C"
12542#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012543/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012544 builtin and then its argument prototype would still apply. */
12545char $ac_func ();
12546char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012547
Martin v. Löwis11437992002-04-12 09:54:03 +000012548#ifdef F77_DUMMY_MAIN
12549# ifdef __cplusplus
12550 extern "C"
12551# endif
12552 int F77_DUMMY_MAIN() { return 1; }
12553#endif
12554int
12555main ()
12556{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012557/* The GNU C library defines this for functions which it implements
12558 to always fail with ENOSYS. Some functions are actually named
12559 something starting with __ and the normal name is an alias. */
12560#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12561choke me
12562#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012563f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012564#endif
12565
Martin v. Löwis11437992002-04-12 09:54:03 +000012566 ;
12567 return 0;
12568}
12569_ACEOF
12570rm -f conftest.$ac_objext conftest$ac_exeext
12571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12572 (eval $ac_link) 2>&5
12573 ac_status=$?
12574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12575 (exit $ac_status); } &&
12576 { ac_try='test -s conftest$ac_exeext'
12577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12578 (eval $ac_try) 2>&5
12579 ac_status=$?
12580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581 (exit $ac_status); }; }; then
12582 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012583else
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 echo "$as_me: failed program was:" >&5
12585cat conftest.$ac_ext >&5
12586eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012587fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012588rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012590echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12591echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12592if test `eval echo '${'$as_ac_var'}'` = yes; then
12593 cat >>confdefs.h <<_ACEOF
12594#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12595_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012596
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012597fi
12598done
12599
Michael W. Hudson54241132001-12-07 15:38:26 +000012600
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012601# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012602echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12603echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12604if test "${ac_cv_header_time+set}" = set; then
12605 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012606else
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 cat >conftest.$ac_ext <<_ACEOF
12608#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012609#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012610#include <sys/types.h>
12611#include <sys/time.h>
12612#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012613
12614#ifdef F77_DUMMY_MAIN
12615# ifdef __cplusplus
12616 extern "C"
12617# endif
12618 int F77_DUMMY_MAIN() { return 1; }
12619#endif
12620int
12621main ()
12622{
12623if ((struct tm *) 0)
12624return 0;
12625 ;
12626 return 0;
12627}
12628_ACEOF
12629rm -f conftest.$ac_objext
12630if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12631 (eval $ac_compile) 2>&5
12632 ac_status=$?
12633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12634 (exit $ac_status); } &&
12635 { ac_try='test -s conftest.$ac_objext'
12636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12637 (eval $ac_try) 2>&5
12638 ac_status=$?
12639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12640 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012641 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012642else
Martin v. Löwis11437992002-04-12 09:54:03 +000012643 echo "$as_me: failed program was:" >&5
12644cat conftest.$ac_ext >&5
12645ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012646fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012647rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012648fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012649echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12650echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012651if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012652
12653cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012654#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012655_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012656
12657fi
12658
Martin v. Löwis11437992002-04-12 09:54:03 +000012659echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12660echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12661if test "${ac_cv_struct_tm+set}" = set; then
12662 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012663else
Martin v. Löwis11437992002-04-12 09:54:03 +000012664 cat >conftest.$ac_ext <<_ACEOF
12665#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012666#include "confdefs.h"
12667#include <sys/types.h>
12668#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012669
12670#ifdef F77_DUMMY_MAIN
12671# ifdef __cplusplus
12672 extern "C"
12673# endif
12674 int F77_DUMMY_MAIN() { return 1; }
12675#endif
12676int
12677main ()
12678{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012679struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 ;
12681 return 0;
12682}
12683_ACEOF
12684rm -f conftest.$ac_objext
12685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12686 (eval $ac_compile) 2>&5
12687 ac_status=$?
12688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12689 (exit $ac_status); } &&
12690 { ac_try='test -s conftest.$ac_objext'
12691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12692 (eval $ac_try) 2>&5
12693 ac_status=$?
12694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12695 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012696 ac_cv_struct_tm=time.h
12697else
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 echo "$as_me: failed program was:" >&5
12699cat conftest.$ac_ext >&5
12700ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012701fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012702rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012703fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012704echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12705echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012706if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
12708cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012709#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012710_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012711
12712fi
12713
Martin v. Löwis11437992002-04-12 09:54:03 +000012714echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12715echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12716if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12717 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012718else
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 cat >conftest.$ac_ext <<_ACEOF
12720#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012721#include "confdefs.h"
12722#include <sys/types.h>
12723#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012724
12725
12726#ifdef F77_DUMMY_MAIN
12727# ifdef __cplusplus
12728 extern "C"
12729# endif
12730 int F77_DUMMY_MAIN() { return 1; }
12731#endif
12732int
12733main ()
12734{
12735static struct tm ac_aggr;
12736if (ac_aggr.tm_zone)
12737return 0;
12738 ;
12739 return 0;
12740}
12741_ACEOF
12742rm -f conftest.$ac_objext
12743if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12744 (eval $ac_compile) 2>&5
12745 ac_status=$?
12746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12747 (exit $ac_status); } &&
12748 { ac_try='test -s conftest.$ac_objext'
12749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12750 (eval $ac_try) 2>&5
12751 ac_status=$?
12752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12753 (exit $ac_status); }; }; then
12754 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012755else
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 echo "$as_me: failed program was:" >&5
12757cat conftest.$ac_ext >&5
12758ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012759fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012760rm -f conftest.$ac_objext conftest.$ac_ext
12761fi
12762echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12763echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12764if test $ac_cv_member_struct_tm_tm_zone = yes; then
12765
12766cat >>confdefs.h <<_ACEOF
12767#define HAVE_STRUCT_TM_TM_ZONE 1
12768_ACEOF
12769
12770
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012771fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012772
Martin v. Löwis11437992002-04-12 09:54:03 +000012773if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12774
12775cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012776#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012777_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012778
12779else
Martin v. Löwis11437992002-04-12 09:54:03 +000012780 echo "$as_me:$LINENO: checking for tzname" >&5
12781echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12782if test "${ac_cv_var_tzname+set}" = set; then
12783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012784else
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 cat >conftest.$ac_ext <<_ACEOF
12786#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012787#include "confdefs.h"
12788#include <time.h>
12789#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012790extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012792
12793#ifdef F77_DUMMY_MAIN
12794# ifdef __cplusplus
12795 extern "C"
12796# endif
12797 int F77_DUMMY_MAIN() { return 1; }
12798#endif
12799int
12800main ()
12801{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012802atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 ;
12804 return 0;
12805}
12806_ACEOF
12807rm -f conftest.$ac_objext conftest$ac_exeext
12808if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12809 (eval $ac_link) 2>&5
12810 ac_status=$?
12811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12812 (exit $ac_status); } &&
12813 { ac_try='test -s conftest$ac_exeext'
12814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12815 (eval $ac_try) 2>&5
12816 ac_status=$?
12817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12818 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012819 ac_cv_var_tzname=yes
12820else
Martin v. Löwis11437992002-04-12 09:54:03 +000012821 echo "$as_me: failed program was:" >&5
12822cat conftest.$ac_ext >&5
12823ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012824fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012825rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012826fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012827echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12828echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012829 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012830
12831cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012833_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012834
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012835 fi
12836fi
12837
Jack Jansendd19cf82001-12-06 22:36:17 +000012838
Martin v. Löwis11437992002-04-12 09:54:03 +000012839echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12840echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12841if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12842 echo $ECHO_N "(cached) $ECHO_C" >&6
12843else
12844 cat >conftest.$ac_ext <<_ACEOF
12845#line $LINENO "configure"
12846#include "confdefs.h"
12847$ac_includes_default
12848#ifdef F77_DUMMY_MAIN
12849# ifdef __cplusplus
12850 extern "C"
12851# endif
12852 int F77_DUMMY_MAIN() { return 1; }
12853#endif
12854int
12855main ()
12856{
12857static struct stat ac_aggr;
12858if (ac_aggr.st_rdev)
12859return 0;
12860 ;
12861 return 0;
12862}
12863_ACEOF
12864rm -f conftest.$ac_objext
12865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12866 (eval $ac_compile) 2>&5
12867 ac_status=$?
12868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12869 (exit $ac_status); } &&
12870 { ac_try='test -s conftest.$ac_objext'
12871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12872 (eval $ac_try) 2>&5
12873 ac_status=$?
12874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12875 (exit $ac_status); }; }; then
12876 ac_cv_member_struct_stat_st_rdev=yes
12877else
12878 echo "$as_me: failed program was:" >&5
12879cat conftest.$ac_ext >&5
12880ac_cv_member_struct_stat_st_rdev=no
12881fi
12882rm -f conftest.$ac_objext conftest.$ac_ext
12883fi
12884echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12885echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12886if test $ac_cv_member_struct_stat_st_rdev = yes; then
12887
12888cat >>confdefs.h <<_ACEOF
12889#define HAVE_STRUCT_STAT_ST_RDEV 1
12890_ACEOF
12891
12892
12893cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012894#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012895_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012896
12897fi
12898
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
12900
12901echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12902echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12903if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12904 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012905else
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 cat >conftest.$ac_ext <<_ACEOF
12907#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012908#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012909$ac_includes_default
12910#ifdef F77_DUMMY_MAIN
12911# ifdef __cplusplus
12912 extern "C"
12913# endif
12914 int F77_DUMMY_MAIN() { return 1; }
12915#endif
12916int
12917main ()
12918{
12919static struct stat ac_aggr;
12920if (ac_aggr.st_blksize)
12921return 0;
12922 ;
12923 return 0;
12924}
12925_ACEOF
12926rm -f conftest.$ac_objext
12927if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12928 (eval $ac_compile) 2>&5
12929 ac_status=$?
12930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12931 (exit $ac_status); } &&
12932 { ac_try='test -s conftest.$ac_objext'
12933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12934 (eval $ac_try) 2>&5
12935 ac_status=$?
12936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12937 (exit $ac_status); }; }; then
12938 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012939else
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 echo "$as_me: failed program was:" >&5
12941cat conftest.$ac_ext >&5
12942ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012943fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012944rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012945fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012946echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12947echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12948if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012949
Martin v. Löwis11437992002-04-12 09:54:03 +000012950cat >>confdefs.h <<_ACEOF
12951#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12952_ACEOF
12953
12954
12955cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012956#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012957_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012958
12959fi
12960
Martin v. Löwis11437992002-04-12 09:54:03 +000012961
12962echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12963echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12964if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12965 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012966else
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 cat >conftest.$ac_ext <<_ACEOF
12968#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012969#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012970$ac_includes_default
12971#ifdef F77_DUMMY_MAIN
12972# ifdef __cplusplus
12973 extern "C"
12974# endif
12975 int F77_DUMMY_MAIN() { return 1; }
12976#endif
12977int
12978main ()
12979{
12980static struct stat ac_aggr;
12981if (ac_aggr.st_blocks)
12982return 0;
12983 ;
12984 return 0;
12985}
12986_ACEOF
12987rm -f conftest.$ac_objext
12988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12989 (eval $ac_compile) 2>&5
12990 ac_status=$?
12991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12992 (exit $ac_status); } &&
12993 { ac_try='test -s conftest.$ac_objext'
12994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12995 (eval $ac_try) 2>&5
12996 ac_status=$?
12997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12998 (exit $ac_status); }; }; then
12999 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013000else
Martin v. Löwis11437992002-04-12 09:54:03 +000013001 echo "$as_me: failed program was:" >&5
13002cat conftest.$ac_ext >&5
13003ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013004fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013005rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013006fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013007echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13008echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13009if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013010
Martin v. Löwis11437992002-04-12 09:54:03 +000013011cat >>confdefs.h <<_ACEOF
13012#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13013_ACEOF
13014
13015
13016cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013017#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013018_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013019
13020else
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013022fi
13023
Michael W. Hudson54241132001-12-07 15:38:26 +000013024
Martin v. Löwis11437992002-04-12 09:54:03 +000013025
13026echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13027echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13028if test "${ac_cv_header_time_altzone+set}" = set; then
13029 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013030else
Martin v. Löwis11437992002-04-12 09:54:03 +000013031 cat >conftest.$ac_ext <<_ACEOF
13032#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013033#include "confdefs.h"
13034#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013035#ifdef F77_DUMMY_MAIN
13036# ifdef __cplusplus
13037 extern "C"
13038# endif
13039 int F77_DUMMY_MAIN() { return 1; }
13040#endif
13041int
13042main ()
13043{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013044return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 ;
13046 return 0;
13047}
13048_ACEOF
13049rm -f conftest.$ac_objext
13050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13051 (eval $ac_compile) 2>&5
13052 ac_status=$?
13053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13054 (exit $ac_status); } &&
13055 { ac_try='test -s conftest.$ac_objext'
13056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13057 (eval $ac_try) 2>&5
13058 ac_status=$?
13059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13060 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013061 ac_cv_header_time_altzone=yes
13062else
Martin v. Löwis11437992002-04-12 09:54:03 +000013063 echo "$as_me: failed program was:" >&5
13064cat conftest.$ac_ext >&5
13065ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013066fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013067rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013068fi
13069
Martin v. Löwis11437992002-04-12 09:54:03 +000013070echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13071echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013072if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013073
13074cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013075#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013076_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013077
13078fi
13079
Guido van Rossumda88dad1995-01-26 00:46:29 +000013080was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013081echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13082echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13083cat >conftest.$ac_ext <<_ACEOF
13084#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013085#include "confdefs.h"
13086
13087#include <sys/types.h>
13088#include <sys/select.h>
13089#include <sys/time.h>
13090
Martin v. Löwis11437992002-04-12 09:54:03 +000013091#ifdef F77_DUMMY_MAIN
13092# ifdef __cplusplus
13093 extern "C"
13094# endif
13095 int F77_DUMMY_MAIN() { return 1; }
13096#endif
13097int
13098main ()
13099{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013100;
Martin v. Löwis11437992002-04-12 09:54:03 +000013101 ;
13102 return 0;
13103}
13104_ACEOF
13105rm -f conftest.$ac_objext
13106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13107 (eval $ac_compile) 2>&5
13108 ac_status=$?
13109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13110 (exit $ac_status); } &&
13111 { ac_try='test -s conftest.$ac_objext'
13112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13113 (eval $ac_try) 2>&5
13114 ac_status=$?
13115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13116 (exit $ac_status); }; }; then
13117
13118
13119cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013120#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013121_ACEOF
13122
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013123 was_it_defined=yes
13124
Guido van Rossumf78abae1997-01-21 22:02:36 +000013125else
Martin v. Löwis11437992002-04-12 09:54:03 +000013126 echo "$as_me: failed program was:" >&5
13127cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013129rm -f conftest.$ac_objext conftest.$ac_ext
13130echo "$as_me:$LINENO: result: $was_it_defined" >&5
13131echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013132
Martin v. Löwis11437992002-04-12 09:54:03 +000013133echo "$as_me:$LINENO: checking for addrinfo" >&5
13134echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13135if test "${ac_cv_struct_addrinfo+set}" = set; then
13136 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013137else
Martin v. Löwis11437992002-04-12 09:54:03 +000013138 cat >conftest.$ac_ext <<_ACEOF
13139#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013140#include "confdefs.h"
13141
13142# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013143#ifdef F77_DUMMY_MAIN
13144# ifdef __cplusplus
13145 extern "C"
13146# endif
13147 int F77_DUMMY_MAIN() { return 1; }
13148#endif
13149int
13150main ()
13151{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013152struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 ;
13154 return 0;
13155}
13156_ACEOF
13157rm -f conftest.$ac_objext
13158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13159 (eval $ac_compile) 2>&5
13160 ac_status=$?
13161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13162 (exit $ac_status); } &&
13163 { ac_try='test -s conftest.$ac_objext'
13164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13165 (eval $ac_try) 2>&5
13166 ac_status=$?
13167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13168 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013169 ac_cv_struct_addrinfo=yes
13170else
Martin v. Löwis11437992002-04-12 09:54:03 +000013171 echo "$as_me: failed program was:" >&5
13172cat conftest.$ac_ext >&5
13173ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013175rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013176fi
13177
Martin v. Löwis11437992002-04-12 09:54:03 +000013178echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13179echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013180if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013181
13182cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013183#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013184_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013185
13186fi
13187
Martin v. Löwis11437992002-04-12 09:54:03 +000013188echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13189echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13190if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13191 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013192else
Martin v. Löwis11437992002-04-12 09:54:03 +000013193 cat >conftest.$ac_ext <<_ACEOF
13194#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013195#include "confdefs.h"
13196
13197# include <sys/types.h>
13198# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013199#ifdef F77_DUMMY_MAIN
13200# ifdef __cplusplus
13201 extern "C"
13202# endif
13203 int F77_DUMMY_MAIN() { return 1; }
13204#endif
13205int
13206main ()
13207{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013208struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013209 ;
13210 return 0;
13211}
13212_ACEOF
13213rm -f conftest.$ac_objext
13214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13215 (eval $ac_compile) 2>&5
13216 ac_status=$?
13217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13218 (exit $ac_status); } &&
13219 { ac_try='test -s conftest.$ac_objext'
13220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13221 (eval $ac_try) 2>&5
13222 ac_status=$?
13223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13224 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013225 ac_cv_struct_sockaddr_storage=yes
13226else
Martin v. Löwis11437992002-04-12 09:54:03 +000013227 echo "$as_me: failed program was:" >&5
13228cat conftest.$ac_ext >&5
13229ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013231rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013232fi
13233
Martin v. Löwis11437992002-04-12 09:54:03 +000013234echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13235echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013236if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
13238cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013239#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013240_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013241
13242fi
13243
Guido van Rossum627b2d71993-12-24 10:39:16 +000013244# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013245
Michael W. Hudson54241132001-12-07 15:38:26 +000013246
Martin v. Löwis11437992002-04-12 09:54:03 +000013247echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13248echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13249if test "${ac_cv_c_char_unsigned+set}" = set; then
13250 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013251else
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 cat >conftest.$ac_ext <<_ACEOF
13253#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013254#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013255$ac_includes_default
13256#ifdef F77_DUMMY_MAIN
13257# ifdef __cplusplus
13258 extern "C"
13259# endif
13260 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013262int
13263main ()
13264{
13265static int test_array [1 - 2 * !(((char) -1) < 0)];
13266test_array [0] = 0
13267
13268 ;
13269 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013270}
Martin v. Löwis11437992002-04-12 09:54:03 +000013271_ACEOF
13272rm -f conftest.$ac_objext
13273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13274 (eval $ac_compile) 2>&5
13275 ac_status=$?
13276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13277 (exit $ac_status); } &&
13278 { ac_try='test -s conftest.$ac_objext'
13279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13280 (eval $ac_try) 2>&5
13281 ac_status=$?
13282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13283 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013284 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013285else
13286 echo "$as_me: failed program was:" >&5
13287cat conftest.$ac_ext >&5
13288ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013290rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013291fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013292echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13293echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013294if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013295 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013296#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013297_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013298
13299fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013300
Martin v. Löwis11437992002-04-12 09:54:03 +000013301echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13302echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13303if test "${ac_cv_prog_cc_stdc+set}" = set; then
13304 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305else
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 ac_cv_prog_cc_stdc=no
13307ac_save_CC=$CC
13308cat >conftest.$ac_ext <<_ACEOF
13309#line $LINENO "configure"
13310#include "confdefs.h"
13311#include <stdarg.h>
13312#include <stdio.h>
13313#include <sys/types.h>
13314#include <sys/stat.h>
13315/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13316struct buf { int x; };
13317FILE * (*rcsopen) (struct buf *, struct stat *, int);
13318static char *e (p, i)
13319 char **p;
13320 int i;
13321{
13322 return p[i];
13323}
13324static char *f (char * (*g) (char **, int), char **p, ...)
13325{
13326 char *s;
13327 va_list v;
13328 va_start (v,p);
13329 s = g (p, va_arg (v,int));
13330 va_end (v);
13331 return s;
13332}
13333int test (int i, double x);
13334struct s1 {int (*f) (int a);};
13335struct s2 {int (*f) (double a);};
13336int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13337int argc;
13338char **argv;
13339#ifdef F77_DUMMY_MAIN
13340# ifdef __cplusplus
13341 extern "C"
13342# endif
13343 int F77_DUMMY_MAIN() { return 1; }
13344#endif
13345int
13346main ()
13347{
13348return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13349 ;
13350 return 0;
13351}
13352_ACEOF
13353# Don't try gcc -ansi; that turns off useful extensions and
13354# breaks some systems' header files.
13355# AIX -qlanglvl=ansi
13356# Ultrix and OSF/1 -std1
13357# HP-UX 10.20 and later -Ae
13358# HP-UX older versions -Aa -D_HPUX_SOURCE
13359# SVR4 -Xc -D__EXTENSIONS__
13360for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13361do
13362 CC="$ac_save_CC $ac_arg"
13363 rm -f conftest.$ac_objext
13364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13365 (eval $ac_compile) 2>&5
13366 ac_status=$?
13367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13368 (exit $ac_status); } &&
13369 { ac_try='test -s conftest.$ac_objext'
13370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13371 (eval $ac_try) 2>&5
13372 ac_status=$?
13373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13374 (exit $ac_status); }; }; then
13375 ac_cv_prog_cc_stdc=$ac_arg
13376break
13377else
13378 echo "$as_me: failed program was:" >&5
13379cat conftest.$ac_ext >&5
13380fi
13381rm -f conftest.$ac_objext
13382done
13383rm -f conftest.$ac_ext conftest.$ac_objext
13384CC=$ac_save_CC
13385
13386fi
13387
13388case "x$ac_cv_prog_cc_stdc" in
13389 x|xno)
13390 echo "$as_me:$LINENO: result: none needed" >&5
13391echo "${ECHO_T}none needed" >&6 ;;
13392 *)
13393 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13394echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13395 CC="$CC $ac_cv_prog_cc_stdc" ;;
13396esac
13397
13398echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13399echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13400if test "${ac_cv_c_const+set}" = set; then
13401 echo $ECHO_N "(cached) $ECHO_C" >&6
13402else
13403 cat >conftest.$ac_ext <<_ACEOF
13404#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013405#include "confdefs.h"
13406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407#ifdef F77_DUMMY_MAIN
13408# ifdef __cplusplus
13409 extern "C"
13410# endif
13411 int F77_DUMMY_MAIN() { return 1; }
13412#endif
13413int
13414main ()
13415{
13416/* FIXME: Include the comments suggested by Paul. */
13417#ifndef __cplusplus
13418 /* Ultrix mips cc rejects this. */
13419 typedef int charset[2];
13420 const charset x;
13421 /* SunOS 4.1.1 cc rejects this. */
13422 char const *const *ccp;
13423 char **p;
13424 /* NEC SVR4.0.2 mips cc rejects this. */
13425 struct point {int x, y;};
13426 static struct point const zero = {0,0};
13427 /* AIX XL C 1.02.0.0 rejects this.
13428 It does not let you subtract one const X* pointer from another in
13429 an arm of an if-expression whose if-part is not a constant
13430 expression */
13431 const char *g = "string";
13432 ccp = &g + (g ? g-g : 0);
13433 /* HPUX 7.0 cc rejects these. */
13434 ++ccp;
13435 p = (char**) ccp;
13436 ccp = (char const *const *) p;
13437 { /* SCO 3.2v4 cc rejects this. */
13438 char *t;
13439 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013440
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 *t++ = 0;
13442 }
13443 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13444 int x[] = {25, 17};
13445 const int *foo = &x[0];
13446 ++foo;
13447 }
13448 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13449 typedef const int *iptr;
13450 iptr p = 0;
13451 ++p;
13452 }
13453 { /* AIX XL C 1.02.0.0 rejects this saying
13454 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13455 struct s { int j; const int *ap[3]; };
13456 struct s *b; b->j = 5;
13457 }
13458 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13459 const int foo = 10;
13460 }
13461#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013462
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 ;
13464 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013465}
Martin v. Löwis11437992002-04-12 09:54:03 +000013466_ACEOF
13467rm -f conftest.$ac_objext
13468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13469 (eval $ac_compile) 2>&5
13470 ac_status=$?
13471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13472 (exit $ac_status); } &&
13473 { ac_try='test -s conftest.$ac_objext'
13474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13475 (eval $ac_try) 2>&5
13476 ac_status=$?
13477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13478 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013479 ac_cv_c_const=yes
13480else
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 echo "$as_me: failed program was:" >&5
13482cat conftest.$ac_ext >&5
13483ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013484fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013485rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013486fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013487echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13488echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013489if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013490
13491cat >>confdefs.h <<\_ACEOF
13492#define const
13493_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013494
13495fi
13496
Michael W. Hudson54241132001-12-07 15:38:26 +000013497
Guido van Rossumda88dad1995-01-26 00:46:29 +000013498works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013499echo "$as_me:$LINENO: checking for working volatile" >&5
13500echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13501cat >conftest.$ac_ext <<_ACEOF
13502#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013503#include "confdefs.h"
13504
Martin v. Löwis11437992002-04-12 09:54:03 +000013505#ifdef F77_DUMMY_MAIN
13506# ifdef __cplusplus
13507 extern "C"
13508# endif
13509 int F77_DUMMY_MAIN() { return 1; }
13510#endif
13511int
13512main ()
13513{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013514volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013515 ;
13516 return 0;
13517}
13518_ACEOF
13519rm -f conftest.$ac_objext
13520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13521 (eval $ac_compile) 2>&5
13522 ac_status=$?
13523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13524 (exit $ac_status); } &&
13525 { ac_try='test -s conftest.$ac_objext'
13526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13527 (eval $ac_try) 2>&5
13528 ac_status=$?
13529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013531 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013532else
Martin v. Löwis11437992002-04-12 09:54:03 +000013533 echo "$as_me: failed program was:" >&5
13534cat conftest.$ac_ext >&5
13535
13536cat >>confdefs.h <<\_ACEOF
13537#define volatile
13538_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013539
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013540
Guido van Rossum627b2d71993-12-24 10:39:16 +000013541fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013542rm -f conftest.$ac_objext conftest.$ac_ext
13543echo "$as_me:$LINENO: result: $works" >&5
13544echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013545
Guido van Rossumda88dad1995-01-26 00:46:29 +000013546works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013547echo "$as_me:$LINENO: checking for working signed char" >&5
13548echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13549cat >conftest.$ac_ext <<_ACEOF
13550#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013551#include "confdefs.h"
13552
Martin v. Löwis11437992002-04-12 09:54:03 +000013553#ifdef F77_DUMMY_MAIN
13554# ifdef __cplusplus
13555 extern "C"
13556# endif
13557 int F77_DUMMY_MAIN() { return 1; }
13558#endif
13559int
13560main ()
13561{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013562signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 ;
13564 return 0;
13565}
13566_ACEOF
13567rm -f conftest.$ac_objext
13568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13569 (eval $ac_compile) 2>&5
13570 ac_status=$?
13571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13572 (exit $ac_status); } &&
13573 { ac_try='test -s conftest.$ac_objext'
13574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13575 (eval $ac_try) 2>&5
13576 ac_status=$?
13577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13578 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013579 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013580else
Martin v. Löwis11437992002-04-12 09:54:03 +000013581 echo "$as_me: failed program was:" >&5
13582cat conftest.$ac_ext >&5
13583
13584cat >>confdefs.h <<\_ACEOF
13585#define signed
13586_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013587
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013588
Guido van Rossum7f43da71994-08-01 12:15:30 +000013589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013590rm -f conftest.$ac_objext conftest.$ac_ext
13591echo "$as_me:$LINENO: result: $works" >&5
13592echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013593
Guido van Rossumda88dad1995-01-26 00:46:29 +000013594have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013595echo "$as_me:$LINENO: checking for prototypes" >&5
13596echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13597cat >conftest.$ac_ext <<_ACEOF
13598#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013599#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013600int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013601#ifdef F77_DUMMY_MAIN
13602# ifdef __cplusplus
13603 extern "C"
13604# endif
13605 int F77_DUMMY_MAIN() { return 1; }
13606#endif
13607int
13608main ()
13609{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013610return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013611 ;
13612 return 0;
13613}
13614_ACEOF
13615rm -f conftest.$ac_objext
13616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13617 (eval $ac_compile) 2>&5
13618 ac_status=$?
13619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13620 (exit $ac_status); } &&
13621 { ac_try='test -s conftest.$ac_objext'
13622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13623 (eval $ac_try) 2>&5
13624 ac_status=$?
13625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13626 (exit $ac_status); }; }; then
13627
13628
13629cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013630#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013631_ACEOF
13632
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013633 have_prototypes=yes
13634
Guido van Rossumf78abae1997-01-21 22:02:36 +000013635else
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 echo "$as_me: failed program was:" >&5
13637cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013638fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013639rm -f conftest.$ac_objext conftest.$ac_ext
13640echo "$as_me:$LINENO: result: $have_prototypes" >&5
13641echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013642
Guido van Rossumda88dad1995-01-26 00:46:29 +000013643works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013644echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13645echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13646cat >conftest.$ac_ext <<_ACEOF
13647#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013648#include "confdefs.h"
13649
13650#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013651int foo(int x, ...) {
13652 va_list va;
13653 va_start(va, x);
13654 va_arg(va, int);
13655 va_arg(va, char *);
13656 va_arg(va, double);
13657 return 0;
13658}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013659
Martin v. Löwis11437992002-04-12 09:54:03 +000013660#ifdef F77_DUMMY_MAIN
13661# ifdef __cplusplus
13662 extern "C"
13663# endif
13664 int F77_DUMMY_MAIN() { return 1; }
13665#endif
13666int
13667main ()
13668{
Guido van Rossum90eea071996-08-30 20:58:57 +000013669return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013670 ;
13671 return 0;
13672}
13673_ACEOF
13674rm -f conftest.$ac_objext
13675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13676 (eval $ac_compile) 2>&5
13677 ac_status=$?
13678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13679 (exit $ac_status); } &&
13680 { ac_try='test -s conftest.$ac_objext'
13681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13682 (eval $ac_try) 2>&5
13683 ac_status=$?
13684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13685 (exit $ac_status); }; }; then
13686
13687
13688cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013689#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013690_ACEOF
13691
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013692 works=yes
13693
Guido van Rossumf78abae1997-01-21 22:02:36 +000013694else
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 echo "$as_me: failed program was:" >&5
13696cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013697fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013698rm -f conftest.$ac_objext conftest.$ac_ext
13699echo "$as_me:$LINENO: result: $works" >&5
13700echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013701
Guido van Rossumda88dad1995-01-26 00:46:29 +000013702if test "$have_prototypes" = yes; then
13703bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013704echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13705echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13706cat >conftest.$ac_ext <<_ACEOF
13707#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013708#include "confdefs.h"
13709#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013710#ifdef F77_DUMMY_MAIN
13711# ifdef __cplusplus
13712 extern "C"
13713# endif
13714 int F77_DUMMY_MAIN() { return 1; }
13715#endif
13716int
13717main ()
13718{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013719char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013720 ;
13721 return 0;
13722}
13723_ACEOF
13724rm -f conftest.$ac_objext
13725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13726 (eval $ac_compile) 2>&5
13727 ac_status=$?
13728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13729 (exit $ac_status); } &&
13730 { ac_try='test -s conftest.$ac_objext'
13731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13732 (eval $ac_try) 2>&5
13733 ac_status=$?
13734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13735 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013736 :
13737else
Martin v. Löwis11437992002-04-12 09:54:03 +000013738 echo "$as_me: failed program was:" >&5
13739cat conftest.$ac_ext >&5
13740
13741cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013742#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013743_ACEOF
13744
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013745 bad_prototypes=yes
13746
Guido van Rossum627b2d71993-12-24 10:39:16 +000013747fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013748rm -f conftest.$ac_objext conftest.$ac_ext
13749echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13750echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013751fi
13752
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013753# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013754echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13755echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13756cat >conftest.$ac_ext <<_ACEOF
13757#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013758#include "confdefs.h"
13759#include <sys/types.h>
13760#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013761#ifdef F77_DUMMY_MAIN
13762# ifdef __cplusplus
13763 extern "C"
13764# endif
13765 int F77_DUMMY_MAIN() { return 1; }
13766#endif
13767int
13768main ()
13769{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013770struct sockaddr x;
13771x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 ;
13773 return 0;
13774}
13775_ACEOF
13776rm -f conftest.$ac_objext
13777if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13778 (eval $ac_compile) 2>&5
13779 ac_status=$?
13780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13781 (exit $ac_status); } &&
13782 { ac_try='test -s conftest.$ac_objext'
13783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13784 (eval $ac_try) 2>&5
13785 ac_status=$?
13786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13787 (exit $ac_status); }; }; then
13788 echo "$as_me:$LINENO: result: yes" >&5
13789echo "${ECHO_T}yes" >&6
13790
13791cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013792#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013793_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013794
13795else
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 echo "$as_me: failed program was:" >&5
13797cat conftest.$ac_ext >&5
13798echo "$as_me:$LINENO: result: no" >&5
13799echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013800fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013801rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013802
Martin v. Löwis11437992002-04-12 09:54:03 +000013803echo "$as_me:$LINENO: checking for bad static forward" >&5
13804echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13805if test "${ac_cv_bad_static_forward+set}" = set; then
13806 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013807else
13808 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013809 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013810else
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 cat >conftest.$ac_ext <<_ACEOF
13812#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013813#include "confdefs.h"
13814
13815struct s { int a; int b; };
13816static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013817int foobar() {
13818 static int random;
13819 random = (int) &foo;
13820 return random;
13821}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013822static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013823main() {
13824 exit(!((int)&foo == foobar()));
13825}
Martin v. Löwis11437992002-04-12 09:54:03 +000013826_ACEOF
13827rm -f conftest$ac_exeext
13828if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13829 (eval $ac_link) 2>&5
13830 ac_status=$?
13831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13832 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13834 (eval $ac_try) 2>&5
13835 ac_status=$?
13836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13837 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013838 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013839else
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 echo "$as_me: program exited with status $ac_status" >&5
13841echo "$as_me: failed program was:" >&5
13842cat conftest.$ac_ext >&5
13843( exit $ac_status )
13844ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013845fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013846rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13847fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013848fi
13849
Martin v. Löwis11437992002-04-12 09:54:03 +000013850echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13851echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013852if test "$ac_cv_bad_static_forward" = yes
13853then
Martin v. Löwis11437992002-04-12 09:54:03 +000013854
13855cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013856#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013857_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013858
13859fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013860
Guido van Rossumda88dad1995-01-26 00:46:29 +000013861va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013862echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13863echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13864cat >conftest.$ac_ext <<_ACEOF
13865#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013866#include "confdefs.h"
13867
13868#ifdef HAVE_STDARG_PROTOTYPES
13869#include <stdarg.h>
13870#else
13871#include <varargs.h>
13872#endif
13873
Martin v. Löwis11437992002-04-12 09:54:03 +000013874#ifdef F77_DUMMY_MAIN
13875# ifdef __cplusplus
13876 extern "C"
13877# endif
13878 int F77_DUMMY_MAIN() { return 1; }
13879#endif
13880int
13881main ()
13882{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013883va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013884 ;
13885 return 0;
13886}
13887_ACEOF
13888rm -f conftest.$ac_objext
13889if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13890 (eval $ac_compile) 2>&5
13891 ac_status=$?
13892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13893 (exit $ac_status); } &&
13894 { ac_try='test -s conftest.$ac_objext'
13895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13896 (eval $ac_try) 2>&5
13897 ac_status=$?
13898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13899 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013900 :
13901else
Martin v. Löwis11437992002-04-12 09:54:03 +000013902 echo "$as_me: failed program was:" >&5
13903cat conftest.$ac_ext >&5
13904
13905
13906cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013907#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013908_ACEOF
13909
Guido van Rossumda88dad1995-01-26 00:46:29 +000013910 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013911
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013912fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013913rm -f conftest.$ac_objext conftest.$ac_ext
13914echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13915echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013916
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013917# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013918
13919
13920
13921echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13922echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13923if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13924 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013925else
Martin v. Löwis11437992002-04-12 09:54:03 +000013926 cat >conftest.$ac_ext <<_ACEOF
13927#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013928#include "confdefs.h"
13929/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013930 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013931#include <assert.h>
13932/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013933#ifdef __cplusplus
13934extern "C"
13935#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013936/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 builtin and then its argument prototype would still apply. */
13938char gethostbyname_r ();
13939char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013940
Martin v. Löwis11437992002-04-12 09:54:03 +000013941#ifdef F77_DUMMY_MAIN
13942# ifdef __cplusplus
13943 extern "C"
13944# endif
13945 int F77_DUMMY_MAIN() { return 1; }
13946#endif
13947int
13948main ()
13949{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013950/* The GNU C library defines this for functions which it implements
13951 to always fail with ENOSYS. Some functions are actually named
13952 something starting with __ and the normal name is an alias. */
13953#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13954choke me
13955#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013956f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013957#endif
13958
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 ;
13960 return 0;
13961}
13962_ACEOF
13963rm -f conftest.$ac_objext conftest$ac_exeext
13964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13965 (eval $ac_link) 2>&5
13966 ac_status=$?
13967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13968 (exit $ac_status); } &&
13969 { ac_try='test -s conftest$ac_exeext'
13970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13971 (eval $ac_try) 2>&5
13972 ac_status=$?
13973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13974 (exit $ac_status); }; }; then
13975 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013976else
Martin v. Löwis11437992002-04-12 09:54:03 +000013977 echo "$as_me: failed program was:" >&5
13978cat conftest.$ac_ext >&5
13979ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013981rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013982fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013983echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13984echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13985if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013986
Martin v. Löwis11437992002-04-12 09:54:03 +000013987 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013988#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013989_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013990
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13992echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013993 OLD_CFLAGS=$CFLAGS
13994 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 cat >conftest.$ac_ext <<_ACEOF
13996#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013997#include "confdefs.h"
13998
13999# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014000
14001#ifdef F77_DUMMY_MAIN
14002# ifdef __cplusplus
14003 extern "C"
14004# endif
14005 int F77_DUMMY_MAIN() { return 1; }
14006#endif
14007int
14008main ()
14009{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014010
14011 char *name;
14012 struct hostent *he, *res;
14013 char buffer[2048];
14014 int buflen = 2048;
14015 int h_errnop;
14016
14017 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014018
14019 ;
14020 return 0;
14021}
14022_ACEOF
14023rm -f conftest.$ac_objext
14024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14025 (eval $ac_compile) 2>&5
14026 ac_status=$?
14027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14028 (exit $ac_status); } &&
14029 { ac_try='test -s conftest.$ac_objext'
14030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14031 (eval $ac_try) 2>&5
14032 ac_status=$?
14033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14034 (exit $ac_status); }; }; then
14035
14036 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014037#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014038_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014039
Martin v. Löwis11437992002-04-12 09:54:03 +000014040
14041cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014042#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014043_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014044
Martin v. Löwis11437992002-04-12 09:54:03 +000014045 echo "$as_me:$LINENO: result: yes" >&5
14046echo "${ECHO_T}yes" >&6
14047
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014048else
Martin v. Löwis11437992002-04-12 09:54:03 +000014049 echo "$as_me: failed program was:" >&5
14050cat conftest.$ac_ext >&5
14051
14052 echo "$as_me:$LINENO: result: no" >&5
14053echo "${ECHO_T}no" >&6
14054 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14055echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14056 cat >conftest.$ac_ext <<_ACEOF
14057#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014058#include "confdefs.h"
14059
14060# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014061
14062#ifdef F77_DUMMY_MAIN
14063# ifdef __cplusplus
14064 extern "C"
14065# endif
14066 int F77_DUMMY_MAIN() { return 1; }
14067#endif
14068int
14069main ()
14070{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014071
14072 char *name;
14073 struct hostent *he;
14074 char buffer[2048];
14075 int buflen = 2048;
14076 int h_errnop;
14077
14078 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014079
14080 ;
14081 return 0;
14082}
14083_ACEOF
14084rm -f conftest.$ac_objext
14085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14086 (eval $ac_compile) 2>&5
14087 ac_status=$?
14088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14089 (exit $ac_status); } &&
14090 { ac_try='test -s conftest.$ac_objext'
14091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14092 (eval $ac_try) 2>&5
14093 ac_status=$?
14094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14095 (exit $ac_status); }; }; then
14096
14097 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014098#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014099_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014100
Martin v. Löwis11437992002-04-12 09:54:03 +000014101
14102cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014103#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014104_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014105
Martin v. Löwis11437992002-04-12 09:54:03 +000014106 echo "$as_me:$LINENO: result: yes" >&5
14107echo "${ECHO_T}yes" >&6
14108
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014109else
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 echo "$as_me: failed program was:" >&5
14111cat conftest.$ac_ext >&5
14112
14113 echo "$as_me:$LINENO: result: no" >&5
14114echo "${ECHO_T}no" >&6
14115 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14116echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14117 cat >conftest.$ac_ext <<_ACEOF
14118#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014119#include "confdefs.h"
14120
14121# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014122
14123#ifdef F77_DUMMY_MAIN
14124# ifdef __cplusplus
14125 extern "C"
14126# endif
14127 int F77_DUMMY_MAIN() { return 1; }
14128#endif
14129int
14130main ()
14131{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014132
14133 char *name;
14134 struct hostent *he;
14135 struct hostent_data data;
14136
14137 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014138
14139 ;
14140 return 0;
14141}
14142_ACEOF
14143rm -f conftest.$ac_objext
14144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14145 (eval $ac_compile) 2>&5
14146 ac_status=$?
14147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14148 (exit $ac_status); } &&
14149 { ac_try='test -s conftest.$ac_objext'
14150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14151 (eval $ac_try) 2>&5
14152 ac_status=$?
14153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14154 (exit $ac_status); }; }; then
14155
14156 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014157#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014158_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014159
Martin v. Löwis11437992002-04-12 09:54:03 +000014160
14161cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014162#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014163_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014164
Martin v. Löwis11437992002-04-12 09:54:03 +000014165 echo "$as_me:$LINENO: result: yes" >&5
14166echo "${ECHO_T}yes" >&6
14167
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014168else
Martin v. Löwis11437992002-04-12 09:54:03 +000014169 echo "$as_me: failed program was:" >&5
14170cat conftest.$ac_ext >&5
14171
14172 echo "$as_me:$LINENO: result: no" >&5
14173echo "${ECHO_T}no" >&6
14174
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014176rm -f conftest.$ac_objext conftest.$ac_ext
14177
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014178fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014179rm -f conftest.$ac_objext conftest.$ac_ext
14180
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014181fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014182rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014183 CFLAGS=$OLD_CFLAGS
14184
14185else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014186
Martin v. Löwis11437992002-04-12 09:54:03 +000014187
14188for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014189do
Martin v. Löwis11437992002-04-12 09:54:03 +000014190as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14191echo "$as_me:$LINENO: checking for $ac_func" >&5
14192echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14193if eval "test \"\${$as_ac_var+set}\" = set"; then
14194 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014195else
Martin v. Löwis11437992002-04-12 09:54:03 +000014196 cat >conftest.$ac_ext <<_ACEOF
14197#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014198#include "confdefs.h"
14199/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014200 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014201#include <assert.h>
14202/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014203#ifdef __cplusplus
14204extern "C"
14205#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014206/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014207 builtin and then its argument prototype would still apply. */
14208char $ac_func ();
14209char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014210
Martin v. Löwis11437992002-04-12 09:54:03 +000014211#ifdef F77_DUMMY_MAIN
14212# ifdef __cplusplus
14213 extern "C"
14214# endif
14215 int F77_DUMMY_MAIN() { return 1; }
14216#endif
14217int
14218main ()
14219{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014220/* The GNU C library defines this for functions which it implements
14221 to always fail with ENOSYS. Some functions are actually named
14222 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014223#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014224choke me
14225#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014226f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014227#endif
14228
Martin v. Löwis11437992002-04-12 09:54:03 +000014229 ;
14230 return 0;
14231}
14232_ACEOF
14233rm -f conftest.$ac_objext conftest$ac_exeext
14234if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14235 (eval $ac_link) 2>&5
14236 ac_status=$?
14237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14238 (exit $ac_status); } &&
14239 { ac_try='test -s conftest$ac_exeext'
14240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14241 (eval $ac_try) 2>&5
14242 ac_status=$?
14243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14244 (exit $ac_status); }; }; then
14245 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014246else
Martin v. Löwis11437992002-04-12 09:54:03 +000014247 echo "$as_me: failed program was:" >&5
14248cat conftest.$ac_ext >&5
14249eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014250fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014251rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014252fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014253echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14254echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14255if test `eval echo '${'$as_ac_var'}'` = yes; then
14256 cat >>confdefs.h <<_ACEOF
14257#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14258_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014259
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014260fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014261done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014262
Michael W. Hudson54241132001-12-07 15:38:26 +000014263
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014264fi
14265
Michael W. Hudson54241132001-12-07 15:38:26 +000014266
14267
14268
14269
14270
14271
Guido van Rossum627b2d71993-12-24 10:39:16 +000014272# checks for system services
14273# (none yet)
14274
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014275# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014276echo "$as_me:$LINENO: checking for __fpu_control" >&5
14277echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14278if test "${ac_cv_func___fpu_control+set}" = set; then
14279 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014280else
Martin v. Löwis11437992002-04-12 09:54:03 +000014281 cat >conftest.$ac_ext <<_ACEOF
14282#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014283#include "confdefs.h"
14284/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014286#include <assert.h>
14287/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014288#ifdef __cplusplus
14289extern "C"
14290#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014291/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 builtin and then its argument prototype would still apply. */
14293char __fpu_control ();
14294char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014295
Martin v. Löwis11437992002-04-12 09:54:03 +000014296#ifdef F77_DUMMY_MAIN
14297# ifdef __cplusplus
14298 extern "C"
14299# endif
14300 int F77_DUMMY_MAIN() { return 1; }
14301#endif
14302int
14303main ()
14304{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014305/* The GNU C library defines this for functions which it implements
14306 to always fail with ENOSYS. Some functions are actually named
14307 something starting with __ and the normal name is an alias. */
14308#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14309choke me
14310#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014311f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014312#endif
14313
Martin v. Löwis11437992002-04-12 09:54:03 +000014314 ;
14315 return 0;
14316}
14317_ACEOF
14318rm -f conftest.$ac_objext conftest$ac_exeext
14319if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14320 (eval $ac_link) 2>&5
14321 ac_status=$?
14322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14323 (exit $ac_status); } &&
14324 { ac_try='test -s conftest$ac_exeext'
14325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14326 (eval $ac_try) 2>&5
14327 ac_status=$?
14328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14329 (exit $ac_status); }; }; then
14330 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014331else
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 echo "$as_me: failed program was:" >&5
14333cat conftest.$ac_ext >&5
14334ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014336rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014337fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014338echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14339echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14340if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014341 :
14342else
Martin v. Löwis11437992002-04-12 09:54:03 +000014343
14344echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14345echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14346if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14347 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014348else
Martin v. Löwis11437992002-04-12 09:54:03 +000014349 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014350LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014351cat >conftest.$ac_ext <<_ACEOF
14352#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014353#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014355/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014356#ifdef __cplusplus
14357extern "C"
14358#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014359/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014360 builtin and then its argument prototype would still apply. */
14361char __fpu_control ();
14362#ifdef F77_DUMMY_MAIN
14363# ifdef __cplusplus
14364 extern "C"
14365# endif
14366 int F77_DUMMY_MAIN() { return 1; }
14367#endif
14368int
14369main ()
14370{
14371__fpu_control ();
14372 ;
14373 return 0;
14374}
14375_ACEOF
14376rm -f conftest.$ac_objext conftest$ac_exeext
14377if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14378 (eval $ac_link) 2>&5
14379 ac_status=$?
14380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14381 (exit $ac_status); } &&
14382 { ac_try='test -s conftest$ac_exeext'
14383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14384 (eval $ac_try) 2>&5
14385 ac_status=$?
14386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14387 (exit $ac_status); }; }; then
14388 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014389else
Martin v. Löwis11437992002-04-12 09:54:03 +000014390 echo "$as_me: failed program was:" >&5
14391cat conftest.$ac_ext >&5
14392ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014393fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014394rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14395LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014397echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14398echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14399if test $ac_cv_lib_ieee___fpu_control = yes; then
14400 cat >>confdefs.h <<_ACEOF
14401#define HAVE_LIBIEEE 1
14402_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014403
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014404 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014405
Guido van Rossum627b2d71993-12-24 10:39:16 +000014406fi
14407
Michael W. Hudson54241132001-12-07 15:38:26 +000014408
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014409fi
14410
Michael W. Hudson54241132001-12-07 15:38:26 +000014411
Guido van Rossum7f253911997-05-09 02:42:48 +000014412# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014413echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14414echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14415
Guido van Rossum7f253911997-05-09 02:42:48 +000014416# Check whether --with-fpectl or --without-fpectl was given.
14417if test "${with_fpectl+set}" = set; then
14418 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014419
Guido van Rossum7f253911997-05-09 02:42:48 +000014420if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014421then
14422
14423cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014424#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014425_ACEOF
14426
14427 echo "$as_me:$LINENO: result: yes" >&5
14428echo "${ECHO_T}yes" >&6
14429else echo "$as_me:$LINENO: result: no" >&5
14430echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014431fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014432else
Martin v. Löwis11437992002-04-12 09:54:03 +000014433 echo "$as_me:$LINENO: result: no" >&5
14434echo "${ECHO_T}no" >&6
14435fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014436
Guido van Rossum7f43da71994-08-01 12:15:30 +000014437# check for --with-libm=...
14438
Guido van Rossum563e7081996-09-10 18:20:48 +000014439case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014440Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014441BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014442*) LIBM=-lm
14443esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014444echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14445echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14446
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014447# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014448if test "${with_libm+set}" = set; then
14449 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014450
Guido van Rossum7f253911997-05-09 02:42:48 +000014451if test "$withval" = no
14452then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14454echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014455elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014456then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14458echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14459else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14460echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14461 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014462fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014463else
Martin v. Löwis11437992002-04-12 09:54:03 +000014464 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14465echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14466fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014467
14468# check for --with-libc=...
14469
Martin v. Löwis11437992002-04-12 09:54:03 +000014470echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14471echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14472
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014473# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014474if test "${with_libc+set}" = set; then
14475 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014476
Guido van Rossum7f253911997-05-09 02:42:48 +000014477if test "$withval" = no
14478then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014479 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14480echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014481elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014482then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14484echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14485else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14486echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14487 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014488fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014489else
Martin v. Löwis11437992002-04-12 09:54:03 +000014490 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14491echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14492fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014493
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014494# check for hypot() in math library
14495LIBS_SAVE=$LIBS
14496LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014497
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014498for ac_func in hypot
14499do
Martin v. Löwis11437992002-04-12 09:54:03 +000014500as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14501echo "$as_me:$LINENO: checking for $ac_func" >&5
14502echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14503if eval "test \"\${$as_ac_var+set}\" = set"; then
14504 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014505else
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 cat >conftest.$ac_ext <<_ACEOF
14507#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014508#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014509/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014510 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014511#include <assert.h>
14512/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014513#ifdef __cplusplus
14514extern "C"
14515#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014516/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014517 builtin and then its argument prototype would still apply. */
14518char $ac_func ();
14519char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014520
Martin v. Löwis11437992002-04-12 09:54:03 +000014521#ifdef F77_DUMMY_MAIN
14522# ifdef __cplusplus
14523 extern "C"
14524# endif
14525 int F77_DUMMY_MAIN() { return 1; }
14526#endif
14527int
14528main ()
14529{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014530/* The GNU C library defines this for functions which it implements
14531 to always fail with ENOSYS. Some functions are actually named
14532 something starting with __ and the normal name is an alias. */
14533#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14534choke me
14535#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014536f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014537#endif
14538
Martin v. Löwis11437992002-04-12 09:54:03 +000014539 ;
14540 return 0;
14541}
14542_ACEOF
14543rm -f conftest.$ac_objext conftest$ac_exeext
14544if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14545 (eval $ac_link) 2>&5
14546 ac_status=$?
14547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14548 (exit $ac_status); } &&
14549 { ac_try='test -s conftest$ac_exeext'
14550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14551 (eval $ac_try) 2>&5
14552 ac_status=$?
14553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14554 (exit $ac_status); }; }; then
14555 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014556else
Martin v. Löwis11437992002-04-12 09:54:03 +000014557 echo "$as_me: failed program was:" >&5
14558cat conftest.$ac_ext >&5
14559eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014561rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014562fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014563echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14564echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14565if test `eval echo '${'$as_ac_var'}'` = yes; then
14566 cat >>confdefs.h <<_ACEOF
14567#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14568_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014569
Michael W. Hudson54241132001-12-07 15:38:26 +000014570else
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014572fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014573done
14574
Michael W. Hudson54241132001-12-07 15:38:26 +000014575
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014576LIBS=$LIBS_SAVE
14577
Guido van Rossumad713701997-07-10 22:42:38 +000014578# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014579echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14580echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14581if test "${ac_cv_malloc_zero+set}" = set; then
14582 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014583else
14584 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014585 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014586else
Martin v. Löwis11437992002-04-12 09:54:03 +000014587 cat >conftest.$ac_ext <<_ACEOF
14588#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014589#include "confdefs.h"
14590#include <stdio.h>
14591#ifdef HAVE_STDLIB
14592#include <stdlib.h>
14593#else
14594char *malloc(), *realloc();
14595int *free();
14596#endif
14597main() {
14598 char *p;
14599 p = malloc(0);
14600 if (p == NULL) exit(1);
14601 p = realloc(p, 0);
14602 if (p == NULL) exit(1);
14603 free(p);
14604 exit(0);
14605}
Martin v. Löwis11437992002-04-12 09:54:03 +000014606_ACEOF
14607rm -f conftest$ac_exeext
14608if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14609 (eval $ac_link) 2>&5
14610 ac_status=$?
14611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14612 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14614 (eval $ac_try) 2>&5
14615 ac_status=$?
14616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14617 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014618 ac_cv_malloc_zero=nonnull
14619else
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 echo "$as_me: program exited with status $ac_status" >&5
14621echo "$as_me: failed program was:" >&5
14622cat conftest.$ac_ext >&5
14623( exit $ac_status )
14624ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014626rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014627fi
Guido van Rossumad713701997-07-10 22:42:38 +000014628fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014629 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014630echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14631echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014632if test "$ac_cv_malloc_zero" = null
14633then
Martin v. Löwis11437992002-04-12 09:54:03 +000014634
14635cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014636#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014637_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014638
14639fi
14640
Guido van Rossumef2255b2000-03-10 22:30:29 +000014641# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014642if test "${ac_cv_header_wchar_h+set}" = set; then
14643 echo "$as_me:$LINENO: checking for wchar.h" >&5
14644echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14645if test "${ac_cv_header_wchar_h+set}" = set; then
14646 echo $ECHO_N "(cached) $ECHO_C" >&6
14647fi
14648echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14649echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014650else
Martin v. Löwis11437992002-04-12 09:54:03 +000014651 # Is the header compilable?
14652echo "$as_me:$LINENO: checking wchar.h usability" >&5
14653echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14654cat >conftest.$ac_ext <<_ACEOF
14655#line $LINENO "configure"
14656#include "confdefs.h"
14657$ac_includes_default
14658#include <wchar.h>
14659_ACEOF
14660rm -f conftest.$ac_objext
14661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14662 (eval $ac_compile) 2>&5
14663 ac_status=$?
14664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14665 (exit $ac_status); } &&
14666 { ac_try='test -s conftest.$ac_objext'
14667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14668 (eval $ac_try) 2>&5
14669 ac_status=$?
14670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14671 (exit $ac_status); }; }; then
14672 ac_header_compiler=yes
14673else
14674 echo "$as_me: failed program was:" >&5
14675cat conftest.$ac_ext >&5
14676ac_header_compiler=no
14677fi
14678rm -f conftest.$ac_objext conftest.$ac_ext
14679echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14680echo "${ECHO_T}$ac_header_compiler" >&6
14681
14682# Is the header present?
14683echo "$as_me:$LINENO: checking wchar.h presence" >&5
14684echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14685cat >conftest.$ac_ext <<_ACEOF
14686#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014687#include "confdefs.h"
14688#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014689_ACEOF
14690if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14691 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14692 ac_status=$?
14693 egrep -v '^ *\+' conftest.er1 >conftest.err
14694 rm -f conftest.er1
14695 cat conftest.err >&5
14696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14697 (exit $ac_status); } >/dev/null; then
14698 if test -s conftest.err; then
14699 ac_cpp_err=$ac_c_preproc_warn_flag
14700 else
14701 ac_cpp_err=
14702 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014703else
Martin v. Löwis11437992002-04-12 09:54:03 +000014704 ac_cpp_err=yes
14705fi
14706if test -z "$ac_cpp_err"; then
14707 ac_header_preproc=yes
14708else
14709 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014710 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014711 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014712fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014713rm -f conftest.err conftest.$ac_ext
14714echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14715echo "${ECHO_T}$ac_header_preproc" >&6
14716
14717# So? What about this header?
14718case $ac_header_compiler:$ac_header_preproc in
14719 yes:no )
14720 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14721echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14722 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14723echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14724 no:yes )
14725 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14726echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14727 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14728echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14729 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14730echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14731esac
14732echo "$as_me:$LINENO: checking for wchar.h" >&5
14733echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14734if test "${ac_cv_header_wchar_h+set}" = set; then
14735 echo $ECHO_N "(cached) $ECHO_C" >&6
14736else
14737 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014738fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014739echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14740echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14741
14742fi
14743if test $ac_cv_header_wchar_h = yes; then
14744
14745
14746cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014747#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014748_ACEOF
14749
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014750 wchar_h="yes"
14751
Guido van Rossumef2255b2000-03-10 22:30:29 +000014752else
Martin v. Löwis11437992002-04-12 09:54:03 +000014753 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014754
14755fi
14756
Michael W. Hudson54241132001-12-07 15:38:26 +000014757
Martin v. Löwis11437992002-04-12 09:54:03 +000014758
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014759# determine wchar_t size
14760if test "$wchar_h" = yes
14761then
Martin v. Löwis11437992002-04-12 09:54:03 +000014762 echo "$as_me:$LINENO: checking for wchar_t" >&5
14763echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14764if test "${ac_cv_type_wchar_t+set}" = set; then
14765 echo $ECHO_N "(cached) $ECHO_C" >&6
14766else
14767 cat >conftest.$ac_ext <<_ACEOF
14768#line $LINENO "configure"
14769#include "confdefs.h"
14770#include <wchar.h>
14771
14772#ifdef F77_DUMMY_MAIN
14773# ifdef __cplusplus
14774 extern "C"
14775# endif
14776 int F77_DUMMY_MAIN() { return 1; }
14777#endif
14778int
14779main ()
14780{
14781if ((wchar_t *) 0)
14782 return 0;
14783if (sizeof (wchar_t))
14784 return 0;
14785 ;
14786 return 0;
14787}
14788_ACEOF
14789rm -f conftest.$ac_objext
14790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14791 (eval $ac_compile) 2>&5
14792 ac_status=$?
14793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14794 (exit $ac_status); } &&
14795 { ac_try='test -s conftest.$ac_objext'
14796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14797 (eval $ac_try) 2>&5
14798 ac_status=$?
14799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14800 (exit $ac_status); }; }; then
14801 ac_cv_type_wchar_t=yes
14802else
14803 echo "$as_me: failed program was:" >&5
14804cat conftest.$ac_ext >&5
14805ac_cv_type_wchar_t=no
14806fi
14807rm -f conftest.$ac_objext conftest.$ac_ext
14808fi
14809echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14810echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14811
14812echo "$as_me:$LINENO: checking size of wchar_t" >&5
14813echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14814if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14815 echo $ECHO_N "(cached) $ECHO_C" >&6
14816else
14817 if test "$ac_cv_type_wchar_t" = yes; then
14818 # The cast to unsigned long works around a bug in the HP C Compiler
14819 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14820 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14821 # This bug is HP SR number 8606223364.
14822 if test "$cross_compiling" = yes; then
14823 # Depending upon the size, compute the lo and hi bounds.
14824cat >conftest.$ac_ext <<_ACEOF
14825#line $LINENO "configure"
14826#include "confdefs.h"
14827#include <wchar.h>
14828
14829#ifdef F77_DUMMY_MAIN
14830# ifdef __cplusplus
14831 extern "C"
14832# endif
14833 int F77_DUMMY_MAIN() { return 1; }
14834#endif
14835int
14836main ()
14837{
14838static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14839test_array [0] = 0
14840
14841 ;
14842 return 0;
14843}
14844_ACEOF
14845rm -f conftest.$ac_objext
14846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14847 (eval $ac_compile) 2>&5
14848 ac_status=$?
14849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14850 (exit $ac_status); } &&
14851 { ac_try='test -s conftest.$ac_objext'
14852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14853 (eval $ac_try) 2>&5
14854 ac_status=$?
14855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14856 (exit $ac_status); }; }; then
14857 ac_lo=0 ac_mid=0
14858 while :; do
14859 cat >conftest.$ac_ext <<_ACEOF
14860#line $LINENO "configure"
14861#include "confdefs.h"
14862#include <wchar.h>
14863
14864#ifdef F77_DUMMY_MAIN
14865# ifdef __cplusplus
14866 extern "C"
14867# endif
14868 int F77_DUMMY_MAIN() { return 1; }
14869#endif
14870int
14871main ()
14872{
14873static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14874test_array [0] = 0
14875
14876 ;
14877 return 0;
14878}
14879_ACEOF
14880rm -f conftest.$ac_objext
14881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14882 (eval $ac_compile) 2>&5
14883 ac_status=$?
14884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14885 (exit $ac_status); } &&
14886 { ac_try='test -s conftest.$ac_objext'
14887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14888 (eval $ac_try) 2>&5
14889 ac_status=$?
14890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14891 (exit $ac_status); }; }; then
14892 ac_hi=$ac_mid; break
14893else
14894 echo "$as_me: failed program was:" >&5
14895cat conftest.$ac_ext >&5
14896ac_lo=`expr $ac_mid + 1`
14897 if test $ac_lo -le $ac_mid; then
14898 ac_lo= ac_hi=
14899 break
14900 fi
14901 ac_mid=`expr 2 '*' $ac_mid + 1`
14902fi
14903rm -f conftest.$ac_objext conftest.$ac_ext
14904 done
14905else
14906 echo "$as_me: failed program was:" >&5
14907cat conftest.$ac_ext >&5
14908cat >conftest.$ac_ext <<_ACEOF
14909#line $LINENO "configure"
14910#include "confdefs.h"
14911#include <wchar.h>
14912
14913#ifdef F77_DUMMY_MAIN
14914# ifdef __cplusplus
14915 extern "C"
14916# endif
14917 int F77_DUMMY_MAIN() { return 1; }
14918#endif
14919int
14920main ()
14921{
14922static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14923test_array [0] = 0
14924
14925 ;
14926 return 0;
14927}
14928_ACEOF
14929rm -f conftest.$ac_objext
14930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14931 (eval $ac_compile) 2>&5
14932 ac_status=$?
14933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14934 (exit $ac_status); } &&
14935 { ac_try='test -s conftest.$ac_objext'
14936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14937 (eval $ac_try) 2>&5
14938 ac_status=$?
14939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14940 (exit $ac_status); }; }; then
14941 ac_hi=-1 ac_mid=-1
14942 while :; do
14943 cat >conftest.$ac_ext <<_ACEOF
14944#line $LINENO "configure"
14945#include "confdefs.h"
14946#include <wchar.h>
14947
14948#ifdef F77_DUMMY_MAIN
14949# ifdef __cplusplus
14950 extern "C"
14951# endif
14952 int F77_DUMMY_MAIN() { return 1; }
14953#endif
14954int
14955main ()
14956{
14957static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14958test_array [0] = 0
14959
14960 ;
14961 return 0;
14962}
14963_ACEOF
14964rm -f conftest.$ac_objext
14965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14966 (eval $ac_compile) 2>&5
14967 ac_status=$?
14968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14969 (exit $ac_status); } &&
14970 { ac_try='test -s conftest.$ac_objext'
14971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14972 (eval $ac_try) 2>&5
14973 ac_status=$?
14974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14975 (exit $ac_status); }; }; then
14976 ac_lo=$ac_mid; break
14977else
14978 echo "$as_me: failed program was:" >&5
14979cat conftest.$ac_ext >&5
14980ac_hi=`expr '(' $ac_mid ')' - 1`
14981 if test $ac_mid -le $ac_hi; then
14982 ac_lo= ac_hi=
14983 break
14984 fi
14985 ac_mid=`expr 2 '*' $ac_mid`
14986fi
14987rm -f conftest.$ac_objext conftest.$ac_ext
14988 done
14989else
14990 echo "$as_me: failed program was:" >&5
14991cat conftest.$ac_ext >&5
14992ac_lo= ac_hi=
14993fi
14994rm -f conftest.$ac_objext conftest.$ac_ext
14995fi
14996rm -f conftest.$ac_objext conftest.$ac_ext
14997# Binary search between lo and hi bounds.
14998while test "x$ac_lo" != "x$ac_hi"; do
14999 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15000 cat >conftest.$ac_ext <<_ACEOF
15001#line $LINENO "configure"
15002#include "confdefs.h"
15003#include <wchar.h>
15004
15005#ifdef F77_DUMMY_MAIN
15006# ifdef __cplusplus
15007 extern "C"
15008# endif
15009 int F77_DUMMY_MAIN() { return 1; }
15010#endif
15011int
15012main ()
15013{
15014static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15015test_array [0] = 0
15016
15017 ;
15018 return 0;
15019}
15020_ACEOF
15021rm -f conftest.$ac_objext
15022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15023 (eval $ac_compile) 2>&5
15024 ac_status=$?
15025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15026 (exit $ac_status); } &&
15027 { ac_try='test -s conftest.$ac_objext'
15028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15029 (eval $ac_try) 2>&5
15030 ac_status=$?
15031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15032 (exit $ac_status); }; }; then
15033 ac_hi=$ac_mid
15034else
15035 echo "$as_me: failed program was:" >&5
15036cat conftest.$ac_ext >&5
15037ac_lo=`expr '(' $ac_mid ')' + 1`
15038fi
15039rm -f conftest.$ac_objext conftest.$ac_ext
15040done
15041case $ac_lo in
15042?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15043'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15044echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15045 { (exit 1); exit 1; }; } ;;
15046esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015047else
15048 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15050echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15051 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015052else
Martin v. Löwis11437992002-04-12 09:54:03 +000015053 cat >conftest.$ac_ext <<_ACEOF
15054#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015055#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015056#include <wchar.h>
15057
15058long longval () { return (long) (sizeof (wchar_t)); }
15059unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015060#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015061#include <stdlib.h>
15062#ifdef F77_DUMMY_MAIN
15063# ifdef __cplusplus
15064 extern "C"
15065# endif
15066 int F77_DUMMY_MAIN() { return 1; }
15067#endif
15068int
15069main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015070{
Martin v. Löwis11437992002-04-12 09:54:03 +000015071
15072 FILE *f = fopen ("conftest.val", "w");
15073 if (! f)
15074 exit (1);
15075 if (((long) (sizeof (wchar_t))) < 0)
15076 {
15077 long i = longval ();
15078 if (i != ((long) (sizeof (wchar_t))))
15079 exit (1);
15080 fprintf (f, "%ld\n", i);
15081 }
15082 else
15083 {
15084 unsigned long i = ulongval ();
15085 if (i != ((long) (sizeof (wchar_t))))
15086 exit (1);
15087 fprintf (f, "%lu\n", i);
15088 }
15089 exit (ferror (f) || fclose (f) != 0);
15090
15091 ;
15092 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015093}
Martin v. Löwis11437992002-04-12 09:54:03 +000015094_ACEOF
15095rm -f conftest$ac_exeext
15096if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15097 (eval $ac_link) 2>&5
15098 ac_status=$?
15099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15102 (eval $ac_try) 2>&5
15103 ac_status=$?
15104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15105 (exit $ac_status); }; }; then
15106 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015107else
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 echo "$as_me: program exited with status $ac_status" >&5
15109echo "$as_me: failed program was:" >&5
15110cat conftest.$ac_ext >&5
15111( exit $ac_status )
15112{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15113echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15114 { (exit 1); exit 1; }; }
15115fi
15116rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15117fi
15118fi
15119rm -f conftest.val
15120else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015121 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015122fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015123fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015124echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15125echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15126cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015127#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015128_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015129
Michael W. Hudson54241132001-12-07 15:38:26 +000015130
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015131fi
15132
Martin v. Löwis11437992002-04-12 09:54:03 +000015133echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15134echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015135# Check whether --enable-unicode or --disable-unicode was given.
15136if test "${enable_unicode+set}" = set; then
15137 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015138
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015139else
15140 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015141fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015142
15143if test $enable_unicode = yes
15144then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015145 # Without any arguments, Py_UNICODE defaults to two-byte mode
15146 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015147fi
15148
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015149
15150
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015151case "$enable_unicode" in
15152ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015153 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015154#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015155_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015156
15157 ;;
15158ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015159 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015160#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015161_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015162
15163 ;;
15164esac
15165
Michael W. Hudson54241132001-12-07 15:38:26 +000015166
Martin v. Löwis11437992002-04-12 09:54:03 +000015167
15168
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015169
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015170if test "$enable_unicode" = "no"
15171then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015172 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 echo "$as_me:$LINENO: result: not used" >&5
15174echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015175else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015176 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015177
15178cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015179#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015180_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015181
15182 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15183 then
15184 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015185
Martin v. Löwis11437992002-04-12 09:54:03 +000015186cat >>confdefs.h <<\_ACEOF
15187#define HAVE_USABLE_WCHAR_T 1
15188_ACEOF
15189
15190 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015191#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015192_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015193
15194 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15195 then
15196 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015198#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015199_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015200
15201 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15202 then
15203 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015204 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015205#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015206_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015207
15208 else
15209 PY_UNICODE_TYPE="no type found"
15210 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15212echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015213fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015214
15215# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015216echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15217echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15218if test "${ac_cv_c_bigendian+set}" = set; then
15219 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015220else
Martin v. Löwis11437992002-04-12 09:54:03 +000015221 # See if sys/param.h defines the BYTE_ORDER macro.
15222cat >conftest.$ac_ext <<_ACEOF
15223#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015224#include "confdefs.h"
15225#include <sys/types.h>
15226#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015227
Martin v. Löwis11437992002-04-12 09:54:03 +000015228#ifdef F77_DUMMY_MAIN
15229# ifdef __cplusplus
15230 extern "C"
15231# endif
15232 int F77_DUMMY_MAIN() { return 1; }
15233#endif
15234int
15235main ()
15236{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015237#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15238 bogus endian macros
15239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015240
15241 ;
15242 return 0;
15243}
15244_ACEOF
15245rm -f conftest.$ac_objext
15246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15247 (eval $ac_compile) 2>&5
15248 ac_status=$?
15249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15250 (exit $ac_status); } &&
15251 { ac_try='test -s conftest.$ac_objext'
15252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15253 (eval $ac_try) 2>&5
15254 ac_status=$?
15255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15256 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015257 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015258cat >conftest.$ac_ext <<_ACEOF
15259#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015260#include "confdefs.h"
15261#include <sys/types.h>
15262#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015263
Martin v. Löwis11437992002-04-12 09:54:03 +000015264#ifdef F77_DUMMY_MAIN
15265# ifdef __cplusplus
15266 extern "C"
15267# endif
15268 int F77_DUMMY_MAIN() { return 1; }
15269#endif
15270int
15271main ()
15272{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015273#if BYTE_ORDER != BIG_ENDIAN
15274 not big endian
15275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015276
15277 ;
15278 return 0;
15279}
15280_ACEOF
15281rm -f conftest.$ac_objext
15282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15283 (eval $ac_compile) 2>&5
15284 ac_status=$?
15285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15286 (exit $ac_status); } &&
15287 { ac_try='test -s conftest.$ac_objext'
15288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15289 (eval $ac_try) 2>&5
15290 ac_status=$?
15291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15292 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015293 ac_cv_c_bigendian=yes
15294else
Martin v. Löwis11437992002-04-12 09:54:03 +000015295 echo "$as_me: failed program was:" >&5
15296cat conftest.$ac_ext >&5
15297ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015298fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015299rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015300else
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 echo "$as_me: failed program was:" >&5
15302cat conftest.$ac_ext >&5
15303# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015304if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 # try to guess the endianess by grep'ing values into an object file
15306 ac_cv_c_bigendian=unknown
15307 cat >conftest.$ac_ext <<_ACEOF
15308#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015309#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015310short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15311short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15312void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15313short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15314short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15315void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15316#ifdef F77_DUMMY_MAIN
15317# ifdef __cplusplus
15318 extern "C"
15319# endif
15320 int F77_DUMMY_MAIN() { return 1; }
15321#endif
15322int
15323main ()
15324{
15325 _ascii (); _ebcdic ();
15326 ;
15327 return 0;
15328}
15329_ACEOF
15330rm -f conftest.$ac_objext
15331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15332 (eval $ac_compile) 2>&5
15333 ac_status=$?
15334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15335 (exit $ac_status); } &&
15336 { ac_try='test -s conftest.$ac_objext'
15337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15338 (eval $ac_try) 2>&5
15339 ac_status=$?
15340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15341 (exit $ac_status); }; }; then
15342 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15343 ac_cv_c_bigendian=yes
15344fi
15345if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15346 if test "$ac_cv_c_bigendian" = unknown; then
15347 ac_cv_c_bigendian=no
15348 else
15349 # finding both strings is unlikely to happen, but who knows?
15350 ac_cv_c_bigendian=unknown
15351 fi
15352fi
15353else
15354 echo "$as_me: failed program was:" >&5
15355cat conftest.$ac_ext >&5
15356fi
15357rm -f conftest.$ac_objext conftest.$ac_ext
15358else
15359 cat >conftest.$ac_ext <<_ACEOF
15360#line $LINENO "configure"
15361#include "confdefs.h"
15362int
15363main ()
15364{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015365 /* Are we little or big endian? From Harbison&Steele. */
15366 union
15367 {
15368 long l;
15369 char c[sizeof (long)];
15370 } u;
15371 u.l = 1;
15372 exit (u.c[sizeof (long) - 1] == 1);
15373}
Martin v. Löwis11437992002-04-12 09:54:03 +000015374_ACEOF
15375rm -f conftest$ac_exeext
15376if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15377 (eval $ac_link) 2>&5
15378 ac_status=$?
15379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15380 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15382 (eval $ac_try) 2>&5
15383 ac_status=$?
15384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15385 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015386 ac_cv_c_bigendian=no
15387else
Martin v. Löwis11437992002-04-12 09:54:03 +000015388 echo "$as_me: program exited with status $ac_status" >&5
15389echo "$as_me: failed program was:" >&5
15390cat conftest.$ac_ext >&5
15391( exit $ac_status )
15392ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015393fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015394rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015395fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015396fi
15397rm -f conftest.$ac_objext conftest.$ac_ext
15398fi
15399echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15400echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15401case $ac_cv_c_bigendian in
15402 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015403
Martin v. Löwis11437992002-04-12 09:54:03 +000015404cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015405#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015406_ACEOF
15407 ;;
15408 no)
15409 ;;
15410 *)
15411 { { echo "$as_me:$LINENO: error: unknown endianess
15412presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15413echo "$as_me: error: unknown endianess
15414presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15415 { (exit 1); exit 1; }; } ;;
15416esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015417
Michael W. Hudson54241132001-12-07 15:38:26 +000015418
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015419# Check whether right shifting a negative integer extends the sign bit
15420# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015421echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15422echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15423if test "${ac_cv_rshift_extends_sign+set}" = set; then
15424 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015425else
Martin v. Löwis11437992002-04-12 09:54:03 +000015426
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015427if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015428 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015429else
Martin v. Löwis11437992002-04-12 09:54:03 +000015430 cat >conftest.$ac_ext <<_ACEOF
15431#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015432#include "confdefs.h"
15433
15434int main()
15435{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015436 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015437}
15438
Martin v. Löwis11437992002-04-12 09:54:03 +000015439_ACEOF
15440rm -f conftest$ac_exeext
15441if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15442 (eval $ac_link) 2>&5
15443 ac_status=$?
15444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15445 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15447 (eval $ac_try) 2>&5
15448 ac_status=$?
15449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15450 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015451 ac_cv_rshift_extends_sign=yes
15452else
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 echo "$as_me: program exited with status $ac_status" >&5
15454echo "$as_me: failed program was:" >&5
15455cat conftest.$ac_ext >&5
15456( exit $ac_status )
15457ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015458fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015459rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15460fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015461fi
15462
Martin v. Löwis11437992002-04-12 09:54:03 +000015463echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15464echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015465if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015466then
Martin v. Löwis11437992002-04-12 09:54:03 +000015467
15468cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015469#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015470_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015471
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015472fi
15473
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015474# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015475echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15476echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15477if test "${ac_cv_have_getc_unlocked+set}" = set; then
15478 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015479else
Martin v. Löwis11437992002-04-12 09:54:03 +000015480
15481cat >conftest.$ac_ext <<_ACEOF
15482#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015483#include "confdefs.h"
15484#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015485#ifdef F77_DUMMY_MAIN
15486# ifdef __cplusplus
15487 extern "C"
15488# endif
15489 int F77_DUMMY_MAIN() { return 1; }
15490#endif
15491int
15492main ()
15493{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015494
15495 FILE *f = fopen("/dev/null", "r");
15496 flockfile(f);
15497 getc_unlocked(f);
15498 funlockfile(f);
15499
Martin v. Löwis11437992002-04-12 09:54:03 +000015500 ;
15501 return 0;
15502}
15503_ACEOF
15504rm -f conftest.$ac_objext conftest$ac_exeext
15505if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15506 (eval $ac_link) 2>&5
15507 ac_status=$?
15508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15509 (exit $ac_status); } &&
15510 { ac_try='test -s conftest$ac_exeext'
15511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15512 (eval $ac_try) 2>&5
15513 ac_status=$?
15514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15515 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015516 ac_cv_have_getc_unlocked=yes
15517else
Martin v. Löwis11437992002-04-12 09:54:03 +000015518 echo "$as_me: failed program was:" >&5
15519cat conftest.$ac_ext >&5
15520ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015522rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015523fi
15524
Martin v. Löwis11437992002-04-12 09:54:03 +000015525echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15526echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015527if test "$ac_cv_have_getc_unlocked" = yes
15528then
Martin v. Löwis11437992002-04-12 09:54:03 +000015529
15530cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015531#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015532_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015533
15534fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015535
Martin v. Löwis0daad592001-09-30 21:09:59 +000015536# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015537echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15538echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15539if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15540 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015541else
Martin v. Löwis11437992002-04-12 09:54:03 +000015542 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015543LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015544cat >conftest.$ac_ext <<_ACEOF
15545#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015546#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015547
Guido van Rossum353ae582001-07-10 16:45:32 +000015548/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015549#ifdef __cplusplus
15550extern "C"
15551#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015552/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015553 builtin and then its argument prototype would still apply. */
15554char rl_pre_input_hook ();
15555#ifdef F77_DUMMY_MAIN
15556# ifdef __cplusplus
15557 extern "C"
15558# endif
15559 int F77_DUMMY_MAIN() { return 1; }
15560#endif
15561int
15562main ()
15563{
15564rl_pre_input_hook ();
15565 ;
15566 return 0;
15567}
15568_ACEOF
15569rm -f conftest.$ac_objext conftest$ac_exeext
15570if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15571 (eval $ac_link) 2>&5
15572 ac_status=$?
15573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15574 (exit $ac_status); } &&
15575 { ac_try='test -s conftest$ac_exeext'
15576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15577 (eval $ac_try) 2>&5
15578 ac_status=$?
15579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15580 (exit $ac_status); }; }; then
15581 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015582else
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 echo "$as_me: failed program was:" >&5
15584cat conftest.$ac_ext >&5
15585ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015586fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015587rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15588LIBS=$ac_check_lib_save_LIBS
15589fi
15590echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15591echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15592if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015593
Martin v. Löwis11437992002-04-12 09:54:03 +000015594cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015595#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015596_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015597
Martin v. Löwis0daad592001-09-30 21:09:59 +000015598fi
15599
Michael W. Hudson54241132001-12-07 15:38:26 +000015600
Martin v. Löwis0daad592001-09-30 21:09:59 +000015601# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015602echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15603echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15604if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15605 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015606else
Martin v. Löwis11437992002-04-12 09:54:03 +000015607 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015608LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015609cat >conftest.$ac_ext <<_ACEOF
15610#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015611#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015612
Martin v. Löwis0daad592001-09-30 21:09:59 +000015613/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015614#ifdef __cplusplus
15615extern "C"
15616#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015617/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015618 builtin and then its argument prototype would still apply. */
15619char rl_completion_matches ();
15620#ifdef F77_DUMMY_MAIN
15621# ifdef __cplusplus
15622 extern "C"
15623# endif
15624 int F77_DUMMY_MAIN() { return 1; }
15625#endif
15626int
15627main ()
15628{
15629rl_completion_matches ();
15630 ;
15631 return 0;
15632}
15633_ACEOF
15634rm -f conftest.$ac_objext conftest$ac_exeext
15635if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15636 (eval $ac_link) 2>&5
15637 ac_status=$?
15638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15639 (exit $ac_status); } &&
15640 { ac_try='test -s conftest$ac_exeext'
15641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15642 (eval $ac_try) 2>&5
15643 ac_status=$?
15644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15645 (exit $ac_status); }; }; then
15646 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015647else
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 echo "$as_me: failed program was:" >&5
15649cat conftest.$ac_ext >&5
15650ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015652rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15653LIBS=$ac_check_lib_save_LIBS
15654fi
15655echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15656echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15657if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015658
Martin v. Löwis11437992002-04-12 09:54:03 +000015659cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015660#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015661_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015662
Guido van Rossum353ae582001-07-10 16:45:32 +000015663fi
15664
Jack Jansendd19cf82001-12-06 22:36:17 +000015665
Martin v. Löwis11437992002-04-12 09:54:03 +000015666echo "$as_me:$LINENO: checking for broken nice()" >&5
15667echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15668if test "${ac_cv_broken_nice+set}" = set; then
15669 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015670else
Martin v. Löwis11437992002-04-12 09:54:03 +000015671
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015672if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015673 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015674else
Martin v. Löwis11437992002-04-12 09:54:03 +000015675 cat >conftest.$ac_ext <<_ACEOF
15676#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015677#include "confdefs.h"
15678
15679int main()
15680{
15681 int val1 = nice(1);
15682 if (val1 != -1 && val1 == nice(2))
15683 exit(0);
15684 exit(1);
15685}
15686
Martin v. Löwis11437992002-04-12 09:54:03 +000015687_ACEOF
15688rm -f conftest$ac_exeext
15689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15690 (eval $ac_link) 2>&5
15691 ac_status=$?
15692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15695 (eval $ac_try) 2>&5
15696 ac_status=$?
15697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15698 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015699 ac_cv_broken_nice=yes
15700else
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 echo "$as_me: program exited with status $ac_status" >&5
15702echo "$as_me: failed program was:" >&5
15703cat conftest.$ac_ext >&5
15704( exit $ac_status )
15705ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015706fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015707rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15708fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015709fi
15710
Martin v. Löwis11437992002-04-12 09:54:03 +000015711echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15712echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015713if test "$ac_cv_broken_nice" = yes
15714then
Martin v. Löwis11437992002-04-12 09:54:03 +000015715
15716cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015717#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015718_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015719
15720fi
15721
Jack Jansen666b1e72001-10-31 12:11:48 +000015722# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015723echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15724echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15725if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15726 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015727else
Martin v. Löwis11437992002-04-12 09:54:03 +000015728 cat >conftest.$ac_ext <<_ACEOF
15729#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015730#include "confdefs.h"
15731#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015732#ifdef F77_DUMMY_MAIN
15733# ifdef __cplusplus
15734 extern "C"
15735# endif
15736 int F77_DUMMY_MAIN() { return 1; }
15737#endif
15738int
15739main ()
15740{
Jack Jansen666b1e72001-10-31 12:11:48 +000015741
15742 int rtn;
15743 rtn = mvwdelch(0,0,0);
15744
Martin v. Löwis11437992002-04-12 09:54:03 +000015745 ;
15746 return 0;
15747}
15748_ACEOF
15749rm -f conftest.$ac_objext
15750if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15751 (eval $ac_compile) 2>&5
15752 ac_status=$?
15753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15754 (exit $ac_status); } &&
15755 { ac_try='test -s conftest.$ac_objext'
15756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15757 (eval $ac_try) 2>&5
15758 ac_status=$?
15759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15760 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015761 ac_cv_mvwdelch_is_expression=yes
15762else
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 echo "$as_me: failed program was:" >&5
15764cat conftest.$ac_ext >&5
15765ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015766fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015767rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015768fi
15769
Martin v. Löwis11437992002-04-12 09:54:03 +000015770echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15771echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015772
15773if test "$ac_cv_mvwdelch_is_expression" = yes
15774then
Martin v. Löwis11437992002-04-12 09:54:03 +000015775
15776cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015777#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015778_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015779
15780fi
15781
Martin v. Löwis11437992002-04-12 09:54:03 +000015782echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15783echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15784if test "${ac_cv_window_has_flags+set}" = set; then
15785 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015786else
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 cat >conftest.$ac_ext <<_ACEOF
15788#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015789#include "confdefs.h"
15790#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015791#ifdef F77_DUMMY_MAIN
15792# ifdef __cplusplus
15793 extern "C"
15794# endif
15795 int F77_DUMMY_MAIN() { return 1; }
15796#endif
15797int
15798main ()
15799{
Jack Jansen666b1e72001-10-31 12:11:48 +000015800
15801 WINDOW *w;
15802 w->_flags = 0;
15803
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 ;
15805 return 0;
15806}
15807_ACEOF
15808rm -f conftest.$ac_objext
15809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15810 (eval $ac_compile) 2>&5
15811 ac_status=$?
15812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15813 (exit $ac_status); } &&
15814 { ac_try='test -s conftest.$ac_objext'
15815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15816 (eval $ac_try) 2>&5
15817 ac_status=$?
15818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15819 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015820 ac_cv_window_has_flags=yes
15821else
Martin v. Löwis11437992002-04-12 09:54:03 +000015822 echo "$as_me: failed program was:" >&5
15823cat conftest.$ac_ext >&5
15824ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015825fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015826rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015827fi
15828
Martin v. Löwis11437992002-04-12 09:54:03 +000015829echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15830echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015831
Jack Jansen666b1e72001-10-31 12:11:48 +000015832
15833if test "$ac_cv_window_has_flags" = yes
15834then
Martin v. Löwis11437992002-04-12 09:54:03 +000015835
15836cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015837#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015838_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015839
15840fi
15841
Guido van Rossum95713eb2000-05-18 20:53:31 +000015842# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15843# Add sys/socket.h to confdefs.h
15844cat >> confdefs.h <<\EOF
15845#ifdef HAVE_SYS_SOCKET_H
15846#include <sys/socket.h>
15847#endif
15848EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015849echo "$as_me:$LINENO: checking for socklen_t" >&5
15850echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15851if test "${ac_cv_type_socklen_t+set}" = set; then
15852 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015853else
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 cat >conftest.$ac_ext <<_ACEOF
15855#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015856#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015857$ac_includes_default
15858#ifdef F77_DUMMY_MAIN
15859# ifdef __cplusplus
15860 extern "C"
15861# endif
15862 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015864int
15865main ()
15866{
15867if ((socklen_t *) 0)
15868 return 0;
15869if (sizeof (socklen_t))
15870 return 0;
15871 ;
15872 return 0;
15873}
15874_ACEOF
15875rm -f conftest.$ac_objext
15876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15877 (eval $ac_compile) 2>&5
15878 ac_status=$?
15879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15880 (exit $ac_status); } &&
15881 { ac_try='test -s conftest.$ac_objext'
15882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15883 (eval $ac_try) 2>&5
15884 ac_status=$?
15885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15886 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015887 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015888else
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 echo "$as_me: failed program was:" >&5
15890cat conftest.$ac_ext >&5
15891ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015892fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015893rm -f conftest.$ac_objext conftest.$ac_ext
15894fi
15895echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15896echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15897if test $ac_cv_type_socklen_t = yes; then
15898 :
15899else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015900
Martin v. Löwis11437992002-04-12 09:54:03 +000015901cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015902#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015903_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015904
15905fi
15906
Michael W. Hudson54241132001-12-07 15:38:26 +000015907
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015908#AC_MSG_CHECKING(for Modules/Setup)
15909#if test ! -f Modules/Setup ; then
15910# if test ! -d Modules ; then
15911# mkdir Modules
15912# fi
15913# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15914# AC_MSG_RESULT(creating)
15915#else
15916# AC_MSG_RESULT(already exists)
15917#fi
15918
Michael W. Hudson54241132001-12-07 15:38:26 +000015919
15920
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015921for h in `(cd $srcdir;echo Python/thread_*.h)`
15922do
15923 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15924done
15925
Michael W. Hudson54241132001-12-07 15:38:26 +000015926
Jack Jansen0b06be72002-06-21 14:48:38 +000015927SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000015928echo "$as_me:$LINENO: checking for build directories" >&5
15929echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015930for dir in $SRCDIRS; do
15931 if test ! -d $dir; then
15932 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015933 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015934done
Martin v. Löwis11437992002-04-12 09:54:03 +000015935echo "$as_me:$LINENO: result: done" >&5
15936echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015937
Guido van Rossum627b2d71993-12-24 10:39:16 +000015938# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015939ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15940cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015941# This file is a shell script that caches the results of configure
15942# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015943# scripts and configure runs, see configure's option --config-cache.
15944# It is not useful on other systems. If it contains results you don't
15945# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015946#
Martin v. Löwis11437992002-04-12 09:54:03 +000015947# config.status only pays attention to the cache file if you give it
15948# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015949#
Martin v. Löwis11437992002-04-12 09:54:03 +000015950# `ac_cv_env_foo' variables (set or unset) will be overriden when
15951# loading this file, other *unset* `ac_cv_foo' will be assigned the
15952# following values.
15953
15954_ACEOF
15955
Guido van Rossumf78abae1997-01-21 22:02:36 +000015956# The following way of writing the cache mishandles newlines in values,
15957# but we know of no workaround that is simple, portable, and efficient.
15958# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015959# Ultrix sh set writes to stderr and can't be redirected directly,
15960# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015961{
15962 (set) 2>&1 |
15963 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15964 *ac_space=\ *)
15965 # `set' does not quote correctly, so add quotes (double-quote
15966 # substitution turns \\\\ into \\, and sed turns \\ into \).
15967 sed -n \
15968 "s/'/'\\\\''/g;
15969 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15970 ;;
15971 *)
15972 # `set' quotes correctly as required by POSIX, so do not add quotes.
15973 sed -n \
15974 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15975 ;;
15976 esac;
15977} |
15978 sed '
15979 t clear
15980 : clear
15981 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15982 t end
15983 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15984 : end' >>confcache
15985if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015986 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015987 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15988 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015989 else
15990 echo "not updating unwritable cache $cache_file"
15991 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015992fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015993rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015994
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015995test "x$prefix" = xNONE && prefix=$ac_default_prefix
15996# Let make expand exec_prefix.
15997test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015998
Martin v. Löwis11437992002-04-12 09:54:03 +000015999# VPATH may cause trouble with some makes, so we remove $(srcdir),
16000# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16001# trailing colons and then remove the whole line if VPATH becomes empty
16002# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016003if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16005s/:*\$(srcdir):*/:/;
16006s/:*\${srcdir}:*/:/;
16007s/:*@srcdir@:*/:/;
16008s/^\([^=]*=[ ]*\):*/\1/;
16009s/:*$//;
16010s/^[^=]*=[ ]*$//;
16011}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016012fi
16013
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016014DEFS=-DHAVE_CONFIG_H
16015
Martin v. Löwis11437992002-04-12 09:54:03 +000016016
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016017: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016018ac_clean_files_save=$ac_clean_files
16019ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16020{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16021echo "$as_me: creating $CONFIG_STATUS" >&6;}
16022cat >$CONFIG_STATUS <<_ACEOF
16023#! $SHELL
16024# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016025# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016026# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016027# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016028
Martin v. Löwis11437992002-04-12 09:54:03 +000016029debug=false
16030SHELL=\${CONFIG_SHELL-$SHELL}
16031_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016032
Martin v. Löwis11437992002-04-12 09:54:03 +000016033cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016034
Martin v. Löwis11437992002-04-12 09:54:03 +000016035## --------------------- ##
16036## M4sh Initialization. ##
16037## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016038
Martin v. Löwis11437992002-04-12 09:54:03 +000016039# Be Bourne compatible
16040if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16041 emulate sh
16042 NULLCMD=:
16043elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16044 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016045fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016046
Martin v. Löwis11437992002-04-12 09:54:03 +000016047# NLS nuisances.
16048# Support unset when possible.
16049if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16050 as_unset=unset
16051else
16052 as_unset=false
16053fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016054
Martin v. Löwis11437992002-04-12 09:54:03 +000016055(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16056 { $as_unset LANG || test "${LANG+set}" != set; } ||
16057 { LANG=C; export LANG; }
16058(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16059 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16060 { LC_ALL=C; export LC_ALL; }
16061(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16062 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16063 { LC_TIME=C; export LC_TIME; }
16064(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16065 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16066 { LC_CTYPE=C; export LC_CTYPE; }
16067(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16068 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16069 { LANGUAGE=C; export LANGUAGE; }
16070(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16071 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16072 { LC_COLLATE=C; export LC_COLLATE; }
16073(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16074 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16075 { LC_NUMERIC=C; export LC_NUMERIC; }
16076(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16077 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16078 { LC_MESSAGES=C; export LC_MESSAGES; }
16079
16080
16081# Name of the executable.
16082as_me=`(basename "$0") 2>/dev/null ||
16083$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16084 X"$0" : 'X\(//\)$' \| \
16085 X"$0" : 'X\(/\)$' \| \
16086 . : '\(.\)' 2>/dev/null ||
16087echo X/"$0" |
16088 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16089 /^X\/\(\/\/\)$/{ s//\1/; q; }
16090 /^X\/\(\/\).*/{ s//\1/; q; }
16091 s/.*/./; q'`
16092
16093# PATH needs CR, and LINENO needs CR and PATH.
16094# Avoid depending upon Character Ranges.
16095as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16096as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16097as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16098as_cr_digits='0123456789'
16099as_cr_alnum=$as_cr_Letters$as_cr_digits
16100
16101# The user is always right.
16102if test "${PATH_SEPARATOR+set}" != set; then
16103 echo "#! /bin/sh" >conftest.sh
16104 echo "exit 0" >>conftest.sh
16105 chmod +x conftest.sh
16106 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16107 PATH_SEPARATOR=';'
16108 else
16109 PATH_SEPARATOR=:
16110 fi
16111 rm -f conftest.sh
16112fi
16113
16114
16115 as_lineno_1=$LINENO
16116 as_lineno_2=$LINENO
16117 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16118 test "x$as_lineno_1" != "x$as_lineno_2" &&
16119 test "x$as_lineno_3" = "x$as_lineno_2" || {
16120 # Find who we are. Look in the path if we contain no path at all
16121 # relative or not.
16122 case $0 in
16123 *[\\/]* ) as_myself=$0 ;;
16124 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16125for as_dir in $PATH
16126do
16127 IFS=$as_save_IFS
16128 test -z "$as_dir" && as_dir=.
16129 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16130done
16131
16132 ;;
16133 esac
16134 # We did not find ourselves, most probably we were run as `sh COMMAND'
16135 # in which case we are not to be found in the path.
16136 if test "x$as_myself" = x; then
16137 as_myself=$0
16138 fi
16139 if test ! -f "$as_myself"; then
16140 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16141echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16142 { (exit 1); exit 1; }; }
16143 fi
16144 case $CONFIG_SHELL in
16145 '')
16146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16147for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16148do
16149 IFS=$as_save_IFS
16150 test -z "$as_dir" && as_dir=.
16151 for as_base in sh bash ksh sh5; do
16152 case $as_dir in
16153 /*)
16154 if ("$as_dir/$as_base" -c '
16155 as_lineno_1=$LINENO
16156 as_lineno_2=$LINENO
16157 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16158 test "x$as_lineno_1" != "x$as_lineno_2" &&
16159 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16160 CONFIG_SHELL=$as_dir/$as_base
16161 export CONFIG_SHELL
16162 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16163 fi;;
16164 esac
16165 done
16166done
16167;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016168 esac
16169
Martin v. Löwis11437992002-04-12 09:54:03 +000016170 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16171 # uniformly replaced by the line number. The first 'sed' inserts a
16172 # line-number line before each line; the second 'sed' does the real
16173 # work. The second script uses 'N' to pair each line-number line
16174 # with the numbered line, and appends trailing '-' during
16175 # substitution so that $LINENO is not a special case at line end.
16176 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16177 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16178 sed '=' <$as_myself |
16179 sed '
16180 N
16181 s,$,-,
16182 : loop
16183 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16184 t loop
16185 s,-$,,
16186 s,^['$as_cr_digits']*\n,,
16187 ' >$as_me.lineno &&
16188 chmod +x $as_me.lineno ||
16189 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16190echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16191 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016192
Martin v. Löwis11437992002-04-12 09:54:03 +000016193 # Don't try to exec as it changes $[0], causing all sort of problems
16194 # (the dirname of $[0] is not the place where we might find the
16195 # original and so on. Autoconf is especially sensible to this).
16196 . ./$as_me.lineno
16197 # Exit status is that of the last command.
16198 exit
16199}
16200
16201
16202case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16203 *c*,-n*) ECHO_N= ECHO_C='
16204' ECHO_T=' ' ;;
16205 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16206 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16207esac
16208
16209if expr a : '\(a\)' >/dev/null 2>&1; then
16210 as_expr=expr
16211else
16212 as_expr=false
16213fi
16214
16215rm -f conf$$ conf$$.exe conf$$.file
16216echo >conf$$.file
16217if ln -s conf$$.file conf$$ 2>/dev/null; then
16218 # We could just check for DJGPP; but this test a) works b) is more generic
16219 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16220 if test -f conf$$.exe; then
16221 # Don't use ln at all; we don't have any links
16222 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016223 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016224 as_ln_s='ln -s'
16225 fi
16226elif ln conf$$.file conf$$ 2>/dev/null; then
16227 as_ln_s=ln
16228else
16229 as_ln_s='cp -p'
16230fi
16231rm -f conf$$ conf$$.exe conf$$.file
16232
16233as_executable_p="test -f"
16234
16235# Sed expression to map a string onto a valid CPP name.
16236as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16237
16238# Sed expression to map a string onto a valid variable name.
16239as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16240
16241
16242# IFS
16243# We need space, tab and new line, in precisely that order.
16244as_nl='
16245'
16246IFS=" $as_nl"
16247
16248# CDPATH.
16249$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16250
16251exec 6>&1
16252
16253# Open the log real soon, to keep \$[0] and so on meaningful, and to
16254# report actual input values of CONFIG_FILES etc. instead of their
16255# values after options handling. Logging --version etc. is OK.
16256exec 5>>config.log
16257{
16258 echo
16259 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16260## Running $as_me. ##
16261_ASBOX
16262} >&5
16263cat >&5 <<_CSEOF
16264
16265This file was extended by $as_me, which was
16266generated by GNU Autoconf 2.53. Invocation command line was
16267
16268 CONFIG_FILES = $CONFIG_FILES
16269 CONFIG_HEADERS = $CONFIG_HEADERS
16270 CONFIG_LINKS = $CONFIG_LINKS
16271 CONFIG_COMMANDS = $CONFIG_COMMANDS
16272 $ $0 $@
16273
16274_CSEOF
16275echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16276echo >&5
16277_ACEOF
16278
16279# Files that config.status was made for.
16280if test -n "$ac_config_files"; then
16281 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16282fi
16283
16284if test -n "$ac_config_headers"; then
16285 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16286fi
16287
16288if test -n "$ac_config_links"; then
16289 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16290fi
16291
16292if test -n "$ac_config_commands"; then
16293 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16294fi
16295
16296cat >>$CONFIG_STATUS <<\_ACEOF
16297
16298ac_cs_usage="\
16299\`$as_me' instantiates files from templates according to the
16300current configuration.
16301
16302Usage: $0 [OPTIONS] [FILE]...
16303
16304 -h, --help print this help, then exit
16305 -V, --version print version number, then exit
16306 -d, --debug don't remove temporary files
16307 --recheck update $as_me by reconfiguring in the same conditions
16308 --file=FILE[:TEMPLATE]
16309 instantiate the configuration file FILE
16310 --header=FILE[:TEMPLATE]
16311 instantiate the configuration header FILE
16312
16313Configuration files:
16314$config_files
16315
16316Configuration headers:
16317$config_headers
16318
16319Report bugs to <bug-autoconf@gnu.org>."
16320_ACEOF
16321
16322cat >>$CONFIG_STATUS <<_ACEOF
16323ac_cs_version="\\
16324config.status
16325configured by $0, generated by GNU Autoconf 2.53,
16326 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16327
16328Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16329Free Software Foundation, Inc.
16330This config.status script is free software; the Free Software Foundation
16331gives unlimited permission to copy, distribute and modify it."
16332srcdir=$srcdir
16333INSTALL="$INSTALL"
16334_ACEOF
16335
16336cat >>$CONFIG_STATUS <<\_ACEOF
16337# If no file are specified by the user, then we need to provide default
16338# value. By we need to know if files were specified by the user.
16339ac_need_defaults=:
16340while test $# != 0
16341do
16342 case $1 in
16343 --*=*)
16344 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16345 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16346 shift
16347 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16348 shift
16349 ;;
16350 -*);;
16351 *) # This is not an option, so the user has probably given explicit
16352 # arguments.
16353 ac_need_defaults=false;;
16354 esac
16355
16356 case $1 in
16357 # Handling of the options.
16358_ACEOF
16359cat >>$CONFIG_STATUS <<_ACEOF
16360 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16361 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16362 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16363_ACEOF
16364cat >>$CONFIG_STATUS <<\_ACEOF
16365 --version | --vers* | -V )
16366 echo "$ac_cs_version"; exit 0 ;;
16367 --he | --h)
16368 # Conflict between --help and --header
16369 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16370Try \`$0 --help' for more information." >&5
16371echo "$as_me: error: ambiguous option: $1
16372Try \`$0 --help' for more information." >&2;}
16373 { (exit 1); exit 1; }; };;
16374 --help | --hel | -h )
16375 echo "$ac_cs_usage"; exit 0 ;;
16376 --debug | --d* | -d )
16377 debug=: ;;
16378 --file | --fil | --fi | --f )
16379 shift
16380 CONFIG_FILES="$CONFIG_FILES $1"
16381 ac_need_defaults=false;;
16382 --header | --heade | --head | --hea )
16383 shift
16384 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16385 ac_need_defaults=false;;
16386
16387 # This is an error.
16388 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16389Try \`$0 --help' for more information." >&5
16390echo "$as_me: error: unrecognized option: $1
16391Try \`$0 --help' for more information." >&2;}
16392 { (exit 1); exit 1; }; } ;;
16393
16394 *) ac_config_targets="$ac_config_targets $1" ;;
16395
16396 esac
16397 shift
16398done
16399
16400_ACEOF
16401
16402
16403
16404
16405
16406cat >>$CONFIG_STATUS <<\_ACEOF
16407for ac_config_target in $ac_config_targets
16408do
16409 case "$ac_config_target" in
16410 # Handling of arguments.
16411 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16412 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16413 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16414 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16415echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16416 { (exit 1); exit 1; }; };;
16417 esac
16418done
16419
16420# If the user did not use the arguments to specify the items to instantiate,
16421# then the envvar interface is used. Set only those that are not.
16422# We use the long form for the default assignment because of an extremely
16423# bizarre bug on SunOS 4.1.3.
16424if $ac_need_defaults; then
16425 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16426 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16427fi
16428
16429# Create a temporary directory, and hook for its removal unless debugging.
16430$debug ||
16431{
16432 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16433 trap '{ (exit 1); exit 1; }' 1 2 13 15
16434}
16435
16436# Create a (secure) tmp directory for tmp files.
16437: ${TMPDIR=/tmp}
16438{
16439 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16440 test -n "$tmp" && test -d "$tmp"
16441} ||
16442{
16443 tmp=$TMPDIR/cs$$-$RANDOM
16444 (umask 077 && mkdir $tmp)
16445} ||
16446{
16447 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16448 { (exit 1); exit 1; }
16449}
16450
16451_ACEOF
16452
16453cat >>$CONFIG_STATUS <<_ACEOF
16454
16455#
16456# CONFIG_FILES section.
16457#
16458
16459# No need to generate the scripts if there are no CONFIG_FILES.
16460# This happens for instance when ./config.status config.h
16461if test -n "\$CONFIG_FILES"; then
16462 # Protect against being on the right side of a sed subst in config.status.
16463 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16464 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16465s,@SHELL@,$SHELL,;t t
16466s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16467s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16468s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16469s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16470s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16471s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16472s,@exec_prefix@,$exec_prefix,;t t
16473s,@prefix@,$prefix,;t t
16474s,@program_transform_name@,$program_transform_name,;t t
16475s,@bindir@,$bindir,;t t
16476s,@sbindir@,$sbindir,;t t
16477s,@libexecdir@,$libexecdir,;t t
16478s,@datadir@,$datadir,;t t
16479s,@sysconfdir@,$sysconfdir,;t t
16480s,@sharedstatedir@,$sharedstatedir,;t t
16481s,@localstatedir@,$localstatedir,;t t
16482s,@libdir@,$libdir,;t t
16483s,@includedir@,$includedir,;t t
16484s,@oldincludedir@,$oldincludedir,;t t
16485s,@infodir@,$infodir,;t t
16486s,@mandir@,$mandir,;t t
16487s,@build_alias@,$build_alias,;t t
16488s,@host_alias@,$host_alias,;t t
16489s,@target_alias@,$target_alias,;t t
16490s,@DEFS@,$DEFS,;t t
16491s,@ECHO_C@,$ECHO_C,;t t
16492s,@ECHO_N@,$ECHO_N,;t t
16493s,@ECHO_T@,$ECHO_T,;t t
16494s,@LIBS@,$LIBS,;t t
16495s,@VERSION@,$VERSION,;t t
16496s,@SOVERSION@,$SOVERSION,;t t
16497s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16498s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16499s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16500s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16501s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16502s,@MACHDEP@,$MACHDEP,;t t
16503s,@SGI_ABI@,$SGI_ABI,;t t
16504s,@CXX@,$CXX,;t t
16505s,@MAINOBJ@,$MAINOBJ,;t t
16506s,@EXEEXT@,$EXEEXT,;t t
16507s,@CC@,$CC,;t t
16508s,@CFLAGS@,$CFLAGS,;t t
16509s,@LDFLAGS@,$LDFLAGS,;t t
16510s,@CPPFLAGS@,$CPPFLAGS,;t t
16511s,@ac_ct_CC@,$ac_ct_CC,;t t
16512s,@OBJEXT@,$OBJEXT,;t t
16513s,@CPP@,$CPP,;t t
16514s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16515s,@LIBRARY@,$LIBRARY,;t t
16516s,@LDLIBRARY@,$LDLIBRARY,;t t
16517s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16518s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16519s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16520s,@INSTSONAME@,$INSTSONAME,;t t
16521s,@RUNSHARED@,$RUNSHARED,;t t
16522s,@LINKCC@,$LINKCC,;t t
16523s,@RANLIB@,$RANLIB,;t t
16524s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16525s,@AR@,$AR,;t t
16526s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16527s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16528s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16529s,@LN@,$LN,;t t
16530s,@OPT@,$OPT,;t t
16531s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16532s,@SO@,$SO,;t t
16533s,@LDSHARED@,$LDSHARED,;t t
16534s,@BLDSHARED@,$BLDSHARED,;t t
16535s,@CCSHARED@,$CCSHARED,;t t
16536s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16537s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016538s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016539s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16540s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16541s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16542s,@LDLAST@,$LDLAST,;t t
16543s,@THREADOBJ@,$THREADOBJ,;t t
16544s,@DLINCLDIR@,$DLINCLDIR,;t t
16545s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16546s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16547s,@LIBOBJS@,$LIBOBJS,;t t
16548s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16549s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16550s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16551s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16552s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16553s,@LIBM@,$LIBM,;t t
16554s,@LIBC@,$LIBC,;t t
16555s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16556s,@THREADHEADERS@,$THREADHEADERS,;t t
16557s,@SRCDIRS@,$SRCDIRS,;t t
16558CEOF
16559
16560_ACEOF
16561
16562 cat >>$CONFIG_STATUS <<\_ACEOF
16563 # Split the substitutions into bite-sized pieces for seds with
16564 # small command number limits, like on Digital OSF/1 and HP-UX.
16565 ac_max_sed_lines=48
16566 ac_sed_frag=1 # Number of current file.
16567 ac_beg=1 # First line for current file.
16568 ac_end=$ac_max_sed_lines # Line after last line for current file.
16569 ac_more_lines=:
16570 ac_sed_cmds=
16571 while $ac_more_lines; do
16572 if test $ac_beg -gt 1; then
16573 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16574 else
16575 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16576 fi
16577 if test ! -s $tmp/subs.frag; then
16578 ac_more_lines=false
16579 else
16580 # The purpose of the label and of the branching condition is to
16581 # speed up the sed processing (if there are no `@' at all, there
16582 # is no need to browse any of the substitutions).
16583 # These are the two extra sed commands mentioned above.
16584 (echo ':t
16585 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16586 if test -z "$ac_sed_cmds"; then
16587 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16588 else
16589 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16590 fi
16591 ac_sed_frag=`expr $ac_sed_frag + 1`
16592 ac_beg=$ac_end
16593 ac_end=`expr $ac_end + $ac_max_sed_lines`
16594 fi
16595 done
16596 if test -z "$ac_sed_cmds"; then
16597 ac_sed_cmds=cat
16598 fi
16599fi # test -n "$CONFIG_FILES"
16600
16601_ACEOF
16602cat >>$CONFIG_STATUS <<\_ACEOF
16603for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16604 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16605 case $ac_file in
16606 - | *:- | *:-:* ) # input from stdin
16607 cat >$tmp/stdin
16608 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16609 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16610 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16611 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16612 * ) ac_file_in=$ac_file.in ;;
16613 esac
16614
16615 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16616 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16617$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16618 X"$ac_file" : 'X\(//\)[^/]' \| \
16619 X"$ac_file" : 'X\(//\)$' \| \
16620 X"$ac_file" : 'X\(/\)' \| \
16621 . : '\(.\)' 2>/dev/null ||
16622echo X"$ac_file" |
16623 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16624 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16625 /^X\(\/\/\)$/{ s//\1/; q; }
16626 /^X\(\/\).*/{ s//\1/; q; }
16627 s/.*/./; q'`
16628 { case "$ac_dir" in
16629 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16630 *) as_incr_dir=.;;
16631esac
16632as_dummy="$ac_dir"
16633for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16634 case $as_mkdir_dir in
16635 # Skip DOS drivespec
16636 ?:) as_incr_dir=$as_mkdir_dir ;;
16637 *)
16638 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16639 test -d "$as_incr_dir" ||
16640 mkdir "$as_incr_dir" ||
16641 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16642echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16643 { (exit 1); exit 1; }; }
16644 ;;
16645 esac
16646done; }
16647
16648 ac_builddir=.
16649
16650if test "$ac_dir" != .; then
16651 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16652 # A "../" for each directory in $ac_dir_suffix.
16653 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16654else
16655 ac_dir_suffix= ac_top_builddir=
16656fi
16657
16658case $srcdir in
16659 .) # No --srcdir option. We are building in place.
16660 ac_srcdir=.
16661 if test -z "$ac_top_builddir"; then
16662 ac_top_srcdir=.
16663 else
16664 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16665 fi ;;
16666 [\\/]* | ?:[\\/]* ) # Absolute path.
16667 ac_srcdir=$srcdir$ac_dir_suffix;
16668 ac_top_srcdir=$srcdir ;;
16669 *) # Relative path.
16670 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16671 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16672esac
16673# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16674# absolute.
16675ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16676ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16677ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16678ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16679
16680
16681 case $INSTALL in
16682 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16683 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16684 esac
16685
16686 if test x"$ac_file" != x-; then
16687 { echo "$as_me:$LINENO: creating $ac_file" >&5
16688echo "$as_me: creating $ac_file" >&6;}
16689 rm -f "$ac_file"
16690 fi
16691 # Let's still pretend it is `configure' which instantiates (i.e., don't
16692 # use $as_me), people would be surprised to read:
16693 # /* config.h. Generated by config.status. */
16694 if test x"$ac_file" = x-; then
16695 configure_input=
16696 else
16697 configure_input="$ac_file. "
16698 fi
16699 configure_input=$configure_input"Generated from `echo $ac_file_in |
16700 sed 's,.*/,,'` by configure."
16701
16702 # First look for the input files in the build tree, otherwise in the
16703 # src tree.
16704 ac_file_inputs=`IFS=:
16705 for f in $ac_file_in; do
16706 case $f in
16707 -) echo $tmp/stdin ;;
16708 [\\/$]*)
16709 # Absolute (can't be DOS-style, as IFS=:)
16710 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16711echo "$as_me: error: cannot find input file: $f" >&2;}
16712 { (exit 1); exit 1; }; }
16713 echo $f;;
16714 *) # Relative
16715 if test -f "$f"; then
16716 # Build tree
16717 echo $f
16718 elif test -f "$srcdir/$f"; then
16719 # Source tree
16720 echo $srcdir/$f
16721 else
16722 # /dev/null tree
16723 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16724echo "$as_me: error: cannot find input file: $f" >&2;}
16725 { (exit 1); exit 1; }; }
16726 fi;;
16727 esac
16728 done` || { (exit 1); exit 1; }
16729_ACEOF
16730cat >>$CONFIG_STATUS <<_ACEOF
16731 sed "$ac_vpsub
16732$extrasub
16733_ACEOF
16734cat >>$CONFIG_STATUS <<\_ACEOF
16735:t
16736/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16737s,@configure_input@,$configure_input,;t t
16738s,@srcdir@,$ac_srcdir,;t t
16739s,@abs_srcdir@,$ac_abs_srcdir,;t t
16740s,@top_srcdir@,$ac_top_srcdir,;t t
16741s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16742s,@builddir@,$ac_builddir,;t t
16743s,@abs_builddir@,$ac_abs_builddir,;t t
16744s,@top_builddir@,$ac_top_builddir,;t t
16745s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16746s,@INSTALL@,$ac_INSTALL,;t t
16747" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16748 rm -f $tmp/stdin
16749 if test x"$ac_file" != x-; then
16750 mv $tmp/out $ac_file
16751 else
16752 cat $tmp/out
16753 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016754 fi
16755
Martin v. Löwis11437992002-04-12 09:54:03 +000016756done
16757_ACEOF
16758cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016759
Martin v. Löwis11437992002-04-12 09:54:03 +000016760#
16761# CONFIG_HEADER section.
16762#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016764# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16765# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016766#
16767# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016768ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16769ac_dB='[ ].*$,\1#\2'
16770ac_dC=' '
16771ac_dD=',;t'
16772# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16773ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16774ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016775ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016776ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016777
Martin v. Löwis11437992002-04-12 09:54:03 +000016778for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016779 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016780 case $ac_file in
16781 - | *:- | *:-:* ) # input from stdin
16782 cat >$tmp/stdin
16783 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16784 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16785 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16786 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16787 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016788 esac
16789
Martin v. Löwis11437992002-04-12 09:54:03 +000016790 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16791echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016792
Martin v. Löwis11437992002-04-12 09:54:03 +000016793 # First look for the input files in the build tree, otherwise in the
16794 # src tree.
16795 ac_file_inputs=`IFS=:
16796 for f in $ac_file_in; do
16797 case $f in
16798 -) echo $tmp/stdin ;;
16799 [\\/$]*)
16800 # Absolute (can't be DOS-style, as IFS=:)
16801 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16802echo "$as_me: error: cannot find input file: $f" >&2;}
16803 { (exit 1); exit 1; }; }
16804 echo $f;;
16805 *) # Relative
16806 if test -f "$f"; then
16807 # Build tree
16808 echo $f
16809 elif test -f "$srcdir/$f"; then
16810 # Source tree
16811 echo $srcdir/$f
16812 else
16813 # /dev/null tree
16814 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16815echo "$as_me: error: cannot find input file: $f" >&2;}
16816 { (exit 1); exit 1; }; }
16817 fi;;
16818 esac
16819 done` || { (exit 1); exit 1; }
16820 # Remove the trailing spaces.
16821 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016822
Martin v. Löwis11437992002-04-12 09:54:03 +000016823_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016824
Martin v. Löwis11437992002-04-12 09:54:03 +000016825# Transform confdefs.h into two sed scripts, `conftest.defines' and
16826# `conftest.undefs', that substitutes the proper values into
16827# config.h.in to produce config.h. The first handles `#define'
16828# templates, and the second `#undef' templates.
16829# And first: Protect against being on the right side of a sed subst in
16830# config.status. Protect against being in an unquoted here document
16831# in config.status.
16832rm -f conftest.defines conftest.undefs
16833# Using a here document instead of a string reduces the quoting nightmare.
16834# Putting comments in sed scripts is not portable.
16835#
16836# `end' is used to avoid that the second main sed command (meant for
16837# 0-ary CPP macros) applies to n-ary macro definitions.
16838# See the Autoconf documentation for `clear'.
16839cat >confdef2sed.sed <<\_ACEOF
16840s/[\\&,]/\\&/g
16841s,[\\$`],\\&,g
16842t clear
16843: clear
16844s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16845t end
16846s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16847: end
16848_ACEOF
16849# If some macros were called several times there might be several times
16850# the same #defines, which is useless. Nevertheless, we may not want to
16851# sort them, since we want the *last* AC-DEFINE to be honored.
16852uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16853sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16854rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016855
16856# This sed command replaces #undef with comments. This is necessary, for
16857# example, in the case of _POSIX_SOURCE, which is predefined and required
16858# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016859cat >>conftest.undefs <<\_ACEOF
16860s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16861_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016862
Martin v. Löwis11437992002-04-12 09:54:03 +000016863# Break up conftest.defines because some shells have a limit on the size
16864# of here documents, and old seds have small limits too (100 cmds).
16865echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16866echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16867echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16868echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016869rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016870while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016871do
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 # Write a limited-size here document to $tmp/defines.sed.
16873 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16874 # Speed up: don't consider the non `#define' lines.
16875 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16876 # Work around the forget-to-reset-the-flag bug.
16877 echo 't clr' >>$CONFIG_STATUS
16878 echo ': clr' >>$CONFIG_STATUS
16879 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016880 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016881 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16882 rm -f $tmp/in
16883 mv $tmp/out $tmp/in
16884' >>$CONFIG_STATUS
16885 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16886 rm -f conftest.defines
16887 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016888done
Martin v. Löwis11437992002-04-12 09:54:03 +000016889rm -f conftest.defines
16890echo ' fi # egrep' >>$CONFIG_STATUS
16891echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016892
Martin v. Löwis11437992002-04-12 09:54:03 +000016893# Break up conftest.undefs because some shells have a limit on the size
16894# of here documents, and old seds have small limits too (100 cmds).
16895echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16896rm -f conftest.tail
16897while grep . conftest.undefs >/dev/null
16898do
16899 # Write a limited-size here document to $tmp/undefs.sed.
16900 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16901 # Speed up: don't consider the non `#undef'
16902 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16903 # Work around the forget-to-reset-the-flag bug.
16904 echo 't clr' >>$CONFIG_STATUS
16905 echo ': clr' >>$CONFIG_STATUS
16906 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16907 echo 'CEOF
16908 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16909 rm -f $tmp/in
16910 mv $tmp/out $tmp/in
16911' >>$CONFIG_STATUS
16912 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16913 rm -f conftest.undefs
16914 mv conftest.tail conftest.undefs
16915done
16916rm -f conftest.undefs
16917
16918cat >>$CONFIG_STATUS <<\_ACEOF
16919 # Let's still pretend it is `configure' which instantiates (i.e., don't
16920 # use $as_me), people would be surprised to read:
16921 # /* config.h. Generated by config.status. */
16922 if test x"$ac_file" = x-; then
16923 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016924 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016925 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016926 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016927 cat $tmp/in >>$tmp/config.h
16928 rm -f $tmp/in
16929 if test x"$ac_file" != x-; then
16930 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16931 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16932echo "$as_me: $ac_file is unchanged" >&6;}
16933 else
16934 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16935$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16936 X"$ac_file" : 'X\(//\)[^/]' \| \
16937 X"$ac_file" : 'X\(//\)$' \| \
16938 X"$ac_file" : 'X\(/\)' \| \
16939 . : '\(.\)' 2>/dev/null ||
16940echo X"$ac_file" |
16941 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16942 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16943 /^X\(\/\/\)$/{ s//\1/; q; }
16944 /^X\(\/\).*/{ s//\1/; q; }
16945 s/.*/./; q'`
16946 { case "$ac_dir" in
16947 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16948 *) as_incr_dir=.;;
16949esac
16950as_dummy="$ac_dir"
16951for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16952 case $as_mkdir_dir in
16953 # Skip DOS drivespec
16954 ?:) as_incr_dir=$as_mkdir_dir ;;
16955 *)
16956 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16957 test -d "$as_incr_dir" ||
16958 mkdir "$as_incr_dir" ||
16959 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16960echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16961 { (exit 1); exit 1; }; }
16962 ;;
16963 esac
16964done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016965
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 rm -f $ac_file
16967 mv $tmp/config.h $ac_file
16968 fi
16969 else
16970 cat $tmp/config.h
16971 rm -f $tmp/config.h
16972 fi
16973done
16974_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016975
Martin v. Löwis11437992002-04-12 09:54:03 +000016976cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016977
Martin v. Löwis11437992002-04-12 09:54:03 +000016978{ (exit 0); exit 0; }
16979_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016980chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016981ac_clean_files=$ac_clean_files_save
16982
16983
16984# configure is writing to config.log, and then calls config.status.
16985# config.status does its own redirection, appending to config.log.
16986# Unfortunately, on DOS this fails, as config.log is still kept open
16987# by configure, so config.status won't be able to write to it; its
16988# output is simply discarded. So we exec the FD to /dev/null,
16989# effectively closing config.log, so it can be properly (re)opened and
16990# appended to by config.status. When coming back to configure, we
16991# need to make the FD available again.
16992if test "$no_create" != yes; then
16993 ac_cs_success=:
16994 exec 5>/dev/null
16995 $SHELL $CONFIG_STATUS || ac_cs_success=false
16996 exec 5>>config.log
16997 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16998 # would make configure fail if this is the last instruction.
16999 $ac_cs_success || { (exit 1); exit 1; }
17000fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017001
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017002
17003echo "creating Setup"
17004if test ! -f Modules/Setup
17005then
17006 cp $srcdir/Modules/Setup.dist Modules/Setup
17007fi
17008
17009echo "creating Setup.local"
17010if test ! -f Modules/Setup.local
17011then
17012 echo "# Edit this file for local setup changes" >Modules/Setup.local
17013fi
17014
17015echo "creating Makefile"
17016$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17017 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017018 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017019mv config.c Modules