blob: 92bf5f6bc5b4db1d510991e2f323aaba9a6f8b5a [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002# From configure.in Revision: 1.322 .
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 Jansen1999ef42001-12-06 21:47:20 +00002954if test -d "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
3866
3867
3868
3869
Neal Norwitz3d949422002-04-20 13:46:43 +00003870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003872libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003873signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Neal Norwitz3d949422002-04-20 13:46:43 +00003874sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003875sys/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 +00003876sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00003877ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003878do
Martin v. Löwis11437992002-04-12 09:54:03 +00003879as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3880if eval "test \"\${$as_ac_Header+set}\" = set"; then
3881 echo "$as_me:$LINENO: checking for $ac_header" >&5
3882echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3883if eval "test \"\${$as_ac_Header+set}\" = set"; then
3884 echo $ECHO_N "(cached) $ECHO_C" >&6
3885fi
3886echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3887echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003888else
Martin v. Löwis11437992002-04-12 09:54:03 +00003889 # Is the header compilable?
3890echo "$as_me:$LINENO: checking $ac_header usability" >&5
3891echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3892cat >conftest.$ac_ext <<_ACEOF
3893#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003894#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003895$ac_includes_default
3896#include <$ac_header>
3897_ACEOF
3898rm -f conftest.$ac_objext
3899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3900 (eval $ac_compile) 2>&5
3901 ac_status=$?
3902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3903 (exit $ac_status); } &&
3904 { ac_try='test -s conftest.$ac_objext'
3905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3906 (eval $ac_try) 2>&5
3907 ac_status=$?
3908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3909 (exit $ac_status); }; }; then
3910 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003911else
Martin v. Löwis11437992002-04-12 09:54:03 +00003912 echo "$as_me: failed program was:" >&5
3913cat conftest.$ac_ext >&5
3914ac_header_compiler=no
3915fi
3916rm -f conftest.$ac_objext conftest.$ac_ext
3917echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3918echo "${ECHO_T}$ac_header_compiler" >&6
3919
3920# Is the header present?
3921echo "$as_me:$LINENO: checking $ac_header presence" >&5
3922echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3923cat >conftest.$ac_ext <<_ACEOF
3924#line $LINENO "configure"
3925#include "confdefs.h"
3926#include <$ac_header>
3927_ACEOF
3928if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3929 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3930 ac_status=$?
3931 egrep -v '^ *\+' conftest.er1 >conftest.err
3932 rm -f conftest.er1
3933 cat conftest.err >&5
3934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3935 (exit $ac_status); } >/dev/null; then
3936 if test -s conftest.err; then
3937 ac_cpp_err=$ac_c_preproc_warn_flag
3938 else
3939 ac_cpp_err=
3940 fi
3941else
3942 ac_cpp_err=yes
3943fi
3944if test -z "$ac_cpp_err"; then
3945 ac_header_preproc=yes
3946else
3947 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003948 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003949 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003950fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003951rm -f conftest.err conftest.$ac_ext
3952echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3953echo "${ECHO_T}$ac_header_preproc" >&6
3954
3955# So? What about this header?
3956case $ac_header_compiler:$ac_header_preproc in
3957 yes:no )
3958 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3959echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3960 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3961echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3962 no:yes )
3963 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3964echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3965 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3966echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3967 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3968echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3969esac
3970echo "$as_me:$LINENO: checking for $ac_header" >&5
3971echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3972if eval "test \"\${$as_ac_Header+set}\" = set"; then
3973 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003974else
Martin v. Löwis11437992002-04-12 09:54:03 +00003975 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003976fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003977echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3978echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3979
3980fi
3981if test `eval echo '${'$as_ac_Header'}'` = yes; then
3982 cat >>confdefs.h <<_ACEOF
3983#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3984_ACEOF
3985
3986fi
3987
Guido van Rossum627b2d71993-12-24 10:39:16 +00003988done
3989
Martin v. Löwis11437992002-04-12 09:54:03 +00003990
3991
3992
3993
3994
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003995ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003996for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3997 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3998echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3999echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4000if eval "test \"\${$as_ac_Header+set}\" = set"; then
4001 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004002else
Martin v. Löwis11437992002-04-12 09:54:03 +00004003 cat >conftest.$ac_ext <<_ACEOF
4004#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004005#include "confdefs.h"
4006#include <sys/types.h>
4007#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004008
4009#ifdef F77_DUMMY_MAIN
4010# ifdef __cplusplus
4011 extern "C"
4012# endif
4013 int F77_DUMMY_MAIN() { return 1; }
4014#endif
4015int
4016main ()
4017{
4018if ((DIR *) 0)
4019return 0;
4020 ;
4021 return 0;
4022}
4023_ACEOF
4024rm -f conftest.$ac_objext
4025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4026 (eval $ac_compile) 2>&5
4027 ac_status=$?
4028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4029 (exit $ac_status); } &&
4030 { ac_try='test -s conftest.$ac_objext'
4031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4032 (eval $ac_try) 2>&5
4033 ac_status=$?
4034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4035 (exit $ac_status); }; }; then
4036 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004037else
Martin v. Löwis11437992002-04-12 09:54:03 +00004038 echo "$as_me: failed program was:" >&5
4039cat conftest.$ac_ext >&5
4040eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004041fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004042rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004043fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004044echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4045echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4046if test `eval echo '${'$as_ac_Header'}'` = yes; then
4047 cat >>confdefs.h <<_ACEOF
4048#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4049_ACEOF
4050
4051ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004052fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004054done
4055# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4056if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004057 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4058echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4059if test "${ac_cv_search_opendir+set}" = set; then
4060 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004061else
Martin v. Löwis11437992002-04-12 09:54:03 +00004062 ac_func_search_save_LIBS=$LIBS
4063ac_cv_search_opendir=no
4064cat >conftest.$ac_ext <<_ACEOF
4065#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004066#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004068/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004069#ifdef __cplusplus
4070extern "C"
4071#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004072/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004073 builtin and then its argument prototype would still apply. */
4074char opendir ();
4075#ifdef F77_DUMMY_MAIN
4076# ifdef __cplusplus
4077 extern "C"
4078# endif
4079 int F77_DUMMY_MAIN() { return 1; }
4080#endif
4081int
4082main ()
4083{
4084opendir ();
4085 ;
4086 return 0;
4087}
4088_ACEOF
4089rm -f conftest.$ac_objext conftest$ac_exeext
4090if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4091 (eval $ac_link) 2>&5
4092 ac_status=$?
4093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4094 (exit $ac_status); } &&
4095 { ac_try='test -s conftest$ac_exeext'
4096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4097 (eval $ac_try) 2>&5
4098 ac_status=$?
4099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4100 (exit $ac_status); }; }; then
4101 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004102else
Martin v. Löwis11437992002-04-12 09:54:03 +00004103 echo "$as_me: failed program was:" >&5
4104cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004105fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004106rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4107if test "$ac_cv_search_opendir" = no; then
4108 for ac_lib in dir; do
4109 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4110 cat >conftest.$ac_ext <<_ACEOF
4111#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004112#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004113
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004114/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004115#ifdef __cplusplus
4116extern "C"
4117#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004118/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004119 builtin and then its argument prototype would still apply. */
4120char opendir ();
4121#ifdef F77_DUMMY_MAIN
4122# ifdef __cplusplus
4123 extern "C"
4124# endif
4125 int F77_DUMMY_MAIN() { return 1; }
4126#endif
4127int
4128main ()
4129{
4130opendir ();
4131 ;
4132 return 0;
4133}
4134_ACEOF
4135rm -f conftest.$ac_objext conftest$ac_exeext
4136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4137 (eval $ac_link) 2>&5
4138 ac_status=$?
4139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4140 (exit $ac_status); } &&
4141 { ac_try='test -s conftest$ac_exeext'
4142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4143 (eval $ac_try) 2>&5
4144 ac_status=$?
4145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4146 (exit $ac_status); }; }; then
4147 ac_cv_search_opendir="-l$ac_lib"
4148break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149else
Martin v. Löwis11437992002-04-12 09:54:03 +00004150 echo "$as_me: failed program was:" >&5
4151cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004153rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4154 done
4155fi
4156LIBS=$ac_func_search_save_LIBS
4157fi
4158echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4159echo "${ECHO_T}$ac_cv_search_opendir" >&6
4160if test "$ac_cv_search_opendir" != no; then
4161 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004162
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004163fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004164
Michael W. Hudson54241132001-12-07 15:38:26 +00004165else
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4167echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4168if test "${ac_cv_search_opendir+set}" = set; then
4169 echo $ECHO_N "(cached) $ECHO_C" >&6
4170else
4171 ac_func_search_save_LIBS=$LIBS
4172ac_cv_search_opendir=no
4173cat >conftest.$ac_ext <<_ACEOF
4174#line $LINENO "configure"
4175#include "confdefs.h"
4176
4177/* Override any gcc2 internal prototype to avoid an error. */
4178#ifdef __cplusplus
4179extern "C"
4180#endif
4181/* We use char because int might match the return type of a gcc2
4182 builtin and then its argument prototype would still apply. */
4183char opendir ();
4184#ifdef F77_DUMMY_MAIN
4185# ifdef __cplusplus
4186 extern "C"
4187# endif
4188 int F77_DUMMY_MAIN() { return 1; }
4189#endif
4190int
4191main ()
4192{
4193opendir ();
4194 ;
4195 return 0;
4196}
4197_ACEOF
4198rm -f conftest.$ac_objext conftest$ac_exeext
4199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4200 (eval $ac_link) 2>&5
4201 ac_status=$?
4202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4203 (exit $ac_status); } &&
4204 { ac_try='test -s conftest$ac_exeext'
4205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4206 (eval $ac_try) 2>&5
4207 ac_status=$?
4208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209 (exit $ac_status); }; }; then
4210 ac_cv_search_opendir="none required"
4211else
4212 echo "$as_me: failed program was:" >&5
4213cat conftest.$ac_ext >&5
4214fi
4215rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4216if test "$ac_cv_search_opendir" = no; then
4217 for ac_lib in x; do
4218 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4219 cat >conftest.$ac_ext <<_ACEOF
4220#line $LINENO "configure"
4221#include "confdefs.h"
4222
4223/* Override any gcc2 internal prototype to avoid an error. */
4224#ifdef __cplusplus
4225extern "C"
4226#endif
4227/* We use char because int might match the return type of a gcc2
4228 builtin and then its argument prototype would still apply. */
4229char opendir ();
4230#ifdef F77_DUMMY_MAIN
4231# ifdef __cplusplus
4232 extern "C"
4233# endif
4234 int F77_DUMMY_MAIN() { return 1; }
4235#endif
4236int
4237main ()
4238{
4239opendir ();
4240 ;
4241 return 0;
4242}
4243_ACEOF
4244rm -f conftest.$ac_objext conftest$ac_exeext
4245if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4246 (eval $ac_link) 2>&5
4247 ac_status=$?
4248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4249 (exit $ac_status); } &&
4250 { ac_try='test -s conftest$ac_exeext'
4251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4252 (eval $ac_try) 2>&5
4253 ac_status=$?
4254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4255 (exit $ac_status); }; }; then
4256 ac_cv_search_opendir="-l$ac_lib"
4257break
4258else
4259 echo "$as_me: failed program was:" >&5
4260cat conftest.$ac_ext >&5
4261fi
4262rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4263 done
4264fi
4265LIBS=$ac_func_search_save_LIBS
4266fi
4267echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4268echo "${ECHO_T}$ac_cv_search_opendir" >&6
4269if test "$ac_cv_search_opendir" != no; then
4270 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4271
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004272fi
4273
4274fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004275
Michael W. Hudson54241132001-12-07 15:38:26 +00004276
Guido van Rossum627b2d71993-12-24 10:39:16 +00004277# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004278was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004279echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4280echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4281cat >conftest.$ac_ext <<_ACEOF
4282#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004283#include "confdefs.h"
4284#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004285
4286_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4288 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004289 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004290else
Martin v. Löwis11437992002-04-12 09:54:03 +00004291
4292
4293cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004294#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004295_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004296
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004297
Guido van Rossum627b2d71993-12-24 10:39:16 +00004298fi
4299rm -f conftest*
4300
Martin v. Löwis11437992002-04-12 09:54:03 +00004301echo "$as_me:$LINENO: result: $was_it_defined" >&5
4302echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004303
Guido van Rossum810cc512001-09-09 23:51:39 +00004304# Two defines needed to enable largefile support on various platforms
4305# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004306
Martin v. Löwis11437992002-04-12 09:54:03 +00004307cat >>confdefs.h <<\_ACEOF
4308#define _LARGEFILE_SOURCE 1
4309_ACEOF
4310
4311
4312cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004313#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004314_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004315
Michael W. Hudson54241132001-12-07 15:38:26 +00004316
Guido van Rossum84e7b241996-08-19 21:59:00 +00004317# Add some code to confdefs.h so that the test for off_t works on SCO
4318cat >> confdefs.h <<\EOF
4319#if defined(SCO_DS)
4320#undef _OFF_T
4321#endif
4322EOF
4323
Guido van Rossumef2255b2000-03-10 22:30:29 +00004324# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004325echo "$as_me:$LINENO: checking for mode_t" >&5
4326echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4327if test "${ac_cv_type_mode_t+set}" = set; then
4328 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004329else
Martin v. Löwis11437992002-04-12 09:54:03 +00004330 cat >conftest.$ac_ext <<_ACEOF
4331#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004332#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004333$ac_includes_default
4334#ifdef F77_DUMMY_MAIN
4335# ifdef __cplusplus
4336 extern "C"
4337# endif
4338 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004340int
4341main ()
4342{
4343if ((mode_t *) 0)
4344 return 0;
4345if (sizeof (mode_t))
4346 return 0;
4347 ;
4348 return 0;
4349}
4350_ACEOF
4351rm -f conftest.$ac_objext
4352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4353 (eval $ac_compile) 2>&5
4354 ac_status=$?
4355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4356 (exit $ac_status); } &&
4357 { ac_try='test -s conftest.$ac_objext'
4358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4359 (eval $ac_try) 2>&5
4360 ac_status=$?
4361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4362 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004363 ac_cv_type_mode_t=yes
4364else
Martin v. Löwis11437992002-04-12 09:54:03 +00004365 echo "$as_me: failed program was:" >&5
4366cat conftest.$ac_ext >&5
4367ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004368fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004369rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004370fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004371echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4372echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4373if test $ac_cv_type_mode_t = yes; then
4374 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004375else
Martin v. Löwis11437992002-04-12 09:54:03 +00004376
4377cat >>confdefs.h <<_ACEOF
4378#define mode_t int
4379_ACEOF
4380
4381fi
4382
4383echo "$as_me:$LINENO: checking for off_t" >&5
4384echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4385if test "${ac_cv_type_off_t+set}" = set; then
4386 echo $ECHO_N "(cached) $ECHO_C" >&6
4387else
4388 cat >conftest.$ac_ext <<_ACEOF
4389#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004391$ac_includes_default
4392#ifdef F77_DUMMY_MAIN
4393# ifdef __cplusplus
4394 extern "C"
4395# endif
4396 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004398int
4399main ()
4400{
4401if ((off_t *) 0)
4402 return 0;
4403if (sizeof (off_t))
4404 return 0;
4405 ;
4406 return 0;
4407}
4408_ACEOF
4409rm -f conftest.$ac_objext
4410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4411 (eval $ac_compile) 2>&5
4412 ac_status=$?
4413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4414 (exit $ac_status); } &&
4415 { ac_try='test -s conftest.$ac_objext'
4416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4417 (eval $ac_try) 2>&5
4418 ac_status=$?
4419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4420 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004421 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004422else
Martin v. Löwis11437992002-04-12 09:54:03 +00004423 echo "$as_me: failed program was:" >&5
4424cat conftest.$ac_ext >&5
4425ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004426fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004427rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004428fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004429echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4430echo "${ECHO_T}$ac_cv_type_off_t" >&6
4431if test $ac_cv_type_off_t = yes; then
4432 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004433else
Martin v. Löwis11437992002-04-12 09:54:03 +00004434
4435cat >>confdefs.h <<_ACEOF
4436#define off_t long
4437_ACEOF
4438
4439fi
4440
4441echo "$as_me:$LINENO: checking for pid_t" >&5
4442echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4443if test "${ac_cv_type_pid_t+set}" = set; then
4444 echo $ECHO_N "(cached) $ECHO_C" >&6
4445else
4446 cat >conftest.$ac_ext <<_ACEOF
4447#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004448#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004449$ac_includes_default
4450#ifdef F77_DUMMY_MAIN
4451# ifdef __cplusplus
4452 extern "C"
4453# endif
4454 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004456int
4457main ()
4458{
4459if ((pid_t *) 0)
4460 return 0;
4461if (sizeof (pid_t))
4462 return 0;
4463 ;
4464 return 0;
4465}
4466_ACEOF
4467rm -f conftest.$ac_objext
4468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4469 (eval $ac_compile) 2>&5
4470 ac_status=$?
4471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4472 (exit $ac_status); } &&
4473 { ac_try='test -s conftest.$ac_objext'
4474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4475 (eval $ac_try) 2>&5
4476 ac_status=$?
4477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4478 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004479 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004480else
Martin v. Löwis11437992002-04-12 09:54:03 +00004481 echo "$as_me: failed program was:" >&5
4482cat conftest.$ac_ext >&5
4483ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004485rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004486fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004487echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4488echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4489if test $ac_cv_type_pid_t = yes; then
4490 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004491else
Martin v. Löwis11437992002-04-12 09:54:03 +00004492
4493cat >>confdefs.h <<_ACEOF
4494#define pid_t int
4495_ACEOF
4496
4497fi
4498
4499echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4500echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4501if test "${ac_cv_type_signal+set}" = set; then
4502 echo $ECHO_N "(cached) $ECHO_C" >&6
4503else
4504 cat >conftest.$ac_ext <<_ACEOF
4505#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004506#include "confdefs.h"
4507#include <sys/types.h>
4508#include <signal.h>
4509#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004510# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004511#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004512#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004513extern "C" void (*signal (int, void (*)(int)))(int);
4514#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004515void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004516#endif
4517
Martin v. Löwis11437992002-04-12 09:54:03 +00004518#ifdef F77_DUMMY_MAIN
4519# ifdef __cplusplus
4520 extern "C"
4521# endif
4522 int F77_DUMMY_MAIN() { return 1; }
4523#endif
4524int
4525main ()
4526{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004527int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004528 ;
4529 return 0;
4530}
4531_ACEOF
4532rm -f conftest.$ac_objext
4533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4534 (eval $ac_compile) 2>&5
4535 ac_status=$?
4536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4537 (exit $ac_status); } &&
4538 { ac_try='test -s conftest.$ac_objext'
4539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4540 (eval $ac_try) 2>&5
4541 ac_status=$?
4542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4543 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004544 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004545else
Martin v. Löwis11437992002-04-12 09:54:03 +00004546 echo "$as_me: failed program was:" >&5
4547cat conftest.$ac_ext >&5
4548ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004549fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004550rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004551fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004552echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4553echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004554
Martin v. Löwis11437992002-04-12 09:54:03 +00004555cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004556#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004557_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004558
Michael W. Hudson54241132001-12-07 15:38:26 +00004559
Martin v. Löwis11437992002-04-12 09:54:03 +00004560echo "$as_me:$LINENO: checking for size_t" >&5
4561echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4562if test "${ac_cv_type_size_t+set}" = set; then
4563 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004564else
Martin v. Löwis11437992002-04-12 09:54:03 +00004565 cat >conftest.$ac_ext <<_ACEOF
4566#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004567#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004568$ac_includes_default
4569#ifdef F77_DUMMY_MAIN
4570# ifdef __cplusplus
4571 extern "C"
4572# endif
4573 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004575int
4576main ()
4577{
4578if ((size_t *) 0)
4579 return 0;
4580if (sizeof (size_t))
4581 return 0;
4582 ;
4583 return 0;
4584}
4585_ACEOF
4586rm -f conftest.$ac_objext
4587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4588 (eval $ac_compile) 2>&5
4589 ac_status=$?
4590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4591 (exit $ac_status); } &&
4592 { ac_try='test -s conftest.$ac_objext'
4593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4594 (eval $ac_try) 2>&5
4595 ac_status=$?
4596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4597 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004598 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004599else
Martin v. Löwis11437992002-04-12 09:54:03 +00004600 echo "$as_me: failed program was:" >&5
4601cat conftest.$ac_ext >&5
4602ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004603fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004604rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004605fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004606echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4607echo "${ECHO_T}$ac_cv_type_size_t" >&6
4608if test $ac_cv_type_size_t = yes; then
4609 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610else
Martin v. Löwis11437992002-04-12 09:54:03 +00004611
4612cat >>confdefs.h <<_ACEOF
4613#define size_t unsigned
4614_ACEOF
4615
4616fi
4617
4618echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4619echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4620if test "${ac_cv_type_uid_t+set}" = set; then
4621 echo $ECHO_N "(cached) $ECHO_C" >&6
4622else
4623 cat >conftest.$ac_ext <<_ACEOF
4624#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004625#include "confdefs.h"
4626#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004627
4628_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004629if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4630 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004631 ac_cv_type_uid_t=yes
4632else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633 ac_cv_type_uid_t=no
4634fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004635rm -f conftest*
4636
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004637fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004638echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4639echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004640if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004641
Martin v. Löwis11437992002-04-12 09:54:03 +00004642cat >>confdefs.h <<\_ACEOF
4643#define uid_t int
4644_ACEOF
4645
4646
4647cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004648#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004649_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004650
4651fi
4652
Jack Jansendd19cf82001-12-06 22:36:17 +00004653
Michael W. Hudson54241132001-12-07 15:38:26 +00004654# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004655echo "$as_me:$LINENO: checking for int" >&5
4656echo $ECHO_N "checking for int... $ECHO_C" >&6
4657if test "${ac_cv_type_int+set}" = set; then
4658 echo $ECHO_N "(cached) $ECHO_C" >&6
4659else
4660 cat >conftest.$ac_ext <<_ACEOF
4661#line $LINENO "configure"
4662#include "confdefs.h"
4663$ac_includes_default
4664#ifdef F77_DUMMY_MAIN
4665# ifdef __cplusplus
4666 extern "C"
4667# endif
4668 int F77_DUMMY_MAIN() { return 1; }
4669#endif
4670int
4671main ()
4672{
4673if ((int *) 0)
4674 return 0;
4675if (sizeof (int))
4676 return 0;
4677 ;
4678 return 0;
4679}
4680_ACEOF
4681rm -f conftest.$ac_objext
4682if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4683 (eval $ac_compile) 2>&5
4684 ac_status=$?
4685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4686 (exit $ac_status); } &&
4687 { ac_try='test -s conftest.$ac_objext'
4688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4689 (eval $ac_try) 2>&5
4690 ac_status=$?
4691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4692 (exit $ac_status); }; }; then
4693 ac_cv_type_int=yes
4694else
4695 echo "$as_me: failed program was:" >&5
4696cat conftest.$ac_ext >&5
4697ac_cv_type_int=no
4698fi
4699rm -f conftest.$ac_objext conftest.$ac_ext
4700fi
4701echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4702echo "${ECHO_T}$ac_cv_type_int" >&6
4703
4704echo "$as_me:$LINENO: checking size of int" >&5
4705echo $ECHO_N "checking size of int... $ECHO_C" >&6
4706if test "${ac_cv_sizeof_int+set}" = set; then
4707 echo $ECHO_N "(cached) $ECHO_C" >&6
4708else
4709 if test "$ac_cv_type_int" = yes; then
4710 # The cast to unsigned long works around a bug in the HP C Compiler
4711 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4712 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4713 # This bug is HP SR number 8606223364.
4714 if test "$cross_compiling" = yes; then
4715 # Depending upon the size, compute the lo and hi bounds.
4716cat >conftest.$ac_ext <<_ACEOF
4717#line $LINENO "configure"
4718#include "confdefs.h"
4719$ac_includes_default
4720#ifdef F77_DUMMY_MAIN
4721# ifdef __cplusplus
4722 extern "C"
4723# endif
4724 int F77_DUMMY_MAIN() { return 1; }
4725#endif
4726int
4727main ()
4728{
4729static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4730test_array [0] = 0
4731
4732 ;
4733 return 0;
4734}
4735_ACEOF
4736rm -f conftest.$ac_objext
4737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4738 (eval $ac_compile) 2>&5
4739 ac_status=$?
4740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4741 (exit $ac_status); } &&
4742 { ac_try='test -s conftest.$ac_objext'
4743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4744 (eval $ac_try) 2>&5
4745 ac_status=$?
4746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4747 (exit $ac_status); }; }; then
4748 ac_lo=0 ac_mid=0
4749 while :; do
4750 cat >conftest.$ac_ext <<_ACEOF
4751#line $LINENO "configure"
4752#include "confdefs.h"
4753$ac_includes_default
4754#ifdef F77_DUMMY_MAIN
4755# ifdef __cplusplus
4756 extern "C"
4757# endif
4758 int F77_DUMMY_MAIN() { return 1; }
4759#endif
4760int
4761main ()
4762{
4763static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4764test_array [0] = 0
4765
4766 ;
4767 return 0;
4768}
4769_ACEOF
4770rm -f conftest.$ac_objext
4771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4772 (eval $ac_compile) 2>&5
4773 ac_status=$?
4774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4775 (exit $ac_status); } &&
4776 { ac_try='test -s conftest.$ac_objext'
4777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4778 (eval $ac_try) 2>&5
4779 ac_status=$?
4780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4781 (exit $ac_status); }; }; then
4782 ac_hi=$ac_mid; break
4783else
4784 echo "$as_me: failed program was:" >&5
4785cat conftest.$ac_ext >&5
4786ac_lo=`expr $ac_mid + 1`
4787 if test $ac_lo -le $ac_mid; then
4788 ac_lo= ac_hi=
4789 break
4790 fi
4791 ac_mid=`expr 2 '*' $ac_mid + 1`
4792fi
4793rm -f conftest.$ac_objext conftest.$ac_ext
4794 done
4795else
4796 echo "$as_me: failed program was:" >&5
4797cat conftest.$ac_ext >&5
4798cat >conftest.$ac_ext <<_ACEOF
4799#line $LINENO "configure"
4800#include "confdefs.h"
4801$ac_includes_default
4802#ifdef F77_DUMMY_MAIN
4803# ifdef __cplusplus
4804 extern "C"
4805# endif
4806 int F77_DUMMY_MAIN() { return 1; }
4807#endif
4808int
4809main ()
4810{
4811static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4812test_array [0] = 0
4813
4814 ;
4815 return 0;
4816}
4817_ACEOF
4818rm -f conftest.$ac_objext
4819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4820 (eval $ac_compile) 2>&5
4821 ac_status=$?
4822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823 (exit $ac_status); } &&
4824 { ac_try='test -s conftest.$ac_objext'
4825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4826 (eval $ac_try) 2>&5
4827 ac_status=$?
4828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4829 (exit $ac_status); }; }; then
4830 ac_hi=-1 ac_mid=-1
4831 while :; do
4832 cat >conftest.$ac_ext <<_ACEOF
4833#line $LINENO "configure"
4834#include "confdefs.h"
4835$ac_includes_default
4836#ifdef F77_DUMMY_MAIN
4837# ifdef __cplusplus
4838 extern "C"
4839# endif
4840 int F77_DUMMY_MAIN() { return 1; }
4841#endif
4842int
4843main ()
4844{
4845static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4846test_array [0] = 0
4847
4848 ;
4849 return 0;
4850}
4851_ACEOF
4852rm -f conftest.$ac_objext
4853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4854 (eval $ac_compile) 2>&5
4855 ac_status=$?
4856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4857 (exit $ac_status); } &&
4858 { ac_try='test -s conftest.$ac_objext'
4859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4860 (eval $ac_try) 2>&5
4861 ac_status=$?
4862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4863 (exit $ac_status); }; }; then
4864 ac_lo=$ac_mid; break
4865else
4866 echo "$as_me: failed program was:" >&5
4867cat conftest.$ac_ext >&5
4868ac_hi=`expr '(' $ac_mid ')' - 1`
4869 if test $ac_mid -le $ac_hi; then
4870 ac_lo= ac_hi=
4871 break
4872 fi
4873 ac_mid=`expr 2 '*' $ac_mid`
4874fi
4875rm -f conftest.$ac_objext conftest.$ac_ext
4876 done
4877else
4878 echo "$as_me: failed program was:" >&5
4879cat conftest.$ac_ext >&5
4880ac_lo= ac_hi=
4881fi
4882rm -f conftest.$ac_objext conftest.$ac_ext
4883fi
4884rm -f conftest.$ac_objext conftest.$ac_ext
4885# Binary search between lo and hi bounds.
4886while test "x$ac_lo" != "x$ac_hi"; do
4887 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4888 cat >conftest.$ac_ext <<_ACEOF
4889#line $LINENO "configure"
4890#include "confdefs.h"
4891$ac_includes_default
4892#ifdef F77_DUMMY_MAIN
4893# ifdef __cplusplus
4894 extern "C"
4895# endif
4896 int F77_DUMMY_MAIN() { return 1; }
4897#endif
4898int
4899main ()
4900{
4901static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4902test_array [0] = 0
4903
4904 ;
4905 return 0;
4906}
4907_ACEOF
4908rm -f conftest.$ac_objext
4909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4910 (eval $ac_compile) 2>&5
4911 ac_status=$?
4912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4913 (exit $ac_status); } &&
4914 { ac_try='test -s conftest.$ac_objext'
4915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4916 (eval $ac_try) 2>&5
4917 ac_status=$?
4918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4919 (exit $ac_status); }; }; then
4920 ac_hi=$ac_mid
4921else
4922 echo "$as_me: failed program was:" >&5
4923cat conftest.$ac_ext >&5
4924ac_lo=`expr '(' $ac_mid ')' + 1`
4925fi
4926rm -f conftest.$ac_objext conftest.$ac_ext
4927done
4928case $ac_lo in
4929?*) ac_cv_sizeof_int=$ac_lo;;
4930'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4931echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4932 { (exit 1); exit 1; }; } ;;
4933esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004934else
4935 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4937echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4938 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004939else
Martin v. Löwis11437992002-04-12 09:54:03 +00004940 cat >conftest.$ac_ext <<_ACEOF
4941#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004942#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004943$ac_includes_default
4944long longval () { return (long) (sizeof (int)); }
4945unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004946#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004947#include <stdlib.h>
4948#ifdef F77_DUMMY_MAIN
4949# ifdef __cplusplus
4950 extern "C"
4951# endif
4952 int F77_DUMMY_MAIN() { return 1; }
4953#endif
4954int
4955main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004956{
Martin v. Löwis11437992002-04-12 09:54:03 +00004957
4958 FILE *f = fopen ("conftest.val", "w");
4959 if (! f)
4960 exit (1);
4961 if (((long) (sizeof (int))) < 0)
4962 {
4963 long i = longval ();
4964 if (i != ((long) (sizeof (int))))
4965 exit (1);
4966 fprintf (f, "%ld\n", i);
4967 }
4968 else
4969 {
4970 unsigned long i = ulongval ();
4971 if (i != ((long) (sizeof (int))))
4972 exit (1);
4973 fprintf (f, "%lu\n", i);
4974 }
4975 exit (ferror (f) || fclose (f) != 0);
4976
4977 ;
4978 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004979}
Martin v. Löwis11437992002-04-12 09:54:03 +00004980_ACEOF
4981rm -f conftest$ac_exeext
4982if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4983 (eval $ac_link) 2>&5
4984 ac_status=$?
4985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4986 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4988 (eval $ac_try) 2>&5
4989 ac_status=$?
4990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4991 (exit $ac_status); }; }; then
4992 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004993else
Martin v. Löwis11437992002-04-12 09:54:03 +00004994 echo "$as_me: program exited with status $ac_status" >&5
4995echo "$as_me: failed program was:" >&5
4996cat conftest.$ac_ext >&5
4997( exit $ac_status )
4998{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4999echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5000 { (exit 1); exit 1; }; }
5001fi
5002rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5003fi
5004fi
5005rm -f conftest.val
5006else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005007 ac_cv_sizeof_int=0
5008fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005009fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005010echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5011echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5012cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005013#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005014_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005015
5016
Martin v. Löwis11437992002-04-12 09:54:03 +00005017echo "$as_me:$LINENO: checking for long" >&5
5018echo $ECHO_N "checking for long... $ECHO_C" >&6
5019if test "${ac_cv_type_long+set}" = set; then
5020 echo $ECHO_N "(cached) $ECHO_C" >&6
5021else
5022 cat >conftest.$ac_ext <<_ACEOF
5023#line $LINENO "configure"
5024#include "confdefs.h"
5025$ac_includes_default
5026#ifdef F77_DUMMY_MAIN
5027# ifdef __cplusplus
5028 extern "C"
5029# endif
5030 int F77_DUMMY_MAIN() { return 1; }
5031#endif
5032int
5033main ()
5034{
5035if ((long *) 0)
5036 return 0;
5037if (sizeof (long))
5038 return 0;
5039 ;
5040 return 0;
5041}
5042_ACEOF
5043rm -f conftest.$ac_objext
5044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5045 (eval $ac_compile) 2>&5
5046 ac_status=$?
5047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5048 (exit $ac_status); } &&
5049 { ac_try='test -s conftest.$ac_objext'
5050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5051 (eval $ac_try) 2>&5
5052 ac_status=$?
5053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5054 (exit $ac_status); }; }; then
5055 ac_cv_type_long=yes
5056else
5057 echo "$as_me: failed program was:" >&5
5058cat conftest.$ac_ext >&5
5059ac_cv_type_long=no
5060fi
5061rm -f conftest.$ac_objext conftest.$ac_ext
5062fi
5063echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5064echo "${ECHO_T}$ac_cv_type_long" >&6
5065
5066echo "$as_me:$LINENO: checking size of long" >&5
5067echo $ECHO_N "checking size of long... $ECHO_C" >&6
5068if test "${ac_cv_sizeof_long+set}" = set; then
5069 echo $ECHO_N "(cached) $ECHO_C" >&6
5070else
5071 if test "$ac_cv_type_long" = yes; then
5072 # The cast to unsigned long works around a bug in the HP C Compiler
5073 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5074 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5075 # This bug is HP SR number 8606223364.
5076 if test "$cross_compiling" = yes; then
5077 # Depending upon the size, compute the lo and hi bounds.
5078cat >conftest.$ac_ext <<_ACEOF
5079#line $LINENO "configure"
5080#include "confdefs.h"
5081$ac_includes_default
5082#ifdef F77_DUMMY_MAIN
5083# ifdef __cplusplus
5084 extern "C"
5085# endif
5086 int F77_DUMMY_MAIN() { return 1; }
5087#endif
5088int
5089main ()
5090{
5091static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5092test_array [0] = 0
5093
5094 ;
5095 return 0;
5096}
5097_ACEOF
5098rm -f conftest.$ac_objext
5099if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5100 (eval $ac_compile) 2>&5
5101 ac_status=$?
5102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5103 (exit $ac_status); } &&
5104 { ac_try='test -s conftest.$ac_objext'
5105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5106 (eval $ac_try) 2>&5
5107 ac_status=$?
5108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5109 (exit $ac_status); }; }; then
5110 ac_lo=0 ac_mid=0
5111 while :; do
5112 cat >conftest.$ac_ext <<_ACEOF
5113#line $LINENO "configure"
5114#include "confdefs.h"
5115$ac_includes_default
5116#ifdef F77_DUMMY_MAIN
5117# ifdef __cplusplus
5118 extern "C"
5119# endif
5120 int F77_DUMMY_MAIN() { return 1; }
5121#endif
5122int
5123main ()
5124{
5125static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5126test_array [0] = 0
5127
5128 ;
5129 return 0;
5130}
5131_ACEOF
5132rm -f conftest.$ac_objext
5133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5134 (eval $ac_compile) 2>&5
5135 ac_status=$?
5136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5137 (exit $ac_status); } &&
5138 { ac_try='test -s conftest.$ac_objext'
5139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5140 (eval $ac_try) 2>&5
5141 ac_status=$?
5142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5143 (exit $ac_status); }; }; then
5144 ac_hi=$ac_mid; break
5145else
5146 echo "$as_me: failed program was:" >&5
5147cat conftest.$ac_ext >&5
5148ac_lo=`expr $ac_mid + 1`
5149 if test $ac_lo -le $ac_mid; then
5150 ac_lo= ac_hi=
5151 break
5152 fi
5153 ac_mid=`expr 2 '*' $ac_mid + 1`
5154fi
5155rm -f conftest.$ac_objext conftest.$ac_ext
5156 done
5157else
5158 echo "$as_me: failed program was:" >&5
5159cat conftest.$ac_ext >&5
5160cat >conftest.$ac_ext <<_ACEOF
5161#line $LINENO "configure"
5162#include "confdefs.h"
5163$ac_includes_default
5164#ifdef F77_DUMMY_MAIN
5165# ifdef __cplusplus
5166 extern "C"
5167# endif
5168 int F77_DUMMY_MAIN() { return 1; }
5169#endif
5170int
5171main ()
5172{
5173static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5174test_array [0] = 0
5175
5176 ;
5177 return 0;
5178}
5179_ACEOF
5180rm -f conftest.$ac_objext
5181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5182 (eval $ac_compile) 2>&5
5183 ac_status=$?
5184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5185 (exit $ac_status); } &&
5186 { ac_try='test -s conftest.$ac_objext'
5187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5188 (eval $ac_try) 2>&5
5189 ac_status=$?
5190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5191 (exit $ac_status); }; }; then
5192 ac_hi=-1 ac_mid=-1
5193 while :; do
5194 cat >conftest.$ac_ext <<_ACEOF
5195#line $LINENO "configure"
5196#include "confdefs.h"
5197$ac_includes_default
5198#ifdef F77_DUMMY_MAIN
5199# ifdef __cplusplus
5200 extern "C"
5201# endif
5202 int F77_DUMMY_MAIN() { return 1; }
5203#endif
5204int
5205main ()
5206{
5207static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5208test_array [0] = 0
5209
5210 ;
5211 return 0;
5212}
5213_ACEOF
5214rm -f conftest.$ac_objext
5215if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5216 (eval $ac_compile) 2>&5
5217 ac_status=$?
5218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5219 (exit $ac_status); } &&
5220 { ac_try='test -s conftest.$ac_objext'
5221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5222 (eval $ac_try) 2>&5
5223 ac_status=$?
5224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5225 (exit $ac_status); }; }; then
5226 ac_lo=$ac_mid; break
5227else
5228 echo "$as_me: failed program was:" >&5
5229cat conftest.$ac_ext >&5
5230ac_hi=`expr '(' $ac_mid ')' - 1`
5231 if test $ac_mid -le $ac_hi; then
5232 ac_lo= ac_hi=
5233 break
5234 fi
5235 ac_mid=`expr 2 '*' $ac_mid`
5236fi
5237rm -f conftest.$ac_objext conftest.$ac_ext
5238 done
5239else
5240 echo "$as_me: failed program was:" >&5
5241cat conftest.$ac_ext >&5
5242ac_lo= ac_hi=
5243fi
5244rm -f conftest.$ac_objext conftest.$ac_ext
5245fi
5246rm -f conftest.$ac_objext conftest.$ac_ext
5247# Binary search between lo and hi bounds.
5248while test "x$ac_lo" != "x$ac_hi"; do
5249 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5250 cat >conftest.$ac_ext <<_ACEOF
5251#line $LINENO "configure"
5252#include "confdefs.h"
5253$ac_includes_default
5254#ifdef F77_DUMMY_MAIN
5255# ifdef __cplusplus
5256 extern "C"
5257# endif
5258 int F77_DUMMY_MAIN() { return 1; }
5259#endif
5260int
5261main ()
5262{
5263static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5264test_array [0] = 0
5265
5266 ;
5267 return 0;
5268}
5269_ACEOF
5270rm -f conftest.$ac_objext
5271if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5272 (eval $ac_compile) 2>&5
5273 ac_status=$?
5274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5275 (exit $ac_status); } &&
5276 { ac_try='test -s conftest.$ac_objext'
5277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5278 (eval $ac_try) 2>&5
5279 ac_status=$?
5280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5281 (exit $ac_status); }; }; then
5282 ac_hi=$ac_mid
5283else
5284 echo "$as_me: failed program was:" >&5
5285cat conftest.$ac_ext >&5
5286ac_lo=`expr '(' $ac_mid ')' + 1`
5287fi
5288rm -f conftest.$ac_objext conftest.$ac_ext
5289done
5290case $ac_lo in
5291?*) ac_cv_sizeof_long=$ac_lo;;
5292'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5293echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5294 { (exit 1); exit 1; }; } ;;
5295esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005296else
5297 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005298 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5299echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5300 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005301else
Martin v. Löwis11437992002-04-12 09:54:03 +00005302 cat >conftest.$ac_ext <<_ACEOF
5303#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005304#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005305$ac_includes_default
5306long longval () { return (long) (sizeof (long)); }
5307unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005308#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005309#include <stdlib.h>
5310#ifdef F77_DUMMY_MAIN
5311# ifdef __cplusplus
5312 extern "C"
5313# endif
5314 int F77_DUMMY_MAIN() { return 1; }
5315#endif
5316int
5317main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005318{
Martin v. Löwis11437992002-04-12 09:54:03 +00005319
5320 FILE *f = fopen ("conftest.val", "w");
5321 if (! f)
5322 exit (1);
5323 if (((long) (sizeof (long))) < 0)
5324 {
5325 long i = longval ();
5326 if (i != ((long) (sizeof (long))))
5327 exit (1);
5328 fprintf (f, "%ld\n", i);
5329 }
5330 else
5331 {
5332 unsigned long i = ulongval ();
5333 if (i != ((long) (sizeof (long))))
5334 exit (1);
5335 fprintf (f, "%lu\n", i);
5336 }
5337 exit (ferror (f) || fclose (f) != 0);
5338
5339 ;
5340 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005341}
Martin v. Löwis11437992002-04-12 09:54:03 +00005342_ACEOF
5343rm -f conftest$ac_exeext
5344if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5345 (eval $ac_link) 2>&5
5346 ac_status=$?
5347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5348 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5350 (eval $ac_try) 2>&5
5351 ac_status=$?
5352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5353 (exit $ac_status); }; }; then
5354 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005355else
Martin v. Löwis11437992002-04-12 09:54:03 +00005356 echo "$as_me: program exited with status $ac_status" >&5
5357echo "$as_me: failed program was:" >&5
5358cat conftest.$ac_ext >&5
5359( exit $ac_status )
5360{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5361echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5362 { (exit 1); exit 1; }; }
5363fi
5364rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5365fi
5366fi
5367rm -f conftest.val
5368else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005369 ac_cv_sizeof_long=0
5370fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005371fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005372echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5373echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5374cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005375#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005376_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005377
5378
Martin v. Löwis11437992002-04-12 09:54:03 +00005379echo "$as_me:$LINENO: checking for void *" >&5
5380echo $ECHO_N "checking for void *... $ECHO_C" >&6
5381if test "${ac_cv_type_void_p+set}" = set; then
5382 echo $ECHO_N "(cached) $ECHO_C" >&6
5383else
5384 cat >conftest.$ac_ext <<_ACEOF
5385#line $LINENO "configure"
5386#include "confdefs.h"
5387$ac_includes_default
5388#ifdef F77_DUMMY_MAIN
5389# ifdef __cplusplus
5390 extern "C"
5391# endif
5392 int F77_DUMMY_MAIN() { return 1; }
5393#endif
5394int
5395main ()
5396{
5397if ((void * *) 0)
5398 return 0;
5399if (sizeof (void *))
5400 return 0;
5401 ;
5402 return 0;
5403}
5404_ACEOF
5405rm -f conftest.$ac_objext
5406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5407 (eval $ac_compile) 2>&5
5408 ac_status=$?
5409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5410 (exit $ac_status); } &&
5411 { ac_try='test -s conftest.$ac_objext'
5412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5413 (eval $ac_try) 2>&5
5414 ac_status=$?
5415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5416 (exit $ac_status); }; }; then
5417 ac_cv_type_void_p=yes
5418else
5419 echo "$as_me: failed program was:" >&5
5420cat conftest.$ac_ext >&5
5421ac_cv_type_void_p=no
5422fi
5423rm -f conftest.$ac_objext conftest.$ac_ext
5424fi
5425echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5426echo "${ECHO_T}$ac_cv_type_void_p" >&6
5427
5428echo "$as_me:$LINENO: checking size of void *" >&5
5429echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5430if test "${ac_cv_sizeof_void_p+set}" = set; then
5431 echo $ECHO_N "(cached) $ECHO_C" >&6
5432else
5433 if test "$ac_cv_type_void_p" = yes; then
5434 # The cast to unsigned long works around a bug in the HP C Compiler
5435 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5436 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5437 # This bug is HP SR number 8606223364.
5438 if test "$cross_compiling" = yes; then
5439 # Depending upon the size, compute the lo and hi bounds.
5440cat >conftest.$ac_ext <<_ACEOF
5441#line $LINENO "configure"
5442#include "confdefs.h"
5443$ac_includes_default
5444#ifdef F77_DUMMY_MAIN
5445# ifdef __cplusplus
5446 extern "C"
5447# endif
5448 int F77_DUMMY_MAIN() { return 1; }
5449#endif
5450int
5451main ()
5452{
5453static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5454test_array [0] = 0
5455
5456 ;
5457 return 0;
5458}
5459_ACEOF
5460rm -f conftest.$ac_objext
5461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5462 (eval $ac_compile) 2>&5
5463 ac_status=$?
5464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5465 (exit $ac_status); } &&
5466 { ac_try='test -s conftest.$ac_objext'
5467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5468 (eval $ac_try) 2>&5
5469 ac_status=$?
5470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5471 (exit $ac_status); }; }; then
5472 ac_lo=0 ac_mid=0
5473 while :; do
5474 cat >conftest.$ac_ext <<_ACEOF
5475#line $LINENO "configure"
5476#include "confdefs.h"
5477$ac_includes_default
5478#ifdef F77_DUMMY_MAIN
5479# ifdef __cplusplus
5480 extern "C"
5481# endif
5482 int F77_DUMMY_MAIN() { return 1; }
5483#endif
5484int
5485main ()
5486{
5487static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5488test_array [0] = 0
5489
5490 ;
5491 return 0;
5492}
5493_ACEOF
5494rm -f conftest.$ac_objext
5495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5496 (eval $ac_compile) 2>&5
5497 ac_status=$?
5498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5499 (exit $ac_status); } &&
5500 { ac_try='test -s conftest.$ac_objext'
5501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5502 (eval $ac_try) 2>&5
5503 ac_status=$?
5504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5505 (exit $ac_status); }; }; then
5506 ac_hi=$ac_mid; break
5507else
5508 echo "$as_me: failed program was:" >&5
5509cat conftest.$ac_ext >&5
5510ac_lo=`expr $ac_mid + 1`
5511 if test $ac_lo -le $ac_mid; then
5512 ac_lo= ac_hi=
5513 break
5514 fi
5515 ac_mid=`expr 2 '*' $ac_mid + 1`
5516fi
5517rm -f conftest.$ac_objext conftest.$ac_ext
5518 done
5519else
5520 echo "$as_me: failed program was:" >&5
5521cat conftest.$ac_ext >&5
5522cat >conftest.$ac_ext <<_ACEOF
5523#line $LINENO "configure"
5524#include "confdefs.h"
5525$ac_includes_default
5526#ifdef F77_DUMMY_MAIN
5527# ifdef __cplusplus
5528 extern "C"
5529# endif
5530 int F77_DUMMY_MAIN() { return 1; }
5531#endif
5532int
5533main ()
5534{
5535static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5536test_array [0] = 0
5537
5538 ;
5539 return 0;
5540}
5541_ACEOF
5542rm -f conftest.$ac_objext
5543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5544 (eval $ac_compile) 2>&5
5545 ac_status=$?
5546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5547 (exit $ac_status); } &&
5548 { ac_try='test -s conftest.$ac_objext'
5549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5550 (eval $ac_try) 2>&5
5551 ac_status=$?
5552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5553 (exit $ac_status); }; }; then
5554 ac_hi=-1 ac_mid=-1
5555 while :; do
5556 cat >conftest.$ac_ext <<_ACEOF
5557#line $LINENO "configure"
5558#include "confdefs.h"
5559$ac_includes_default
5560#ifdef F77_DUMMY_MAIN
5561# ifdef __cplusplus
5562 extern "C"
5563# endif
5564 int F77_DUMMY_MAIN() { return 1; }
5565#endif
5566int
5567main ()
5568{
5569static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5570test_array [0] = 0
5571
5572 ;
5573 return 0;
5574}
5575_ACEOF
5576rm -f conftest.$ac_objext
5577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5578 (eval $ac_compile) 2>&5
5579 ac_status=$?
5580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 (exit $ac_status); } &&
5582 { ac_try='test -s conftest.$ac_objext'
5583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5584 (eval $ac_try) 2>&5
5585 ac_status=$?
5586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5587 (exit $ac_status); }; }; then
5588 ac_lo=$ac_mid; break
5589else
5590 echo "$as_me: failed program was:" >&5
5591cat conftest.$ac_ext >&5
5592ac_hi=`expr '(' $ac_mid ')' - 1`
5593 if test $ac_mid -le $ac_hi; then
5594 ac_lo= ac_hi=
5595 break
5596 fi
5597 ac_mid=`expr 2 '*' $ac_mid`
5598fi
5599rm -f conftest.$ac_objext conftest.$ac_ext
5600 done
5601else
5602 echo "$as_me: failed program was:" >&5
5603cat conftest.$ac_ext >&5
5604ac_lo= ac_hi=
5605fi
5606rm -f conftest.$ac_objext conftest.$ac_ext
5607fi
5608rm -f conftest.$ac_objext conftest.$ac_ext
5609# Binary search between lo and hi bounds.
5610while test "x$ac_lo" != "x$ac_hi"; do
5611 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5612 cat >conftest.$ac_ext <<_ACEOF
5613#line $LINENO "configure"
5614#include "confdefs.h"
5615$ac_includes_default
5616#ifdef F77_DUMMY_MAIN
5617# ifdef __cplusplus
5618 extern "C"
5619# endif
5620 int F77_DUMMY_MAIN() { return 1; }
5621#endif
5622int
5623main ()
5624{
5625static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5626test_array [0] = 0
5627
5628 ;
5629 return 0;
5630}
5631_ACEOF
5632rm -f conftest.$ac_objext
5633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5634 (eval $ac_compile) 2>&5
5635 ac_status=$?
5636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5637 (exit $ac_status); } &&
5638 { ac_try='test -s conftest.$ac_objext'
5639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5640 (eval $ac_try) 2>&5
5641 ac_status=$?
5642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5643 (exit $ac_status); }; }; then
5644 ac_hi=$ac_mid
5645else
5646 echo "$as_me: failed program was:" >&5
5647cat conftest.$ac_ext >&5
5648ac_lo=`expr '(' $ac_mid ')' + 1`
5649fi
5650rm -f conftest.$ac_objext conftest.$ac_ext
5651done
5652case $ac_lo in
5653?*) ac_cv_sizeof_void_p=$ac_lo;;
5654'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5655echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5656 { (exit 1); exit 1; }; } ;;
5657esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005658else
5659 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005660 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5661echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5662 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005663else
Martin v. Löwis11437992002-04-12 09:54:03 +00005664 cat >conftest.$ac_ext <<_ACEOF
5665#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005666#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005667$ac_includes_default
5668long longval () { return (long) (sizeof (void *)); }
5669unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005670#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005671#include <stdlib.h>
5672#ifdef F77_DUMMY_MAIN
5673# ifdef __cplusplus
5674 extern "C"
5675# endif
5676 int F77_DUMMY_MAIN() { return 1; }
5677#endif
5678int
5679main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005680{
Martin v. Löwis11437992002-04-12 09:54:03 +00005681
5682 FILE *f = fopen ("conftest.val", "w");
5683 if (! f)
5684 exit (1);
5685 if (((long) (sizeof (void *))) < 0)
5686 {
5687 long i = longval ();
5688 if (i != ((long) (sizeof (void *))))
5689 exit (1);
5690 fprintf (f, "%ld\n", i);
5691 }
5692 else
5693 {
5694 unsigned long i = ulongval ();
5695 if (i != ((long) (sizeof (void *))))
5696 exit (1);
5697 fprintf (f, "%lu\n", i);
5698 }
5699 exit (ferror (f) || fclose (f) != 0);
5700
5701 ;
5702 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005703}
Martin v. Löwis11437992002-04-12 09:54:03 +00005704_ACEOF
5705rm -f conftest$ac_exeext
5706if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5707 (eval $ac_link) 2>&5
5708 ac_status=$?
5709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5710 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5712 (eval $ac_try) 2>&5
5713 ac_status=$?
5714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5715 (exit $ac_status); }; }; then
5716 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005717else
Martin v. Löwis11437992002-04-12 09:54:03 +00005718 echo "$as_me: program exited with status $ac_status" >&5
5719echo "$as_me: failed program was:" >&5
5720cat conftest.$ac_ext >&5
5721( exit $ac_status )
5722{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5723echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5724 { (exit 1); exit 1; }; }
5725fi
5726rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5727fi
5728fi
5729rm -f conftest.val
5730else
Guido van Rossumad678af1998-10-02 14:42:15 +00005731 ac_cv_sizeof_void_p=0
5732fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005733fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005734echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5735echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5736cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005737#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005738_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005739
5740
Martin v. Löwis11437992002-04-12 09:54:03 +00005741echo "$as_me:$LINENO: checking for char" >&5
5742echo $ECHO_N "checking for char... $ECHO_C" >&6
5743if test "${ac_cv_type_char+set}" = set; then
5744 echo $ECHO_N "(cached) $ECHO_C" >&6
5745else
5746 cat >conftest.$ac_ext <<_ACEOF
5747#line $LINENO "configure"
5748#include "confdefs.h"
5749$ac_includes_default
5750#ifdef F77_DUMMY_MAIN
5751# ifdef __cplusplus
5752 extern "C"
5753# endif
5754 int F77_DUMMY_MAIN() { return 1; }
5755#endif
5756int
5757main ()
5758{
5759if ((char *) 0)
5760 return 0;
5761if (sizeof (char))
5762 return 0;
5763 ;
5764 return 0;
5765}
5766_ACEOF
5767rm -f conftest.$ac_objext
5768if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5769 (eval $ac_compile) 2>&5
5770 ac_status=$?
5771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5772 (exit $ac_status); } &&
5773 { ac_try='test -s conftest.$ac_objext'
5774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5775 (eval $ac_try) 2>&5
5776 ac_status=$?
5777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5778 (exit $ac_status); }; }; then
5779 ac_cv_type_char=yes
5780else
5781 echo "$as_me: failed program was:" >&5
5782cat conftest.$ac_ext >&5
5783ac_cv_type_char=no
5784fi
5785rm -f conftest.$ac_objext conftest.$ac_ext
5786fi
5787echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5788echo "${ECHO_T}$ac_cv_type_char" >&6
5789
5790echo "$as_me:$LINENO: checking size of char" >&5
5791echo $ECHO_N "checking size of char... $ECHO_C" >&6
5792if test "${ac_cv_sizeof_char+set}" = set; then
5793 echo $ECHO_N "(cached) $ECHO_C" >&6
5794else
5795 if test "$ac_cv_type_char" = yes; then
5796 # The cast to unsigned long works around a bug in the HP C Compiler
5797 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5798 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5799 # This bug is HP SR number 8606223364.
5800 if test "$cross_compiling" = yes; then
5801 # Depending upon the size, compute the lo and hi bounds.
5802cat >conftest.$ac_ext <<_ACEOF
5803#line $LINENO "configure"
5804#include "confdefs.h"
5805$ac_includes_default
5806#ifdef F77_DUMMY_MAIN
5807# ifdef __cplusplus
5808 extern "C"
5809# endif
5810 int F77_DUMMY_MAIN() { return 1; }
5811#endif
5812int
5813main ()
5814{
5815static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5816test_array [0] = 0
5817
5818 ;
5819 return 0;
5820}
5821_ACEOF
5822rm -f conftest.$ac_objext
5823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5824 (eval $ac_compile) 2>&5
5825 ac_status=$?
5826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5827 (exit $ac_status); } &&
5828 { ac_try='test -s conftest.$ac_objext'
5829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5830 (eval $ac_try) 2>&5
5831 ac_status=$?
5832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5833 (exit $ac_status); }; }; then
5834 ac_lo=0 ac_mid=0
5835 while :; do
5836 cat >conftest.$ac_ext <<_ACEOF
5837#line $LINENO "configure"
5838#include "confdefs.h"
5839$ac_includes_default
5840#ifdef F77_DUMMY_MAIN
5841# ifdef __cplusplus
5842 extern "C"
5843# endif
5844 int F77_DUMMY_MAIN() { return 1; }
5845#endif
5846int
5847main ()
5848{
5849static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5850test_array [0] = 0
5851
5852 ;
5853 return 0;
5854}
5855_ACEOF
5856rm -f conftest.$ac_objext
5857if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5858 (eval $ac_compile) 2>&5
5859 ac_status=$?
5860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5861 (exit $ac_status); } &&
5862 { ac_try='test -s conftest.$ac_objext'
5863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5864 (eval $ac_try) 2>&5
5865 ac_status=$?
5866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867 (exit $ac_status); }; }; then
5868 ac_hi=$ac_mid; break
5869else
5870 echo "$as_me: failed program was:" >&5
5871cat conftest.$ac_ext >&5
5872ac_lo=`expr $ac_mid + 1`
5873 if test $ac_lo -le $ac_mid; then
5874 ac_lo= ac_hi=
5875 break
5876 fi
5877 ac_mid=`expr 2 '*' $ac_mid + 1`
5878fi
5879rm -f conftest.$ac_objext conftest.$ac_ext
5880 done
5881else
5882 echo "$as_me: failed program was:" >&5
5883cat conftest.$ac_ext >&5
5884cat >conftest.$ac_ext <<_ACEOF
5885#line $LINENO "configure"
5886#include "confdefs.h"
5887$ac_includes_default
5888#ifdef F77_DUMMY_MAIN
5889# ifdef __cplusplus
5890 extern "C"
5891# endif
5892 int F77_DUMMY_MAIN() { return 1; }
5893#endif
5894int
5895main ()
5896{
5897static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5898test_array [0] = 0
5899
5900 ;
5901 return 0;
5902}
5903_ACEOF
5904rm -f conftest.$ac_objext
5905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5906 (eval $ac_compile) 2>&5
5907 ac_status=$?
5908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5909 (exit $ac_status); } &&
5910 { ac_try='test -s conftest.$ac_objext'
5911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5912 (eval $ac_try) 2>&5
5913 ac_status=$?
5914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5915 (exit $ac_status); }; }; then
5916 ac_hi=-1 ac_mid=-1
5917 while :; do
5918 cat >conftest.$ac_ext <<_ACEOF
5919#line $LINENO "configure"
5920#include "confdefs.h"
5921$ac_includes_default
5922#ifdef F77_DUMMY_MAIN
5923# ifdef __cplusplus
5924 extern "C"
5925# endif
5926 int F77_DUMMY_MAIN() { return 1; }
5927#endif
5928int
5929main ()
5930{
5931static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5932test_array [0] = 0
5933
5934 ;
5935 return 0;
5936}
5937_ACEOF
5938rm -f conftest.$ac_objext
5939if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5940 (eval $ac_compile) 2>&5
5941 ac_status=$?
5942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5943 (exit $ac_status); } &&
5944 { ac_try='test -s conftest.$ac_objext'
5945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5946 (eval $ac_try) 2>&5
5947 ac_status=$?
5948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5949 (exit $ac_status); }; }; then
5950 ac_lo=$ac_mid; break
5951else
5952 echo "$as_me: failed program was:" >&5
5953cat conftest.$ac_ext >&5
5954ac_hi=`expr '(' $ac_mid ')' - 1`
5955 if test $ac_mid -le $ac_hi; then
5956 ac_lo= ac_hi=
5957 break
5958 fi
5959 ac_mid=`expr 2 '*' $ac_mid`
5960fi
5961rm -f conftest.$ac_objext conftest.$ac_ext
5962 done
5963else
5964 echo "$as_me: failed program was:" >&5
5965cat conftest.$ac_ext >&5
5966ac_lo= ac_hi=
5967fi
5968rm -f conftest.$ac_objext conftest.$ac_ext
5969fi
5970rm -f conftest.$ac_objext conftest.$ac_ext
5971# Binary search between lo and hi bounds.
5972while test "x$ac_lo" != "x$ac_hi"; do
5973 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5974 cat >conftest.$ac_ext <<_ACEOF
5975#line $LINENO "configure"
5976#include "confdefs.h"
5977$ac_includes_default
5978#ifdef F77_DUMMY_MAIN
5979# ifdef __cplusplus
5980 extern "C"
5981# endif
5982 int F77_DUMMY_MAIN() { return 1; }
5983#endif
5984int
5985main ()
5986{
5987static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5988test_array [0] = 0
5989
5990 ;
5991 return 0;
5992}
5993_ACEOF
5994rm -f conftest.$ac_objext
5995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5996 (eval $ac_compile) 2>&5
5997 ac_status=$?
5998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5999 (exit $ac_status); } &&
6000 { ac_try='test -s conftest.$ac_objext'
6001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6002 (eval $ac_try) 2>&5
6003 ac_status=$?
6004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6005 (exit $ac_status); }; }; then
6006 ac_hi=$ac_mid
6007else
6008 echo "$as_me: failed program was:" >&5
6009cat conftest.$ac_ext >&5
6010ac_lo=`expr '(' $ac_mid ')' + 1`
6011fi
6012rm -f conftest.$ac_objext conftest.$ac_ext
6013done
6014case $ac_lo in
6015?*) ac_cv_sizeof_char=$ac_lo;;
6016'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6017echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6018 { (exit 1); exit 1; }; } ;;
6019esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006020else
6021 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006022 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6023echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6024 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006025else
Martin v. Löwis11437992002-04-12 09:54:03 +00006026 cat >conftest.$ac_ext <<_ACEOF
6027#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006028#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006029$ac_includes_default
6030long longval () { return (long) (sizeof (char)); }
6031unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006032#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006033#include <stdlib.h>
6034#ifdef F77_DUMMY_MAIN
6035# ifdef __cplusplus
6036 extern "C"
6037# endif
6038 int F77_DUMMY_MAIN() { return 1; }
6039#endif
6040int
6041main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006042{
Martin v. Löwis11437992002-04-12 09:54:03 +00006043
6044 FILE *f = fopen ("conftest.val", "w");
6045 if (! f)
6046 exit (1);
6047 if (((long) (sizeof (char))) < 0)
6048 {
6049 long i = longval ();
6050 if (i != ((long) (sizeof (char))))
6051 exit (1);
6052 fprintf (f, "%ld\n", i);
6053 }
6054 else
6055 {
6056 unsigned long i = ulongval ();
6057 if (i != ((long) (sizeof (char))))
6058 exit (1);
6059 fprintf (f, "%lu\n", i);
6060 }
6061 exit (ferror (f) || fclose (f) != 0);
6062
6063 ;
6064 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006065}
Martin v. Löwis11437992002-04-12 09:54:03 +00006066_ACEOF
6067rm -f conftest$ac_exeext
6068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6069 (eval $ac_link) 2>&5
6070 ac_status=$?
6071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6074 (eval $ac_try) 2>&5
6075 ac_status=$?
6076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6077 (exit $ac_status); }; }; then
6078 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006079else
Martin v. Löwis11437992002-04-12 09:54:03 +00006080 echo "$as_me: program exited with status $ac_status" >&5
6081echo "$as_me: failed program was:" >&5
6082cat conftest.$ac_ext >&5
6083( exit $ac_status )
6084{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6085echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6086 { (exit 1); exit 1; }; }
6087fi
6088rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6089fi
6090fi
6091rm -f conftest.val
6092else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006093 ac_cv_sizeof_char=0
6094fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006095fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006096echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6097echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6098cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006099#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006100_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006101
6102
Martin v. Löwis11437992002-04-12 09:54:03 +00006103echo "$as_me:$LINENO: checking for short" >&5
6104echo $ECHO_N "checking for short... $ECHO_C" >&6
6105if test "${ac_cv_type_short+set}" = set; then
6106 echo $ECHO_N "(cached) $ECHO_C" >&6
6107else
6108 cat >conftest.$ac_ext <<_ACEOF
6109#line $LINENO "configure"
6110#include "confdefs.h"
6111$ac_includes_default
6112#ifdef F77_DUMMY_MAIN
6113# ifdef __cplusplus
6114 extern "C"
6115# endif
6116 int F77_DUMMY_MAIN() { return 1; }
6117#endif
6118int
6119main ()
6120{
6121if ((short *) 0)
6122 return 0;
6123if (sizeof (short))
6124 return 0;
6125 ;
6126 return 0;
6127}
6128_ACEOF
6129rm -f conftest.$ac_objext
6130if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6131 (eval $ac_compile) 2>&5
6132 ac_status=$?
6133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6134 (exit $ac_status); } &&
6135 { ac_try='test -s conftest.$ac_objext'
6136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6137 (eval $ac_try) 2>&5
6138 ac_status=$?
6139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6140 (exit $ac_status); }; }; then
6141 ac_cv_type_short=yes
6142else
6143 echo "$as_me: failed program was:" >&5
6144cat conftest.$ac_ext >&5
6145ac_cv_type_short=no
6146fi
6147rm -f conftest.$ac_objext conftest.$ac_ext
6148fi
6149echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6150echo "${ECHO_T}$ac_cv_type_short" >&6
6151
6152echo "$as_me:$LINENO: checking size of short" >&5
6153echo $ECHO_N "checking size of short... $ECHO_C" >&6
6154if test "${ac_cv_sizeof_short+set}" = set; then
6155 echo $ECHO_N "(cached) $ECHO_C" >&6
6156else
6157 if test "$ac_cv_type_short" = yes; then
6158 # The cast to unsigned long works around a bug in the HP C Compiler
6159 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6160 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6161 # This bug is HP SR number 8606223364.
6162 if test "$cross_compiling" = yes; then
6163 # Depending upon the size, compute the lo and hi bounds.
6164cat >conftest.$ac_ext <<_ACEOF
6165#line $LINENO "configure"
6166#include "confdefs.h"
6167$ac_includes_default
6168#ifdef F77_DUMMY_MAIN
6169# ifdef __cplusplus
6170 extern "C"
6171# endif
6172 int F77_DUMMY_MAIN() { return 1; }
6173#endif
6174int
6175main ()
6176{
6177static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6178test_array [0] = 0
6179
6180 ;
6181 return 0;
6182}
6183_ACEOF
6184rm -f conftest.$ac_objext
6185if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6186 (eval $ac_compile) 2>&5
6187 ac_status=$?
6188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6189 (exit $ac_status); } &&
6190 { ac_try='test -s conftest.$ac_objext'
6191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6192 (eval $ac_try) 2>&5
6193 ac_status=$?
6194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6195 (exit $ac_status); }; }; then
6196 ac_lo=0 ac_mid=0
6197 while :; do
6198 cat >conftest.$ac_ext <<_ACEOF
6199#line $LINENO "configure"
6200#include "confdefs.h"
6201$ac_includes_default
6202#ifdef F77_DUMMY_MAIN
6203# ifdef __cplusplus
6204 extern "C"
6205# endif
6206 int F77_DUMMY_MAIN() { return 1; }
6207#endif
6208int
6209main ()
6210{
6211static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6212test_array [0] = 0
6213
6214 ;
6215 return 0;
6216}
6217_ACEOF
6218rm -f conftest.$ac_objext
6219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6220 (eval $ac_compile) 2>&5
6221 ac_status=$?
6222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6223 (exit $ac_status); } &&
6224 { ac_try='test -s conftest.$ac_objext'
6225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6226 (eval $ac_try) 2>&5
6227 ac_status=$?
6228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6229 (exit $ac_status); }; }; then
6230 ac_hi=$ac_mid; break
6231else
6232 echo "$as_me: failed program was:" >&5
6233cat conftest.$ac_ext >&5
6234ac_lo=`expr $ac_mid + 1`
6235 if test $ac_lo -le $ac_mid; then
6236 ac_lo= ac_hi=
6237 break
6238 fi
6239 ac_mid=`expr 2 '*' $ac_mid + 1`
6240fi
6241rm -f conftest.$ac_objext conftest.$ac_ext
6242 done
6243else
6244 echo "$as_me: failed program was:" >&5
6245cat conftest.$ac_ext >&5
6246cat >conftest.$ac_ext <<_ACEOF
6247#line $LINENO "configure"
6248#include "confdefs.h"
6249$ac_includes_default
6250#ifdef F77_DUMMY_MAIN
6251# ifdef __cplusplus
6252 extern "C"
6253# endif
6254 int F77_DUMMY_MAIN() { return 1; }
6255#endif
6256int
6257main ()
6258{
6259static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6260test_array [0] = 0
6261
6262 ;
6263 return 0;
6264}
6265_ACEOF
6266rm -f conftest.$ac_objext
6267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6268 (eval $ac_compile) 2>&5
6269 ac_status=$?
6270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6271 (exit $ac_status); } &&
6272 { ac_try='test -s conftest.$ac_objext'
6273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6274 (eval $ac_try) 2>&5
6275 ac_status=$?
6276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6277 (exit $ac_status); }; }; then
6278 ac_hi=-1 ac_mid=-1
6279 while :; do
6280 cat >conftest.$ac_ext <<_ACEOF
6281#line $LINENO "configure"
6282#include "confdefs.h"
6283$ac_includes_default
6284#ifdef F77_DUMMY_MAIN
6285# ifdef __cplusplus
6286 extern "C"
6287# endif
6288 int F77_DUMMY_MAIN() { return 1; }
6289#endif
6290int
6291main ()
6292{
6293static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6294test_array [0] = 0
6295
6296 ;
6297 return 0;
6298}
6299_ACEOF
6300rm -f conftest.$ac_objext
6301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6302 (eval $ac_compile) 2>&5
6303 ac_status=$?
6304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6305 (exit $ac_status); } &&
6306 { ac_try='test -s conftest.$ac_objext'
6307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6308 (eval $ac_try) 2>&5
6309 ac_status=$?
6310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6311 (exit $ac_status); }; }; then
6312 ac_lo=$ac_mid; break
6313else
6314 echo "$as_me: failed program was:" >&5
6315cat conftest.$ac_ext >&5
6316ac_hi=`expr '(' $ac_mid ')' - 1`
6317 if test $ac_mid -le $ac_hi; then
6318 ac_lo= ac_hi=
6319 break
6320 fi
6321 ac_mid=`expr 2 '*' $ac_mid`
6322fi
6323rm -f conftest.$ac_objext conftest.$ac_ext
6324 done
6325else
6326 echo "$as_me: failed program was:" >&5
6327cat conftest.$ac_ext >&5
6328ac_lo= ac_hi=
6329fi
6330rm -f conftest.$ac_objext conftest.$ac_ext
6331fi
6332rm -f conftest.$ac_objext conftest.$ac_ext
6333# Binary search between lo and hi bounds.
6334while test "x$ac_lo" != "x$ac_hi"; do
6335 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6336 cat >conftest.$ac_ext <<_ACEOF
6337#line $LINENO "configure"
6338#include "confdefs.h"
6339$ac_includes_default
6340#ifdef F77_DUMMY_MAIN
6341# ifdef __cplusplus
6342 extern "C"
6343# endif
6344 int F77_DUMMY_MAIN() { return 1; }
6345#endif
6346int
6347main ()
6348{
6349static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6350test_array [0] = 0
6351
6352 ;
6353 return 0;
6354}
6355_ACEOF
6356rm -f conftest.$ac_objext
6357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6358 (eval $ac_compile) 2>&5
6359 ac_status=$?
6360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6361 (exit $ac_status); } &&
6362 { ac_try='test -s conftest.$ac_objext'
6363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6364 (eval $ac_try) 2>&5
6365 ac_status=$?
6366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6367 (exit $ac_status); }; }; then
6368 ac_hi=$ac_mid
6369else
6370 echo "$as_me: failed program was:" >&5
6371cat conftest.$ac_ext >&5
6372ac_lo=`expr '(' $ac_mid ')' + 1`
6373fi
6374rm -f conftest.$ac_objext conftest.$ac_ext
6375done
6376case $ac_lo in
6377?*) ac_cv_sizeof_short=$ac_lo;;
6378'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6379echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6380 { (exit 1); exit 1; }; } ;;
6381esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006382else
6383 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006384 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6385echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6386 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006387else
Martin v. Löwis11437992002-04-12 09:54:03 +00006388 cat >conftest.$ac_ext <<_ACEOF
6389#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006390#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006391$ac_includes_default
6392long longval () { return (long) (sizeof (short)); }
6393unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006394#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006395#include <stdlib.h>
6396#ifdef F77_DUMMY_MAIN
6397# ifdef __cplusplus
6398 extern "C"
6399# endif
6400 int F77_DUMMY_MAIN() { return 1; }
6401#endif
6402int
6403main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006404{
Martin v. Löwis11437992002-04-12 09:54:03 +00006405
6406 FILE *f = fopen ("conftest.val", "w");
6407 if (! f)
6408 exit (1);
6409 if (((long) (sizeof (short))) < 0)
6410 {
6411 long i = longval ();
6412 if (i != ((long) (sizeof (short))))
6413 exit (1);
6414 fprintf (f, "%ld\n", i);
6415 }
6416 else
6417 {
6418 unsigned long i = ulongval ();
6419 if (i != ((long) (sizeof (short))))
6420 exit (1);
6421 fprintf (f, "%lu\n", i);
6422 }
6423 exit (ferror (f) || fclose (f) != 0);
6424
6425 ;
6426 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006427}
Martin v. Löwis11437992002-04-12 09:54:03 +00006428_ACEOF
6429rm -f conftest$ac_exeext
6430if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6431 (eval $ac_link) 2>&5
6432 ac_status=$?
6433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6434 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6436 (eval $ac_try) 2>&5
6437 ac_status=$?
6438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6439 (exit $ac_status); }; }; then
6440 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006441else
Martin v. Löwis11437992002-04-12 09:54:03 +00006442 echo "$as_me: program exited with status $ac_status" >&5
6443echo "$as_me: failed program was:" >&5
6444cat conftest.$ac_ext >&5
6445( exit $ac_status )
6446{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6447echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6448 { (exit 1); exit 1; }; }
6449fi
6450rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6451fi
6452fi
6453rm -f conftest.val
6454else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006455 ac_cv_sizeof_short=0
6456fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006457fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006458echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6459echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6460cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006461#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006462_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006463
6464
Martin v. Löwis11437992002-04-12 09:54:03 +00006465echo "$as_me:$LINENO: checking for float" >&5
6466echo $ECHO_N "checking for float... $ECHO_C" >&6
6467if test "${ac_cv_type_float+set}" = set; then
6468 echo $ECHO_N "(cached) $ECHO_C" >&6
6469else
6470 cat >conftest.$ac_ext <<_ACEOF
6471#line $LINENO "configure"
6472#include "confdefs.h"
6473$ac_includes_default
6474#ifdef F77_DUMMY_MAIN
6475# ifdef __cplusplus
6476 extern "C"
6477# endif
6478 int F77_DUMMY_MAIN() { return 1; }
6479#endif
6480int
6481main ()
6482{
6483if ((float *) 0)
6484 return 0;
6485if (sizeof (float))
6486 return 0;
6487 ;
6488 return 0;
6489}
6490_ACEOF
6491rm -f conftest.$ac_objext
6492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6493 (eval $ac_compile) 2>&5
6494 ac_status=$?
6495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6496 (exit $ac_status); } &&
6497 { ac_try='test -s conftest.$ac_objext'
6498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6499 (eval $ac_try) 2>&5
6500 ac_status=$?
6501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6502 (exit $ac_status); }; }; then
6503 ac_cv_type_float=yes
6504else
6505 echo "$as_me: failed program was:" >&5
6506cat conftest.$ac_ext >&5
6507ac_cv_type_float=no
6508fi
6509rm -f conftest.$ac_objext conftest.$ac_ext
6510fi
6511echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6512echo "${ECHO_T}$ac_cv_type_float" >&6
6513
6514echo "$as_me:$LINENO: checking size of float" >&5
6515echo $ECHO_N "checking size of float... $ECHO_C" >&6
6516if test "${ac_cv_sizeof_float+set}" = set; then
6517 echo $ECHO_N "(cached) $ECHO_C" >&6
6518else
6519 if test "$ac_cv_type_float" = yes; then
6520 # The cast to unsigned long works around a bug in the HP C Compiler
6521 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6522 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6523 # This bug is HP SR number 8606223364.
6524 if test "$cross_compiling" = yes; then
6525 # Depending upon the size, compute the lo and hi bounds.
6526cat >conftest.$ac_ext <<_ACEOF
6527#line $LINENO "configure"
6528#include "confdefs.h"
6529$ac_includes_default
6530#ifdef F77_DUMMY_MAIN
6531# ifdef __cplusplus
6532 extern "C"
6533# endif
6534 int F77_DUMMY_MAIN() { return 1; }
6535#endif
6536int
6537main ()
6538{
6539static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6540test_array [0] = 0
6541
6542 ;
6543 return 0;
6544}
6545_ACEOF
6546rm -f conftest.$ac_objext
6547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6548 (eval $ac_compile) 2>&5
6549 ac_status=$?
6550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6551 (exit $ac_status); } &&
6552 { ac_try='test -s conftest.$ac_objext'
6553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6554 (eval $ac_try) 2>&5
6555 ac_status=$?
6556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6557 (exit $ac_status); }; }; then
6558 ac_lo=0 ac_mid=0
6559 while :; do
6560 cat >conftest.$ac_ext <<_ACEOF
6561#line $LINENO "configure"
6562#include "confdefs.h"
6563$ac_includes_default
6564#ifdef F77_DUMMY_MAIN
6565# ifdef __cplusplus
6566 extern "C"
6567# endif
6568 int F77_DUMMY_MAIN() { return 1; }
6569#endif
6570int
6571main ()
6572{
6573static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6574test_array [0] = 0
6575
6576 ;
6577 return 0;
6578}
6579_ACEOF
6580rm -f conftest.$ac_objext
6581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6582 (eval $ac_compile) 2>&5
6583 ac_status=$?
6584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6585 (exit $ac_status); } &&
6586 { ac_try='test -s conftest.$ac_objext'
6587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6588 (eval $ac_try) 2>&5
6589 ac_status=$?
6590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6591 (exit $ac_status); }; }; then
6592 ac_hi=$ac_mid; break
6593else
6594 echo "$as_me: failed program was:" >&5
6595cat conftest.$ac_ext >&5
6596ac_lo=`expr $ac_mid + 1`
6597 if test $ac_lo -le $ac_mid; then
6598 ac_lo= ac_hi=
6599 break
6600 fi
6601 ac_mid=`expr 2 '*' $ac_mid + 1`
6602fi
6603rm -f conftest.$ac_objext conftest.$ac_ext
6604 done
6605else
6606 echo "$as_me: failed program was:" >&5
6607cat conftest.$ac_ext >&5
6608cat >conftest.$ac_ext <<_ACEOF
6609#line $LINENO "configure"
6610#include "confdefs.h"
6611$ac_includes_default
6612#ifdef F77_DUMMY_MAIN
6613# ifdef __cplusplus
6614 extern "C"
6615# endif
6616 int F77_DUMMY_MAIN() { return 1; }
6617#endif
6618int
6619main ()
6620{
6621static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6622test_array [0] = 0
6623
6624 ;
6625 return 0;
6626}
6627_ACEOF
6628rm -f conftest.$ac_objext
6629if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6630 (eval $ac_compile) 2>&5
6631 ac_status=$?
6632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6633 (exit $ac_status); } &&
6634 { ac_try='test -s conftest.$ac_objext'
6635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6636 (eval $ac_try) 2>&5
6637 ac_status=$?
6638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6639 (exit $ac_status); }; }; then
6640 ac_hi=-1 ac_mid=-1
6641 while :; do
6642 cat >conftest.$ac_ext <<_ACEOF
6643#line $LINENO "configure"
6644#include "confdefs.h"
6645$ac_includes_default
6646#ifdef F77_DUMMY_MAIN
6647# ifdef __cplusplus
6648 extern "C"
6649# endif
6650 int F77_DUMMY_MAIN() { return 1; }
6651#endif
6652int
6653main ()
6654{
6655static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6656test_array [0] = 0
6657
6658 ;
6659 return 0;
6660}
6661_ACEOF
6662rm -f conftest.$ac_objext
6663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6664 (eval $ac_compile) 2>&5
6665 ac_status=$?
6666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6667 (exit $ac_status); } &&
6668 { ac_try='test -s conftest.$ac_objext'
6669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6670 (eval $ac_try) 2>&5
6671 ac_status=$?
6672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6673 (exit $ac_status); }; }; then
6674 ac_lo=$ac_mid; break
6675else
6676 echo "$as_me: failed program was:" >&5
6677cat conftest.$ac_ext >&5
6678ac_hi=`expr '(' $ac_mid ')' - 1`
6679 if test $ac_mid -le $ac_hi; then
6680 ac_lo= ac_hi=
6681 break
6682 fi
6683 ac_mid=`expr 2 '*' $ac_mid`
6684fi
6685rm -f conftest.$ac_objext conftest.$ac_ext
6686 done
6687else
6688 echo "$as_me: failed program was:" >&5
6689cat conftest.$ac_ext >&5
6690ac_lo= ac_hi=
6691fi
6692rm -f conftest.$ac_objext conftest.$ac_ext
6693fi
6694rm -f conftest.$ac_objext conftest.$ac_ext
6695# Binary search between lo and hi bounds.
6696while test "x$ac_lo" != "x$ac_hi"; do
6697 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6698 cat >conftest.$ac_ext <<_ACEOF
6699#line $LINENO "configure"
6700#include "confdefs.h"
6701$ac_includes_default
6702#ifdef F77_DUMMY_MAIN
6703# ifdef __cplusplus
6704 extern "C"
6705# endif
6706 int F77_DUMMY_MAIN() { return 1; }
6707#endif
6708int
6709main ()
6710{
6711static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6712test_array [0] = 0
6713
6714 ;
6715 return 0;
6716}
6717_ACEOF
6718rm -f conftest.$ac_objext
6719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6720 (eval $ac_compile) 2>&5
6721 ac_status=$?
6722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6723 (exit $ac_status); } &&
6724 { ac_try='test -s conftest.$ac_objext'
6725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6726 (eval $ac_try) 2>&5
6727 ac_status=$?
6728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6729 (exit $ac_status); }; }; then
6730 ac_hi=$ac_mid
6731else
6732 echo "$as_me: failed program was:" >&5
6733cat conftest.$ac_ext >&5
6734ac_lo=`expr '(' $ac_mid ')' + 1`
6735fi
6736rm -f conftest.$ac_objext conftest.$ac_ext
6737done
6738case $ac_lo in
6739?*) ac_cv_sizeof_float=$ac_lo;;
6740'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6741echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6742 { (exit 1); exit 1; }; } ;;
6743esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006744else
6745 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006746 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6747echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6748 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006749else
Martin v. Löwis11437992002-04-12 09:54:03 +00006750 cat >conftest.$ac_ext <<_ACEOF
6751#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006752#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006753$ac_includes_default
6754long longval () { return (long) (sizeof (float)); }
6755unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006756#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006757#include <stdlib.h>
6758#ifdef F77_DUMMY_MAIN
6759# ifdef __cplusplus
6760 extern "C"
6761# endif
6762 int F77_DUMMY_MAIN() { return 1; }
6763#endif
6764int
6765main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006766{
Martin v. Löwis11437992002-04-12 09:54:03 +00006767
6768 FILE *f = fopen ("conftest.val", "w");
6769 if (! f)
6770 exit (1);
6771 if (((long) (sizeof (float))) < 0)
6772 {
6773 long i = longval ();
6774 if (i != ((long) (sizeof (float))))
6775 exit (1);
6776 fprintf (f, "%ld\n", i);
6777 }
6778 else
6779 {
6780 unsigned long i = ulongval ();
6781 if (i != ((long) (sizeof (float))))
6782 exit (1);
6783 fprintf (f, "%lu\n", i);
6784 }
6785 exit (ferror (f) || fclose (f) != 0);
6786
6787 ;
6788 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006789}
Martin v. Löwis11437992002-04-12 09:54:03 +00006790_ACEOF
6791rm -f conftest$ac_exeext
6792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6793 (eval $ac_link) 2>&5
6794 ac_status=$?
6795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6796 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6798 (eval $ac_try) 2>&5
6799 ac_status=$?
6800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6801 (exit $ac_status); }; }; then
6802 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006803else
Martin v. Löwis11437992002-04-12 09:54:03 +00006804 echo "$as_me: program exited with status $ac_status" >&5
6805echo "$as_me: failed program was:" >&5
6806cat conftest.$ac_ext >&5
6807( exit $ac_status )
6808{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6809echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6810 { (exit 1); exit 1; }; }
6811fi
6812rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6813fi
6814fi
6815rm -f conftest.val
6816else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006817 ac_cv_sizeof_float=0
6818fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006819fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006820echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6821echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6822cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006823#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006824_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006825
6826
Martin v. Löwis11437992002-04-12 09:54:03 +00006827echo "$as_me:$LINENO: checking for double" >&5
6828echo $ECHO_N "checking for double... $ECHO_C" >&6
6829if test "${ac_cv_type_double+set}" = set; then
6830 echo $ECHO_N "(cached) $ECHO_C" >&6
6831else
6832 cat >conftest.$ac_ext <<_ACEOF
6833#line $LINENO "configure"
6834#include "confdefs.h"
6835$ac_includes_default
6836#ifdef F77_DUMMY_MAIN
6837# ifdef __cplusplus
6838 extern "C"
6839# endif
6840 int F77_DUMMY_MAIN() { return 1; }
6841#endif
6842int
6843main ()
6844{
6845if ((double *) 0)
6846 return 0;
6847if (sizeof (double))
6848 return 0;
6849 ;
6850 return 0;
6851}
6852_ACEOF
6853rm -f conftest.$ac_objext
6854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6855 (eval $ac_compile) 2>&5
6856 ac_status=$?
6857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6858 (exit $ac_status); } &&
6859 { ac_try='test -s conftest.$ac_objext'
6860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6861 (eval $ac_try) 2>&5
6862 ac_status=$?
6863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6864 (exit $ac_status); }; }; then
6865 ac_cv_type_double=yes
6866else
6867 echo "$as_me: failed program was:" >&5
6868cat conftest.$ac_ext >&5
6869ac_cv_type_double=no
6870fi
6871rm -f conftest.$ac_objext conftest.$ac_ext
6872fi
6873echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6874echo "${ECHO_T}$ac_cv_type_double" >&6
6875
6876echo "$as_me:$LINENO: checking size of double" >&5
6877echo $ECHO_N "checking size of double... $ECHO_C" >&6
6878if test "${ac_cv_sizeof_double+set}" = set; then
6879 echo $ECHO_N "(cached) $ECHO_C" >&6
6880else
6881 if test "$ac_cv_type_double" = yes; then
6882 # The cast to unsigned long works around a bug in the HP C Compiler
6883 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6884 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6885 # This bug is HP SR number 8606223364.
6886 if test "$cross_compiling" = yes; then
6887 # Depending upon the size, compute the lo and hi bounds.
6888cat >conftest.$ac_ext <<_ACEOF
6889#line $LINENO "configure"
6890#include "confdefs.h"
6891$ac_includes_default
6892#ifdef F77_DUMMY_MAIN
6893# ifdef __cplusplus
6894 extern "C"
6895# endif
6896 int F77_DUMMY_MAIN() { return 1; }
6897#endif
6898int
6899main ()
6900{
6901static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6902test_array [0] = 0
6903
6904 ;
6905 return 0;
6906}
6907_ACEOF
6908rm -f conftest.$ac_objext
6909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6910 (eval $ac_compile) 2>&5
6911 ac_status=$?
6912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6913 (exit $ac_status); } &&
6914 { ac_try='test -s conftest.$ac_objext'
6915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6916 (eval $ac_try) 2>&5
6917 ac_status=$?
6918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6919 (exit $ac_status); }; }; then
6920 ac_lo=0 ac_mid=0
6921 while :; do
6922 cat >conftest.$ac_ext <<_ACEOF
6923#line $LINENO "configure"
6924#include "confdefs.h"
6925$ac_includes_default
6926#ifdef F77_DUMMY_MAIN
6927# ifdef __cplusplus
6928 extern "C"
6929# endif
6930 int F77_DUMMY_MAIN() { return 1; }
6931#endif
6932int
6933main ()
6934{
6935static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6936test_array [0] = 0
6937
6938 ;
6939 return 0;
6940}
6941_ACEOF
6942rm -f conftest.$ac_objext
6943if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6944 (eval $ac_compile) 2>&5
6945 ac_status=$?
6946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6947 (exit $ac_status); } &&
6948 { ac_try='test -s conftest.$ac_objext'
6949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6950 (eval $ac_try) 2>&5
6951 ac_status=$?
6952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6953 (exit $ac_status); }; }; then
6954 ac_hi=$ac_mid; break
6955else
6956 echo "$as_me: failed program was:" >&5
6957cat conftest.$ac_ext >&5
6958ac_lo=`expr $ac_mid + 1`
6959 if test $ac_lo -le $ac_mid; then
6960 ac_lo= ac_hi=
6961 break
6962 fi
6963 ac_mid=`expr 2 '*' $ac_mid + 1`
6964fi
6965rm -f conftest.$ac_objext conftest.$ac_ext
6966 done
6967else
6968 echo "$as_me: failed program was:" >&5
6969cat conftest.$ac_ext >&5
6970cat >conftest.$ac_ext <<_ACEOF
6971#line $LINENO "configure"
6972#include "confdefs.h"
6973$ac_includes_default
6974#ifdef F77_DUMMY_MAIN
6975# ifdef __cplusplus
6976 extern "C"
6977# endif
6978 int F77_DUMMY_MAIN() { return 1; }
6979#endif
6980int
6981main ()
6982{
6983static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6984test_array [0] = 0
6985
6986 ;
6987 return 0;
6988}
6989_ACEOF
6990rm -f conftest.$ac_objext
6991if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6992 (eval $ac_compile) 2>&5
6993 ac_status=$?
6994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6995 (exit $ac_status); } &&
6996 { ac_try='test -s conftest.$ac_objext'
6997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6998 (eval $ac_try) 2>&5
6999 ac_status=$?
7000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7001 (exit $ac_status); }; }; then
7002 ac_hi=-1 ac_mid=-1
7003 while :; do
7004 cat >conftest.$ac_ext <<_ACEOF
7005#line $LINENO "configure"
7006#include "confdefs.h"
7007$ac_includes_default
7008#ifdef F77_DUMMY_MAIN
7009# ifdef __cplusplus
7010 extern "C"
7011# endif
7012 int F77_DUMMY_MAIN() { return 1; }
7013#endif
7014int
7015main ()
7016{
7017static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7018test_array [0] = 0
7019
7020 ;
7021 return 0;
7022}
7023_ACEOF
7024rm -f conftest.$ac_objext
7025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7026 (eval $ac_compile) 2>&5
7027 ac_status=$?
7028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7029 (exit $ac_status); } &&
7030 { ac_try='test -s conftest.$ac_objext'
7031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7032 (eval $ac_try) 2>&5
7033 ac_status=$?
7034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7035 (exit $ac_status); }; }; then
7036 ac_lo=$ac_mid; break
7037else
7038 echo "$as_me: failed program was:" >&5
7039cat conftest.$ac_ext >&5
7040ac_hi=`expr '(' $ac_mid ')' - 1`
7041 if test $ac_mid -le $ac_hi; then
7042 ac_lo= ac_hi=
7043 break
7044 fi
7045 ac_mid=`expr 2 '*' $ac_mid`
7046fi
7047rm -f conftest.$ac_objext conftest.$ac_ext
7048 done
7049else
7050 echo "$as_me: failed program was:" >&5
7051cat conftest.$ac_ext >&5
7052ac_lo= ac_hi=
7053fi
7054rm -f conftest.$ac_objext conftest.$ac_ext
7055fi
7056rm -f conftest.$ac_objext conftest.$ac_ext
7057# Binary search between lo and hi bounds.
7058while test "x$ac_lo" != "x$ac_hi"; do
7059 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7060 cat >conftest.$ac_ext <<_ACEOF
7061#line $LINENO "configure"
7062#include "confdefs.h"
7063$ac_includes_default
7064#ifdef F77_DUMMY_MAIN
7065# ifdef __cplusplus
7066 extern "C"
7067# endif
7068 int F77_DUMMY_MAIN() { return 1; }
7069#endif
7070int
7071main ()
7072{
7073static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7074test_array [0] = 0
7075
7076 ;
7077 return 0;
7078}
7079_ACEOF
7080rm -f conftest.$ac_objext
7081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7082 (eval $ac_compile) 2>&5
7083 ac_status=$?
7084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7085 (exit $ac_status); } &&
7086 { ac_try='test -s conftest.$ac_objext'
7087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7088 (eval $ac_try) 2>&5
7089 ac_status=$?
7090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7091 (exit $ac_status); }; }; then
7092 ac_hi=$ac_mid
7093else
7094 echo "$as_me: failed program was:" >&5
7095cat conftest.$ac_ext >&5
7096ac_lo=`expr '(' $ac_mid ')' + 1`
7097fi
7098rm -f conftest.$ac_objext conftest.$ac_ext
7099done
7100case $ac_lo in
7101?*) ac_cv_sizeof_double=$ac_lo;;
7102'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7103echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7104 { (exit 1); exit 1; }; } ;;
7105esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007106else
7107 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007108 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7109echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7110 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007111else
Martin v. Löwis11437992002-04-12 09:54:03 +00007112 cat >conftest.$ac_ext <<_ACEOF
7113#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007114#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007115$ac_includes_default
7116long longval () { return (long) (sizeof (double)); }
7117unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007118#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007119#include <stdlib.h>
7120#ifdef F77_DUMMY_MAIN
7121# ifdef __cplusplus
7122 extern "C"
7123# endif
7124 int F77_DUMMY_MAIN() { return 1; }
7125#endif
7126int
7127main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007128{
Martin v. Löwis11437992002-04-12 09:54:03 +00007129
7130 FILE *f = fopen ("conftest.val", "w");
7131 if (! f)
7132 exit (1);
7133 if (((long) (sizeof (double))) < 0)
7134 {
7135 long i = longval ();
7136 if (i != ((long) (sizeof (double))))
7137 exit (1);
7138 fprintf (f, "%ld\n", i);
7139 }
7140 else
7141 {
7142 unsigned long i = ulongval ();
7143 if (i != ((long) (sizeof (double))))
7144 exit (1);
7145 fprintf (f, "%lu\n", i);
7146 }
7147 exit (ferror (f) || fclose (f) != 0);
7148
7149 ;
7150 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007151}
Martin v. Löwis11437992002-04-12 09:54:03 +00007152_ACEOF
7153rm -f conftest$ac_exeext
7154if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7155 (eval $ac_link) 2>&5
7156 ac_status=$?
7157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7158 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7160 (eval $ac_try) 2>&5
7161 ac_status=$?
7162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7163 (exit $ac_status); }; }; then
7164 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007165else
Martin v. Löwis11437992002-04-12 09:54:03 +00007166 echo "$as_me: program exited with status $ac_status" >&5
7167echo "$as_me: failed program was:" >&5
7168cat conftest.$ac_ext >&5
7169( exit $ac_status )
7170{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7171echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7172 { (exit 1); exit 1; }; }
7173fi
7174rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7175fi
7176fi
7177rm -f conftest.val
7178else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007179 ac_cv_sizeof_double=0
7180fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007182echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7183echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7184cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007185#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007186_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007187
7188
Martin v. Löwis11437992002-04-12 09:54:03 +00007189echo "$as_me:$LINENO: checking for fpos_t" >&5
7190echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7191if test "${ac_cv_type_fpos_t+set}" = set; then
7192 echo $ECHO_N "(cached) $ECHO_C" >&6
7193else
7194 cat >conftest.$ac_ext <<_ACEOF
7195#line $LINENO "configure"
7196#include "confdefs.h"
7197$ac_includes_default
7198#ifdef F77_DUMMY_MAIN
7199# ifdef __cplusplus
7200 extern "C"
7201# endif
7202 int F77_DUMMY_MAIN() { return 1; }
7203#endif
7204int
7205main ()
7206{
7207if ((fpos_t *) 0)
7208 return 0;
7209if (sizeof (fpos_t))
7210 return 0;
7211 ;
7212 return 0;
7213}
7214_ACEOF
7215rm -f conftest.$ac_objext
7216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7217 (eval $ac_compile) 2>&5
7218 ac_status=$?
7219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7220 (exit $ac_status); } &&
7221 { ac_try='test -s conftest.$ac_objext'
7222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7223 (eval $ac_try) 2>&5
7224 ac_status=$?
7225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7226 (exit $ac_status); }; }; then
7227 ac_cv_type_fpos_t=yes
7228else
7229 echo "$as_me: failed program was:" >&5
7230cat conftest.$ac_ext >&5
7231ac_cv_type_fpos_t=no
7232fi
7233rm -f conftest.$ac_objext conftest.$ac_ext
7234fi
7235echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7236echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7237
7238echo "$as_me:$LINENO: checking size of fpos_t" >&5
7239echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7240if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7241 echo $ECHO_N "(cached) $ECHO_C" >&6
7242else
7243 if test "$ac_cv_type_fpos_t" = yes; then
7244 # The cast to unsigned long works around a bug in the HP C Compiler
7245 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7246 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7247 # This bug is HP SR number 8606223364.
7248 if test "$cross_compiling" = yes; then
7249 # Depending upon the size, compute the lo and hi bounds.
7250cat >conftest.$ac_ext <<_ACEOF
7251#line $LINENO "configure"
7252#include "confdefs.h"
7253$ac_includes_default
7254#ifdef F77_DUMMY_MAIN
7255# ifdef __cplusplus
7256 extern "C"
7257# endif
7258 int F77_DUMMY_MAIN() { return 1; }
7259#endif
7260int
7261main ()
7262{
7263static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7264test_array [0] = 0
7265
7266 ;
7267 return 0;
7268}
7269_ACEOF
7270rm -f conftest.$ac_objext
7271if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7272 (eval $ac_compile) 2>&5
7273 ac_status=$?
7274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7275 (exit $ac_status); } &&
7276 { ac_try='test -s conftest.$ac_objext'
7277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7278 (eval $ac_try) 2>&5
7279 ac_status=$?
7280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7281 (exit $ac_status); }; }; then
7282 ac_lo=0 ac_mid=0
7283 while :; do
7284 cat >conftest.$ac_ext <<_ACEOF
7285#line $LINENO "configure"
7286#include "confdefs.h"
7287$ac_includes_default
7288#ifdef F77_DUMMY_MAIN
7289# ifdef __cplusplus
7290 extern "C"
7291# endif
7292 int F77_DUMMY_MAIN() { return 1; }
7293#endif
7294int
7295main ()
7296{
7297static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7298test_array [0] = 0
7299
7300 ;
7301 return 0;
7302}
7303_ACEOF
7304rm -f conftest.$ac_objext
7305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7306 (eval $ac_compile) 2>&5
7307 ac_status=$?
7308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7309 (exit $ac_status); } &&
7310 { ac_try='test -s conftest.$ac_objext'
7311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7312 (eval $ac_try) 2>&5
7313 ac_status=$?
7314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7315 (exit $ac_status); }; }; then
7316 ac_hi=$ac_mid; break
7317else
7318 echo "$as_me: failed program was:" >&5
7319cat conftest.$ac_ext >&5
7320ac_lo=`expr $ac_mid + 1`
7321 if test $ac_lo -le $ac_mid; then
7322 ac_lo= ac_hi=
7323 break
7324 fi
7325 ac_mid=`expr 2 '*' $ac_mid + 1`
7326fi
7327rm -f conftest.$ac_objext conftest.$ac_ext
7328 done
7329else
7330 echo "$as_me: failed program was:" >&5
7331cat conftest.$ac_ext >&5
7332cat >conftest.$ac_ext <<_ACEOF
7333#line $LINENO "configure"
7334#include "confdefs.h"
7335$ac_includes_default
7336#ifdef F77_DUMMY_MAIN
7337# ifdef __cplusplus
7338 extern "C"
7339# endif
7340 int F77_DUMMY_MAIN() { return 1; }
7341#endif
7342int
7343main ()
7344{
7345static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7346test_array [0] = 0
7347
7348 ;
7349 return 0;
7350}
7351_ACEOF
7352rm -f conftest.$ac_objext
7353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7354 (eval $ac_compile) 2>&5
7355 ac_status=$?
7356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7357 (exit $ac_status); } &&
7358 { ac_try='test -s conftest.$ac_objext'
7359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7360 (eval $ac_try) 2>&5
7361 ac_status=$?
7362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7363 (exit $ac_status); }; }; then
7364 ac_hi=-1 ac_mid=-1
7365 while :; do
7366 cat >conftest.$ac_ext <<_ACEOF
7367#line $LINENO "configure"
7368#include "confdefs.h"
7369$ac_includes_default
7370#ifdef F77_DUMMY_MAIN
7371# ifdef __cplusplus
7372 extern "C"
7373# endif
7374 int F77_DUMMY_MAIN() { return 1; }
7375#endif
7376int
7377main ()
7378{
7379static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7380test_array [0] = 0
7381
7382 ;
7383 return 0;
7384}
7385_ACEOF
7386rm -f conftest.$ac_objext
7387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7388 (eval $ac_compile) 2>&5
7389 ac_status=$?
7390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7391 (exit $ac_status); } &&
7392 { ac_try='test -s conftest.$ac_objext'
7393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7394 (eval $ac_try) 2>&5
7395 ac_status=$?
7396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7397 (exit $ac_status); }; }; then
7398 ac_lo=$ac_mid; break
7399else
7400 echo "$as_me: failed program was:" >&5
7401cat conftest.$ac_ext >&5
7402ac_hi=`expr '(' $ac_mid ')' - 1`
7403 if test $ac_mid -le $ac_hi; then
7404 ac_lo= ac_hi=
7405 break
7406 fi
7407 ac_mid=`expr 2 '*' $ac_mid`
7408fi
7409rm -f conftest.$ac_objext conftest.$ac_ext
7410 done
7411else
7412 echo "$as_me: failed program was:" >&5
7413cat conftest.$ac_ext >&5
7414ac_lo= ac_hi=
7415fi
7416rm -f conftest.$ac_objext conftest.$ac_ext
7417fi
7418rm -f conftest.$ac_objext conftest.$ac_ext
7419# Binary search between lo and hi bounds.
7420while test "x$ac_lo" != "x$ac_hi"; do
7421 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7422 cat >conftest.$ac_ext <<_ACEOF
7423#line $LINENO "configure"
7424#include "confdefs.h"
7425$ac_includes_default
7426#ifdef F77_DUMMY_MAIN
7427# ifdef __cplusplus
7428 extern "C"
7429# endif
7430 int F77_DUMMY_MAIN() { return 1; }
7431#endif
7432int
7433main ()
7434{
7435static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7436test_array [0] = 0
7437
7438 ;
7439 return 0;
7440}
7441_ACEOF
7442rm -f conftest.$ac_objext
7443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7444 (eval $ac_compile) 2>&5
7445 ac_status=$?
7446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7447 (exit $ac_status); } &&
7448 { ac_try='test -s conftest.$ac_objext'
7449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7450 (eval $ac_try) 2>&5
7451 ac_status=$?
7452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7453 (exit $ac_status); }; }; then
7454 ac_hi=$ac_mid
7455else
7456 echo "$as_me: failed program was:" >&5
7457cat conftest.$ac_ext >&5
7458ac_lo=`expr '(' $ac_mid ')' + 1`
7459fi
7460rm -f conftest.$ac_objext conftest.$ac_ext
7461done
7462case $ac_lo in
7463?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7464'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7465echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7466 { (exit 1); exit 1; }; } ;;
7467esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007468else
7469 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007470 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7471echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7472 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007473else
Martin v. Löwis11437992002-04-12 09:54:03 +00007474 cat >conftest.$ac_ext <<_ACEOF
7475#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007476#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007477$ac_includes_default
7478long longval () { return (long) (sizeof (fpos_t)); }
7479unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007480#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007481#include <stdlib.h>
7482#ifdef F77_DUMMY_MAIN
7483# ifdef __cplusplus
7484 extern "C"
7485# endif
7486 int F77_DUMMY_MAIN() { return 1; }
7487#endif
7488int
7489main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007490{
Martin v. Löwis11437992002-04-12 09:54:03 +00007491
7492 FILE *f = fopen ("conftest.val", "w");
7493 if (! f)
7494 exit (1);
7495 if (((long) (sizeof (fpos_t))) < 0)
7496 {
7497 long i = longval ();
7498 if (i != ((long) (sizeof (fpos_t))))
7499 exit (1);
7500 fprintf (f, "%ld\n", i);
7501 }
7502 else
7503 {
7504 unsigned long i = ulongval ();
7505 if (i != ((long) (sizeof (fpos_t))))
7506 exit (1);
7507 fprintf (f, "%lu\n", i);
7508 }
7509 exit (ferror (f) || fclose (f) != 0);
7510
7511 ;
7512 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007513}
Martin v. Löwis11437992002-04-12 09:54:03 +00007514_ACEOF
7515rm -f conftest$ac_exeext
7516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7517 (eval $ac_link) 2>&5
7518 ac_status=$?
7519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7522 (eval $ac_try) 2>&5
7523 ac_status=$?
7524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7525 (exit $ac_status); }; }; then
7526 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007527else
Martin v. Löwis11437992002-04-12 09:54:03 +00007528 echo "$as_me: program exited with status $ac_status" >&5
7529echo "$as_me: failed program was:" >&5
7530cat conftest.$ac_ext >&5
7531( exit $ac_status )
7532{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7533echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7534 { (exit 1); exit 1; }; }
7535fi
7536rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7537fi
7538fi
7539rm -f conftest.val
7540else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007541 ac_cv_sizeof_fpos_t=0
7542fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007544echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7545echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7546cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007547#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007548_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007549
Michael W. Hudson54241132001-12-07 15:38:26 +00007550
7551
Martin v. Löwis11437992002-04-12 09:54:03 +00007552echo "$as_me:$LINENO: checking for long long support" >&5
7553echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007554have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007555cat >conftest.$ac_ext <<_ACEOF
7556#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007557#include "confdefs.h"
7558
Martin v. Löwis11437992002-04-12 09:54:03 +00007559#ifdef F77_DUMMY_MAIN
7560# ifdef __cplusplus
7561 extern "C"
7562# endif
7563 int F77_DUMMY_MAIN() { return 1; }
7564#endif
7565int
7566main ()
7567{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007568long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007569 ;
7570 return 0;
7571}
7572_ACEOF
7573rm -f conftest.$ac_objext
7574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7575 (eval $ac_compile) 2>&5
7576 ac_status=$?
7577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7578 (exit $ac_status); } &&
7579 { ac_try='test -s conftest.$ac_objext'
7580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7581 (eval $ac_try) 2>&5
7582 ac_status=$?
7583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7584 (exit $ac_status); }; }; then
7585
7586
7587cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007588#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007589_ACEOF
7590
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007591 have_long_long=yes
7592
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007593else
Martin v. Löwis11437992002-04-12 09:54:03 +00007594 echo "$as_me: failed program was:" >&5
7595cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007596fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007597rm -f conftest.$ac_objext conftest.$ac_ext
7598echo "$as_me:$LINENO: result: $have_long_long" >&5
7599echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007600if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007601echo "$as_me:$LINENO: checking for long long" >&5
7602echo $ECHO_N "checking for long long... $ECHO_C" >&6
7603if test "${ac_cv_type_long_long+set}" = set; then
7604 echo $ECHO_N "(cached) $ECHO_C" >&6
7605else
7606 cat >conftest.$ac_ext <<_ACEOF
7607#line $LINENO "configure"
7608#include "confdefs.h"
7609$ac_includes_default
7610#ifdef F77_DUMMY_MAIN
7611# ifdef __cplusplus
7612 extern "C"
7613# endif
7614 int F77_DUMMY_MAIN() { return 1; }
7615#endif
7616int
7617main ()
7618{
7619if ((long long *) 0)
7620 return 0;
7621if (sizeof (long long))
7622 return 0;
7623 ;
7624 return 0;
7625}
7626_ACEOF
7627rm -f conftest.$ac_objext
7628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7629 (eval $ac_compile) 2>&5
7630 ac_status=$?
7631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632 (exit $ac_status); } &&
7633 { ac_try='test -s conftest.$ac_objext'
7634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7635 (eval $ac_try) 2>&5
7636 ac_status=$?
7637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7638 (exit $ac_status); }; }; then
7639 ac_cv_type_long_long=yes
7640else
7641 echo "$as_me: failed program was:" >&5
7642cat conftest.$ac_ext >&5
7643ac_cv_type_long_long=no
7644fi
7645rm -f conftest.$ac_objext conftest.$ac_ext
7646fi
7647echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7648echo "${ECHO_T}$ac_cv_type_long_long" >&6
7649
7650echo "$as_me:$LINENO: checking size of long long" >&5
7651echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7652if test "${ac_cv_sizeof_long_long+set}" = set; then
7653 echo $ECHO_N "(cached) $ECHO_C" >&6
7654else
7655 if test "$ac_cv_type_long_long" = yes; then
7656 # The cast to unsigned long works around a bug in the HP C Compiler
7657 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7658 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7659 # This bug is HP SR number 8606223364.
7660 if test "$cross_compiling" = yes; then
7661 # Depending upon the size, compute the lo and hi bounds.
7662cat >conftest.$ac_ext <<_ACEOF
7663#line $LINENO "configure"
7664#include "confdefs.h"
7665$ac_includes_default
7666#ifdef F77_DUMMY_MAIN
7667# ifdef __cplusplus
7668 extern "C"
7669# endif
7670 int F77_DUMMY_MAIN() { return 1; }
7671#endif
7672int
7673main ()
7674{
7675static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7676test_array [0] = 0
7677
7678 ;
7679 return 0;
7680}
7681_ACEOF
7682rm -f conftest.$ac_objext
7683if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7684 (eval $ac_compile) 2>&5
7685 ac_status=$?
7686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7687 (exit $ac_status); } &&
7688 { ac_try='test -s conftest.$ac_objext'
7689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7690 (eval $ac_try) 2>&5
7691 ac_status=$?
7692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7693 (exit $ac_status); }; }; then
7694 ac_lo=0 ac_mid=0
7695 while :; do
7696 cat >conftest.$ac_ext <<_ACEOF
7697#line $LINENO "configure"
7698#include "confdefs.h"
7699$ac_includes_default
7700#ifdef F77_DUMMY_MAIN
7701# ifdef __cplusplus
7702 extern "C"
7703# endif
7704 int F77_DUMMY_MAIN() { return 1; }
7705#endif
7706int
7707main ()
7708{
7709static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7710test_array [0] = 0
7711
7712 ;
7713 return 0;
7714}
7715_ACEOF
7716rm -f conftest.$ac_objext
7717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7718 (eval $ac_compile) 2>&5
7719 ac_status=$?
7720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7721 (exit $ac_status); } &&
7722 { ac_try='test -s conftest.$ac_objext'
7723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7724 (eval $ac_try) 2>&5
7725 ac_status=$?
7726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7727 (exit $ac_status); }; }; then
7728 ac_hi=$ac_mid; break
7729else
7730 echo "$as_me: failed program was:" >&5
7731cat conftest.$ac_ext >&5
7732ac_lo=`expr $ac_mid + 1`
7733 if test $ac_lo -le $ac_mid; then
7734 ac_lo= ac_hi=
7735 break
7736 fi
7737 ac_mid=`expr 2 '*' $ac_mid + 1`
7738fi
7739rm -f conftest.$ac_objext conftest.$ac_ext
7740 done
7741else
7742 echo "$as_me: failed program was:" >&5
7743cat conftest.$ac_ext >&5
7744cat >conftest.$ac_ext <<_ACEOF
7745#line $LINENO "configure"
7746#include "confdefs.h"
7747$ac_includes_default
7748#ifdef F77_DUMMY_MAIN
7749# ifdef __cplusplus
7750 extern "C"
7751# endif
7752 int F77_DUMMY_MAIN() { return 1; }
7753#endif
7754int
7755main ()
7756{
7757static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7758test_array [0] = 0
7759
7760 ;
7761 return 0;
7762}
7763_ACEOF
7764rm -f conftest.$ac_objext
7765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7766 (eval $ac_compile) 2>&5
7767 ac_status=$?
7768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7769 (exit $ac_status); } &&
7770 { ac_try='test -s conftest.$ac_objext'
7771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7772 (eval $ac_try) 2>&5
7773 ac_status=$?
7774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7775 (exit $ac_status); }; }; then
7776 ac_hi=-1 ac_mid=-1
7777 while :; do
7778 cat >conftest.$ac_ext <<_ACEOF
7779#line $LINENO "configure"
7780#include "confdefs.h"
7781$ac_includes_default
7782#ifdef F77_DUMMY_MAIN
7783# ifdef __cplusplus
7784 extern "C"
7785# endif
7786 int F77_DUMMY_MAIN() { return 1; }
7787#endif
7788int
7789main ()
7790{
7791static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7792test_array [0] = 0
7793
7794 ;
7795 return 0;
7796}
7797_ACEOF
7798rm -f conftest.$ac_objext
7799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7800 (eval $ac_compile) 2>&5
7801 ac_status=$?
7802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7803 (exit $ac_status); } &&
7804 { ac_try='test -s conftest.$ac_objext'
7805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7806 (eval $ac_try) 2>&5
7807 ac_status=$?
7808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7809 (exit $ac_status); }; }; then
7810 ac_lo=$ac_mid; break
7811else
7812 echo "$as_me: failed program was:" >&5
7813cat conftest.$ac_ext >&5
7814ac_hi=`expr '(' $ac_mid ')' - 1`
7815 if test $ac_mid -le $ac_hi; then
7816 ac_lo= ac_hi=
7817 break
7818 fi
7819 ac_mid=`expr 2 '*' $ac_mid`
7820fi
7821rm -f conftest.$ac_objext conftest.$ac_ext
7822 done
7823else
7824 echo "$as_me: failed program was:" >&5
7825cat conftest.$ac_ext >&5
7826ac_lo= ac_hi=
7827fi
7828rm -f conftest.$ac_objext conftest.$ac_ext
7829fi
7830rm -f conftest.$ac_objext conftest.$ac_ext
7831# Binary search between lo and hi bounds.
7832while test "x$ac_lo" != "x$ac_hi"; do
7833 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7834 cat >conftest.$ac_ext <<_ACEOF
7835#line $LINENO "configure"
7836#include "confdefs.h"
7837$ac_includes_default
7838#ifdef F77_DUMMY_MAIN
7839# ifdef __cplusplus
7840 extern "C"
7841# endif
7842 int F77_DUMMY_MAIN() { return 1; }
7843#endif
7844int
7845main ()
7846{
7847static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7848test_array [0] = 0
7849
7850 ;
7851 return 0;
7852}
7853_ACEOF
7854rm -f conftest.$ac_objext
7855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7856 (eval $ac_compile) 2>&5
7857 ac_status=$?
7858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7859 (exit $ac_status); } &&
7860 { ac_try='test -s conftest.$ac_objext'
7861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7862 (eval $ac_try) 2>&5
7863 ac_status=$?
7864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7865 (exit $ac_status); }; }; then
7866 ac_hi=$ac_mid
7867else
7868 echo "$as_me: failed program was:" >&5
7869cat conftest.$ac_ext >&5
7870ac_lo=`expr '(' $ac_mid ')' + 1`
7871fi
7872rm -f conftest.$ac_objext conftest.$ac_ext
7873done
7874case $ac_lo in
7875?*) ac_cv_sizeof_long_long=$ac_lo;;
7876'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7877echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7878 { (exit 1); exit 1; }; } ;;
7879esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007880else
7881 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007882 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7883echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7884 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007885else
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 cat >conftest.$ac_ext <<_ACEOF
7887#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007888#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007889$ac_includes_default
7890long longval () { return (long) (sizeof (long long)); }
7891unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007892#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007893#include <stdlib.h>
7894#ifdef F77_DUMMY_MAIN
7895# ifdef __cplusplus
7896 extern "C"
7897# endif
7898 int F77_DUMMY_MAIN() { return 1; }
7899#endif
7900int
7901main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007902{
Martin v. Löwis11437992002-04-12 09:54:03 +00007903
7904 FILE *f = fopen ("conftest.val", "w");
7905 if (! f)
7906 exit (1);
7907 if (((long) (sizeof (long long))) < 0)
7908 {
7909 long i = longval ();
7910 if (i != ((long) (sizeof (long long))))
7911 exit (1);
7912 fprintf (f, "%ld\n", i);
7913 }
7914 else
7915 {
7916 unsigned long i = ulongval ();
7917 if (i != ((long) (sizeof (long long))))
7918 exit (1);
7919 fprintf (f, "%lu\n", i);
7920 }
7921 exit (ferror (f) || fclose (f) != 0);
7922
7923 ;
7924 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007925}
Martin v. Löwis11437992002-04-12 09:54:03 +00007926_ACEOF
7927rm -f conftest$ac_exeext
7928if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7929 (eval $ac_link) 2>&5
7930 ac_status=$?
7931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7932 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7934 (eval $ac_try) 2>&5
7935 ac_status=$?
7936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7937 (exit $ac_status); }; }; then
7938 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007939else
Martin v. Löwis11437992002-04-12 09:54:03 +00007940 echo "$as_me: program exited with status $ac_status" >&5
7941echo "$as_me: failed program was:" >&5
7942cat conftest.$ac_ext >&5
7943( exit $ac_status )
7944{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7945echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7946 { (exit 1); exit 1; }; }
7947fi
7948rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7949fi
7950fi
7951rm -f conftest.val
7952else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007953 ac_cv_sizeof_long_long=0
7954fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007955fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007956echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7957echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7958cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007959#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007960_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007961
Michael W. Hudson54241132001-12-07 15:38:26 +00007962
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007963fi
7964
Martin v. Löwis11437992002-04-12 09:54:03 +00007965echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7966echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007967have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007968cat >conftest.$ac_ext <<_ACEOF
7969#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007970#include "confdefs.h"
7971
Martin v. Löwis11437992002-04-12 09:54:03 +00007972#ifdef F77_DUMMY_MAIN
7973# ifdef __cplusplus
7974 extern "C"
7975# endif
7976 int F77_DUMMY_MAIN() { return 1; }
7977#endif
7978int
7979main ()
7980{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007981uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007982 ;
7983 return 0;
7984}
7985_ACEOF
7986rm -f conftest.$ac_objext
7987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7988 (eval $ac_compile) 2>&5
7989 ac_status=$?
7990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991 (exit $ac_status); } &&
7992 { ac_try='test -s conftest.$ac_objext'
7993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7994 (eval $ac_try) 2>&5
7995 ac_status=$?
7996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7997 (exit $ac_status); }; }; then
7998
7999
8000cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008001#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008002_ACEOF
8003
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008004 have_uintptr_t=yes
8005
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008006else
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 echo "$as_me: failed program was:" >&5
8008cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008009fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008010rm -f conftest.$ac_objext conftest.$ac_ext
8011echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8012echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008013if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008014echo "$as_me:$LINENO: checking for uintptr_t" >&5
8015echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8016if test "${ac_cv_type_uintptr_t+set}" = set; then
8017 echo $ECHO_N "(cached) $ECHO_C" >&6
8018else
8019 cat >conftest.$ac_ext <<_ACEOF
8020#line $LINENO "configure"
8021#include "confdefs.h"
8022$ac_includes_default
8023#ifdef F77_DUMMY_MAIN
8024# ifdef __cplusplus
8025 extern "C"
8026# endif
8027 int F77_DUMMY_MAIN() { return 1; }
8028#endif
8029int
8030main ()
8031{
8032if ((uintptr_t *) 0)
8033 return 0;
8034if (sizeof (uintptr_t))
8035 return 0;
8036 ;
8037 return 0;
8038}
8039_ACEOF
8040rm -f conftest.$ac_objext
8041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8042 (eval $ac_compile) 2>&5
8043 ac_status=$?
8044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8045 (exit $ac_status); } &&
8046 { ac_try='test -s conftest.$ac_objext'
8047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8048 (eval $ac_try) 2>&5
8049 ac_status=$?
8050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8051 (exit $ac_status); }; }; then
8052 ac_cv_type_uintptr_t=yes
8053else
8054 echo "$as_me: failed program was:" >&5
8055cat conftest.$ac_ext >&5
8056ac_cv_type_uintptr_t=no
8057fi
8058rm -f conftest.$ac_objext conftest.$ac_ext
8059fi
8060echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8061echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8062
8063echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8064echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8065if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8066 echo $ECHO_N "(cached) $ECHO_C" >&6
8067else
8068 if test "$ac_cv_type_uintptr_t" = yes; then
8069 # The cast to unsigned long works around a bug in the HP C Compiler
8070 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8071 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8072 # This bug is HP SR number 8606223364.
8073 if test "$cross_compiling" = yes; then
8074 # Depending upon the size, compute the lo and hi bounds.
8075cat >conftest.$ac_ext <<_ACEOF
8076#line $LINENO "configure"
8077#include "confdefs.h"
8078$ac_includes_default
8079#ifdef F77_DUMMY_MAIN
8080# ifdef __cplusplus
8081 extern "C"
8082# endif
8083 int F77_DUMMY_MAIN() { return 1; }
8084#endif
8085int
8086main ()
8087{
8088static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8089test_array [0] = 0
8090
8091 ;
8092 return 0;
8093}
8094_ACEOF
8095rm -f conftest.$ac_objext
8096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8097 (eval $ac_compile) 2>&5
8098 ac_status=$?
8099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8100 (exit $ac_status); } &&
8101 { ac_try='test -s conftest.$ac_objext'
8102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8103 (eval $ac_try) 2>&5
8104 ac_status=$?
8105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8106 (exit $ac_status); }; }; then
8107 ac_lo=0 ac_mid=0
8108 while :; do
8109 cat >conftest.$ac_ext <<_ACEOF
8110#line $LINENO "configure"
8111#include "confdefs.h"
8112$ac_includes_default
8113#ifdef F77_DUMMY_MAIN
8114# ifdef __cplusplus
8115 extern "C"
8116# endif
8117 int F77_DUMMY_MAIN() { return 1; }
8118#endif
8119int
8120main ()
8121{
8122static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8123test_array [0] = 0
8124
8125 ;
8126 return 0;
8127}
8128_ACEOF
8129rm -f conftest.$ac_objext
8130if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8131 (eval $ac_compile) 2>&5
8132 ac_status=$?
8133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8134 (exit $ac_status); } &&
8135 { ac_try='test -s conftest.$ac_objext'
8136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8137 (eval $ac_try) 2>&5
8138 ac_status=$?
8139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8140 (exit $ac_status); }; }; then
8141 ac_hi=$ac_mid; break
8142else
8143 echo "$as_me: failed program was:" >&5
8144cat conftest.$ac_ext >&5
8145ac_lo=`expr $ac_mid + 1`
8146 if test $ac_lo -le $ac_mid; then
8147 ac_lo= ac_hi=
8148 break
8149 fi
8150 ac_mid=`expr 2 '*' $ac_mid + 1`
8151fi
8152rm -f conftest.$ac_objext conftest.$ac_ext
8153 done
8154else
8155 echo "$as_me: failed program was:" >&5
8156cat conftest.$ac_ext >&5
8157cat >conftest.$ac_ext <<_ACEOF
8158#line $LINENO "configure"
8159#include "confdefs.h"
8160$ac_includes_default
8161#ifdef F77_DUMMY_MAIN
8162# ifdef __cplusplus
8163 extern "C"
8164# endif
8165 int F77_DUMMY_MAIN() { return 1; }
8166#endif
8167int
8168main ()
8169{
8170static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8171test_array [0] = 0
8172
8173 ;
8174 return 0;
8175}
8176_ACEOF
8177rm -f conftest.$ac_objext
8178if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8179 (eval $ac_compile) 2>&5
8180 ac_status=$?
8181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8182 (exit $ac_status); } &&
8183 { ac_try='test -s conftest.$ac_objext'
8184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8185 (eval $ac_try) 2>&5
8186 ac_status=$?
8187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8188 (exit $ac_status); }; }; then
8189 ac_hi=-1 ac_mid=-1
8190 while :; do
8191 cat >conftest.$ac_ext <<_ACEOF
8192#line $LINENO "configure"
8193#include "confdefs.h"
8194$ac_includes_default
8195#ifdef F77_DUMMY_MAIN
8196# ifdef __cplusplus
8197 extern "C"
8198# endif
8199 int F77_DUMMY_MAIN() { return 1; }
8200#endif
8201int
8202main ()
8203{
8204static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8205test_array [0] = 0
8206
8207 ;
8208 return 0;
8209}
8210_ACEOF
8211rm -f conftest.$ac_objext
8212if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8213 (eval $ac_compile) 2>&5
8214 ac_status=$?
8215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8216 (exit $ac_status); } &&
8217 { ac_try='test -s conftest.$ac_objext'
8218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8219 (eval $ac_try) 2>&5
8220 ac_status=$?
8221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8222 (exit $ac_status); }; }; then
8223 ac_lo=$ac_mid; break
8224else
8225 echo "$as_me: failed program was:" >&5
8226cat conftest.$ac_ext >&5
8227ac_hi=`expr '(' $ac_mid ')' - 1`
8228 if test $ac_mid -le $ac_hi; then
8229 ac_lo= ac_hi=
8230 break
8231 fi
8232 ac_mid=`expr 2 '*' $ac_mid`
8233fi
8234rm -f conftest.$ac_objext conftest.$ac_ext
8235 done
8236else
8237 echo "$as_me: failed program was:" >&5
8238cat conftest.$ac_ext >&5
8239ac_lo= ac_hi=
8240fi
8241rm -f conftest.$ac_objext conftest.$ac_ext
8242fi
8243rm -f conftest.$ac_objext conftest.$ac_ext
8244# Binary search between lo and hi bounds.
8245while test "x$ac_lo" != "x$ac_hi"; do
8246 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8247 cat >conftest.$ac_ext <<_ACEOF
8248#line $LINENO "configure"
8249#include "confdefs.h"
8250$ac_includes_default
8251#ifdef F77_DUMMY_MAIN
8252# ifdef __cplusplus
8253 extern "C"
8254# endif
8255 int F77_DUMMY_MAIN() { return 1; }
8256#endif
8257int
8258main ()
8259{
8260static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8261test_array [0] = 0
8262
8263 ;
8264 return 0;
8265}
8266_ACEOF
8267rm -f conftest.$ac_objext
8268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8269 (eval $ac_compile) 2>&5
8270 ac_status=$?
8271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8272 (exit $ac_status); } &&
8273 { ac_try='test -s conftest.$ac_objext'
8274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8275 (eval $ac_try) 2>&5
8276 ac_status=$?
8277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8278 (exit $ac_status); }; }; then
8279 ac_hi=$ac_mid
8280else
8281 echo "$as_me: failed program was:" >&5
8282cat conftest.$ac_ext >&5
8283ac_lo=`expr '(' $ac_mid ')' + 1`
8284fi
8285rm -f conftest.$ac_objext conftest.$ac_ext
8286done
8287case $ac_lo in
8288?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8289'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8290echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8291 { (exit 1); exit 1; }; } ;;
8292esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008293else
8294 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8296echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8297 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008298else
Martin v. Löwis11437992002-04-12 09:54:03 +00008299 cat >conftest.$ac_ext <<_ACEOF
8300#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008301#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008302$ac_includes_default
8303long longval () { return (long) (sizeof (uintptr_t)); }
8304unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008305#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008306#include <stdlib.h>
8307#ifdef F77_DUMMY_MAIN
8308# ifdef __cplusplus
8309 extern "C"
8310# endif
8311 int F77_DUMMY_MAIN() { return 1; }
8312#endif
8313int
8314main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008315{
Martin v. Löwis11437992002-04-12 09:54:03 +00008316
8317 FILE *f = fopen ("conftest.val", "w");
8318 if (! f)
8319 exit (1);
8320 if (((long) (sizeof (uintptr_t))) < 0)
8321 {
8322 long i = longval ();
8323 if (i != ((long) (sizeof (uintptr_t))))
8324 exit (1);
8325 fprintf (f, "%ld\n", i);
8326 }
8327 else
8328 {
8329 unsigned long i = ulongval ();
8330 if (i != ((long) (sizeof (uintptr_t))))
8331 exit (1);
8332 fprintf (f, "%lu\n", i);
8333 }
8334 exit (ferror (f) || fclose (f) != 0);
8335
8336 ;
8337 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008338}
Martin v. Löwis11437992002-04-12 09:54:03 +00008339_ACEOF
8340rm -f conftest$ac_exeext
8341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8342 (eval $ac_link) 2>&5
8343 ac_status=$?
8344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8347 (eval $ac_try) 2>&5
8348 ac_status=$?
8349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8350 (exit $ac_status); }; }; then
8351 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008352else
Martin v. Löwis11437992002-04-12 09:54:03 +00008353 echo "$as_me: program exited with status $ac_status" >&5
8354echo "$as_me: failed program was:" >&5
8355cat conftest.$ac_ext >&5
8356( exit $ac_status )
8357{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8358echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8359 { (exit 1); exit 1; }; }
8360fi
8361rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8362fi
8363fi
8364rm -f conftest.val
8365else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008366 ac_cv_sizeof_uintptr_t=0
8367fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008368fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008369echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8370echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8371cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008372#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008373_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008374
Michael W. Hudson54241132001-12-07 15:38:26 +00008375
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008376fi
8377
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008378# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008379echo "$as_me:$LINENO: checking size of off_t" >&5
8380echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8381if test "${ac_cv_sizeof_off_t+set}" = set; then
8382 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008383else
8384 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008385 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008386else
Martin v. Löwis11437992002-04-12 09:54:03 +00008387 cat >conftest.$ac_ext <<_ACEOF
8388#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008389#include "confdefs.h"
8390#include <stdio.h>
8391#include <sys/types.h>
8392main()
8393{
8394 FILE *f=fopen("conftestval", "w");
8395 if (!f) exit(1);
8396 fprintf(f, "%d\n", sizeof(off_t));
8397 exit(0);
8398}
Martin v. Löwis11437992002-04-12 09:54:03 +00008399_ACEOF
8400rm -f conftest$ac_exeext
8401if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8402 (eval $ac_link) 2>&5
8403 ac_status=$?
8404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8405 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8407 (eval $ac_try) 2>&5
8408 ac_status=$?
8409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8410 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008411 ac_cv_sizeof_off_t=`cat conftestval`
8412else
Martin v. Löwis11437992002-04-12 09:54:03 +00008413 echo "$as_me: program exited with status $ac_status" >&5
8414echo "$as_me: failed program was:" >&5
8415cat conftest.$ac_ext >&5
8416( exit $ac_status )
8417ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008418fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008419rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008420fi
8421
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008422fi
8423
Martin v. Löwis11437992002-04-12 09:54:03 +00008424echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8425echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8426
8427cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008428#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008429_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008430
Michael W. Hudson54241132001-12-07 15:38:26 +00008431
Martin v. Löwis11437992002-04-12 09:54:03 +00008432echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8433echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008434if test "$have_long_long" = yes -a \
8435 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8436 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008437
Martin v. Löwis11437992002-04-12 09:54:03 +00008438cat >>confdefs.h <<\_ACEOF
8439#define HAVE_LARGEFILE_SUPPORT 1
8440_ACEOF
8441
8442 echo "$as_me:$LINENO: result: yes" >&5
8443echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008444else
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 echo "$as_me:$LINENO: result: no" >&5
8446echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008447fi
8448
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008449# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008450echo "$as_me:$LINENO: checking size of time_t" >&5
8451echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8452if test "${ac_cv_sizeof_time_t+set}" = set; then
8453 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008454else
8455 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008456 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008457else
Martin v. Löwis11437992002-04-12 09:54:03 +00008458 cat >conftest.$ac_ext <<_ACEOF
8459#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008460#include "confdefs.h"
8461#include <stdio.h>
8462#include <time.h>
8463main()
8464{
8465 FILE *f=fopen("conftestval", "w");
8466 if (!f) exit(1);
8467 fprintf(f, "%d\n", sizeof(time_t));
8468 exit(0);
8469}
Martin v. Löwis11437992002-04-12 09:54:03 +00008470_ACEOF
8471rm -f conftest$ac_exeext
8472if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8473 (eval $ac_link) 2>&5
8474 ac_status=$?
8475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8476 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8478 (eval $ac_try) 2>&5
8479 ac_status=$?
8480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8481 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008482 ac_cv_sizeof_time_t=`cat conftestval`
8483else
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 echo "$as_me: program exited with status $ac_status" >&5
8485echo "$as_me: failed program was:" >&5
8486cat conftest.$ac_ext >&5
8487( exit $ac_status )
8488ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008489fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008490rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008491fi
8492
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008493fi
8494
Martin v. Löwis11437992002-04-12 09:54:03 +00008495echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8496echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8497
8498cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008499#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008500_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008501
Michael W. Hudson54241132001-12-07 15:38:26 +00008502
8503
Trent Mick635f6fb2000-08-23 21:33:05 +00008504# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008505ac_save_cc="$CC"
8506if test "$ac_cv_kpthread" = "yes"
8507then CC="$CC -Kpthread"
8508fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008509echo "$as_me:$LINENO: checking for pthread_t" >&5
8510echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008511have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008512cat >conftest.$ac_ext <<_ACEOF
8513#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008514#include "confdefs.h"
8515#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008516#ifdef F77_DUMMY_MAIN
8517# ifdef __cplusplus
8518 extern "C"
8519# endif
8520 int F77_DUMMY_MAIN() { return 1; }
8521#endif
8522int
8523main ()
8524{
Guido van Rossum12580492000-09-24 16:47:19 +00008525pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 ;
8527 return 0;
8528}
8529_ACEOF
8530rm -f conftest.$ac_objext
8531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8532 (eval $ac_compile) 2>&5
8533 ac_status=$?
8534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8535 (exit $ac_status); } &&
8536 { ac_try='test -s conftest.$ac_objext'
8537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8538 (eval $ac_try) 2>&5
8539 ac_status=$?
8540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8541 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008542 have_pthread_t=yes
8543else
Martin v. Löwis11437992002-04-12 09:54:03 +00008544 echo "$as_me: failed program was:" >&5
8545cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008546fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008547rm -f conftest.$ac_objext conftest.$ac_ext
8548echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8549echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008550if test "$have_pthread_t" = yes ; then
8551 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008552 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8553echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8554 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8555 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008556else
8557 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008558 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008559else
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 cat >conftest.$ac_ext <<_ACEOF
8561#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008562#include "confdefs.h"
8563#include <stdio.h>
8564 #include <pthread.h>
8565 main()
8566 {
8567 FILE *f=fopen("conftestval", "w");
8568 if (!f) exit(1);
8569 fprintf(f, "%d\n", sizeof(pthread_t));
8570 exit(0);
8571 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008572_ACEOF
8573rm -f conftest$ac_exeext
8574if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8575 (eval $ac_link) 2>&5
8576 ac_status=$?
8577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8578 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8580 (eval $ac_try) 2>&5
8581 ac_status=$?
8582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8583 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008584 ac_cv_sizeof_pthread_t=`cat conftestval`
8585else
Martin v. Löwis11437992002-04-12 09:54:03 +00008586 echo "$as_me: program exited with status $ac_status" >&5
8587echo "$as_me: failed program was:" >&5
8588cat conftest.$ac_ext >&5
8589( exit $ac_status )
8590ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008592rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008593fi
8594
Trent Mick635f6fb2000-08-23 21:33:05 +00008595fi
8596
Martin v. Löwis11437992002-04-12 09:54:03 +00008597 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8598echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8599
8600cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008601#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008602_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008603
8604fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008605CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8608echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008609# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8610if test "${enable_toolbox_glue+set}" = set; then
8611 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008612
Martin v. Löwis11437992002-04-12 09:54:03 +00008613fi;
Jack Jansene578a632001-08-15 01:27:14 +00008614
8615if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008616then
Jack Jansene578a632001-08-15 01:27:14 +00008617 case $ac_sys_system/$ac_sys_release in
8618 Darwin/*)
8619 enable_toolbox_glue="yes";;
8620 *)
8621 enable_toolbox_glue="no";;
8622 esac
8623fi
8624case "$enable_toolbox_glue" in
8625yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008626 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008627 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008628 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008629
8630cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008631#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008632_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008633
8634 ;;
8635*)
8636 extra_frameworks=""
8637 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008638 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008639 ;;
8640esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008641echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8642echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008643
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008644
8645case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008646 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008647 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008648 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8649 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008650 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8651 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008652 Darwin/*)
8653 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008654 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8655 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008656 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8657 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008658esac
8659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660echo "$as_me:$LINENO: checking for --enable-framework" >&5
8661echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008662if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008663then
Jack Jansenca06bc62001-08-03 15:32:23 +00008664 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008665 # -U __environ is needed since bundles don't have access
8666 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008668 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008669
Jack Jansena3891ea2001-09-07 14:25:12 +00008670 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008671 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8672 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008673 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008674
Martin v. Löwis11437992002-04-12 09:54:03 +00008675cat >>confdefs.h <<\_ACEOF
8676#define WITH_NEXT_FRAMEWORK 1
8677_ACEOF
8678
8679 echo "$as_me:$LINENO: result: yes" >&5
8680echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008681else
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 echo "$as_me:$LINENO: result: no" >&5
8683echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008684fi
8685
Martin v. Löwis11437992002-04-12 09:54:03 +00008686echo "$as_me:$LINENO: checking for dyld" >&5
8687echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008688case $ac_sys_system/$ac_sys_release in
8689 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008690
Martin v. Löwis11437992002-04-12 09:54:03 +00008691cat >>confdefs.h <<\_ACEOF
8692#define WITH_DYLD 1
8693_ACEOF
8694
8695 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8696echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008697 ;;
8698 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 echo "$as_me:$LINENO: result: no" >&5
8700echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008701 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008702esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008703
Guido van Rossum0a516c91994-09-12 10:58:40 +00008704# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008705
Michael W. Hudson54241132001-12-07 15:38:26 +00008706
8707
8708
8709
Guido van Rossum0a516c91994-09-12 10:58:40 +00008710# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008711# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008712echo "$as_me:$LINENO: checking SO" >&5
8713echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008714if test -z "$SO"
8715then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008716 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008717 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008718 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008719 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008720 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008721fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008722echo "$as_me:$LINENO: result: $SO" >&5
8723echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008724# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008725# -- "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 +00008726# (Shared libraries in this instance are shared modules to be loaded into
8727# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008728echo "$as_me:$LINENO: checking LDSHARED" >&5
8729echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008730if test -z "$LDSHARED"
8731then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008732 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008733 AIX*)
8734 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008735 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008736 ;;
8737 BeOS*)
8738 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008739 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008740 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008741 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008742 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008743 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008744 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00008745 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008746 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008747 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00008748 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008749 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008750 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8751 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008752 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008753 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8754 if test "$enable_framework" ; then
8755 # Link against the framework. All externals should be defined.
8756 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8757 else
8758 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008759 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008760 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008761 Darwin/*)
8762 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8763 if test "$enable_framework" ; then
8764 # Link against the framework. All externals should be defined.
8765 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8766 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008767 # No framework, use the Python app as bundle-loader
8768 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8769 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008770 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008771 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008772 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008773 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008774 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008775 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008776 then
8777 LDSHARED="cc -shared ${LDFLAGS}"
8778 else
8779 LDSHARED="ld -Bshareable ${LDFLAGS}"
8780 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008781 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008782 if test "$GCC" = "yes"
8783 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008784 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008785 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008786 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008787 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008788 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008789 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008790 *) LDSHARED="ld";;
8791 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008792fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008793echo "$as_me:$LINENO: result: $LDSHARED" >&5
8794echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008795BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008796# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008797# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008798echo "$as_me:$LINENO: checking CCSHARED" >&5
8799echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008800if test -z "$CCSHARED"
8801then
Guido van Rossum07397971997-04-29 21:49:50 +00008802 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008803 SunOS*) if test "$GCC" = yes;
8804 then CCSHARED="-fPIC";
8805 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008806 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008807 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008808 else CCSHARED="+z";
8809 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008810 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008811 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008812 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008813 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008814 if test "$GCC" = "yes"
8815 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008816 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008817 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008818 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008819 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008820 IRIX*/6*) case $CC in
8821 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008822 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008823 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008824 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008825 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008826 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008827fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008828echo "$as_me:$LINENO: result: $CCSHARED" >&5
8829echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008830# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008831# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008832echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8833echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008834if test -z "$LINKFORSHARED"
8835then
Guido van Rossum07397971997-04-29 21:49:50 +00008836 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008837 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008838 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008839 LINKFORSHARED="-Wl,-E -Wl,+s";;
8840# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008841 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008842 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008843 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008845 # -u __dummy makes the linker aware of the objc runtime
8846 # in System.framework; otherwise, __objcInit (referenced in
8847 # crt1.o) gets erroneously defined as common, which breaks dynamic
8848 # loading of any modules which reference it in System.framework.
8849 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8850 # not used by the core itself but which needs to be in the core so
8851 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008852 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008853 if test "$enable_framework"
8854 then
8855 LINKFORSHARED="$LINKFORSHARED -framework Python"
8856 fi
8857 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008858 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008859 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008860 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008862 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8863 then
8864 LINKFORSHARED="-Wl,--export-dynamic"
8865 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008866 SunOS/5*) case $CC in
8867 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008868 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008869 then
8870 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008871 fi;;
8872 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008873 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008874fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008875echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8876echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008877
Michael W. Hudson54241132001-12-07 15:38:26 +00008878
Martin v. Löwis11437992002-04-12 09:54:03 +00008879echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8880echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008881if test ! "$LIBRARY" = "$LDLIBRARY"
8882then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008883 case $ac_sys_system in
8884 CYGWIN*)
8885 # Cygwin needs CCSHARED when building extension DLLs
8886 # but not when building the interpreter DLL.
8887 CFLAGSFORSHARED='';;
8888 *)
8889 CFLAGSFORSHARED='$(CCSHARED)'
8890 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008891fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008892echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8893echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008894
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008895# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8896# library (with --enable-shared).
8897# For platforms on which shared libraries are not allowed to have unresolved
8898# symbols, this must be set to $(LIBS) (expanded by make).
8899
8900echo "$as_me:$LINENO: checking SHLIBS" >&5
8901echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
8902case "$ac_sys_system" in
8903 atheos*)
8904 SHLIBS='$(LIBS)';;
8905 *)
8906 SHLIBS='';;
8907esac
8908echo "$as_me:$LINENO: result: $SHLIBS" >&5
8909echo "${ECHO_T}$SHLIBS" >&6
8910
8911
Guido van Rossum627b2d71993-12-24 10:39:16 +00008912# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008913
8914echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8915echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8916if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8917 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008918else
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008920LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008921cat >conftest.$ac_ext <<_ACEOF
8922#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008923#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008924
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008925/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008926#ifdef __cplusplus
8927extern "C"
8928#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008929/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 builtin and then its argument prototype would still apply. */
8931char dlopen ();
8932#ifdef F77_DUMMY_MAIN
8933# ifdef __cplusplus
8934 extern "C"
8935# endif
8936 int F77_DUMMY_MAIN() { return 1; }
8937#endif
8938int
8939main ()
8940{
8941dlopen ();
8942 ;
8943 return 0;
8944}
8945_ACEOF
8946rm -f conftest.$ac_objext conftest$ac_exeext
8947if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8948 (eval $ac_link) 2>&5
8949 ac_status=$?
8950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8951 (exit $ac_status); } &&
8952 { ac_try='test -s conftest$ac_exeext'
8953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8954 (eval $ac_try) 2>&5
8955 ac_status=$?
8956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8957 (exit $ac_status); }; }; then
8958 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008959else
Martin v. Löwis11437992002-04-12 09:54:03 +00008960 echo "$as_me: failed program was:" >&5
8961cat conftest.$ac_ext >&5
8962ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008963fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008964rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8965LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008966fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008967echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8968echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8969if test $ac_cv_lib_dl_dlopen = yes; then
8970 cat >>confdefs.h <<_ACEOF
8971#define HAVE_LIBDL 1
8972_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008973
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008974 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008975
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008976fi
8977 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008978
8979echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8980echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8981if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8982 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008983else
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008985LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008986cat >conftest.$ac_ext <<_ACEOF
8987#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008988#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008989
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008990/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008991#ifdef __cplusplus
8992extern "C"
8993#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008994/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008995 builtin and then its argument prototype would still apply. */
8996char shl_load ();
8997#ifdef F77_DUMMY_MAIN
8998# ifdef __cplusplus
8999 extern "C"
9000# endif
9001 int F77_DUMMY_MAIN() { return 1; }
9002#endif
9003int
9004main ()
9005{
9006shl_load ();
9007 ;
9008 return 0;
9009}
9010_ACEOF
9011rm -f conftest.$ac_objext conftest$ac_exeext
9012if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9013 (eval $ac_link) 2>&5
9014 ac_status=$?
9015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9016 (exit $ac_status); } &&
9017 { ac_try='test -s conftest$ac_exeext'
9018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9019 (eval $ac_try) 2>&5
9020 ac_status=$?
9021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9022 (exit $ac_status); }; }; then
9023 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009024else
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 echo "$as_me: failed program was:" >&5
9026cat conftest.$ac_ext >&5
9027ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009028fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009029rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9030LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009031fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009032echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9033echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9034if test $ac_cv_lib_dld_shl_load = yes; then
9035 cat >>confdefs.h <<_ACEOF
9036#define HAVE_LIBDLD 1
9037_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009038
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009039 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009040
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009041fi
9042 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009043
9044echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9045echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9046if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9047 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009048else
Martin v. Löwis11437992002-04-12 09:54:03 +00009049 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009050LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009051cat >conftest.$ac_ext <<_ACEOF
9052#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009053#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009054
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009055/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009056#ifdef __cplusplus
9057extern "C"
9058#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009059/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009060 builtin and then its argument prototype would still apply. */
9061char sem_init ();
9062#ifdef F77_DUMMY_MAIN
9063# ifdef __cplusplus
9064 extern "C"
9065# endif
9066 int F77_DUMMY_MAIN() { return 1; }
9067#endif
9068int
9069main ()
9070{
9071sem_init ();
9072 ;
9073 return 0;
9074}
9075_ACEOF
9076rm -f conftest.$ac_objext conftest$ac_exeext
9077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9078 (eval $ac_link) 2>&5
9079 ac_status=$?
9080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9081 (exit $ac_status); } &&
9082 { ac_try='test -s conftest$ac_exeext'
9083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9084 (eval $ac_try) 2>&5
9085 ac_status=$?
9086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9087 (exit $ac_status); }; }; then
9088 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009089else
Martin v. Löwis11437992002-04-12 09:54:03 +00009090 echo "$as_me: failed program was:" >&5
9091cat conftest.$ac_ext >&5
9092ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009093fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009094rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9095LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009096fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009097echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9098echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9099if test $ac_cv_lib_rt_sem_init = yes; then
9100 cat >>confdefs.h <<_ACEOF
9101#define HAVE_LIBRT 1
9102_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009103
9104 LIBS="-lrt $LIBS"
9105
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009106fi
9107 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009108
9109# checks for system dependent C++ extensions support
9110case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009111 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9112echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9113 cat >conftest.$ac_ext <<_ACEOF
9114#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009115#include "confdefs.h"
9116#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009117#ifdef F77_DUMMY_MAIN
9118# ifdef __cplusplus
9119 extern "C"
9120# endif
9121 int F77_DUMMY_MAIN() { return 1; }
9122#endif
9123int
9124main ()
9125{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009126loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009127 ;
9128 return 0;
9129}
9130_ACEOF
9131rm -f conftest.$ac_objext conftest$ac_exeext
9132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9133 (eval $ac_link) 2>&5
9134 ac_status=$?
9135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9136 (exit $ac_status); } &&
9137 { ac_try='test -s conftest$ac_exeext'
9138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9139 (eval $ac_try) 2>&5
9140 ac_status=$?
9141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9142 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009143
Martin v. Löwis11437992002-04-12 09:54:03 +00009144cat >>confdefs.h <<\_ACEOF
9145#define AIX_GENUINE_CPLUSPLUS 1
9146_ACEOF
9147
9148 echo "$as_me:$LINENO: result: yes" >&5
9149echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009150else
Martin v. Löwis11437992002-04-12 09:54:03 +00009151 echo "$as_me: failed program was:" >&5
9152cat conftest.$ac_ext >&5
9153echo "$as_me:$LINENO: result: no" >&5
9154echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009155fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009156rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009157 *) ;;
9158esac
9159
Guido van Rossum70c7f481998-03-26 18:44:10 +00009160# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9161# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009162# BeOS' sockets are stashed in libnet.
9163case "$ac_sys_system" in
9164IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009165*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009166echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9167echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9168if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009170else
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009172LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009173cat >conftest.$ac_ext <<_ACEOF
9174#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009175#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009177/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009178#ifdef __cplusplus
9179extern "C"
9180#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009181/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 builtin and then its argument prototype would still apply. */
9183char t_open ();
9184#ifdef F77_DUMMY_MAIN
9185# ifdef __cplusplus
9186 extern "C"
9187# endif
9188 int F77_DUMMY_MAIN() { return 1; }
9189#endif
9190int
9191main ()
9192{
9193t_open ();
9194 ;
9195 return 0;
9196}
9197_ACEOF
9198rm -f conftest.$ac_objext conftest$ac_exeext
9199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9200 (eval $ac_link) 2>&5
9201 ac_status=$?
9202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9203 (exit $ac_status); } &&
9204 { ac_try='test -s conftest$ac_exeext'
9205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9206 (eval $ac_try) 2>&5
9207 ac_status=$?
9208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9209 (exit $ac_status); }; }; then
9210 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009211else
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 echo "$as_me: failed program was:" >&5
9213cat conftest.$ac_ext >&5
9214ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009216rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9217LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009218fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009219echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9220echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9221if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009222 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009223fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009224 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009225echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9226echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9227if test "${ac_cv_lib_socket_socket+set}" = set; then
9228 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009229else
Martin v. Löwis11437992002-04-12 09:54:03 +00009230 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009231LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009232cat >conftest.$ac_ext <<_ACEOF
9233#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009234#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009235
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009236/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009237#ifdef __cplusplus
9238extern "C"
9239#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009240/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009241 builtin and then its argument prototype would still apply. */
9242char socket ();
9243#ifdef F77_DUMMY_MAIN
9244# ifdef __cplusplus
9245 extern "C"
9246# endif
9247 int F77_DUMMY_MAIN() { return 1; }
9248#endif
9249int
9250main ()
9251{
9252socket ();
9253 ;
9254 return 0;
9255}
9256_ACEOF
9257rm -f conftest.$ac_objext conftest$ac_exeext
9258if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9259 (eval $ac_link) 2>&5
9260 ac_status=$?
9261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9262 (exit $ac_status); } &&
9263 { ac_try='test -s conftest$ac_exeext'
9264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9265 (eval $ac_try) 2>&5
9266 ac_status=$?
9267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9268 (exit $ac_status); }; }; then
9269 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009270else
Martin v. Löwis11437992002-04-12 09:54:03 +00009271 echo "$as_me: failed program was:" >&5
9272cat conftest.$ac_ext >&5
9273ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009274fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009275rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9276LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009277fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009278echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9279echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9280if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009281 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009282fi
9283 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009284;;
9285esac
9286case "$ac_sys_system" in
9287BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009288echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9289echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9290if test "${ac_cv_lib_net_socket+set}" = set; then
9291 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009292else
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009294LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009295cat >conftest.$ac_ext <<_ACEOF
9296#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009297#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009298
Guido van Rossumad678af1998-10-02 14:42:15 +00009299/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009300#ifdef __cplusplus
9301extern "C"
9302#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009303/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 builtin and then its argument prototype would still apply. */
9305char socket ();
9306#ifdef F77_DUMMY_MAIN
9307# ifdef __cplusplus
9308 extern "C"
9309# endif
9310 int F77_DUMMY_MAIN() { return 1; }
9311#endif
9312int
9313main ()
9314{
9315socket ();
9316 ;
9317 return 0;
9318}
9319_ACEOF
9320rm -f conftest.$ac_objext conftest$ac_exeext
9321if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9322 (eval $ac_link) 2>&5
9323 ac_status=$?
9324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9325 (exit $ac_status); } &&
9326 { ac_try='test -s conftest$ac_exeext'
9327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9328 (eval $ac_try) 2>&5
9329 ac_status=$?
9330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9331 (exit $ac_status); }; }; then
9332 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009333else
Martin v. Löwis11437992002-04-12 09:54:03 +00009334 echo "$as_me: failed program was:" >&5
9335cat conftest.$ac_ext >&5
9336ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009337fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009338rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9339LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009340fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009341echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9342echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9343if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009344 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009345fi
9346 # BeOS
9347;;
9348esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009349
Martin v. Löwis11437992002-04-12 09:54:03 +00009350echo "$as_me:$LINENO: checking for --with-libs" >&5
9351echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9352
Guido van Rossuma68acba1996-07-31 17:36:39 +00009353# Check whether --with-libs or --without-libs was given.
9354if test "${with_libs+set}" = set; then
9355 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009356
9357echo "$as_me:$LINENO: result: $withval" >&5
9358echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009359LIBS="$withval $LIBS"
9360
9361else
Martin v. Löwis11437992002-04-12 09:54:03 +00009362 echo "$as_me:$LINENO: result: no" >&5
9363echo "${ECHO_T}no" >&6
9364fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009365
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009366# Determine if signalmodule should be used.
9367
9368
Martin v. Löwis11437992002-04-12 09:54:03 +00009369echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9370echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9371
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009372# Check whether --with-signal-module or --without-signal-module was given.
9373if test "${with_signal_module+set}" = set; then
9374 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009375
Martin v. Löwis11437992002-04-12 09:54:03 +00009376fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009377
9378if test -z "$with_signal_module"
9379then with_signal_module="yes"
9380fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009381echo "$as_me:$LINENO: result: $with_signal_module" >&5
9382echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009383
9384if test "${with_signal_module}" = "yes"; then
9385 USE_SIGNAL_MODULE=""
9386 SIGNAL_OBJS=""
9387else
9388 USE_SIGNAL_MODULE="#"
9389 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9390fi
9391
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009392# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009393
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009394USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009395
Martin v. Löwis11437992002-04-12 09:54:03 +00009396echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9397echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9398
Guido van Rossumec2f0731997-01-22 20:54:01 +00009399
9400# Check whether --with-dec-threads or --without-dec-threads was given.
9401if test "${with_dec_threads+set}" = set; then
9402 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009403
9404echo "$as_me:$LINENO: result: $withval" >&5
9405echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009406LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009407if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009408 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009409fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009410else
Martin v. Löwis11437992002-04-12 09:54:03 +00009411 echo "$as_me:$LINENO: result: no" >&5
9412echo "${ECHO_T}no" >&6
9413fi;
9414
9415# Templates for things AC_DEFINEd more than once.
9416# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009417
9418
Martin v. Löwis11437992002-04-12 09:54:03 +00009419
9420
9421
9422
9423
9424echo "$as_me:$LINENO: checking for --with-threads" >&5
9425echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9426
Guido van Rossumec2f0731997-01-22 20:54:01 +00009427# Check whether --with-threads or --without-threads was given.
9428if test "${with_threads+set}" = set; then
9429 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009430
Martin v. Löwis11437992002-04-12 09:54:03 +00009431fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009432
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009433# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009434
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009435# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009436if test "${with_thread+set}" = set; then
9437 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009438
Martin v. Löwis11437992002-04-12 09:54:03 +00009439with_threads=$with_thread
9440fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009441
9442if test -z "$with_threads"
9443then with_threads="yes"
9444fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009445echo "$as_me:$LINENO: result: $with_threads" >&5
9446echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009447
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009448
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009449if test "$with_threads" = "no"
9450then
9451 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009452elif test "$ac_cv_pthread_is_default" = yes
9453then
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 WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009456_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009457
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009458 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009460#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009461_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009462
9463 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009464 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009465elif test "$ac_cv_kpthread" = "yes"
9466then
9467 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009469#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009470_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009471
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009472 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009473 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009474else
9475 if test ! -z "$with_threads" -a -d "$with_threads"
9476 then LDFLAGS="$LDFLAGS -L$with_threads"
9477 fi
9478 if test ! -z "$withval" -a -d "$withval"
9479 then LDFLAGS="$LDFLAGS -L$withval"
9480 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009481
9482 # According to the POSIX spec, a pthreads implementation must
9483 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9485echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9486 cat >conftest.$ac_ext <<_ACEOF
9487#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009488#include "confdefs.h"
9489#include <unistd.h>
9490 #ifdef _POSIX_THREADS
9491 yes
9492 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009493
9494_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9496 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009497 unistd_defines_pthreads=yes
9498else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009499 unistd_defines_pthreads=no
9500fi
9501rm -f conftest*
9502
Martin v. Löwis11437992002-04-12 09:54:03 +00009503 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9504echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009505
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009507#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009508_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009509
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 if test "${ac_cv_header_cthreads_h+set}" = set; then
9511 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9512echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9513if test "${ac_cv_header_cthreads_h+set}" = set; then
9514 echo $ECHO_N "(cached) $ECHO_C" >&6
9515fi
9516echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9517echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009518else
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 # Is the header compilable?
9520echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9521echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9522cat >conftest.$ac_ext <<_ACEOF
9523#line $LINENO "configure"
9524#include "confdefs.h"
9525$ac_includes_default
9526#include <cthreads.h>
9527_ACEOF
9528rm -f conftest.$ac_objext
9529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9530 (eval $ac_compile) 2>&5
9531 ac_status=$?
9532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9533 (exit $ac_status); } &&
9534 { ac_try='test -s conftest.$ac_objext'
9535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9536 (eval $ac_try) 2>&5
9537 ac_status=$?
9538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9539 (exit $ac_status); }; }; then
9540 ac_header_compiler=yes
9541else
9542 echo "$as_me: failed program was:" >&5
9543cat conftest.$ac_ext >&5
9544ac_header_compiler=no
9545fi
9546rm -f conftest.$ac_objext conftest.$ac_ext
9547echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9548echo "${ECHO_T}$ac_header_compiler" >&6
9549
9550# Is the header present?
9551echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9552echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9553cat >conftest.$ac_ext <<_ACEOF
9554#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009555#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009556#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009557_ACEOF
9558if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9559 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9560 ac_status=$?
9561 egrep -v '^ *\+' conftest.er1 >conftest.err
9562 rm -f conftest.er1
9563 cat conftest.err >&5
9564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9565 (exit $ac_status); } >/dev/null; then
9566 if test -s conftest.err; then
9567 ac_cpp_err=$ac_c_preproc_warn_flag
9568 else
9569 ac_cpp_err=
9570 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009571else
Martin v. Löwis11437992002-04-12 09:54:03 +00009572 ac_cpp_err=yes
9573fi
9574if test -z "$ac_cpp_err"; then
9575 ac_header_preproc=yes
9576else
9577 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009578 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009579 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009581rm -f conftest.err conftest.$ac_ext
9582echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9583echo "${ECHO_T}$ac_header_preproc" >&6
9584
9585# So? What about this header?
9586case $ac_header_compiler:$ac_header_preproc in
9587 yes:no )
9588 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9589echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9590 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9591echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9592 no:yes )
9593 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9594echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9595 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9596echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9597 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9598echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9599esac
9600echo "$as_me:$LINENO: checking for cthreads.h" >&5
9601echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9602if test "${ac_cv_header_cthreads_h+set}" = set; then
9603 echo $ECHO_N "(cached) $ECHO_C" >&6
9604else
9605 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009607echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9608echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9609
9610fi
9611if test $ac_cv_header_cthreads_h = yes; then
9612 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009613#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009614_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009615
Martin v. Löwis11437992002-04-12 09:54:03 +00009616 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009617#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009618_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009619
Martin v. Löwis11437992002-04-12 09:54:03 +00009620
9621cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009622#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009623_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009624
9625 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009626 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009627else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009628
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9630 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9631echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9632if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9633 echo $ECHO_N "(cached) $ECHO_C" >&6
9634fi
9635echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9636echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009637else
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 # Is the header compilable?
9639echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9640echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9641cat >conftest.$ac_ext <<_ACEOF
9642#line $LINENO "configure"
9643#include "confdefs.h"
9644$ac_includes_default
9645#include <mach/cthreads.h>
9646_ACEOF
9647rm -f conftest.$ac_objext
9648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9649 (eval $ac_compile) 2>&5
9650 ac_status=$?
9651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9652 (exit $ac_status); } &&
9653 { ac_try='test -s conftest.$ac_objext'
9654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9655 (eval $ac_try) 2>&5
9656 ac_status=$?
9657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9658 (exit $ac_status); }; }; then
9659 ac_header_compiler=yes
9660else
9661 echo "$as_me: failed program was:" >&5
9662cat conftest.$ac_ext >&5
9663ac_header_compiler=no
9664fi
9665rm -f conftest.$ac_objext conftest.$ac_ext
9666echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9667echo "${ECHO_T}$ac_header_compiler" >&6
9668
9669# Is the header present?
9670echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9671echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9672cat >conftest.$ac_ext <<_ACEOF
9673#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009674#include "confdefs.h"
9675#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009676_ACEOF
9677if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9678 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9679 ac_status=$?
9680 egrep -v '^ *\+' conftest.er1 >conftest.err
9681 rm -f conftest.er1
9682 cat conftest.err >&5
9683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9684 (exit $ac_status); } >/dev/null; then
9685 if test -s conftest.err; then
9686 ac_cpp_err=$ac_c_preproc_warn_flag
9687 else
9688 ac_cpp_err=
9689 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009690else
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 ac_cpp_err=yes
9692fi
9693if test -z "$ac_cpp_err"; then
9694 ac_header_preproc=yes
9695else
9696 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009697 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009699fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009700rm -f conftest.err conftest.$ac_ext
9701echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9702echo "${ECHO_T}$ac_header_preproc" >&6
9703
9704# So? What about this header?
9705case $ac_header_compiler:$ac_header_preproc in
9706 yes:no )
9707 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9708echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9709 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9710echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9711 no:yes )
9712 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9713echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9714 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9715echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9716 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9717echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9718esac
9719echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9720echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9721if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9722 echo $ECHO_N "(cached) $ECHO_C" >&6
9723else
9724 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009726echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9727echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9728
9729fi
9730if test $ac_cv_header_mach_cthreads_h = yes; then
9731 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009732#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009733_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009734
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009736#define 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öwis11437992002-04-12 09:54:03 +00009739
9740cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009741#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009742_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009743
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009744 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009745else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009746
Martin v. Löwis11437992002-04-12 09:54:03 +00009747 echo "$as_me:$LINENO: checking for --with-pth" >&5
9748echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9749
9750# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009751if test "${with_pth+set}" = set; then
9752 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009753
Martin v. Löwis11437992002-04-12 09:54:03 +00009754 echo "$as_me:$LINENO: result: $withval" >&5
9755echo "${ECHO_T}$withval" >&6
9756 cat >>confdefs.h <<\_ACEOF
9757#define WITH_THREAD 1
9758_ACEOF
9759
9760
9761cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009762#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009763_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009764
Martin v. Löwis130fb172001-07-19 11:00:41 +00009765 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009766 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009767else
Martin v. Löwis11437992002-04-12 09:54:03 +00009768
9769 echo "$as_me:$LINENO: result: no" >&5
9770echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009771
9772 # Just looking for pthread_create in libpthread is not enough:
9773 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9774 # So we really have to include pthread.h, and then link.
9775 _libs=$LIBS
9776 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9778echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9779 cat >conftest.$ac_ext <<_ACEOF
9780#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009781#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009782#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009783
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009784void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009785#ifdef F77_DUMMY_MAIN
9786# ifdef __cplusplus
9787 extern "C"
9788# endif
9789 int F77_DUMMY_MAIN() { return 1; }
9790#endif
9791int
9792main ()
9793{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009794
9795pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 ;
9797 return 0;
9798}
9799_ACEOF
9800rm -f conftest.$ac_objext conftest$ac_exeext
9801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9802 (eval $ac_link) 2>&5
9803 ac_status=$?
9804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9805 (exit $ac_status); } &&
9806 { ac_try='test -s conftest$ac_exeext'
9807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9808 (eval $ac_try) 2>&5
9809 ac_status=$?
9810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9811 (exit $ac_status); }; }; then
9812
9813 echo "$as_me:$LINENO: result: yes" >&5
9814echo "${ECHO_T}yes" >&6
9815 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009816#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009817_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009818
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009819 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009820 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009821else
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 echo "$as_me: failed program was:" >&5
9823cat conftest.$ac_ext >&5
9824
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009825 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9827echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9828if test "${ac_cv_func_pthread_detach+set}" = set; then
9829 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009830else
Martin v. Löwis11437992002-04-12 09:54:03 +00009831 cat >conftest.$ac_ext <<_ACEOF
9832#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009833#include "confdefs.h"
9834/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009836#include <assert.h>
9837/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009838#ifdef __cplusplus
9839extern "C"
9840#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009841/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 builtin and then its argument prototype would still apply. */
9843char pthread_detach ();
9844char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009845
Martin v. Löwis11437992002-04-12 09:54:03 +00009846#ifdef F77_DUMMY_MAIN
9847# ifdef __cplusplus
9848 extern "C"
9849# endif
9850 int F77_DUMMY_MAIN() { return 1; }
9851#endif
9852int
9853main ()
9854{
Guido van Rossumad678af1998-10-02 14:42:15 +00009855/* The GNU C library defines this for functions which it implements
9856 to always fail with ENOSYS. Some functions are actually named
9857 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009858#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009859choke me
9860#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009861f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009862#endif
9863
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 ;
9865 return 0;
9866}
9867_ACEOF
9868rm -f conftest.$ac_objext conftest$ac_exeext
9869if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9870 (eval $ac_link) 2>&5
9871 ac_status=$?
9872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9873 (exit $ac_status); } &&
9874 { ac_try='test -s conftest$ac_exeext'
9875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9876 (eval $ac_try) 2>&5
9877 ac_status=$?
9878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9879 (exit $ac_status); }; }; then
9880 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009881else
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 echo "$as_me: failed program was:" >&5
9883cat conftest.$ac_ext >&5
9884ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009885fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009886rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009887fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009888echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9889echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9890if test $ac_cv_func_pthread_detach = yes; then
9891 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009892#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009893_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009894
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009895 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009896 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009897else
Guido van Rossumad678af1998-10-02 14:42:15 +00009898
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009899 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9900 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9901echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9902if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9903 echo $ECHO_N "(cached) $ECHO_C" >&6
9904fi
9905echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9906echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9907else
9908 # Is the header compilable?
9909echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
9910echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
9911cat >conftest.$ac_ext <<_ACEOF
9912#line $LINENO "configure"
9913#include "confdefs.h"
9914$ac_includes_default
9915#include <atheos/threads.h>
9916_ACEOF
9917rm -f conftest.$ac_objext
9918if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9919 (eval $ac_compile) 2>&5
9920 ac_status=$?
9921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9922 (exit $ac_status); } &&
9923 { ac_try='test -s conftest.$ac_objext'
9924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9925 (eval $ac_try) 2>&5
9926 ac_status=$?
9927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9928 (exit $ac_status); }; }; then
9929 ac_header_compiler=yes
9930else
9931 echo "$as_me: failed program was:" >&5
9932cat conftest.$ac_ext >&5
9933ac_header_compiler=no
9934fi
9935rm -f conftest.$ac_objext conftest.$ac_ext
9936echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9937echo "${ECHO_T}$ac_header_compiler" >&6
9938
9939# Is the header present?
9940echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
9941echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
9942cat >conftest.$ac_ext <<_ACEOF
9943#line $LINENO "configure"
9944#include "confdefs.h"
9945#include <atheos/threads.h>
9946_ACEOF
9947if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9948 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9949 ac_status=$?
9950 egrep -v '^ *\+' conftest.er1 >conftest.err
9951 rm -f conftest.er1
9952 cat conftest.err >&5
9953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9954 (exit $ac_status); } >/dev/null; then
9955 if test -s conftest.err; then
9956 ac_cpp_err=$ac_c_preproc_warn_flag
9957 else
9958 ac_cpp_err=
9959 fi
9960else
9961 ac_cpp_err=yes
9962fi
9963if test -z "$ac_cpp_err"; then
9964 ac_header_preproc=yes
9965else
9966 echo "$as_me: failed program was:" >&5
9967 cat conftest.$ac_ext >&5
9968 ac_header_preproc=no
9969fi
9970rm -f conftest.err conftest.$ac_ext
9971echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9972echo "${ECHO_T}$ac_header_preproc" >&6
9973
9974# So? What about this header?
9975case $ac_header_compiler:$ac_header_preproc in
9976 yes:no )
9977 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9978echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9979 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9980echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9981 no:yes )
9982 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
9983echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
9984 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
9985echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
9986 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9987echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9988esac
9989echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9990echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9991if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9992 echo $ECHO_N "(cached) $ECHO_C" >&6
9993else
9994 ac_cv_header_atheos_threads_h=$ac_header_preproc
9995fi
9996echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9997echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9998
9999fi
10000if test $ac_cv_header_atheos_threads_h = yes; then
10001 cat >>confdefs.h <<\_ACEOF
10002#define WITH_THREAD 1
10003_ACEOF
10004
10005
10006cat >>confdefs.h <<\_ACEOF
10007#define ATHEOS_THREADS 1
10008_ACEOF
10009
10010 THREADOBJ="Python/thread.o"
10011else
10012
Martin v. Löwis11437992002-04-12 09:54:03 +000010013 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10014 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10015echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10016if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10017 echo $ECHO_N "(cached) $ECHO_C" >&6
10018fi
10019echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10020echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010021else
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 # Is the header compilable?
10023echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10024echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10025cat >conftest.$ac_ext <<_ACEOF
10026#line $LINENO "configure"
10027#include "confdefs.h"
10028$ac_includes_default
10029#include <kernel/OS.h>
10030_ACEOF
10031rm -f conftest.$ac_objext
10032if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10033 (eval $ac_compile) 2>&5
10034 ac_status=$?
10035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10036 (exit $ac_status); } &&
10037 { ac_try='test -s conftest.$ac_objext'
10038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10039 (eval $ac_try) 2>&5
10040 ac_status=$?
10041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10042 (exit $ac_status); }; }; then
10043 ac_header_compiler=yes
10044else
10045 echo "$as_me: failed program was:" >&5
10046cat conftest.$ac_ext >&5
10047ac_header_compiler=no
10048fi
10049rm -f conftest.$ac_objext conftest.$ac_ext
10050echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10051echo "${ECHO_T}$ac_header_compiler" >&6
10052
10053# Is the header present?
10054echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10055echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10056cat >conftest.$ac_ext <<_ACEOF
10057#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010058#include "confdefs.h"
10059#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010060_ACEOF
10061if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10062 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10063 ac_status=$?
10064 egrep -v '^ *\+' conftest.er1 >conftest.err
10065 rm -f conftest.er1
10066 cat conftest.err >&5
10067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10068 (exit $ac_status); } >/dev/null; then
10069 if test -s conftest.err; then
10070 ac_cpp_err=$ac_c_preproc_warn_flag
10071 else
10072 ac_cpp_err=
10073 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010074else
Martin v. Löwis11437992002-04-12 09:54:03 +000010075 ac_cpp_err=yes
10076fi
10077if test -z "$ac_cpp_err"; then
10078 ac_header_preproc=yes
10079else
10080 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010081 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010082 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010084rm -f conftest.err conftest.$ac_ext
10085echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10086echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010087
Martin v. Löwis11437992002-04-12 09:54:03 +000010088# So? What about this header?
10089case $ac_header_compiler:$ac_header_preproc in
10090 yes:no )
10091 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10092echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10093 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10094echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10095 no:yes )
10096 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10097echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10098 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10099echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10100 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10101echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10102esac
10103echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10104echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10105if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10106 echo $ECHO_N "(cached) $ECHO_C" >&6
10107else
10108 ac_cv_header_kernel_OS_h=$ac_header_preproc
10109fi
10110echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10111echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10112
10113fi
10114if test $ac_cv_header_kernel_OS_h = yes; then
10115 cat >>confdefs.h <<\_ACEOF
10116#define WITH_THREAD 1
10117_ACEOF
10118
10119
10120cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010121#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010122_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010123
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010124 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010125else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010126
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10128echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10129if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10130 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010131else
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010133LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010134cat >conftest.$ac_ext <<_ACEOF
10135#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010136#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010137
Greg Steinadf63d62000-07-05 10:38:09 +000010138/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010139#ifdef __cplusplus
10140extern "C"
10141#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010142/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010143 builtin and then its argument prototype would still apply. */
10144char pthread_create ();
10145#ifdef F77_DUMMY_MAIN
10146# ifdef __cplusplus
10147 extern "C"
10148# endif
10149 int F77_DUMMY_MAIN() { return 1; }
10150#endif
10151int
10152main ()
10153{
10154pthread_create ();
10155 ;
10156 return 0;
10157}
10158_ACEOF
10159rm -f conftest.$ac_objext conftest$ac_exeext
10160if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10161 (eval $ac_link) 2>&5
10162 ac_status=$?
10163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10164 (exit $ac_status); } &&
10165 { ac_try='test -s conftest$ac_exeext'
10166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10167 (eval $ac_try) 2>&5
10168 ac_status=$?
10169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10170 (exit $ac_status); }; }; then
10171 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010172else
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 echo "$as_me: failed program was:" >&5
10174cat conftest.$ac_ext >&5
10175ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010176fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010177rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10178LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010179fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010180echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10181echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10182if test $ac_cv_lib_pthreads_pthread_create = yes; then
10183 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010184#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010185_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010186
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010187 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010188 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010189 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010190else
Greg Steinadf63d62000-07-05 10:38:09 +000010191
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10193echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10194if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10195 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010196else
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010198LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010199cat >conftest.$ac_ext <<_ACEOF
10200#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010201#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010202
Guido van Rossum49545951997-12-02 19:28:29 +000010203/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010204#ifdef __cplusplus
10205extern "C"
10206#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010207/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 builtin and then its argument prototype would still apply. */
10209char pthread_create ();
10210#ifdef F77_DUMMY_MAIN
10211# ifdef __cplusplus
10212 extern "C"
10213# endif
10214 int F77_DUMMY_MAIN() { return 1; }
10215#endif
10216int
10217main ()
10218{
10219pthread_create ();
10220 ;
10221 return 0;
10222}
10223_ACEOF
10224rm -f conftest.$ac_objext conftest$ac_exeext
10225if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10226 (eval $ac_link) 2>&5
10227 ac_status=$?
10228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10229 (exit $ac_status); } &&
10230 { ac_try='test -s conftest$ac_exeext'
10231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10232 (eval $ac_try) 2>&5
10233 ac_status=$?
10234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10235 (exit $ac_status); }; }; then
10236 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010237else
Martin v. Löwis11437992002-04-12 09:54:03 +000010238 echo "$as_me: failed program was:" >&5
10239cat conftest.$ac_ext >&5
10240ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010241fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010242rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10243LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010244fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010245echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10246echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10247if test $ac_cv_lib_c_r_pthread_create = yes; then
10248 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010249#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010250_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010251
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010252 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010253 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010254 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010255else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010256
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10258echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10259if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10260 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010261else
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010263LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010264cat >conftest.$ac_ext <<_ACEOF
10265#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010266#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010267
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010268/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010269#ifdef __cplusplus
10270extern "C"
10271#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010272/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 builtin and then its argument prototype would still apply. */
10274char __d6_pthread_create ();
10275#ifdef F77_DUMMY_MAIN
10276# ifdef __cplusplus
10277 extern "C"
10278# endif
10279 int F77_DUMMY_MAIN() { return 1; }
10280#endif
10281int
10282main ()
10283{
10284__d6_pthread_create ();
10285 ;
10286 return 0;
10287}
10288_ACEOF
10289rm -f conftest.$ac_objext conftest$ac_exeext
10290if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10291 (eval $ac_link) 2>&5
10292 ac_status=$?
10293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10294 (exit $ac_status); } &&
10295 { ac_try='test -s conftest$ac_exeext'
10296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10297 (eval $ac_try) 2>&5
10298 ac_status=$?
10299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10300 (exit $ac_status); }; }; then
10301 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010302else
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 echo "$as_me: failed program was:" >&5
10304cat conftest.$ac_ext >&5
10305ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010306fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010307rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10308LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010310echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10311echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10312if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10313 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010314#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010315_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010316
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010317 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010318 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010319 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010320else
Guido van Rossum49545951997-12-02 19:28:29 +000010321
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10323echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10324if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10325 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010326else
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010328LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010329cat >conftest.$ac_ext <<_ACEOF
10330#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010331#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010332
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010333/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010334#ifdef __cplusplus
10335extern "C"
10336#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010337/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 builtin and then its argument prototype would still apply. */
10339char __pthread_create_system ();
10340#ifdef F77_DUMMY_MAIN
10341# ifdef __cplusplus
10342 extern "C"
10343# endif
10344 int F77_DUMMY_MAIN() { return 1; }
10345#endif
10346int
10347main ()
10348{
10349__pthread_create_system ();
10350 ;
10351 return 0;
10352}
10353_ACEOF
10354rm -f conftest.$ac_objext conftest$ac_exeext
10355if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10356 (eval $ac_link) 2>&5
10357 ac_status=$?
10358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10359 (exit $ac_status); } &&
10360 { ac_try='test -s conftest$ac_exeext'
10361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10362 (eval $ac_try) 2>&5
10363 ac_status=$?
10364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10365 (exit $ac_status); }; }; then
10366 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010367else
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 echo "$as_me: failed program was:" >&5
10369cat conftest.$ac_ext >&5
10370ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010371fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010372rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10373LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010374fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010375echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10376echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10377if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10378 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010379#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010380_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010381
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010382 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010383 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010384 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010385else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010386
Martin v. Löwis11437992002-04-12 09:54:03 +000010387 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10388echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10389if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10390 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010391else
Martin v. Löwis11437992002-04-12 09:54:03 +000010392 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010393LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010394cat >conftest.$ac_ext <<_ACEOF
10395#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010396#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010397
Guido van Rossumb93a8621998-05-07 13:27:32 +000010398/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010399#ifdef __cplusplus
10400extern "C"
10401#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010402/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 builtin and then its argument prototype would still apply. */
10404char pthread_create ();
10405#ifdef F77_DUMMY_MAIN
10406# ifdef __cplusplus
10407 extern "C"
10408# endif
10409 int F77_DUMMY_MAIN() { return 1; }
10410#endif
10411int
10412main ()
10413{
10414pthread_create ();
10415 ;
10416 return 0;
10417}
10418_ACEOF
10419rm -f conftest.$ac_objext conftest$ac_exeext
10420if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10421 (eval $ac_link) 2>&5
10422 ac_status=$?
10423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10424 (exit $ac_status); } &&
10425 { ac_try='test -s conftest$ac_exeext'
10426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10427 (eval $ac_try) 2>&5
10428 ac_status=$?
10429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10430 (exit $ac_status); }; }; then
10431 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010432else
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 echo "$as_me: failed program was:" >&5
10434cat conftest.$ac_ext >&5
10435ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010436fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010437rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10438LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010440echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10441echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10442if test $ac_cv_lib_cma_pthread_create = yes; then
10443 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010444#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010445_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010446
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010447 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010448 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010449 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010450else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010451
Martin v. Löwis130fb172001-07-19 11:00:41 +000010452 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010453fi
10454
Guido van Rossum627b2d71993-12-24 10:39:16 +000010455
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010456fi
10457
Guido van Rossum0be3e491997-05-22 20:33:33 +000010458fi
10459
Guido van Rossum49545951997-12-02 19:28:29 +000010460fi
10461
Guido van Rossumb93a8621998-05-07 13:27:32 +000010462fi
10463
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010464fi
10465
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010466
Michael W. Hudson54241132001-12-07 15:38:26 +000010467fi
10468
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010469
10470fi
10471
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010472fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010473rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10474fi;
10475fi
10476
10477
10478fi
10479
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010480
Michael W. Hudson54241132001-12-07 15:38:26 +000010481
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010482 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010483 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010484
10485cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010486#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010487_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010488
10489 fi
10490
Martin v. Löwis11437992002-04-12 09:54:03 +000010491 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10492echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10493 if test "${ac_cv_pthread_system_supported+set}" = set; then
10494 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010495else
10496 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010497 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010498else
Martin v. Löwis11437992002-04-12 09:54:03 +000010499 cat >conftest.$ac_ext <<_ACEOF
10500#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010501#include "confdefs.h"
10502#include <pthread.h>
10503 void *foo(void *parm) {
10504 return NULL;
10505 }
10506 main() {
10507 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010508 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010509 if (pthread_attr_init(&attr)) exit(-1);
10510 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010511 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010512 exit(0);
10513 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010514_ACEOF
10515rm -f conftest$ac_exeext
10516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10517 (eval $ac_link) 2>&5
10518 ac_status=$?
10519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10522 (eval $ac_try) 2>&5
10523 ac_status=$?
10524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10525 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010526 ac_cv_pthread_system_supported=yes
10527else
Martin v. Löwis11437992002-04-12 09:54:03 +000010528 echo "$as_me: program exited with status $ac_status" >&5
10529echo "$as_me: failed program was:" >&5
10530cat conftest.$ac_ext >&5
10531( exit $ac_status )
10532ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010533fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010534rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010535fi
10536
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010537fi
10538
Martin v. Löwis11437992002-04-12 09:54:03 +000010539 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10540echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010541 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010542
10543cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010544#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010545_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010546
10547 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010548
10549for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010550do
Martin v. Löwis11437992002-04-12 09:54:03 +000010551as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10552echo "$as_me:$LINENO: checking for $ac_func" >&5
10553echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10554if eval "test \"\${$as_ac_var+set}\" = set"; then
10555 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010556else
Martin v. Löwis11437992002-04-12 09:54:03 +000010557 cat >conftest.$ac_ext <<_ACEOF
10558#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010559#include "confdefs.h"
10560/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010561 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010562#include <assert.h>
10563/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010564#ifdef __cplusplus
10565extern "C"
10566#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010567/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010568 builtin and then its argument prototype would still apply. */
10569char $ac_func ();
10570char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010571
Martin v. Löwis11437992002-04-12 09:54:03 +000010572#ifdef F77_DUMMY_MAIN
10573# ifdef __cplusplus
10574 extern "C"
10575# endif
10576 int F77_DUMMY_MAIN() { return 1; }
10577#endif
10578int
10579main ()
10580{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010581/* The GNU C library defines this for functions which it implements
10582 to always fail with ENOSYS. Some functions are actually named
10583 something starting with __ and the normal name is an alias. */
10584#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10585choke me
10586#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010587f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010588#endif
10589
Martin v. Löwis11437992002-04-12 09:54:03 +000010590 ;
10591 return 0;
10592}
10593_ACEOF
10594rm -f conftest.$ac_objext conftest$ac_exeext
10595if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10596 (eval $ac_link) 2>&5
10597 ac_status=$?
10598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10599 (exit $ac_status); } &&
10600 { ac_try='test -s conftest$ac_exeext'
10601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10602 (eval $ac_try) 2>&5
10603 ac_status=$?
10604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10605 (exit $ac_status); }; }; then
10606 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010607else
Martin v. Löwis11437992002-04-12 09:54:03 +000010608 echo "$as_me: failed program was:" >&5
10609cat conftest.$ac_ext >&5
10610eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010611fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010612rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010613fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010614echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10615echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10616if test `eval echo '${'$as_ac_var'}'` = yes; then
10617 cat >>confdefs.h <<_ACEOF
10618#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10619_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010620
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010621fi
10622done
10623
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010624 fi
10625
Martin v. Löwis11437992002-04-12 09:54:03 +000010626 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10627echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10628if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10629 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010630else
Martin v. Löwis11437992002-04-12 09:54:03 +000010631 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010632LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010633cat >conftest.$ac_ext <<_ACEOF
10634#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010635#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010636
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010637/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010638#ifdef __cplusplus
10639extern "C"
10640#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010641/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010642 builtin and then its argument prototype would still apply. */
10643char usconfig ();
10644#ifdef F77_DUMMY_MAIN
10645# ifdef __cplusplus
10646 extern "C"
10647# endif
10648 int F77_DUMMY_MAIN() { return 1; }
10649#endif
10650int
10651main ()
10652{
10653usconfig ();
10654 ;
10655 return 0;
10656}
10657_ACEOF
10658rm -f conftest.$ac_objext conftest$ac_exeext
10659if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10660 (eval $ac_link) 2>&5
10661 ac_status=$?
10662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10663 (exit $ac_status); } &&
10664 { ac_try='test -s conftest$ac_exeext'
10665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10666 (eval $ac_try) 2>&5
10667 ac_status=$?
10668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10669 (exit $ac_status); }; }; then
10670 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010671else
Martin v. Löwis11437992002-04-12 09:54:03 +000010672 echo "$as_me: failed program was:" >&5
10673cat conftest.$ac_ext >&5
10674ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010676rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10677LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010678fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010679echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10680echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10681if test $ac_cv_lib_mpc_usconfig = yes; then
10682 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010683#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010684_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010685
Martin v. Löwis130fb172001-07-19 11:00:41 +000010686 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010687 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010688 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010689fi
10690
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010691
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 if test $posix_threads != "yes"; then
10693 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10694echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10695if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010697else
Martin v. Löwis11437992002-04-12 09:54:03 +000010698 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010699LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010700cat >conftest.$ac_ext <<_ACEOF
10701#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010702#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010703
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010704/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010705#ifdef __cplusplus
10706extern "C"
10707#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010708/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 builtin and then its argument prototype would still apply. */
10710char thr_create ();
10711#ifdef F77_DUMMY_MAIN
10712# ifdef __cplusplus
10713 extern "C"
10714# endif
10715 int F77_DUMMY_MAIN() { return 1; }
10716#endif
10717int
10718main ()
10719{
10720thr_create ();
10721 ;
10722 return 0;
10723}
10724_ACEOF
10725rm -f conftest.$ac_objext conftest$ac_exeext
10726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10727 (eval $ac_link) 2>&5
10728 ac_status=$?
10729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10730 (exit $ac_status); } &&
10731 { ac_try='test -s conftest$ac_exeext'
10732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10733 (eval $ac_try) 2>&5
10734 ac_status=$?
10735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10736 (exit $ac_status); }; }; then
10737 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010738else
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 echo "$as_me: failed program was:" >&5
10740cat conftest.$ac_ext >&5
10741ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010743rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10744LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010745fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010746echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10747echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10748if test $ac_cv_lib_thread_thr_create = yes; then
10749 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010750#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010751_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010752
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010753 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010754 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010755 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010756fi
10757
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010758 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010759
Martin v. Löwis130fb172001-07-19 11:00:41 +000010760 if test "$USE_THREAD_MODULE" != "#"
10761 then
10762 # If the above checks didn't disable threads, (at least) OSF1
10763 # needs this '-threads' argument during linking.
10764 case $ac_sys_system in
10765 OSF1) LDLAST=-threads;;
10766 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010767 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010768fi
10769
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010771
10772
10773echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10774echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010775# Check whether --enable-ipv6 or --disable-ipv6 was given.
10776if test "${enable_ipv6+set}" = set; then
10777 enableval="$enable_ipv6"
10778 case "$enableval" in
10779 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010780 echo "$as_me:$LINENO: result: no" >&5
10781echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782 ipv6=no
10783 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010784 *) echo "$as_me:$LINENO: result: yes" >&5
10785echo "${ECHO_T}yes" >&6
10786 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010788_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789
10790 ipv6=yes
10791 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010792 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793else
Martin v. Löwis11437992002-04-12 09:54:03 +000010794
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010796 echo "$as_me:$LINENO: result: no" >&5
10797echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798 ipv6=no
10799
10800else
Martin v. Löwis11437992002-04-12 09:54:03 +000010801 cat >conftest.$ac_ext <<_ACEOF
10802#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010803#include "confdefs.h"
10804 /* AF_INET6 available check */
10805#include <sys/types.h>
10806#include <sys/socket.h>
10807main()
10808{
10809 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10810 exit(1);
10811 else
10812 exit(0);
10813}
10814
Martin v. Löwis11437992002-04-12 09:54:03 +000010815_ACEOF
10816rm -f conftest$ac_exeext
10817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10818 (eval $ac_link) 2>&5
10819 ac_status=$?
10820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10821 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10823 (eval $ac_try) 2>&5
10824 ac_status=$?
10825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10826 (exit $ac_status); }; }; then
10827 echo "$as_me:$LINENO: result: yes" >&5
10828echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829 ipv6=yes
10830else
Martin v. Löwis11437992002-04-12 09:54:03 +000010831 echo "$as_me: program exited with status $ac_status" >&5
10832echo "$as_me: failed program was:" >&5
10833cat conftest.$ac_ext >&5
10834( exit $ac_status )
10835echo "$as_me:$LINENO: result: no" >&5
10836echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837 ipv6=no
10838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010839rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840fi
10841
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010842if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010843 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10844echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10845 cat >conftest.$ac_ext <<_ACEOF
10846#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010847#include "confdefs.h"
10848#include <sys/types.h>
10849#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010850#ifdef F77_DUMMY_MAIN
10851# ifdef __cplusplus
10852 extern "C"
10853# endif
10854 int F77_DUMMY_MAIN() { return 1; }
10855#endif
10856int
10857main ()
10858{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010859struct sockaddr_in6 x;
10860x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010861 ;
10862 return 0;
10863}
10864_ACEOF
10865rm -f conftest.$ac_objext
10866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10867 (eval $ac_compile) 2>&5
10868 ac_status=$?
10869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10870 (exit $ac_status); } &&
10871 { ac_try='test -s conftest.$ac_objext'
10872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10873 (eval $ac_try) 2>&5
10874 ac_status=$?
10875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10876 (exit $ac_status); }; }; then
10877 echo "$as_me:$LINENO: result: yes" >&5
10878echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010879 ipv6=yes
10880else
Martin v. Löwis11437992002-04-12 09:54:03 +000010881 echo "$as_me: failed program was:" >&5
10882cat conftest.$ac_ext >&5
10883echo "$as_me:$LINENO: result: no" >&5
10884echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010885 ipv6=no
10886fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010887rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010888fi
10889
10890if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010892#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010893_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010894
10895fi
10896
Martin v. Löwis11437992002-04-12 09:54:03 +000010897fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898
10899ipv6type=unknown
10900ipv6lib=none
10901ipv6trylibc=no
10902
10903if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010904 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10905echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010906 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10907 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010908 case $i in
10909 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010910 cat >conftest.$ac_ext <<_ACEOF
10911#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010913
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010914#include <netinet/in.h>
10915#ifdef IPV6_INRIA_VERSION
10916yes
10917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010918_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10920 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010921 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010922fi
10923rm -f conftest*
10924
10925 ;;
10926 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010927 cat >conftest.$ac_ext <<_ACEOF
10928#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010929#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010930
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931#include <netinet/in.h>
10932#ifdef __KAME__
10933yes
10934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010935_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10937 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010938 ipv6type=$i;
10939 ipv6lib=inet6
10940 ipv6libdir=/usr/local/v6/lib
10941 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010942fi
10943rm -f conftest*
10944
10945 ;;
10946 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010947 cat >conftest.$ac_ext <<_ACEOF
10948#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010949#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010950
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010951#include <features.h>
10952#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10953yes
10954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010955_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10957 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010958 ipv6type=$i;
10959 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010960fi
10961rm -f conftest*
10962
10963 ;;
10964 linux-inet6)
10965 if test -d /usr/inet6; then
10966 ipv6type=$i
10967 ipv6lib=inet6
10968 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010969 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010970 fi
10971 ;;
10972 solaris)
10973 if test -f /etc/netconfig; then
10974 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10975 ipv6type=$i
10976 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010977 fi
10978 fi
10979 ;;
10980 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010981 cat >conftest.$ac_ext <<_ACEOF
10982#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010983#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010984
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010985#include <sys/param.h>
10986#ifdef _TOSHIBA_INET6
10987yes
10988#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010989_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10991 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010992 ipv6type=$i;
10993 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010994 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010995fi
10996rm -f conftest*
10997
10998 ;;
10999 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011000 cat >conftest.$ac_ext <<_ACEOF
11001#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011002#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011003
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011004#include </usr/local/v6/include/sys/v6config.h>
11005#ifdef __V6D__
11006yes
11007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011008_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011009if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11010 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011011 ipv6type=$i;
11012 ipv6lib=v6;
11013 ipv6libdir=/usr/local/v6/lib;
11014 OPT="-I/usr/local/v6/include $OPT"
11015fi
11016rm -f conftest*
11017
11018 ;;
11019 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011020 cat >conftest.$ac_ext <<_ACEOF
11021#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011022#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011023
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011024#include <sys/param.h>
11025#ifdef _ZETA_MINAMI_INET6
11026yes
11027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011028_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11030 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011031 ipv6type=$i;
11032 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011033 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011034fi
11035rm -f conftest*
11036
11037 ;;
11038 esac
11039 if test "$ipv6type" != "unknown"; then
11040 break
11041 fi
11042 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011043 echo "$as_me:$LINENO: result: $ipv6type" >&5
11044echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011045fi
11046
11047if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11048 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11049 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11050 echo "using lib$ipv6lib"
11051 else
11052 if test $ipv6trylibc = "yes"; then
11053 echo "using libc"
11054 else
11055 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11056 echo "You need to fetch lib$ipv6lib.a from appropriate"
11057 echo 'ipv6 kit and compile beforehand.'
11058 exit 1
11059 fi
11060 fi
11061fi
11062
Barry Warsawef82cd72000-06-30 16:21:01 +000011063# Check for GC support
Martin v. Löwis11437992002-04-12 09:54:03 +000011064echo "$as_me:$LINENO: checking for --with-cycle-gc" >&5
11065echo $ECHO_N "checking for --with-cycle-gc... $ECHO_C" >&6
11066
Barry Warsawef82cd72000-06-30 16:21:01 +000011067# Check whether --with-cycle-gc or --without-cycle-gc was given.
11068if test "${with_cycle_gc+set}" = set; then
11069 withval="$with_cycle_gc"
Barry Warsawef82cd72000-06-30 16:21:01 +000011070
Martin v. Löwis11437992002-04-12 09:54:03 +000011071fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011072
11073if test -z "$with_cycle_gc"
11074then with_cycle_gc="yes"
11075fi
Neil Schemenauercf229462001-08-29 23:58:47 +000011076if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +000011077then
Martin v. Löwis11437992002-04-12 09:54:03 +000011078
11079cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011080#define WITH_CYCLE_GC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011081_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011082
11083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011084echo "$as_me:$LINENO: result: $with_cycle_gc" >&5
11085echo "${ECHO_T}$with_cycle_gc" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011086
Jack Jansen7b8c7542002-04-14 20:12:41 +000011087# Check for universal newline support
11088echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
11089echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
11090
11091# Check whether --with-universal-newlines or --without-universal-newlines was given.
11092if test "${with_universal_newlines+set}" = set; then
11093 withval="$with_universal_newlines"
11094
11095fi;
11096
11097if test -z "$with_universal_newlines"
11098then with_universal_newlines="yes"
11099fi
11100if test "$with_universal_newlines" != "no"
11101then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011102
11103cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011104#define WITH_UNIVERSAL_NEWLINES 1
11105_ACEOF
11106
11107fi
11108echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11109echo "${ECHO_T}$with_universal_newlines" >&6
11110
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011111# Check for --with-doc-strings
11112echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11113echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11114
11115# Check whether --with-doc-strings or --without-doc-strings was given.
11116if test "${with_doc_strings+set}" = set; then
11117 withval="$with_doc_strings"
11118
11119fi;
11120
11121if test -z "$with_doc_strings"
11122then with_doc_strings="yes"
11123fi
11124if test "$with_doc_strings" != "no"
11125then
11126
11127cat >>confdefs.h <<\_ACEOF
11128#define WITH_DOC_STRINGS 1
11129_ACEOF
11130
11131fi
11132echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11133echo "${ECHO_T}$with_doc_strings" >&6
11134
Neil Schemenauera35c6882001-02-27 04:45:05 +000011135# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011136echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11137echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11138
Neil Schemenauera35c6882001-02-27 04:45:05 +000011139# Check whether --with-pymalloc or --without-pymalloc was given.
11140if test "${with_pymalloc+set}" = set; then
11141 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011142
Martin v. Löwis11437992002-04-12 09:54:03 +000011143fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011144
Neil Schemenauer16c22972002-03-22 15:34:49 +000011145if test -z "$with_pymalloc"
11146then with_pymalloc="yes"
11147fi
11148if test "$with_pymalloc" != "no"
11149then
Martin v. Löwis11437992002-04-12 09:54:03 +000011150
11151cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011152#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011153_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011154
11155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011156echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11157echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011158
Barry Warsawef82cd72000-06-30 16:21:01 +000011159# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011160echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11161echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11162
Barry Warsawef82cd72000-06-30 16:21:01 +000011163# Check whether --with-wctype-functions or --without-wctype-functions was given.
11164if test "${with_wctype_functions+set}" = set; then
11165 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011166
Barry Warsawef82cd72000-06-30 16:21:01 +000011167if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011168then
11169
11170cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011171#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011172_ACEOF
11173
11174 echo "$as_me:$LINENO: result: yes" >&5
11175echo "${ECHO_T}yes" >&6
11176else echo "$as_me:$LINENO: result: no" >&5
11177echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011178fi
11179else
Martin v. Löwis11437992002-04-12 09:54:03 +000011180 echo "$as_me:$LINENO: result: no" >&5
11181echo "${ECHO_T}no" >&6
11182fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011183
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011184# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011185
Guido van Rossum98935bf2001-09-05 19:13:16 +000011186DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011187
Martin v. Löwis11437992002-04-12 09:54:03 +000011188echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11189echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11190
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011191# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011192if test "${with_sgi_dl+set}" = set; then
11193 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011194
11195echo "$as_me:$LINENO: result: $withval" >&5
11196echo "${ECHO_T}$withval" >&6
11197
11198cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011199#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011200_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011201
Guido van Rossume97ee181999-12-20 21:27:22 +000011202DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011203dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011204if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011205then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011206else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11207echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11208 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011209fi
11210DLINCLDIR=${dldir}
11211LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011212else
Martin v. Löwis11437992002-04-12 09:54:03 +000011213 echo "$as_me:$LINENO: result: no" >&5
11214echo "${ECHO_T}no" >&6
11215fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011216
Martin v. Löwis11437992002-04-12 09:54:03 +000011217echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11218echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011219
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011220# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011221if test "${with_dl_dld+set}" = set; then
11222 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011223
11224echo "$as_me:$LINENO: result: $withval" >&5
11225echo "${ECHO_T}$withval" >&6
11226
11227cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011228#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011229_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011230
Guido van Rossume97ee181999-12-20 21:27:22 +000011231DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011232dldir=`echo "$withval" | sed 's/,.*//'`
11233dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011234if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011235then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011236else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11237echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11238 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011239fi
11240DLINCLDIR=${dldir}
11241LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011242else
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 echo "$as_me:$LINENO: result: no" >&5
11244echo "${ECHO_T}no" >&6
11245fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011246
Guido van Rossume97ee181999-12-20 21:27:22 +000011247# the dlopen() function means we might want to use dynload_shlib.o. some
11248# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011249
Thomas Wouters3a584202000-08-05 23:28:51 +000011250for ac_func in dlopen
11251do
Martin v. Löwis11437992002-04-12 09:54:03 +000011252as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11253echo "$as_me:$LINENO: checking for $ac_func" >&5
11254echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11255if eval "test \"\${$as_ac_var+set}\" = set"; then
11256 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011257else
Martin v. Löwis11437992002-04-12 09:54:03 +000011258 cat >conftest.$ac_ext <<_ACEOF
11259#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011260#include "confdefs.h"
11261/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011263#include <assert.h>
11264/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011265#ifdef __cplusplus
11266extern "C"
11267#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011268/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 builtin and then its argument prototype would still apply. */
11270char $ac_func ();
11271char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011272
Martin v. Löwis11437992002-04-12 09:54:03 +000011273#ifdef F77_DUMMY_MAIN
11274# ifdef __cplusplus
11275 extern "C"
11276# endif
11277 int F77_DUMMY_MAIN() { return 1; }
11278#endif
11279int
11280main ()
11281{
Guido van Rossume97ee181999-12-20 21:27:22 +000011282/* The GNU C library defines this for functions which it implements
11283 to always fail with ENOSYS. Some functions are actually named
11284 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011285#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011286choke me
11287#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011288f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011289#endif
11290
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 ;
11292 return 0;
11293}
11294_ACEOF
11295rm -f conftest.$ac_objext conftest$ac_exeext
11296if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11297 (eval $ac_link) 2>&5
11298 ac_status=$?
11299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11300 (exit $ac_status); } &&
11301 { ac_try='test -s conftest$ac_exeext'
11302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11303 (eval $ac_try) 2>&5
11304 ac_status=$?
11305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11306 (exit $ac_status); }; }; then
11307 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011308else
Martin v. Löwis11437992002-04-12 09:54:03 +000011309 echo "$as_me: failed program was:" >&5
11310cat conftest.$ac_ext >&5
11311eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011312fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011313rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011314fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011315echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11316echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11317if test `eval echo '${'$as_ac_var'}'` = yes; then
11318 cat >>confdefs.h <<_ACEOF
11319#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11320_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011321
Guido van Rossume97ee181999-12-20 21:27:22 +000011322fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011323done
Guido van Rossume97ee181999-12-20 21:27:22 +000011324
Michael W. Hudson54241132001-12-07 15:38:26 +000011325
Guido van Rossume97ee181999-12-20 21:27:22 +000011326# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11327# loading of modules.
11328
Martin v. Löwis11437992002-04-12 09:54:03 +000011329echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11330echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011331if test -z "$DYNLOADFILE"
11332then
11333 case $ac_sys_system/$ac_sys_release in
11334 AIX*) DYNLOADFILE="dynload_aix.o";;
11335 BeOS*) DYNLOADFILE="dynload_beos.o";;
11336 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011337 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011338 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011339 *)
11340 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11341 # out any dynamic loading
11342 if test "$ac_cv_func_dlopen" = yes
11343 then DYNLOADFILE="dynload_shlib.o"
11344 else DYNLOADFILE="dynload_stub.o"
11345 fi
11346 ;;
11347 esac
11348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011349echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11350echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011351if test "$DYNLOADFILE" != "dynload_stub.o"
11352then
Martin v. Löwis11437992002-04-12 09:54:03 +000011353
11354cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011355#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011356_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011357
11358fi
11359
Neil Schemenauer4e425612001-06-19 15:44:15 +000011360# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11361
Michael W. Hudson54241132001-12-07 15:38:26 +000011362
Martin v. Löwis11437992002-04-12 09:54:03 +000011363echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11364echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011365if test -z "$MACHDEP_OBJS"
11366then
Jack Jansene578a632001-08-15 01:27:14 +000011367 MACHDEP_OBJS=$extra_machdep_objs
11368else
11369 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011370fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011371echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11372echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011373
Guido van Rossum627b2d71993-12-24 10:39:16 +000011374# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011375
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
11443
11444
11445
11446
11447
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011448
Fred Drake6b3cc522002-04-15 19:20:27 +000011449
Martin v. Löwis244edc82001-10-04 22:44:26 +000011450for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011451 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +000011452 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011453 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011454 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011455 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011456 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011457 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011458 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011459 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011460 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011461do
Martin v. Löwis11437992002-04-12 09:54:03 +000011462as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11463echo "$as_me:$LINENO: checking for $ac_func" >&5
11464echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11465if eval "test \"\${$as_ac_var+set}\" = set"; then
11466 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011467else
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 cat >conftest.$ac_ext <<_ACEOF
11469#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011470#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011471/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011472 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011473#include <assert.h>
11474/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011475#ifdef __cplusplus
11476extern "C"
11477#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011478/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011479 builtin and then its argument prototype would still apply. */
11480char $ac_func ();
11481char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011482
Martin v. Löwis11437992002-04-12 09:54:03 +000011483#ifdef F77_DUMMY_MAIN
11484# ifdef __cplusplus
11485 extern "C"
11486# endif
11487 int F77_DUMMY_MAIN() { return 1; }
11488#endif
11489int
11490main ()
11491{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011492/* The GNU C library defines this for functions which it implements
11493 to always fail with ENOSYS. Some functions are actually named
11494 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011495#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011496choke me
11497#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011498f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011499#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011500
Martin v. Löwis11437992002-04-12 09:54:03 +000011501 ;
11502 return 0;
11503}
11504_ACEOF
11505rm -f conftest.$ac_objext conftest$ac_exeext
11506if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11507 (eval $ac_link) 2>&5
11508 ac_status=$?
11509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11510 (exit $ac_status); } &&
11511 { ac_try='test -s conftest$ac_exeext'
11512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11513 (eval $ac_try) 2>&5
11514 ac_status=$?
11515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11516 (exit $ac_status); }; }; then
11517 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011518else
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 echo "$as_me: failed program was:" >&5
11520cat conftest.$ac_ext >&5
11521eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011522fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011523rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011525echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11526echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11527if test `eval echo '${'$as_ac_var'}'` = yes; then
11528 cat >>confdefs.h <<_ACEOF
11529#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11530_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011531
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011532fi
11533done
11534
Michael W. Hudson54241132001-12-07 15:38:26 +000011535
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011536# check for openpty and forkpty
11537
Martin v. Löwis11437992002-04-12 09:54:03 +000011538
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011539for ac_func in openpty
11540do
Martin v. Löwis11437992002-04-12 09:54:03 +000011541as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11542echo "$as_me:$LINENO: checking for $ac_func" >&5
11543echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11544if eval "test \"\${$as_ac_var+set}\" = set"; then
11545 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011546else
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 cat >conftest.$ac_ext <<_ACEOF
11548#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011549#include "confdefs.h"
11550/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011552#include <assert.h>
11553/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011554#ifdef __cplusplus
11555extern "C"
11556#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011557/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011558 builtin and then its argument prototype would still apply. */
11559char $ac_func ();
11560char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011561
Martin v. Löwis11437992002-04-12 09:54:03 +000011562#ifdef F77_DUMMY_MAIN
11563# ifdef __cplusplus
11564 extern "C"
11565# endif
11566 int F77_DUMMY_MAIN() { return 1; }
11567#endif
11568int
11569main ()
11570{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011571/* The GNU C library defines this for functions which it implements
11572 to always fail with ENOSYS. Some functions are actually named
11573 something starting with __ and the normal name is an alias. */
11574#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11575choke me
11576#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011577f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011578#endif
11579
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 ;
11581 return 0;
11582}
11583_ACEOF
11584rm -f conftest.$ac_objext conftest$ac_exeext
11585if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11586 (eval $ac_link) 2>&5
11587 ac_status=$?
11588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11589 (exit $ac_status); } &&
11590 { ac_try='test -s conftest$ac_exeext'
11591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11592 (eval $ac_try) 2>&5
11593 ac_status=$?
11594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11595 (exit $ac_status); }; }; then
11596 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011597else
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 echo "$as_me: failed program was:" >&5
11599cat conftest.$ac_ext >&5
11600eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011601fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011602rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011603fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011604echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11605echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11606if test `eval echo '${'$as_ac_var'}'` = yes; then
11607 cat >>confdefs.h <<_ACEOF
11608#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11609_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011610
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011611else
Martin v. Löwis11437992002-04-12 09:54:03 +000011612 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11613echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11614if test "${ac_cv_lib_util_openpty+set}" = set; then
11615 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011616else
Martin v. Löwis11437992002-04-12 09:54:03 +000011617 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011618LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011619cat >conftest.$ac_ext <<_ACEOF
11620#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011621#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011622
Fred Drake8cef4cf2000-06-28 16:40:38 +000011623/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011624#ifdef __cplusplus
11625extern "C"
11626#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011627/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011628 builtin and then its argument prototype would still apply. */
11629char openpty ();
11630#ifdef F77_DUMMY_MAIN
11631# ifdef __cplusplus
11632 extern "C"
11633# endif
11634 int F77_DUMMY_MAIN() { return 1; }
11635#endif
11636int
11637main ()
11638{
11639openpty ();
11640 ;
11641 return 0;
11642}
11643_ACEOF
11644rm -f conftest.$ac_objext conftest$ac_exeext
11645if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11646 (eval $ac_link) 2>&5
11647 ac_status=$?
11648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11649 (exit $ac_status); } &&
11650 { ac_try='test -s conftest$ac_exeext'
11651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11652 (eval $ac_try) 2>&5
11653 ac_status=$?
11654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11655 (exit $ac_status); }; }; then
11656 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011657else
Martin v. Löwis11437992002-04-12 09:54:03 +000011658 echo "$as_me: failed program was:" >&5
11659cat conftest.$ac_ext >&5
11660ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011661fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011662rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11663LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011664fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011665echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11666echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11667if test $ac_cv_lib_util_openpty = yes; then
11668 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011669#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011670_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011671 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011672fi
11673
11674fi
11675done
11676
Martin v. Löwis11437992002-04-12 09:54:03 +000011677
Fred Drake8cef4cf2000-06-28 16:40:38 +000011678for ac_func in forkpty
11679do
Martin v. Löwis11437992002-04-12 09:54:03 +000011680as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11681echo "$as_me:$LINENO: checking for $ac_func" >&5
11682echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11683if eval "test \"\${$as_ac_var+set}\" = set"; then
11684 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011685else
Martin v. Löwis11437992002-04-12 09:54:03 +000011686 cat >conftest.$ac_ext <<_ACEOF
11687#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011688#include "confdefs.h"
11689/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011691#include <assert.h>
11692/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011693#ifdef __cplusplus
11694extern "C"
11695#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011696/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011697 builtin and then its argument prototype would still apply. */
11698char $ac_func ();
11699char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011700
Martin v. Löwis11437992002-04-12 09:54:03 +000011701#ifdef F77_DUMMY_MAIN
11702# ifdef __cplusplus
11703 extern "C"
11704# endif
11705 int F77_DUMMY_MAIN() { return 1; }
11706#endif
11707int
11708main ()
11709{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011710/* The GNU C library defines this for functions which it implements
11711 to always fail with ENOSYS. Some functions are actually named
11712 something starting with __ and the normal name is an alias. */
11713#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11714choke me
11715#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011716f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011717#endif
11718
Martin v. Löwis11437992002-04-12 09:54:03 +000011719 ;
11720 return 0;
11721}
11722_ACEOF
11723rm -f conftest.$ac_objext conftest$ac_exeext
11724if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11725 (eval $ac_link) 2>&5
11726 ac_status=$?
11727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11728 (exit $ac_status); } &&
11729 { ac_try='test -s conftest$ac_exeext'
11730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11731 (eval $ac_try) 2>&5
11732 ac_status=$?
11733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11734 (exit $ac_status); }; }; then
11735 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011736else
Martin v. Löwis11437992002-04-12 09:54:03 +000011737 echo "$as_me: failed program was:" >&5
11738cat conftest.$ac_ext >&5
11739eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011740fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011741rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011743echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11744echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11745if test `eval echo '${'$as_ac_var'}'` = yes; then
11746 cat >>confdefs.h <<_ACEOF
11747#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11748_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011749
Fred Drake8cef4cf2000-06-28 16:40:38 +000011750else
Martin v. Löwis11437992002-04-12 09:54:03 +000011751 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11752echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11753if test "${ac_cv_lib_util_forkpty+set}" = set; then
11754 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011755else
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011757LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011758cat >conftest.$ac_ext <<_ACEOF
11759#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011760#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011761
Fred Drake8cef4cf2000-06-28 16:40:38 +000011762/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011763#ifdef __cplusplus
11764extern "C"
11765#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011766/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011767 builtin and then its argument prototype would still apply. */
11768char forkpty ();
11769#ifdef F77_DUMMY_MAIN
11770# ifdef __cplusplus
11771 extern "C"
11772# endif
11773 int F77_DUMMY_MAIN() { return 1; }
11774#endif
11775int
11776main ()
11777{
11778forkpty ();
11779 ;
11780 return 0;
11781}
11782_ACEOF
11783rm -f conftest.$ac_objext conftest$ac_exeext
11784if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11785 (eval $ac_link) 2>&5
11786 ac_status=$?
11787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11788 (exit $ac_status); } &&
11789 { ac_try='test -s conftest$ac_exeext'
11790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11791 (eval $ac_try) 2>&5
11792 ac_status=$?
11793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11794 (exit $ac_status); }; }; then
11795 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011796else
Martin v. Löwis11437992002-04-12 09:54:03 +000011797 echo "$as_me: failed program was:" >&5
11798cat conftest.$ac_ext >&5
11799ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011800fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011801rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11802LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011803fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011804echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11805echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11806if test $ac_cv_lib_util_forkpty = yes; then
11807 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011808#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011809_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011810 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011811fi
11812
11813fi
11814done
11815
Jack Jansendd19cf82001-12-06 22:36:17 +000011816
Michael W. Hudson54241132001-12-07 15:38:26 +000011817# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011818
11819
11820
11821
11822
11823
Fred Drake8cef4cf2000-06-28 16:40:38 +000011824for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11825do
Martin v. Löwis11437992002-04-12 09:54:03 +000011826as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11827echo "$as_me:$LINENO: checking for $ac_func" >&5
11828echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11829if eval "test \"\${$as_ac_var+set}\" = set"; then
11830 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011831else
Martin v. Löwis11437992002-04-12 09:54:03 +000011832 cat >conftest.$ac_ext <<_ACEOF
11833#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011834#include "confdefs.h"
11835/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011836 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011837#include <assert.h>
11838/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011839#ifdef __cplusplus
11840extern "C"
11841#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011842/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011843 builtin and then its argument prototype would still apply. */
11844char $ac_func ();
11845char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011846
Martin v. Löwis11437992002-04-12 09:54:03 +000011847#ifdef F77_DUMMY_MAIN
11848# ifdef __cplusplus
11849 extern "C"
11850# endif
11851 int F77_DUMMY_MAIN() { return 1; }
11852#endif
11853int
11854main ()
11855{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011856/* The GNU C library defines this for functions which it implements
11857 to always fail with ENOSYS. Some functions are actually named
11858 something starting with __ and the normal name is an alias. */
11859#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11860choke me
11861#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011862f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011863#endif
11864
Martin v. Löwis11437992002-04-12 09:54:03 +000011865 ;
11866 return 0;
11867}
11868_ACEOF
11869rm -f conftest.$ac_objext conftest$ac_exeext
11870if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11871 (eval $ac_link) 2>&5
11872 ac_status=$?
11873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11874 (exit $ac_status); } &&
11875 { ac_try='test -s conftest$ac_exeext'
11876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11877 (eval $ac_try) 2>&5
11878 ac_status=$?
11879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11880 (exit $ac_status); }; }; then
11881 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011882else
Martin v. Löwis11437992002-04-12 09:54:03 +000011883 echo "$as_me: failed program was:" >&5
11884cat conftest.$ac_ext >&5
11885eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011886fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011887rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011888fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011889echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11890echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11891if test `eval echo '${'$as_ac_var'}'` = yes; then
11892 cat >>confdefs.h <<_ACEOF
11893#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11894_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011895
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011896fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011897done
11898
Michael W. Hudson54241132001-12-07 15:38:26 +000011899
Martin v. Löwis11437992002-04-12 09:54:03 +000011900
11901
11902
11903
11904
Martin v. Löwis1142de32002-03-29 16:28:31 +000011905for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011906do
Martin v. Löwis11437992002-04-12 09:54:03 +000011907as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11908echo "$as_me:$LINENO: checking for $ac_func" >&5
11909echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11910if eval "test \"\${$as_ac_var+set}\" = set"; then
11911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011912else
Martin v. Löwis11437992002-04-12 09:54:03 +000011913 cat >conftest.$ac_ext <<_ACEOF
11914#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011915#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011916/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011917 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011918#include <assert.h>
11919/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011920#ifdef __cplusplus
11921extern "C"
11922#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011923/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011924 builtin and then its argument prototype would still apply. */
11925char $ac_func ();
11926char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011927
Martin v. Löwis11437992002-04-12 09:54:03 +000011928#ifdef F77_DUMMY_MAIN
11929# ifdef __cplusplus
11930 extern "C"
11931# endif
11932 int F77_DUMMY_MAIN() { return 1; }
11933#endif
11934int
11935main ()
11936{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011937/* The GNU C library defines this for functions which it implements
11938 to always fail with ENOSYS. Some functions are actually named
11939 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011940#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011941choke me
11942#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011943f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011944#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011945
Martin v. Löwis11437992002-04-12 09:54:03 +000011946 ;
11947 return 0;
11948}
11949_ACEOF
11950rm -f conftest.$ac_objext conftest$ac_exeext
11951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11952 (eval $ac_link) 2>&5
11953 ac_status=$?
11954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11955 (exit $ac_status); } &&
11956 { ac_try='test -s conftest$ac_exeext'
11957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11958 (eval $ac_try) 2>&5
11959 ac_status=$?
11960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11961 (exit $ac_status); }; }; then
11962 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011963else
Martin v. Löwis11437992002-04-12 09:54:03 +000011964 echo "$as_me: failed program was:" >&5
11965cat conftest.$ac_ext >&5
11966eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011967fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011968rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011969fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011970echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11971echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11972if test `eval echo '${'$as_ac_var'}'` = yes; then
11973 cat >>confdefs.h <<_ACEOF
11974#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11975_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011976
Martin v. Löwis1142de32002-03-29 16:28:31 +000011977else
Martin v. Löwis11437992002-04-12 09:54:03 +000011978 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011979fi
11980done
11981
11982
Martin v. Löwis11437992002-04-12 09:54:03 +000011983
Martin v. Löwis1142de32002-03-29 16:28:31 +000011984for ac_func in getpgrp
11985do
Martin v. Löwis11437992002-04-12 09:54:03 +000011986as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11987echo "$as_me:$LINENO: checking for $ac_func" >&5
11988echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11989if eval "test \"\${$as_ac_var+set}\" = set"; then
11990 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011991else
Martin v. Löwis11437992002-04-12 09:54:03 +000011992 cat >conftest.$ac_ext <<_ACEOF
11993#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011994#include "confdefs.h"
11995/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011996 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011997#include <assert.h>
11998/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011999#ifdef __cplusplus
12000extern "C"
12001#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012002/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012003 builtin and then its argument prototype would still apply. */
12004char $ac_func ();
12005char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012006
Martin v. Löwis11437992002-04-12 09:54:03 +000012007#ifdef F77_DUMMY_MAIN
12008# ifdef __cplusplus
12009 extern "C"
12010# endif
12011 int F77_DUMMY_MAIN() { return 1; }
12012#endif
12013int
12014main ()
12015{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012016/* The GNU C library defines this for functions which it implements
12017 to always fail with ENOSYS. Some functions are actually named
12018 something starting with __ and the normal name is an alias. */
12019#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12020choke me
12021#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012022f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012023#endif
12024
Martin v. Löwis11437992002-04-12 09:54:03 +000012025 ;
12026 return 0;
12027}
12028_ACEOF
12029rm -f conftest.$ac_objext conftest$ac_exeext
12030if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12031 (eval $ac_link) 2>&5
12032 ac_status=$?
12033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12034 (exit $ac_status); } &&
12035 { ac_try='test -s conftest$ac_exeext'
12036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12037 (eval $ac_try) 2>&5
12038 ac_status=$?
12039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12040 (exit $ac_status); }; }; then
12041 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012042else
Martin v. Löwis11437992002-04-12 09:54:03 +000012043 echo "$as_me: failed program was:" >&5
12044cat conftest.$ac_ext >&5
12045eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012046fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012047rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012048fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012049echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12050echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12051if test `eval echo '${'$as_ac_var'}'` = yes; then
12052 cat >>confdefs.h <<_ACEOF
12053#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12054_ACEOF
12055 cat >conftest.$ac_ext <<_ACEOF
12056#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012057#include "confdefs.h"
12058#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012059#ifdef F77_DUMMY_MAIN
12060# ifdef __cplusplus
12061 extern "C"
12062# endif
12063 int F77_DUMMY_MAIN() { return 1; }
12064#endif
12065int
12066main ()
12067{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012068getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012069 ;
12070 return 0;
12071}
12072_ACEOF
12073rm -f conftest.$ac_objext
12074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12075 (eval $ac_compile) 2>&5
12076 ac_status=$?
12077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12078 (exit $ac_status); } &&
12079 { ac_try='test -s conftest.$ac_objext'
12080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12081 (eval $ac_try) 2>&5
12082 ac_status=$?
12083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12084 (exit $ac_status); }; }; then
12085
12086cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012087#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012088_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012089
Martin v. Löwis11437992002-04-12 09:54:03 +000012090
Guido van Rossumf78abae1997-01-21 22:02:36 +000012091else
Martin v. Löwis11437992002-04-12 09:54:03 +000012092 echo "$as_me: failed program was:" >&5
12093cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012094fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012095rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012096
Guido van Rossum627b2d71993-12-24 10:39:16 +000012097fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012098done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012099
Martin v. Löwis11437992002-04-12 09:54:03 +000012100
Thomas Wouters3a584202000-08-05 23:28:51 +000012101for ac_func in setpgrp
12102do
Martin v. Löwis11437992002-04-12 09:54:03 +000012103as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12104echo "$as_me:$LINENO: checking for $ac_func" >&5
12105echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12106if eval "test \"\${$as_ac_var+set}\" = set"; then
12107 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012108else
Martin v. Löwis11437992002-04-12 09:54:03 +000012109 cat >conftest.$ac_ext <<_ACEOF
12110#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012111#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012112/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012114#include <assert.h>
12115/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012116#ifdef __cplusplus
12117extern "C"
12118#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012119/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 builtin and then its argument prototype would still apply. */
12121char $ac_func ();
12122char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012123
Martin v. Löwis11437992002-04-12 09:54:03 +000012124#ifdef F77_DUMMY_MAIN
12125# ifdef __cplusplus
12126 extern "C"
12127# endif
12128 int F77_DUMMY_MAIN() { return 1; }
12129#endif
12130int
12131main ()
12132{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012133/* The GNU C library defines this for functions which it implements
12134 to always fail with ENOSYS. Some functions are actually named
12135 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012136#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012137choke me
12138#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012139f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012140#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012141
Martin v. Löwis11437992002-04-12 09:54:03 +000012142 ;
12143 return 0;
12144}
12145_ACEOF
12146rm -f conftest.$ac_objext conftest$ac_exeext
12147if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12148 (eval $ac_link) 2>&5
12149 ac_status=$?
12150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12151 (exit $ac_status); } &&
12152 { ac_try='test -s conftest$ac_exeext'
12153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12154 (eval $ac_try) 2>&5
12155 ac_status=$?
12156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12157 (exit $ac_status); }; }; then
12158 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012159else
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 echo "$as_me: failed program was:" >&5
12161cat conftest.$ac_ext >&5
12162eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012164rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012166echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12167echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12168if test `eval echo '${'$as_ac_var'}'` = yes; then
12169 cat >>confdefs.h <<_ACEOF
12170#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12171_ACEOF
12172 cat >conftest.$ac_ext <<_ACEOF
12173#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012174#include "confdefs.h"
12175#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012176#ifdef F77_DUMMY_MAIN
12177# ifdef __cplusplus
12178 extern "C"
12179# endif
12180 int F77_DUMMY_MAIN() { return 1; }
12181#endif
12182int
12183main ()
12184{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012185setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012186 ;
12187 return 0;
12188}
12189_ACEOF
12190rm -f conftest.$ac_objext
12191if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12192 (eval $ac_compile) 2>&5
12193 ac_status=$?
12194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12195 (exit $ac_status); } &&
12196 { ac_try='test -s conftest.$ac_objext'
12197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12198 (eval $ac_try) 2>&5
12199 ac_status=$?
12200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12201 (exit $ac_status); }; }; then
12202
12203cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012204#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012205_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012206
Martin v. Löwis11437992002-04-12 09:54:03 +000012207
Guido van Rossumf78abae1997-01-21 22:02:36 +000012208else
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 echo "$as_me: failed program was:" >&5
12210cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012211fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012212rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012213
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012214fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012215done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012216
Martin v. Löwis11437992002-04-12 09:54:03 +000012217
Thomas Wouters3a584202000-08-05 23:28:51 +000012218for ac_func in gettimeofday
12219do
Martin v. Löwis11437992002-04-12 09:54:03 +000012220as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12221echo "$as_me:$LINENO: checking for $ac_func" >&5
12222echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12223if eval "test \"\${$as_ac_var+set}\" = set"; then
12224 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012225else
Martin v. Löwis11437992002-04-12 09:54:03 +000012226 cat >conftest.$ac_ext <<_ACEOF
12227#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012228#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012229/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012231#include <assert.h>
12232/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012233#ifdef __cplusplus
12234extern "C"
12235#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012236/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012237 builtin and then its argument prototype would still apply. */
12238char $ac_func ();
12239char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012240
Martin v. Löwis11437992002-04-12 09:54:03 +000012241#ifdef F77_DUMMY_MAIN
12242# ifdef __cplusplus
12243 extern "C"
12244# endif
12245 int F77_DUMMY_MAIN() { return 1; }
12246#endif
12247int
12248main ()
12249{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012250/* The GNU C library defines this for functions which it implements
12251 to always fail with ENOSYS. Some functions are actually named
12252 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012253#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012254choke me
12255#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012256f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012257#endif
12258
Martin v. Löwis11437992002-04-12 09:54:03 +000012259 ;
12260 return 0;
12261}
12262_ACEOF
12263rm -f conftest.$ac_objext conftest$ac_exeext
12264if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12265 (eval $ac_link) 2>&5
12266 ac_status=$?
12267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12268 (exit $ac_status); } &&
12269 { ac_try='test -s conftest$ac_exeext'
12270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12271 (eval $ac_try) 2>&5
12272 ac_status=$?
12273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12274 (exit $ac_status); }; }; then
12275 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012276else
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 echo "$as_me: failed program was:" >&5
12278cat conftest.$ac_ext >&5
12279eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012281rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012283echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12284echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12285if test `eval echo '${'$as_ac_var'}'` = yes; then
12286 cat >>confdefs.h <<_ACEOF
12287#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12288_ACEOF
12289 cat >conftest.$ac_ext <<_ACEOF
12290#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012291#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012292#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012293#ifdef F77_DUMMY_MAIN
12294# ifdef __cplusplus
12295 extern "C"
12296# endif
12297 int F77_DUMMY_MAIN() { return 1; }
12298#endif
12299int
12300main ()
12301{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012302gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012303 ;
12304 return 0;
12305}
12306_ACEOF
12307rm -f conftest.$ac_objext
12308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12309 (eval $ac_compile) 2>&5
12310 ac_status=$?
12311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12312 (exit $ac_status); } &&
12313 { ac_try='test -s conftest.$ac_objext'
12314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12315 (eval $ac_try) 2>&5
12316 ac_status=$?
12317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12318 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012319 :
12320else
Martin v. Löwis11437992002-04-12 09:54:03 +000012321 echo "$as_me: failed program was:" >&5
12322cat conftest.$ac_ext >&5
12323
12324cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012325#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012326_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012327
Martin v. Löwis11437992002-04-12 09:54:03 +000012328
Guido van Rossum627b2d71993-12-24 10:39:16 +000012329fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012330rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012331
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012332fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012333done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012334
Michael W. Hudson54241132001-12-07 15:38:26 +000012335
12336
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012337# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012338# for [no]getaddrinfo in netdb.h.
12339echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12340echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12341cat >conftest.$ac_ext <<_ACEOF
12342#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012343#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012344
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012345#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012346#include <sys/socket.h>
12347#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012348#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012349
Martin v. Löwis11437992002-04-12 09:54:03 +000012350#ifdef F77_DUMMY_MAIN
12351# ifdef __cplusplus
12352 extern "C"
12353# endif
12354 int F77_DUMMY_MAIN() { return 1; }
12355#endif
12356int
12357main ()
12358{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012359
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012360getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012361
Martin v. Löwis11437992002-04-12 09:54:03 +000012362 ;
12363 return 0;
12364}
12365_ACEOF
12366rm -f conftest.$ac_objext conftest$ac_exeext
12367if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12368 (eval $ac_link) 2>&5
12369 ac_status=$?
12370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12371 (exit $ac_status); } &&
12372 { ac_try='test -s conftest$ac_exeext'
12373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12374 (eval $ac_try) 2>&5
12375 ac_status=$?
12376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12377 (exit $ac_status); }; }; then
12378
12379echo "$as_me:$LINENO: result: yes" >&5
12380echo "${ECHO_T}yes" >&6
12381echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12382echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012383if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012384 echo "$as_me:$LINENO: result: buggy" >&5
12385echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012386buggygetaddrinfo=yes
12387else
Martin v. Löwis11437992002-04-12 09:54:03 +000012388 cat >conftest.$ac_ext <<_ACEOF
12389#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012390#include "confdefs.h"
12391
12392#include <sys/types.h>
12393#include <netdb.h>
12394#include <string.h>
12395#include <sys/socket.h>
12396#include <netinet/in.h>
12397
12398main()
12399{
12400 int passive, gaierr, inet4 = 0, inet6 = 0;
12401 struct addrinfo hints, *ai, *aitop;
12402 char straddr[INET6_ADDRSTRLEN], strport[16];
12403
12404 for (passive = 0; passive <= 1; passive++) {
12405 memset(&hints, 0, sizeof(hints));
12406 hints.ai_family = AF_UNSPEC;
12407 hints.ai_flags = passive ? AI_PASSIVE : 0;
12408 hints.ai_socktype = SOCK_STREAM;
12409 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12410 (void)gai_strerror(gaierr);
12411 goto bad;
12412 }
12413 for (ai = aitop; ai; ai = ai->ai_next) {
12414 if (ai->ai_addr == NULL ||
12415 ai->ai_addrlen == 0 ||
12416 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12417 straddr, sizeof(straddr), strport, sizeof(strport),
12418 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12419 goto bad;
12420 }
12421 switch (ai->ai_family) {
12422 case AF_INET:
12423 if (strcmp(strport, "54321") != 0) {
12424 goto bad;
12425 }
12426 if (passive) {
12427 if (strcmp(straddr, "0.0.0.0") != 0) {
12428 goto bad;
12429 }
12430 } else {
12431 if (strcmp(straddr, "127.0.0.1") != 0) {
12432 goto bad;
12433 }
12434 }
12435 inet4++;
12436 break;
12437 case AF_INET6:
12438 if (strcmp(strport, "54321") != 0) {
12439 goto bad;
12440 }
12441 if (passive) {
12442 if (strcmp(straddr, "::") != 0) {
12443 goto bad;
12444 }
12445 } else {
12446 if (strcmp(straddr, "::1") != 0) {
12447 goto bad;
12448 }
12449 }
12450 inet6++;
12451 break;
12452 case AF_UNSPEC:
12453 goto bad;
12454 break;
12455 default:
12456 /* another family support? */
12457 break;
12458 }
12459 }
12460 }
12461
12462 if (!(inet4 == 0 || inet4 == 2))
12463 goto bad;
12464 if (!(inet6 == 0 || inet6 == 2))
12465 goto bad;
12466
12467 if (aitop)
12468 freeaddrinfo(aitop);
12469 exit(0);
12470
12471 bad:
12472 if (aitop)
12473 freeaddrinfo(aitop);
12474 exit(1);
12475}
12476
Martin v. Löwis11437992002-04-12 09:54:03 +000012477_ACEOF
12478rm -f conftest$ac_exeext
12479if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12480 (eval $ac_link) 2>&5
12481 ac_status=$?
12482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12483 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12485 (eval $ac_try) 2>&5
12486 ac_status=$?
12487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12488 (exit $ac_status); }; }; then
12489 echo "$as_me:$LINENO: result: good" >&5
12490echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012491buggygetaddrinfo=no
12492else
Martin v. Löwis11437992002-04-12 09:54:03 +000012493 echo "$as_me: program exited with status $ac_status" >&5
12494echo "$as_me: failed program was:" >&5
12495cat conftest.$ac_ext >&5
12496( exit $ac_status )
12497echo "$as_me:$LINENO: result: buggy" >&5
12498echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012499buggygetaddrinfo=yes
12500fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012501rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012502fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012503else
Martin v. Löwis11437992002-04-12 09:54:03 +000012504 echo "$as_me: failed program was:" >&5
12505cat conftest.$ac_ext >&5
12506
12507echo "$as_me:$LINENO: result: no" >&5
12508echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012509buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012510
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012511fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012512rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012513
12514if test "$buggygetaddrinfo" = "yes"; then
12515 if test "$ipv6" = "yes"; then
12516 echo 'Fatal: You must get working getaddrinfo() function.'
12517 echo ' or you can specify "--disable-ipv6"'.
12518 exit 1
12519 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012520else
Martin v. Löwis11437992002-04-12 09:54:03 +000012521
12522cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012523#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012524_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012525
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012526fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012527
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012528for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012529do
Martin v. Löwis11437992002-04-12 09:54:03 +000012530as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12531echo "$as_me:$LINENO: checking for $ac_func" >&5
12532echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12533if eval "test \"\${$as_ac_var+set}\" = set"; then
12534 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012535else
Martin v. Löwis11437992002-04-12 09:54:03 +000012536 cat >conftest.$ac_ext <<_ACEOF
12537#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012538#include "confdefs.h"
12539/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012541#include <assert.h>
12542/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012543#ifdef __cplusplus
12544extern "C"
12545#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012546/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012547 builtin and then its argument prototype would still apply. */
12548char $ac_func ();
12549char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012550
Martin v. Löwis11437992002-04-12 09:54:03 +000012551#ifdef F77_DUMMY_MAIN
12552# ifdef __cplusplus
12553 extern "C"
12554# endif
12555 int F77_DUMMY_MAIN() { return 1; }
12556#endif
12557int
12558main ()
12559{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012560/* The GNU C library defines this for functions which it implements
12561 to always fail with ENOSYS. Some functions are actually named
12562 something starting with __ and the normal name is an alias. */
12563#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12564choke me
12565#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012566f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012567#endif
12568
Martin v. Löwis11437992002-04-12 09:54:03 +000012569 ;
12570 return 0;
12571}
12572_ACEOF
12573rm -f conftest.$ac_objext conftest$ac_exeext
12574if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12575 (eval $ac_link) 2>&5
12576 ac_status=$?
12577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12578 (exit $ac_status); } &&
12579 { ac_try='test -s conftest$ac_exeext'
12580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12581 (eval $ac_try) 2>&5
12582 ac_status=$?
12583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12584 (exit $ac_status); }; }; then
12585 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012586else
Martin v. Löwis11437992002-04-12 09:54:03 +000012587 echo "$as_me: failed program was:" >&5
12588cat conftest.$ac_ext >&5
12589eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012590fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012591rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012593echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12594echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12595if test `eval echo '${'$as_ac_var'}'` = yes; then
12596 cat >>confdefs.h <<_ACEOF
12597#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12598_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012599
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012600fi
12601done
12602
Michael W. Hudson54241132001-12-07 15:38:26 +000012603
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012604# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012605echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12606echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12607if test "${ac_cv_header_time+set}" = set; then
12608 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012609else
Martin v. Löwis11437992002-04-12 09:54:03 +000012610 cat >conftest.$ac_ext <<_ACEOF
12611#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012612#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012613#include <sys/types.h>
12614#include <sys/time.h>
12615#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012616
12617#ifdef F77_DUMMY_MAIN
12618# ifdef __cplusplus
12619 extern "C"
12620# endif
12621 int F77_DUMMY_MAIN() { return 1; }
12622#endif
12623int
12624main ()
12625{
12626if ((struct tm *) 0)
12627return 0;
12628 ;
12629 return 0;
12630}
12631_ACEOF
12632rm -f conftest.$ac_objext
12633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12634 (eval $ac_compile) 2>&5
12635 ac_status=$?
12636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12637 (exit $ac_status); } &&
12638 { ac_try='test -s conftest.$ac_objext'
12639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12640 (eval $ac_try) 2>&5
12641 ac_status=$?
12642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12643 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012644 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012645else
Martin v. Löwis11437992002-04-12 09:54:03 +000012646 echo "$as_me: failed program was:" >&5
12647cat conftest.$ac_ext >&5
12648ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012649fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012650rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012652echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12653echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012654if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012655
12656cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012657#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012658_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012659
12660fi
12661
Martin v. Löwis11437992002-04-12 09:54:03 +000012662echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12663echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12664if test "${ac_cv_struct_tm+set}" = set; then
12665 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012666else
Martin v. Löwis11437992002-04-12 09:54:03 +000012667 cat >conftest.$ac_ext <<_ACEOF
12668#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012669#include "confdefs.h"
12670#include <sys/types.h>
12671#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012672
12673#ifdef F77_DUMMY_MAIN
12674# ifdef __cplusplus
12675 extern "C"
12676# endif
12677 int F77_DUMMY_MAIN() { return 1; }
12678#endif
12679int
12680main ()
12681{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012682struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012683 ;
12684 return 0;
12685}
12686_ACEOF
12687rm -f conftest.$ac_objext
12688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12689 (eval $ac_compile) 2>&5
12690 ac_status=$?
12691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12692 (exit $ac_status); } &&
12693 { ac_try='test -s conftest.$ac_objext'
12694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12695 (eval $ac_try) 2>&5
12696 ac_status=$?
12697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12698 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012699 ac_cv_struct_tm=time.h
12700else
Martin v. Löwis11437992002-04-12 09:54:03 +000012701 echo "$as_me: failed program was:" >&5
12702cat conftest.$ac_ext >&5
12703ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012704fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012705rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012706fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012707echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12708echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012709if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012710
12711cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012713_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012714
12715fi
12716
Martin v. Löwis11437992002-04-12 09:54:03 +000012717echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12718echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12719if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12720 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012721else
Martin v. Löwis11437992002-04-12 09:54:03 +000012722 cat >conftest.$ac_ext <<_ACEOF
12723#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012724#include "confdefs.h"
12725#include <sys/types.h>
12726#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012727
12728
12729#ifdef F77_DUMMY_MAIN
12730# ifdef __cplusplus
12731 extern "C"
12732# endif
12733 int F77_DUMMY_MAIN() { return 1; }
12734#endif
12735int
12736main ()
12737{
12738static struct tm ac_aggr;
12739if (ac_aggr.tm_zone)
12740return 0;
12741 ;
12742 return 0;
12743}
12744_ACEOF
12745rm -f conftest.$ac_objext
12746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12747 (eval $ac_compile) 2>&5
12748 ac_status=$?
12749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12750 (exit $ac_status); } &&
12751 { ac_try='test -s conftest.$ac_objext'
12752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12753 (eval $ac_try) 2>&5
12754 ac_status=$?
12755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12756 (exit $ac_status); }; }; then
12757 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012758else
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 echo "$as_me: failed program was:" >&5
12760cat conftest.$ac_ext >&5
12761ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012762fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012763rm -f conftest.$ac_objext conftest.$ac_ext
12764fi
12765echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12766echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12767if test $ac_cv_member_struct_tm_tm_zone = yes; then
12768
12769cat >>confdefs.h <<_ACEOF
12770#define HAVE_STRUCT_TM_TM_ZONE 1
12771_ACEOF
12772
12773
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012774fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012775
Martin v. Löwis11437992002-04-12 09:54:03 +000012776if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12777
12778cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012779#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012780_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012781
12782else
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 echo "$as_me:$LINENO: checking for tzname" >&5
12784echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12785if test "${ac_cv_var_tzname+set}" = set; then
12786 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012787else
Martin v. Löwis11437992002-04-12 09:54:03 +000012788 cat >conftest.$ac_ext <<_ACEOF
12789#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012790#include "confdefs.h"
12791#include <time.h>
12792#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012793extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
12796#ifdef F77_DUMMY_MAIN
12797# ifdef __cplusplus
12798 extern "C"
12799# endif
12800 int F77_DUMMY_MAIN() { return 1; }
12801#endif
12802int
12803main ()
12804{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012805atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012806 ;
12807 return 0;
12808}
12809_ACEOF
12810rm -f conftest.$ac_objext conftest$ac_exeext
12811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12812 (eval $ac_link) 2>&5
12813 ac_status=$?
12814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12815 (exit $ac_status); } &&
12816 { ac_try='test -s conftest$ac_exeext'
12817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12818 (eval $ac_try) 2>&5
12819 ac_status=$?
12820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12821 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012822 ac_cv_var_tzname=yes
12823else
Martin v. Löwis11437992002-04-12 09:54:03 +000012824 echo "$as_me: failed program was:" >&5
12825cat conftest.$ac_ext >&5
12826ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012827fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012828rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012829fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012830echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12831echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012832 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012833
12834cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012835#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012836_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012837
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012838 fi
12839fi
12840
Jack Jansendd19cf82001-12-06 22:36:17 +000012841
Martin v. Löwis11437992002-04-12 09:54:03 +000012842echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12843echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12844if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12845 echo $ECHO_N "(cached) $ECHO_C" >&6
12846else
12847 cat >conftest.$ac_ext <<_ACEOF
12848#line $LINENO "configure"
12849#include "confdefs.h"
12850$ac_includes_default
12851#ifdef F77_DUMMY_MAIN
12852# ifdef __cplusplus
12853 extern "C"
12854# endif
12855 int F77_DUMMY_MAIN() { return 1; }
12856#endif
12857int
12858main ()
12859{
12860static struct stat ac_aggr;
12861if (ac_aggr.st_rdev)
12862return 0;
12863 ;
12864 return 0;
12865}
12866_ACEOF
12867rm -f conftest.$ac_objext
12868if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12869 (eval $ac_compile) 2>&5
12870 ac_status=$?
12871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12872 (exit $ac_status); } &&
12873 { ac_try='test -s conftest.$ac_objext'
12874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12875 (eval $ac_try) 2>&5
12876 ac_status=$?
12877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12878 (exit $ac_status); }; }; then
12879 ac_cv_member_struct_stat_st_rdev=yes
12880else
12881 echo "$as_me: failed program was:" >&5
12882cat conftest.$ac_ext >&5
12883ac_cv_member_struct_stat_st_rdev=no
12884fi
12885rm -f conftest.$ac_objext conftest.$ac_ext
12886fi
12887echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12888echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12889if test $ac_cv_member_struct_stat_st_rdev = yes; then
12890
12891cat >>confdefs.h <<_ACEOF
12892#define HAVE_STRUCT_STAT_ST_RDEV 1
12893_ACEOF
12894
12895
12896cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012897#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012898_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012899
12900fi
12901
Martin v. Löwis11437992002-04-12 09:54:03 +000012902
12903
12904echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12905echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12906if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12907 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012908else
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 cat >conftest.$ac_ext <<_ACEOF
12910#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012911#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012912$ac_includes_default
12913#ifdef F77_DUMMY_MAIN
12914# ifdef __cplusplus
12915 extern "C"
12916# endif
12917 int F77_DUMMY_MAIN() { return 1; }
12918#endif
12919int
12920main ()
12921{
12922static struct stat ac_aggr;
12923if (ac_aggr.st_blksize)
12924return 0;
12925 ;
12926 return 0;
12927}
12928_ACEOF
12929rm -f conftest.$ac_objext
12930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12931 (eval $ac_compile) 2>&5
12932 ac_status=$?
12933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12934 (exit $ac_status); } &&
12935 { ac_try='test -s conftest.$ac_objext'
12936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12937 (eval $ac_try) 2>&5
12938 ac_status=$?
12939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12940 (exit $ac_status); }; }; then
12941 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012942else
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 echo "$as_me: failed program was:" >&5
12944cat conftest.$ac_ext >&5
12945ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012946fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012947rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012948fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012949echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12950echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12951if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012952
Martin v. Löwis11437992002-04-12 09:54:03 +000012953cat >>confdefs.h <<_ACEOF
12954#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12955_ACEOF
12956
12957
12958cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012959#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012960_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012961
12962fi
12963
Martin v. Löwis11437992002-04-12 09:54:03 +000012964
12965echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12966echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12967if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12968 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012969else
Martin v. Löwis11437992002-04-12 09:54:03 +000012970 cat >conftest.$ac_ext <<_ACEOF
12971#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012972#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012973$ac_includes_default
12974#ifdef F77_DUMMY_MAIN
12975# ifdef __cplusplus
12976 extern "C"
12977# endif
12978 int F77_DUMMY_MAIN() { return 1; }
12979#endif
12980int
12981main ()
12982{
12983static struct stat ac_aggr;
12984if (ac_aggr.st_blocks)
12985return 0;
12986 ;
12987 return 0;
12988}
12989_ACEOF
12990rm -f conftest.$ac_objext
12991if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12992 (eval $ac_compile) 2>&5
12993 ac_status=$?
12994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12995 (exit $ac_status); } &&
12996 { ac_try='test -s conftest.$ac_objext'
12997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12998 (eval $ac_try) 2>&5
12999 ac_status=$?
13000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13001 (exit $ac_status); }; }; then
13002 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013003else
Martin v. Löwis11437992002-04-12 09:54:03 +000013004 echo "$as_me: failed program was:" >&5
13005cat conftest.$ac_ext >&5
13006ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013007fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013008rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013010echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13011echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13012if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013013
Martin v. Löwis11437992002-04-12 09:54:03 +000013014cat >>confdefs.h <<_ACEOF
13015#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13016_ACEOF
13017
13018
13019cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013020#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013021_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013022
13023else
Martin v. Löwis11437992002-04-12 09:54:03 +000013024 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013025fi
13026
Michael W. Hudson54241132001-12-07 15:38:26 +000013027
Martin v. Löwis11437992002-04-12 09:54:03 +000013028
13029echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13030echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13031if test "${ac_cv_header_time_altzone+set}" = set; then
13032 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013033else
Martin v. Löwis11437992002-04-12 09:54:03 +000013034 cat >conftest.$ac_ext <<_ACEOF
13035#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013036#include "confdefs.h"
13037#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013038#ifdef F77_DUMMY_MAIN
13039# ifdef __cplusplus
13040 extern "C"
13041# endif
13042 int F77_DUMMY_MAIN() { return 1; }
13043#endif
13044int
13045main ()
13046{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013047return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013048 ;
13049 return 0;
13050}
13051_ACEOF
13052rm -f conftest.$ac_objext
13053if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13054 (eval $ac_compile) 2>&5
13055 ac_status=$?
13056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13057 (exit $ac_status); } &&
13058 { ac_try='test -s conftest.$ac_objext'
13059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13060 (eval $ac_try) 2>&5
13061 ac_status=$?
13062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13063 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013064 ac_cv_header_time_altzone=yes
13065else
Martin v. Löwis11437992002-04-12 09:54:03 +000013066 echo "$as_me: failed program was:" >&5
13067cat conftest.$ac_ext >&5
13068ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013069fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013070rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013071fi
13072
Martin v. Löwis11437992002-04-12 09:54:03 +000013073echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13074echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013075if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013076
13077cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013078#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013079_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013080
13081fi
13082
Guido van Rossumda88dad1995-01-26 00:46:29 +000013083was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013084echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13085echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13086cat >conftest.$ac_ext <<_ACEOF
13087#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013088#include "confdefs.h"
13089
13090#include <sys/types.h>
13091#include <sys/select.h>
13092#include <sys/time.h>
13093
Martin v. Löwis11437992002-04-12 09:54:03 +000013094#ifdef F77_DUMMY_MAIN
13095# ifdef __cplusplus
13096 extern "C"
13097# endif
13098 int F77_DUMMY_MAIN() { return 1; }
13099#endif
13100int
13101main ()
13102{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013103;
Martin v. Löwis11437992002-04-12 09:54:03 +000013104 ;
13105 return 0;
13106}
13107_ACEOF
13108rm -f conftest.$ac_objext
13109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13110 (eval $ac_compile) 2>&5
13111 ac_status=$?
13112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13113 (exit $ac_status); } &&
13114 { ac_try='test -s conftest.$ac_objext'
13115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13116 (eval $ac_try) 2>&5
13117 ac_status=$?
13118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13119 (exit $ac_status); }; }; then
13120
13121
13122cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013123#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013124_ACEOF
13125
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013126 was_it_defined=yes
13127
Guido van Rossumf78abae1997-01-21 22:02:36 +000013128else
Martin v. Löwis11437992002-04-12 09:54:03 +000013129 echo "$as_me: failed program was:" >&5
13130cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013131fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013132rm -f conftest.$ac_objext conftest.$ac_ext
13133echo "$as_me:$LINENO: result: $was_it_defined" >&5
13134echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013135
Martin v. Löwis11437992002-04-12 09:54:03 +000013136echo "$as_me:$LINENO: checking for addrinfo" >&5
13137echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13138if test "${ac_cv_struct_addrinfo+set}" = set; then
13139 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013140else
Martin v. Löwis11437992002-04-12 09:54:03 +000013141 cat >conftest.$ac_ext <<_ACEOF
13142#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013143#include "confdefs.h"
13144
13145# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013146#ifdef F77_DUMMY_MAIN
13147# ifdef __cplusplus
13148 extern "C"
13149# endif
13150 int F77_DUMMY_MAIN() { return 1; }
13151#endif
13152int
13153main ()
13154{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013155struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013156 ;
13157 return 0;
13158}
13159_ACEOF
13160rm -f conftest.$ac_objext
13161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13162 (eval $ac_compile) 2>&5
13163 ac_status=$?
13164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13165 (exit $ac_status); } &&
13166 { ac_try='test -s conftest.$ac_objext'
13167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13168 (eval $ac_try) 2>&5
13169 ac_status=$?
13170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13171 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013172 ac_cv_struct_addrinfo=yes
13173else
Martin v. Löwis11437992002-04-12 09:54:03 +000013174 echo "$as_me: failed program was:" >&5
13175cat conftest.$ac_ext >&5
13176ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013177fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013178rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013179fi
13180
Martin v. Löwis11437992002-04-12 09:54:03 +000013181echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13182echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013183if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013184
13185cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013186#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013187_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013188
13189fi
13190
Martin v. Löwis11437992002-04-12 09:54:03 +000013191echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13192echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13193if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13194 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013195else
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 cat >conftest.$ac_ext <<_ACEOF
13197#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013198#include "confdefs.h"
13199
13200# include <sys/types.h>
13201# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013202#ifdef F77_DUMMY_MAIN
13203# ifdef __cplusplus
13204 extern "C"
13205# endif
13206 int F77_DUMMY_MAIN() { return 1; }
13207#endif
13208int
13209main ()
13210{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013211struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013212 ;
13213 return 0;
13214}
13215_ACEOF
13216rm -f conftest.$ac_objext
13217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13218 (eval $ac_compile) 2>&5
13219 ac_status=$?
13220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13221 (exit $ac_status); } &&
13222 { ac_try='test -s conftest.$ac_objext'
13223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13224 (eval $ac_try) 2>&5
13225 ac_status=$?
13226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13227 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013228 ac_cv_struct_sockaddr_storage=yes
13229else
Martin v. Löwis11437992002-04-12 09:54:03 +000013230 echo "$as_me: failed program was:" >&5
13231cat conftest.$ac_ext >&5
13232ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013233fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013234rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013235fi
13236
Martin v. Löwis11437992002-04-12 09:54:03 +000013237echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13238echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013239if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013240
13241cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013242#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013243_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013244
13245fi
13246
Guido van Rossum627b2d71993-12-24 10:39:16 +000013247# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013248
Michael W. Hudson54241132001-12-07 15:38:26 +000013249
Martin v. Löwis11437992002-04-12 09:54:03 +000013250echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13251echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13252if test "${ac_cv_c_char_unsigned+set}" = set; then
13253 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013254else
Martin v. Löwis11437992002-04-12 09:54:03 +000013255 cat >conftest.$ac_ext <<_ACEOF
13256#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013257#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013258$ac_includes_default
13259#ifdef F77_DUMMY_MAIN
13260# ifdef __cplusplus
13261 extern "C"
13262# endif
13263 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013265int
13266main ()
13267{
13268static int test_array [1 - 2 * !(((char) -1) < 0)];
13269test_array [0] = 0
13270
13271 ;
13272 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013273}
Martin v. Löwis11437992002-04-12 09:54:03 +000013274_ACEOF
13275rm -f conftest.$ac_objext
13276if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13277 (eval $ac_compile) 2>&5
13278 ac_status=$?
13279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13280 (exit $ac_status); } &&
13281 { ac_try='test -s conftest.$ac_objext'
13282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13283 (eval $ac_try) 2>&5
13284 ac_status=$?
13285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13286 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013287 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013288else
13289 echo "$as_me: failed program was:" >&5
13290cat conftest.$ac_ext >&5
13291ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013293rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013294fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013295echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13296echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013297if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013298 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013299#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013300_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013301
13302fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013303
Martin v. Löwis11437992002-04-12 09:54:03 +000013304echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13305echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13306if test "${ac_cv_prog_cc_stdc+set}" = set; then
13307 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013308else
Martin v. Löwis11437992002-04-12 09:54:03 +000013309 ac_cv_prog_cc_stdc=no
13310ac_save_CC=$CC
13311cat >conftest.$ac_ext <<_ACEOF
13312#line $LINENO "configure"
13313#include "confdefs.h"
13314#include <stdarg.h>
13315#include <stdio.h>
13316#include <sys/types.h>
13317#include <sys/stat.h>
13318/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13319struct buf { int x; };
13320FILE * (*rcsopen) (struct buf *, struct stat *, int);
13321static char *e (p, i)
13322 char **p;
13323 int i;
13324{
13325 return p[i];
13326}
13327static char *f (char * (*g) (char **, int), char **p, ...)
13328{
13329 char *s;
13330 va_list v;
13331 va_start (v,p);
13332 s = g (p, va_arg (v,int));
13333 va_end (v);
13334 return s;
13335}
13336int test (int i, double x);
13337struct s1 {int (*f) (int a);};
13338struct s2 {int (*f) (double a);};
13339int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13340int argc;
13341char **argv;
13342#ifdef F77_DUMMY_MAIN
13343# ifdef __cplusplus
13344 extern "C"
13345# endif
13346 int F77_DUMMY_MAIN() { return 1; }
13347#endif
13348int
13349main ()
13350{
13351return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13352 ;
13353 return 0;
13354}
13355_ACEOF
13356# Don't try gcc -ansi; that turns off useful extensions and
13357# breaks some systems' header files.
13358# AIX -qlanglvl=ansi
13359# Ultrix and OSF/1 -std1
13360# HP-UX 10.20 and later -Ae
13361# HP-UX older versions -Aa -D_HPUX_SOURCE
13362# SVR4 -Xc -D__EXTENSIONS__
13363for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13364do
13365 CC="$ac_save_CC $ac_arg"
13366 rm -f conftest.$ac_objext
13367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13368 (eval $ac_compile) 2>&5
13369 ac_status=$?
13370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13371 (exit $ac_status); } &&
13372 { ac_try='test -s conftest.$ac_objext'
13373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13374 (eval $ac_try) 2>&5
13375 ac_status=$?
13376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13377 (exit $ac_status); }; }; then
13378 ac_cv_prog_cc_stdc=$ac_arg
13379break
13380else
13381 echo "$as_me: failed program was:" >&5
13382cat conftest.$ac_ext >&5
13383fi
13384rm -f conftest.$ac_objext
13385done
13386rm -f conftest.$ac_ext conftest.$ac_objext
13387CC=$ac_save_CC
13388
13389fi
13390
13391case "x$ac_cv_prog_cc_stdc" in
13392 x|xno)
13393 echo "$as_me:$LINENO: result: none needed" >&5
13394echo "${ECHO_T}none needed" >&6 ;;
13395 *)
13396 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13397echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13398 CC="$CC $ac_cv_prog_cc_stdc" ;;
13399esac
13400
13401echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13402echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13403if test "${ac_cv_c_const+set}" = set; then
13404 echo $ECHO_N "(cached) $ECHO_C" >&6
13405else
13406 cat >conftest.$ac_ext <<_ACEOF
13407#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013408#include "confdefs.h"
13409
Martin v. Löwis11437992002-04-12 09:54:03 +000013410#ifdef F77_DUMMY_MAIN
13411# ifdef __cplusplus
13412 extern "C"
13413# endif
13414 int F77_DUMMY_MAIN() { return 1; }
13415#endif
13416int
13417main ()
13418{
13419/* FIXME: Include the comments suggested by Paul. */
13420#ifndef __cplusplus
13421 /* Ultrix mips cc rejects this. */
13422 typedef int charset[2];
13423 const charset x;
13424 /* SunOS 4.1.1 cc rejects this. */
13425 char const *const *ccp;
13426 char **p;
13427 /* NEC SVR4.0.2 mips cc rejects this. */
13428 struct point {int x, y;};
13429 static struct point const zero = {0,0};
13430 /* AIX XL C 1.02.0.0 rejects this.
13431 It does not let you subtract one const X* pointer from another in
13432 an arm of an if-expression whose if-part is not a constant
13433 expression */
13434 const char *g = "string";
13435 ccp = &g + (g ? g-g : 0);
13436 /* HPUX 7.0 cc rejects these. */
13437 ++ccp;
13438 p = (char**) ccp;
13439 ccp = (char const *const *) p;
13440 { /* SCO 3.2v4 cc rejects this. */
13441 char *t;
13442 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013443
Martin v. Löwis11437992002-04-12 09:54:03 +000013444 *t++ = 0;
13445 }
13446 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13447 int x[] = {25, 17};
13448 const int *foo = &x[0];
13449 ++foo;
13450 }
13451 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13452 typedef const int *iptr;
13453 iptr p = 0;
13454 ++p;
13455 }
13456 { /* AIX XL C 1.02.0.0 rejects this saying
13457 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13458 struct s { int j; const int *ap[3]; };
13459 struct s *b; b->j = 5;
13460 }
13461 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13462 const int foo = 10;
13463 }
13464#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013465
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 ;
13467 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013468}
Martin v. Löwis11437992002-04-12 09:54:03 +000013469_ACEOF
13470rm -f conftest.$ac_objext
13471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13472 (eval $ac_compile) 2>&5
13473 ac_status=$?
13474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13475 (exit $ac_status); } &&
13476 { ac_try='test -s conftest.$ac_objext'
13477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13478 (eval $ac_try) 2>&5
13479 ac_status=$?
13480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13481 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013482 ac_cv_c_const=yes
13483else
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 echo "$as_me: failed program was:" >&5
13485cat conftest.$ac_ext >&5
13486ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013488rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013489fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013490echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13491echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013492if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013493
13494cat >>confdefs.h <<\_ACEOF
13495#define const
13496_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013497
13498fi
13499
Michael W. Hudson54241132001-12-07 15:38:26 +000013500
Guido van Rossumda88dad1995-01-26 00:46:29 +000013501works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013502echo "$as_me:$LINENO: checking for working volatile" >&5
13503echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13504cat >conftest.$ac_ext <<_ACEOF
13505#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013506#include "confdefs.h"
13507
Martin v. Löwis11437992002-04-12 09:54:03 +000013508#ifdef F77_DUMMY_MAIN
13509# ifdef __cplusplus
13510 extern "C"
13511# endif
13512 int F77_DUMMY_MAIN() { return 1; }
13513#endif
13514int
13515main ()
13516{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013517volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013518 ;
13519 return 0;
13520}
13521_ACEOF
13522rm -f conftest.$ac_objext
13523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13524 (eval $ac_compile) 2>&5
13525 ac_status=$?
13526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13527 (exit $ac_status); } &&
13528 { ac_try='test -s conftest.$ac_objext'
13529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13530 (eval $ac_try) 2>&5
13531 ac_status=$?
13532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13533 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013534 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013535else
Martin v. Löwis11437992002-04-12 09:54:03 +000013536 echo "$as_me: failed program was:" >&5
13537cat conftest.$ac_ext >&5
13538
13539cat >>confdefs.h <<\_ACEOF
13540#define volatile
13541_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013542
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013543
Guido van Rossum627b2d71993-12-24 10:39:16 +000013544fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013545rm -f conftest.$ac_objext conftest.$ac_ext
13546echo "$as_me:$LINENO: result: $works" >&5
13547echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013548
Guido van Rossumda88dad1995-01-26 00:46:29 +000013549works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013550echo "$as_me:$LINENO: checking for working signed char" >&5
13551echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13552cat >conftest.$ac_ext <<_ACEOF
13553#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013554#include "confdefs.h"
13555
Martin v. Löwis11437992002-04-12 09:54:03 +000013556#ifdef F77_DUMMY_MAIN
13557# ifdef __cplusplus
13558 extern "C"
13559# endif
13560 int F77_DUMMY_MAIN() { return 1; }
13561#endif
13562int
13563main ()
13564{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013565signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013566 ;
13567 return 0;
13568}
13569_ACEOF
13570rm -f conftest.$ac_objext
13571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13572 (eval $ac_compile) 2>&5
13573 ac_status=$?
13574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13575 (exit $ac_status); } &&
13576 { ac_try='test -s conftest.$ac_objext'
13577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13578 (eval $ac_try) 2>&5
13579 ac_status=$?
13580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13581 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013582 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013583else
Martin v. Löwis11437992002-04-12 09:54:03 +000013584 echo "$as_me: failed program was:" >&5
13585cat conftest.$ac_ext >&5
13586
13587cat >>confdefs.h <<\_ACEOF
13588#define signed
13589_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013590
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013591
Guido van Rossum7f43da71994-08-01 12:15:30 +000013592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013593rm -f conftest.$ac_objext conftest.$ac_ext
13594echo "$as_me:$LINENO: result: $works" >&5
13595echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013596
Guido van Rossumda88dad1995-01-26 00:46:29 +000013597have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013598echo "$as_me:$LINENO: checking for prototypes" >&5
13599echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13600cat >conftest.$ac_ext <<_ACEOF
13601#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013602#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013603int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013604#ifdef F77_DUMMY_MAIN
13605# ifdef __cplusplus
13606 extern "C"
13607# endif
13608 int F77_DUMMY_MAIN() { return 1; }
13609#endif
13610int
13611main ()
13612{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013613return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 ;
13615 return 0;
13616}
13617_ACEOF
13618rm -f conftest.$ac_objext
13619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13620 (eval $ac_compile) 2>&5
13621 ac_status=$?
13622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13623 (exit $ac_status); } &&
13624 { ac_try='test -s conftest.$ac_objext'
13625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13626 (eval $ac_try) 2>&5
13627 ac_status=$?
13628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13629 (exit $ac_status); }; }; then
13630
13631
13632cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013633#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013634_ACEOF
13635
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013636 have_prototypes=yes
13637
Guido van Rossumf78abae1997-01-21 22:02:36 +000013638else
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 echo "$as_me: failed program was:" >&5
13640cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013641fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013642rm -f conftest.$ac_objext conftest.$ac_ext
13643echo "$as_me:$LINENO: result: $have_prototypes" >&5
13644echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013645
Guido van Rossumda88dad1995-01-26 00:46:29 +000013646works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013647echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13648echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13649cat >conftest.$ac_ext <<_ACEOF
13650#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013651#include "confdefs.h"
13652
13653#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013654int foo(int x, ...) {
13655 va_list va;
13656 va_start(va, x);
13657 va_arg(va, int);
13658 va_arg(va, char *);
13659 va_arg(va, double);
13660 return 0;
13661}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013662
Martin v. Löwis11437992002-04-12 09:54:03 +000013663#ifdef F77_DUMMY_MAIN
13664# ifdef __cplusplus
13665 extern "C"
13666# endif
13667 int F77_DUMMY_MAIN() { return 1; }
13668#endif
13669int
13670main ()
13671{
Guido van Rossum90eea071996-08-30 20:58:57 +000013672return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013673 ;
13674 return 0;
13675}
13676_ACEOF
13677rm -f conftest.$ac_objext
13678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13679 (eval $ac_compile) 2>&5
13680 ac_status=$?
13681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13682 (exit $ac_status); } &&
13683 { ac_try='test -s conftest.$ac_objext'
13684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13685 (eval $ac_try) 2>&5
13686 ac_status=$?
13687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13688 (exit $ac_status); }; }; then
13689
13690
13691cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013692#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013693_ACEOF
13694
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013695 works=yes
13696
Guido van Rossumf78abae1997-01-21 22:02:36 +000013697else
Martin v. Löwis11437992002-04-12 09:54:03 +000013698 echo "$as_me: failed program was:" >&5
13699cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013700fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013701rm -f conftest.$ac_objext conftest.$ac_ext
13702echo "$as_me:$LINENO: result: $works" >&5
13703echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013704
Guido van Rossumda88dad1995-01-26 00:46:29 +000013705if test "$have_prototypes" = yes; then
13706bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013707echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13708echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13709cat >conftest.$ac_ext <<_ACEOF
13710#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013711#include "confdefs.h"
13712#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013713#ifdef F77_DUMMY_MAIN
13714# ifdef __cplusplus
13715 extern "C"
13716# endif
13717 int F77_DUMMY_MAIN() { return 1; }
13718#endif
13719int
13720main ()
13721{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013722char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013723 ;
13724 return 0;
13725}
13726_ACEOF
13727rm -f conftest.$ac_objext
13728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13729 (eval $ac_compile) 2>&5
13730 ac_status=$?
13731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13732 (exit $ac_status); } &&
13733 { ac_try='test -s conftest.$ac_objext'
13734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13735 (eval $ac_try) 2>&5
13736 ac_status=$?
13737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13738 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013739 :
13740else
Martin v. Löwis11437992002-04-12 09:54:03 +000013741 echo "$as_me: failed program was:" >&5
13742cat conftest.$ac_ext >&5
13743
13744cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013745#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013746_ACEOF
13747
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013748 bad_prototypes=yes
13749
Guido van Rossum627b2d71993-12-24 10:39:16 +000013750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013751rm -f conftest.$ac_objext conftest.$ac_ext
13752echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13753echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013754fi
13755
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013756# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013757echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13758echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13759cat >conftest.$ac_ext <<_ACEOF
13760#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013761#include "confdefs.h"
13762#include <sys/types.h>
13763#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013764#ifdef F77_DUMMY_MAIN
13765# ifdef __cplusplus
13766 extern "C"
13767# endif
13768 int F77_DUMMY_MAIN() { return 1; }
13769#endif
13770int
13771main ()
13772{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013773struct sockaddr x;
13774x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 ;
13776 return 0;
13777}
13778_ACEOF
13779rm -f conftest.$ac_objext
13780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13781 (eval $ac_compile) 2>&5
13782 ac_status=$?
13783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784 (exit $ac_status); } &&
13785 { ac_try='test -s conftest.$ac_objext'
13786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13787 (eval $ac_try) 2>&5
13788 ac_status=$?
13789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13790 (exit $ac_status); }; }; then
13791 echo "$as_me:$LINENO: result: yes" >&5
13792echo "${ECHO_T}yes" >&6
13793
13794cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013795#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013796_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013797
13798else
Martin v. Löwis11437992002-04-12 09:54:03 +000013799 echo "$as_me: failed program was:" >&5
13800cat conftest.$ac_ext >&5
13801echo "$as_me:$LINENO: result: no" >&5
13802echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013803fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013804rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013805
Martin v. Löwis11437992002-04-12 09:54:03 +000013806echo "$as_me:$LINENO: checking for bad static forward" >&5
13807echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13808if test "${ac_cv_bad_static_forward+set}" = set; then
13809 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013810else
13811 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013812 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013813else
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 cat >conftest.$ac_ext <<_ACEOF
13815#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013816#include "confdefs.h"
13817
13818struct s { int a; int b; };
13819static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013820int foobar() {
13821 static int random;
13822 random = (int) &foo;
13823 return random;
13824}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013825static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013826main() {
13827 exit(!((int)&foo == foobar()));
13828}
Martin v. Löwis11437992002-04-12 09:54:03 +000013829_ACEOF
13830rm -f conftest$ac_exeext
13831if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13832 (eval $ac_link) 2>&5
13833 ac_status=$?
13834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13837 (eval $ac_try) 2>&5
13838 ac_status=$?
13839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13840 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013841 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013842else
Martin v. Löwis11437992002-04-12 09:54:03 +000013843 echo "$as_me: program exited with status $ac_status" >&5
13844echo "$as_me: failed program was:" >&5
13845cat conftest.$ac_ext >&5
13846( exit $ac_status )
13847ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013848fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013849rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13850fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013851fi
13852
Martin v. Löwis11437992002-04-12 09:54:03 +000013853echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13854echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013855if test "$ac_cv_bad_static_forward" = yes
13856then
Martin v. Löwis11437992002-04-12 09:54:03 +000013857
13858cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013859#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013860_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013861
13862fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013863
Guido van Rossumda88dad1995-01-26 00:46:29 +000013864va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013865echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13866echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13867cat >conftest.$ac_ext <<_ACEOF
13868#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013869#include "confdefs.h"
13870
13871#ifdef HAVE_STDARG_PROTOTYPES
13872#include <stdarg.h>
13873#else
13874#include <varargs.h>
13875#endif
13876
Martin v. Löwis11437992002-04-12 09:54:03 +000013877#ifdef F77_DUMMY_MAIN
13878# ifdef __cplusplus
13879 extern "C"
13880# endif
13881 int F77_DUMMY_MAIN() { return 1; }
13882#endif
13883int
13884main ()
13885{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013886va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013887 ;
13888 return 0;
13889}
13890_ACEOF
13891rm -f conftest.$ac_objext
13892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13893 (eval $ac_compile) 2>&5
13894 ac_status=$?
13895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13896 (exit $ac_status); } &&
13897 { ac_try='test -s conftest.$ac_objext'
13898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13899 (eval $ac_try) 2>&5
13900 ac_status=$?
13901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13902 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013903 :
13904else
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 echo "$as_me: failed program was:" >&5
13906cat conftest.$ac_ext >&5
13907
13908
13909cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013910#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013911_ACEOF
13912
Guido van Rossumda88dad1995-01-26 00:46:29 +000013913 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013914
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013915fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013916rm -f conftest.$ac_objext conftest.$ac_ext
13917echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13918echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013919
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013920# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013921
13922
13923
13924echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13925echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13926if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13927 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013928else
Martin v. Löwis11437992002-04-12 09:54:03 +000013929 cat >conftest.$ac_ext <<_ACEOF
13930#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013931#include "confdefs.h"
13932/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013934#include <assert.h>
13935/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013936#ifdef __cplusplus
13937extern "C"
13938#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013939/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 builtin and then its argument prototype would still apply. */
13941char gethostbyname_r ();
13942char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013943
Martin v. Löwis11437992002-04-12 09:54:03 +000013944#ifdef F77_DUMMY_MAIN
13945# ifdef __cplusplus
13946 extern "C"
13947# endif
13948 int F77_DUMMY_MAIN() { return 1; }
13949#endif
13950int
13951main ()
13952{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013953/* The GNU C library defines this for functions which it implements
13954 to always fail with ENOSYS. Some functions are actually named
13955 something starting with __ and the normal name is an alias. */
13956#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13957choke me
13958#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013959f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013960#endif
13961
Martin v. Löwis11437992002-04-12 09:54:03 +000013962 ;
13963 return 0;
13964}
13965_ACEOF
13966rm -f conftest.$ac_objext conftest$ac_exeext
13967if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13968 (eval $ac_link) 2>&5
13969 ac_status=$?
13970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13971 (exit $ac_status); } &&
13972 { ac_try='test -s conftest$ac_exeext'
13973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13974 (eval $ac_try) 2>&5
13975 ac_status=$?
13976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13977 (exit $ac_status); }; }; then
13978 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013979else
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 echo "$as_me: failed program was:" >&5
13981cat conftest.$ac_ext >&5
13982ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013983fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013984rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013985fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013986echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13987echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13988if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013989
Martin v. Löwis11437992002-04-12 09:54:03 +000013990 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013991#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013992_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013993
Martin v. Löwis11437992002-04-12 09:54:03 +000013994 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13995echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013996 OLD_CFLAGS=$CFLAGS
13997 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013998 cat >conftest.$ac_ext <<_ACEOF
13999#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014000#include "confdefs.h"
14001
14002# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014003
14004#ifdef F77_DUMMY_MAIN
14005# ifdef __cplusplus
14006 extern "C"
14007# endif
14008 int F77_DUMMY_MAIN() { return 1; }
14009#endif
14010int
14011main ()
14012{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014013
14014 char *name;
14015 struct hostent *he, *res;
14016 char buffer[2048];
14017 int buflen = 2048;
14018 int h_errnop;
14019
14020 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014021
14022 ;
14023 return 0;
14024}
14025_ACEOF
14026rm -f conftest.$ac_objext
14027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14028 (eval $ac_compile) 2>&5
14029 ac_status=$?
14030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14031 (exit $ac_status); } &&
14032 { ac_try='test -s conftest.$ac_objext'
14033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14034 (eval $ac_try) 2>&5
14035 ac_status=$?
14036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14037 (exit $ac_status); }; }; then
14038
14039 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014040#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014041_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014042
Martin v. Löwis11437992002-04-12 09:54:03 +000014043
14044cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014045#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014046_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014047
Martin v. Löwis11437992002-04-12 09:54:03 +000014048 echo "$as_me:$LINENO: result: yes" >&5
14049echo "${ECHO_T}yes" >&6
14050
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014051else
Martin v. Löwis11437992002-04-12 09:54:03 +000014052 echo "$as_me: failed program was:" >&5
14053cat conftest.$ac_ext >&5
14054
14055 echo "$as_me:$LINENO: result: no" >&5
14056echo "${ECHO_T}no" >&6
14057 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14058echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14059 cat >conftest.$ac_ext <<_ACEOF
14060#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014061#include "confdefs.h"
14062
14063# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014064
14065#ifdef F77_DUMMY_MAIN
14066# ifdef __cplusplus
14067 extern "C"
14068# endif
14069 int F77_DUMMY_MAIN() { return 1; }
14070#endif
14071int
14072main ()
14073{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014074
14075 char *name;
14076 struct hostent *he;
14077 char buffer[2048];
14078 int buflen = 2048;
14079 int h_errnop;
14080
14081 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014082
14083 ;
14084 return 0;
14085}
14086_ACEOF
14087rm -f conftest.$ac_objext
14088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14089 (eval $ac_compile) 2>&5
14090 ac_status=$?
14091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14092 (exit $ac_status); } &&
14093 { ac_try='test -s conftest.$ac_objext'
14094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14095 (eval $ac_try) 2>&5
14096 ac_status=$?
14097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14098 (exit $ac_status); }; }; then
14099
14100 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014101#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014102_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014103
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
14105cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014106#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014107_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014108
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 echo "$as_me:$LINENO: result: yes" >&5
14110echo "${ECHO_T}yes" >&6
14111
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014112else
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 echo "$as_me: failed program was:" >&5
14114cat conftest.$ac_ext >&5
14115
14116 echo "$as_me:$LINENO: result: no" >&5
14117echo "${ECHO_T}no" >&6
14118 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14119echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14120 cat >conftest.$ac_ext <<_ACEOF
14121#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014122#include "confdefs.h"
14123
14124# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014125
14126#ifdef F77_DUMMY_MAIN
14127# ifdef __cplusplus
14128 extern "C"
14129# endif
14130 int F77_DUMMY_MAIN() { return 1; }
14131#endif
14132int
14133main ()
14134{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014135
14136 char *name;
14137 struct hostent *he;
14138 struct hostent_data data;
14139
14140 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014141
14142 ;
14143 return 0;
14144}
14145_ACEOF
14146rm -f conftest.$ac_objext
14147if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14148 (eval $ac_compile) 2>&5
14149 ac_status=$?
14150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14151 (exit $ac_status); } &&
14152 { ac_try='test -s conftest.$ac_objext'
14153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14154 (eval $ac_try) 2>&5
14155 ac_status=$?
14156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14157 (exit $ac_status); }; }; then
14158
14159 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014160#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014161_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014162
Martin v. Löwis11437992002-04-12 09:54:03 +000014163
14164cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014165#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014166_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014167
Martin v. Löwis11437992002-04-12 09:54:03 +000014168 echo "$as_me:$LINENO: result: yes" >&5
14169echo "${ECHO_T}yes" >&6
14170
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014171else
Martin v. Löwis11437992002-04-12 09:54:03 +000014172 echo "$as_me: failed program was:" >&5
14173cat conftest.$ac_ext >&5
14174
14175 echo "$as_me:$LINENO: result: no" >&5
14176echo "${ECHO_T}no" >&6
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
14183
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014184fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014185rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014186 CFLAGS=$OLD_CFLAGS
14187
14188else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014189
Martin v. Löwis11437992002-04-12 09:54:03 +000014190
14191for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014192do
Martin v. Löwis11437992002-04-12 09:54:03 +000014193as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14194echo "$as_me:$LINENO: checking for $ac_func" >&5
14195echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14196if eval "test \"\${$as_ac_var+set}\" = set"; then
14197 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014198else
Martin v. Löwis11437992002-04-12 09:54:03 +000014199 cat >conftest.$ac_ext <<_ACEOF
14200#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014201#include "confdefs.h"
14202/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014203 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014204#include <assert.h>
14205/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014206#ifdef __cplusplus
14207extern "C"
14208#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014209/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014210 builtin and then its argument prototype would still apply. */
14211char $ac_func ();
14212char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014213
Martin v. Löwis11437992002-04-12 09:54:03 +000014214#ifdef F77_DUMMY_MAIN
14215# ifdef __cplusplus
14216 extern "C"
14217# endif
14218 int F77_DUMMY_MAIN() { return 1; }
14219#endif
14220int
14221main ()
14222{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014223/* The GNU C library defines this for functions which it implements
14224 to always fail with ENOSYS. Some functions are actually named
14225 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014226#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014227choke me
14228#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014229f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014230#endif
14231
Martin v. Löwis11437992002-04-12 09:54:03 +000014232 ;
14233 return 0;
14234}
14235_ACEOF
14236rm -f conftest.$ac_objext conftest$ac_exeext
14237if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14238 (eval $ac_link) 2>&5
14239 ac_status=$?
14240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14241 (exit $ac_status); } &&
14242 { ac_try='test -s conftest$ac_exeext'
14243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14244 (eval $ac_try) 2>&5
14245 ac_status=$?
14246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14247 (exit $ac_status); }; }; then
14248 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014249else
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 echo "$as_me: failed program was:" >&5
14251cat conftest.$ac_ext >&5
14252eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014253fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014254rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014255fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014256echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14257echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14258if test `eval echo '${'$as_ac_var'}'` = yes; then
14259 cat >>confdefs.h <<_ACEOF
14260#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14261_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014262
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014263fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014264done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014265
Michael W. Hudson54241132001-12-07 15:38:26 +000014266
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014267fi
14268
Michael W. Hudson54241132001-12-07 15:38:26 +000014269
14270
14271
14272
14273
14274
Guido van Rossum627b2d71993-12-24 10:39:16 +000014275# checks for system services
14276# (none yet)
14277
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014278# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014279echo "$as_me:$LINENO: checking for __fpu_control" >&5
14280echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14281if test "${ac_cv_func___fpu_control+set}" = set; then
14282 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014283else
Martin v. Löwis11437992002-04-12 09:54:03 +000014284 cat >conftest.$ac_ext <<_ACEOF
14285#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014286#include "confdefs.h"
14287/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014288 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014289#include <assert.h>
14290/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014291#ifdef __cplusplus
14292extern "C"
14293#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014294/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014295 builtin and then its argument prototype would still apply. */
14296char __fpu_control ();
14297char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014298
Martin v. Löwis11437992002-04-12 09:54:03 +000014299#ifdef F77_DUMMY_MAIN
14300# ifdef __cplusplus
14301 extern "C"
14302# endif
14303 int F77_DUMMY_MAIN() { return 1; }
14304#endif
14305int
14306main ()
14307{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014308/* The GNU C library defines this for functions which it implements
14309 to always fail with ENOSYS. Some functions are actually named
14310 something starting with __ and the normal name is an alias. */
14311#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14312choke me
14313#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014314f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014315#endif
14316
Martin v. Löwis11437992002-04-12 09:54:03 +000014317 ;
14318 return 0;
14319}
14320_ACEOF
14321rm -f conftest.$ac_objext conftest$ac_exeext
14322if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14323 (eval $ac_link) 2>&5
14324 ac_status=$?
14325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14326 (exit $ac_status); } &&
14327 { ac_try='test -s conftest$ac_exeext'
14328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14329 (eval $ac_try) 2>&5
14330 ac_status=$?
14331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14332 (exit $ac_status); }; }; then
14333 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014334else
Martin v. Löwis11437992002-04-12 09:54:03 +000014335 echo "$as_me: failed program was:" >&5
14336cat conftest.$ac_ext >&5
14337ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014338fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014339rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014340fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014341echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14342echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14343if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014344 :
14345else
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
14347echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14348echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14349if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14350 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014351else
Martin v. Löwis11437992002-04-12 09:54:03 +000014352 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014353LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014354cat >conftest.$ac_ext <<_ACEOF
14355#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014356#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014357
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014358/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014359#ifdef __cplusplus
14360extern "C"
14361#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014362/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014363 builtin and then its argument prototype would still apply. */
14364char __fpu_control ();
14365#ifdef F77_DUMMY_MAIN
14366# ifdef __cplusplus
14367 extern "C"
14368# endif
14369 int F77_DUMMY_MAIN() { return 1; }
14370#endif
14371int
14372main ()
14373{
14374__fpu_control ();
14375 ;
14376 return 0;
14377}
14378_ACEOF
14379rm -f conftest.$ac_objext conftest$ac_exeext
14380if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14381 (eval $ac_link) 2>&5
14382 ac_status=$?
14383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14384 (exit $ac_status); } &&
14385 { ac_try='test -s conftest$ac_exeext'
14386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14387 (eval $ac_try) 2>&5
14388 ac_status=$?
14389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14390 (exit $ac_status); }; }; then
14391 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014392else
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 echo "$as_me: failed program was:" >&5
14394cat conftest.$ac_ext >&5
14395ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014397rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14398LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014399fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014400echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14401echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14402if test $ac_cv_lib_ieee___fpu_control = yes; then
14403 cat >>confdefs.h <<_ACEOF
14404#define HAVE_LIBIEEE 1
14405_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014406
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014407 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014408
Guido van Rossum627b2d71993-12-24 10:39:16 +000014409fi
14410
Michael W. Hudson54241132001-12-07 15:38:26 +000014411
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014412fi
14413
Michael W. Hudson54241132001-12-07 15:38:26 +000014414
Guido van Rossum7f253911997-05-09 02:42:48 +000014415# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014416echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14417echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14418
Guido van Rossum7f253911997-05-09 02:42:48 +000014419# Check whether --with-fpectl or --without-fpectl was given.
14420if test "${with_fpectl+set}" = set; then
14421 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014422
Guido van Rossum7f253911997-05-09 02:42:48 +000014423if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014424then
14425
14426cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014427#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014428_ACEOF
14429
14430 echo "$as_me:$LINENO: result: yes" >&5
14431echo "${ECHO_T}yes" >&6
14432else echo "$as_me:$LINENO: result: no" >&5
14433echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014434fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014435else
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 echo "$as_me:$LINENO: result: no" >&5
14437echo "${ECHO_T}no" >&6
14438fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014439
Guido van Rossum7f43da71994-08-01 12:15:30 +000014440# check for --with-libm=...
14441
Guido van Rossum563e7081996-09-10 18:20:48 +000014442case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014443Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014444BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014445*) LIBM=-lm
14446esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014447echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14448echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14449
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014450# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014451if test "${with_libm+set}" = set; then
14452 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014453
Guido van Rossum7f253911997-05-09 02:42:48 +000014454if test "$withval" = no
14455then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014456 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14457echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014458elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014459then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014460 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14461echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14462else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14463echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14464 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014465fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014466else
Martin v. Löwis11437992002-04-12 09:54:03 +000014467 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14468echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14469fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014470
14471# check for --with-libc=...
14472
Martin v. Löwis11437992002-04-12 09:54:03 +000014473echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14474echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14475
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014476# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014477if test "${with_libc+set}" = set; then
14478 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014479
Guido van Rossum7f253911997-05-09 02:42:48 +000014480if test "$withval" = no
14481then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14483echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014484elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014485then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014486 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14487echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14488else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14489echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14490 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014491fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014492else
Martin v. Löwis11437992002-04-12 09:54:03 +000014493 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14494echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14495fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014496
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014497# check for hypot() in math library
14498LIBS_SAVE=$LIBS
14499LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014500
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014501for ac_func in hypot
14502do
Martin v. Löwis11437992002-04-12 09:54:03 +000014503as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14504echo "$as_me:$LINENO: checking for $ac_func" >&5
14505echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14506if eval "test \"\${$as_ac_var+set}\" = set"; then
14507 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014508else
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 cat >conftest.$ac_ext <<_ACEOF
14510#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014511#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014512/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014514#include <assert.h>
14515/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014516#ifdef __cplusplus
14517extern "C"
14518#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014519/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014520 builtin and then its argument prototype would still apply. */
14521char $ac_func ();
14522char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014523
Martin v. Löwis11437992002-04-12 09:54:03 +000014524#ifdef F77_DUMMY_MAIN
14525# ifdef __cplusplus
14526 extern "C"
14527# endif
14528 int F77_DUMMY_MAIN() { return 1; }
14529#endif
14530int
14531main ()
14532{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014533/* The GNU C library defines this for functions which it implements
14534 to always fail with ENOSYS. Some functions are actually named
14535 something starting with __ and the normal name is an alias. */
14536#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14537choke me
14538#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014539f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014540#endif
14541
Martin v. Löwis11437992002-04-12 09:54:03 +000014542 ;
14543 return 0;
14544}
14545_ACEOF
14546rm -f conftest.$ac_objext conftest$ac_exeext
14547if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14548 (eval $ac_link) 2>&5
14549 ac_status=$?
14550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551 (exit $ac_status); } &&
14552 { ac_try='test -s conftest$ac_exeext'
14553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14554 (eval $ac_try) 2>&5
14555 ac_status=$?
14556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14557 (exit $ac_status); }; }; then
14558 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014559else
Martin v. Löwis11437992002-04-12 09:54:03 +000014560 echo "$as_me: failed program was:" >&5
14561cat conftest.$ac_ext >&5
14562eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014564rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014566echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14567echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14568if test `eval echo '${'$as_ac_var'}'` = yes; then
14569 cat >>confdefs.h <<_ACEOF
14570#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14571_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014572
Michael W. Hudson54241132001-12-07 15:38:26 +000014573else
Martin v. Löwis11437992002-04-12 09:54:03 +000014574 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014575fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014576done
14577
Michael W. Hudson54241132001-12-07 15:38:26 +000014578
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014579LIBS=$LIBS_SAVE
14580
Guido van Rossumad713701997-07-10 22:42:38 +000014581# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014582echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14583echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14584if test "${ac_cv_malloc_zero+set}" = set; then
14585 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014586else
14587 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014588 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014589else
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 cat >conftest.$ac_ext <<_ACEOF
14591#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014592#include "confdefs.h"
14593#include <stdio.h>
14594#ifdef HAVE_STDLIB
14595#include <stdlib.h>
14596#else
14597char *malloc(), *realloc();
14598int *free();
14599#endif
14600main() {
14601 char *p;
14602 p = malloc(0);
14603 if (p == NULL) exit(1);
14604 p = realloc(p, 0);
14605 if (p == NULL) exit(1);
14606 free(p);
14607 exit(0);
14608}
Martin v. Löwis11437992002-04-12 09:54:03 +000014609_ACEOF
14610rm -f conftest$ac_exeext
14611if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14612 (eval $ac_link) 2>&5
14613 ac_status=$?
14614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14615 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14617 (eval $ac_try) 2>&5
14618 ac_status=$?
14619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14620 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014621 ac_cv_malloc_zero=nonnull
14622else
Martin v. Löwis11437992002-04-12 09:54:03 +000014623 echo "$as_me: program exited with status $ac_status" >&5
14624echo "$as_me: failed program was:" >&5
14625cat conftest.$ac_ext >&5
14626( exit $ac_status )
14627ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014628fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014629rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014630fi
Guido van Rossumad713701997-07-10 22:42:38 +000014631fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014632 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014633echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14634echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014635if test "$ac_cv_malloc_zero" = null
14636then
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
14638cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014639#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014640_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014641
14642fi
14643
Guido van Rossumef2255b2000-03-10 22:30:29 +000014644# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014645if test "${ac_cv_header_wchar_h+set}" = set; then
14646 echo "$as_me:$LINENO: checking for wchar.h" >&5
14647echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14648if test "${ac_cv_header_wchar_h+set}" = set; then
14649 echo $ECHO_N "(cached) $ECHO_C" >&6
14650fi
14651echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14652echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014653else
Martin v. Löwis11437992002-04-12 09:54:03 +000014654 # Is the header compilable?
14655echo "$as_me:$LINENO: checking wchar.h usability" >&5
14656echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14657cat >conftest.$ac_ext <<_ACEOF
14658#line $LINENO "configure"
14659#include "confdefs.h"
14660$ac_includes_default
14661#include <wchar.h>
14662_ACEOF
14663rm -f conftest.$ac_objext
14664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14665 (eval $ac_compile) 2>&5
14666 ac_status=$?
14667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14668 (exit $ac_status); } &&
14669 { ac_try='test -s conftest.$ac_objext'
14670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14671 (eval $ac_try) 2>&5
14672 ac_status=$?
14673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14674 (exit $ac_status); }; }; then
14675 ac_header_compiler=yes
14676else
14677 echo "$as_me: failed program was:" >&5
14678cat conftest.$ac_ext >&5
14679ac_header_compiler=no
14680fi
14681rm -f conftest.$ac_objext conftest.$ac_ext
14682echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14683echo "${ECHO_T}$ac_header_compiler" >&6
14684
14685# Is the header present?
14686echo "$as_me:$LINENO: checking wchar.h presence" >&5
14687echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14688cat >conftest.$ac_ext <<_ACEOF
14689#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014690#include "confdefs.h"
14691#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014692_ACEOF
14693if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14694 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14695 ac_status=$?
14696 egrep -v '^ *\+' conftest.er1 >conftest.err
14697 rm -f conftest.er1
14698 cat conftest.err >&5
14699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14700 (exit $ac_status); } >/dev/null; then
14701 if test -s conftest.err; then
14702 ac_cpp_err=$ac_c_preproc_warn_flag
14703 else
14704 ac_cpp_err=
14705 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014706else
Martin v. Löwis11437992002-04-12 09:54:03 +000014707 ac_cpp_err=yes
14708fi
14709if test -z "$ac_cpp_err"; then
14710 ac_header_preproc=yes
14711else
14712 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014713 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014714 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014715fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014716rm -f conftest.err conftest.$ac_ext
14717echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14718echo "${ECHO_T}$ac_header_preproc" >&6
14719
14720# So? What about this header?
14721case $ac_header_compiler:$ac_header_preproc in
14722 yes:no )
14723 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14724echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14725 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14726echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14727 no:yes )
14728 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14729echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14730 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14731echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14732 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14733echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14734esac
14735echo "$as_me:$LINENO: checking for wchar.h" >&5
14736echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14737if test "${ac_cv_header_wchar_h+set}" = set; then
14738 echo $ECHO_N "(cached) $ECHO_C" >&6
14739else
14740 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014741fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014742echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14743echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14744
14745fi
14746if test $ac_cv_header_wchar_h = yes; then
14747
14748
14749cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014750#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014751_ACEOF
14752
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014753 wchar_h="yes"
14754
Guido van Rossumef2255b2000-03-10 22:30:29 +000014755else
Martin v. Löwis11437992002-04-12 09:54:03 +000014756 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014757
14758fi
14759
Michael W. Hudson54241132001-12-07 15:38:26 +000014760
Martin v. Löwis11437992002-04-12 09:54:03 +000014761
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014762# determine wchar_t size
14763if test "$wchar_h" = yes
14764then
Martin v. Löwis11437992002-04-12 09:54:03 +000014765 echo "$as_me:$LINENO: checking for wchar_t" >&5
14766echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14767if test "${ac_cv_type_wchar_t+set}" = set; then
14768 echo $ECHO_N "(cached) $ECHO_C" >&6
14769else
14770 cat >conftest.$ac_ext <<_ACEOF
14771#line $LINENO "configure"
14772#include "confdefs.h"
14773#include <wchar.h>
14774
14775#ifdef F77_DUMMY_MAIN
14776# ifdef __cplusplus
14777 extern "C"
14778# endif
14779 int F77_DUMMY_MAIN() { return 1; }
14780#endif
14781int
14782main ()
14783{
14784if ((wchar_t *) 0)
14785 return 0;
14786if (sizeof (wchar_t))
14787 return 0;
14788 ;
14789 return 0;
14790}
14791_ACEOF
14792rm -f conftest.$ac_objext
14793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14794 (eval $ac_compile) 2>&5
14795 ac_status=$?
14796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14797 (exit $ac_status); } &&
14798 { ac_try='test -s conftest.$ac_objext'
14799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14800 (eval $ac_try) 2>&5
14801 ac_status=$?
14802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14803 (exit $ac_status); }; }; then
14804 ac_cv_type_wchar_t=yes
14805else
14806 echo "$as_me: failed program was:" >&5
14807cat conftest.$ac_ext >&5
14808ac_cv_type_wchar_t=no
14809fi
14810rm -f conftest.$ac_objext conftest.$ac_ext
14811fi
14812echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14813echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14814
14815echo "$as_me:$LINENO: checking size of wchar_t" >&5
14816echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14817if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14818 echo $ECHO_N "(cached) $ECHO_C" >&6
14819else
14820 if test "$ac_cv_type_wchar_t" = yes; then
14821 # The cast to unsigned long works around a bug in the HP C Compiler
14822 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14823 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14824 # This bug is HP SR number 8606223364.
14825 if test "$cross_compiling" = yes; then
14826 # Depending upon the size, compute the lo and hi bounds.
14827cat >conftest.$ac_ext <<_ACEOF
14828#line $LINENO "configure"
14829#include "confdefs.h"
14830#include <wchar.h>
14831
14832#ifdef F77_DUMMY_MAIN
14833# ifdef __cplusplus
14834 extern "C"
14835# endif
14836 int F77_DUMMY_MAIN() { return 1; }
14837#endif
14838int
14839main ()
14840{
14841static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14842test_array [0] = 0
14843
14844 ;
14845 return 0;
14846}
14847_ACEOF
14848rm -f conftest.$ac_objext
14849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14850 (eval $ac_compile) 2>&5
14851 ac_status=$?
14852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14853 (exit $ac_status); } &&
14854 { ac_try='test -s conftest.$ac_objext'
14855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14856 (eval $ac_try) 2>&5
14857 ac_status=$?
14858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859 (exit $ac_status); }; }; then
14860 ac_lo=0 ac_mid=0
14861 while :; do
14862 cat >conftest.$ac_ext <<_ACEOF
14863#line $LINENO "configure"
14864#include "confdefs.h"
14865#include <wchar.h>
14866
14867#ifdef F77_DUMMY_MAIN
14868# ifdef __cplusplus
14869 extern "C"
14870# endif
14871 int F77_DUMMY_MAIN() { return 1; }
14872#endif
14873int
14874main ()
14875{
14876static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14877test_array [0] = 0
14878
14879 ;
14880 return 0;
14881}
14882_ACEOF
14883rm -f conftest.$ac_objext
14884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14885 (eval $ac_compile) 2>&5
14886 ac_status=$?
14887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14888 (exit $ac_status); } &&
14889 { ac_try='test -s conftest.$ac_objext'
14890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14891 (eval $ac_try) 2>&5
14892 ac_status=$?
14893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14894 (exit $ac_status); }; }; then
14895 ac_hi=$ac_mid; break
14896else
14897 echo "$as_me: failed program was:" >&5
14898cat conftest.$ac_ext >&5
14899ac_lo=`expr $ac_mid + 1`
14900 if test $ac_lo -le $ac_mid; then
14901 ac_lo= ac_hi=
14902 break
14903 fi
14904 ac_mid=`expr 2 '*' $ac_mid + 1`
14905fi
14906rm -f conftest.$ac_objext conftest.$ac_ext
14907 done
14908else
14909 echo "$as_me: failed program was:" >&5
14910cat conftest.$ac_ext >&5
14911cat >conftest.$ac_ext <<_ACEOF
14912#line $LINENO "configure"
14913#include "confdefs.h"
14914#include <wchar.h>
14915
14916#ifdef F77_DUMMY_MAIN
14917# ifdef __cplusplus
14918 extern "C"
14919# endif
14920 int F77_DUMMY_MAIN() { return 1; }
14921#endif
14922int
14923main ()
14924{
14925static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14926test_array [0] = 0
14927
14928 ;
14929 return 0;
14930}
14931_ACEOF
14932rm -f conftest.$ac_objext
14933if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14934 (eval $ac_compile) 2>&5
14935 ac_status=$?
14936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14937 (exit $ac_status); } &&
14938 { ac_try='test -s conftest.$ac_objext'
14939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14940 (eval $ac_try) 2>&5
14941 ac_status=$?
14942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14943 (exit $ac_status); }; }; then
14944 ac_hi=-1 ac_mid=-1
14945 while :; do
14946 cat >conftest.$ac_ext <<_ACEOF
14947#line $LINENO "configure"
14948#include "confdefs.h"
14949#include <wchar.h>
14950
14951#ifdef F77_DUMMY_MAIN
14952# ifdef __cplusplus
14953 extern "C"
14954# endif
14955 int F77_DUMMY_MAIN() { return 1; }
14956#endif
14957int
14958main ()
14959{
14960static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14961test_array [0] = 0
14962
14963 ;
14964 return 0;
14965}
14966_ACEOF
14967rm -f conftest.$ac_objext
14968if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14969 (eval $ac_compile) 2>&5
14970 ac_status=$?
14971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14972 (exit $ac_status); } &&
14973 { ac_try='test -s conftest.$ac_objext'
14974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14975 (eval $ac_try) 2>&5
14976 ac_status=$?
14977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14978 (exit $ac_status); }; }; then
14979 ac_lo=$ac_mid; break
14980else
14981 echo "$as_me: failed program was:" >&5
14982cat conftest.$ac_ext >&5
14983ac_hi=`expr '(' $ac_mid ')' - 1`
14984 if test $ac_mid -le $ac_hi; then
14985 ac_lo= ac_hi=
14986 break
14987 fi
14988 ac_mid=`expr 2 '*' $ac_mid`
14989fi
14990rm -f conftest.$ac_objext conftest.$ac_ext
14991 done
14992else
14993 echo "$as_me: failed program was:" >&5
14994cat conftest.$ac_ext >&5
14995ac_lo= ac_hi=
14996fi
14997rm -f conftest.$ac_objext conftest.$ac_ext
14998fi
14999rm -f conftest.$ac_objext conftest.$ac_ext
15000# Binary search between lo and hi bounds.
15001while test "x$ac_lo" != "x$ac_hi"; do
15002 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15003 cat >conftest.$ac_ext <<_ACEOF
15004#line $LINENO "configure"
15005#include "confdefs.h"
15006#include <wchar.h>
15007
15008#ifdef F77_DUMMY_MAIN
15009# ifdef __cplusplus
15010 extern "C"
15011# endif
15012 int F77_DUMMY_MAIN() { return 1; }
15013#endif
15014int
15015main ()
15016{
15017static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15018test_array [0] = 0
15019
15020 ;
15021 return 0;
15022}
15023_ACEOF
15024rm -f conftest.$ac_objext
15025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15026 (eval $ac_compile) 2>&5
15027 ac_status=$?
15028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15029 (exit $ac_status); } &&
15030 { ac_try='test -s conftest.$ac_objext'
15031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15032 (eval $ac_try) 2>&5
15033 ac_status=$?
15034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15035 (exit $ac_status); }; }; then
15036 ac_hi=$ac_mid
15037else
15038 echo "$as_me: failed program was:" >&5
15039cat conftest.$ac_ext >&5
15040ac_lo=`expr '(' $ac_mid ')' + 1`
15041fi
15042rm -f conftest.$ac_objext conftest.$ac_ext
15043done
15044case $ac_lo in
15045?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15046'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15047echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15048 { (exit 1); exit 1; }; } ;;
15049esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015050else
15051 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015052 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15053echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15054 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015055else
Martin v. Löwis11437992002-04-12 09:54:03 +000015056 cat >conftest.$ac_ext <<_ACEOF
15057#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015058#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015059#include <wchar.h>
15060
15061long longval () { return (long) (sizeof (wchar_t)); }
15062unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015063#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015064#include <stdlib.h>
15065#ifdef F77_DUMMY_MAIN
15066# ifdef __cplusplus
15067 extern "C"
15068# endif
15069 int F77_DUMMY_MAIN() { return 1; }
15070#endif
15071int
15072main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015073{
Martin v. Löwis11437992002-04-12 09:54:03 +000015074
15075 FILE *f = fopen ("conftest.val", "w");
15076 if (! f)
15077 exit (1);
15078 if (((long) (sizeof (wchar_t))) < 0)
15079 {
15080 long i = longval ();
15081 if (i != ((long) (sizeof (wchar_t))))
15082 exit (1);
15083 fprintf (f, "%ld\n", i);
15084 }
15085 else
15086 {
15087 unsigned long i = ulongval ();
15088 if (i != ((long) (sizeof (wchar_t))))
15089 exit (1);
15090 fprintf (f, "%lu\n", i);
15091 }
15092 exit (ferror (f) || fclose (f) != 0);
15093
15094 ;
15095 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015096}
Martin v. Löwis11437992002-04-12 09:54:03 +000015097_ACEOF
15098rm -f conftest$ac_exeext
15099if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15100 (eval $ac_link) 2>&5
15101 ac_status=$?
15102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15103 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15105 (eval $ac_try) 2>&5
15106 ac_status=$?
15107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15108 (exit $ac_status); }; }; then
15109 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015110else
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 echo "$as_me: program exited with status $ac_status" >&5
15112echo "$as_me: failed program was:" >&5
15113cat conftest.$ac_ext >&5
15114( exit $ac_status )
15115{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15116echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15117 { (exit 1); exit 1; }; }
15118fi
15119rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15120fi
15121fi
15122rm -f conftest.val
15123else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015124 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015125fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015127echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15128echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15129cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015130#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015131_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015132
Michael W. Hudson54241132001-12-07 15:38:26 +000015133
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015134fi
15135
Martin v. Löwis11437992002-04-12 09:54:03 +000015136echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15137echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015138# Check whether --enable-unicode or --disable-unicode was given.
15139if test "${enable_unicode+set}" = set; then
15140 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015141
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015142else
15143 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015144fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015145
15146if test $enable_unicode = yes
15147then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015148 # Without any arguments, Py_UNICODE defaults to two-byte mode
15149 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015150fi
15151
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015152
15153
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015154case "$enable_unicode" in
15155ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015156 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015157#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015158_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015159
15160 ;;
15161ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015162 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015163#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015164_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015165
15166 ;;
15167esac
15168
Michael W. Hudson54241132001-12-07 15:38:26 +000015169
Martin v. Löwis11437992002-04-12 09:54:03 +000015170
15171
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015172
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015173if test "$enable_unicode" = "no"
15174then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015175 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 echo "$as_me:$LINENO: result: not used" >&5
15177echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015178else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015179 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015180
15181cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015182#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015183_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015184
15185 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15186 then
15187 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015188
Martin v. Löwis11437992002-04-12 09:54:03 +000015189cat >>confdefs.h <<\_ACEOF
15190#define HAVE_USABLE_WCHAR_T 1
15191_ACEOF
15192
15193 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015194#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015195_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015196
15197 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15198 then
15199 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015201#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015202_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015203
15204 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15205 then
15206 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015208#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015209_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015210
15211 else
15212 PY_UNICODE_TYPE="no type found"
15213 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15215echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015216fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015217
15218# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015219echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15220echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15221if test "${ac_cv_c_bigendian+set}" = set; then
15222 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015223else
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 # See if sys/param.h defines the BYTE_ORDER macro.
15225cat >conftest.$ac_ext <<_ACEOF
15226#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015227#include "confdefs.h"
15228#include <sys/types.h>
15229#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015230
Martin v. Löwis11437992002-04-12 09:54:03 +000015231#ifdef F77_DUMMY_MAIN
15232# ifdef __cplusplus
15233 extern "C"
15234# endif
15235 int F77_DUMMY_MAIN() { return 1; }
15236#endif
15237int
15238main ()
15239{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015240#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15241 bogus endian macros
15242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015243
15244 ;
15245 return 0;
15246}
15247_ACEOF
15248rm -f conftest.$ac_objext
15249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15250 (eval $ac_compile) 2>&5
15251 ac_status=$?
15252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15253 (exit $ac_status); } &&
15254 { ac_try='test -s conftest.$ac_objext'
15255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15256 (eval $ac_try) 2>&5
15257 ac_status=$?
15258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15259 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015260 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015261cat >conftest.$ac_ext <<_ACEOF
15262#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015263#include "confdefs.h"
15264#include <sys/types.h>
15265#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015266
Martin v. Löwis11437992002-04-12 09:54:03 +000015267#ifdef F77_DUMMY_MAIN
15268# ifdef __cplusplus
15269 extern "C"
15270# endif
15271 int F77_DUMMY_MAIN() { return 1; }
15272#endif
15273int
15274main ()
15275{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015276#if BYTE_ORDER != BIG_ENDIAN
15277 not big endian
15278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015279
15280 ;
15281 return 0;
15282}
15283_ACEOF
15284rm -f conftest.$ac_objext
15285if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15286 (eval $ac_compile) 2>&5
15287 ac_status=$?
15288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15289 (exit $ac_status); } &&
15290 { ac_try='test -s conftest.$ac_objext'
15291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15292 (eval $ac_try) 2>&5
15293 ac_status=$?
15294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15295 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015296 ac_cv_c_bigendian=yes
15297else
Martin v. Löwis11437992002-04-12 09:54:03 +000015298 echo "$as_me: failed program was:" >&5
15299cat conftest.$ac_ext >&5
15300ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015301fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015302rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015303else
Martin v. Löwis11437992002-04-12 09:54:03 +000015304 echo "$as_me: failed program was:" >&5
15305cat conftest.$ac_ext >&5
15306# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015307if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015308 # try to guess the endianess by grep'ing values into an object file
15309 ac_cv_c_bigendian=unknown
15310 cat >conftest.$ac_ext <<_ACEOF
15311#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015312#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015313short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15314short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15315void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15316short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15317short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15318void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15319#ifdef F77_DUMMY_MAIN
15320# ifdef __cplusplus
15321 extern "C"
15322# endif
15323 int F77_DUMMY_MAIN() { return 1; }
15324#endif
15325int
15326main ()
15327{
15328 _ascii (); _ebcdic ();
15329 ;
15330 return 0;
15331}
15332_ACEOF
15333rm -f conftest.$ac_objext
15334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15335 (eval $ac_compile) 2>&5
15336 ac_status=$?
15337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15338 (exit $ac_status); } &&
15339 { ac_try='test -s conftest.$ac_objext'
15340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15341 (eval $ac_try) 2>&5
15342 ac_status=$?
15343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15344 (exit $ac_status); }; }; then
15345 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15346 ac_cv_c_bigendian=yes
15347fi
15348if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15349 if test "$ac_cv_c_bigendian" = unknown; then
15350 ac_cv_c_bigendian=no
15351 else
15352 # finding both strings is unlikely to happen, but who knows?
15353 ac_cv_c_bigendian=unknown
15354 fi
15355fi
15356else
15357 echo "$as_me: failed program was:" >&5
15358cat conftest.$ac_ext >&5
15359fi
15360rm -f conftest.$ac_objext conftest.$ac_ext
15361else
15362 cat >conftest.$ac_ext <<_ACEOF
15363#line $LINENO "configure"
15364#include "confdefs.h"
15365int
15366main ()
15367{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015368 /* Are we little or big endian? From Harbison&Steele. */
15369 union
15370 {
15371 long l;
15372 char c[sizeof (long)];
15373 } u;
15374 u.l = 1;
15375 exit (u.c[sizeof (long) - 1] == 1);
15376}
Martin v. Löwis11437992002-04-12 09:54:03 +000015377_ACEOF
15378rm -f conftest$ac_exeext
15379if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15380 (eval $ac_link) 2>&5
15381 ac_status=$?
15382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15383 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15385 (eval $ac_try) 2>&5
15386 ac_status=$?
15387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15388 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015389 ac_cv_c_bigendian=no
15390else
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 echo "$as_me: program exited with status $ac_status" >&5
15392echo "$as_me: failed program was:" >&5
15393cat conftest.$ac_ext >&5
15394( exit $ac_status )
15395ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015397rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015398fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015399fi
15400rm -f conftest.$ac_objext conftest.$ac_ext
15401fi
15402echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15403echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15404case $ac_cv_c_bigendian in
15405 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015406
Martin v. Löwis11437992002-04-12 09:54:03 +000015407cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015408#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015409_ACEOF
15410 ;;
15411 no)
15412 ;;
15413 *)
15414 { { echo "$as_me:$LINENO: error: unknown endianess
15415presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15416echo "$as_me: error: unknown endianess
15417presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15418 { (exit 1); exit 1; }; } ;;
15419esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015420
Michael W. Hudson54241132001-12-07 15:38:26 +000015421
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015422# Check whether right shifting a negative integer extends the sign bit
15423# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015424echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15425echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15426if test "${ac_cv_rshift_extends_sign+set}" = set; then
15427 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015428else
Martin v. Löwis11437992002-04-12 09:54:03 +000015429
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015430if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015431 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015432else
Martin v. Löwis11437992002-04-12 09:54:03 +000015433 cat >conftest.$ac_ext <<_ACEOF
15434#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015435#include "confdefs.h"
15436
15437int main()
15438{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015439 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015440}
15441
Martin v. Löwis11437992002-04-12 09:54:03 +000015442_ACEOF
15443rm -f conftest$ac_exeext
15444if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15445 (eval $ac_link) 2>&5
15446 ac_status=$?
15447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15448 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15450 (eval $ac_try) 2>&5
15451 ac_status=$?
15452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15453 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015454 ac_cv_rshift_extends_sign=yes
15455else
Martin v. Löwis11437992002-04-12 09:54:03 +000015456 echo "$as_me: program exited with status $ac_status" >&5
15457echo "$as_me: failed program was:" >&5
15458cat conftest.$ac_ext >&5
15459( exit $ac_status )
15460ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015461fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015462rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15463fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015464fi
15465
Martin v. Löwis11437992002-04-12 09:54:03 +000015466echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15467echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015468if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015469then
Martin v. Löwis11437992002-04-12 09:54:03 +000015470
15471cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015472#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015473_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015474
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015475fi
15476
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015477# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015478echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15479echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15480if test "${ac_cv_have_getc_unlocked+set}" = set; then
15481 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015482else
Martin v. Löwis11437992002-04-12 09:54:03 +000015483
15484cat >conftest.$ac_ext <<_ACEOF
15485#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015486#include "confdefs.h"
15487#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015488#ifdef F77_DUMMY_MAIN
15489# ifdef __cplusplus
15490 extern "C"
15491# endif
15492 int F77_DUMMY_MAIN() { return 1; }
15493#endif
15494int
15495main ()
15496{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015497
15498 FILE *f = fopen("/dev/null", "r");
15499 flockfile(f);
15500 getc_unlocked(f);
15501 funlockfile(f);
15502
Martin v. Löwis11437992002-04-12 09:54:03 +000015503 ;
15504 return 0;
15505}
15506_ACEOF
15507rm -f conftest.$ac_objext conftest$ac_exeext
15508if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15509 (eval $ac_link) 2>&5
15510 ac_status=$?
15511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15512 (exit $ac_status); } &&
15513 { ac_try='test -s conftest$ac_exeext'
15514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15515 (eval $ac_try) 2>&5
15516 ac_status=$?
15517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15518 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015519 ac_cv_have_getc_unlocked=yes
15520else
Martin v. Löwis11437992002-04-12 09:54:03 +000015521 echo "$as_me: failed program was:" >&5
15522cat conftest.$ac_ext >&5
15523ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015525rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015526fi
15527
Martin v. Löwis11437992002-04-12 09:54:03 +000015528echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15529echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015530if test "$ac_cv_have_getc_unlocked" = yes
15531then
Martin v. Löwis11437992002-04-12 09:54:03 +000015532
15533cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015534#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015535_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015536
15537fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015538
Martin v. Löwis0daad592001-09-30 21:09:59 +000015539# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015540echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15541echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15542if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15543 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015544else
Martin v. Löwis11437992002-04-12 09:54:03 +000015545 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015546LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015547cat >conftest.$ac_ext <<_ACEOF
15548#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015549#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015550
Guido van Rossum353ae582001-07-10 16:45:32 +000015551/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015552#ifdef __cplusplus
15553extern "C"
15554#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015555/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015556 builtin and then its argument prototype would still apply. */
15557char rl_pre_input_hook ();
15558#ifdef F77_DUMMY_MAIN
15559# ifdef __cplusplus
15560 extern "C"
15561# endif
15562 int F77_DUMMY_MAIN() { return 1; }
15563#endif
15564int
15565main ()
15566{
15567rl_pre_input_hook ();
15568 ;
15569 return 0;
15570}
15571_ACEOF
15572rm -f conftest.$ac_objext conftest$ac_exeext
15573if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15574 (eval $ac_link) 2>&5
15575 ac_status=$?
15576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15577 (exit $ac_status); } &&
15578 { ac_try='test -s conftest$ac_exeext'
15579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15580 (eval $ac_try) 2>&5
15581 ac_status=$?
15582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15583 (exit $ac_status); }; }; then
15584 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015585else
Martin v. Löwis11437992002-04-12 09:54:03 +000015586 echo "$as_me: failed program was:" >&5
15587cat conftest.$ac_ext >&5
15588ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015590rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15591LIBS=$ac_check_lib_save_LIBS
15592fi
15593echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15594echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15595if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015596
Martin v. Löwis11437992002-04-12 09:54:03 +000015597cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015598#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015599_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015600
Martin v. Löwis0daad592001-09-30 21:09:59 +000015601fi
15602
Michael W. Hudson54241132001-12-07 15:38:26 +000015603
Martin v. Löwis0daad592001-09-30 21:09:59 +000015604# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015605echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15606echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15607if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15608 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015609else
Martin v. Löwis11437992002-04-12 09:54:03 +000015610 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015611LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015612cat >conftest.$ac_ext <<_ACEOF
15613#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015614#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015615
Martin v. Löwis0daad592001-09-30 21:09:59 +000015616/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015617#ifdef __cplusplus
15618extern "C"
15619#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015620/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015621 builtin and then its argument prototype would still apply. */
15622char rl_completion_matches ();
15623#ifdef F77_DUMMY_MAIN
15624# ifdef __cplusplus
15625 extern "C"
15626# endif
15627 int F77_DUMMY_MAIN() { return 1; }
15628#endif
15629int
15630main ()
15631{
15632rl_completion_matches ();
15633 ;
15634 return 0;
15635}
15636_ACEOF
15637rm -f conftest.$ac_objext conftest$ac_exeext
15638if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15639 (eval $ac_link) 2>&5
15640 ac_status=$?
15641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15642 (exit $ac_status); } &&
15643 { ac_try='test -s conftest$ac_exeext'
15644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15645 (eval $ac_try) 2>&5
15646 ac_status=$?
15647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15648 (exit $ac_status); }; }; then
15649 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015650else
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 echo "$as_me: failed program was:" >&5
15652cat conftest.$ac_ext >&5
15653ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015655rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15656LIBS=$ac_check_lib_save_LIBS
15657fi
15658echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15659echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15660if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015661
Martin v. Löwis11437992002-04-12 09:54:03 +000015662cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015663#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015664_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015665
Guido van Rossum353ae582001-07-10 16:45:32 +000015666fi
15667
Jack Jansendd19cf82001-12-06 22:36:17 +000015668
Martin v. Löwis11437992002-04-12 09:54:03 +000015669echo "$as_me:$LINENO: checking for broken nice()" >&5
15670echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15671if test "${ac_cv_broken_nice+set}" = set; then
15672 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015673else
Martin v. Löwis11437992002-04-12 09:54:03 +000015674
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015675if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015676 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015677else
Martin v. Löwis11437992002-04-12 09:54:03 +000015678 cat >conftest.$ac_ext <<_ACEOF
15679#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015680#include "confdefs.h"
15681
15682int main()
15683{
15684 int val1 = nice(1);
15685 if (val1 != -1 && val1 == nice(2))
15686 exit(0);
15687 exit(1);
15688}
15689
Martin v. Löwis11437992002-04-12 09:54:03 +000015690_ACEOF
15691rm -f conftest$ac_exeext
15692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15693 (eval $ac_link) 2>&5
15694 ac_status=$?
15695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15698 (eval $ac_try) 2>&5
15699 ac_status=$?
15700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15701 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015702 ac_cv_broken_nice=yes
15703else
Martin v. Löwis11437992002-04-12 09:54:03 +000015704 echo "$as_me: program exited with status $ac_status" >&5
15705echo "$as_me: failed program was:" >&5
15706cat conftest.$ac_ext >&5
15707( exit $ac_status )
15708ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015709fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015710rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15711fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015712fi
15713
Martin v. Löwis11437992002-04-12 09:54:03 +000015714echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15715echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015716if test "$ac_cv_broken_nice" = yes
15717then
Martin v. Löwis11437992002-04-12 09:54:03 +000015718
15719cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015720#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015721_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015722
15723fi
15724
Jack Jansen666b1e72001-10-31 12:11:48 +000015725# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015726echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15727echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15728if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15729 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015730else
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 cat >conftest.$ac_ext <<_ACEOF
15732#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015733#include "confdefs.h"
15734#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015735#ifdef F77_DUMMY_MAIN
15736# ifdef __cplusplus
15737 extern "C"
15738# endif
15739 int F77_DUMMY_MAIN() { return 1; }
15740#endif
15741int
15742main ()
15743{
Jack Jansen666b1e72001-10-31 12:11:48 +000015744
15745 int rtn;
15746 rtn = mvwdelch(0,0,0);
15747
Martin v. Löwis11437992002-04-12 09:54:03 +000015748 ;
15749 return 0;
15750}
15751_ACEOF
15752rm -f conftest.$ac_objext
15753if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15754 (eval $ac_compile) 2>&5
15755 ac_status=$?
15756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15757 (exit $ac_status); } &&
15758 { ac_try='test -s conftest.$ac_objext'
15759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15760 (eval $ac_try) 2>&5
15761 ac_status=$?
15762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15763 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015764 ac_cv_mvwdelch_is_expression=yes
15765else
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 echo "$as_me: failed program was:" >&5
15767cat conftest.$ac_ext >&5
15768ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015769fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015770rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015771fi
15772
Martin v. Löwis11437992002-04-12 09:54:03 +000015773echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15774echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015775
15776if test "$ac_cv_mvwdelch_is_expression" = yes
15777then
Martin v. Löwis11437992002-04-12 09:54:03 +000015778
15779cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015780#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015781_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015782
15783fi
15784
Martin v. Löwis11437992002-04-12 09:54:03 +000015785echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15786echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15787if test "${ac_cv_window_has_flags+set}" = set; then
15788 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015789else
Martin v. Löwis11437992002-04-12 09:54:03 +000015790 cat >conftest.$ac_ext <<_ACEOF
15791#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015792#include "confdefs.h"
15793#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015794#ifdef F77_DUMMY_MAIN
15795# ifdef __cplusplus
15796 extern "C"
15797# endif
15798 int F77_DUMMY_MAIN() { return 1; }
15799#endif
15800int
15801main ()
15802{
Jack Jansen666b1e72001-10-31 12:11:48 +000015803
15804 WINDOW *w;
15805 w->_flags = 0;
15806
Martin v. Löwis11437992002-04-12 09:54:03 +000015807 ;
15808 return 0;
15809}
15810_ACEOF
15811rm -f conftest.$ac_objext
15812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15813 (eval $ac_compile) 2>&5
15814 ac_status=$?
15815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15816 (exit $ac_status); } &&
15817 { ac_try='test -s conftest.$ac_objext'
15818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15819 (eval $ac_try) 2>&5
15820 ac_status=$?
15821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15822 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015823 ac_cv_window_has_flags=yes
15824else
Martin v. Löwis11437992002-04-12 09:54:03 +000015825 echo "$as_me: failed program was:" >&5
15826cat conftest.$ac_ext >&5
15827ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015828fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015829rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015830fi
15831
Martin v. Löwis11437992002-04-12 09:54:03 +000015832echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15833echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015834
Jack Jansen666b1e72001-10-31 12:11:48 +000015835
15836if test "$ac_cv_window_has_flags" = yes
15837then
Martin v. Löwis11437992002-04-12 09:54:03 +000015838
15839cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015840#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015841_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015842
15843fi
15844
Guido van Rossum95713eb2000-05-18 20:53:31 +000015845# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15846# Add sys/socket.h to confdefs.h
15847cat >> confdefs.h <<\EOF
15848#ifdef HAVE_SYS_SOCKET_H
15849#include <sys/socket.h>
15850#endif
15851EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015852echo "$as_me:$LINENO: checking for socklen_t" >&5
15853echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15854if test "${ac_cv_type_socklen_t+set}" = set; then
15855 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015856else
Martin v. Löwis11437992002-04-12 09:54:03 +000015857 cat >conftest.$ac_ext <<_ACEOF
15858#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015859#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015860$ac_includes_default
15861#ifdef F77_DUMMY_MAIN
15862# ifdef __cplusplus
15863 extern "C"
15864# endif
15865 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015867int
15868main ()
15869{
15870if ((socklen_t *) 0)
15871 return 0;
15872if (sizeof (socklen_t))
15873 return 0;
15874 ;
15875 return 0;
15876}
15877_ACEOF
15878rm -f conftest.$ac_objext
15879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15880 (eval $ac_compile) 2>&5
15881 ac_status=$?
15882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15883 (exit $ac_status); } &&
15884 { ac_try='test -s conftest.$ac_objext'
15885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15886 (eval $ac_try) 2>&5
15887 ac_status=$?
15888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15889 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015890 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015891else
Martin v. Löwis11437992002-04-12 09:54:03 +000015892 echo "$as_me: failed program was:" >&5
15893cat conftest.$ac_ext >&5
15894ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015895fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015896rm -f conftest.$ac_objext conftest.$ac_ext
15897fi
15898echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15899echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15900if test $ac_cv_type_socklen_t = yes; then
15901 :
15902else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015903
Martin v. Löwis11437992002-04-12 09:54:03 +000015904cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015905#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015906_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015907
15908fi
15909
Michael W. Hudson54241132001-12-07 15:38:26 +000015910
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015911#AC_MSG_CHECKING(for Modules/Setup)
15912#if test ! -f Modules/Setup ; then
15913# if test ! -d Modules ; then
15914# mkdir Modules
15915# fi
15916# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15917# AC_MSG_RESULT(creating)
15918#else
15919# AC_MSG_RESULT(already exists)
15920#fi
15921
Michael W. Hudson54241132001-12-07 15:38:26 +000015922
15923
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015924for h in `(cd $srcdir;echo Python/thread_*.h)`
15925do
15926 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15927done
15928
Michael W. Hudson54241132001-12-07 15:38:26 +000015929
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +000015930SRCDIRS="Parser Grammar Objects Python Modules"
Martin v. Löwis11437992002-04-12 09:54:03 +000015931echo "$as_me:$LINENO: checking for build directories" >&5
15932echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015933for dir in $SRCDIRS; do
15934 if test ! -d $dir; then
15935 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015936 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015937done
Martin v. Löwis11437992002-04-12 09:54:03 +000015938echo "$as_me:$LINENO: result: done" >&5
15939echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015940
Guido van Rossum627b2d71993-12-24 10:39:16 +000015941# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015942ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15943cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015944# This file is a shell script that caches the results of configure
15945# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015946# scripts and configure runs, see configure's option --config-cache.
15947# It is not useful on other systems. If it contains results you don't
15948# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015949#
Martin v. Löwis11437992002-04-12 09:54:03 +000015950# config.status only pays attention to the cache file if you give it
15951# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015952#
Martin v. Löwis11437992002-04-12 09:54:03 +000015953# `ac_cv_env_foo' variables (set or unset) will be overriden when
15954# loading this file, other *unset* `ac_cv_foo' will be assigned the
15955# following values.
15956
15957_ACEOF
15958
Guido van Rossumf78abae1997-01-21 22:02:36 +000015959# The following way of writing the cache mishandles newlines in values,
15960# but we know of no workaround that is simple, portable, and efficient.
15961# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015962# Ultrix sh set writes to stderr and can't be redirected directly,
15963# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015964{
15965 (set) 2>&1 |
15966 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15967 *ac_space=\ *)
15968 # `set' does not quote correctly, so add quotes (double-quote
15969 # substitution turns \\\\ into \\, and sed turns \\ into \).
15970 sed -n \
15971 "s/'/'\\\\''/g;
15972 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15973 ;;
15974 *)
15975 # `set' quotes correctly as required by POSIX, so do not add quotes.
15976 sed -n \
15977 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15978 ;;
15979 esac;
15980} |
15981 sed '
15982 t clear
15983 : clear
15984 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15985 t end
15986 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15987 : end' >>confcache
15988if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015989 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015990 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15991 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015992 else
15993 echo "not updating unwritable cache $cache_file"
15994 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015995fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015996rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015997
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015998test "x$prefix" = xNONE && prefix=$ac_default_prefix
15999# Let make expand exec_prefix.
16000test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016001
Martin v. Löwis11437992002-04-12 09:54:03 +000016002# VPATH may cause trouble with some makes, so we remove $(srcdir),
16003# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16004# trailing colons and then remove the whole line if VPATH becomes empty
16005# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016006if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016007 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16008s/:*\$(srcdir):*/:/;
16009s/:*\${srcdir}:*/:/;
16010s/:*@srcdir@:*/:/;
16011s/^\([^=]*=[ ]*\):*/\1/;
16012s/:*$//;
16013s/^[^=]*=[ ]*$//;
16014}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016015fi
16016
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016017DEFS=-DHAVE_CONFIG_H
16018
Martin v. Löwis11437992002-04-12 09:54:03 +000016019
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016020: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016021ac_clean_files_save=$ac_clean_files
16022ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16023{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16024echo "$as_me: creating $CONFIG_STATUS" >&6;}
16025cat >$CONFIG_STATUS <<_ACEOF
16026#! $SHELL
16027# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016028# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016029# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016030# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016031
Martin v. Löwis11437992002-04-12 09:54:03 +000016032debug=false
16033SHELL=\${CONFIG_SHELL-$SHELL}
16034_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016035
Martin v. Löwis11437992002-04-12 09:54:03 +000016036cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016037
Martin v. Löwis11437992002-04-12 09:54:03 +000016038## --------------------- ##
16039## M4sh Initialization. ##
16040## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016041
Martin v. Löwis11437992002-04-12 09:54:03 +000016042# Be Bourne compatible
16043if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16044 emulate sh
16045 NULLCMD=:
16046elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16047 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016048fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016049
Martin v. Löwis11437992002-04-12 09:54:03 +000016050# NLS nuisances.
16051# Support unset when possible.
16052if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16053 as_unset=unset
16054else
16055 as_unset=false
16056fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016057
Martin v. Löwis11437992002-04-12 09:54:03 +000016058(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16059 { $as_unset LANG || test "${LANG+set}" != set; } ||
16060 { LANG=C; export LANG; }
16061(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16062 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16063 { LC_ALL=C; export LC_ALL; }
16064(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16065 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16066 { LC_TIME=C; export LC_TIME; }
16067(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16068 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16069 { LC_CTYPE=C; export LC_CTYPE; }
16070(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16071 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16072 { LANGUAGE=C; export LANGUAGE; }
16073(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16074 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16075 { LC_COLLATE=C; export LC_COLLATE; }
16076(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16077 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16078 { LC_NUMERIC=C; export LC_NUMERIC; }
16079(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16080 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16081 { LC_MESSAGES=C; export LC_MESSAGES; }
16082
16083
16084# Name of the executable.
16085as_me=`(basename "$0") 2>/dev/null ||
16086$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16087 X"$0" : 'X\(//\)$' \| \
16088 X"$0" : 'X\(/\)$' \| \
16089 . : '\(.\)' 2>/dev/null ||
16090echo X/"$0" |
16091 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16092 /^X\/\(\/\/\)$/{ s//\1/; q; }
16093 /^X\/\(\/\).*/{ s//\1/; q; }
16094 s/.*/./; q'`
16095
16096# PATH needs CR, and LINENO needs CR and PATH.
16097# Avoid depending upon Character Ranges.
16098as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16099as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16100as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16101as_cr_digits='0123456789'
16102as_cr_alnum=$as_cr_Letters$as_cr_digits
16103
16104# The user is always right.
16105if test "${PATH_SEPARATOR+set}" != set; then
16106 echo "#! /bin/sh" >conftest.sh
16107 echo "exit 0" >>conftest.sh
16108 chmod +x conftest.sh
16109 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16110 PATH_SEPARATOR=';'
16111 else
16112 PATH_SEPARATOR=:
16113 fi
16114 rm -f conftest.sh
16115fi
16116
16117
16118 as_lineno_1=$LINENO
16119 as_lineno_2=$LINENO
16120 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16121 test "x$as_lineno_1" != "x$as_lineno_2" &&
16122 test "x$as_lineno_3" = "x$as_lineno_2" || {
16123 # Find who we are. Look in the path if we contain no path at all
16124 # relative or not.
16125 case $0 in
16126 *[\\/]* ) as_myself=$0 ;;
16127 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16128for as_dir in $PATH
16129do
16130 IFS=$as_save_IFS
16131 test -z "$as_dir" && as_dir=.
16132 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16133done
16134
16135 ;;
16136 esac
16137 # We did not find ourselves, most probably we were run as `sh COMMAND'
16138 # in which case we are not to be found in the path.
16139 if test "x$as_myself" = x; then
16140 as_myself=$0
16141 fi
16142 if test ! -f "$as_myself"; then
16143 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16144echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16145 { (exit 1); exit 1; }; }
16146 fi
16147 case $CONFIG_SHELL in
16148 '')
16149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16150for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16151do
16152 IFS=$as_save_IFS
16153 test -z "$as_dir" && as_dir=.
16154 for as_base in sh bash ksh sh5; do
16155 case $as_dir in
16156 /*)
16157 if ("$as_dir/$as_base" -c '
16158 as_lineno_1=$LINENO
16159 as_lineno_2=$LINENO
16160 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16161 test "x$as_lineno_1" != "x$as_lineno_2" &&
16162 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16163 CONFIG_SHELL=$as_dir/$as_base
16164 export CONFIG_SHELL
16165 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16166 fi;;
16167 esac
16168 done
16169done
16170;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016171 esac
16172
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16174 # uniformly replaced by the line number. The first 'sed' inserts a
16175 # line-number line before each line; the second 'sed' does the real
16176 # work. The second script uses 'N' to pair each line-number line
16177 # with the numbered line, and appends trailing '-' during
16178 # substitution so that $LINENO is not a special case at line end.
16179 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16180 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16181 sed '=' <$as_myself |
16182 sed '
16183 N
16184 s,$,-,
16185 : loop
16186 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16187 t loop
16188 s,-$,,
16189 s,^['$as_cr_digits']*\n,,
16190 ' >$as_me.lineno &&
16191 chmod +x $as_me.lineno ||
16192 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16193echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16194 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016195
Martin v. Löwis11437992002-04-12 09:54:03 +000016196 # Don't try to exec as it changes $[0], causing all sort of problems
16197 # (the dirname of $[0] is not the place where we might find the
16198 # original and so on. Autoconf is especially sensible to this).
16199 . ./$as_me.lineno
16200 # Exit status is that of the last command.
16201 exit
16202}
16203
16204
16205case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16206 *c*,-n*) ECHO_N= ECHO_C='
16207' ECHO_T=' ' ;;
16208 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16209 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16210esac
16211
16212if expr a : '\(a\)' >/dev/null 2>&1; then
16213 as_expr=expr
16214else
16215 as_expr=false
16216fi
16217
16218rm -f conf$$ conf$$.exe conf$$.file
16219echo >conf$$.file
16220if ln -s conf$$.file conf$$ 2>/dev/null; then
16221 # We could just check for DJGPP; but this test a) works b) is more generic
16222 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16223 if test -f conf$$.exe; then
16224 # Don't use ln at all; we don't have any links
16225 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016226 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016227 as_ln_s='ln -s'
16228 fi
16229elif ln conf$$.file conf$$ 2>/dev/null; then
16230 as_ln_s=ln
16231else
16232 as_ln_s='cp -p'
16233fi
16234rm -f conf$$ conf$$.exe conf$$.file
16235
16236as_executable_p="test -f"
16237
16238# Sed expression to map a string onto a valid CPP name.
16239as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16240
16241# Sed expression to map a string onto a valid variable name.
16242as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16243
16244
16245# IFS
16246# We need space, tab and new line, in precisely that order.
16247as_nl='
16248'
16249IFS=" $as_nl"
16250
16251# CDPATH.
16252$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16253
16254exec 6>&1
16255
16256# Open the log real soon, to keep \$[0] and so on meaningful, and to
16257# report actual input values of CONFIG_FILES etc. instead of their
16258# values after options handling. Logging --version etc. is OK.
16259exec 5>>config.log
16260{
16261 echo
16262 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16263## Running $as_me. ##
16264_ASBOX
16265} >&5
16266cat >&5 <<_CSEOF
16267
16268This file was extended by $as_me, which was
16269generated by GNU Autoconf 2.53. Invocation command line was
16270
16271 CONFIG_FILES = $CONFIG_FILES
16272 CONFIG_HEADERS = $CONFIG_HEADERS
16273 CONFIG_LINKS = $CONFIG_LINKS
16274 CONFIG_COMMANDS = $CONFIG_COMMANDS
16275 $ $0 $@
16276
16277_CSEOF
16278echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16279echo >&5
16280_ACEOF
16281
16282# Files that config.status was made for.
16283if test -n "$ac_config_files"; then
16284 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16285fi
16286
16287if test -n "$ac_config_headers"; then
16288 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16289fi
16290
16291if test -n "$ac_config_links"; then
16292 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16293fi
16294
16295if test -n "$ac_config_commands"; then
16296 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16297fi
16298
16299cat >>$CONFIG_STATUS <<\_ACEOF
16300
16301ac_cs_usage="\
16302\`$as_me' instantiates files from templates according to the
16303current configuration.
16304
16305Usage: $0 [OPTIONS] [FILE]...
16306
16307 -h, --help print this help, then exit
16308 -V, --version print version number, then exit
16309 -d, --debug don't remove temporary files
16310 --recheck update $as_me by reconfiguring in the same conditions
16311 --file=FILE[:TEMPLATE]
16312 instantiate the configuration file FILE
16313 --header=FILE[:TEMPLATE]
16314 instantiate the configuration header FILE
16315
16316Configuration files:
16317$config_files
16318
16319Configuration headers:
16320$config_headers
16321
16322Report bugs to <bug-autoconf@gnu.org>."
16323_ACEOF
16324
16325cat >>$CONFIG_STATUS <<_ACEOF
16326ac_cs_version="\\
16327config.status
16328configured by $0, generated by GNU Autoconf 2.53,
16329 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16330
16331Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16332Free Software Foundation, Inc.
16333This config.status script is free software; the Free Software Foundation
16334gives unlimited permission to copy, distribute and modify it."
16335srcdir=$srcdir
16336INSTALL="$INSTALL"
16337_ACEOF
16338
16339cat >>$CONFIG_STATUS <<\_ACEOF
16340# If no file are specified by the user, then we need to provide default
16341# value. By we need to know if files were specified by the user.
16342ac_need_defaults=:
16343while test $# != 0
16344do
16345 case $1 in
16346 --*=*)
16347 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16348 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16349 shift
16350 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16351 shift
16352 ;;
16353 -*);;
16354 *) # This is not an option, so the user has probably given explicit
16355 # arguments.
16356 ac_need_defaults=false;;
16357 esac
16358
16359 case $1 in
16360 # Handling of the options.
16361_ACEOF
16362cat >>$CONFIG_STATUS <<_ACEOF
16363 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16364 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16365 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16366_ACEOF
16367cat >>$CONFIG_STATUS <<\_ACEOF
16368 --version | --vers* | -V )
16369 echo "$ac_cs_version"; exit 0 ;;
16370 --he | --h)
16371 # Conflict between --help and --header
16372 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16373Try \`$0 --help' for more information." >&5
16374echo "$as_me: error: ambiguous option: $1
16375Try \`$0 --help' for more information." >&2;}
16376 { (exit 1); exit 1; }; };;
16377 --help | --hel | -h )
16378 echo "$ac_cs_usage"; exit 0 ;;
16379 --debug | --d* | -d )
16380 debug=: ;;
16381 --file | --fil | --fi | --f )
16382 shift
16383 CONFIG_FILES="$CONFIG_FILES $1"
16384 ac_need_defaults=false;;
16385 --header | --heade | --head | --hea )
16386 shift
16387 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16388 ac_need_defaults=false;;
16389
16390 # This is an error.
16391 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16392Try \`$0 --help' for more information." >&5
16393echo "$as_me: error: unrecognized option: $1
16394Try \`$0 --help' for more information." >&2;}
16395 { (exit 1); exit 1; }; } ;;
16396
16397 *) ac_config_targets="$ac_config_targets $1" ;;
16398
16399 esac
16400 shift
16401done
16402
16403_ACEOF
16404
16405
16406
16407
16408
16409cat >>$CONFIG_STATUS <<\_ACEOF
16410for ac_config_target in $ac_config_targets
16411do
16412 case "$ac_config_target" in
16413 # Handling of arguments.
16414 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16415 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16416 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16417 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16418echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16419 { (exit 1); exit 1; }; };;
16420 esac
16421done
16422
16423# If the user did not use the arguments to specify the items to instantiate,
16424# then the envvar interface is used. Set only those that are not.
16425# We use the long form for the default assignment because of an extremely
16426# bizarre bug on SunOS 4.1.3.
16427if $ac_need_defaults; then
16428 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16429 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16430fi
16431
16432# Create a temporary directory, and hook for its removal unless debugging.
16433$debug ||
16434{
16435 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16436 trap '{ (exit 1); exit 1; }' 1 2 13 15
16437}
16438
16439# Create a (secure) tmp directory for tmp files.
16440: ${TMPDIR=/tmp}
16441{
16442 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16443 test -n "$tmp" && test -d "$tmp"
16444} ||
16445{
16446 tmp=$TMPDIR/cs$$-$RANDOM
16447 (umask 077 && mkdir $tmp)
16448} ||
16449{
16450 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16451 { (exit 1); exit 1; }
16452}
16453
16454_ACEOF
16455
16456cat >>$CONFIG_STATUS <<_ACEOF
16457
16458#
16459# CONFIG_FILES section.
16460#
16461
16462# No need to generate the scripts if there are no CONFIG_FILES.
16463# This happens for instance when ./config.status config.h
16464if test -n "\$CONFIG_FILES"; then
16465 # Protect against being on the right side of a sed subst in config.status.
16466 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16467 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16468s,@SHELL@,$SHELL,;t t
16469s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16470s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16471s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16472s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16473s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16474s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16475s,@exec_prefix@,$exec_prefix,;t t
16476s,@prefix@,$prefix,;t t
16477s,@program_transform_name@,$program_transform_name,;t t
16478s,@bindir@,$bindir,;t t
16479s,@sbindir@,$sbindir,;t t
16480s,@libexecdir@,$libexecdir,;t t
16481s,@datadir@,$datadir,;t t
16482s,@sysconfdir@,$sysconfdir,;t t
16483s,@sharedstatedir@,$sharedstatedir,;t t
16484s,@localstatedir@,$localstatedir,;t t
16485s,@libdir@,$libdir,;t t
16486s,@includedir@,$includedir,;t t
16487s,@oldincludedir@,$oldincludedir,;t t
16488s,@infodir@,$infodir,;t t
16489s,@mandir@,$mandir,;t t
16490s,@build_alias@,$build_alias,;t t
16491s,@host_alias@,$host_alias,;t t
16492s,@target_alias@,$target_alias,;t t
16493s,@DEFS@,$DEFS,;t t
16494s,@ECHO_C@,$ECHO_C,;t t
16495s,@ECHO_N@,$ECHO_N,;t t
16496s,@ECHO_T@,$ECHO_T,;t t
16497s,@LIBS@,$LIBS,;t t
16498s,@VERSION@,$VERSION,;t t
16499s,@SOVERSION@,$SOVERSION,;t t
16500s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16501s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16502s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16503s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16504s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16505s,@MACHDEP@,$MACHDEP,;t t
16506s,@SGI_ABI@,$SGI_ABI,;t t
16507s,@CXX@,$CXX,;t t
16508s,@MAINOBJ@,$MAINOBJ,;t t
16509s,@EXEEXT@,$EXEEXT,;t t
16510s,@CC@,$CC,;t t
16511s,@CFLAGS@,$CFLAGS,;t t
16512s,@LDFLAGS@,$LDFLAGS,;t t
16513s,@CPPFLAGS@,$CPPFLAGS,;t t
16514s,@ac_ct_CC@,$ac_ct_CC,;t t
16515s,@OBJEXT@,$OBJEXT,;t t
16516s,@CPP@,$CPP,;t t
16517s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16518s,@LIBRARY@,$LIBRARY,;t t
16519s,@LDLIBRARY@,$LDLIBRARY,;t t
16520s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16521s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16522s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16523s,@INSTSONAME@,$INSTSONAME,;t t
16524s,@RUNSHARED@,$RUNSHARED,;t t
16525s,@LINKCC@,$LINKCC,;t t
16526s,@RANLIB@,$RANLIB,;t t
16527s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16528s,@AR@,$AR,;t t
16529s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16530s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16531s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16532s,@LN@,$LN,;t t
16533s,@OPT@,$OPT,;t t
16534s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16535s,@SO@,$SO,;t t
16536s,@LDSHARED@,$LDSHARED,;t t
16537s,@BLDSHARED@,$BLDSHARED,;t t
16538s,@CCSHARED@,$CCSHARED,;t t
16539s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16540s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016541s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016542s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16543s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16544s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16545s,@LDLAST@,$LDLAST,;t t
16546s,@THREADOBJ@,$THREADOBJ,;t t
16547s,@DLINCLDIR@,$DLINCLDIR,;t t
16548s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16549s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16550s,@LIBOBJS@,$LIBOBJS,;t t
16551s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16552s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16553s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16554s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16555s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16556s,@LIBM@,$LIBM,;t t
16557s,@LIBC@,$LIBC,;t t
16558s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16559s,@THREADHEADERS@,$THREADHEADERS,;t t
16560s,@SRCDIRS@,$SRCDIRS,;t t
16561CEOF
16562
16563_ACEOF
16564
16565 cat >>$CONFIG_STATUS <<\_ACEOF
16566 # Split the substitutions into bite-sized pieces for seds with
16567 # small command number limits, like on Digital OSF/1 and HP-UX.
16568 ac_max_sed_lines=48
16569 ac_sed_frag=1 # Number of current file.
16570 ac_beg=1 # First line for current file.
16571 ac_end=$ac_max_sed_lines # Line after last line for current file.
16572 ac_more_lines=:
16573 ac_sed_cmds=
16574 while $ac_more_lines; do
16575 if test $ac_beg -gt 1; then
16576 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16577 else
16578 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16579 fi
16580 if test ! -s $tmp/subs.frag; then
16581 ac_more_lines=false
16582 else
16583 # The purpose of the label and of the branching condition is to
16584 # speed up the sed processing (if there are no `@' at all, there
16585 # is no need to browse any of the substitutions).
16586 # These are the two extra sed commands mentioned above.
16587 (echo ':t
16588 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16589 if test -z "$ac_sed_cmds"; then
16590 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16591 else
16592 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16593 fi
16594 ac_sed_frag=`expr $ac_sed_frag + 1`
16595 ac_beg=$ac_end
16596 ac_end=`expr $ac_end + $ac_max_sed_lines`
16597 fi
16598 done
16599 if test -z "$ac_sed_cmds"; then
16600 ac_sed_cmds=cat
16601 fi
16602fi # test -n "$CONFIG_FILES"
16603
16604_ACEOF
16605cat >>$CONFIG_STATUS <<\_ACEOF
16606for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16607 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16608 case $ac_file in
16609 - | *:- | *:-:* ) # input from stdin
16610 cat >$tmp/stdin
16611 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16612 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16613 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16614 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16615 * ) ac_file_in=$ac_file.in ;;
16616 esac
16617
16618 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16619 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16620$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16621 X"$ac_file" : 'X\(//\)[^/]' \| \
16622 X"$ac_file" : 'X\(//\)$' \| \
16623 X"$ac_file" : 'X\(/\)' \| \
16624 . : '\(.\)' 2>/dev/null ||
16625echo X"$ac_file" |
16626 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16627 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16628 /^X\(\/\/\)$/{ s//\1/; q; }
16629 /^X\(\/\).*/{ s//\1/; q; }
16630 s/.*/./; q'`
16631 { case "$ac_dir" in
16632 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16633 *) as_incr_dir=.;;
16634esac
16635as_dummy="$ac_dir"
16636for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16637 case $as_mkdir_dir in
16638 # Skip DOS drivespec
16639 ?:) as_incr_dir=$as_mkdir_dir ;;
16640 *)
16641 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16642 test -d "$as_incr_dir" ||
16643 mkdir "$as_incr_dir" ||
16644 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16645echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16646 { (exit 1); exit 1; }; }
16647 ;;
16648 esac
16649done; }
16650
16651 ac_builddir=.
16652
16653if test "$ac_dir" != .; then
16654 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16655 # A "../" for each directory in $ac_dir_suffix.
16656 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16657else
16658 ac_dir_suffix= ac_top_builddir=
16659fi
16660
16661case $srcdir in
16662 .) # No --srcdir option. We are building in place.
16663 ac_srcdir=.
16664 if test -z "$ac_top_builddir"; then
16665 ac_top_srcdir=.
16666 else
16667 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16668 fi ;;
16669 [\\/]* | ?:[\\/]* ) # Absolute path.
16670 ac_srcdir=$srcdir$ac_dir_suffix;
16671 ac_top_srcdir=$srcdir ;;
16672 *) # Relative path.
16673 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16674 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16675esac
16676# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16677# absolute.
16678ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16679ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16680ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16681ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16682
16683
16684 case $INSTALL in
16685 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16686 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16687 esac
16688
16689 if test x"$ac_file" != x-; then
16690 { echo "$as_me:$LINENO: creating $ac_file" >&5
16691echo "$as_me: creating $ac_file" >&6;}
16692 rm -f "$ac_file"
16693 fi
16694 # Let's still pretend it is `configure' which instantiates (i.e., don't
16695 # use $as_me), people would be surprised to read:
16696 # /* config.h. Generated by config.status. */
16697 if test x"$ac_file" = x-; then
16698 configure_input=
16699 else
16700 configure_input="$ac_file. "
16701 fi
16702 configure_input=$configure_input"Generated from `echo $ac_file_in |
16703 sed 's,.*/,,'` by configure."
16704
16705 # First look for the input files in the build tree, otherwise in the
16706 # src tree.
16707 ac_file_inputs=`IFS=:
16708 for f in $ac_file_in; do
16709 case $f in
16710 -) echo $tmp/stdin ;;
16711 [\\/$]*)
16712 # Absolute (can't be DOS-style, as IFS=:)
16713 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16714echo "$as_me: error: cannot find input file: $f" >&2;}
16715 { (exit 1); exit 1; }; }
16716 echo $f;;
16717 *) # Relative
16718 if test -f "$f"; then
16719 # Build tree
16720 echo $f
16721 elif test -f "$srcdir/$f"; then
16722 # Source tree
16723 echo $srcdir/$f
16724 else
16725 # /dev/null tree
16726 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16727echo "$as_me: error: cannot find input file: $f" >&2;}
16728 { (exit 1); exit 1; }; }
16729 fi;;
16730 esac
16731 done` || { (exit 1); exit 1; }
16732_ACEOF
16733cat >>$CONFIG_STATUS <<_ACEOF
16734 sed "$ac_vpsub
16735$extrasub
16736_ACEOF
16737cat >>$CONFIG_STATUS <<\_ACEOF
16738:t
16739/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16740s,@configure_input@,$configure_input,;t t
16741s,@srcdir@,$ac_srcdir,;t t
16742s,@abs_srcdir@,$ac_abs_srcdir,;t t
16743s,@top_srcdir@,$ac_top_srcdir,;t t
16744s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16745s,@builddir@,$ac_builddir,;t t
16746s,@abs_builddir@,$ac_abs_builddir,;t t
16747s,@top_builddir@,$ac_top_builddir,;t t
16748s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16749s,@INSTALL@,$ac_INSTALL,;t t
16750" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16751 rm -f $tmp/stdin
16752 if test x"$ac_file" != x-; then
16753 mv $tmp/out $ac_file
16754 else
16755 cat $tmp/out
16756 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016757 fi
16758
Martin v. Löwis11437992002-04-12 09:54:03 +000016759done
16760_ACEOF
16761cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016762
Martin v. Löwis11437992002-04-12 09:54:03 +000016763#
16764# CONFIG_HEADER section.
16765#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016766
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016767# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16768# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016769#
16770# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016771ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16772ac_dB='[ ].*$,\1#\2'
16773ac_dC=' '
16774ac_dD=',;t'
16775# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16776ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16777ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016778ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016779ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016780
Martin v. Löwis11437992002-04-12 09:54:03 +000016781for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016782 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016783 case $ac_file in
16784 - | *:- | *:-:* ) # input from stdin
16785 cat >$tmp/stdin
16786 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16787 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16788 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16789 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16790 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016791 esac
16792
Martin v. Löwis11437992002-04-12 09:54:03 +000016793 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16794echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016795
Martin v. Löwis11437992002-04-12 09:54:03 +000016796 # First look for the input files in the build tree, otherwise in the
16797 # src tree.
16798 ac_file_inputs=`IFS=:
16799 for f in $ac_file_in; do
16800 case $f in
16801 -) echo $tmp/stdin ;;
16802 [\\/$]*)
16803 # Absolute (can't be DOS-style, as IFS=:)
16804 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16805echo "$as_me: error: cannot find input file: $f" >&2;}
16806 { (exit 1); exit 1; }; }
16807 echo $f;;
16808 *) # Relative
16809 if test -f "$f"; then
16810 # Build tree
16811 echo $f
16812 elif test -f "$srcdir/$f"; then
16813 # Source tree
16814 echo $srcdir/$f
16815 else
16816 # /dev/null tree
16817 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16818echo "$as_me: error: cannot find input file: $f" >&2;}
16819 { (exit 1); exit 1; }; }
16820 fi;;
16821 esac
16822 done` || { (exit 1); exit 1; }
16823 # Remove the trailing spaces.
16824 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016825
Martin v. Löwis11437992002-04-12 09:54:03 +000016826_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016827
Martin v. Löwis11437992002-04-12 09:54:03 +000016828# Transform confdefs.h into two sed scripts, `conftest.defines' and
16829# `conftest.undefs', that substitutes the proper values into
16830# config.h.in to produce config.h. The first handles `#define'
16831# templates, and the second `#undef' templates.
16832# And first: Protect against being on the right side of a sed subst in
16833# config.status. Protect against being in an unquoted here document
16834# in config.status.
16835rm -f conftest.defines conftest.undefs
16836# Using a here document instead of a string reduces the quoting nightmare.
16837# Putting comments in sed scripts is not portable.
16838#
16839# `end' is used to avoid that the second main sed command (meant for
16840# 0-ary CPP macros) applies to n-ary macro definitions.
16841# See the Autoconf documentation for `clear'.
16842cat >confdef2sed.sed <<\_ACEOF
16843s/[\\&,]/\\&/g
16844s,[\\$`],\\&,g
16845t clear
16846: clear
16847s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16848t end
16849s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16850: end
16851_ACEOF
16852# If some macros were called several times there might be several times
16853# the same #defines, which is useless. Nevertheless, we may not want to
16854# sort them, since we want the *last* AC-DEFINE to be honored.
16855uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16856sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16857rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016858
16859# This sed command replaces #undef with comments. This is necessary, for
16860# example, in the case of _POSIX_SOURCE, which is predefined and required
16861# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016862cat >>conftest.undefs <<\_ACEOF
16863s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16864_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016865
Martin v. Löwis11437992002-04-12 09:54:03 +000016866# Break up conftest.defines because some shells have a limit on the size
16867# of here documents, and old seds have small limits too (100 cmds).
16868echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16869echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16870echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16871echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016872rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016873while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016874do
Martin v. Löwis11437992002-04-12 09:54:03 +000016875 # Write a limited-size here document to $tmp/defines.sed.
16876 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16877 # Speed up: don't consider the non `#define' lines.
16878 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16879 # Work around the forget-to-reset-the-flag bug.
16880 echo 't clr' >>$CONFIG_STATUS
16881 echo ': clr' >>$CONFIG_STATUS
16882 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016883 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016884 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16885 rm -f $tmp/in
16886 mv $tmp/out $tmp/in
16887' >>$CONFIG_STATUS
16888 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16889 rm -f conftest.defines
16890 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016891done
Martin v. Löwis11437992002-04-12 09:54:03 +000016892rm -f conftest.defines
16893echo ' fi # egrep' >>$CONFIG_STATUS
16894echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016895
Martin v. Löwis11437992002-04-12 09:54:03 +000016896# Break up conftest.undefs because some shells have a limit on the size
16897# of here documents, and old seds have small limits too (100 cmds).
16898echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16899rm -f conftest.tail
16900while grep . conftest.undefs >/dev/null
16901do
16902 # Write a limited-size here document to $tmp/undefs.sed.
16903 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16904 # Speed up: don't consider the non `#undef'
16905 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16906 # Work around the forget-to-reset-the-flag bug.
16907 echo 't clr' >>$CONFIG_STATUS
16908 echo ': clr' >>$CONFIG_STATUS
16909 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16910 echo 'CEOF
16911 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16912 rm -f $tmp/in
16913 mv $tmp/out $tmp/in
16914' >>$CONFIG_STATUS
16915 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16916 rm -f conftest.undefs
16917 mv conftest.tail conftest.undefs
16918done
16919rm -f conftest.undefs
16920
16921cat >>$CONFIG_STATUS <<\_ACEOF
16922 # Let's still pretend it is `configure' which instantiates (i.e., don't
16923 # use $as_me), people would be surprised to read:
16924 # /* config.h. Generated by config.status. */
16925 if test x"$ac_file" = x-; then
16926 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016927 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016928 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016929 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016930 cat $tmp/in >>$tmp/config.h
16931 rm -f $tmp/in
16932 if test x"$ac_file" != x-; then
16933 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16934 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16935echo "$as_me: $ac_file is unchanged" >&6;}
16936 else
16937 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16938$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16939 X"$ac_file" : 'X\(//\)[^/]' \| \
16940 X"$ac_file" : 'X\(//\)$' \| \
16941 X"$ac_file" : 'X\(/\)' \| \
16942 . : '\(.\)' 2>/dev/null ||
16943echo X"$ac_file" |
16944 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16945 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16946 /^X\(\/\/\)$/{ s//\1/; q; }
16947 /^X\(\/\).*/{ s//\1/; q; }
16948 s/.*/./; q'`
16949 { case "$ac_dir" in
16950 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16951 *) as_incr_dir=.;;
16952esac
16953as_dummy="$ac_dir"
16954for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16955 case $as_mkdir_dir in
16956 # Skip DOS drivespec
16957 ?:) as_incr_dir=$as_mkdir_dir ;;
16958 *)
16959 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16960 test -d "$as_incr_dir" ||
16961 mkdir "$as_incr_dir" ||
16962 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16963echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16964 { (exit 1); exit 1; }; }
16965 ;;
16966 esac
16967done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016968
Martin v. Löwis11437992002-04-12 09:54:03 +000016969 rm -f $ac_file
16970 mv $tmp/config.h $ac_file
16971 fi
16972 else
16973 cat $tmp/config.h
16974 rm -f $tmp/config.h
16975 fi
16976done
16977_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016978
Martin v. Löwis11437992002-04-12 09:54:03 +000016979cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016980
Martin v. Löwis11437992002-04-12 09:54:03 +000016981{ (exit 0); exit 0; }
16982_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016983chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016984ac_clean_files=$ac_clean_files_save
16985
16986
16987# configure is writing to config.log, and then calls config.status.
16988# config.status does its own redirection, appending to config.log.
16989# Unfortunately, on DOS this fails, as config.log is still kept open
16990# by configure, so config.status won't be able to write to it; its
16991# output is simply discarded. So we exec the FD to /dev/null,
16992# effectively closing config.log, so it can be properly (re)opened and
16993# appended to by config.status. When coming back to configure, we
16994# need to make the FD available again.
16995if test "$no_create" != yes; then
16996 ac_cs_success=:
16997 exec 5>/dev/null
16998 $SHELL $CONFIG_STATUS || ac_cs_success=false
16999 exec 5>>config.log
17000 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17001 # would make configure fail if this is the last instruction.
17002 $ac_cs_success || { (exit 1); exit 1; }
17003fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017004
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017005
17006echo "creating Setup"
17007if test ! -f Modules/Setup
17008then
17009 cp $srcdir/Modules/Setup.dist Modules/Setup
17010fi
17011
17012echo "creating Setup.local"
17013if test ! -f Modules/Setup.local
17014then
17015 echo "# Edit this file for local setup changes" >Modules/Setup.local
17016fi
17017
17018echo "creating Makefile"
17019$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17020 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017021 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017022mv config.c Modules