blob: 48d4cd4e740ee4833a5aef337c902164c8aca741 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Neil Schemenauercccd1e72002-07-08 14:47:12 +00002# From configure.in Revision: 1.327 .
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
Jack Jansen7b8c7542002-04-14 20:12:41 +0000846 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +0000847 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 --with(out)-pymalloc disable/enable specialized mallocs
849 --with-wctype-functions use wctype.h functions
850 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
851 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
852 --with-fpectl enable SIGFPE catching
853 --with-libm=STRING math library
854 --with-libc=STRING C library
855
856Some influential environment variables:
857 CC C compiler command
858 CFLAGS C compiler flags
859 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
860 nonstandard directory <lib dir>
861 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
862 headers in a nonstandard directory <include dir>
863 CPP C preprocessor
864
865Use these variables to override the choices made by `configure' or to help
866it to find libraries and programs with nonstandard names/locations.
867
868_ACEOF
869fi
870
871if test "$ac_init_help" = "recursive"; then
872 # If there are subdirs, report their specific --help.
873 ac_popdir=`pwd`
874 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
875 test -d $ac_dir || continue
876 ac_builddir=.
877
878if test "$ac_dir" != .; then
879 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
880 # A "../" for each directory in $ac_dir_suffix.
881 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
882else
883 ac_dir_suffix= ac_top_builddir=
884fi
885
886case $srcdir in
887 .) # No --srcdir option. We are building in place.
888 ac_srcdir=.
889 if test -z "$ac_top_builddir"; then
890 ac_top_srcdir=.
891 else
892 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
893 fi ;;
894 [\\/]* | ?:[\\/]* ) # Absolute path.
895 ac_srcdir=$srcdir$ac_dir_suffix;
896 ac_top_srcdir=$srcdir ;;
897 *) # Relative path.
898 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
899 ac_top_srcdir=$ac_top_builddir$srcdir ;;
900esac
901# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
902# absolute.
903ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
904ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
905ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
906ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
907
908 cd $ac_dir
909 # Check for guested configure; otherwise get Cygnus style configure.
910 if test -f $ac_srcdir/configure.gnu; then
911 echo
912 $SHELL $ac_srcdir/configure.gnu --help=recursive
913 elif test -f $ac_srcdir/configure; then
914 echo
915 $SHELL $ac_srcdir/configure --help=recursive
916 elif test -f $ac_srcdir/configure.ac ||
917 test -f $ac_srcdir/configure.in; then
918 echo
919 $ac_configure --help
920 else
921 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
922 fi
923 cd $ac_popdir
924 done
925fi
926
927test -n "$ac_init_help" && exit 0
928if $ac_init_version; then
929 cat <<\_ACEOF
930
931Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
932Free Software Foundation, Inc.
933This configure script is free software; the Free Software Foundation
934gives unlimited permission to copy, distribute and modify it.
935_ACEOF
936 exit 0
937fi
938exec 5>config.log
939cat >&5 <<_ACEOF
940This file contains any messages produced by compilers while
941running configure, to aid debugging if configure makes a mistake.
942
943It was created by $as_me, which was
944generated by GNU Autoconf 2.53. Invocation command line was
945
946 $ $0 $@
947
948_ACEOF
949{
950cat <<_ASUNAME
951## --------- ##
952## Platform. ##
953## --------- ##
954
955hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
956uname -m = `(uname -m) 2>/dev/null || echo unknown`
957uname -r = `(uname -r) 2>/dev/null || echo unknown`
958uname -s = `(uname -s) 2>/dev/null || echo unknown`
959uname -v = `(uname -v) 2>/dev/null || echo unknown`
960
961/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
962/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
963
964/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
965/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
966/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
967hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
968/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
969/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
970/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
971
972_ASUNAME
973
974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
975for as_dir in $PATH
976do
977 IFS=$as_save_IFS
978 test -z "$as_dir" && as_dir=.
979 echo "PATH: $as_dir"
980done
981
982} >&5
983
984cat >&5 <<_ACEOF
985
986
987## ----------- ##
988## Core tests. ##
989## ----------- ##
990
991_ACEOF
992
993
994# Keep a trace of the command line.
995# Strip out --no-create and --no-recursion so they do not pile up.
996# Also quote any args containing shell meta-characters.
997ac_configure_args=
998ac_sep=
999for ac_arg
1000do
1001 case $ac_arg in
1002 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003 | --no-cr | --no-c | -n ) continue ;;
1004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 continue ;;
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1009 esac
1010 case " $ac_configure_args " in
1011 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1012 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1013 ac_sep=" " ;;
1014 esac
1015 # Get rid of the leading space.
1016done
1017
1018# When interrupted or exit'd, cleanup temporary files, and complete
1019# config.log. We remove comments because anyway the quotes in there
1020# would cause problems or look ugly.
1021# WARNING: Be sure not to use single quotes in there, as some shells,
1022# such as our DU 5.0 friend, will then `close' the trap.
1023trap 'exit_status=$?
1024 # Save into config.log some information that might help in debugging.
1025 {
1026 echo
1027 cat <<\_ASBOX
1028## ---------------- ##
1029## Cache variables. ##
1030## ---------------- ##
1031_ASBOX
1032 echo
1033 # The following way of writing the cache mishandles newlines in values,
1034{
1035 (set) 2>&1 |
1036 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1037 *ac_space=\ *)
1038 sed -n \
1039 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1040 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1041 ;;
1042 *)
1043 sed -n \
1044 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1045 ;;
1046 esac;
1047}
1048 echo
1049 if test -s confdefs.h; then
1050 cat <<\_ASBOX
1051## ----------- ##
1052## confdefs.h. ##
1053## ----------- ##
1054_ASBOX
1055 echo
1056 sed "/^$/d" confdefs.h
1057 echo
1058 fi
1059 test "$ac_signal" != 0 &&
1060 echo "$as_me: caught signal $ac_signal"
1061 echo "$as_me: exit $exit_status"
1062 } >&5
1063 rm -f core core.* *.core &&
1064 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1065 exit $exit_status
1066 ' 0
1067for ac_signal in 1 2 13 15; do
1068 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1069done
1070ac_signal=0
1071
1072# confdefs.h avoids OS command line length limits that DEFS can exceed.
1073rm -rf conftest* confdefs.h
1074# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1075echo >confdefs.h
1076
1077# Predefined preprocessor variables.
1078
1079cat >>confdefs.h <<_ACEOF
1080#define PACKAGE_NAME "$PACKAGE_NAME"
1081_ACEOF
1082
1083
1084cat >>confdefs.h <<_ACEOF
1085#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1086_ACEOF
1087
1088
1089cat >>confdefs.h <<_ACEOF
1090#define PACKAGE_VERSION "$PACKAGE_VERSION"
1091_ACEOF
1092
1093
1094cat >>confdefs.h <<_ACEOF
1095#define PACKAGE_STRING "$PACKAGE_STRING"
1096_ACEOF
1097
1098
1099cat >>confdefs.h <<_ACEOF
1100#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1101_ACEOF
1102
1103
1104# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105# Prefer explicitly selected file to automatically selected ones.
1106if test -z "$CONFIG_SITE"; then
1107 if test "x$prefix" != xNONE; then
1108 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1109 else
1110 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1111 fi
1112fi
1113for ac_site_file in $CONFIG_SITE; do
1114 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1116echo "$as_me: loading site script $ac_site_file" >&6;}
1117 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 . "$ac_site_file"
1119 fi
1120done
1121
1122if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # Some versions of bash will fail to source /dev/null (special
1124 # files actually), so we avoid doing that.
1125 if test -f "$cache_file"; then
1126 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1127echo "$as_me: loading cache $cache_file" >&6;}
1128 case $cache_file in
1129 [\\/]* | ?:[\\/]* ) . $cache_file;;
1130 *) . ./$cache_file;;
1131 esac
1132 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133else
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1135echo "$as_me: creating cache $cache_file" >&6;}
1136 >$cache_file
1137fi
1138
1139# Check that the precious variables saved in the cache have kept the same
1140# value.
1141ac_cache_corrupted=false
1142for ac_var in `(set) 2>&1 |
1143 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1144 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1145 eval ac_new_set=\$ac_env_${ac_var}_set
1146 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1147 eval ac_new_val="\$ac_env_${ac_var}_value"
1148 case $ac_old_set,$ac_new_set in
1149 set,)
1150 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1151echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1152 ac_cache_corrupted=: ;;
1153 ,set)
1154 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1155echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1156 ac_cache_corrupted=: ;;
1157 ,);;
1158 *)
1159 if test "x$ac_old_val" != "x$ac_new_val"; then
1160 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1161echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1162 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1163echo "$as_me: former value: $ac_old_val" >&2;}
1164 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1165echo "$as_me: current value: $ac_new_val" >&2;}
1166 ac_cache_corrupted=:
1167 fi;;
1168 esac
1169 # Pass precious variables to config.status.
1170 if test "$ac_new_set" = set; then
1171 case $ac_new_val in
1172 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1173 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1174 *) ac_arg=$ac_var=$ac_new_val ;;
1175 esac
1176 case " $ac_configure_args " in
1177 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1178 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1179 esac
1180 fi
1181done
1182if $ac_cache_corrupted; then
1183 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1184echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1185 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1186echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1187 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188fi
1189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1194ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196
Michael W. Hudson54241132001-12-07 15:38:26 +00001197
1198
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213ac_config_headers="$ac_config_headers pyconfig.h"
1214
1215
1216# This is for stuff that absolutely must end up in pyconfig.h.
1217# Please use pyport.h instead, if possible.
1218
1219
1220
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001221# Set VERSION so we only need to edit in one place (i.e., here)
1222
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001223VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001224
Martin v. Löwis1142de32002-03-29 16:28:31 +00001225
1226SOVERSION=1.0
1227
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001228# Arguments passed to configure.
1229
1230CONFIG_ARGS="$ac_configure_args"
1231
Michael W. Hudson54241132001-12-07 15:38:26 +00001232
Jack Jansene578a632001-08-15 01:27:14 +00001233# Check whether --enable-framework or --disable-framework was given.
1234if test "${enable_framework+set}" = set; then
1235 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001236
Jack Jansene578a632001-08-15 01:27:14 +00001237 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001239 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001240 esac
1241 case $enableval in
1242 no)
1243 PYTHONFRAMEWORK=
1244 PYTHONFRAMEWORKDIR=no-framework
1245 PYTHONFRAMEWORKPREFIX=
1246 PYTHONFRAMEWORKINSTALLDIR=
1247 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001248 ;;
1249 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001250 PYTHONFRAMEWORK=Python
1251 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001252 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001253 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1254 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001255 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001256
Guido van Rossum563e7081996-09-10 18:20:48 +00001257else
Martin v. Löwis11437992002-04-12 09:54:03 +00001258
Jack Jansene578a632001-08-15 01:27:14 +00001259 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001260 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001261 PYTHONFRAMEWORKPREFIX=
1262 PYTHONFRAMEWORKINSTALLDIR=
1263 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001264
Martin v. Löwis11437992002-04-12 09:54:03 +00001265fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001266
1267
1268
1269
Jack Jansene578a632001-08-15 01:27:14 +00001270
1271##AC_ARG_WITH(dyld,
1272##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1273##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001274# Set name for machine-dependent library files
1275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276echo "$as_me:$LINENO: checking MACHDEP" >&5
1277echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001278if test -z "$MACHDEP"
1279then
Guido van Rossum563e7081996-09-10 18:20:48 +00001280 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001281 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001282 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001284 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001285 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001286 ac_md_system=`echo $ac_sys_system |
1287 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1288 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001289 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001290 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001291
Guido van Rossum07397971997-04-29 21:49:50 +00001292 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001293 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001294 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001295 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001296 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001297 esac
1298fi
Guido van Rossum91922671997-10-09 20:24:13 +00001299
1300#
1301# SGI compilers allow the specification of the both the ABI and the
1302# ISA on the command line. Depending on the values of these switches,
1303# different and often incompatable code will be generated.
1304#
1305# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1306# thus supply support for various ABI/ISA combinations. The MACHDEP
1307# variable is also adjusted.
1308#
1309
1310if test ! -z "$SGI_ABI"
1311then
1312 CC="cc $SGI_ABI"
1313 LDFLAGS="$SGI_ABI $LDFLAGS"
1314 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1315fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001316echo "$as_me:$LINENO: result: $MACHDEP" >&5
1317echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001318
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001320echo "$as_me:$LINENO: checking for --without-gcc" >&5
1321echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1322
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001323# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001324if test "${with_gcc+set}" = set; then
1325 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001326
Guido van Rossum7f43da71994-08-01 12:15:30 +00001327 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001328 no) CC=cc
1329 without_gcc=yes;;
1330 yes) CC=gcc
1331 without_gcc=no;;
1332 *) CC=$withval
1333 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001334 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001335else
Martin v. Löwis11437992002-04-12 09:54:03 +00001336
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001337 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001338 AIX*) CC=cc_r
1339 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001340 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001341 case $BE_HOST_CPU in
1342 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001343 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001344 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +00001345 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 +00001346 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001347 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001348 ;;
1349 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001350 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001351 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001352 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001353 ;;
1354 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001355 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1356echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1357 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001358 ;;
1359 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001360 AR="\$(srcdir)/Modules/ar_beos"
1361 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001362 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001363 Monterey*)
1364 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001365 without_gcc=;;
1366 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001367 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001368fi;
1369echo "$as_me:$LINENO: result: $without_gcc" >&5
1370echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001371
1372
Guido van Rossum95012191999-12-16 17:50:52 +00001373
Fred Drakea1a84e72001-03-06 05:52:16 +00001374MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001375echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1376echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1377
Guido van Rossum95012191999-12-16 17:50:52 +00001378# Check whether --with-cxx or --without-cxx was given.
1379if test "${with_cxx+set}" = set; then
1380 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
Martin v. Löwis22352952000-12-13 17:37:02 +00001382 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001383 case $withval in
1384 no) CXX=
1385 with_cxx=no;;
1386 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001387 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001388 with_cxx=$withval;;
1389 esac
1390else
Martin v. Löwis11437992002-04-12 09:54:03 +00001391
Guido van Rossum95012191999-12-16 17:50:52 +00001392 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001393 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001394
Martin v. Löwis11437992002-04-12 09:54:03 +00001395fi;
1396echo "$as_me:$LINENO: result: $with_cxx" >&5
1397echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001398
1399if test "$with_cxx" = "yes"
1400then
Martin v. Löwis11437992002-04-12 09:54:03 +00001401 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1402echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1403 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001404fi
1405
1406
1407
1408
Martin v. Löwis11437992002-04-12 09:54:03 +00001409if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001410then
1411 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1412do
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 # 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 +00001414set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001415echo "$as_me:$LINENO: checking for $ac_word" >&5
1416echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1417if test "${ac_cv_prog_CXX+set}" = set; then
1418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001419else
1420 if test -n "$CXX"; then
1421 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1422else
Martin v. Löwis11437992002-04-12 09:54:03 +00001423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1424for as_dir in $PATH
1425do
1426 IFS=$as_save_IFS
1427 test -z "$as_dir" && as_dir=.
1428 for ac_exec_ext in '' $ac_executable_extensions; do
1429 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1430 ac_cv_prog_CXX="$ac_prog"
1431 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1432 break 2
1433 fi
1434done
1435done
1436
Martin v. Löwis22352952000-12-13 17:37:02 +00001437fi
1438fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001439CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001440if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 echo "$as_me:$LINENO: result: $CXX" >&5
1442echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001443else
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 echo "$as_me:$LINENO: result: no" >&5
1445echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001446fi
1447
Martin v. Löwis11437992002-04-12 09:54:03 +00001448 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001449done
1450test -n "$CXX" || CXX="notfound"
1451
1452 if test "$CXX" = "notfound"
1453 then
1454 CXX=
1455 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001456 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001457ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001458ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1459ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1460ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1461 cat >conftest.$ac_ext <<_ACEOF
1462#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001463#include "confdefs.h"
1464
Martin v. Löwis11437992002-04-12 09:54:03 +00001465#ifdef F77_DUMMY_MAIN
1466# ifdef __cplusplus
1467 extern "C"
1468# endif
1469 int F77_DUMMY_MAIN() { return 1; }
1470#endif
1471int
1472main ()
1473{
Michael W. Hudson54241132001-12-07 15:38:26 +00001474
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 ;
1476 return 0;
1477}
1478_ACEOF
1479ac_clean_files_save=$ac_clean_files
1480ac_clean_files="$ac_clean_files a.out a.exe"
1481# Try to create an executable without -o first, disregard a.out.
1482# It will help us diagnose broken compilers, and finding out an intuition
1483# of exeext.
1484echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1485echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1486ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1487if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1488 (eval $ac_link_default) 2>&5
1489 ac_status=$?
1490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1491 (exit $ac_status); }; then
1492 # Find the output, starting from the most likely. This scheme is
1493# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1494# resort.
1495
1496# Be careful to initialize this variable, since it used to be cached.
1497# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1498ac_cv_exeext=
1499for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1500 ls a.out conftest 2>/dev/null;
1501 ls a.* conftest.* 2>/dev/null`; do
1502 case $ac_file in
1503 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1504 a.out ) # We found the default executable, but exeext='' is most
1505 # certainly right.
1506 break;;
1507 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1508 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1509 export ac_cv_exeext
1510 break;;
1511 * ) break;;
1512 esac
1513done
1514else
1515 echo "$as_me: failed program was:" >&5
1516cat conftest.$ac_ext >&5
1517{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1518echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1519 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001520fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001521
1522ac_exeext=$ac_cv_exeext
1523echo "$as_me:$LINENO: result: $ac_file" >&5
1524echo "${ECHO_T}$ac_file" >&6
1525
1526# Check the compiler produces executables we can run. If not, either
1527# the compiler is broken, or we cross compile.
1528echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1529echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1530# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1531# If not cross compiling, check that we can run a simple program.
1532if test "$cross_compiling" != yes; then
1533 if { ac_try='./$ac_file'
1534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1535 (eval $ac_try) 2>&5
1536 ac_status=$?
1537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1538 (exit $ac_status); }; }; then
1539 cross_compiling=no
1540 else
1541 if test "$cross_compiling" = maybe; then
1542 cross_compiling=yes
1543 else
1544 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1545If you meant to cross compile, use \`--host'." >&5
1546echo "$as_me: error: cannot run C++ compiled programs.
1547If you meant to cross compile, use \`--host'." >&2;}
1548 { (exit 1); exit 1; }; }
1549 fi
1550 fi
1551fi
1552echo "$as_me:$LINENO: result: yes" >&5
1553echo "${ECHO_T}yes" >&6
1554
1555rm -f a.out a.exe conftest$ac_cv_exeext
1556ac_clean_files=$ac_clean_files_save
1557# Check the compiler produces executables we can run. If not, either
1558# the compiler is broken, or we cross compile.
1559echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1560echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1561echo "$as_me:$LINENO: result: $cross_compiling" >&5
1562echo "${ECHO_T}$cross_compiling" >&6
1563
1564echo "$as_me:$LINENO: checking for suffix of executables" >&5
1565echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1566if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1567 (eval $ac_link) 2>&5
1568 ac_status=$?
1569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1570 (exit $ac_status); }; then
1571 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1572# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1573# work properly (i.e., refer to `conftest.exe'), while it won't with
1574# `rm'.
1575for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1576 case $ac_file in
1577 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1578 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1579 export ac_cv_exeext
1580 break;;
1581 * ) break;;
1582 esac
1583done
1584else
1585 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1586echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1587 { (exit 1); exit 1; }; }
1588fi
1589
1590rm -f conftest$ac_cv_exeext
1591echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1592echo "${ECHO_T}$ac_cv_exeext" >&6
1593
1594rm -f conftest.$ac_ext
1595EXEEXT=$ac_cv_exeext
1596ac_exeext=$EXEEXT
1597
1598 ac_ext=c
1599ac_cpp='$CPP $CPPFLAGS'
1600ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1601ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1602ac_compiler_gnu=$ac_cv_c_compiler_gnu
1603
1604
Martin v. Löwis22352952000-12-13 17:37:02 +00001605
1606 fi
1607fi
1608
Guido van Rossum8b131c51995-03-09 14:10:13 +00001609# If the user switches compilers, we can't believe the cache
1610if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1611then
Martin v. Löwis11437992002-04-12 09:54:03 +00001612 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1613(it is also a good idea to do 'make clean' before compiling)" >&5
1614echo "$as_me: error: cached CC is different -- throw away $cache_file
1615(it is also a good idea to do 'make clean' before compiling)" >&2;}
1616 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001617fi
1618
Martin v. Löwis11437992002-04-12 09:54:03 +00001619ac_ext=c
1620ac_cpp='$CPP $CPPFLAGS'
1621ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1622ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1623ac_compiler_gnu=$ac_cv_c_compiler_gnu
1624if test -n "$ac_tool_prefix"; then
1625 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1626set dummy ${ac_tool_prefix}gcc; ac_word=$2
1627echo "$as_me:$LINENO: checking for $ac_word" >&5
1628echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1629if test "${ac_cv_prog_CC+set}" = set; then
1630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001631else
1632 if test -n "$CC"; then
1633 ac_cv_prog_CC="$CC" # Let the user override the test.
1634else
Martin v. Löwis11437992002-04-12 09:54:03 +00001635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1636for as_dir in $PATH
1637do
1638 IFS=$as_save_IFS
1639 test -z "$as_dir" && as_dir=.
1640 for ac_exec_ext in '' $ac_executable_extensions; do
1641 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1642 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1643 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1644 break 2
1645 fi
1646done
1647done
1648
Jack Jansendd19cf82001-12-06 22:36:17 +00001649fi
1650fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001651CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001652if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 echo "$as_me:$LINENO: result: $CC" >&5
1654echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001655else
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 echo "$as_me:$LINENO: result: no" >&5
1657echo "${ECHO_T}no" >&6
1658fi
1659
1660fi
1661if test -z "$ac_cv_prog_CC"; then
1662 ac_ct_CC=$CC
1663 # Extract the first word of "gcc", so it can be a program name with args.
1664set dummy gcc; ac_word=$2
1665echo "$as_me:$LINENO: checking for $ac_word" >&5
1666echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1667if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1668 echo $ECHO_N "(cached) $ECHO_C" >&6
1669else
1670 if test -n "$ac_ct_CC"; then
1671 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1672else
1673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1674for as_dir in $PATH
1675do
1676 IFS=$as_save_IFS
1677 test -z "$as_dir" && as_dir=.
1678 for ac_exec_ext in '' $ac_executable_extensions; do
1679 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1680 ac_cv_prog_ac_ct_CC="gcc"
1681 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1682 break 2
1683 fi
1684done
1685done
1686
1687fi
1688fi
1689ac_ct_CC=$ac_cv_prog_ac_ct_CC
1690if test -n "$ac_ct_CC"; then
1691 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1692echo "${ECHO_T}$ac_ct_CC" >&6
1693else
1694 echo "$as_me:$LINENO: result: no" >&5
1695echo "${ECHO_T}no" >&6
1696fi
1697
1698 CC=$ac_ct_CC
1699else
1700 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001701fi
1702
Jack Jansendd19cf82001-12-06 22:36:17 +00001703if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001704 if test -n "$ac_tool_prefix"; then
1705 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1706set dummy ${ac_tool_prefix}cc; ac_word=$2
1707echo "$as_me:$LINENO: checking for $ac_word" >&5
1708echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1709if test "${ac_cv_prog_CC+set}" = set; then
1710 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001711else
1712 if test -n "$CC"; then
1713 ac_cv_prog_CC="$CC" # Let the user override the test.
1714else
Martin v. Löwis11437992002-04-12 09:54:03 +00001715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1716for as_dir in $PATH
1717do
1718 IFS=$as_save_IFS
1719 test -z "$as_dir" && as_dir=.
1720 for ac_exec_ext in '' $ac_executable_extensions; do
1721 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1722 ac_cv_prog_CC="${ac_tool_prefix}cc"
1723 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1724 break 2
1725 fi
1726done
1727done
1728
1729fi
1730fi
1731CC=$ac_cv_prog_CC
1732if test -n "$CC"; then
1733 echo "$as_me:$LINENO: result: $CC" >&5
1734echo "${ECHO_T}$CC" >&6
1735else
1736 echo "$as_me:$LINENO: result: no" >&5
1737echo "${ECHO_T}no" >&6
1738fi
1739
1740fi
1741if test -z "$ac_cv_prog_CC"; then
1742 ac_ct_CC=$CC
1743 # Extract the first word of "cc", so it can be a program name with args.
1744set dummy cc; ac_word=$2
1745echo "$as_me:$LINENO: checking for $ac_word" >&5
1746echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1747if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1748 echo $ECHO_N "(cached) $ECHO_C" >&6
1749else
1750 if test -n "$ac_ct_CC"; then
1751 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1752else
1753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1754for as_dir in $PATH
1755do
1756 IFS=$as_save_IFS
1757 test -z "$as_dir" && as_dir=.
1758 for ac_exec_ext in '' $ac_executable_extensions; do
1759 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1760 ac_cv_prog_ac_ct_CC="cc"
1761 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1762 break 2
1763 fi
1764done
1765done
1766
1767fi
1768fi
1769ac_ct_CC=$ac_cv_prog_ac_ct_CC
1770if test -n "$ac_ct_CC"; then
1771 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1772echo "${ECHO_T}$ac_ct_CC" >&6
1773else
1774 echo "$as_me:$LINENO: result: no" >&5
1775echo "${ECHO_T}no" >&6
1776fi
1777
1778 CC=$ac_ct_CC
1779else
1780 CC="$ac_cv_prog_CC"
1781fi
1782
1783fi
1784if test -z "$CC"; then
1785 # Extract the first word of "cc", so it can be a program name with args.
1786set dummy cc; ac_word=$2
1787echo "$as_me:$LINENO: checking for $ac_word" >&5
1788echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1789if test "${ac_cv_prog_CC+set}" = set; then
1790 echo $ECHO_N "(cached) $ECHO_C" >&6
1791else
1792 if test -n "$CC"; then
1793 ac_cv_prog_CC="$CC" # Let the user override the test.
1794else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001795 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1797for as_dir in $PATH
1798do
1799 IFS=$as_save_IFS
1800 test -z "$as_dir" && as_dir=.
1801 for ac_exec_ext in '' $ac_executable_extensions; do
1802 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1803 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1804 ac_prog_rejected=yes
1805 continue
1806 fi
1807 ac_cv_prog_CC="cc"
1808 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1809 break 2
1810 fi
1811done
1812done
1813
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001814if test $ac_prog_rejected = yes; then
1815 # We found a bogon in the path, so make sure we never use it.
1816 set dummy $ac_cv_prog_CC
1817 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001818 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001819 # We chose a different compiler from the bogus one.
1820 # However, it has the same basename, so the bogon will be chosen
1821 # first if we set CC to just the basename; use the full file name.
1822 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001823 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001824 shift
1825 ac_cv_prog_CC="$@"
1826 fi
1827fi
1828fi
1829fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001830CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001831if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001832 echo "$as_me:$LINENO: result: $CC" >&5
1833echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001834else
Martin v. Löwis11437992002-04-12 09:54:03 +00001835 echo "$as_me:$LINENO: result: no" >&5
1836echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001837fi
1838
Martin v. Löwis11437992002-04-12 09:54:03 +00001839fi
1840if test -z "$CC"; then
1841 if test -n "$ac_tool_prefix"; then
1842 for ac_prog in cl
1843 do
1844 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1845set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1846echo "$as_me:$LINENO: checking for $ac_word" >&5
1847echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1848if test "${ac_cv_prog_CC+set}" = set; then
1849 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001850else
1851 if test -n "$CC"; then
1852 ac_cv_prog_CC="$CC" # Let the user override the test.
1853else
Martin v. Löwis11437992002-04-12 09:54:03 +00001854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1855for as_dir in $PATH
1856do
1857 IFS=$as_save_IFS
1858 test -z "$as_dir" && as_dir=.
1859 for ac_exec_ext in '' $ac_executable_extensions; do
1860 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1861 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1862 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1863 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001864 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001865done
1866done
1867
1868fi
1869fi
1870CC=$ac_cv_prog_CC
1871if test -n "$CC"; then
1872 echo "$as_me:$LINENO: result: $CC" >&5
1873echo "${ECHO_T}$CC" >&6
1874else
1875 echo "$as_me:$LINENO: result: no" >&5
1876echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001877fi
1878
Martin v. Löwis11437992002-04-12 09:54:03 +00001879 test -n "$CC" && break
1880 done
1881fi
1882if test -z "$CC"; then
1883 ac_ct_CC=$CC
1884 for ac_prog in cl
1885do
1886 # Extract the first word of "$ac_prog", so it can be a program name with args.
1887set dummy $ac_prog; ac_word=$2
1888echo "$as_me:$LINENO: checking for $ac_word" >&5
1889echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1890if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1891 echo $ECHO_N "(cached) $ECHO_C" >&6
1892else
1893 if test -n "$ac_ct_CC"; then
1894 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1895else
1896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1897for as_dir in $PATH
1898do
1899 IFS=$as_save_IFS
1900 test -z "$as_dir" && as_dir=.
1901 for ac_exec_ext in '' $ac_executable_extensions; do
1902 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1903 ac_cv_prog_ac_ct_CC="$ac_prog"
1904 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1905 break 2
1906 fi
1907done
1908done
Jack Jansendd19cf82001-12-06 22:36:17 +00001909
Martin v. Löwis11437992002-04-12 09:54:03 +00001910fi
1911fi
1912ac_ct_CC=$ac_cv_prog_ac_ct_CC
1913if test -n "$ac_ct_CC"; then
1914 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1915echo "${ECHO_T}$ac_ct_CC" >&6
1916else
1917 echo "$as_me:$LINENO: result: no" >&5
1918echo "${ECHO_T}no" >&6
1919fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001920
Martin v. Löwis11437992002-04-12 09:54:03 +00001921 test -n "$ac_ct_CC" && break
1922done
Michael W. Hudson54241132001-12-07 15:38:26 +00001923
Martin v. Löwis11437992002-04-12 09:54:03 +00001924 CC=$ac_ct_CC
1925fi
1926
1927fi
1928
1929
1930test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1931echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1932 { (exit 1); exit 1; }; }
1933
1934# Provide some information about the compiler.
1935echo "$as_me:$LINENO:" \
1936 "checking for C compiler version" >&5
1937ac_compiler=`set X $ac_compile; echo $2`
1938{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1939 (eval $ac_compiler --version </dev/null >&5) 2>&5
1940 ac_status=$?
1941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1942 (exit $ac_status); }
1943{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1944 (eval $ac_compiler -v </dev/null >&5) 2>&5
1945 ac_status=$?
1946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1947 (exit $ac_status); }
1948{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1949 (eval $ac_compiler -V </dev/null >&5) 2>&5
1950 ac_status=$?
1951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1952 (exit $ac_status); }
1953
1954cat >conftest.$ac_ext <<_ACEOF
1955#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001956#include "confdefs.h"
1957
Martin v. Löwis11437992002-04-12 09:54:03 +00001958#ifdef F77_DUMMY_MAIN
1959# ifdef __cplusplus
1960 extern "C"
1961# endif
1962 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001964int
1965main ()
1966{
1967
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972ac_clean_files_save=$ac_clean_files
1973ac_clean_files="$ac_clean_files a.out a.exe"
1974# Try to create an executable without -o first, disregard a.out.
1975# It will help us diagnose broken compilers, and finding out an intuition
1976# of exeext.
1977echo "$as_me:$LINENO: checking for C compiler default output" >&5
1978echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1979ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1980if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1981 (eval $ac_link_default) 2>&5
1982 ac_status=$?
1983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1984 (exit $ac_status); }; then
1985 # Find the output, starting from the most likely. This scheme is
1986# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1987# resort.
1988
1989# Be careful to initialize this variable, since it used to be cached.
1990# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1991ac_cv_exeext=
1992for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1993 ls a.out conftest 2>/dev/null;
1994 ls a.* conftest.* 2>/dev/null`; do
1995 case $ac_file in
1996 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1997 a.out ) # We found the default executable, but exeext='' is most
1998 # certainly right.
1999 break;;
2000 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2001 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2002 export ac_cv_exeext
2003 break;;
2004 * ) break;;
2005 esac
2006done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002007else
Martin v. Löwis11437992002-04-12 09:54:03 +00002008 echo "$as_me: failed program was:" >&5
2009cat conftest.$ac_ext >&5
2010{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2011echo "$as_me: error: C compiler cannot create executables" >&2;}
2012 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002013fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002014
Martin v. Löwis11437992002-04-12 09:54:03 +00002015ac_exeext=$ac_cv_exeext
2016echo "$as_me:$LINENO: result: $ac_file" >&5
2017echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002018
Martin v. Löwis11437992002-04-12 09:54:03 +00002019# Check the compiler produces executables we can run. If not, either
2020# the compiler is broken, or we cross compile.
2021echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2022echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2023# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2024# If not cross compiling, check that we can run a simple program.
2025if test "$cross_compiling" != yes; then
2026 if { ac_try='./$ac_file'
2027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2028 (eval $ac_try) 2>&5
2029 ac_status=$?
2030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2031 (exit $ac_status); }; }; then
2032 cross_compiling=no
2033 else
2034 if test "$cross_compiling" = maybe; then
2035 cross_compiling=yes
2036 else
2037 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2038If you meant to cross compile, use \`--host'." >&5
2039echo "$as_me: error: cannot run C compiled programs.
2040If you meant to cross compile, use \`--host'." >&2;}
2041 { (exit 1); exit 1; }; }
2042 fi
2043 fi
2044fi
2045echo "$as_me:$LINENO: result: yes" >&5
2046echo "${ECHO_T}yes" >&6
2047
2048rm -f a.out a.exe conftest$ac_cv_exeext
2049ac_clean_files=$ac_clean_files_save
2050# Check the compiler produces executables we can run. If not, either
2051# the compiler is broken, or we cross compile.
2052echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2053echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2054echo "$as_me:$LINENO: result: $cross_compiling" >&5
2055echo "${ECHO_T}$cross_compiling" >&6
2056
2057echo "$as_me:$LINENO: checking for suffix of executables" >&5
2058echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2059if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2060 (eval $ac_link) 2>&5
2061 ac_status=$?
2062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2063 (exit $ac_status); }; then
2064 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2065# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2066# work properly (i.e., refer to `conftest.exe'), while it won't with
2067# `rm'.
2068for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2069 case $ac_file in
2070 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2071 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2072 export ac_cv_exeext
2073 break;;
2074 * ) break;;
2075 esac
2076done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002077else
Martin v. Löwis11437992002-04-12 09:54:03 +00002078 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2079echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2080 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002081fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002082
Martin v. Löwis11437992002-04-12 09:54:03 +00002083rm -f conftest$ac_cv_exeext
2084echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2085echo "${ECHO_T}$ac_cv_exeext" >&6
2086
2087rm -f conftest.$ac_ext
2088EXEEXT=$ac_cv_exeext
2089ac_exeext=$EXEEXT
2090echo "$as_me:$LINENO: checking for suffix of object files" >&5
2091echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2092if test "${ac_cv_objext+set}" = set; then
2093 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002094else
Martin v. Löwis11437992002-04-12 09:54:03 +00002095 cat >conftest.$ac_ext <<_ACEOF
2096#line $LINENO "configure"
2097#include "confdefs.h"
2098
2099#ifdef F77_DUMMY_MAIN
2100# ifdef __cplusplus
2101 extern "C"
2102# endif
2103 int F77_DUMMY_MAIN() { return 1; }
2104#endif
2105int
2106main ()
2107{
2108
2109 ;
2110 return 0;
2111}
2112_ACEOF
2113rm -f conftest.o conftest.obj
2114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2115 (eval $ac_compile) 2>&5
2116 ac_status=$?
2117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2118 (exit $ac_status); }; then
2119 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2120 case $ac_file in
2121 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2122 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2123 break;;
2124 esac
2125done
2126else
2127 echo "$as_me: failed program was:" >&5
2128cat conftest.$ac_ext >&5
2129{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2130echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2131 { (exit 1); exit 1; }; }
2132fi
2133
2134rm -f conftest.$ac_cv_objext conftest.$ac_ext
2135fi
2136echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2137echo "${ECHO_T}$ac_cv_objext" >&6
2138OBJEXT=$ac_cv_objext
2139ac_objext=$OBJEXT
2140echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2141echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2142if test "${ac_cv_c_compiler_gnu+set}" = set; then
2143 echo $ECHO_N "(cached) $ECHO_C" >&6
2144else
2145 cat >conftest.$ac_ext <<_ACEOF
2146#line $LINENO "configure"
2147#include "confdefs.h"
2148
2149#ifdef F77_DUMMY_MAIN
2150# ifdef __cplusplus
2151 extern "C"
2152# endif
2153 int F77_DUMMY_MAIN() { return 1; }
2154#endif
2155int
2156main ()
2157{
2158#ifndef __GNUC__
2159 choke me
2160#endif
2161
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166rm -f conftest.$ac_objext
2167if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2168 (eval $ac_compile) 2>&5
2169 ac_status=$?
2170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2171 (exit $ac_status); } &&
2172 { ac_try='test -s conftest.$ac_objext'
2173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2174 (eval $ac_try) 2>&5
2175 ac_status=$?
2176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2177 (exit $ac_status); }; }; then
2178 ac_compiler_gnu=yes
2179else
2180 echo "$as_me: failed program was:" >&5
2181cat conftest.$ac_ext >&5
2182ac_compiler_gnu=no
2183fi
2184rm -f conftest.$ac_objext conftest.$ac_ext
2185ac_cv_c_compiler_gnu=$ac_compiler_gnu
2186
2187fi
2188echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2189echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2190GCC=`test $ac_compiler_gnu = yes && echo yes`
2191ac_test_CFLAGS=${CFLAGS+set}
2192ac_save_CFLAGS=$CFLAGS
2193CFLAGS="-g"
2194echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2195echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2196if test "${ac_cv_prog_cc_g+set}" = set; then
2197 echo $ECHO_N "(cached) $ECHO_C" >&6
2198else
2199 cat >conftest.$ac_ext <<_ACEOF
2200#line $LINENO "configure"
2201#include "confdefs.h"
2202
2203#ifdef F77_DUMMY_MAIN
2204# ifdef __cplusplus
2205 extern "C"
2206# endif
2207 int F77_DUMMY_MAIN() { return 1; }
2208#endif
2209int
2210main ()
2211{
2212
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217rm -f conftest.$ac_objext
2218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2219 (eval $ac_compile) 2>&5
2220 ac_status=$?
2221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2222 (exit $ac_status); } &&
2223 { ac_try='test -s conftest.$ac_objext'
2224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2225 (eval $ac_try) 2>&5
2226 ac_status=$?
2227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2228 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002229 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002230else
Martin v. Löwis11437992002-04-12 09:54:03 +00002231 echo "$as_me: failed program was:" >&5
2232cat conftest.$ac_ext >&5
2233ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002234fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002235rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002236fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002237echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2238echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002239if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002240 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002241elif test $ac_cv_prog_cc_g = yes; then
2242 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002243 CFLAGS="-g -O2"
2244 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002245 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002246 fi
2247else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002248 if test "$GCC" = yes; then
2249 CFLAGS="-O2"
2250 else
2251 CFLAGS=
2252 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002253fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002254# Some people use a C++ compiler to compile C. Since we use `exit',
2255# in C++ we need to declare it. In case someone uses the same compiler
2256# for both compiling C and C++ we need to have the C++ compiler decide
2257# the declaration of exit, since it's the most demanding environment.
2258cat >conftest.$ac_ext <<_ACEOF
2259#ifndef __cplusplus
2260 choke me
2261#endif
2262_ACEOF
2263rm -f conftest.$ac_objext
2264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2265 (eval $ac_compile) 2>&5
2266 ac_status=$?
2267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2268 (exit $ac_status); } &&
2269 { ac_try='test -s conftest.$ac_objext'
2270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2271 (eval $ac_try) 2>&5
2272 ac_status=$?
2273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2274 (exit $ac_status); }; }; then
2275 for ac_declaration in \
2276 ''\
2277 '#include <stdlib.h>' \
2278 'extern "C" void std::exit (int) throw (); using std::exit;' \
2279 'extern "C" void std::exit (int); using std::exit;' \
2280 'extern "C" void exit (int) throw ();' \
2281 'extern "C" void exit (int);' \
2282 'void exit (int);'
2283do
2284 cat >conftest.$ac_ext <<_ACEOF
2285#line $LINENO "configure"
2286#include "confdefs.h"
2287#include <stdlib.h>
2288$ac_declaration
2289#ifdef F77_DUMMY_MAIN
2290# ifdef __cplusplus
2291 extern "C"
2292# endif
2293 int F77_DUMMY_MAIN() { return 1; }
2294#endif
2295int
2296main ()
2297{
2298exit (42);
2299 ;
2300 return 0;
2301}
2302_ACEOF
2303rm -f conftest.$ac_objext
2304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2305 (eval $ac_compile) 2>&5
2306 ac_status=$?
2307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2308 (exit $ac_status); } &&
2309 { ac_try='test -s conftest.$ac_objext'
2310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2311 (eval $ac_try) 2>&5
2312 ac_status=$?
2313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2314 (exit $ac_status); }; }; then
2315 :
2316else
2317 echo "$as_me: failed program was:" >&5
2318cat conftest.$ac_ext >&5
2319continue
2320fi
2321rm -f conftest.$ac_objext conftest.$ac_ext
2322 cat >conftest.$ac_ext <<_ACEOF
2323#line $LINENO "configure"
2324#include "confdefs.h"
2325$ac_declaration
2326#ifdef F77_DUMMY_MAIN
2327# ifdef __cplusplus
2328 extern "C"
2329# endif
2330 int F77_DUMMY_MAIN() { return 1; }
2331#endif
2332int
2333main ()
2334{
2335exit (42);
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340rm -f conftest.$ac_objext
2341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2342 (eval $ac_compile) 2>&5
2343 ac_status=$?
2344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2345 (exit $ac_status); } &&
2346 { ac_try='test -s conftest.$ac_objext'
2347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2348 (eval $ac_try) 2>&5
2349 ac_status=$?
2350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2351 (exit $ac_status); }; }; then
2352 break
2353else
2354 echo "$as_me: failed program was:" >&5
2355cat conftest.$ac_ext >&5
2356fi
2357rm -f conftest.$ac_objext conftest.$ac_ext
2358done
2359rm -f conftest*
2360if test -n "$ac_declaration"; then
2361 echo '#ifdef __cplusplus' >>confdefs.h
2362 echo $ac_declaration >>confdefs.h
2363 echo '#endif' >>confdefs.h
2364fi
2365
2366else
2367 echo "$as_me: failed program was:" >&5
2368cat conftest.$ac_ext >&5
2369fi
2370rm -f conftest.$ac_objext conftest.$ac_ext
2371ac_ext=c
2372ac_cpp='$CPP $CPPFLAGS'
2373ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2374ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2375ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002376
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002377
2378# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002379
2380ac_ext=c
2381ac_cpp='$CPP $CPPFLAGS'
2382ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2383ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2384ac_compiler_gnu=$ac_cv_c_compiler_gnu
2385echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2386echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002387# On Suns, sometimes $CPP names a directory.
2388if test -n "$CPP" && test -d "$CPP"; then
2389 CPP=
2390fi
2391if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002392 if test "${ac_cv_prog_CPP+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002394else
Martin v. Löwis11437992002-04-12 09:54:03 +00002395 # Double quotes because CPP needs to be expanded
2396 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2397 do
2398 ac_preproc_ok=false
2399for ac_c_preproc_warn_flag in '' yes
2400do
2401 # Use a header file that comes with gcc, so configuring glibc
2402 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002403 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002404 # not just through cpp. "Syntax error" is here to catch this case.
2405 cat >conftest.$ac_ext <<_ACEOF
2406#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002407#include "confdefs.h"
2408#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002409 Syntax error
2410_ACEOF
2411if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2412 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2413 ac_status=$?
2414 egrep -v '^ *\+' conftest.er1 >conftest.err
2415 rm -f conftest.er1
2416 cat conftest.err >&5
2417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2418 (exit $ac_status); } >/dev/null; then
2419 if test -s conftest.err; then
2420 ac_cpp_err=$ac_c_preproc_warn_flag
2421 else
2422 ac_cpp_err=
2423 fi
2424else
2425 ac_cpp_err=yes
2426fi
2427if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002428 :
2429else
Martin v. Löwis11437992002-04-12 09:54:03 +00002430 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002431 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002432 # Broken: fails on valid input.
2433continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002434fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002435rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002436
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 # OK, works on sane cases. Now check whether non-existent headers
2438 # can be detected and how.
2439 cat >conftest.$ac_ext <<_ACEOF
2440#line $LINENO "configure"
2441#include "confdefs.h"
2442#include <ac_nonexistent.h>
2443_ACEOF
2444if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2445 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2446 ac_status=$?
2447 egrep -v '^ *\+' conftest.er1 >conftest.err
2448 rm -f conftest.er1
2449 cat conftest.err >&5
2450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2451 (exit $ac_status); } >/dev/null; then
2452 if test -s conftest.err; then
2453 ac_cpp_err=$ac_c_preproc_warn_flag
2454 else
2455 ac_cpp_err=
2456 fi
2457else
2458 ac_cpp_err=yes
2459fi
2460if test -z "$ac_cpp_err"; then
2461 # Broken: success on invalid input.
2462continue
2463else
2464 echo "$as_me: failed program was:" >&5
2465 cat conftest.$ac_ext >&5
2466 # Passes both tests.
2467ac_preproc_ok=:
2468break
2469fi
2470rm -f conftest.err conftest.$ac_ext
2471
2472done
2473# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2474rm -f conftest.err conftest.$ac_ext
2475if $ac_preproc_ok; then
2476 break
2477fi
2478
2479 done
2480 ac_cv_prog_CPP=$CPP
2481
2482fi
2483 CPP=$ac_cv_prog_CPP
2484else
2485 ac_cv_prog_CPP=$CPP
2486fi
2487echo "$as_me:$LINENO: result: $CPP" >&5
2488echo "${ECHO_T}$CPP" >&6
2489ac_preproc_ok=false
2490for ac_c_preproc_warn_flag in '' yes
2491do
2492 # Use a header file that comes with gcc, so configuring glibc
2493 # with a fresh cross-compiler works.
2494 # On the NeXT, cc -E runs the code through the compiler's parser,
2495 # not just through cpp. "Syntax error" is here to catch this case.
2496 cat >conftest.$ac_ext <<_ACEOF
2497#line $LINENO "configure"
2498#include "confdefs.h"
2499#include <assert.h>
2500 Syntax error
2501_ACEOF
2502if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2503 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2504 ac_status=$?
2505 egrep -v '^ *\+' conftest.er1 >conftest.err
2506 rm -f conftest.er1
2507 cat conftest.err >&5
2508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2509 (exit $ac_status); } >/dev/null; then
2510 if test -s conftest.err; then
2511 ac_cpp_err=$ac_c_preproc_warn_flag
2512 else
2513 ac_cpp_err=
2514 fi
2515else
2516 ac_cpp_err=yes
2517fi
2518if test -z "$ac_cpp_err"; then
2519 :
2520else
2521 echo "$as_me: failed program was:" >&5
2522 cat conftest.$ac_ext >&5
2523 # Broken: fails on valid input.
2524continue
2525fi
2526rm -f conftest.err conftest.$ac_ext
2527
2528 # OK, works on sane cases. Now check whether non-existent headers
2529 # can be detected and how.
2530 cat >conftest.$ac_ext <<_ACEOF
2531#line $LINENO "configure"
2532#include "confdefs.h"
2533#include <ac_nonexistent.h>
2534_ACEOF
2535if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2536 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2537 ac_status=$?
2538 egrep -v '^ *\+' conftest.er1 >conftest.err
2539 rm -f conftest.er1
2540 cat conftest.err >&5
2541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2542 (exit $ac_status); } >/dev/null; then
2543 if test -s conftest.err; then
2544 ac_cpp_err=$ac_c_preproc_warn_flag
2545 else
2546 ac_cpp_err=
2547 fi
2548else
2549 ac_cpp_err=yes
2550fi
2551if test -z "$ac_cpp_err"; then
2552 # Broken: success on invalid input.
2553continue
2554else
2555 echo "$as_me: failed program was:" >&5
2556 cat conftest.$ac_ext >&5
2557 # Passes both tests.
2558ac_preproc_ok=:
2559break
2560fi
2561rm -f conftest.err conftest.$ac_ext
2562
2563done
2564# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2565rm -f conftest.err conftest.$ac_ext
2566if $ac_preproc_ok; then
2567 :
2568else
2569 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2570echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2571 { (exit 1); exit 1; }; }
2572fi
2573
2574ac_ext=c
2575ac_cpp='$CPP $CPPFLAGS'
2576ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2577ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2578ac_compiler_gnu=$ac_cv_c_compiler_gnu
2579
2580
2581
2582echo "$as_me:$LINENO: checking for AIX" >&5
2583echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2584cat >conftest.$ac_ext <<_ACEOF
2585#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002586#include "confdefs.h"
2587#ifdef _AIX
2588 yes
2589#endif
2590
Martin v. Löwis11437992002-04-12 09:54:03 +00002591_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2593 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 echo "$as_me:$LINENO: result: yes" >&5
2595echo "${ECHO_T}yes" >&6
2596cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002597#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002598_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002599
2600else
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 echo "$as_me:$LINENO: result: no" >&5
2602echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002603fi
2604rm -f conftest*
2605
Michael W. Hudson54241132001-12-07 15:38:26 +00002606
Martin v. Löwis11437992002-04-12 09:54:03 +00002607echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2608echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2609if test "${ac_cv_header_stdc+set}" = set; then
2610 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002611else
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 cat >conftest.$ac_ext <<_ACEOF
2613#line $LINENO "configure"
2614#include "confdefs.h"
2615#include <stdlib.h>
2616#include <stdarg.h>
2617#include <string.h>
2618#include <float.h>
2619
2620_ACEOF
2621if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2622 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2623 ac_status=$?
2624 egrep -v '^ *\+' conftest.er1 >conftest.err
2625 rm -f conftest.er1
2626 cat conftest.err >&5
2627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2628 (exit $ac_status); } >/dev/null; then
2629 if test -s conftest.err; then
2630 ac_cpp_err=$ac_c_preproc_warn_flag
2631 else
2632 ac_cpp_err=
2633 fi
2634else
2635 ac_cpp_err=yes
2636fi
2637if test -z "$ac_cpp_err"; then
2638 ac_cv_header_stdc=yes
2639else
2640 echo "$as_me: failed program was:" >&5
2641 cat conftest.$ac_ext >&5
2642 ac_cv_header_stdc=no
2643fi
2644rm -f conftest.err conftest.$ac_ext
2645
2646if test $ac_cv_header_stdc = yes; then
2647 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2648 cat >conftest.$ac_ext <<_ACEOF
2649#line $LINENO "configure"
2650#include "confdefs.h"
2651#include <string.h>
2652
2653_ACEOF
2654if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2655 egrep "memchr" >/dev/null 2>&1; then
2656 :
2657else
2658 ac_cv_header_stdc=no
2659fi
2660rm -f conftest*
2661
2662fi
2663
2664if test $ac_cv_header_stdc = yes; then
2665 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2666 cat >conftest.$ac_ext <<_ACEOF
2667#line $LINENO "configure"
2668#include "confdefs.h"
2669#include <stdlib.h>
2670
2671_ACEOF
2672if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2673 egrep "free" >/dev/null 2>&1; then
2674 :
2675else
2676 ac_cv_header_stdc=no
2677fi
2678rm -f conftest*
2679
2680fi
2681
2682if test $ac_cv_header_stdc = yes; then
2683 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2684 if test "$cross_compiling" = yes; then
2685 :
2686else
2687 cat >conftest.$ac_ext <<_ACEOF
2688#line $LINENO "configure"
2689#include "confdefs.h"
2690#include <ctype.h>
2691#if ((' ' & 0x0FF) == 0x020)
2692# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2693# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2694#else
2695# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2696 || ('j' <= (c) && (c) <= 'r') \
2697 || ('s' <= (c) && (c) <= 'z'))
2698# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2699#endif
2700
2701#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2702int
2703main ()
2704{
2705 int i;
2706 for (i = 0; i < 256; i++)
2707 if (XOR (islower (i), ISLOWER (i))
2708 || toupper (i) != TOUPPER (i))
2709 exit(2);
2710 exit (0);
2711}
2712_ACEOF
2713rm -f conftest$ac_exeext
2714if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2715 (eval $ac_link) 2>&5
2716 ac_status=$?
2717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2718 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2720 (eval $ac_try) 2>&5
2721 ac_status=$?
2722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2723 (exit $ac_status); }; }; then
2724 :
2725else
2726 echo "$as_me: program exited with status $ac_status" >&5
2727echo "$as_me: failed program was:" >&5
2728cat conftest.$ac_ext >&5
2729( exit $ac_status )
2730ac_cv_header_stdc=no
2731fi
2732rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2733fi
2734fi
2735fi
2736echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2737echo "${ECHO_T}$ac_cv_header_stdc" >&6
2738if test $ac_cv_header_stdc = yes; then
2739
2740cat >>confdefs.h <<\_ACEOF
2741#define STDC_HEADERS 1
2742_ACEOF
2743
2744fi
2745
2746# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2757 inttypes.h stdint.h unistd.h
2758do
2759as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2760echo "$as_me:$LINENO: checking for $ac_header" >&5
2761echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2762if eval "test \"\${$as_ac_Header+set}\" = set"; then
2763 echo $ECHO_N "(cached) $ECHO_C" >&6
2764else
2765 cat >conftest.$ac_ext <<_ACEOF
2766#line $LINENO "configure"
2767#include "confdefs.h"
2768$ac_includes_default
2769
2770#include <$ac_header>
2771_ACEOF
2772rm -f conftest.$ac_objext
2773if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2774 (eval $ac_compile) 2>&5
2775 ac_status=$?
2776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2777 (exit $ac_status); } &&
2778 { ac_try='test -s conftest.$ac_objext'
2779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2780 (eval $ac_try) 2>&5
2781 ac_status=$?
2782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2783 (exit $ac_status); }; }; then
2784 eval "$as_ac_Header=yes"
2785else
2786 echo "$as_me: failed program was:" >&5
2787cat conftest.$ac_ext >&5
2788eval "$as_ac_Header=no"
2789fi
2790rm -f conftest.$ac_objext conftest.$ac_ext
2791fi
2792echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2793echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2794if test `eval echo '${'$as_ac_Header'}'` = yes; then
2795 cat >>confdefs.h <<_ACEOF
2796#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2797_ACEOF
2798
2799fi
2800
2801done
2802
2803
2804if test "${ac_cv_header_minix_config_h+set}" = set; then
2805 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2806echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2807if test "${ac_cv_header_minix_config_h+set}" = set; then
2808 echo $ECHO_N "(cached) $ECHO_C" >&6
2809fi
2810echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2811echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2812else
2813 # Is the header compilable?
2814echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2815echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2816cat >conftest.$ac_ext <<_ACEOF
2817#line $LINENO "configure"
2818#include "confdefs.h"
2819$ac_includes_default
2820#include <minix/config.h>
2821_ACEOF
2822rm -f conftest.$ac_objext
2823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2824 (eval $ac_compile) 2>&5
2825 ac_status=$?
2826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2827 (exit $ac_status); } &&
2828 { ac_try='test -s conftest.$ac_objext'
2829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2830 (eval $ac_try) 2>&5
2831 ac_status=$?
2832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2833 (exit $ac_status); }; }; then
2834 ac_header_compiler=yes
2835else
2836 echo "$as_me: failed program was:" >&5
2837cat conftest.$ac_ext >&5
2838ac_header_compiler=no
2839fi
2840rm -f conftest.$ac_objext conftest.$ac_ext
2841echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2842echo "${ECHO_T}$ac_header_compiler" >&6
2843
2844# Is the header present?
2845echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2846echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2847cat >conftest.$ac_ext <<_ACEOF
2848#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002849#include "confdefs.h"
2850#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002851_ACEOF
2852if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2853 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2854 ac_status=$?
2855 egrep -v '^ *\+' conftest.er1 >conftest.err
2856 rm -f conftest.er1
2857 cat conftest.err >&5
2858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2859 (exit $ac_status); } >/dev/null; then
2860 if test -s conftest.err; then
2861 ac_cpp_err=$ac_c_preproc_warn_flag
2862 else
2863 ac_cpp_err=
2864 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002865else
Martin v. Löwis11437992002-04-12 09:54:03 +00002866 ac_cpp_err=yes
2867fi
2868if test -z "$ac_cpp_err"; then
2869 ac_header_preproc=yes
2870else
2871 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002872 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002873 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002874fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002875rm -f conftest.err conftest.$ac_ext
2876echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2877echo "${ECHO_T}$ac_header_preproc" >&6
2878
2879# So? What about this header?
2880case $ac_header_compiler:$ac_header_preproc in
2881 yes:no )
2882 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2883echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2884 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2885echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2886 no:yes )
2887 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2888echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2889 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2890echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2891 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2892echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2893esac
2894echo "$as_me:$LINENO: checking for minix/config.h" >&5
2895echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2896if test "${ac_cv_header_minix_config_h+set}" = set; then
2897 echo $ECHO_N "(cached) $ECHO_C" >&6
2898else
2899 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002900fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002901echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2902echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2903
2904fi
2905if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002906 MINIX=yes
2907else
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002909fi
2910
Martin v. Löwis11437992002-04-12 09:54:03 +00002911
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002912if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002913
2914cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002915#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002916_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002917
Martin v. Löwis11437992002-04-12 09:54:03 +00002918
2919cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002920#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002921_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002922
Martin v. Löwis11437992002-04-12 09:54:03 +00002923
2924cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002925#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002926_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002927
2928fi
2929
2930
Michael W. Hudson54241132001-12-07 15:38:26 +00002931
Martin v. Löwis11437992002-04-12 09:54:03 +00002932echo "$as_me:$LINENO: checking for --with-suffix" >&5
2933echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002934
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002935# Check whether --with-suffix or --without-suffix was given.
2936if test "${with_suffix+set}" = set; then
2937 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002938
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002939 case $withval in
2940 no) EXEEXT=;;
2941 yes) EXEEXT=.exe;;
2942 *) EXEEXT=$withval;;
2943 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002944fi;
2945echo "$as_me:$LINENO: result: $EXEEXT" >&5
2946echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002947
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002948# Test whether we're running on a non-case-sensitive system, in which
2949# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002950
Martin v. Löwis11437992002-04-12 09:54:03 +00002951echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2952echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00002953if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002954then
Martin v. Löwis11437992002-04-12 09:54:03 +00002955 echo "$as_me:$LINENO: result: yes" >&5
2956echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002957 BUILDEXEEXT=.exe
2958else
Martin v. Löwis11437992002-04-12 09:54:03 +00002959 echo "$as_me:$LINENO: result: no" >&5
2960echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002961 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002962fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002963
Guido van Rossumdd997f71998-10-07 19:58:26 +00002964case $MACHDEP in
2965bsdos*)
2966 case $CC in
2967 gcc) CC="$CC -D_HAVE_BSDI";;
2968 esac;;
2969esac
2970
Guido van Rossum24b1e751997-08-21 02:29:16 +00002971case $ac_sys_system in
2972hp*|HP*)
2973 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002974 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002975 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002976Monterey*)
2977 case $CC in
2978 cc) CC="$CC -Wl,-Bexport";;
2979 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002980SunOS*)
2981 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002982
2983cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002984#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002985_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002986
2987 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002988esac
2989
Michael W. Hudson54241132001-12-07 15:38:26 +00002990
2991
Martin v. Löwis11437992002-04-12 09:54:03 +00002992echo "$as_me:$LINENO: checking LIBRARY" >&5
2993echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002994if test -z "$LIBRARY"
2995then
2996 LIBRARY='libpython$(VERSION).a'
2997fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002998echo "$as_me:$LINENO: result: $LIBRARY" >&5
2999echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003000
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003001# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003002# name of the library into which to insert object files). BLDLIBRARY is also
3003# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3004# is blank as the main program is not linked directly against LDLIBRARY.
3005# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3006# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3007# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3008# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003009#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003010# RUNSHARED is used to run shared python without installed libraries
3011#
3012# INSTSONAME is the name of the shared library that will be use to install
3013# on the system - some systems like version suffix, others don't
3014
3015
Michael W. Hudson54241132001-12-07 15:38:26 +00003016
3017
3018
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003019
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003020LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003021BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003022INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003023DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003024LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003025RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003026
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003027# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003028# If CXX is set, and if it is needed to link a main function that was
3029# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3030# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003031# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003032# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003033
Martin v. Löwis11437992002-04-12 09:54:03 +00003034echo "$as_me:$LINENO: checking LINKCC" >&5
3035echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003036if test -z "$LINKCC"
3037then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003038 if test -z "$CXX"; then
3039 LINKCC="\$(PURIFY) \$(CC)"
3040 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003041 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003042 $CXX -c conftest.$ac_ext 2>&5
3043 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3044 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3045 then
3046 LINKCC="\$(PURIFY) \$(CC)"
3047 else
3048 LINKCC="\$(PURIFY) \$(CXX)"
3049 fi
3050 rm -fr conftest*
3051 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003052 case $ac_sys_system in
3053 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003054 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003055 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003056 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003057 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003058 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003059 esac
3060fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003061echo "$as_me:$LINENO: result: $LINKCC" >&5
3062echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003063
Martin v. Löwis11437992002-04-12 09:54:03 +00003064echo "$as_me:$LINENO: checking for --enable-shared" >&5
3065echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003066# Check whether --enable-shared or --disable-shared was given.
3067if test "${enable_shared+set}" = set; then
3068 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003069
Martin v. Löwis11437992002-04-12 09:54:03 +00003070fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003071
3072if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003073then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003074 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003075 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003076 enable_shared="yes";;
3077 *)
3078 enable_shared="no";;
3079 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003080fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003081echo "$as_me:$LINENO: result: $enable_shared" >&5
3082echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003083
3084
Martin v. Löwis11437992002-04-12 09:54:03 +00003085echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3086echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003087
Guido van Rossumb8552162001-09-05 14:58:11 +00003088# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3089# library that we build, but we do not want to link against it (we
3090# will find it with a -framework option). For this reason there is an
3091# extra variable BLDLIBRARY against which Python and the extension
3092# modules are linked, BLDLIBRARY. This is normally the same as
3093# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003094if test "$enable_framework"
3095then
3096 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3097 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3098 BLDLIBRARY=''
3099else
3100 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003101fi
Jack Jansene578a632001-08-15 01:27:14 +00003102
Martin v. Löwis1142de32002-03-29 16:28:31 +00003103# Other platforms follow
3104if test $enable_shared = "yes"; then
3105 case $ac_sys_system in
3106 BeOS*)
3107 LDLIBRARY='libpython$(VERSION).so'
3108 ;;
3109 CYGWIN*)
3110 LDLIBRARY='libpython$(VERSION).dll.a'
3111 DLLLIBRARY='libpython$(VERSION).dll'
3112 ;;
3113 SunOS*)
3114 LDLIBRARY='libpython$(VERSION).so'
3115 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3116 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3117 ;;
3118 Linux*)
3119 LDLIBRARY='libpython$(VERSION).so'
3120 BLDLIBRARY='-L. -lpython$(VERSION)'
3121 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3122 INSTSONAME="$LDLIBRARY".$SOVERSION
3123 ;;
3124 hp*|HP*)
3125 LDLIBRARY='libpython$(VERSION).sl'
3126 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3127 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3128 ;;
3129 OSF*)
3130 LDLIBRARY='libpython$(VERSION).so'
3131 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3132 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3133 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003134 atheos*)
3135 LDLIBRARY='libpython$(VERSION).so'
3136 BLDLIBRARY='-L. -lpython$(VERSION)'
3137 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3138 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003139 esac
3140 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3141 case $MACHDEP in
3142 dguxR4)
3143 LDLIBRARY='libpython$(VERSION).so'
3144 OPT="$OPT -pic"
3145 ;;
3146 esac
3147fi
3148
Martin v. Löwis11437992002-04-12 09:54:03 +00003149echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3150echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003151
Martin v. Löwis11437992002-04-12 09:54:03 +00003152if test -n "$ac_tool_prefix"; then
3153 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3154set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3155echo "$as_me:$LINENO: checking for $ac_word" >&5
3156echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3157if test "${ac_cv_prog_RANLIB+set}" = set; then
3158 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003159else
3160 if test -n "$RANLIB"; then
3161 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3162else
Martin v. Löwis11437992002-04-12 09:54:03 +00003163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3164for as_dir in $PATH
3165do
3166 IFS=$as_save_IFS
3167 test -z "$as_dir" && as_dir=.
3168 for ac_exec_ext in '' $ac_executable_extensions; do
3169 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3170 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3171 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3172 break 2
3173 fi
3174done
3175done
3176
Guido van Rossum627b2d71993-12-24 10:39:16 +00003177fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003179RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003180if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003181 echo "$as_me:$LINENO: result: $RANLIB" >&5
3182echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003183else
Martin v. Löwis11437992002-04-12 09:54:03 +00003184 echo "$as_me:$LINENO: result: no" >&5
3185echo "${ECHO_T}no" >&6
3186fi
3187
3188fi
3189if test -z "$ac_cv_prog_RANLIB"; then
3190 ac_ct_RANLIB=$RANLIB
3191 # Extract the first word of "ranlib", so it can be a program name with args.
3192set dummy ranlib; ac_word=$2
3193echo "$as_me:$LINENO: checking for $ac_word" >&5
3194echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3195if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3196 echo $ECHO_N "(cached) $ECHO_C" >&6
3197else
3198 if test -n "$ac_ct_RANLIB"; then
3199 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3200else
3201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3202for as_dir in $PATH
3203do
3204 IFS=$as_save_IFS
3205 test -z "$as_dir" && as_dir=.
3206 for ac_exec_ext in '' $ac_executable_extensions; do
3207 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3208 ac_cv_prog_ac_ct_RANLIB="ranlib"
3209 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3210 break 2
3211 fi
3212done
3213done
3214
3215 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3216fi
3217fi
3218ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3219if test -n "$ac_ct_RANLIB"; then
3220 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3221echo "${ECHO_T}$ac_ct_RANLIB" >&6
3222else
3223 echo "$as_me:$LINENO: result: no" >&5
3224echo "${ECHO_T}no" >&6
3225fi
3226
3227 RANLIB=$ac_ct_RANLIB
3228else
3229 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003230fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003231
3232
Guido van Rossum7f43da71994-08-01 12:15:30 +00003233for ac_prog in ar aal
3234do
Martin v. Löwis11437992002-04-12 09:54:03 +00003235 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003236set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003237echo "$as_me:$LINENO: checking for $ac_word" >&5
3238echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3239if test "${ac_cv_prog_AR+set}" = set; then
3240 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003241else
3242 if test -n "$AR"; then
3243 ac_cv_prog_AR="$AR" # Let the user override the test.
3244else
Martin v. Löwis11437992002-04-12 09:54:03 +00003245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3246for as_dir in $PATH
3247do
3248 IFS=$as_save_IFS
3249 test -z "$as_dir" && as_dir=.
3250 for ac_exec_ext in '' $ac_executable_extensions; do
3251 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3252 ac_cv_prog_AR="$ac_prog"
3253 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3254 break 2
3255 fi
3256done
3257done
3258
Guido van Rossum7f43da71994-08-01 12:15:30 +00003259fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003260fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003261AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003262if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003263 echo "$as_me:$LINENO: result: $AR" >&5
3264echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003265else
Martin v. Löwis11437992002-04-12 09:54:03 +00003266 echo "$as_me:$LINENO: result: no" >&5
3267echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003268fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003269
Martin v. Löwis11437992002-04-12 09:54:03 +00003270 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003271done
3272test -n "$AR" || AR="ar"
3273
Michael W. Hudson54241132001-12-07 15:38:26 +00003274
Neil Schemenauera42c8272001-03-31 00:01:55 +00003275case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003276bsdos*|hp*|HP*)
3277 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003278 if test -z "$INSTALL"
3279 then
3280 INSTALL="${srcdir}/install-sh -c"
3281 fi
3282esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003283ac_aux_dir=
3284for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3285 if test -f $ac_dir/install-sh; then
3286 ac_aux_dir=$ac_dir
3287 ac_install_sh="$ac_aux_dir/install-sh -c"
3288 break
3289 elif test -f $ac_dir/install.sh; then
3290 ac_aux_dir=$ac_dir
3291 ac_install_sh="$ac_aux_dir/install.sh -c"
3292 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003293 elif test -f $ac_dir/shtool; then
3294 ac_aux_dir=$ac_dir
3295 ac_install_sh="$ac_aux_dir/shtool install -c"
3296 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003297 fi
3298done
3299if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003300 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3301echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3302 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003303fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003304ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3305ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3306ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003307
3308# Find a good install program. We prefer a C program (faster),
3309# so one script is as good as another. But avoid the broken or
3310# incompatible versions:
3311# SysV /etc/install, /usr/sbin/install
3312# SunOS /usr/etc/install
3313# IRIX /sbin/install
3314# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003315# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003316# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3317# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3318# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3319# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003320echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3321echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003322if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003323if test "${ac_cv_path_install+set}" = set; then
3324 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003325else
Martin v. Löwis11437992002-04-12 09:54:03 +00003326 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3327for as_dir in $PATH
3328do
3329 IFS=$as_save_IFS
3330 test -z "$as_dir" && as_dir=.
3331 # Account for people who put trailing slashes in PATH elements.
3332case $as_dir/ in
3333 ./ | .// | /cC/* | \
3334 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3335 /usr/ucb/* ) ;;
3336 *)
3337 # OSF1 and SCO ODT 3.0 have their own names for install.
3338 # Don't use installbsd from OSF since it installs stuff as root
3339 # by default.
3340 for ac_prog in ginstall scoinst install; do
3341 for ac_exec_ext in '' $ac_executable_extensions; do
3342 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3343 if test $ac_prog = install &&
3344 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3345 # AIX install. It has an incompatible calling convention.
3346 :
3347 elif test $ac_prog = install &&
3348 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3349 # program-specific install script used by HP pwplus--don't use.
3350 :
3351 else
3352 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3353 break 3
3354 fi
3355 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003356 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003357 done
3358 ;;
3359esac
3360done
3361
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003362
3363fi
3364 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003365 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003366 else
3367 # As a last resort, use the slow shell script. We don't cache a
3368 # path for INSTALL within a source directory, because that will
3369 # break other packages using the cache if that directory is
3370 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003371 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003372 fi
3373fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003374echo "$as_me:$LINENO: result: $INSTALL" >&5
3375echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003376
3377# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3378# It thinks the first close brace ends the variable substitution.
3379test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3380
Martin v. Löwis11437992002-04-12 09:54:03 +00003381test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003382
3383test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3384
Michael W. Hudson54241132001-12-07 15:38:26 +00003385
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003386# Not every filesystem supports hard links
3387
3388if test -z "$LN" ; then
3389 case $ac_sys_system in
3390 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003391 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003392 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003393 *) LN=ln;;
3394 esac
3395fi
3396
Fred Drake109d9862001-07-11 06:27:56 +00003397# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003398echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3399echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3400
Fred Drake109d9862001-07-11 06:27:56 +00003401# Check whether --with-pydebug or --without-pydebug was given.
3402if test "${with_pydebug+set}" = set; then
3403 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003404
Fred Drake109d9862001-07-11 06:27:56 +00003405if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003406then
3407
3408cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003409#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003410_ACEOF
3411
3412 echo "$as_me:$LINENO: result: yes" >&5
3413echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003414 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003415else echo "$as_me:$LINENO: result: no" >&5
3416echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003417fi
3418else
Martin v. Löwis11437992002-04-12 09:54:03 +00003419 echo "$as_me:$LINENO: result: no" >&5
3420echo "${ECHO_T}no" >&6
3421fi;
Fred Drake109d9862001-07-11 06:27:56 +00003422
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003423# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003424
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003425if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003426then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003427 case $GCC in
3428 yes)
3429 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003430 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003431 if test "$Py_DEBUG" = 'true' ; then
3432 # Optimization messes up debuggers, so turn it off for
3433 # debug builds.
3434 OPT="-g -Wall -Wstrict-prototypes"
3435 else
3436 OPT="-g -O3 -Wall -Wstrict-prototypes"
3437 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003438 *)
Fred Drake109d9862001-07-11 06:27:56 +00003439 OPT="-O3 -Wall -Wstrict-prototypes";;
3440 esac
3441 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003442 *)
3443 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003444 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003445 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3446 *)
3447 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003448 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003449 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003450 case $ac_sys_system in
3451 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003452 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003453 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003454fi
3455
Fred Drakee1ceaa02001-12-04 20:55:47 +00003456if test "$Py_DEBUG" = 'true'; then
3457 :
3458else
3459 OPT="-DNDEBUG $OPT"
3460fi
3461
Trent Mick635f6fb2000-08-23 21:33:05 +00003462# The current (beta) Monterey compiler dies with optimizations
3463case $ac_sys_system in
3464Monterey*) OPT="";;
3465esac
3466
Guido van Rossum563e7081996-09-10 18:20:48 +00003467if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003468then
3469 OPT="$OPT $ac_arch_flags"
3470fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003471
Martin v. Löwis11437992002-04-12 09:54:03 +00003472echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3473echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3474if test "${ac_cv_opt_olimit_ok+set}" = set; then
3475 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003476else
3477 ac_save_cc="$CC"
3478CC="$CC -OPT:Olimit=0"
3479if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003480 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003481else
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 cat >conftest.$ac_ext <<_ACEOF
3483#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003484#include "confdefs.h"
3485int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003486_ACEOF
3487rm -f conftest$ac_exeext
3488if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3489 (eval $ac_link) 2>&5
3490 ac_status=$?
3491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3492 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3494 (eval $ac_try) 2>&5
3495 ac_status=$?
3496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3497 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003498 ac_cv_opt_olimit_ok=yes
3499else
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 echo "$as_me: program exited with status $ac_status" >&5
3501echo "$as_me: failed program was:" >&5
3502cat conftest.$ac_ext >&5
3503( exit $ac_status )
3504ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003505fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003506rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003507fi
Guido van Rossum91922671997-10-09 20:24:13 +00003508CC="$ac_save_cc"
3509fi
3510
Martin v. Löwis11437992002-04-12 09:54:03 +00003511echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3512echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003513if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003514 case $ac_sys_system in
3515 Darwin*) OPT="$OPT" ;;
3516 *) OPT="$OPT -OPT:Olimit=0";;
3517 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003518else
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3520echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3521 if test "${ac_cv_olimit_ok+set}" = set; then
3522 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003523else
3524 ac_save_cc="$CC"
3525 CC="$CC -Olimit 1500"
3526 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003527 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003528else
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 cat >conftest.$ac_ext <<_ACEOF
3530#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003531#include "confdefs.h"
3532int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003533_ACEOF
3534rm -f conftest$ac_exeext
3535if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3536 (eval $ac_link) 2>&5
3537 ac_status=$?
3538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3539 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3541 (eval $ac_try) 2>&5
3542 ac_status=$?
3543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3544 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003545 ac_cv_olimit_ok=yes
3546else
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 echo "$as_me: program exited with status $ac_status" >&5
3548echo "$as_me: failed program was:" >&5
3549cat conftest.$ac_ext >&5
3550( exit $ac_status )
3551ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003552fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003553rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003554fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003555 CC="$ac_save_cc"
3556fi
3557
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3559echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003560 if test $ac_cv_olimit_ok = yes; then
3561 OPT="$OPT -Olimit 1500"
3562 fi
3563fi
3564
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003565# On some compilers, pthreads are available without further options
3566# (e.g. MacOS X). On some of these systems, the compiler will not
3567# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3568# So we have to see first whether pthreads are available without
3569# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003570echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3571echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3572if test "${ac_cv_pthread_is_default+set}" = set; then
3573 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003574else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003575 if test "$cross_compiling" = yes; then
3576 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003577else
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 cat >conftest.$ac_ext <<_ACEOF
3579#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003580#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003581
Martin v. Löwis130fb172001-07-19 11:00:41 +00003582#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003583
3584void* routine(void* p){return NULL;}
3585
3586int main(){
3587 pthread_t p;
3588 if(pthread_create(&p,NULL,routine,NULL)!=0)
3589 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003590 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003591 return 0;
3592}
3593
Martin v. Löwis11437992002-04-12 09:54:03 +00003594_ACEOF
3595rm -f conftest$ac_exeext
3596if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3597 (eval $ac_link) 2>&5
3598 ac_status=$?
3599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3600 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3602 (eval $ac_try) 2>&5
3603 ac_status=$?
3604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3605 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003606 ac_cv_pthread_is_default=yes
3607else
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 echo "$as_me: program exited with status $ac_status" >&5
3609echo "$as_me: failed program was:" >&5
3610cat conftest.$ac_ext >&5
3611( exit $ac_status )
3612ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003613fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003614rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003615fi
3616
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003617fi
3618
Martin v. Löwis11437992002-04-12 09:54:03 +00003619echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3620echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003621
Michael W. Hudson54241132001-12-07 15:38:26 +00003622
Martin v. Löwis11437992002-04-12 09:54:03 +00003623if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003624then
3625 ac_cv_kpthread=no
3626else
3627# -Kpthread, if available, provides the right #defines
3628# and linker options to make pthread_create available
3629# Some compilers won't report that they do not support -Kpthread,
3630# so we need to run a program to see whether it really made the
3631# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003632echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3633echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3634if test "${ac_cv_kpthread+set}" = set; then
3635 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003636else
3637 ac_save_cc="$CC"
3638CC="$CC -Kpthread"
3639if test "$cross_compiling" = yes; then
3640 ac_cv_kpthread=no
3641else
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 cat >conftest.$ac_ext <<_ACEOF
3643#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003644#include "confdefs.h"
3645
3646#include <pthread.h>
3647
3648void* routine(void* p){return NULL;}
3649
3650int main(){
3651 pthread_t p;
3652 if(pthread_create(&p,NULL,routine,NULL)!=0)
3653 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003654 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003655 return 0;
3656}
3657
Martin v. Löwis11437992002-04-12 09:54:03 +00003658_ACEOF
3659rm -f conftest$ac_exeext
3660if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3661 (eval $ac_link) 2>&5
3662 ac_status=$?
3663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3664 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3666 (eval $ac_try) 2>&5
3667 ac_status=$?
3668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3669 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003670 ac_cv_kpthread=yes
3671else
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 echo "$as_me: program exited with status $ac_status" >&5
3673echo "$as_me: failed program was:" >&5
3674cat conftest.$ac_ext >&5
3675( exit $ac_status )
3676ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003677fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003678rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003679fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003680CC="$ac_save_cc"
3681fi
3682
Martin v. Löwis11437992002-04-12 09:54:03 +00003683echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3684echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003685fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003686
Michael W. Hudson54241132001-12-07 15:38:26 +00003687
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003688# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003689echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3690echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3691if test "${ac_cv_header_stdc+set}" = set; then
3692 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003693else
Martin v. Löwis11437992002-04-12 09:54:03 +00003694 cat >conftest.$ac_ext <<_ACEOF
3695#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003696#include "confdefs.h"
3697#include <stdlib.h>
3698#include <stdarg.h>
3699#include <string.h>
3700#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003701
3702_ACEOF
3703if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3704 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3705 ac_status=$?
3706 egrep -v '^ *\+' conftest.er1 >conftest.err
3707 rm -f conftest.er1
3708 cat conftest.err >&5
3709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3710 (exit $ac_status); } >/dev/null; then
3711 if test -s conftest.err; then
3712 ac_cpp_err=$ac_c_preproc_warn_flag
3713 else
3714 ac_cpp_err=
3715 fi
3716else
3717 ac_cpp_err=yes
3718fi
3719if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003720 ac_cv_header_stdc=yes
3721else
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003723 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003724 ac_cv_header_stdc=no
3725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003726rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003727
3728if test $ac_cv_header_stdc = yes; then
3729 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 cat >conftest.$ac_ext <<_ACEOF
3731#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003732#include "confdefs.h"
3733#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003734
3735_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003736if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3737 egrep "memchr" >/dev/null 2>&1; then
3738 :
3739else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003740 ac_cv_header_stdc=no
3741fi
3742rm -f conftest*
3743
3744fi
3745
3746if test $ac_cv_header_stdc = yes; then
3747 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003748 cat >conftest.$ac_ext <<_ACEOF
3749#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003750#include "confdefs.h"
3751#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003752
3753_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003754if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3755 egrep "free" >/dev/null 2>&1; then
3756 :
3757else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003758 ac_cv_header_stdc=no
3759fi
3760rm -f conftest*
3761
3762fi
3763
3764if test $ac_cv_header_stdc = yes; then
3765 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003767 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003768else
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 cat >conftest.$ac_ext <<_ACEOF
3770#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003771#include "confdefs.h"
3772#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003773#if ((' ' & 0x0FF) == 0x020)
3774# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3775# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3776#else
3777# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3778 || ('j' <= (c) && (c) <= 'r') \
3779 || ('s' <= (c) && (c) <= 'z'))
3780# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3781#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003782
Martin v. Löwis11437992002-04-12 09:54:03 +00003783#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3784int
3785main ()
3786{
3787 int i;
3788 for (i = 0; i < 256; i++)
3789 if (XOR (islower (i), ISLOWER (i))
3790 || toupper (i) != TOUPPER (i))
3791 exit(2);
3792 exit (0);
3793}
3794_ACEOF
3795rm -f conftest$ac_exeext
3796if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3797 (eval $ac_link) 2>&5
3798 ac_status=$?
3799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3802 (eval $ac_try) 2>&5
3803 ac_status=$?
3804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3805 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003806 :
3807else
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 echo "$as_me: program exited with status $ac_status" >&5
3809echo "$as_me: failed program was:" >&5
3810cat conftest.$ac_ext >&5
3811( exit $ac_status )
3812ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003813fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003814rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003815fi
3816fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003817fi
3818echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3819echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003820if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003821
3822cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003823#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003824_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003825
3826fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828
3829
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
Martin v. Löwis11437992002-04-12 09:54:03 +00003865for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003866libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003867signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003868sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003869sys/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 +00003870sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003871sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003872do
Martin v. Löwis11437992002-04-12 09:54:03 +00003873as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3874if eval "test \"\${$as_ac_Header+set}\" = set"; then
3875 echo "$as_me:$LINENO: checking for $ac_header" >&5
3876echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3877if eval "test \"\${$as_ac_Header+set}\" = set"; then
3878 echo $ECHO_N "(cached) $ECHO_C" >&6
3879fi
3880echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3881echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003882else
Martin v. Löwis11437992002-04-12 09:54:03 +00003883 # Is the header compilable?
3884echo "$as_me:$LINENO: checking $ac_header usability" >&5
3885echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3886cat >conftest.$ac_ext <<_ACEOF
3887#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003888#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003889$ac_includes_default
3890#include <$ac_header>
3891_ACEOF
3892rm -f conftest.$ac_objext
3893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3894 (eval $ac_compile) 2>&5
3895 ac_status=$?
3896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3897 (exit $ac_status); } &&
3898 { ac_try='test -s conftest.$ac_objext'
3899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3900 (eval $ac_try) 2>&5
3901 ac_status=$?
3902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3903 (exit $ac_status); }; }; then
3904 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003905else
Martin v. Löwis11437992002-04-12 09:54:03 +00003906 echo "$as_me: failed program was:" >&5
3907cat conftest.$ac_ext >&5
3908ac_header_compiler=no
3909fi
3910rm -f conftest.$ac_objext conftest.$ac_ext
3911echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3912echo "${ECHO_T}$ac_header_compiler" >&6
3913
3914# Is the header present?
3915echo "$as_me:$LINENO: checking $ac_header presence" >&5
3916echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3917cat >conftest.$ac_ext <<_ACEOF
3918#line $LINENO "configure"
3919#include "confdefs.h"
3920#include <$ac_header>
3921_ACEOF
3922if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3923 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3924 ac_status=$?
3925 egrep -v '^ *\+' conftest.er1 >conftest.err
3926 rm -f conftest.er1
3927 cat conftest.err >&5
3928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3929 (exit $ac_status); } >/dev/null; then
3930 if test -s conftest.err; then
3931 ac_cpp_err=$ac_c_preproc_warn_flag
3932 else
3933 ac_cpp_err=
3934 fi
3935else
3936 ac_cpp_err=yes
3937fi
3938if test -z "$ac_cpp_err"; then
3939 ac_header_preproc=yes
3940else
3941 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003942 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003943 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003944fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003945rm -f conftest.err conftest.$ac_ext
3946echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3947echo "${ECHO_T}$ac_header_preproc" >&6
3948
3949# So? What about this header?
3950case $ac_header_compiler:$ac_header_preproc in
3951 yes:no )
3952 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3953echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3954 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3955echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3956 no:yes )
3957 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3958echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3959 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3960echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3961 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3962echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3963esac
3964echo "$as_me:$LINENO: checking for $ac_header" >&5
3965echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3966if eval "test \"\${$as_ac_Header+set}\" = set"; then
3967 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003968else
Martin v. Löwis11437992002-04-12 09:54:03 +00003969 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003970fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003971echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3972echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3973
3974fi
3975if test `eval echo '${'$as_ac_Header'}'` = yes; then
3976 cat >>confdefs.h <<_ACEOF
3977#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3978_ACEOF
3979
3980fi
3981
Guido van Rossum627b2d71993-12-24 10:39:16 +00003982done
3983
Martin v. Löwis11437992002-04-12 09:54:03 +00003984
3985
3986
3987
3988
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003989ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003990for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3991 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3992echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3993echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3994if eval "test \"\${$as_ac_Header+set}\" = set"; then
3995 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003996else
Martin v. Löwis11437992002-04-12 09:54:03 +00003997 cat >conftest.$ac_ext <<_ACEOF
3998#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003999#include "confdefs.h"
4000#include <sys/types.h>
4001#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004002
4003#ifdef F77_DUMMY_MAIN
4004# ifdef __cplusplus
4005 extern "C"
4006# endif
4007 int F77_DUMMY_MAIN() { return 1; }
4008#endif
4009int
4010main ()
4011{
4012if ((DIR *) 0)
4013return 0;
4014 ;
4015 return 0;
4016}
4017_ACEOF
4018rm -f conftest.$ac_objext
4019if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4020 (eval $ac_compile) 2>&5
4021 ac_status=$?
4022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4023 (exit $ac_status); } &&
4024 { ac_try='test -s conftest.$ac_objext'
4025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4026 (eval $ac_try) 2>&5
4027 ac_status=$?
4028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4029 (exit $ac_status); }; }; then
4030 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004031else
Martin v. Löwis11437992002-04-12 09:54:03 +00004032 echo "$as_me: failed program was:" >&5
4033cat conftest.$ac_ext >&5
4034eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004035fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004036rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004037fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004038echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4039echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4040if test `eval echo '${'$as_ac_Header'}'` = yes; then
4041 cat >>confdefs.h <<_ACEOF
4042#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4043_ACEOF
4044
4045ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004046fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004047
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004048done
4049# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4050if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004051 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4052echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4053if test "${ac_cv_search_opendir+set}" = set; then
4054 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004055else
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 ac_func_search_save_LIBS=$LIBS
4057ac_cv_search_opendir=no
4058cat >conftest.$ac_ext <<_ACEOF
4059#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004060#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004061
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004062/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004063#ifdef __cplusplus
4064extern "C"
4065#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004066/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004067 builtin and then its argument prototype would still apply. */
4068char opendir ();
4069#ifdef F77_DUMMY_MAIN
4070# ifdef __cplusplus
4071 extern "C"
4072# endif
4073 int F77_DUMMY_MAIN() { return 1; }
4074#endif
4075int
4076main ()
4077{
4078opendir ();
4079 ;
4080 return 0;
4081}
4082_ACEOF
4083rm -f conftest.$ac_objext conftest$ac_exeext
4084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4085 (eval $ac_link) 2>&5
4086 ac_status=$?
4087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4088 (exit $ac_status); } &&
4089 { ac_try='test -s conftest$ac_exeext'
4090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4091 (eval $ac_try) 2>&5
4092 ac_status=$?
4093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4094 (exit $ac_status); }; }; then
4095 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004096else
Martin v. Löwis11437992002-04-12 09:54:03 +00004097 echo "$as_me: failed program was:" >&5
4098cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004100rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4101if test "$ac_cv_search_opendir" = no; then
4102 for ac_lib in dir; do
4103 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4104 cat >conftest.$ac_ext <<_ACEOF
4105#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004106#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004107
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004108/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004109#ifdef __cplusplus
4110extern "C"
4111#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004112/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004113 builtin and then its argument prototype would still apply. */
4114char opendir ();
4115#ifdef F77_DUMMY_MAIN
4116# ifdef __cplusplus
4117 extern "C"
4118# endif
4119 int F77_DUMMY_MAIN() { return 1; }
4120#endif
4121int
4122main ()
4123{
4124opendir ();
4125 ;
4126 return 0;
4127}
4128_ACEOF
4129rm -f conftest.$ac_objext conftest$ac_exeext
4130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4131 (eval $ac_link) 2>&5
4132 ac_status=$?
4133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4134 (exit $ac_status); } &&
4135 { ac_try='test -s conftest$ac_exeext'
4136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4137 (eval $ac_try) 2>&5
4138 ac_status=$?
4139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4140 (exit $ac_status); }; }; then
4141 ac_cv_search_opendir="-l$ac_lib"
4142break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004143else
Martin v. Löwis11437992002-04-12 09:54:03 +00004144 echo "$as_me: failed program was:" >&5
4145cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004146fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004147rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4148 done
4149fi
4150LIBS=$ac_func_search_save_LIBS
4151fi
4152echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4153echo "${ECHO_T}$ac_cv_search_opendir" >&6
4154if test "$ac_cv_search_opendir" != no; then
4155 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004156
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004157fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004158
Michael W. Hudson54241132001-12-07 15:38:26 +00004159else
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4161echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4162if test "${ac_cv_search_opendir+set}" = set; then
4163 echo $ECHO_N "(cached) $ECHO_C" >&6
4164else
4165 ac_func_search_save_LIBS=$LIBS
4166ac_cv_search_opendir=no
4167cat >conftest.$ac_ext <<_ACEOF
4168#line $LINENO "configure"
4169#include "confdefs.h"
4170
4171/* Override any gcc2 internal prototype to avoid an error. */
4172#ifdef __cplusplus
4173extern "C"
4174#endif
4175/* We use char because int might match the return type of a gcc2
4176 builtin and then its argument prototype would still apply. */
4177char opendir ();
4178#ifdef F77_DUMMY_MAIN
4179# ifdef __cplusplus
4180 extern "C"
4181# endif
4182 int F77_DUMMY_MAIN() { return 1; }
4183#endif
4184int
4185main ()
4186{
4187opendir ();
4188 ;
4189 return 0;
4190}
4191_ACEOF
4192rm -f conftest.$ac_objext conftest$ac_exeext
4193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4194 (eval $ac_link) 2>&5
4195 ac_status=$?
4196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4197 (exit $ac_status); } &&
4198 { ac_try='test -s conftest$ac_exeext'
4199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4200 (eval $ac_try) 2>&5
4201 ac_status=$?
4202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4203 (exit $ac_status); }; }; then
4204 ac_cv_search_opendir="none required"
4205else
4206 echo "$as_me: failed program was:" >&5
4207cat conftest.$ac_ext >&5
4208fi
4209rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4210if test "$ac_cv_search_opendir" = no; then
4211 for ac_lib in x; do
4212 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4213 cat >conftest.$ac_ext <<_ACEOF
4214#line $LINENO "configure"
4215#include "confdefs.h"
4216
4217/* Override any gcc2 internal prototype to avoid an error. */
4218#ifdef __cplusplus
4219extern "C"
4220#endif
4221/* We use char because int might match the return type of a gcc2
4222 builtin and then its argument prototype would still apply. */
4223char opendir ();
4224#ifdef F77_DUMMY_MAIN
4225# ifdef __cplusplus
4226 extern "C"
4227# endif
4228 int F77_DUMMY_MAIN() { return 1; }
4229#endif
4230int
4231main ()
4232{
4233opendir ();
4234 ;
4235 return 0;
4236}
4237_ACEOF
4238rm -f conftest.$ac_objext conftest$ac_exeext
4239if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4240 (eval $ac_link) 2>&5
4241 ac_status=$?
4242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4243 (exit $ac_status); } &&
4244 { ac_try='test -s conftest$ac_exeext'
4245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4246 (eval $ac_try) 2>&5
4247 ac_status=$?
4248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4249 (exit $ac_status); }; }; then
4250 ac_cv_search_opendir="-l$ac_lib"
4251break
4252else
4253 echo "$as_me: failed program was:" >&5
4254cat conftest.$ac_ext >&5
4255fi
4256rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4257 done
4258fi
4259LIBS=$ac_func_search_save_LIBS
4260fi
4261echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4262echo "${ECHO_T}$ac_cv_search_opendir" >&6
4263if test "$ac_cv_search_opendir" != no; then
4264 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4265
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004266fi
4267
4268fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004269
Michael W. Hudson54241132001-12-07 15:38:26 +00004270
Guido van Rossum627b2d71993-12-24 10:39:16 +00004271# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004272was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004273echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4274echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4275cat >conftest.$ac_ext <<_ACEOF
4276#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277#include "confdefs.h"
4278#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004279
4280_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4282 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004283 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004284else
Martin v. Löwis11437992002-04-12 09:54:03 +00004285
4286
4287cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004289_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004290
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004291
Guido van Rossum627b2d71993-12-24 10:39:16 +00004292fi
4293rm -f conftest*
4294
Martin v. Löwis11437992002-04-12 09:54:03 +00004295echo "$as_me:$LINENO: result: $was_it_defined" >&5
4296echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004297
Guido van Rossum810cc512001-09-09 23:51:39 +00004298# Two defines needed to enable largefile support on various platforms
4299# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004300
Martin v. Löwis11437992002-04-12 09:54:03 +00004301cat >>confdefs.h <<\_ACEOF
4302#define _LARGEFILE_SOURCE 1
4303_ACEOF
4304
4305
4306cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004307#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004308_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004309
Michael W. Hudson54241132001-12-07 15:38:26 +00004310
Guido van Rossum84e7b241996-08-19 21:59:00 +00004311# Add some code to confdefs.h so that the test for off_t works on SCO
4312cat >> confdefs.h <<\EOF
4313#if defined(SCO_DS)
4314#undef _OFF_T
4315#endif
4316EOF
4317
Guido van Rossumef2255b2000-03-10 22:30:29 +00004318# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004319echo "$as_me:$LINENO: checking for mode_t" >&5
4320echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4321if test "${ac_cv_type_mode_t+set}" = set; then
4322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004323else
Martin v. Löwis11437992002-04-12 09:54:03 +00004324 cat >conftest.$ac_ext <<_ACEOF
4325#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004326#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004327$ac_includes_default
4328#ifdef F77_DUMMY_MAIN
4329# ifdef __cplusplus
4330 extern "C"
4331# endif
4332 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004334int
4335main ()
4336{
4337if ((mode_t *) 0)
4338 return 0;
4339if (sizeof (mode_t))
4340 return 0;
4341 ;
4342 return 0;
4343}
4344_ACEOF
4345rm -f conftest.$ac_objext
4346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4347 (eval $ac_compile) 2>&5
4348 ac_status=$?
4349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4350 (exit $ac_status); } &&
4351 { ac_try='test -s conftest.$ac_objext'
4352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4353 (eval $ac_try) 2>&5
4354 ac_status=$?
4355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4356 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004357 ac_cv_type_mode_t=yes
4358else
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 echo "$as_me: failed program was:" >&5
4360cat conftest.$ac_ext >&5
4361ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004363rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004365echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4366echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4367if test $ac_cv_type_mode_t = yes; then
4368 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004369else
Martin v. Löwis11437992002-04-12 09:54:03 +00004370
4371cat >>confdefs.h <<_ACEOF
4372#define mode_t int
4373_ACEOF
4374
4375fi
4376
4377echo "$as_me:$LINENO: checking for off_t" >&5
4378echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4379if test "${ac_cv_type_off_t+set}" = set; then
4380 echo $ECHO_N "(cached) $ECHO_C" >&6
4381else
4382 cat >conftest.$ac_ext <<_ACEOF
4383#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004384#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004385$ac_includes_default
4386#ifdef F77_DUMMY_MAIN
4387# ifdef __cplusplus
4388 extern "C"
4389# endif
4390 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004392int
4393main ()
4394{
4395if ((off_t *) 0)
4396 return 0;
4397if (sizeof (off_t))
4398 return 0;
4399 ;
4400 return 0;
4401}
4402_ACEOF
4403rm -f conftest.$ac_objext
4404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4405 (eval $ac_compile) 2>&5
4406 ac_status=$?
4407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4408 (exit $ac_status); } &&
4409 { ac_try='test -s conftest.$ac_objext'
4410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4411 (eval $ac_try) 2>&5
4412 ac_status=$?
4413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4414 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004415 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004416else
Martin v. Löwis11437992002-04-12 09:54:03 +00004417 echo "$as_me: failed program was:" >&5
4418cat conftest.$ac_ext >&5
4419ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004421rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004422fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004423echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4424echo "${ECHO_T}$ac_cv_type_off_t" >&6
4425if test $ac_cv_type_off_t = yes; then
4426 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004427else
Martin v. Löwis11437992002-04-12 09:54:03 +00004428
4429cat >>confdefs.h <<_ACEOF
4430#define off_t long
4431_ACEOF
4432
4433fi
4434
4435echo "$as_me:$LINENO: checking for pid_t" >&5
4436echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4437if test "${ac_cv_type_pid_t+set}" = set; then
4438 echo $ECHO_N "(cached) $ECHO_C" >&6
4439else
4440 cat >conftest.$ac_ext <<_ACEOF
4441#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004442#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004443$ac_includes_default
4444#ifdef F77_DUMMY_MAIN
4445# ifdef __cplusplus
4446 extern "C"
4447# endif
4448 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004450int
4451main ()
4452{
4453if ((pid_t *) 0)
4454 return 0;
4455if (sizeof (pid_t))
4456 return 0;
4457 ;
4458 return 0;
4459}
4460_ACEOF
4461rm -f conftest.$ac_objext
4462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4463 (eval $ac_compile) 2>&5
4464 ac_status=$?
4465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4466 (exit $ac_status); } &&
4467 { ac_try='test -s conftest.$ac_objext'
4468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4469 (eval $ac_try) 2>&5
4470 ac_status=$?
4471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4472 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004473 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004474else
Martin v. Löwis11437992002-04-12 09:54:03 +00004475 echo "$as_me: failed program was:" >&5
4476cat conftest.$ac_ext >&5
4477ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004479rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004480fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004481echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4482echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4483if test $ac_cv_type_pid_t = yes; then
4484 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004485else
Martin v. Löwis11437992002-04-12 09:54:03 +00004486
4487cat >>confdefs.h <<_ACEOF
4488#define pid_t int
4489_ACEOF
4490
4491fi
4492
4493echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4494echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4495if test "${ac_cv_type_signal+set}" = set; then
4496 echo $ECHO_N "(cached) $ECHO_C" >&6
4497else
4498 cat >conftest.$ac_ext <<_ACEOF
4499#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004500#include "confdefs.h"
4501#include <sys/types.h>
4502#include <signal.h>
4503#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004504# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004505#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004506#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004507extern "C" void (*signal (int, void (*)(int)))(int);
4508#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004509void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004510#endif
4511
Martin v. Löwis11437992002-04-12 09:54:03 +00004512#ifdef F77_DUMMY_MAIN
4513# ifdef __cplusplus
4514 extern "C"
4515# endif
4516 int F77_DUMMY_MAIN() { return 1; }
4517#endif
4518int
4519main ()
4520{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004521int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004522 ;
4523 return 0;
4524}
4525_ACEOF
4526rm -f conftest.$ac_objext
4527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4528 (eval $ac_compile) 2>&5
4529 ac_status=$?
4530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4531 (exit $ac_status); } &&
4532 { ac_try='test -s conftest.$ac_objext'
4533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4534 (eval $ac_try) 2>&5
4535 ac_status=$?
4536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4537 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004538 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004539else
Martin v. Löwis11437992002-04-12 09:54:03 +00004540 echo "$as_me: failed program was:" >&5
4541cat conftest.$ac_ext >&5
4542ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004544rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004546echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4547echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004548
Martin v. Löwis11437992002-04-12 09:54:03 +00004549cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004550#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004551_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004552
Michael W. Hudson54241132001-12-07 15:38:26 +00004553
Martin v. Löwis11437992002-04-12 09:54:03 +00004554echo "$as_me:$LINENO: checking for size_t" >&5
4555echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4556if test "${ac_cv_type_size_t+set}" = set; then
4557 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004558else
Martin v. Löwis11437992002-04-12 09:54:03 +00004559 cat >conftest.$ac_ext <<_ACEOF
4560#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004561#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004562$ac_includes_default
4563#ifdef F77_DUMMY_MAIN
4564# ifdef __cplusplus
4565 extern "C"
4566# endif
4567 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004568#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004569int
4570main ()
4571{
4572if ((size_t *) 0)
4573 return 0;
4574if (sizeof (size_t))
4575 return 0;
4576 ;
4577 return 0;
4578}
4579_ACEOF
4580rm -f conftest.$ac_objext
4581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4582 (eval $ac_compile) 2>&5
4583 ac_status=$?
4584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4585 (exit $ac_status); } &&
4586 { ac_try='test -s conftest.$ac_objext'
4587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4588 (eval $ac_try) 2>&5
4589 ac_status=$?
4590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4591 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004592 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004593else
Martin v. Löwis11437992002-04-12 09:54:03 +00004594 echo "$as_me: failed program was:" >&5
4595cat conftest.$ac_ext >&5
4596ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004597fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004598rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004599fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004600echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4601echo "${ECHO_T}$ac_cv_type_size_t" >&6
4602if test $ac_cv_type_size_t = yes; then
4603 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604else
Martin v. Löwis11437992002-04-12 09:54:03 +00004605
4606cat >>confdefs.h <<_ACEOF
4607#define size_t unsigned
4608_ACEOF
4609
4610fi
4611
4612echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4613echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4614if test "${ac_cv_type_uid_t+set}" = set; then
4615 echo $ECHO_N "(cached) $ECHO_C" >&6
4616else
4617 cat >conftest.$ac_ext <<_ACEOF
4618#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004619#include "confdefs.h"
4620#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004621
4622_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4624 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004625 ac_cv_type_uid_t=yes
4626else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004627 ac_cv_type_uid_t=no
4628fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004629rm -f conftest*
4630
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004631fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004632echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4633echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004634if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004635
Martin v. Löwis11437992002-04-12 09:54:03 +00004636cat >>confdefs.h <<\_ACEOF
4637#define uid_t int
4638_ACEOF
4639
4640
4641cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004642#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004643_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004644
4645fi
4646
Jack Jansendd19cf82001-12-06 22:36:17 +00004647
Michael W. Hudson54241132001-12-07 15:38:26 +00004648# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004649echo "$as_me:$LINENO: checking for int" >&5
4650echo $ECHO_N "checking for int... $ECHO_C" >&6
4651if test "${ac_cv_type_int+set}" = set; then
4652 echo $ECHO_N "(cached) $ECHO_C" >&6
4653else
4654 cat >conftest.$ac_ext <<_ACEOF
4655#line $LINENO "configure"
4656#include "confdefs.h"
4657$ac_includes_default
4658#ifdef F77_DUMMY_MAIN
4659# ifdef __cplusplus
4660 extern "C"
4661# endif
4662 int F77_DUMMY_MAIN() { return 1; }
4663#endif
4664int
4665main ()
4666{
4667if ((int *) 0)
4668 return 0;
4669if (sizeof (int))
4670 return 0;
4671 ;
4672 return 0;
4673}
4674_ACEOF
4675rm -f conftest.$ac_objext
4676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4677 (eval $ac_compile) 2>&5
4678 ac_status=$?
4679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4680 (exit $ac_status); } &&
4681 { ac_try='test -s conftest.$ac_objext'
4682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4683 (eval $ac_try) 2>&5
4684 ac_status=$?
4685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4686 (exit $ac_status); }; }; then
4687 ac_cv_type_int=yes
4688else
4689 echo "$as_me: failed program was:" >&5
4690cat conftest.$ac_ext >&5
4691ac_cv_type_int=no
4692fi
4693rm -f conftest.$ac_objext conftest.$ac_ext
4694fi
4695echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4696echo "${ECHO_T}$ac_cv_type_int" >&6
4697
4698echo "$as_me:$LINENO: checking size of int" >&5
4699echo $ECHO_N "checking size of int... $ECHO_C" >&6
4700if test "${ac_cv_sizeof_int+set}" = set; then
4701 echo $ECHO_N "(cached) $ECHO_C" >&6
4702else
4703 if test "$ac_cv_type_int" = yes; then
4704 # The cast to unsigned long works around a bug in the HP C Compiler
4705 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4706 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4707 # This bug is HP SR number 8606223364.
4708 if test "$cross_compiling" = yes; then
4709 # Depending upon the size, compute the lo and hi bounds.
4710cat >conftest.$ac_ext <<_ACEOF
4711#line $LINENO "configure"
4712#include "confdefs.h"
4713$ac_includes_default
4714#ifdef F77_DUMMY_MAIN
4715# ifdef __cplusplus
4716 extern "C"
4717# endif
4718 int F77_DUMMY_MAIN() { return 1; }
4719#endif
4720int
4721main ()
4722{
4723static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4724test_array [0] = 0
4725
4726 ;
4727 return 0;
4728}
4729_ACEOF
4730rm -f conftest.$ac_objext
4731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4732 (eval $ac_compile) 2>&5
4733 ac_status=$?
4734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4735 (exit $ac_status); } &&
4736 { ac_try='test -s conftest.$ac_objext'
4737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4738 (eval $ac_try) 2>&5
4739 ac_status=$?
4740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4741 (exit $ac_status); }; }; then
4742 ac_lo=0 ac_mid=0
4743 while :; do
4744 cat >conftest.$ac_ext <<_ACEOF
4745#line $LINENO "configure"
4746#include "confdefs.h"
4747$ac_includes_default
4748#ifdef F77_DUMMY_MAIN
4749# ifdef __cplusplus
4750 extern "C"
4751# endif
4752 int F77_DUMMY_MAIN() { return 1; }
4753#endif
4754int
4755main ()
4756{
4757static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4758test_array [0] = 0
4759
4760 ;
4761 return 0;
4762}
4763_ACEOF
4764rm -f conftest.$ac_objext
4765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4766 (eval $ac_compile) 2>&5
4767 ac_status=$?
4768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4769 (exit $ac_status); } &&
4770 { ac_try='test -s conftest.$ac_objext'
4771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4772 (eval $ac_try) 2>&5
4773 ac_status=$?
4774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4775 (exit $ac_status); }; }; then
4776 ac_hi=$ac_mid; break
4777else
4778 echo "$as_me: failed program was:" >&5
4779cat conftest.$ac_ext >&5
4780ac_lo=`expr $ac_mid + 1`
4781 if test $ac_lo -le $ac_mid; then
4782 ac_lo= ac_hi=
4783 break
4784 fi
4785 ac_mid=`expr 2 '*' $ac_mid + 1`
4786fi
4787rm -f conftest.$ac_objext conftest.$ac_ext
4788 done
4789else
4790 echo "$as_me: failed program was:" >&5
4791cat conftest.$ac_ext >&5
4792cat >conftest.$ac_ext <<_ACEOF
4793#line $LINENO "configure"
4794#include "confdefs.h"
4795$ac_includes_default
4796#ifdef F77_DUMMY_MAIN
4797# ifdef __cplusplus
4798 extern "C"
4799# endif
4800 int F77_DUMMY_MAIN() { return 1; }
4801#endif
4802int
4803main ()
4804{
4805static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4806test_array [0] = 0
4807
4808 ;
4809 return 0;
4810}
4811_ACEOF
4812rm -f conftest.$ac_objext
4813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4814 (eval $ac_compile) 2>&5
4815 ac_status=$?
4816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4817 (exit $ac_status); } &&
4818 { ac_try='test -s conftest.$ac_objext'
4819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4820 (eval $ac_try) 2>&5
4821 ac_status=$?
4822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823 (exit $ac_status); }; }; then
4824 ac_hi=-1 ac_mid=-1
4825 while :; do
4826 cat >conftest.$ac_ext <<_ACEOF
4827#line $LINENO "configure"
4828#include "confdefs.h"
4829$ac_includes_default
4830#ifdef F77_DUMMY_MAIN
4831# ifdef __cplusplus
4832 extern "C"
4833# endif
4834 int F77_DUMMY_MAIN() { return 1; }
4835#endif
4836int
4837main ()
4838{
4839static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4840test_array [0] = 0
4841
4842 ;
4843 return 0;
4844}
4845_ACEOF
4846rm -f conftest.$ac_objext
4847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4848 (eval $ac_compile) 2>&5
4849 ac_status=$?
4850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4851 (exit $ac_status); } &&
4852 { ac_try='test -s conftest.$ac_objext'
4853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4854 (eval $ac_try) 2>&5
4855 ac_status=$?
4856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4857 (exit $ac_status); }; }; then
4858 ac_lo=$ac_mid; break
4859else
4860 echo "$as_me: failed program was:" >&5
4861cat conftest.$ac_ext >&5
4862ac_hi=`expr '(' $ac_mid ')' - 1`
4863 if test $ac_mid -le $ac_hi; then
4864 ac_lo= ac_hi=
4865 break
4866 fi
4867 ac_mid=`expr 2 '*' $ac_mid`
4868fi
4869rm -f conftest.$ac_objext conftest.$ac_ext
4870 done
4871else
4872 echo "$as_me: failed program was:" >&5
4873cat conftest.$ac_ext >&5
4874ac_lo= ac_hi=
4875fi
4876rm -f conftest.$ac_objext conftest.$ac_ext
4877fi
4878rm -f conftest.$ac_objext conftest.$ac_ext
4879# Binary search between lo and hi bounds.
4880while test "x$ac_lo" != "x$ac_hi"; do
4881 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4882 cat >conftest.$ac_ext <<_ACEOF
4883#line $LINENO "configure"
4884#include "confdefs.h"
4885$ac_includes_default
4886#ifdef F77_DUMMY_MAIN
4887# ifdef __cplusplus
4888 extern "C"
4889# endif
4890 int F77_DUMMY_MAIN() { return 1; }
4891#endif
4892int
4893main ()
4894{
4895static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4896test_array [0] = 0
4897
4898 ;
4899 return 0;
4900}
4901_ACEOF
4902rm -f conftest.$ac_objext
4903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4904 (eval $ac_compile) 2>&5
4905 ac_status=$?
4906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4907 (exit $ac_status); } &&
4908 { ac_try='test -s conftest.$ac_objext'
4909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4910 (eval $ac_try) 2>&5
4911 ac_status=$?
4912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4913 (exit $ac_status); }; }; then
4914 ac_hi=$ac_mid
4915else
4916 echo "$as_me: failed program was:" >&5
4917cat conftest.$ac_ext >&5
4918ac_lo=`expr '(' $ac_mid ')' + 1`
4919fi
4920rm -f conftest.$ac_objext conftest.$ac_ext
4921done
4922case $ac_lo in
4923?*) ac_cv_sizeof_int=$ac_lo;;
4924'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4925echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4926 { (exit 1); exit 1; }; } ;;
4927esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004928else
4929 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004930 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4931echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4932 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004933else
Martin v. Löwis11437992002-04-12 09:54:03 +00004934 cat >conftest.$ac_ext <<_ACEOF
4935#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004936#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004937$ac_includes_default
4938long longval () { return (long) (sizeof (int)); }
4939unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004940#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004941#include <stdlib.h>
4942#ifdef F77_DUMMY_MAIN
4943# ifdef __cplusplus
4944 extern "C"
4945# endif
4946 int F77_DUMMY_MAIN() { return 1; }
4947#endif
4948int
4949main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004950{
Martin v. Löwis11437992002-04-12 09:54:03 +00004951
4952 FILE *f = fopen ("conftest.val", "w");
4953 if (! f)
4954 exit (1);
4955 if (((long) (sizeof (int))) < 0)
4956 {
4957 long i = longval ();
4958 if (i != ((long) (sizeof (int))))
4959 exit (1);
4960 fprintf (f, "%ld\n", i);
4961 }
4962 else
4963 {
4964 unsigned long i = ulongval ();
4965 if (i != ((long) (sizeof (int))))
4966 exit (1);
4967 fprintf (f, "%lu\n", i);
4968 }
4969 exit (ferror (f) || fclose (f) != 0);
4970
4971 ;
4972 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004973}
Martin v. Löwis11437992002-04-12 09:54:03 +00004974_ACEOF
4975rm -f conftest$ac_exeext
4976if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4977 (eval $ac_link) 2>&5
4978 ac_status=$?
4979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4980 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4982 (eval $ac_try) 2>&5
4983 ac_status=$?
4984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985 (exit $ac_status); }; }; then
4986 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004987else
Martin v. Löwis11437992002-04-12 09:54:03 +00004988 echo "$as_me: program exited with status $ac_status" >&5
4989echo "$as_me: failed program was:" >&5
4990cat conftest.$ac_ext >&5
4991( exit $ac_status )
4992{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4993echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4994 { (exit 1); exit 1; }; }
4995fi
4996rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4997fi
4998fi
4999rm -f conftest.val
5000else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005001 ac_cv_sizeof_int=0
5002fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005003fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005004echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5005echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5006cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005007#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005008_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005009
5010
Martin v. Löwis11437992002-04-12 09:54:03 +00005011echo "$as_me:$LINENO: checking for long" >&5
5012echo $ECHO_N "checking for long... $ECHO_C" >&6
5013if test "${ac_cv_type_long+set}" = set; then
5014 echo $ECHO_N "(cached) $ECHO_C" >&6
5015else
5016 cat >conftest.$ac_ext <<_ACEOF
5017#line $LINENO "configure"
5018#include "confdefs.h"
5019$ac_includes_default
5020#ifdef F77_DUMMY_MAIN
5021# ifdef __cplusplus
5022 extern "C"
5023# endif
5024 int F77_DUMMY_MAIN() { return 1; }
5025#endif
5026int
5027main ()
5028{
5029if ((long *) 0)
5030 return 0;
5031if (sizeof (long))
5032 return 0;
5033 ;
5034 return 0;
5035}
5036_ACEOF
5037rm -f conftest.$ac_objext
5038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5039 (eval $ac_compile) 2>&5
5040 ac_status=$?
5041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5042 (exit $ac_status); } &&
5043 { ac_try='test -s conftest.$ac_objext'
5044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5045 (eval $ac_try) 2>&5
5046 ac_status=$?
5047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5048 (exit $ac_status); }; }; then
5049 ac_cv_type_long=yes
5050else
5051 echo "$as_me: failed program was:" >&5
5052cat conftest.$ac_ext >&5
5053ac_cv_type_long=no
5054fi
5055rm -f conftest.$ac_objext conftest.$ac_ext
5056fi
5057echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5058echo "${ECHO_T}$ac_cv_type_long" >&6
5059
5060echo "$as_me:$LINENO: checking size of long" >&5
5061echo $ECHO_N "checking size of long... $ECHO_C" >&6
5062if test "${ac_cv_sizeof_long+set}" = set; then
5063 echo $ECHO_N "(cached) $ECHO_C" >&6
5064else
5065 if test "$ac_cv_type_long" = yes; then
5066 # The cast to unsigned long works around a bug in the HP C Compiler
5067 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5068 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5069 # This bug is HP SR number 8606223364.
5070 if test "$cross_compiling" = yes; then
5071 # Depending upon the size, compute the lo and hi bounds.
5072cat >conftest.$ac_ext <<_ACEOF
5073#line $LINENO "configure"
5074#include "confdefs.h"
5075$ac_includes_default
5076#ifdef F77_DUMMY_MAIN
5077# ifdef __cplusplus
5078 extern "C"
5079# endif
5080 int F77_DUMMY_MAIN() { return 1; }
5081#endif
5082int
5083main ()
5084{
5085static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5086test_array [0] = 0
5087
5088 ;
5089 return 0;
5090}
5091_ACEOF
5092rm -f conftest.$ac_objext
5093if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5094 (eval $ac_compile) 2>&5
5095 ac_status=$?
5096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5097 (exit $ac_status); } &&
5098 { ac_try='test -s conftest.$ac_objext'
5099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5100 (eval $ac_try) 2>&5
5101 ac_status=$?
5102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5103 (exit $ac_status); }; }; then
5104 ac_lo=0 ac_mid=0
5105 while :; do
5106 cat >conftest.$ac_ext <<_ACEOF
5107#line $LINENO "configure"
5108#include "confdefs.h"
5109$ac_includes_default
5110#ifdef F77_DUMMY_MAIN
5111# ifdef __cplusplus
5112 extern "C"
5113# endif
5114 int F77_DUMMY_MAIN() { return 1; }
5115#endif
5116int
5117main ()
5118{
5119static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5120test_array [0] = 0
5121
5122 ;
5123 return 0;
5124}
5125_ACEOF
5126rm -f conftest.$ac_objext
5127if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5128 (eval $ac_compile) 2>&5
5129 ac_status=$?
5130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5131 (exit $ac_status); } &&
5132 { ac_try='test -s conftest.$ac_objext'
5133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5134 (eval $ac_try) 2>&5
5135 ac_status=$?
5136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5137 (exit $ac_status); }; }; then
5138 ac_hi=$ac_mid; break
5139else
5140 echo "$as_me: failed program was:" >&5
5141cat conftest.$ac_ext >&5
5142ac_lo=`expr $ac_mid + 1`
5143 if test $ac_lo -le $ac_mid; then
5144 ac_lo= ac_hi=
5145 break
5146 fi
5147 ac_mid=`expr 2 '*' $ac_mid + 1`
5148fi
5149rm -f conftest.$ac_objext conftest.$ac_ext
5150 done
5151else
5152 echo "$as_me: failed program was:" >&5
5153cat conftest.$ac_ext >&5
5154cat >conftest.$ac_ext <<_ACEOF
5155#line $LINENO "configure"
5156#include "confdefs.h"
5157$ac_includes_default
5158#ifdef F77_DUMMY_MAIN
5159# ifdef __cplusplus
5160 extern "C"
5161# endif
5162 int F77_DUMMY_MAIN() { return 1; }
5163#endif
5164int
5165main ()
5166{
5167static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5168test_array [0] = 0
5169
5170 ;
5171 return 0;
5172}
5173_ACEOF
5174rm -f conftest.$ac_objext
5175if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5176 (eval $ac_compile) 2>&5
5177 ac_status=$?
5178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5179 (exit $ac_status); } &&
5180 { ac_try='test -s conftest.$ac_objext'
5181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5182 (eval $ac_try) 2>&5
5183 ac_status=$?
5184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5185 (exit $ac_status); }; }; then
5186 ac_hi=-1 ac_mid=-1
5187 while :; do
5188 cat >conftest.$ac_ext <<_ACEOF
5189#line $LINENO "configure"
5190#include "confdefs.h"
5191$ac_includes_default
5192#ifdef F77_DUMMY_MAIN
5193# ifdef __cplusplus
5194 extern "C"
5195# endif
5196 int F77_DUMMY_MAIN() { return 1; }
5197#endif
5198int
5199main ()
5200{
5201static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5202test_array [0] = 0
5203
5204 ;
5205 return 0;
5206}
5207_ACEOF
5208rm -f conftest.$ac_objext
5209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5210 (eval $ac_compile) 2>&5
5211 ac_status=$?
5212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5213 (exit $ac_status); } &&
5214 { ac_try='test -s conftest.$ac_objext'
5215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5216 (eval $ac_try) 2>&5
5217 ac_status=$?
5218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5219 (exit $ac_status); }; }; then
5220 ac_lo=$ac_mid; break
5221else
5222 echo "$as_me: failed program was:" >&5
5223cat conftest.$ac_ext >&5
5224ac_hi=`expr '(' $ac_mid ')' - 1`
5225 if test $ac_mid -le $ac_hi; then
5226 ac_lo= ac_hi=
5227 break
5228 fi
5229 ac_mid=`expr 2 '*' $ac_mid`
5230fi
5231rm -f conftest.$ac_objext conftest.$ac_ext
5232 done
5233else
5234 echo "$as_me: failed program was:" >&5
5235cat conftest.$ac_ext >&5
5236ac_lo= ac_hi=
5237fi
5238rm -f conftest.$ac_objext conftest.$ac_ext
5239fi
5240rm -f conftest.$ac_objext conftest.$ac_ext
5241# Binary search between lo and hi bounds.
5242while test "x$ac_lo" != "x$ac_hi"; do
5243 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5244 cat >conftest.$ac_ext <<_ACEOF
5245#line $LINENO "configure"
5246#include "confdefs.h"
5247$ac_includes_default
5248#ifdef F77_DUMMY_MAIN
5249# ifdef __cplusplus
5250 extern "C"
5251# endif
5252 int F77_DUMMY_MAIN() { return 1; }
5253#endif
5254int
5255main ()
5256{
5257static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5258test_array [0] = 0
5259
5260 ;
5261 return 0;
5262}
5263_ACEOF
5264rm -f conftest.$ac_objext
5265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5266 (eval $ac_compile) 2>&5
5267 ac_status=$?
5268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5269 (exit $ac_status); } &&
5270 { ac_try='test -s conftest.$ac_objext'
5271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5272 (eval $ac_try) 2>&5
5273 ac_status=$?
5274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5275 (exit $ac_status); }; }; then
5276 ac_hi=$ac_mid
5277else
5278 echo "$as_me: failed program was:" >&5
5279cat conftest.$ac_ext >&5
5280ac_lo=`expr '(' $ac_mid ')' + 1`
5281fi
5282rm -f conftest.$ac_objext conftest.$ac_ext
5283done
5284case $ac_lo in
5285?*) ac_cv_sizeof_long=$ac_lo;;
5286'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5287echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5288 { (exit 1); exit 1; }; } ;;
5289esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005290else
5291 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005292 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5293echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5294 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005295else
Martin v. Löwis11437992002-04-12 09:54:03 +00005296 cat >conftest.$ac_ext <<_ACEOF
5297#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005298#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005299$ac_includes_default
5300long longval () { return (long) (sizeof (long)); }
5301unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005302#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005303#include <stdlib.h>
5304#ifdef F77_DUMMY_MAIN
5305# ifdef __cplusplus
5306 extern "C"
5307# endif
5308 int F77_DUMMY_MAIN() { return 1; }
5309#endif
5310int
5311main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005312{
Martin v. Löwis11437992002-04-12 09:54:03 +00005313
5314 FILE *f = fopen ("conftest.val", "w");
5315 if (! f)
5316 exit (1);
5317 if (((long) (sizeof (long))) < 0)
5318 {
5319 long i = longval ();
5320 if (i != ((long) (sizeof (long))))
5321 exit (1);
5322 fprintf (f, "%ld\n", i);
5323 }
5324 else
5325 {
5326 unsigned long i = ulongval ();
5327 if (i != ((long) (sizeof (long))))
5328 exit (1);
5329 fprintf (f, "%lu\n", i);
5330 }
5331 exit (ferror (f) || fclose (f) != 0);
5332
5333 ;
5334 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005335}
Martin v. Löwis11437992002-04-12 09:54:03 +00005336_ACEOF
5337rm -f conftest$ac_exeext
5338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5339 (eval $ac_link) 2>&5
5340 ac_status=$?
5341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5342 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5344 (eval $ac_try) 2>&5
5345 ac_status=$?
5346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5347 (exit $ac_status); }; }; then
5348 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005349else
Martin v. Löwis11437992002-04-12 09:54:03 +00005350 echo "$as_me: program exited with status $ac_status" >&5
5351echo "$as_me: failed program was:" >&5
5352cat conftest.$ac_ext >&5
5353( exit $ac_status )
5354{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5355echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5356 { (exit 1); exit 1; }; }
5357fi
5358rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5359fi
5360fi
5361rm -f conftest.val
5362else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005363 ac_cv_sizeof_long=0
5364fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005365fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005366echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5367echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5368cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005369#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005370_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005371
5372
Martin v. Löwis11437992002-04-12 09:54:03 +00005373echo "$as_me:$LINENO: checking for void *" >&5
5374echo $ECHO_N "checking for void *... $ECHO_C" >&6
5375if test "${ac_cv_type_void_p+set}" = set; then
5376 echo $ECHO_N "(cached) $ECHO_C" >&6
5377else
5378 cat >conftest.$ac_ext <<_ACEOF
5379#line $LINENO "configure"
5380#include "confdefs.h"
5381$ac_includes_default
5382#ifdef F77_DUMMY_MAIN
5383# ifdef __cplusplus
5384 extern "C"
5385# endif
5386 int F77_DUMMY_MAIN() { return 1; }
5387#endif
5388int
5389main ()
5390{
5391if ((void * *) 0)
5392 return 0;
5393if (sizeof (void *))
5394 return 0;
5395 ;
5396 return 0;
5397}
5398_ACEOF
5399rm -f conftest.$ac_objext
5400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5401 (eval $ac_compile) 2>&5
5402 ac_status=$?
5403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5404 (exit $ac_status); } &&
5405 { ac_try='test -s conftest.$ac_objext'
5406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5407 (eval $ac_try) 2>&5
5408 ac_status=$?
5409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5410 (exit $ac_status); }; }; then
5411 ac_cv_type_void_p=yes
5412else
5413 echo "$as_me: failed program was:" >&5
5414cat conftest.$ac_ext >&5
5415ac_cv_type_void_p=no
5416fi
5417rm -f conftest.$ac_objext conftest.$ac_ext
5418fi
5419echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5420echo "${ECHO_T}$ac_cv_type_void_p" >&6
5421
5422echo "$as_me:$LINENO: checking size of void *" >&5
5423echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5424if test "${ac_cv_sizeof_void_p+set}" = set; then
5425 echo $ECHO_N "(cached) $ECHO_C" >&6
5426else
5427 if test "$ac_cv_type_void_p" = yes; then
5428 # The cast to unsigned long works around a bug in the HP C Compiler
5429 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5430 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5431 # This bug is HP SR number 8606223364.
5432 if test "$cross_compiling" = yes; then
5433 # Depending upon the size, compute the lo and hi bounds.
5434cat >conftest.$ac_ext <<_ACEOF
5435#line $LINENO "configure"
5436#include "confdefs.h"
5437$ac_includes_default
5438#ifdef F77_DUMMY_MAIN
5439# ifdef __cplusplus
5440 extern "C"
5441# endif
5442 int F77_DUMMY_MAIN() { return 1; }
5443#endif
5444int
5445main ()
5446{
5447static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5448test_array [0] = 0
5449
5450 ;
5451 return 0;
5452}
5453_ACEOF
5454rm -f conftest.$ac_objext
5455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5456 (eval $ac_compile) 2>&5
5457 ac_status=$?
5458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5459 (exit $ac_status); } &&
5460 { ac_try='test -s conftest.$ac_objext'
5461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5462 (eval $ac_try) 2>&5
5463 ac_status=$?
5464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5465 (exit $ac_status); }; }; then
5466 ac_lo=0 ac_mid=0
5467 while :; do
5468 cat >conftest.$ac_ext <<_ACEOF
5469#line $LINENO "configure"
5470#include "confdefs.h"
5471$ac_includes_default
5472#ifdef F77_DUMMY_MAIN
5473# ifdef __cplusplus
5474 extern "C"
5475# endif
5476 int F77_DUMMY_MAIN() { return 1; }
5477#endif
5478int
5479main ()
5480{
5481static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5482test_array [0] = 0
5483
5484 ;
5485 return 0;
5486}
5487_ACEOF
5488rm -f conftest.$ac_objext
5489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5490 (eval $ac_compile) 2>&5
5491 ac_status=$?
5492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5493 (exit $ac_status); } &&
5494 { ac_try='test -s conftest.$ac_objext'
5495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5496 (eval $ac_try) 2>&5
5497 ac_status=$?
5498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5499 (exit $ac_status); }; }; then
5500 ac_hi=$ac_mid; break
5501else
5502 echo "$as_me: failed program was:" >&5
5503cat conftest.$ac_ext >&5
5504ac_lo=`expr $ac_mid + 1`
5505 if test $ac_lo -le $ac_mid; then
5506 ac_lo= ac_hi=
5507 break
5508 fi
5509 ac_mid=`expr 2 '*' $ac_mid + 1`
5510fi
5511rm -f conftest.$ac_objext conftest.$ac_ext
5512 done
5513else
5514 echo "$as_me: failed program was:" >&5
5515cat conftest.$ac_ext >&5
5516cat >conftest.$ac_ext <<_ACEOF
5517#line $LINENO "configure"
5518#include "confdefs.h"
5519$ac_includes_default
5520#ifdef F77_DUMMY_MAIN
5521# ifdef __cplusplus
5522 extern "C"
5523# endif
5524 int F77_DUMMY_MAIN() { return 1; }
5525#endif
5526int
5527main ()
5528{
5529static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5530test_array [0] = 0
5531
5532 ;
5533 return 0;
5534}
5535_ACEOF
5536rm -f conftest.$ac_objext
5537if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5538 (eval $ac_compile) 2>&5
5539 ac_status=$?
5540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5541 (exit $ac_status); } &&
5542 { ac_try='test -s conftest.$ac_objext'
5543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5544 (eval $ac_try) 2>&5
5545 ac_status=$?
5546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5547 (exit $ac_status); }; }; then
5548 ac_hi=-1 ac_mid=-1
5549 while :; do
5550 cat >conftest.$ac_ext <<_ACEOF
5551#line $LINENO "configure"
5552#include "confdefs.h"
5553$ac_includes_default
5554#ifdef F77_DUMMY_MAIN
5555# ifdef __cplusplus
5556 extern "C"
5557# endif
5558 int F77_DUMMY_MAIN() { return 1; }
5559#endif
5560int
5561main ()
5562{
5563static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5564test_array [0] = 0
5565
5566 ;
5567 return 0;
5568}
5569_ACEOF
5570rm -f conftest.$ac_objext
5571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5572 (eval $ac_compile) 2>&5
5573 ac_status=$?
5574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5575 (exit $ac_status); } &&
5576 { ac_try='test -s conftest.$ac_objext'
5577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5578 (eval $ac_try) 2>&5
5579 ac_status=$?
5580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 (exit $ac_status); }; }; then
5582 ac_lo=$ac_mid; break
5583else
5584 echo "$as_me: failed program was:" >&5
5585cat conftest.$ac_ext >&5
5586ac_hi=`expr '(' $ac_mid ')' - 1`
5587 if test $ac_mid -le $ac_hi; then
5588 ac_lo= ac_hi=
5589 break
5590 fi
5591 ac_mid=`expr 2 '*' $ac_mid`
5592fi
5593rm -f conftest.$ac_objext conftest.$ac_ext
5594 done
5595else
5596 echo "$as_me: failed program was:" >&5
5597cat conftest.$ac_ext >&5
5598ac_lo= ac_hi=
5599fi
5600rm -f conftest.$ac_objext conftest.$ac_ext
5601fi
5602rm -f conftest.$ac_objext conftest.$ac_ext
5603# Binary search between lo and hi bounds.
5604while test "x$ac_lo" != "x$ac_hi"; do
5605 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5606 cat >conftest.$ac_ext <<_ACEOF
5607#line $LINENO "configure"
5608#include "confdefs.h"
5609$ac_includes_default
5610#ifdef F77_DUMMY_MAIN
5611# ifdef __cplusplus
5612 extern "C"
5613# endif
5614 int F77_DUMMY_MAIN() { return 1; }
5615#endif
5616int
5617main ()
5618{
5619static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5620test_array [0] = 0
5621
5622 ;
5623 return 0;
5624}
5625_ACEOF
5626rm -f conftest.$ac_objext
5627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5628 (eval $ac_compile) 2>&5
5629 ac_status=$?
5630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5631 (exit $ac_status); } &&
5632 { ac_try='test -s conftest.$ac_objext'
5633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5634 (eval $ac_try) 2>&5
5635 ac_status=$?
5636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5637 (exit $ac_status); }; }; then
5638 ac_hi=$ac_mid
5639else
5640 echo "$as_me: failed program was:" >&5
5641cat conftest.$ac_ext >&5
5642ac_lo=`expr '(' $ac_mid ')' + 1`
5643fi
5644rm -f conftest.$ac_objext conftest.$ac_ext
5645done
5646case $ac_lo in
5647?*) ac_cv_sizeof_void_p=$ac_lo;;
5648'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5649echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5650 { (exit 1); exit 1; }; } ;;
5651esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005652else
5653 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005654 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5655echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5656 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005657else
Martin v. Löwis11437992002-04-12 09:54:03 +00005658 cat >conftest.$ac_ext <<_ACEOF
5659#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005660#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005661$ac_includes_default
5662long longval () { return (long) (sizeof (void *)); }
5663unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005664#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005665#include <stdlib.h>
5666#ifdef F77_DUMMY_MAIN
5667# ifdef __cplusplus
5668 extern "C"
5669# endif
5670 int F77_DUMMY_MAIN() { return 1; }
5671#endif
5672int
5673main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005674{
Martin v. Löwis11437992002-04-12 09:54:03 +00005675
5676 FILE *f = fopen ("conftest.val", "w");
5677 if (! f)
5678 exit (1);
5679 if (((long) (sizeof (void *))) < 0)
5680 {
5681 long i = longval ();
5682 if (i != ((long) (sizeof (void *))))
5683 exit (1);
5684 fprintf (f, "%ld\n", i);
5685 }
5686 else
5687 {
5688 unsigned long i = ulongval ();
5689 if (i != ((long) (sizeof (void *))))
5690 exit (1);
5691 fprintf (f, "%lu\n", i);
5692 }
5693 exit (ferror (f) || fclose (f) != 0);
5694
5695 ;
5696 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005697}
Martin v. Löwis11437992002-04-12 09:54:03 +00005698_ACEOF
5699rm -f conftest$ac_exeext
5700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5701 (eval $ac_link) 2>&5
5702 ac_status=$?
5703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5704 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5706 (eval $ac_try) 2>&5
5707 ac_status=$?
5708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5709 (exit $ac_status); }; }; then
5710 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005711else
Martin v. Löwis11437992002-04-12 09:54:03 +00005712 echo "$as_me: program exited with status $ac_status" >&5
5713echo "$as_me: failed program was:" >&5
5714cat conftest.$ac_ext >&5
5715( exit $ac_status )
5716{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5717echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5718 { (exit 1); exit 1; }; }
5719fi
5720rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5721fi
5722fi
5723rm -f conftest.val
5724else
Guido van Rossumad678af1998-10-02 14:42:15 +00005725 ac_cv_sizeof_void_p=0
5726fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005727fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005728echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5729echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5730cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005731#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005732_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005733
5734
Martin v. Löwis11437992002-04-12 09:54:03 +00005735echo "$as_me:$LINENO: checking for char" >&5
5736echo $ECHO_N "checking for char... $ECHO_C" >&6
5737if test "${ac_cv_type_char+set}" = set; then
5738 echo $ECHO_N "(cached) $ECHO_C" >&6
5739else
5740 cat >conftest.$ac_ext <<_ACEOF
5741#line $LINENO "configure"
5742#include "confdefs.h"
5743$ac_includes_default
5744#ifdef F77_DUMMY_MAIN
5745# ifdef __cplusplus
5746 extern "C"
5747# endif
5748 int F77_DUMMY_MAIN() { return 1; }
5749#endif
5750int
5751main ()
5752{
5753if ((char *) 0)
5754 return 0;
5755if (sizeof (char))
5756 return 0;
5757 ;
5758 return 0;
5759}
5760_ACEOF
5761rm -f conftest.$ac_objext
5762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5763 (eval $ac_compile) 2>&5
5764 ac_status=$?
5765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5766 (exit $ac_status); } &&
5767 { ac_try='test -s conftest.$ac_objext'
5768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5769 (eval $ac_try) 2>&5
5770 ac_status=$?
5771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5772 (exit $ac_status); }; }; then
5773 ac_cv_type_char=yes
5774else
5775 echo "$as_me: failed program was:" >&5
5776cat conftest.$ac_ext >&5
5777ac_cv_type_char=no
5778fi
5779rm -f conftest.$ac_objext conftest.$ac_ext
5780fi
5781echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5782echo "${ECHO_T}$ac_cv_type_char" >&6
5783
5784echo "$as_me:$LINENO: checking size of char" >&5
5785echo $ECHO_N "checking size of char... $ECHO_C" >&6
5786if test "${ac_cv_sizeof_char+set}" = set; then
5787 echo $ECHO_N "(cached) $ECHO_C" >&6
5788else
5789 if test "$ac_cv_type_char" = yes; then
5790 # The cast to unsigned long works around a bug in the HP C Compiler
5791 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5792 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5793 # This bug is HP SR number 8606223364.
5794 if test "$cross_compiling" = yes; then
5795 # Depending upon the size, compute the lo and hi bounds.
5796cat >conftest.$ac_ext <<_ACEOF
5797#line $LINENO "configure"
5798#include "confdefs.h"
5799$ac_includes_default
5800#ifdef F77_DUMMY_MAIN
5801# ifdef __cplusplus
5802 extern "C"
5803# endif
5804 int F77_DUMMY_MAIN() { return 1; }
5805#endif
5806int
5807main ()
5808{
5809static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5810test_array [0] = 0
5811
5812 ;
5813 return 0;
5814}
5815_ACEOF
5816rm -f conftest.$ac_objext
5817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5818 (eval $ac_compile) 2>&5
5819 ac_status=$?
5820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5821 (exit $ac_status); } &&
5822 { ac_try='test -s conftest.$ac_objext'
5823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5824 (eval $ac_try) 2>&5
5825 ac_status=$?
5826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5827 (exit $ac_status); }; }; then
5828 ac_lo=0 ac_mid=0
5829 while :; do
5830 cat >conftest.$ac_ext <<_ACEOF
5831#line $LINENO "configure"
5832#include "confdefs.h"
5833$ac_includes_default
5834#ifdef F77_DUMMY_MAIN
5835# ifdef __cplusplus
5836 extern "C"
5837# endif
5838 int F77_DUMMY_MAIN() { return 1; }
5839#endif
5840int
5841main ()
5842{
5843static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5844test_array [0] = 0
5845
5846 ;
5847 return 0;
5848}
5849_ACEOF
5850rm -f conftest.$ac_objext
5851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5852 (eval $ac_compile) 2>&5
5853 ac_status=$?
5854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5855 (exit $ac_status); } &&
5856 { ac_try='test -s conftest.$ac_objext'
5857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5858 (eval $ac_try) 2>&5
5859 ac_status=$?
5860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5861 (exit $ac_status); }; }; then
5862 ac_hi=$ac_mid; break
5863else
5864 echo "$as_me: failed program was:" >&5
5865cat conftest.$ac_ext >&5
5866ac_lo=`expr $ac_mid + 1`
5867 if test $ac_lo -le $ac_mid; then
5868 ac_lo= ac_hi=
5869 break
5870 fi
5871 ac_mid=`expr 2 '*' $ac_mid + 1`
5872fi
5873rm -f conftest.$ac_objext conftest.$ac_ext
5874 done
5875else
5876 echo "$as_me: failed program was:" >&5
5877cat conftest.$ac_ext >&5
5878cat >conftest.$ac_ext <<_ACEOF
5879#line $LINENO "configure"
5880#include "confdefs.h"
5881$ac_includes_default
5882#ifdef F77_DUMMY_MAIN
5883# ifdef __cplusplus
5884 extern "C"
5885# endif
5886 int F77_DUMMY_MAIN() { return 1; }
5887#endif
5888int
5889main ()
5890{
5891static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5892test_array [0] = 0
5893
5894 ;
5895 return 0;
5896}
5897_ACEOF
5898rm -f conftest.$ac_objext
5899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5900 (eval $ac_compile) 2>&5
5901 ac_status=$?
5902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5903 (exit $ac_status); } &&
5904 { ac_try='test -s conftest.$ac_objext'
5905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5906 (eval $ac_try) 2>&5
5907 ac_status=$?
5908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5909 (exit $ac_status); }; }; then
5910 ac_hi=-1 ac_mid=-1
5911 while :; do
5912 cat >conftest.$ac_ext <<_ACEOF
5913#line $LINENO "configure"
5914#include "confdefs.h"
5915$ac_includes_default
5916#ifdef F77_DUMMY_MAIN
5917# ifdef __cplusplus
5918 extern "C"
5919# endif
5920 int F77_DUMMY_MAIN() { return 1; }
5921#endif
5922int
5923main ()
5924{
5925static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5926test_array [0] = 0
5927
5928 ;
5929 return 0;
5930}
5931_ACEOF
5932rm -f conftest.$ac_objext
5933if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5934 (eval $ac_compile) 2>&5
5935 ac_status=$?
5936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5937 (exit $ac_status); } &&
5938 { ac_try='test -s conftest.$ac_objext'
5939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5940 (eval $ac_try) 2>&5
5941 ac_status=$?
5942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5943 (exit $ac_status); }; }; then
5944 ac_lo=$ac_mid; break
5945else
5946 echo "$as_me: failed program was:" >&5
5947cat conftest.$ac_ext >&5
5948ac_hi=`expr '(' $ac_mid ')' - 1`
5949 if test $ac_mid -le $ac_hi; then
5950 ac_lo= ac_hi=
5951 break
5952 fi
5953 ac_mid=`expr 2 '*' $ac_mid`
5954fi
5955rm -f conftest.$ac_objext conftest.$ac_ext
5956 done
5957else
5958 echo "$as_me: failed program was:" >&5
5959cat conftest.$ac_ext >&5
5960ac_lo= ac_hi=
5961fi
5962rm -f conftest.$ac_objext conftest.$ac_ext
5963fi
5964rm -f conftest.$ac_objext conftest.$ac_ext
5965# Binary search between lo and hi bounds.
5966while test "x$ac_lo" != "x$ac_hi"; do
5967 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5968 cat >conftest.$ac_ext <<_ACEOF
5969#line $LINENO "configure"
5970#include "confdefs.h"
5971$ac_includes_default
5972#ifdef F77_DUMMY_MAIN
5973# ifdef __cplusplus
5974 extern "C"
5975# endif
5976 int F77_DUMMY_MAIN() { return 1; }
5977#endif
5978int
5979main ()
5980{
5981static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5982test_array [0] = 0
5983
5984 ;
5985 return 0;
5986}
5987_ACEOF
5988rm -f conftest.$ac_objext
5989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5990 (eval $ac_compile) 2>&5
5991 ac_status=$?
5992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5993 (exit $ac_status); } &&
5994 { ac_try='test -s conftest.$ac_objext'
5995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5996 (eval $ac_try) 2>&5
5997 ac_status=$?
5998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5999 (exit $ac_status); }; }; then
6000 ac_hi=$ac_mid
6001else
6002 echo "$as_me: failed program was:" >&5
6003cat conftest.$ac_ext >&5
6004ac_lo=`expr '(' $ac_mid ')' + 1`
6005fi
6006rm -f conftest.$ac_objext conftest.$ac_ext
6007done
6008case $ac_lo in
6009?*) ac_cv_sizeof_char=$ac_lo;;
6010'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6011echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6012 { (exit 1); exit 1; }; } ;;
6013esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006014else
6015 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006016 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6017echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6018 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006019else
Martin v. Löwis11437992002-04-12 09:54:03 +00006020 cat >conftest.$ac_ext <<_ACEOF
6021#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006022#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006023$ac_includes_default
6024long longval () { return (long) (sizeof (char)); }
6025unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006026#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006027#include <stdlib.h>
6028#ifdef F77_DUMMY_MAIN
6029# ifdef __cplusplus
6030 extern "C"
6031# endif
6032 int F77_DUMMY_MAIN() { return 1; }
6033#endif
6034int
6035main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006036{
Martin v. Löwis11437992002-04-12 09:54:03 +00006037
6038 FILE *f = fopen ("conftest.val", "w");
6039 if (! f)
6040 exit (1);
6041 if (((long) (sizeof (char))) < 0)
6042 {
6043 long i = longval ();
6044 if (i != ((long) (sizeof (char))))
6045 exit (1);
6046 fprintf (f, "%ld\n", i);
6047 }
6048 else
6049 {
6050 unsigned long i = ulongval ();
6051 if (i != ((long) (sizeof (char))))
6052 exit (1);
6053 fprintf (f, "%lu\n", i);
6054 }
6055 exit (ferror (f) || fclose (f) != 0);
6056
6057 ;
6058 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006059}
Martin v. Löwis11437992002-04-12 09:54:03 +00006060_ACEOF
6061rm -f conftest$ac_exeext
6062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6063 (eval $ac_link) 2>&5
6064 ac_status=$?
6065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6066 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6068 (eval $ac_try) 2>&5
6069 ac_status=$?
6070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6071 (exit $ac_status); }; }; then
6072 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006073else
Martin v. Löwis11437992002-04-12 09:54:03 +00006074 echo "$as_me: program exited with status $ac_status" >&5
6075echo "$as_me: failed program was:" >&5
6076cat conftest.$ac_ext >&5
6077( exit $ac_status )
6078{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6079echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6080 { (exit 1); exit 1; }; }
6081fi
6082rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6083fi
6084fi
6085rm -f conftest.val
6086else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006087 ac_cv_sizeof_char=0
6088fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006089fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006090echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6091echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6092cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006093#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006094_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006095
6096
Martin v. Löwis11437992002-04-12 09:54:03 +00006097echo "$as_me:$LINENO: checking for short" >&5
6098echo $ECHO_N "checking for short... $ECHO_C" >&6
6099if test "${ac_cv_type_short+set}" = set; then
6100 echo $ECHO_N "(cached) $ECHO_C" >&6
6101else
6102 cat >conftest.$ac_ext <<_ACEOF
6103#line $LINENO "configure"
6104#include "confdefs.h"
6105$ac_includes_default
6106#ifdef F77_DUMMY_MAIN
6107# ifdef __cplusplus
6108 extern "C"
6109# endif
6110 int F77_DUMMY_MAIN() { return 1; }
6111#endif
6112int
6113main ()
6114{
6115if ((short *) 0)
6116 return 0;
6117if (sizeof (short))
6118 return 0;
6119 ;
6120 return 0;
6121}
6122_ACEOF
6123rm -f conftest.$ac_objext
6124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6125 (eval $ac_compile) 2>&5
6126 ac_status=$?
6127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6128 (exit $ac_status); } &&
6129 { ac_try='test -s conftest.$ac_objext'
6130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6131 (eval $ac_try) 2>&5
6132 ac_status=$?
6133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6134 (exit $ac_status); }; }; then
6135 ac_cv_type_short=yes
6136else
6137 echo "$as_me: failed program was:" >&5
6138cat conftest.$ac_ext >&5
6139ac_cv_type_short=no
6140fi
6141rm -f conftest.$ac_objext conftest.$ac_ext
6142fi
6143echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6144echo "${ECHO_T}$ac_cv_type_short" >&6
6145
6146echo "$as_me:$LINENO: checking size of short" >&5
6147echo $ECHO_N "checking size of short... $ECHO_C" >&6
6148if test "${ac_cv_sizeof_short+set}" = set; then
6149 echo $ECHO_N "(cached) $ECHO_C" >&6
6150else
6151 if test "$ac_cv_type_short" = yes; then
6152 # The cast to unsigned long works around a bug in the HP C Compiler
6153 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6154 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6155 # This bug is HP SR number 8606223364.
6156 if test "$cross_compiling" = yes; then
6157 # Depending upon the size, compute the lo and hi bounds.
6158cat >conftest.$ac_ext <<_ACEOF
6159#line $LINENO "configure"
6160#include "confdefs.h"
6161$ac_includes_default
6162#ifdef F77_DUMMY_MAIN
6163# ifdef __cplusplus
6164 extern "C"
6165# endif
6166 int F77_DUMMY_MAIN() { return 1; }
6167#endif
6168int
6169main ()
6170{
6171static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6172test_array [0] = 0
6173
6174 ;
6175 return 0;
6176}
6177_ACEOF
6178rm -f conftest.$ac_objext
6179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6180 (eval $ac_compile) 2>&5
6181 ac_status=$?
6182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6183 (exit $ac_status); } &&
6184 { ac_try='test -s conftest.$ac_objext'
6185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6186 (eval $ac_try) 2>&5
6187 ac_status=$?
6188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6189 (exit $ac_status); }; }; then
6190 ac_lo=0 ac_mid=0
6191 while :; do
6192 cat >conftest.$ac_ext <<_ACEOF
6193#line $LINENO "configure"
6194#include "confdefs.h"
6195$ac_includes_default
6196#ifdef F77_DUMMY_MAIN
6197# ifdef __cplusplus
6198 extern "C"
6199# endif
6200 int F77_DUMMY_MAIN() { return 1; }
6201#endif
6202int
6203main ()
6204{
6205static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6206test_array [0] = 0
6207
6208 ;
6209 return 0;
6210}
6211_ACEOF
6212rm -f conftest.$ac_objext
6213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6214 (eval $ac_compile) 2>&5
6215 ac_status=$?
6216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6217 (exit $ac_status); } &&
6218 { ac_try='test -s conftest.$ac_objext'
6219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6220 (eval $ac_try) 2>&5
6221 ac_status=$?
6222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6223 (exit $ac_status); }; }; then
6224 ac_hi=$ac_mid; break
6225else
6226 echo "$as_me: failed program was:" >&5
6227cat conftest.$ac_ext >&5
6228ac_lo=`expr $ac_mid + 1`
6229 if test $ac_lo -le $ac_mid; then
6230 ac_lo= ac_hi=
6231 break
6232 fi
6233 ac_mid=`expr 2 '*' $ac_mid + 1`
6234fi
6235rm -f conftest.$ac_objext conftest.$ac_ext
6236 done
6237else
6238 echo "$as_me: failed program was:" >&5
6239cat conftest.$ac_ext >&5
6240cat >conftest.$ac_ext <<_ACEOF
6241#line $LINENO "configure"
6242#include "confdefs.h"
6243$ac_includes_default
6244#ifdef F77_DUMMY_MAIN
6245# ifdef __cplusplus
6246 extern "C"
6247# endif
6248 int F77_DUMMY_MAIN() { return 1; }
6249#endif
6250int
6251main ()
6252{
6253static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6254test_array [0] = 0
6255
6256 ;
6257 return 0;
6258}
6259_ACEOF
6260rm -f conftest.$ac_objext
6261if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6262 (eval $ac_compile) 2>&5
6263 ac_status=$?
6264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6265 (exit $ac_status); } &&
6266 { ac_try='test -s conftest.$ac_objext'
6267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6268 (eval $ac_try) 2>&5
6269 ac_status=$?
6270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6271 (exit $ac_status); }; }; then
6272 ac_hi=-1 ac_mid=-1
6273 while :; do
6274 cat >conftest.$ac_ext <<_ACEOF
6275#line $LINENO "configure"
6276#include "confdefs.h"
6277$ac_includes_default
6278#ifdef F77_DUMMY_MAIN
6279# ifdef __cplusplus
6280 extern "C"
6281# endif
6282 int F77_DUMMY_MAIN() { return 1; }
6283#endif
6284int
6285main ()
6286{
6287static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6288test_array [0] = 0
6289
6290 ;
6291 return 0;
6292}
6293_ACEOF
6294rm -f conftest.$ac_objext
6295if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6296 (eval $ac_compile) 2>&5
6297 ac_status=$?
6298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6299 (exit $ac_status); } &&
6300 { ac_try='test -s conftest.$ac_objext'
6301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6302 (eval $ac_try) 2>&5
6303 ac_status=$?
6304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6305 (exit $ac_status); }; }; then
6306 ac_lo=$ac_mid; break
6307else
6308 echo "$as_me: failed program was:" >&5
6309cat conftest.$ac_ext >&5
6310ac_hi=`expr '(' $ac_mid ')' - 1`
6311 if test $ac_mid -le $ac_hi; then
6312 ac_lo= ac_hi=
6313 break
6314 fi
6315 ac_mid=`expr 2 '*' $ac_mid`
6316fi
6317rm -f conftest.$ac_objext conftest.$ac_ext
6318 done
6319else
6320 echo "$as_me: failed program was:" >&5
6321cat conftest.$ac_ext >&5
6322ac_lo= ac_hi=
6323fi
6324rm -f conftest.$ac_objext conftest.$ac_ext
6325fi
6326rm -f conftest.$ac_objext conftest.$ac_ext
6327# Binary search between lo and hi bounds.
6328while test "x$ac_lo" != "x$ac_hi"; do
6329 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6330 cat >conftest.$ac_ext <<_ACEOF
6331#line $LINENO "configure"
6332#include "confdefs.h"
6333$ac_includes_default
6334#ifdef F77_DUMMY_MAIN
6335# ifdef __cplusplus
6336 extern "C"
6337# endif
6338 int F77_DUMMY_MAIN() { return 1; }
6339#endif
6340int
6341main ()
6342{
6343static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6344test_array [0] = 0
6345
6346 ;
6347 return 0;
6348}
6349_ACEOF
6350rm -f conftest.$ac_objext
6351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6352 (eval $ac_compile) 2>&5
6353 ac_status=$?
6354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6355 (exit $ac_status); } &&
6356 { ac_try='test -s conftest.$ac_objext'
6357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6358 (eval $ac_try) 2>&5
6359 ac_status=$?
6360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6361 (exit $ac_status); }; }; then
6362 ac_hi=$ac_mid
6363else
6364 echo "$as_me: failed program was:" >&5
6365cat conftest.$ac_ext >&5
6366ac_lo=`expr '(' $ac_mid ')' + 1`
6367fi
6368rm -f conftest.$ac_objext conftest.$ac_ext
6369done
6370case $ac_lo in
6371?*) ac_cv_sizeof_short=$ac_lo;;
6372'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6373echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6374 { (exit 1); exit 1; }; } ;;
6375esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006376else
6377 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006378 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6379echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6380 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006381else
Martin v. Löwis11437992002-04-12 09:54:03 +00006382 cat >conftest.$ac_ext <<_ACEOF
6383#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006384#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006385$ac_includes_default
6386long longval () { return (long) (sizeof (short)); }
6387unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006388#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006389#include <stdlib.h>
6390#ifdef F77_DUMMY_MAIN
6391# ifdef __cplusplus
6392 extern "C"
6393# endif
6394 int F77_DUMMY_MAIN() { return 1; }
6395#endif
6396int
6397main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006398{
Martin v. Löwis11437992002-04-12 09:54:03 +00006399
6400 FILE *f = fopen ("conftest.val", "w");
6401 if (! f)
6402 exit (1);
6403 if (((long) (sizeof (short))) < 0)
6404 {
6405 long i = longval ();
6406 if (i != ((long) (sizeof (short))))
6407 exit (1);
6408 fprintf (f, "%ld\n", i);
6409 }
6410 else
6411 {
6412 unsigned long i = ulongval ();
6413 if (i != ((long) (sizeof (short))))
6414 exit (1);
6415 fprintf (f, "%lu\n", i);
6416 }
6417 exit (ferror (f) || fclose (f) != 0);
6418
6419 ;
6420 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006421}
Martin v. Löwis11437992002-04-12 09:54:03 +00006422_ACEOF
6423rm -f conftest$ac_exeext
6424if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6425 (eval $ac_link) 2>&5
6426 ac_status=$?
6427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6428 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6430 (eval $ac_try) 2>&5
6431 ac_status=$?
6432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6433 (exit $ac_status); }; }; then
6434 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006435else
Martin v. Löwis11437992002-04-12 09:54:03 +00006436 echo "$as_me: program exited with status $ac_status" >&5
6437echo "$as_me: failed program was:" >&5
6438cat conftest.$ac_ext >&5
6439( exit $ac_status )
6440{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6441echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6442 { (exit 1); exit 1; }; }
6443fi
6444rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6445fi
6446fi
6447rm -f conftest.val
6448else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006449 ac_cv_sizeof_short=0
6450fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006451fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006452echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6453echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6454cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006455#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006456_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006457
6458
Martin v. Löwis11437992002-04-12 09:54:03 +00006459echo "$as_me:$LINENO: checking for float" >&5
6460echo $ECHO_N "checking for float... $ECHO_C" >&6
6461if test "${ac_cv_type_float+set}" = set; then
6462 echo $ECHO_N "(cached) $ECHO_C" >&6
6463else
6464 cat >conftest.$ac_ext <<_ACEOF
6465#line $LINENO "configure"
6466#include "confdefs.h"
6467$ac_includes_default
6468#ifdef F77_DUMMY_MAIN
6469# ifdef __cplusplus
6470 extern "C"
6471# endif
6472 int F77_DUMMY_MAIN() { return 1; }
6473#endif
6474int
6475main ()
6476{
6477if ((float *) 0)
6478 return 0;
6479if (sizeof (float))
6480 return 0;
6481 ;
6482 return 0;
6483}
6484_ACEOF
6485rm -f conftest.$ac_objext
6486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6487 (eval $ac_compile) 2>&5
6488 ac_status=$?
6489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6490 (exit $ac_status); } &&
6491 { ac_try='test -s conftest.$ac_objext'
6492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6493 (eval $ac_try) 2>&5
6494 ac_status=$?
6495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6496 (exit $ac_status); }; }; then
6497 ac_cv_type_float=yes
6498else
6499 echo "$as_me: failed program was:" >&5
6500cat conftest.$ac_ext >&5
6501ac_cv_type_float=no
6502fi
6503rm -f conftest.$ac_objext conftest.$ac_ext
6504fi
6505echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6506echo "${ECHO_T}$ac_cv_type_float" >&6
6507
6508echo "$as_me:$LINENO: checking size of float" >&5
6509echo $ECHO_N "checking size of float... $ECHO_C" >&6
6510if test "${ac_cv_sizeof_float+set}" = set; then
6511 echo $ECHO_N "(cached) $ECHO_C" >&6
6512else
6513 if test "$ac_cv_type_float" = yes; then
6514 # The cast to unsigned long works around a bug in the HP C Compiler
6515 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6516 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6517 # This bug is HP SR number 8606223364.
6518 if test "$cross_compiling" = yes; then
6519 # Depending upon the size, compute the lo and hi bounds.
6520cat >conftest.$ac_ext <<_ACEOF
6521#line $LINENO "configure"
6522#include "confdefs.h"
6523$ac_includes_default
6524#ifdef F77_DUMMY_MAIN
6525# ifdef __cplusplus
6526 extern "C"
6527# endif
6528 int F77_DUMMY_MAIN() { return 1; }
6529#endif
6530int
6531main ()
6532{
6533static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6534test_array [0] = 0
6535
6536 ;
6537 return 0;
6538}
6539_ACEOF
6540rm -f conftest.$ac_objext
6541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6542 (eval $ac_compile) 2>&5
6543 ac_status=$?
6544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6545 (exit $ac_status); } &&
6546 { ac_try='test -s conftest.$ac_objext'
6547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6548 (eval $ac_try) 2>&5
6549 ac_status=$?
6550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6551 (exit $ac_status); }; }; then
6552 ac_lo=0 ac_mid=0
6553 while :; do
6554 cat >conftest.$ac_ext <<_ACEOF
6555#line $LINENO "configure"
6556#include "confdefs.h"
6557$ac_includes_default
6558#ifdef F77_DUMMY_MAIN
6559# ifdef __cplusplus
6560 extern "C"
6561# endif
6562 int F77_DUMMY_MAIN() { return 1; }
6563#endif
6564int
6565main ()
6566{
6567static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6568test_array [0] = 0
6569
6570 ;
6571 return 0;
6572}
6573_ACEOF
6574rm -f conftest.$ac_objext
6575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6576 (eval $ac_compile) 2>&5
6577 ac_status=$?
6578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6579 (exit $ac_status); } &&
6580 { ac_try='test -s conftest.$ac_objext'
6581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6582 (eval $ac_try) 2>&5
6583 ac_status=$?
6584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6585 (exit $ac_status); }; }; then
6586 ac_hi=$ac_mid; break
6587else
6588 echo "$as_me: failed program was:" >&5
6589cat conftest.$ac_ext >&5
6590ac_lo=`expr $ac_mid + 1`
6591 if test $ac_lo -le $ac_mid; then
6592 ac_lo= ac_hi=
6593 break
6594 fi
6595 ac_mid=`expr 2 '*' $ac_mid + 1`
6596fi
6597rm -f conftest.$ac_objext conftest.$ac_ext
6598 done
6599else
6600 echo "$as_me: failed program was:" >&5
6601cat conftest.$ac_ext >&5
6602cat >conftest.$ac_ext <<_ACEOF
6603#line $LINENO "configure"
6604#include "confdefs.h"
6605$ac_includes_default
6606#ifdef F77_DUMMY_MAIN
6607# ifdef __cplusplus
6608 extern "C"
6609# endif
6610 int F77_DUMMY_MAIN() { return 1; }
6611#endif
6612int
6613main ()
6614{
6615static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6616test_array [0] = 0
6617
6618 ;
6619 return 0;
6620}
6621_ACEOF
6622rm -f conftest.$ac_objext
6623if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6624 (eval $ac_compile) 2>&5
6625 ac_status=$?
6626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6627 (exit $ac_status); } &&
6628 { ac_try='test -s conftest.$ac_objext'
6629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6630 (eval $ac_try) 2>&5
6631 ac_status=$?
6632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6633 (exit $ac_status); }; }; then
6634 ac_hi=-1 ac_mid=-1
6635 while :; do
6636 cat >conftest.$ac_ext <<_ACEOF
6637#line $LINENO "configure"
6638#include "confdefs.h"
6639$ac_includes_default
6640#ifdef F77_DUMMY_MAIN
6641# ifdef __cplusplus
6642 extern "C"
6643# endif
6644 int F77_DUMMY_MAIN() { return 1; }
6645#endif
6646int
6647main ()
6648{
6649static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6650test_array [0] = 0
6651
6652 ;
6653 return 0;
6654}
6655_ACEOF
6656rm -f conftest.$ac_objext
6657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6658 (eval $ac_compile) 2>&5
6659 ac_status=$?
6660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6661 (exit $ac_status); } &&
6662 { ac_try='test -s conftest.$ac_objext'
6663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6664 (eval $ac_try) 2>&5
6665 ac_status=$?
6666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6667 (exit $ac_status); }; }; then
6668 ac_lo=$ac_mid; break
6669else
6670 echo "$as_me: failed program was:" >&5
6671cat conftest.$ac_ext >&5
6672ac_hi=`expr '(' $ac_mid ')' - 1`
6673 if test $ac_mid -le $ac_hi; then
6674 ac_lo= ac_hi=
6675 break
6676 fi
6677 ac_mid=`expr 2 '*' $ac_mid`
6678fi
6679rm -f conftest.$ac_objext conftest.$ac_ext
6680 done
6681else
6682 echo "$as_me: failed program was:" >&5
6683cat conftest.$ac_ext >&5
6684ac_lo= ac_hi=
6685fi
6686rm -f conftest.$ac_objext conftest.$ac_ext
6687fi
6688rm -f conftest.$ac_objext conftest.$ac_ext
6689# Binary search between lo and hi bounds.
6690while test "x$ac_lo" != "x$ac_hi"; do
6691 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6692 cat >conftest.$ac_ext <<_ACEOF
6693#line $LINENO "configure"
6694#include "confdefs.h"
6695$ac_includes_default
6696#ifdef F77_DUMMY_MAIN
6697# ifdef __cplusplus
6698 extern "C"
6699# endif
6700 int F77_DUMMY_MAIN() { return 1; }
6701#endif
6702int
6703main ()
6704{
6705static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6706test_array [0] = 0
6707
6708 ;
6709 return 0;
6710}
6711_ACEOF
6712rm -f conftest.$ac_objext
6713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6714 (eval $ac_compile) 2>&5
6715 ac_status=$?
6716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6717 (exit $ac_status); } &&
6718 { ac_try='test -s conftest.$ac_objext'
6719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6720 (eval $ac_try) 2>&5
6721 ac_status=$?
6722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6723 (exit $ac_status); }; }; then
6724 ac_hi=$ac_mid
6725else
6726 echo "$as_me: failed program was:" >&5
6727cat conftest.$ac_ext >&5
6728ac_lo=`expr '(' $ac_mid ')' + 1`
6729fi
6730rm -f conftest.$ac_objext conftest.$ac_ext
6731done
6732case $ac_lo in
6733?*) ac_cv_sizeof_float=$ac_lo;;
6734'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6735echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6736 { (exit 1); exit 1; }; } ;;
6737esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006738else
6739 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006740 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6741echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6742 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006743else
Martin v. Löwis11437992002-04-12 09:54:03 +00006744 cat >conftest.$ac_ext <<_ACEOF
6745#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006746#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006747$ac_includes_default
6748long longval () { return (long) (sizeof (float)); }
6749unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006750#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006751#include <stdlib.h>
6752#ifdef F77_DUMMY_MAIN
6753# ifdef __cplusplus
6754 extern "C"
6755# endif
6756 int F77_DUMMY_MAIN() { return 1; }
6757#endif
6758int
6759main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006760{
Martin v. Löwis11437992002-04-12 09:54:03 +00006761
6762 FILE *f = fopen ("conftest.val", "w");
6763 if (! f)
6764 exit (1);
6765 if (((long) (sizeof (float))) < 0)
6766 {
6767 long i = longval ();
6768 if (i != ((long) (sizeof (float))))
6769 exit (1);
6770 fprintf (f, "%ld\n", i);
6771 }
6772 else
6773 {
6774 unsigned long i = ulongval ();
6775 if (i != ((long) (sizeof (float))))
6776 exit (1);
6777 fprintf (f, "%lu\n", i);
6778 }
6779 exit (ferror (f) || fclose (f) != 0);
6780
6781 ;
6782 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006783}
Martin v. Löwis11437992002-04-12 09:54:03 +00006784_ACEOF
6785rm -f conftest$ac_exeext
6786if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6787 (eval $ac_link) 2>&5
6788 ac_status=$?
6789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6790 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6792 (eval $ac_try) 2>&5
6793 ac_status=$?
6794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6795 (exit $ac_status); }; }; then
6796 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006797else
Martin v. Löwis11437992002-04-12 09:54:03 +00006798 echo "$as_me: program exited with status $ac_status" >&5
6799echo "$as_me: failed program was:" >&5
6800cat conftest.$ac_ext >&5
6801( exit $ac_status )
6802{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6803echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6804 { (exit 1); exit 1; }; }
6805fi
6806rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6807fi
6808fi
6809rm -f conftest.val
6810else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006811 ac_cv_sizeof_float=0
6812fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006813fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006814echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6815echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6816cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006817#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006818_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006819
6820
Martin v. Löwis11437992002-04-12 09:54:03 +00006821echo "$as_me:$LINENO: checking for double" >&5
6822echo $ECHO_N "checking for double... $ECHO_C" >&6
6823if test "${ac_cv_type_double+set}" = set; then
6824 echo $ECHO_N "(cached) $ECHO_C" >&6
6825else
6826 cat >conftest.$ac_ext <<_ACEOF
6827#line $LINENO "configure"
6828#include "confdefs.h"
6829$ac_includes_default
6830#ifdef F77_DUMMY_MAIN
6831# ifdef __cplusplus
6832 extern "C"
6833# endif
6834 int F77_DUMMY_MAIN() { return 1; }
6835#endif
6836int
6837main ()
6838{
6839if ((double *) 0)
6840 return 0;
6841if (sizeof (double))
6842 return 0;
6843 ;
6844 return 0;
6845}
6846_ACEOF
6847rm -f conftest.$ac_objext
6848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6849 (eval $ac_compile) 2>&5
6850 ac_status=$?
6851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6852 (exit $ac_status); } &&
6853 { ac_try='test -s conftest.$ac_objext'
6854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6855 (eval $ac_try) 2>&5
6856 ac_status=$?
6857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6858 (exit $ac_status); }; }; then
6859 ac_cv_type_double=yes
6860else
6861 echo "$as_me: failed program was:" >&5
6862cat conftest.$ac_ext >&5
6863ac_cv_type_double=no
6864fi
6865rm -f conftest.$ac_objext conftest.$ac_ext
6866fi
6867echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6868echo "${ECHO_T}$ac_cv_type_double" >&6
6869
6870echo "$as_me:$LINENO: checking size of double" >&5
6871echo $ECHO_N "checking size of double... $ECHO_C" >&6
6872if test "${ac_cv_sizeof_double+set}" = set; then
6873 echo $ECHO_N "(cached) $ECHO_C" >&6
6874else
6875 if test "$ac_cv_type_double" = yes; then
6876 # The cast to unsigned long works around a bug in the HP C Compiler
6877 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6878 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6879 # This bug is HP SR number 8606223364.
6880 if test "$cross_compiling" = yes; then
6881 # Depending upon the size, compute the lo and hi bounds.
6882cat >conftest.$ac_ext <<_ACEOF
6883#line $LINENO "configure"
6884#include "confdefs.h"
6885$ac_includes_default
6886#ifdef F77_DUMMY_MAIN
6887# ifdef __cplusplus
6888 extern "C"
6889# endif
6890 int F77_DUMMY_MAIN() { return 1; }
6891#endif
6892int
6893main ()
6894{
6895static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6896test_array [0] = 0
6897
6898 ;
6899 return 0;
6900}
6901_ACEOF
6902rm -f conftest.$ac_objext
6903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6904 (eval $ac_compile) 2>&5
6905 ac_status=$?
6906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6907 (exit $ac_status); } &&
6908 { ac_try='test -s conftest.$ac_objext'
6909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6910 (eval $ac_try) 2>&5
6911 ac_status=$?
6912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6913 (exit $ac_status); }; }; then
6914 ac_lo=0 ac_mid=0
6915 while :; do
6916 cat >conftest.$ac_ext <<_ACEOF
6917#line $LINENO "configure"
6918#include "confdefs.h"
6919$ac_includes_default
6920#ifdef F77_DUMMY_MAIN
6921# ifdef __cplusplus
6922 extern "C"
6923# endif
6924 int F77_DUMMY_MAIN() { return 1; }
6925#endif
6926int
6927main ()
6928{
6929static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6930test_array [0] = 0
6931
6932 ;
6933 return 0;
6934}
6935_ACEOF
6936rm -f conftest.$ac_objext
6937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6938 (eval $ac_compile) 2>&5
6939 ac_status=$?
6940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6941 (exit $ac_status); } &&
6942 { ac_try='test -s conftest.$ac_objext'
6943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6944 (eval $ac_try) 2>&5
6945 ac_status=$?
6946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6947 (exit $ac_status); }; }; then
6948 ac_hi=$ac_mid; break
6949else
6950 echo "$as_me: failed program was:" >&5
6951cat conftest.$ac_ext >&5
6952ac_lo=`expr $ac_mid + 1`
6953 if test $ac_lo -le $ac_mid; then
6954 ac_lo= ac_hi=
6955 break
6956 fi
6957 ac_mid=`expr 2 '*' $ac_mid + 1`
6958fi
6959rm -f conftest.$ac_objext conftest.$ac_ext
6960 done
6961else
6962 echo "$as_me: failed program was:" >&5
6963cat conftest.$ac_ext >&5
6964cat >conftest.$ac_ext <<_ACEOF
6965#line $LINENO "configure"
6966#include "confdefs.h"
6967$ac_includes_default
6968#ifdef F77_DUMMY_MAIN
6969# ifdef __cplusplus
6970 extern "C"
6971# endif
6972 int F77_DUMMY_MAIN() { return 1; }
6973#endif
6974int
6975main ()
6976{
6977static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6978test_array [0] = 0
6979
6980 ;
6981 return 0;
6982}
6983_ACEOF
6984rm -f conftest.$ac_objext
6985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6986 (eval $ac_compile) 2>&5
6987 ac_status=$?
6988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6989 (exit $ac_status); } &&
6990 { ac_try='test -s conftest.$ac_objext'
6991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6992 (eval $ac_try) 2>&5
6993 ac_status=$?
6994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6995 (exit $ac_status); }; }; then
6996 ac_hi=-1 ac_mid=-1
6997 while :; do
6998 cat >conftest.$ac_ext <<_ACEOF
6999#line $LINENO "configure"
7000#include "confdefs.h"
7001$ac_includes_default
7002#ifdef F77_DUMMY_MAIN
7003# ifdef __cplusplus
7004 extern "C"
7005# endif
7006 int F77_DUMMY_MAIN() { return 1; }
7007#endif
7008int
7009main ()
7010{
7011static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7012test_array [0] = 0
7013
7014 ;
7015 return 0;
7016}
7017_ACEOF
7018rm -f conftest.$ac_objext
7019if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7020 (eval $ac_compile) 2>&5
7021 ac_status=$?
7022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7023 (exit $ac_status); } &&
7024 { ac_try='test -s conftest.$ac_objext'
7025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7026 (eval $ac_try) 2>&5
7027 ac_status=$?
7028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7029 (exit $ac_status); }; }; then
7030 ac_lo=$ac_mid; break
7031else
7032 echo "$as_me: failed program was:" >&5
7033cat conftest.$ac_ext >&5
7034ac_hi=`expr '(' $ac_mid ')' - 1`
7035 if test $ac_mid -le $ac_hi; then
7036 ac_lo= ac_hi=
7037 break
7038 fi
7039 ac_mid=`expr 2 '*' $ac_mid`
7040fi
7041rm -f conftest.$ac_objext conftest.$ac_ext
7042 done
7043else
7044 echo "$as_me: failed program was:" >&5
7045cat conftest.$ac_ext >&5
7046ac_lo= ac_hi=
7047fi
7048rm -f conftest.$ac_objext conftest.$ac_ext
7049fi
7050rm -f conftest.$ac_objext conftest.$ac_ext
7051# Binary search between lo and hi bounds.
7052while test "x$ac_lo" != "x$ac_hi"; do
7053 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7054 cat >conftest.$ac_ext <<_ACEOF
7055#line $LINENO "configure"
7056#include "confdefs.h"
7057$ac_includes_default
7058#ifdef F77_DUMMY_MAIN
7059# ifdef __cplusplus
7060 extern "C"
7061# endif
7062 int F77_DUMMY_MAIN() { return 1; }
7063#endif
7064int
7065main ()
7066{
7067static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7068test_array [0] = 0
7069
7070 ;
7071 return 0;
7072}
7073_ACEOF
7074rm -f conftest.$ac_objext
7075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7076 (eval $ac_compile) 2>&5
7077 ac_status=$?
7078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7079 (exit $ac_status); } &&
7080 { ac_try='test -s conftest.$ac_objext'
7081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7082 (eval $ac_try) 2>&5
7083 ac_status=$?
7084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7085 (exit $ac_status); }; }; then
7086 ac_hi=$ac_mid
7087else
7088 echo "$as_me: failed program was:" >&5
7089cat conftest.$ac_ext >&5
7090ac_lo=`expr '(' $ac_mid ')' + 1`
7091fi
7092rm -f conftest.$ac_objext conftest.$ac_ext
7093done
7094case $ac_lo in
7095?*) ac_cv_sizeof_double=$ac_lo;;
7096'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7097echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7098 { (exit 1); exit 1; }; } ;;
7099esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007100else
7101 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007102 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7103echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7104 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007105else
Martin v. Löwis11437992002-04-12 09:54:03 +00007106 cat >conftest.$ac_ext <<_ACEOF
7107#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007108#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007109$ac_includes_default
7110long longval () { return (long) (sizeof (double)); }
7111unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007112#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007113#include <stdlib.h>
7114#ifdef F77_DUMMY_MAIN
7115# ifdef __cplusplus
7116 extern "C"
7117# endif
7118 int F77_DUMMY_MAIN() { return 1; }
7119#endif
7120int
7121main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007122{
Martin v. Löwis11437992002-04-12 09:54:03 +00007123
7124 FILE *f = fopen ("conftest.val", "w");
7125 if (! f)
7126 exit (1);
7127 if (((long) (sizeof (double))) < 0)
7128 {
7129 long i = longval ();
7130 if (i != ((long) (sizeof (double))))
7131 exit (1);
7132 fprintf (f, "%ld\n", i);
7133 }
7134 else
7135 {
7136 unsigned long i = ulongval ();
7137 if (i != ((long) (sizeof (double))))
7138 exit (1);
7139 fprintf (f, "%lu\n", i);
7140 }
7141 exit (ferror (f) || fclose (f) != 0);
7142
7143 ;
7144 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007145}
Martin v. Löwis11437992002-04-12 09:54:03 +00007146_ACEOF
7147rm -f conftest$ac_exeext
7148if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7149 (eval $ac_link) 2>&5
7150 ac_status=$?
7151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7152 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7154 (eval $ac_try) 2>&5
7155 ac_status=$?
7156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7157 (exit $ac_status); }; }; then
7158 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007159else
Martin v. Löwis11437992002-04-12 09:54:03 +00007160 echo "$as_me: program exited with status $ac_status" >&5
7161echo "$as_me: failed program was:" >&5
7162cat conftest.$ac_ext >&5
7163( exit $ac_status )
7164{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7165echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7166 { (exit 1); exit 1; }; }
7167fi
7168rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7169fi
7170fi
7171rm -f conftest.val
7172else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007173 ac_cv_sizeof_double=0
7174fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007175fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007176echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7177echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7178cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007179#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007180_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007181
7182
Martin v. Löwis11437992002-04-12 09:54:03 +00007183echo "$as_me:$LINENO: checking for fpos_t" >&5
7184echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7185if test "${ac_cv_type_fpos_t+set}" = set; then
7186 echo $ECHO_N "(cached) $ECHO_C" >&6
7187else
7188 cat >conftest.$ac_ext <<_ACEOF
7189#line $LINENO "configure"
7190#include "confdefs.h"
7191$ac_includes_default
7192#ifdef F77_DUMMY_MAIN
7193# ifdef __cplusplus
7194 extern "C"
7195# endif
7196 int F77_DUMMY_MAIN() { return 1; }
7197#endif
7198int
7199main ()
7200{
7201if ((fpos_t *) 0)
7202 return 0;
7203if (sizeof (fpos_t))
7204 return 0;
7205 ;
7206 return 0;
7207}
7208_ACEOF
7209rm -f conftest.$ac_objext
7210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7211 (eval $ac_compile) 2>&5
7212 ac_status=$?
7213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7214 (exit $ac_status); } &&
7215 { ac_try='test -s conftest.$ac_objext'
7216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7217 (eval $ac_try) 2>&5
7218 ac_status=$?
7219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7220 (exit $ac_status); }; }; then
7221 ac_cv_type_fpos_t=yes
7222else
7223 echo "$as_me: failed program was:" >&5
7224cat conftest.$ac_ext >&5
7225ac_cv_type_fpos_t=no
7226fi
7227rm -f conftest.$ac_objext conftest.$ac_ext
7228fi
7229echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7230echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7231
7232echo "$as_me:$LINENO: checking size of fpos_t" >&5
7233echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7234if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7235 echo $ECHO_N "(cached) $ECHO_C" >&6
7236else
7237 if test "$ac_cv_type_fpos_t" = yes; then
7238 # The cast to unsigned long works around a bug in the HP C Compiler
7239 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7240 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7241 # This bug is HP SR number 8606223364.
7242 if test "$cross_compiling" = yes; then
7243 # Depending upon the size, compute the lo and hi bounds.
7244cat >conftest.$ac_ext <<_ACEOF
7245#line $LINENO "configure"
7246#include "confdefs.h"
7247$ac_includes_default
7248#ifdef F77_DUMMY_MAIN
7249# ifdef __cplusplus
7250 extern "C"
7251# endif
7252 int F77_DUMMY_MAIN() { return 1; }
7253#endif
7254int
7255main ()
7256{
7257static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7258test_array [0] = 0
7259
7260 ;
7261 return 0;
7262}
7263_ACEOF
7264rm -f conftest.$ac_objext
7265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7266 (eval $ac_compile) 2>&5
7267 ac_status=$?
7268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7269 (exit $ac_status); } &&
7270 { ac_try='test -s conftest.$ac_objext'
7271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7272 (eval $ac_try) 2>&5
7273 ac_status=$?
7274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7275 (exit $ac_status); }; }; then
7276 ac_lo=0 ac_mid=0
7277 while :; do
7278 cat >conftest.$ac_ext <<_ACEOF
7279#line $LINENO "configure"
7280#include "confdefs.h"
7281$ac_includes_default
7282#ifdef F77_DUMMY_MAIN
7283# ifdef __cplusplus
7284 extern "C"
7285# endif
7286 int F77_DUMMY_MAIN() { return 1; }
7287#endif
7288int
7289main ()
7290{
7291static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7292test_array [0] = 0
7293
7294 ;
7295 return 0;
7296}
7297_ACEOF
7298rm -f conftest.$ac_objext
7299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7300 (eval $ac_compile) 2>&5
7301 ac_status=$?
7302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7303 (exit $ac_status); } &&
7304 { ac_try='test -s conftest.$ac_objext'
7305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7306 (eval $ac_try) 2>&5
7307 ac_status=$?
7308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7309 (exit $ac_status); }; }; then
7310 ac_hi=$ac_mid; break
7311else
7312 echo "$as_me: failed program was:" >&5
7313cat conftest.$ac_ext >&5
7314ac_lo=`expr $ac_mid + 1`
7315 if test $ac_lo -le $ac_mid; then
7316 ac_lo= ac_hi=
7317 break
7318 fi
7319 ac_mid=`expr 2 '*' $ac_mid + 1`
7320fi
7321rm -f conftest.$ac_objext conftest.$ac_ext
7322 done
7323else
7324 echo "$as_me: failed program was:" >&5
7325cat conftest.$ac_ext >&5
7326cat >conftest.$ac_ext <<_ACEOF
7327#line $LINENO "configure"
7328#include "confdefs.h"
7329$ac_includes_default
7330#ifdef F77_DUMMY_MAIN
7331# ifdef __cplusplus
7332 extern "C"
7333# endif
7334 int F77_DUMMY_MAIN() { return 1; }
7335#endif
7336int
7337main ()
7338{
7339static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7340test_array [0] = 0
7341
7342 ;
7343 return 0;
7344}
7345_ACEOF
7346rm -f conftest.$ac_objext
7347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7348 (eval $ac_compile) 2>&5
7349 ac_status=$?
7350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7351 (exit $ac_status); } &&
7352 { ac_try='test -s conftest.$ac_objext'
7353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7354 (eval $ac_try) 2>&5
7355 ac_status=$?
7356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7357 (exit $ac_status); }; }; then
7358 ac_hi=-1 ac_mid=-1
7359 while :; do
7360 cat >conftest.$ac_ext <<_ACEOF
7361#line $LINENO "configure"
7362#include "confdefs.h"
7363$ac_includes_default
7364#ifdef F77_DUMMY_MAIN
7365# ifdef __cplusplus
7366 extern "C"
7367# endif
7368 int F77_DUMMY_MAIN() { return 1; }
7369#endif
7370int
7371main ()
7372{
7373static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7374test_array [0] = 0
7375
7376 ;
7377 return 0;
7378}
7379_ACEOF
7380rm -f conftest.$ac_objext
7381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7382 (eval $ac_compile) 2>&5
7383 ac_status=$?
7384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7385 (exit $ac_status); } &&
7386 { ac_try='test -s conftest.$ac_objext'
7387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7388 (eval $ac_try) 2>&5
7389 ac_status=$?
7390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7391 (exit $ac_status); }; }; then
7392 ac_lo=$ac_mid; break
7393else
7394 echo "$as_me: failed program was:" >&5
7395cat conftest.$ac_ext >&5
7396ac_hi=`expr '(' $ac_mid ')' - 1`
7397 if test $ac_mid -le $ac_hi; then
7398 ac_lo= ac_hi=
7399 break
7400 fi
7401 ac_mid=`expr 2 '*' $ac_mid`
7402fi
7403rm -f conftest.$ac_objext conftest.$ac_ext
7404 done
7405else
7406 echo "$as_me: failed program was:" >&5
7407cat conftest.$ac_ext >&5
7408ac_lo= ac_hi=
7409fi
7410rm -f conftest.$ac_objext conftest.$ac_ext
7411fi
7412rm -f conftest.$ac_objext conftest.$ac_ext
7413# Binary search between lo and hi bounds.
7414while test "x$ac_lo" != "x$ac_hi"; do
7415 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7416 cat >conftest.$ac_ext <<_ACEOF
7417#line $LINENO "configure"
7418#include "confdefs.h"
7419$ac_includes_default
7420#ifdef F77_DUMMY_MAIN
7421# ifdef __cplusplus
7422 extern "C"
7423# endif
7424 int F77_DUMMY_MAIN() { return 1; }
7425#endif
7426int
7427main ()
7428{
7429static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7430test_array [0] = 0
7431
7432 ;
7433 return 0;
7434}
7435_ACEOF
7436rm -f conftest.$ac_objext
7437if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7438 (eval $ac_compile) 2>&5
7439 ac_status=$?
7440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7441 (exit $ac_status); } &&
7442 { ac_try='test -s conftest.$ac_objext'
7443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7444 (eval $ac_try) 2>&5
7445 ac_status=$?
7446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7447 (exit $ac_status); }; }; then
7448 ac_hi=$ac_mid
7449else
7450 echo "$as_me: failed program was:" >&5
7451cat conftest.$ac_ext >&5
7452ac_lo=`expr '(' $ac_mid ')' + 1`
7453fi
7454rm -f conftest.$ac_objext conftest.$ac_ext
7455done
7456case $ac_lo in
7457?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7458'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7459echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7460 { (exit 1); exit 1; }; } ;;
7461esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007462else
7463 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007464 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7465echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7466 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007467else
Martin v. Löwis11437992002-04-12 09:54:03 +00007468 cat >conftest.$ac_ext <<_ACEOF
7469#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007470#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007471$ac_includes_default
7472long longval () { return (long) (sizeof (fpos_t)); }
7473unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007474#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007475#include <stdlib.h>
7476#ifdef F77_DUMMY_MAIN
7477# ifdef __cplusplus
7478 extern "C"
7479# endif
7480 int F77_DUMMY_MAIN() { return 1; }
7481#endif
7482int
7483main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007484{
Martin v. Löwis11437992002-04-12 09:54:03 +00007485
7486 FILE *f = fopen ("conftest.val", "w");
7487 if (! f)
7488 exit (1);
7489 if (((long) (sizeof (fpos_t))) < 0)
7490 {
7491 long i = longval ();
7492 if (i != ((long) (sizeof (fpos_t))))
7493 exit (1);
7494 fprintf (f, "%ld\n", i);
7495 }
7496 else
7497 {
7498 unsigned long i = ulongval ();
7499 if (i != ((long) (sizeof (fpos_t))))
7500 exit (1);
7501 fprintf (f, "%lu\n", i);
7502 }
7503 exit (ferror (f) || fclose (f) != 0);
7504
7505 ;
7506 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007507}
Martin v. Löwis11437992002-04-12 09:54:03 +00007508_ACEOF
7509rm -f conftest$ac_exeext
7510if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7511 (eval $ac_link) 2>&5
7512 ac_status=$?
7513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7514 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7516 (eval $ac_try) 2>&5
7517 ac_status=$?
7518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7519 (exit $ac_status); }; }; then
7520 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007521else
Martin v. Löwis11437992002-04-12 09:54:03 +00007522 echo "$as_me: program exited with status $ac_status" >&5
7523echo "$as_me: failed program was:" >&5
7524cat conftest.$ac_ext >&5
7525( exit $ac_status )
7526{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7527echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7528 { (exit 1); exit 1; }; }
7529fi
7530rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7531fi
7532fi
7533rm -f conftest.val
7534else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007535 ac_cv_sizeof_fpos_t=0
7536fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007537fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007538echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7539echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7540cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007541#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007542_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007543
Michael W. Hudson54241132001-12-07 15:38:26 +00007544
7545
Martin v. Löwis11437992002-04-12 09:54:03 +00007546echo "$as_me:$LINENO: checking for long long support" >&5
7547echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007548have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007549cat >conftest.$ac_ext <<_ACEOF
7550#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007551#include "confdefs.h"
7552
Martin v. Löwis11437992002-04-12 09:54:03 +00007553#ifdef F77_DUMMY_MAIN
7554# ifdef __cplusplus
7555 extern "C"
7556# endif
7557 int F77_DUMMY_MAIN() { return 1; }
7558#endif
7559int
7560main ()
7561{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007562long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007563 ;
7564 return 0;
7565}
7566_ACEOF
7567rm -f conftest.$ac_objext
7568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7569 (eval $ac_compile) 2>&5
7570 ac_status=$?
7571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7572 (exit $ac_status); } &&
7573 { ac_try='test -s conftest.$ac_objext'
7574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7575 (eval $ac_try) 2>&5
7576 ac_status=$?
7577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7578 (exit $ac_status); }; }; then
7579
7580
7581cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007582#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007583_ACEOF
7584
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007585 have_long_long=yes
7586
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007587else
Martin v. Löwis11437992002-04-12 09:54:03 +00007588 echo "$as_me: failed program was:" >&5
7589cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007590fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007591rm -f conftest.$ac_objext conftest.$ac_ext
7592echo "$as_me:$LINENO: result: $have_long_long" >&5
7593echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007594if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007595echo "$as_me:$LINENO: checking for long long" >&5
7596echo $ECHO_N "checking for long long... $ECHO_C" >&6
7597if test "${ac_cv_type_long_long+set}" = set; then
7598 echo $ECHO_N "(cached) $ECHO_C" >&6
7599else
7600 cat >conftest.$ac_ext <<_ACEOF
7601#line $LINENO "configure"
7602#include "confdefs.h"
7603$ac_includes_default
7604#ifdef F77_DUMMY_MAIN
7605# ifdef __cplusplus
7606 extern "C"
7607# endif
7608 int F77_DUMMY_MAIN() { return 1; }
7609#endif
7610int
7611main ()
7612{
7613if ((long long *) 0)
7614 return 0;
7615if (sizeof (long long))
7616 return 0;
7617 ;
7618 return 0;
7619}
7620_ACEOF
7621rm -f conftest.$ac_objext
7622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7623 (eval $ac_compile) 2>&5
7624 ac_status=$?
7625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7626 (exit $ac_status); } &&
7627 { ac_try='test -s conftest.$ac_objext'
7628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7629 (eval $ac_try) 2>&5
7630 ac_status=$?
7631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632 (exit $ac_status); }; }; then
7633 ac_cv_type_long_long=yes
7634else
7635 echo "$as_me: failed program was:" >&5
7636cat conftest.$ac_ext >&5
7637ac_cv_type_long_long=no
7638fi
7639rm -f conftest.$ac_objext conftest.$ac_ext
7640fi
7641echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7642echo "${ECHO_T}$ac_cv_type_long_long" >&6
7643
7644echo "$as_me:$LINENO: checking size of long long" >&5
7645echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7646if test "${ac_cv_sizeof_long_long+set}" = set; then
7647 echo $ECHO_N "(cached) $ECHO_C" >&6
7648else
7649 if test "$ac_cv_type_long_long" = yes; then
7650 # The cast to unsigned long works around a bug in the HP C Compiler
7651 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7652 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7653 # This bug is HP SR number 8606223364.
7654 if test "$cross_compiling" = yes; then
7655 # Depending upon the size, compute the lo and hi bounds.
7656cat >conftest.$ac_ext <<_ACEOF
7657#line $LINENO "configure"
7658#include "confdefs.h"
7659$ac_includes_default
7660#ifdef F77_DUMMY_MAIN
7661# ifdef __cplusplus
7662 extern "C"
7663# endif
7664 int F77_DUMMY_MAIN() { return 1; }
7665#endif
7666int
7667main ()
7668{
7669static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7670test_array [0] = 0
7671
7672 ;
7673 return 0;
7674}
7675_ACEOF
7676rm -f conftest.$ac_objext
7677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7678 (eval $ac_compile) 2>&5
7679 ac_status=$?
7680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7681 (exit $ac_status); } &&
7682 { ac_try='test -s conftest.$ac_objext'
7683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7684 (eval $ac_try) 2>&5
7685 ac_status=$?
7686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7687 (exit $ac_status); }; }; then
7688 ac_lo=0 ac_mid=0
7689 while :; do
7690 cat >conftest.$ac_ext <<_ACEOF
7691#line $LINENO "configure"
7692#include "confdefs.h"
7693$ac_includes_default
7694#ifdef F77_DUMMY_MAIN
7695# ifdef __cplusplus
7696 extern "C"
7697# endif
7698 int F77_DUMMY_MAIN() { return 1; }
7699#endif
7700int
7701main ()
7702{
7703static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7704test_array [0] = 0
7705
7706 ;
7707 return 0;
7708}
7709_ACEOF
7710rm -f conftest.$ac_objext
7711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7712 (eval $ac_compile) 2>&5
7713 ac_status=$?
7714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7715 (exit $ac_status); } &&
7716 { ac_try='test -s conftest.$ac_objext'
7717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7718 (eval $ac_try) 2>&5
7719 ac_status=$?
7720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7721 (exit $ac_status); }; }; then
7722 ac_hi=$ac_mid; break
7723else
7724 echo "$as_me: failed program was:" >&5
7725cat conftest.$ac_ext >&5
7726ac_lo=`expr $ac_mid + 1`
7727 if test $ac_lo -le $ac_mid; then
7728 ac_lo= ac_hi=
7729 break
7730 fi
7731 ac_mid=`expr 2 '*' $ac_mid + 1`
7732fi
7733rm -f conftest.$ac_objext conftest.$ac_ext
7734 done
7735else
7736 echo "$as_me: failed program was:" >&5
7737cat conftest.$ac_ext >&5
7738cat >conftest.$ac_ext <<_ACEOF
7739#line $LINENO "configure"
7740#include "confdefs.h"
7741$ac_includes_default
7742#ifdef F77_DUMMY_MAIN
7743# ifdef __cplusplus
7744 extern "C"
7745# endif
7746 int F77_DUMMY_MAIN() { return 1; }
7747#endif
7748int
7749main ()
7750{
7751static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7752test_array [0] = 0
7753
7754 ;
7755 return 0;
7756}
7757_ACEOF
7758rm -f conftest.$ac_objext
7759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7760 (eval $ac_compile) 2>&5
7761 ac_status=$?
7762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7763 (exit $ac_status); } &&
7764 { ac_try='test -s conftest.$ac_objext'
7765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7766 (eval $ac_try) 2>&5
7767 ac_status=$?
7768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7769 (exit $ac_status); }; }; then
7770 ac_hi=-1 ac_mid=-1
7771 while :; do
7772 cat >conftest.$ac_ext <<_ACEOF
7773#line $LINENO "configure"
7774#include "confdefs.h"
7775$ac_includes_default
7776#ifdef F77_DUMMY_MAIN
7777# ifdef __cplusplus
7778 extern "C"
7779# endif
7780 int F77_DUMMY_MAIN() { return 1; }
7781#endif
7782int
7783main ()
7784{
7785static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7786test_array [0] = 0
7787
7788 ;
7789 return 0;
7790}
7791_ACEOF
7792rm -f conftest.$ac_objext
7793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7794 (eval $ac_compile) 2>&5
7795 ac_status=$?
7796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7797 (exit $ac_status); } &&
7798 { ac_try='test -s conftest.$ac_objext'
7799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7800 (eval $ac_try) 2>&5
7801 ac_status=$?
7802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7803 (exit $ac_status); }; }; then
7804 ac_lo=$ac_mid; break
7805else
7806 echo "$as_me: failed program was:" >&5
7807cat conftest.$ac_ext >&5
7808ac_hi=`expr '(' $ac_mid ')' - 1`
7809 if test $ac_mid -le $ac_hi; then
7810 ac_lo= ac_hi=
7811 break
7812 fi
7813 ac_mid=`expr 2 '*' $ac_mid`
7814fi
7815rm -f conftest.$ac_objext conftest.$ac_ext
7816 done
7817else
7818 echo "$as_me: failed program was:" >&5
7819cat conftest.$ac_ext >&5
7820ac_lo= ac_hi=
7821fi
7822rm -f conftest.$ac_objext conftest.$ac_ext
7823fi
7824rm -f conftest.$ac_objext conftest.$ac_ext
7825# Binary search between lo and hi bounds.
7826while test "x$ac_lo" != "x$ac_hi"; do
7827 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7828 cat >conftest.$ac_ext <<_ACEOF
7829#line $LINENO "configure"
7830#include "confdefs.h"
7831$ac_includes_default
7832#ifdef F77_DUMMY_MAIN
7833# ifdef __cplusplus
7834 extern "C"
7835# endif
7836 int F77_DUMMY_MAIN() { return 1; }
7837#endif
7838int
7839main ()
7840{
7841static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7842test_array [0] = 0
7843
7844 ;
7845 return 0;
7846}
7847_ACEOF
7848rm -f conftest.$ac_objext
7849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7850 (eval $ac_compile) 2>&5
7851 ac_status=$?
7852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7853 (exit $ac_status); } &&
7854 { ac_try='test -s conftest.$ac_objext'
7855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7856 (eval $ac_try) 2>&5
7857 ac_status=$?
7858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7859 (exit $ac_status); }; }; then
7860 ac_hi=$ac_mid
7861else
7862 echo "$as_me: failed program was:" >&5
7863cat conftest.$ac_ext >&5
7864ac_lo=`expr '(' $ac_mid ')' + 1`
7865fi
7866rm -f conftest.$ac_objext conftest.$ac_ext
7867done
7868case $ac_lo in
7869?*) ac_cv_sizeof_long_long=$ac_lo;;
7870'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7871echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7872 { (exit 1); exit 1; }; } ;;
7873esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007874else
7875 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7877echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7878 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007879else
Martin v. Löwis11437992002-04-12 09:54:03 +00007880 cat >conftest.$ac_ext <<_ACEOF
7881#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007882#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007883$ac_includes_default
7884long longval () { return (long) (sizeof (long long)); }
7885unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007886#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007887#include <stdlib.h>
7888#ifdef F77_DUMMY_MAIN
7889# ifdef __cplusplus
7890 extern "C"
7891# endif
7892 int F77_DUMMY_MAIN() { return 1; }
7893#endif
7894int
7895main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007896{
Martin v. Löwis11437992002-04-12 09:54:03 +00007897
7898 FILE *f = fopen ("conftest.val", "w");
7899 if (! f)
7900 exit (1);
7901 if (((long) (sizeof (long long))) < 0)
7902 {
7903 long i = longval ();
7904 if (i != ((long) (sizeof (long long))))
7905 exit (1);
7906 fprintf (f, "%ld\n", i);
7907 }
7908 else
7909 {
7910 unsigned long i = ulongval ();
7911 if (i != ((long) (sizeof (long long))))
7912 exit (1);
7913 fprintf (f, "%lu\n", i);
7914 }
7915 exit (ferror (f) || fclose (f) != 0);
7916
7917 ;
7918 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007919}
Martin v. Löwis11437992002-04-12 09:54:03 +00007920_ACEOF
7921rm -f conftest$ac_exeext
7922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7923 (eval $ac_link) 2>&5
7924 ac_status=$?
7925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7928 (eval $ac_try) 2>&5
7929 ac_status=$?
7930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7931 (exit $ac_status); }; }; then
7932 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007933else
Martin v. Löwis11437992002-04-12 09:54:03 +00007934 echo "$as_me: program exited with status $ac_status" >&5
7935echo "$as_me: failed program was:" >&5
7936cat conftest.$ac_ext >&5
7937( exit $ac_status )
7938{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7939echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7940 { (exit 1); exit 1; }; }
7941fi
7942rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7943fi
7944fi
7945rm -f conftest.val
7946else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007947 ac_cv_sizeof_long_long=0
7948fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007949fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007950echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7951echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7952cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007953#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007954_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007955
Michael W. Hudson54241132001-12-07 15:38:26 +00007956
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007957fi
7958
Martin v. Löwis11437992002-04-12 09:54:03 +00007959echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7960echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007961have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007962cat >conftest.$ac_ext <<_ACEOF
7963#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007964#include "confdefs.h"
7965
Martin v. Löwis11437992002-04-12 09:54:03 +00007966#ifdef F77_DUMMY_MAIN
7967# ifdef __cplusplus
7968 extern "C"
7969# endif
7970 int F77_DUMMY_MAIN() { return 1; }
7971#endif
7972int
7973main ()
7974{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007975uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007976 ;
7977 return 0;
7978}
7979_ACEOF
7980rm -f conftest.$ac_objext
7981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7982 (eval $ac_compile) 2>&5
7983 ac_status=$?
7984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7985 (exit $ac_status); } &&
7986 { ac_try='test -s conftest.$ac_objext'
7987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7988 (eval $ac_try) 2>&5
7989 ac_status=$?
7990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991 (exit $ac_status); }; }; then
7992
7993
7994cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007995#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007996_ACEOF
7997
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007998 have_uintptr_t=yes
7999
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008000else
Martin v. Löwis11437992002-04-12 09:54:03 +00008001 echo "$as_me: failed program was:" >&5
8002cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008003fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008004rm -f conftest.$ac_objext conftest.$ac_ext
8005echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8006echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008007if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008008echo "$as_me:$LINENO: checking for uintptr_t" >&5
8009echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8010if test "${ac_cv_type_uintptr_t+set}" = set; then
8011 echo $ECHO_N "(cached) $ECHO_C" >&6
8012else
8013 cat >conftest.$ac_ext <<_ACEOF
8014#line $LINENO "configure"
8015#include "confdefs.h"
8016$ac_includes_default
8017#ifdef F77_DUMMY_MAIN
8018# ifdef __cplusplus
8019 extern "C"
8020# endif
8021 int F77_DUMMY_MAIN() { return 1; }
8022#endif
8023int
8024main ()
8025{
8026if ((uintptr_t *) 0)
8027 return 0;
8028if (sizeof (uintptr_t))
8029 return 0;
8030 ;
8031 return 0;
8032}
8033_ACEOF
8034rm -f conftest.$ac_objext
8035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8036 (eval $ac_compile) 2>&5
8037 ac_status=$?
8038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8039 (exit $ac_status); } &&
8040 { ac_try='test -s conftest.$ac_objext'
8041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8042 (eval $ac_try) 2>&5
8043 ac_status=$?
8044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8045 (exit $ac_status); }; }; then
8046 ac_cv_type_uintptr_t=yes
8047else
8048 echo "$as_me: failed program was:" >&5
8049cat conftest.$ac_ext >&5
8050ac_cv_type_uintptr_t=no
8051fi
8052rm -f conftest.$ac_objext conftest.$ac_ext
8053fi
8054echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8055echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8056
8057echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8058echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8059if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8060 echo $ECHO_N "(cached) $ECHO_C" >&6
8061else
8062 if test "$ac_cv_type_uintptr_t" = yes; then
8063 # The cast to unsigned long works around a bug in the HP C Compiler
8064 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8065 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8066 # This bug is HP SR number 8606223364.
8067 if test "$cross_compiling" = yes; then
8068 # Depending upon the size, compute the lo and hi bounds.
8069cat >conftest.$ac_ext <<_ACEOF
8070#line $LINENO "configure"
8071#include "confdefs.h"
8072$ac_includes_default
8073#ifdef F77_DUMMY_MAIN
8074# ifdef __cplusplus
8075 extern "C"
8076# endif
8077 int F77_DUMMY_MAIN() { return 1; }
8078#endif
8079int
8080main ()
8081{
8082static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8083test_array [0] = 0
8084
8085 ;
8086 return 0;
8087}
8088_ACEOF
8089rm -f conftest.$ac_objext
8090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8091 (eval $ac_compile) 2>&5
8092 ac_status=$?
8093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8094 (exit $ac_status); } &&
8095 { ac_try='test -s conftest.$ac_objext'
8096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8097 (eval $ac_try) 2>&5
8098 ac_status=$?
8099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8100 (exit $ac_status); }; }; then
8101 ac_lo=0 ac_mid=0
8102 while :; do
8103 cat >conftest.$ac_ext <<_ACEOF
8104#line $LINENO "configure"
8105#include "confdefs.h"
8106$ac_includes_default
8107#ifdef F77_DUMMY_MAIN
8108# ifdef __cplusplus
8109 extern "C"
8110# endif
8111 int F77_DUMMY_MAIN() { return 1; }
8112#endif
8113int
8114main ()
8115{
8116static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8117test_array [0] = 0
8118
8119 ;
8120 return 0;
8121}
8122_ACEOF
8123rm -f conftest.$ac_objext
8124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8125 (eval $ac_compile) 2>&5
8126 ac_status=$?
8127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8128 (exit $ac_status); } &&
8129 { ac_try='test -s conftest.$ac_objext'
8130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8131 (eval $ac_try) 2>&5
8132 ac_status=$?
8133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8134 (exit $ac_status); }; }; then
8135 ac_hi=$ac_mid; break
8136else
8137 echo "$as_me: failed program was:" >&5
8138cat conftest.$ac_ext >&5
8139ac_lo=`expr $ac_mid + 1`
8140 if test $ac_lo -le $ac_mid; then
8141 ac_lo= ac_hi=
8142 break
8143 fi
8144 ac_mid=`expr 2 '*' $ac_mid + 1`
8145fi
8146rm -f conftest.$ac_objext conftest.$ac_ext
8147 done
8148else
8149 echo "$as_me: failed program was:" >&5
8150cat conftest.$ac_ext >&5
8151cat >conftest.$ac_ext <<_ACEOF
8152#line $LINENO "configure"
8153#include "confdefs.h"
8154$ac_includes_default
8155#ifdef F77_DUMMY_MAIN
8156# ifdef __cplusplus
8157 extern "C"
8158# endif
8159 int F77_DUMMY_MAIN() { return 1; }
8160#endif
8161int
8162main ()
8163{
8164static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8165test_array [0] = 0
8166
8167 ;
8168 return 0;
8169}
8170_ACEOF
8171rm -f conftest.$ac_objext
8172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8173 (eval $ac_compile) 2>&5
8174 ac_status=$?
8175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8176 (exit $ac_status); } &&
8177 { ac_try='test -s conftest.$ac_objext'
8178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8179 (eval $ac_try) 2>&5
8180 ac_status=$?
8181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8182 (exit $ac_status); }; }; then
8183 ac_hi=-1 ac_mid=-1
8184 while :; do
8185 cat >conftest.$ac_ext <<_ACEOF
8186#line $LINENO "configure"
8187#include "confdefs.h"
8188$ac_includes_default
8189#ifdef F77_DUMMY_MAIN
8190# ifdef __cplusplus
8191 extern "C"
8192# endif
8193 int F77_DUMMY_MAIN() { return 1; }
8194#endif
8195int
8196main ()
8197{
8198static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8199test_array [0] = 0
8200
8201 ;
8202 return 0;
8203}
8204_ACEOF
8205rm -f conftest.$ac_objext
8206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8207 (eval $ac_compile) 2>&5
8208 ac_status=$?
8209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8210 (exit $ac_status); } &&
8211 { ac_try='test -s conftest.$ac_objext'
8212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8213 (eval $ac_try) 2>&5
8214 ac_status=$?
8215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8216 (exit $ac_status); }; }; then
8217 ac_lo=$ac_mid; break
8218else
8219 echo "$as_me: failed program was:" >&5
8220cat conftest.$ac_ext >&5
8221ac_hi=`expr '(' $ac_mid ')' - 1`
8222 if test $ac_mid -le $ac_hi; then
8223 ac_lo= ac_hi=
8224 break
8225 fi
8226 ac_mid=`expr 2 '*' $ac_mid`
8227fi
8228rm -f conftest.$ac_objext conftest.$ac_ext
8229 done
8230else
8231 echo "$as_me: failed program was:" >&5
8232cat conftest.$ac_ext >&5
8233ac_lo= ac_hi=
8234fi
8235rm -f conftest.$ac_objext conftest.$ac_ext
8236fi
8237rm -f conftest.$ac_objext conftest.$ac_ext
8238# Binary search between lo and hi bounds.
8239while test "x$ac_lo" != "x$ac_hi"; do
8240 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8241 cat >conftest.$ac_ext <<_ACEOF
8242#line $LINENO "configure"
8243#include "confdefs.h"
8244$ac_includes_default
8245#ifdef F77_DUMMY_MAIN
8246# ifdef __cplusplus
8247 extern "C"
8248# endif
8249 int F77_DUMMY_MAIN() { return 1; }
8250#endif
8251int
8252main ()
8253{
8254static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8255test_array [0] = 0
8256
8257 ;
8258 return 0;
8259}
8260_ACEOF
8261rm -f conftest.$ac_objext
8262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8263 (eval $ac_compile) 2>&5
8264 ac_status=$?
8265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8266 (exit $ac_status); } &&
8267 { ac_try='test -s conftest.$ac_objext'
8268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8269 (eval $ac_try) 2>&5
8270 ac_status=$?
8271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8272 (exit $ac_status); }; }; then
8273 ac_hi=$ac_mid
8274else
8275 echo "$as_me: failed program was:" >&5
8276cat conftest.$ac_ext >&5
8277ac_lo=`expr '(' $ac_mid ')' + 1`
8278fi
8279rm -f conftest.$ac_objext conftest.$ac_ext
8280done
8281case $ac_lo in
8282?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8283'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8284echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8285 { (exit 1); exit 1; }; } ;;
8286esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008287else
8288 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8290echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8291 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008292else
Martin v. Löwis11437992002-04-12 09:54:03 +00008293 cat >conftest.$ac_ext <<_ACEOF
8294#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008295#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008296$ac_includes_default
8297long longval () { return (long) (sizeof (uintptr_t)); }
8298unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008299#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008300#include <stdlib.h>
8301#ifdef F77_DUMMY_MAIN
8302# ifdef __cplusplus
8303 extern "C"
8304# endif
8305 int F77_DUMMY_MAIN() { return 1; }
8306#endif
8307int
8308main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008309{
Martin v. Löwis11437992002-04-12 09:54:03 +00008310
8311 FILE *f = fopen ("conftest.val", "w");
8312 if (! f)
8313 exit (1);
8314 if (((long) (sizeof (uintptr_t))) < 0)
8315 {
8316 long i = longval ();
8317 if (i != ((long) (sizeof (uintptr_t))))
8318 exit (1);
8319 fprintf (f, "%ld\n", i);
8320 }
8321 else
8322 {
8323 unsigned long i = ulongval ();
8324 if (i != ((long) (sizeof (uintptr_t))))
8325 exit (1);
8326 fprintf (f, "%lu\n", i);
8327 }
8328 exit (ferror (f) || fclose (f) != 0);
8329
8330 ;
8331 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008332}
Martin v. Löwis11437992002-04-12 09:54:03 +00008333_ACEOF
8334rm -f conftest$ac_exeext
8335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8336 (eval $ac_link) 2>&5
8337 ac_status=$?
8338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8339 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8341 (eval $ac_try) 2>&5
8342 ac_status=$?
8343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8344 (exit $ac_status); }; }; then
8345 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008346else
Martin v. Löwis11437992002-04-12 09:54:03 +00008347 echo "$as_me: program exited with status $ac_status" >&5
8348echo "$as_me: failed program was:" >&5
8349cat conftest.$ac_ext >&5
8350( exit $ac_status )
8351{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8352echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8353 { (exit 1); exit 1; }; }
8354fi
8355rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8356fi
8357fi
8358rm -f conftest.val
8359else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008360 ac_cv_sizeof_uintptr_t=0
8361fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008363echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8364echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8365cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008366#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008367_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008368
Michael W. Hudson54241132001-12-07 15:38:26 +00008369
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008370fi
8371
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008372# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008373echo "$as_me:$LINENO: checking size of off_t" >&5
8374echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8375if test "${ac_cv_sizeof_off_t+set}" = set; then
8376 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008377else
8378 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008379 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008380else
Martin v. Löwis11437992002-04-12 09:54:03 +00008381 cat >conftest.$ac_ext <<_ACEOF
8382#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008383#include "confdefs.h"
8384#include <stdio.h>
8385#include <sys/types.h>
8386main()
8387{
8388 FILE *f=fopen("conftestval", "w");
8389 if (!f) exit(1);
8390 fprintf(f, "%d\n", sizeof(off_t));
8391 exit(0);
8392}
Martin v. Löwis11437992002-04-12 09:54:03 +00008393_ACEOF
8394rm -f conftest$ac_exeext
8395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8396 (eval $ac_link) 2>&5
8397 ac_status=$?
8398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8399 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8401 (eval $ac_try) 2>&5
8402 ac_status=$?
8403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8404 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008405 ac_cv_sizeof_off_t=`cat conftestval`
8406else
Martin v. Löwis11437992002-04-12 09:54:03 +00008407 echo "$as_me: program exited with status $ac_status" >&5
8408echo "$as_me: failed program was:" >&5
8409cat conftest.$ac_ext >&5
8410( exit $ac_status )
8411ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008413rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008414fi
8415
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008416fi
8417
Martin v. Löwis11437992002-04-12 09:54:03 +00008418echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8419echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8420
8421cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008422#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008423_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008424
Michael W. Hudson54241132001-12-07 15:38:26 +00008425
Martin v. Löwis11437992002-04-12 09:54:03 +00008426echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8427echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008428if test "$have_long_long" = yes -a \
8429 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8430 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008431
Martin v. Löwis11437992002-04-12 09:54:03 +00008432cat >>confdefs.h <<\_ACEOF
8433#define HAVE_LARGEFILE_SUPPORT 1
8434_ACEOF
8435
8436 echo "$as_me:$LINENO: result: yes" >&5
8437echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008438else
Martin v. Löwis11437992002-04-12 09:54:03 +00008439 echo "$as_me:$LINENO: result: no" >&5
8440echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008441fi
8442
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008443# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008444echo "$as_me:$LINENO: checking size of time_t" >&5
8445echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8446if test "${ac_cv_sizeof_time_t+set}" = set; then
8447 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008448else
8449 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008450 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008451else
Martin v. Löwis11437992002-04-12 09:54:03 +00008452 cat >conftest.$ac_ext <<_ACEOF
8453#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008454#include "confdefs.h"
8455#include <stdio.h>
8456#include <time.h>
8457main()
8458{
8459 FILE *f=fopen("conftestval", "w");
8460 if (!f) exit(1);
8461 fprintf(f, "%d\n", sizeof(time_t));
8462 exit(0);
8463}
Martin v. Löwis11437992002-04-12 09:54:03 +00008464_ACEOF
8465rm -f conftest$ac_exeext
8466if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8467 (eval $ac_link) 2>&5
8468 ac_status=$?
8469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8470 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8472 (eval $ac_try) 2>&5
8473 ac_status=$?
8474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8475 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008476 ac_cv_sizeof_time_t=`cat conftestval`
8477else
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 echo "$as_me: program exited with status $ac_status" >&5
8479echo "$as_me: failed program was:" >&5
8480cat conftest.$ac_ext >&5
8481( exit $ac_status )
8482ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008483fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008484rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008485fi
8486
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008487fi
8488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8490echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8491
8492cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008493#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008494_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008495
Michael W. Hudson54241132001-12-07 15:38:26 +00008496
8497
Trent Mick635f6fb2000-08-23 21:33:05 +00008498# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008499ac_save_cc="$CC"
8500if test "$ac_cv_kpthread" = "yes"
8501then CC="$CC -Kpthread"
8502fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008503echo "$as_me:$LINENO: checking for pthread_t" >&5
8504echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008505have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008506cat >conftest.$ac_ext <<_ACEOF
8507#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008508#include "confdefs.h"
8509#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008510#ifdef F77_DUMMY_MAIN
8511# ifdef __cplusplus
8512 extern "C"
8513# endif
8514 int F77_DUMMY_MAIN() { return 1; }
8515#endif
8516int
8517main ()
8518{
Guido van Rossum12580492000-09-24 16:47:19 +00008519pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ;
8521 return 0;
8522}
8523_ACEOF
8524rm -f conftest.$ac_objext
8525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8526 (eval $ac_compile) 2>&5
8527 ac_status=$?
8528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8529 (exit $ac_status); } &&
8530 { ac_try='test -s conftest.$ac_objext'
8531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8532 (eval $ac_try) 2>&5
8533 ac_status=$?
8534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8535 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008536 have_pthread_t=yes
8537else
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 echo "$as_me: failed program was:" >&5
8539cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008541rm -f conftest.$ac_objext conftest.$ac_ext
8542echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8543echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008544if test "$have_pthread_t" = yes ; then
8545 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8547echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8548 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8549 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008550else
8551 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008552 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008553else
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 cat >conftest.$ac_ext <<_ACEOF
8555#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008556#include "confdefs.h"
8557#include <stdio.h>
8558 #include <pthread.h>
8559 main()
8560 {
8561 FILE *f=fopen("conftestval", "w");
8562 if (!f) exit(1);
8563 fprintf(f, "%d\n", sizeof(pthread_t));
8564 exit(0);
8565 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008566_ACEOF
8567rm -f conftest$ac_exeext
8568if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8569 (eval $ac_link) 2>&5
8570 ac_status=$?
8571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8574 (eval $ac_try) 2>&5
8575 ac_status=$?
8576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8577 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008578 ac_cv_sizeof_pthread_t=`cat conftestval`
8579else
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 echo "$as_me: program exited with status $ac_status" >&5
8581echo "$as_me: failed program was:" >&5
8582cat conftest.$ac_ext >&5
8583( exit $ac_status )
8584ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008585fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008586rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008587fi
8588
Trent Mick635f6fb2000-08-23 21:33:05 +00008589fi
8590
Martin v. Löwis11437992002-04-12 09:54:03 +00008591 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8592echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8593
8594cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008595#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008596_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008597
8598fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008599CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008600
Martin v. Löwis11437992002-04-12 09:54:03 +00008601echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8602echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008603# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8604if test "${enable_toolbox_glue+set}" = set; then
8605 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607fi;
Jack Jansene578a632001-08-15 01:27:14 +00008608
8609if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008610then
Jack Jansene578a632001-08-15 01:27:14 +00008611 case $ac_sys_system/$ac_sys_release in
8612 Darwin/*)
8613 enable_toolbox_glue="yes";;
8614 *)
8615 enable_toolbox_glue="no";;
8616 esac
8617fi
8618case "$enable_toolbox_glue" in
8619yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008620 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008621 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008622 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008623
8624cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008625#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008626_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008627
8628 ;;
8629*)
8630 extra_frameworks=""
8631 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008632 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008633 ;;
8634esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008635echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8636echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008637
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008638
8639case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008640 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008641 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008642 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8643 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008644 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8645 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008646 Darwin/*)
8647 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008648 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8649 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008650 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8651 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008652esac
8653
Martin v. Löwis11437992002-04-12 09:54:03 +00008654echo "$as_me:$LINENO: checking for --enable-framework" >&5
8655echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008656if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008657then
Jack Jansenca06bc62001-08-03 15:32:23 +00008658 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008659 # -U __environ is needed since bundles don't have access
8660 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008662 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008663
Jack Jansena3891ea2001-09-07 14:25:12 +00008664 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008665 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8666 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008667 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008668
Martin v. Löwis11437992002-04-12 09:54:03 +00008669cat >>confdefs.h <<\_ACEOF
8670#define WITH_NEXT_FRAMEWORK 1
8671_ACEOF
8672
8673 echo "$as_me:$LINENO: result: yes" >&5
8674echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008675else
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 echo "$as_me:$LINENO: result: no" >&5
8677echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008678fi
8679
Martin v. Löwis11437992002-04-12 09:54:03 +00008680echo "$as_me:$LINENO: checking for dyld" >&5
8681echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008682case $ac_sys_system/$ac_sys_release in
8683 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008684
Martin v. Löwis11437992002-04-12 09:54:03 +00008685cat >>confdefs.h <<\_ACEOF
8686#define WITH_DYLD 1
8687_ACEOF
8688
8689 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8690echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008691 ;;
8692 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008693 echo "$as_me:$LINENO: result: no" >&5
8694echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008695 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008696esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008697
Guido van Rossum0a516c91994-09-12 10:58:40 +00008698# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008699
Michael W. Hudson54241132001-12-07 15:38:26 +00008700
8701
8702
8703
Guido van Rossum0a516c91994-09-12 10:58:40 +00008704# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008705# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008706echo "$as_me:$LINENO: checking SO" >&5
8707echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008708if test -z "$SO"
8709then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008710 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008711 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008712 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008713 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008714 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008715fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008716echo "$as_me:$LINENO: result: $SO" >&5
8717echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008718# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008719# -- "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 +00008720# (Shared libraries in this instance are shared modules to be loaded into
8721# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008722echo "$as_me:$LINENO: checking LDSHARED" >&5
8723echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008724if test -z "$LDSHARED"
8725then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008726 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008727 AIX*)
8728 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008729 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008730 ;;
8731 BeOS*)
8732 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008733 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008734 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008735 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008736 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008737 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008738 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00008739 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008740 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008741 else LDSHARED="$(CC) -G";
Greg Ward57c9a662000-05-26 12:22:54 +00008742 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008743 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008744 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8745 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008746 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008747 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8748 if test "$enable_framework" ; then
8749 # Link against the framework. All externals should be defined.
8750 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8751 else
8752 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008753 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008754 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008755 Darwin/*)
8756 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8757 if test "$enable_framework" ; then
8758 # Link against the framework. All externals should be defined.
8759 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8760 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008761 # No framework, use the Python app as bundle-loader
8762 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8763 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008764 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008765 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008766 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008767 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008768 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008769 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008770 then
8771 LDSHARED="cc -shared ${LDFLAGS}"
8772 else
8773 LDSHARED="ld -Bshareable ${LDFLAGS}"
8774 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008775 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008776 if test "$GCC" = "yes"
8777 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008778 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008779 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008780 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008781 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008782 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008783 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008784 *) LDSHARED="ld";;
8785 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008786fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008787echo "$as_me:$LINENO: result: $LDSHARED" >&5
8788echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008789BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008790# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008791# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008792echo "$as_me:$LINENO: checking CCSHARED" >&5
8793echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008794if test -z "$CCSHARED"
8795then
Guido van Rossum07397971997-04-29 21:49:50 +00008796 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008797 SunOS*) if test "$GCC" = yes;
8798 then CCSHARED="-fPIC";
8799 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008800 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008801 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008802 else CCSHARED="+z";
8803 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008804 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008805 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008806 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008807 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008808 if test "$GCC" = "yes"
8809 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008810 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008811 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008812 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008813 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008814 IRIX*/6*) case $CC in
8815 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008816 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008817 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008818 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008819 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008820 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008821fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008822echo "$as_me:$LINENO: result: $CCSHARED" >&5
8823echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008824# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008825# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008826echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8827echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008828if test -z "$LINKFORSHARED"
8829then
Guido van Rossum07397971997-04-29 21:49:50 +00008830 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008831 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008832 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008833 LINKFORSHARED="-Wl,-E -Wl,+s";;
8834# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008835 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008836 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008837 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008839 # -u __dummy makes the linker aware of the objc runtime
8840 # in System.framework; otherwise, __objcInit (referenced in
8841 # crt1.o) gets erroneously defined as common, which breaks dynamic
8842 # loading of any modules which reference it in System.framework.
8843 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8844 # not used by the core itself but which needs to be in the core so
8845 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008846 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008847 if test "$enable_framework"
8848 then
8849 LINKFORSHARED="$LINKFORSHARED -framework Python"
8850 fi
8851 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008852 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008853 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008854 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008855 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008856 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8857 then
8858 LINKFORSHARED="-Wl,--export-dynamic"
8859 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008860 SunOS/5*) case $CC in
8861 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008862 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008863 then
8864 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008865 fi;;
8866 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008867 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008868fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008869echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8870echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008871
Michael W. Hudson54241132001-12-07 15:38:26 +00008872
Martin v. Löwis11437992002-04-12 09:54:03 +00008873echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8874echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008875if test ! "$LIBRARY" = "$LDLIBRARY"
8876then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008877 case $ac_sys_system in
8878 CYGWIN*)
8879 # Cygwin needs CCSHARED when building extension DLLs
8880 # but not when building the interpreter DLL.
8881 CFLAGSFORSHARED='';;
8882 *)
8883 CFLAGSFORSHARED='$(CCSHARED)'
8884 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008885fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008886echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8887echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008888
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008889# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8890# library (with --enable-shared).
8891# For platforms on which shared libraries are not allowed to have unresolved
8892# symbols, this must be set to $(LIBS) (expanded by make).
8893
8894echo "$as_me:$LINENO: checking SHLIBS" >&5
8895echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
8896case "$ac_sys_system" in
8897 atheos*)
8898 SHLIBS='$(LIBS)';;
8899 *)
8900 SHLIBS='';;
8901esac
8902echo "$as_me:$LINENO: result: $SHLIBS" >&5
8903echo "${ECHO_T}$SHLIBS" >&6
8904
8905
Guido van Rossum627b2d71993-12-24 10:39:16 +00008906# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008907
8908echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8909echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8910if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008912else
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008914LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008915cat >conftest.$ac_ext <<_ACEOF
8916#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008917#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008918
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008919/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008920#ifdef __cplusplus
8921extern "C"
8922#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008923/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 builtin and then its argument prototype would still apply. */
8925char dlopen ();
8926#ifdef F77_DUMMY_MAIN
8927# ifdef __cplusplus
8928 extern "C"
8929# endif
8930 int F77_DUMMY_MAIN() { return 1; }
8931#endif
8932int
8933main ()
8934{
8935dlopen ();
8936 ;
8937 return 0;
8938}
8939_ACEOF
8940rm -f conftest.$ac_objext conftest$ac_exeext
8941if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8942 (eval $ac_link) 2>&5
8943 ac_status=$?
8944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8945 (exit $ac_status); } &&
8946 { ac_try='test -s conftest$ac_exeext'
8947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8948 (eval $ac_try) 2>&5
8949 ac_status=$?
8950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8951 (exit $ac_status); }; }; then
8952 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008953else
Martin v. Löwis11437992002-04-12 09:54:03 +00008954 echo "$as_me: failed program was:" >&5
8955cat conftest.$ac_ext >&5
8956ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008957fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008958rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8959LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008960fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008961echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8962echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8963if test $ac_cv_lib_dl_dlopen = yes; then
8964 cat >>confdefs.h <<_ACEOF
8965#define HAVE_LIBDL 1
8966_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008967
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008968 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008969
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008970fi
8971 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008972
8973echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8974echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8975if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8976 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008977else
Martin v. Löwis11437992002-04-12 09:54:03 +00008978 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008979LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008980cat >conftest.$ac_ext <<_ACEOF
8981#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008982#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008983
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008984/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008985#ifdef __cplusplus
8986extern "C"
8987#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008988/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 builtin and then its argument prototype would still apply. */
8990char shl_load ();
8991#ifdef F77_DUMMY_MAIN
8992# ifdef __cplusplus
8993 extern "C"
8994# endif
8995 int F77_DUMMY_MAIN() { return 1; }
8996#endif
8997int
8998main ()
8999{
9000shl_load ();
9001 ;
9002 return 0;
9003}
9004_ACEOF
9005rm -f conftest.$ac_objext conftest$ac_exeext
9006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9007 (eval $ac_link) 2>&5
9008 ac_status=$?
9009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9010 (exit $ac_status); } &&
9011 { ac_try='test -s conftest$ac_exeext'
9012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9013 (eval $ac_try) 2>&5
9014 ac_status=$?
9015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9016 (exit $ac_status); }; }; then
9017 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009018else
Martin v. Löwis11437992002-04-12 09:54:03 +00009019 echo "$as_me: failed program was:" >&5
9020cat conftest.$ac_ext >&5
9021ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009022fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009023rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9024LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009025fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009026echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9027echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9028if test $ac_cv_lib_dld_shl_load = yes; then
9029 cat >>confdefs.h <<_ACEOF
9030#define HAVE_LIBDLD 1
9031_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009032
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009033 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009035fi
9036 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009037
9038echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9039echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9040if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9041 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009042else
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009044LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009045cat >conftest.$ac_ext <<_ACEOF
9046#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009047#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009048
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009049/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009050#ifdef __cplusplus
9051extern "C"
9052#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009053/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 builtin and then its argument prototype would still apply. */
9055char sem_init ();
9056#ifdef F77_DUMMY_MAIN
9057# ifdef __cplusplus
9058 extern "C"
9059# endif
9060 int F77_DUMMY_MAIN() { return 1; }
9061#endif
9062int
9063main ()
9064{
9065sem_init ();
9066 ;
9067 return 0;
9068}
9069_ACEOF
9070rm -f conftest.$ac_objext conftest$ac_exeext
9071if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9072 (eval $ac_link) 2>&5
9073 ac_status=$?
9074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9075 (exit $ac_status); } &&
9076 { ac_try='test -s conftest$ac_exeext'
9077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9078 (eval $ac_try) 2>&5
9079 ac_status=$?
9080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9081 (exit $ac_status); }; }; then
9082 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009083else
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 echo "$as_me: failed program was:" >&5
9085cat conftest.$ac_ext >&5
9086ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009088rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9089LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009090fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009091echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9092echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9093if test $ac_cv_lib_rt_sem_init = yes; then
9094 cat >>confdefs.h <<_ACEOF
9095#define HAVE_LIBRT 1
9096_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009097
9098 LIBS="-lrt $LIBS"
9099
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009100fi
9101 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009102
9103# checks for system dependent C++ extensions support
9104case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009105 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9106echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9107 cat >conftest.$ac_ext <<_ACEOF
9108#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009109#include "confdefs.h"
9110#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009111#ifdef F77_DUMMY_MAIN
9112# ifdef __cplusplus
9113 extern "C"
9114# endif
9115 int F77_DUMMY_MAIN() { return 1; }
9116#endif
9117int
9118main ()
9119{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009120loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 ;
9122 return 0;
9123}
9124_ACEOF
9125rm -f conftest.$ac_objext conftest$ac_exeext
9126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9127 (eval $ac_link) 2>&5
9128 ac_status=$?
9129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9130 (exit $ac_status); } &&
9131 { ac_try='test -s conftest$ac_exeext'
9132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9133 (eval $ac_try) 2>&5
9134 ac_status=$?
9135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9136 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009137
Martin v. Löwis11437992002-04-12 09:54:03 +00009138cat >>confdefs.h <<\_ACEOF
9139#define AIX_GENUINE_CPLUSPLUS 1
9140_ACEOF
9141
9142 echo "$as_me:$LINENO: result: yes" >&5
9143echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009144else
Martin v. Löwis11437992002-04-12 09:54:03 +00009145 echo "$as_me: failed program was:" >&5
9146cat conftest.$ac_ext >&5
9147echo "$as_me:$LINENO: result: no" >&5
9148echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009149fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009150rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009151 *) ;;
9152esac
9153
Guido van Rossum70c7f481998-03-26 18:44:10 +00009154# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9155# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009156# BeOS' sockets are stashed in libnet.
9157case "$ac_sys_system" in
9158IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009159*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009160echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9161echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9162if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9163 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009164else
Martin v. Löwis11437992002-04-12 09:54:03 +00009165 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009166LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009167cat >conftest.$ac_ext <<_ACEOF
9168#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009169#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009170
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009171/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009172#ifdef __cplusplus
9173extern "C"
9174#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009175/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 builtin and then its argument prototype would still apply. */
9177char t_open ();
9178#ifdef F77_DUMMY_MAIN
9179# ifdef __cplusplus
9180 extern "C"
9181# endif
9182 int F77_DUMMY_MAIN() { return 1; }
9183#endif
9184int
9185main ()
9186{
9187t_open ();
9188 ;
9189 return 0;
9190}
9191_ACEOF
9192rm -f conftest.$ac_objext conftest$ac_exeext
9193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9194 (eval $ac_link) 2>&5
9195 ac_status=$?
9196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9197 (exit $ac_status); } &&
9198 { ac_try='test -s conftest$ac_exeext'
9199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9200 (eval $ac_try) 2>&5
9201 ac_status=$?
9202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9203 (exit $ac_status); }; }; then
9204 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009205else
Martin v. Löwis11437992002-04-12 09:54:03 +00009206 echo "$as_me: failed program was:" >&5
9207cat conftest.$ac_ext >&5
9208ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009209fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009210rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9211LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009213echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9214echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9215if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009216 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009217fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009218 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009219echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9220echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9221if test "${ac_cv_lib_socket_socket+set}" = set; then
9222 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009223else
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009225LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009226cat >conftest.$ac_ext <<_ACEOF
9227#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009228#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009229
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009230/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009231#ifdef __cplusplus
9232extern "C"
9233#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009234/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 builtin and then its argument prototype would still apply. */
9236char socket ();
9237#ifdef F77_DUMMY_MAIN
9238# ifdef __cplusplus
9239 extern "C"
9240# endif
9241 int F77_DUMMY_MAIN() { return 1; }
9242#endif
9243int
9244main ()
9245{
9246socket ();
9247 ;
9248 return 0;
9249}
9250_ACEOF
9251rm -f conftest.$ac_objext conftest$ac_exeext
9252if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9253 (eval $ac_link) 2>&5
9254 ac_status=$?
9255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9256 (exit $ac_status); } &&
9257 { ac_try='test -s conftest$ac_exeext'
9258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9259 (eval $ac_try) 2>&5
9260 ac_status=$?
9261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9262 (exit $ac_status); }; }; then
9263 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009264else
Martin v. Löwis11437992002-04-12 09:54:03 +00009265 echo "$as_me: failed program was:" >&5
9266cat conftest.$ac_ext >&5
9267ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009268fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009269rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9270LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009271fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009272echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9273echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9274if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009275 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009276fi
9277 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009278;;
9279esac
9280case "$ac_sys_system" in
9281BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009282echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9283echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9284if test "${ac_cv_lib_net_socket+set}" = set; then
9285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009286else
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009288LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009289cat >conftest.$ac_ext <<_ACEOF
9290#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009291#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009292
Guido van Rossumad678af1998-10-02 14:42:15 +00009293/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009294#ifdef __cplusplus
9295extern "C"
9296#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009297/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009298 builtin and then its argument prototype would still apply. */
9299char socket ();
9300#ifdef F77_DUMMY_MAIN
9301# ifdef __cplusplus
9302 extern "C"
9303# endif
9304 int F77_DUMMY_MAIN() { return 1; }
9305#endif
9306int
9307main ()
9308{
9309socket ();
9310 ;
9311 return 0;
9312}
9313_ACEOF
9314rm -f conftest.$ac_objext conftest$ac_exeext
9315if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9316 (eval $ac_link) 2>&5
9317 ac_status=$?
9318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9319 (exit $ac_status); } &&
9320 { ac_try='test -s conftest$ac_exeext'
9321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9322 (eval $ac_try) 2>&5
9323 ac_status=$?
9324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9325 (exit $ac_status); }; }; then
9326 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009327else
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 echo "$as_me: failed program was:" >&5
9329cat conftest.$ac_ext >&5
9330ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009331fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009332rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9333LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009334fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009335echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9336echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9337if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009338 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009339fi
9340 # BeOS
9341;;
9342esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009343
Martin v. Löwis11437992002-04-12 09:54:03 +00009344echo "$as_me:$LINENO: checking for --with-libs" >&5
9345echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9346
Guido van Rossuma68acba1996-07-31 17:36:39 +00009347# Check whether --with-libs or --without-libs was given.
9348if test "${with_libs+set}" = set; then
9349 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009350
9351echo "$as_me:$LINENO: result: $withval" >&5
9352echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009353LIBS="$withval $LIBS"
9354
9355else
Martin v. Löwis11437992002-04-12 09:54:03 +00009356 echo "$as_me:$LINENO: result: no" >&5
9357echo "${ECHO_T}no" >&6
9358fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009359
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009360# Determine if signalmodule should be used.
9361
9362
Martin v. Löwis11437992002-04-12 09:54:03 +00009363echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9364echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9365
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009366# Check whether --with-signal-module or --without-signal-module was given.
9367if test "${with_signal_module+set}" = set; then
9368 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009369
Martin v. Löwis11437992002-04-12 09:54:03 +00009370fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009371
9372if test -z "$with_signal_module"
9373then with_signal_module="yes"
9374fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009375echo "$as_me:$LINENO: result: $with_signal_module" >&5
9376echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009377
9378if test "${with_signal_module}" = "yes"; then
9379 USE_SIGNAL_MODULE=""
9380 SIGNAL_OBJS=""
9381else
9382 USE_SIGNAL_MODULE="#"
9383 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9384fi
9385
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009386# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009387
Barry Warsawc0d24d82000-06-29 16:12:00 +00009388USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009389
Martin v. Löwis11437992002-04-12 09:54:03 +00009390echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9391echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9392
Guido van Rossumec2f0731997-01-22 20:54:01 +00009393
9394# Check whether --with-dec-threads or --without-dec-threads was given.
9395if test "${with_dec_threads+set}" = set; then
9396 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009397
9398echo "$as_me:$LINENO: result: $withval" >&5
9399echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009400LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009401if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009402 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009403fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009404else
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 echo "$as_me:$LINENO: result: no" >&5
9406echo "${ECHO_T}no" >&6
9407fi;
9408
9409# Templates for things AC_DEFINEd more than once.
9410# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009411
9412
Martin v. Löwis11437992002-04-12 09:54:03 +00009413
9414
9415
9416
9417
9418echo "$as_me:$LINENO: checking for --with-threads" >&5
9419echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9420
Guido van Rossumec2f0731997-01-22 20:54:01 +00009421# Check whether --with-threads or --without-threads was given.
9422if test "${with_threads+set}" = set; then
9423 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009424
Martin v. Löwis11437992002-04-12 09:54:03 +00009425fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009426
Barry Warsawc0d24d82000-06-29 16:12:00 +00009427# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009428
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009429# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009430if test "${with_thread+set}" = set; then
9431 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009432
Martin v. Löwis11437992002-04-12 09:54:03 +00009433with_threads=$with_thread
9434fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009435
9436if test -z "$with_threads"
9437then with_threads="yes"
9438fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009439echo "$as_me:$LINENO: result: $with_threads" >&5
9440echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009441
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009442
Barry Warsawc0d24d82000-06-29 16:12:00 +00009443if test "$with_threads" = "no"
9444then
9445 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009446elif test "$ac_cv_pthread_is_default" = yes
9447then
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009449#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009450_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009451
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009452 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009454#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009455_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009456
9457 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009459elif test "$ac_cv_kpthread" = "yes"
9460then
9461 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009463#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009464_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009465
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009466 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009467 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009468else
9469 if test ! -z "$with_threads" -a -d "$with_threads"
9470 then LDFLAGS="$LDFLAGS -L$with_threads"
9471 fi
9472 if test ! -z "$withval" -a -d "$withval"
9473 then LDFLAGS="$LDFLAGS -L$withval"
9474 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009475
9476 # According to the POSIX spec, a pthreads implementation must
9477 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9479echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9480 cat >conftest.$ac_ext <<_ACEOF
9481#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009482#include "confdefs.h"
9483#include <unistd.h>
9484 #ifdef _POSIX_THREADS
9485 yes
9486 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009487
9488_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009489if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9490 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009491 unistd_defines_pthreads=yes
9492else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009493 unistd_defines_pthreads=no
9494fi
9495rm -f conftest*
9496
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9498echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009499
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009501#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009502_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009503
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 if test "${ac_cv_header_cthreads_h+set}" = set; then
9505 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9506echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9507if test "${ac_cv_header_cthreads_h+set}" = set; then
9508 echo $ECHO_N "(cached) $ECHO_C" >&6
9509fi
9510echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9511echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009512else
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 # Is the header compilable?
9514echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9515echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9516cat >conftest.$ac_ext <<_ACEOF
9517#line $LINENO "configure"
9518#include "confdefs.h"
9519$ac_includes_default
9520#include <cthreads.h>
9521_ACEOF
9522rm -f conftest.$ac_objext
9523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9524 (eval $ac_compile) 2>&5
9525 ac_status=$?
9526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9527 (exit $ac_status); } &&
9528 { ac_try='test -s conftest.$ac_objext'
9529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9530 (eval $ac_try) 2>&5
9531 ac_status=$?
9532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9533 (exit $ac_status); }; }; then
9534 ac_header_compiler=yes
9535else
9536 echo "$as_me: failed program was:" >&5
9537cat conftest.$ac_ext >&5
9538ac_header_compiler=no
9539fi
9540rm -f conftest.$ac_objext conftest.$ac_ext
9541echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9542echo "${ECHO_T}$ac_header_compiler" >&6
9543
9544# Is the header present?
9545echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9546echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9547cat >conftest.$ac_ext <<_ACEOF
9548#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009549#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009550#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009551_ACEOF
9552if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9553 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9554 ac_status=$?
9555 egrep -v '^ *\+' conftest.er1 >conftest.err
9556 rm -f conftest.er1
9557 cat conftest.err >&5
9558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9559 (exit $ac_status); } >/dev/null; then
9560 if test -s conftest.err; then
9561 ac_cpp_err=$ac_c_preproc_warn_flag
9562 else
9563 ac_cpp_err=
9564 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009565else
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 ac_cpp_err=yes
9567fi
9568if test -z "$ac_cpp_err"; then
9569 ac_header_preproc=yes
9570else
9571 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009572 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009574fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009575rm -f conftest.err conftest.$ac_ext
9576echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9577echo "${ECHO_T}$ac_header_preproc" >&6
9578
9579# So? What about this header?
9580case $ac_header_compiler:$ac_header_preproc in
9581 yes:no )
9582 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9583echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9584 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9585echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9586 no:yes )
9587 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9588echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9589 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9590echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9591 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9592echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9593esac
9594echo "$as_me:$LINENO: checking for cthreads.h" >&5
9595echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9596if test "${ac_cv_header_cthreads_h+set}" = set; then
9597 echo $ECHO_N "(cached) $ECHO_C" >&6
9598else
9599 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009600fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009601echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9602echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9603
9604fi
9605if test $ac_cv_header_cthreads_h = yes; then
9606 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009607#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009608_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009609
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009611#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009612_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009613
Martin v. Löwis11437992002-04-12 09:54:03 +00009614
9615cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009616#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009617_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009618
9619 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009620 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009621else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009622
Martin v. Löwis11437992002-04-12 09:54:03 +00009623 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9624 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9625echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9626if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9627 echo $ECHO_N "(cached) $ECHO_C" >&6
9628fi
9629echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9630echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009631else
Martin v. Löwis11437992002-04-12 09:54:03 +00009632 # Is the header compilable?
9633echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9634echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9635cat >conftest.$ac_ext <<_ACEOF
9636#line $LINENO "configure"
9637#include "confdefs.h"
9638$ac_includes_default
9639#include <mach/cthreads.h>
9640_ACEOF
9641rm -f conftest.$ac_objext
9642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9643 (eval $ac_compile) 2>&5
9644 ac_status=$?
9645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9646 (exit $ac_status); } &&
9647 { ac_try='test -s conftest.$ac_objext'
9648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9649 (eval $ac_try) 2>&5
9650 ac_status=$?
9651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9652 (exit $ac_status); }; }; then
9653 ac_header_compiler=yes
9654else
9655 echo "$as_me: failed program was:" >&5
9656cat conftest.$ac_ext >&5
9657ac_header_compiler=no
9658fi
9659rm -f conftest.$ac_objext conftest.$ac_ext
9660echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9661echo "${ECHO_T}$ac_header_compiler" >&6
9662
9663# Is the header present?
9664echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9665echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9666cat >conftest.$ac_ext <<_ACEOF
9667#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009668#include "confdefs.h"
9669#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009670_ACEOF
9671if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9672 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9673 ac_status=$?
9674 egrep -v '^ *\+' conftest.er1 >conftest.err
9675 rm -f conftest.er1
9676 cat conftest.err >&5
9677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9678 (exit $ac_status); } >/dev/null; then
9679 if test -s conftest.err; then
9680 ac_cpp_err=$ac_c_preproc_warn_flag
9681 else
9682 ac_cpp_err=
9683 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009684else
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 ac_cpp_err=yes
9686fi
9687if test -z "$ac_cpp_err"; then
9688 ac_header_preproc=yes
9689else
9690 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009691 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009693fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009694rm -f conftest.err conftest.$ac_ext
9695echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9696echo "${ECHO_T}$ac_header_preproc" >&6
9697
9698# So? What about this header?
9699case $ac_header_compiler:$ac_header_preproc in
9700 yes:no )
9701 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9702echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9703 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9704echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9705 no:yes )
9706 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9707echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9708 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9709echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9710 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9711echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9712esac
9713echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9714echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9715if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9716 echo $ECHO_N "(cached) $ECHO_C" >&6
9717else
9718 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009719fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009720echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9721echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9722
9723fi
9724if test $ac_cv_header_mach_cthreads_h = yes; then
9725 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009726#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009727_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009728
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009730#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009731_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009732
Martin v. Löwis11437992002-04-12 09:54:03 +00009733
9734cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009735#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009736_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009737
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009738 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009739else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009740
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 echo "$as_me:$LINENO: checking for --with-pth" >&5
9742echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9743
9744# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009745if test "${with_pth+set}" = set; then
9746 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009747
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 echo "$as_me:$LINENO: result: $withval" >&5
9749echo "${ECHO_T}$withval" >&6
9750 cat >>confdefs.h <<\_ACEOF
9751#define WITH_THREAD 1
9752_ACEOF
9753
9754
9755cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009756#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009757_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009758
Martin v. Löwis130fb172001-07-19 11:00:41 +00009759 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009760 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009761else
Martin v. Löwis11437992002-04-12 09:54:03 +00009762
9763 echo "$as_me:$LINENO: result: no" >&5
9764echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009765
9766 # Just looking for pthread_create in libpthread is not enough:
9767 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9768 # So we really have to include pthread.h, and then link.
9769 _libs=$LIBS
9770 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009771 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9772echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9773 cat >conftest.$ac_ext <<_ACEOF
9774#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009775#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009776#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009777
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009778void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009779#ifdef F77_DUMMY_MAIN
9780# ifdef __cplusplus
9781 extern "C"
9782# endif
9783 int F77_DUMMY_MAIN() { return 1; }
9784#endif
9785int
9786main ()
9787{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009788
9789pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 ;
9791 return 0;
9792}
9793_ACEOF
9794rm -f conftest.$ac_objext conftest$ac_exeext
9795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9796 (eval $ac_link) 2>&5
9797 ac_status=$?
9798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9799 (exit $ac_status); } &&
9800 { ac_try='test -s conftest$ac_exeext'
9801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9802 (eval $ac_try) 2>&5
9803 ac_status=$?
9804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9805 (exit $ac_status); }; }; then
9806
9807 echo "$as_me:$LINENO: result: yes" >&5
9808echo "${ECHO_T}yes" >&6
9809 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009810#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009811_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009812
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009813 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009814 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009815else
Martin v. Löwis11437992002-04-12 09:54:03 +00009816 echo "$as_me: failed program was:" >&5
9817cat conftest.$ac_ext >&5
9818
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009819 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9821echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9822if test "${ac_cv_func_pthread_detach+set}" = set; then
9823 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009824else
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 cat >conftest.$ac_ext <<_ACEOF
9826#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009827#include "confdefs.h"
9828/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009829 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009830#include <assert.h>
9831/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009832#ifdef __cplusplus
9833extern "C"
9834#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009835/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 builtin and then its argument prototype would still apply. */
9837char pthread_detach ();
9838char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009839
Martin v. Löwis11437992002-04-12 09:54:03 +00009840#ifdef F77_DUMMY_MAIN
9841# ifdef __cplusplus
9842 extern "C"
9843# endif
9844 int F77_DUMMY_MAIN() { return 1; }
9845#endif
9846int
9847main ()
9848{
Guido van Rossumad678af1998-10-02 14:42:15 +00009849/* The GNU C library defines this for functions which it implements
9850 to always fail with ENOSYS. Some functions are actually named
9851 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009852#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009853choke me
9854#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009855f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009856#endif
9857
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 ;
9859 return 0;
9860}
9861_ACEOF
9862rm -f conftest.$ac_objext conftest$ac_exeext
9863if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9864 (eval $ac_link) 2>&5
9865 ac_status=$?
9866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9867 (exit $ac_status); } &&
9868 { ac_try='test -s conftest$ac_exeext'
9869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9870 (eval $ac_try) 2>&5
9871 ac_status=$?
9872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9873 (exit $ac_status); }; }; then
9874 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009875else
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 echo "$as_me: failed program was:" >&5
9877cat conftest.$ac_ext >&5
9878ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009879fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009880rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009882echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9883echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9884if test $ac_cv_func_pthread_detach = yes; then
9885 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009886#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009887_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009888
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009889 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009890 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009891else
Guido van Rossumad678af1998-10-02 14:42:15 +00009892
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009893 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9894 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9895echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9896if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9897 echo $ECHO_N "(cached) $ECHO_C" >&6
9898fi
9899echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9900echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9901else
9902 # Is the header compilable?
9903echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
9904echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
9905cat >conftest.$ac_ext <<_ACEOF
9906#line $LINENO "configure"
9907#include "confdefs.h"
9908$ac_includes_default
9909#include <atheos/threads.h>
9910_ACEOF
9911rm -f conftest.$ac_objext
9912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9913 (eval $ac_compile) 2>&5
9914 ac_status=$?
9915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9916 (exit $ac_status); } &&
9917 { ac_try='test -s conftest.$ac_objext'
9918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9919 (eval $ac_try) 2>&5
9920 ac_status=$?
9921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9922 (exit $ac_status); }; }; then
9923 ac_header_compiler=yes
9924else
9925 echo "$as_me: failed program was:" >&5
9926cat conftest.$ac_ext >&5
9927ac_header_compiler=no
9928fi
9929rm -f conftest.$ac_objext conftest.$ac_ext
9930echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9931echo "${ECHO_T}$ac_header_compiler" >&6
9932
9933# Is the header present?
9934echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
9935echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
9936cat >conftest.$ac_ext <<_ACEOF
9937#line $LINENO "configure"
9938#include "confdefs.h"
9939#include <atheos/threads.h>
9940_ACEOF
9941if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9942 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9943 ac_status=$?
9944 egrep -v '^ *\+' conftest.er1 >conftest.err
9945 rm -f conftest.er1
9946 cat conftest.err >&5
9947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9948 (exit $ac_status); } >/dev/null; then
9949 if test -s conftest.err; then
9950 ac_cpp_err=$ac_c_preproc_warn_flag
9951 else
9952 ac_cpp_err=
9953 fi
9954else
9955 ac_cpp_err=yes
9956fi
9957if test -z "$ac_cpp_err"; then
9958 ac_header_preproc=yes
9959else
9960 echo "$as_me: failed program was:" >&5
9961 cat conftest.$ac_ext >&5
9962 ac_header_preproc=no
9963fi
9964rm -f conftest.err conftest.$ac_ext
9965echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9966echo "${ECHO_T}$ac_header_preproc" >&6
9967
9968# So? What about this header?
9969case $ac_header_compiler:$ac_header_preproc in
9970 yes:no )
9971 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9972echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9973 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9974echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9975 no:yes )
9976 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
9977echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
9978 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
9979echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
9980 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9981echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9982esac
9983echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9984echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9985if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9986 echo $ECHO_N "(cached) $ECHO_C" >&6
9987else
9988 ac_cv_header_atheos_threads_h=$ac_header_preproc
9989fi
9990echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9991echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9992
9993fi
9994if test $ac_cv_header_atheos_threads_h = yes; then
9995 cat >>confdefs.h <<\_ACEOF
9996#define WITH_THREAD 1
9997_ACEOF
9998
9999
10000cat >>confdefs.h <<\_ACEOF
10001#define ATHEOS_THREADS 1
10002_ACEOF
10003
10004 THREADOBJ="Python/thread.o"
10005else
10006
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10008 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10009echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10010if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10011 echo $ECHO_N "(cached) $ECHO_C" >&6
10012fi
10013echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10014echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010015else
Martin v. Löwis11437992002-04-12 09:54:03 +000010016 # Is the header compilable?
10017echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10018echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10019cat >conftest.$ac_ext <<_ACEOF
10020#line $LINENO "configure"
10021#include "confdefs.h"
10022$ac_includes_default
10023#include <kernel/OS.h>
10024_ACEOF
10025rm -f conftest.$ac_objext
10026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10027 (eval $ac_compile) 2>&5
10028 ac_status=$?
10029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10030 (exit $ac_status); } &&
10031 { ac_try='test -s conftest.$ac_objext'
10032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10033 (eval $ac_try) 2>&5
10034 ac_status=$?
10035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10036 (exit $ac_status); }; }; then
10037 ac_header_compiler=yes
10038else
10039 echo "$as_me: failed program was:" >&5
10040cat conftest.$ac_ext >&5
10041ac_header_compiler=no
10042fi
10043rm -f conftest.$ac_objext conftest.$ac_ext
10044echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10045echo "${ECHO_T}$ac_header_compiler" >&6
10046
10047# Is the header present?
10048echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10049echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10050cat >conftest.$ac_ext <<_ACEOF
10051#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010052#include "confdefs.h"
10053#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010054_ACEOF
10055if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10056 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10057 ac_status=$?
10058 egrep -v '^ *\+' conftest.er1 >conftest.err
10059 rm -f conftest.er1
10060 cat conftest.err >&5
10061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10062 (exit $ac_status); } >/dev/null; then
10063 if test -s conftest.err; then
10064 ac_cpp_err=$ac_c_preproc_warn_flag
10065 else
10066 ac_cpp_err=
10067 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010068else
Martin v. Löwis11437992002-04-12 09:54:03 +000010069 ac_cpp_err=yes
10070fi
10071if test -z "$ac_cpp_err"; then
10072 ac_header_preproc=yes
10073else
10074 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010075 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010077fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010078rm -f conftest.err conftest.$ac_ext
10079echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10080echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010081
Martin v. Löwis11437992002-04-12 09:54:03 +000010082# So? What about this header?
10083case $ac_header_compiler:$ac_header_preproc in
10084 yes:no )
10085 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10086echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10087 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10088echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10089 no:yes )
10090 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10091echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10092 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10093echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10094 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10095echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10096esac
10097echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10098echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10099if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10100 echo $ECHO_N "(cached) $ECHO_C" >&6
10101else
10102 ac_cv_header_kernel_OS_h=$ac_header_preproc
10103fi
10104echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10105echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10106
10107fi
10108if test $ac_cv_header_kernel_OS_h = yes; then
10109 cat >>confdefs.h <<\_ACEOF
10110#define WITH_THREAD 1
10111_ACEOF
10112
10113
10114cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010115#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010116_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010117
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010118 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010119else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010120
Martin v. Löwis11437992002-04-12 09:54:03 +000010121 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10122echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10123if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10124 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010125else
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010127LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010128cat >conftest.$ac_ext <<_ACEOF
10129#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010130#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010131
Greg Steinadf63d62000-07-05 10:38:09 +000010132/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010133#ifdef __cplusplus
10134extern "C"
10135#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010136/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010137 builtin and then its argument prototype would still apply. */
10138char pthread_create ();
10139#ifdef F77_DUMMY_MAIN
10140# ifdef __cplusplus
10141 extern "C"
10142# endif
10143 int F77_DUMMY_MAIN() { return 1; }
10144#endif
10145int
10146main ()
10147{
10148pthread_create ();
10149 ;
10150 return 0;
10151}
10152_ACEOF
10153rm -f conftest.$ac_objext conftest$ac_exeext
10154if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10155 (eval $ac_link) 2>&5
10156 ac_status=$?
10157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10158 (exit $ac_status); } &&
10159 { ac_try='test -s conftest$ac_exeext'
10160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10161 (eval $ac_try) 2>&5
10162 ac_status=$?
10163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10164 (exit $ac_status); }; }; then
10165 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010166else
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 echo "$as_me: failed program was:" >&5
10168cat conftest.$ac_ext >&5
10169ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010170fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010171rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10172LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010174echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10175echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10176if test $ac_cv_lib_pthreads_pthread_create = yes; then
10177 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010178#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010179_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010180
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010181 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010182 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010183 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010184else
Greg Steinadf63d62000-07-05 10:38:09 +000010185
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10187echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10188if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10189 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010190else
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010192LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010193cat >conftest.$ac_ext <<_ACEOF
10194#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010195#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010196
Guido van Rossum49545951997-12-02 19:28:29 +000010197/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010198#ifdef __cplusplus
10199extern "C"
10200#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010201/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 builtin and then its argument prototype would still apply. */
10203char pthread_create ();
10204#ifdef F77_DUMMY_MAIN
10205# ifdef __cplusplus
10206 extern "C"
10207# endif
10208 int F77_DUMMY_MAIN() { return 1; }
10209#endif
10210int
10211main ()
10212{
10213pthread_create ();
10214 ;
10215 return 0;
10216}
10217_ACEOF
10218rm -f conftest.$ac_objext conftest$ac_exeext
10219if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10220 (eval $ac_link) 2>&5
10221 ac_status=$?
10222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10223 (exit $ac_status); } &&
10224 { ac_try='test -s conftest$ac_exeext'
10225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10226 (eval $ac_try) 2>&5
10227 ac_status=$?
10228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10229 (exit $ac_status); }; }; then
10230 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010231else
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 echo "$as_me: failed program was:" >&5
10233cat conftest.$ac_ext >&5
10234ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010235fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010236rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10237LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010238fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010239echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10240echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10241if test $ac_cv_lib_c_r_pthread_create = yes; then
10242 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010243#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010244_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010245
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010246 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010247 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010248 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010249else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010250
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10252echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10253if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10254 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010255else
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010257LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010258cat >conftest.$ac_ext <<_ACEOF
10259#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010260#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010261
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010262/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010263#ifdef __cplusplus
10264extern "C"
10265#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010266/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 builtin and then its argument prototype would still apply. */
10268char __d6_pthread_create ();
10269#ifdef F77_DUMMY_MAIN
10270# ifdef __cplusplus
10271 extern "C"
10272# endif
10273 int F77_DUMMY_MAIN() { return 1; }
10274#endif
10275int
10276main ()
10277{
10278__d6_pthread_create ();
10279 ;
10280 return 0;
10281}
10282_ACEOF
10283rm -f conftest.$ac_objext conftest$ac_exeext
10284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10285 (eval $ac_link) 2>&5
10286 ac_status=$?
10287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10288 (exit $ac_status); } &&
10289 { ac_try='test -s conftest$ac_exeext'
10290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10291 (eval $ac_try) 2>&5
10292 ac_status=$?
10293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10294 (exit $ac_status); }; }; then
10295 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010296else
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 echo "$as_me: failed program was:" >&5
10298cat conftest.$ac_ext >&5
10299ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010300fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010301rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10302LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010303fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010304echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10305echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10306if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10307 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010308#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010309_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010310
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010311 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010312 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010313 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010314else
Guido van Rossum49545951997-12-02 19:28:29 +000010315
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10317echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10318if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10319 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010320else
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010322LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010323cat >conftest.$ac_ext <<_ACEOF
10324#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010325#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010326
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010327/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010328#ifdef __cplusplus
10329extern "C"
10330#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010331/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 builtin and then its argument prototype would still apply. */
10333char __pthread_create_system ();
10334#ifdef F77_DUMMY_MAIN
10335# ifdef __cplusplus
10336 extern "C"
10337# endif
10338 int F77_DUMMY_MAIN() { return 1; }
10339#endif
10340int
10341main ()
10342{
10343__pthread_create_system ();
10344 ;
10345 return 0;
10346}
10347_ACEOF
10348rm -f conftest.$ac_objext conftest$ac_exeext
10349if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10350 (eval $ac_link) 2>&5
10351 ac_status=$?
10352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353 (exit $ac_status); } &&
10354 { ac_try='test -s conftest$ac_exeext'
10355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10356 (eval $ac_try) 2>&5
10357 ac_status=$?
10358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10359 (exit $ac_status); }; }; then
10360 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010361else
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 echo "$as_me: failed program was:" >&5
10363cat conftest.$ac_ext >&5
10364ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010366rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10367LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010369echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10370echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10371if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10372 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010373#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010374_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010375
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010376 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010377 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010378 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010379else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010380
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10382echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10383if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010385else
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010387LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010388cat >conftest.$ac_ext <<_ACEOF
10389#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010390#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010391
Guido van Rossumb93a8621998-05-07 13:27:32 +000010392/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010393#ifdef __cplusplus
10394extern "C"
10395#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010396/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 builtin and then its argument prototype would still apply. */
10398char pthread_create ();
10399#ifdef F77_DUMMY_MAIN
10400# ifdef __cplusplus
10401 extern "C"
10402# endif
10403 int F77_DUMMY_MAIN() { return 1; }
10404#endif
10405int
10406main ()
10407{
10408pthread_create ();
10409 ;
10410 return 0;
10411}
10412_ACEOF
10413rm -f conftest.$ac_objext conftest$ac_exeext
10414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10415 (eval $ac_link) 2>&5
10416 ac_status=$?
10417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10418 (exit $ac_status); } &&
10419 { ac_try='test -s conftest$ac_exeext'
10420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10421 (eval $ac_try) 2>&5
10422 ac_status=$?
10423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10424 (exit $ac_status); }; }; then
10425 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010426else
Martin v. Löwis11437992002-04-12 09:54:03 +000010427 echo "$as_me: failed program was:" >&5
10428cat conftest.$ac_ext >&5
10429ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010431rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10432LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010434echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10435echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10436if test $ac_cv_lib_cma_pthread_create = yes; then
10437 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010438#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010439_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010440
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010441 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010442 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010443 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010444else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010445
Martin v. Löwis130fb172001-07-19 11:00:41 +000010446 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010447fi
10448
Guido van Rossum627b2d71993-12-24 10:39:16 +000010449
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010450fi
10451
Guido van Rossum0be3e491997-05-22 20:33:33 +000010452fi
10453
Guido van Rossum49545951997-12-02 19:28:29 +000010454fi
10455
Guido van Rossumb93a8621998-05-07 13:27:32 +000010456fi
10457
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010458fi
10459
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010460
Michael W. Hudson54241132001-12-07 15:38:26 +000010461fi
10462
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010463
10464fi
10465
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010466fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010467rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10468fi;
10469fi
10470
10471
10472fi
10473
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010474
Michael W. Hudson54241132001-12-07 15:38:26 +000010475
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010476 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010477 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010478
10479cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010480#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010481_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010482
10483 fi
10484
Martin v. Löwis11437992002-04-12 09:54:03 +000010485 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10486echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10487 if test "${ac_cv_pthread_system_supported+set}" = set; then
10488 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010489else
10490 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010491 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010492else
Martin v. Löwis11437992002-04-12 09:54:03 +000010493 cat >conftest.$ac_ext <<_ACEOF
10494#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010495#include "confdefs.h"
10496#include <pthread.h>
10497 void *foo(void *parm) {
10498 return NULL;
10499 }
10500 main() {
10501 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010502 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010503 if (pthread_attr_init(&attr)) exit(-1);
10504 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010505 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010506 exit(0);
10507 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010508_ACEOF
10509rm -f conftest$ac_exeext
10510if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10511 (eval $ac_link) 2>&5
10512 ac_status=$?
10513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10514 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10516 (eval $ac_try) 2>&5
10517 ac_status=$?
10518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10519 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010520 ac_cv_pthread_system_supported=yes
10521else
Martin v. Löwis11437992002-04-12 09:54:03 +000010522 echo "$as_me: program exited with status $ac_status" >&5
10523echo "$as_me: failed program was:" >&5
10524cat conftest.$ac_ext >&5
10525( exit $ac_status )
10526ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010527fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010528rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010529fi
10530
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010531fi
10532
Martin v. Löwis11437992002-04-12 09:54:03 +000010533 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10534echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010535 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010536
10537cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010538#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010539_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010540
10541 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010542
10543for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010544do
Martin v. Löwis11437992002-04-12 09:54:03 +000010545as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10546echo "$as_me:$LINENO: checking for $ac_func" >&5
10547echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10548if eval "test \"\${$as_ac_var+set}\" = set"; then
10549 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010550else
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 cat >conftest.$ac_ext <<_ACEOF
10552#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010553#include "confdefs.h"
10554/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010555 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010556#include <assert.h>
10557/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010558#ifdef __cplusplus
10559extern "C"
10560#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010561/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010562 builtin and then its argument prototype would still apply. */
10563char $ac_func ();
10564char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010565
Martin v. Löwis11437992002-04-12 09:54:03 +000010566#ifdef F77_DUMMY_MAIN
10567# ifdef __cplusplus
10568 extern "C"
10569# endif
10570 int F77_DUMMY_MAIN() { return 1; }
10571#endif
10572int
10573main ()
10574{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010575/* The GNU C library defines this for functions which it implements
10576 to always fail with ENOSYS. Some functions are actually named
10577 something starting with __ and the normal name is an alias. */
10578#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10579choke me
10580#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010581f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010582#endif
10583
Martin v. Löwis11437992002-04-12 09:54:03 +000010584 ;
10585 return 0;
10586}
10587_ACEOF
10588rm -f conftest.$ac_objext conftest$ac_exeext
10589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10590 (eval $ac_link) 2>&5
10591 ac_status=$?
10592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10593 (exit $ac_status); } &&
10594 { ac_try='test -s conftest$ac_exeext'
10595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10596 (eval $ac_try) 2>&5
10597 ac_status=$?
10598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10599 (exit $ac_status); }; }; then
10600 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010601else
Martin v. Löwis11437992002-04-12 09:54:03 +000010602 echo "$as_me: failed program was:" >&5
10603cat conftest.$ac_ext >&5
10604eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010605fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010606rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010607fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010608echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10609echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10610if test `eval echo '${'$as_ac_var'}'` = yes; then
10611 cat >>confdefs.h <<_ACEOF
10612#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10613_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010614
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010615fi
10616done
10617
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010618 fi
10619
Martin v. Löwis11437992002-04-12 09:54:03 +000010620 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10621echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10622if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10623 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010624else
Martin v. Löwis11437992002-04-12 09:54:03 +000010625 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010626LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010627cat >conftest.$ac_ext <<_ACEOF
10628#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010629#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010630
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010631/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010632#ifdef __cplusplus
10633extern "C"
10634#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010635/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 builtin and then its argument prototype would still apply. */
10637char usconfig ();
10638#ifdef F77_DUMMY_MAIN
10639# ifdef __cplusplus
10640 extern "C"
10641# endif
10642 int F77_DUMMY_MAIN() { return 1; }
10643#endif
10644int
10645main ()
10646{
10647usconfig ();
10648 ;
10649 return 0;
10650}
10651_ACEOF
10652rm -f conftest.$ac_objext conftest$ac_exeext
10653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10654 (eval $ac_link) 2>&5
10655 ac_status=$?
10656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10657 (exit $ac_status); } &&
10658 { ac_try='test -s conftest$ac_exeext'
10659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10660 (eval $ac_try) 2>&5
10661 ac_status=$?
10662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10663 (exit $ac_status); }; }; then
10664 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010665else
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 echo "$as_me: failed program was:" >&5
10667cat conftest.$ac_ext >&5
10668ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010669fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010670rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10671LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010673echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10674echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10675if test $ac_cv_lib_mpc_usconfig = yes; then
10676 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010677#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010678_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010679
Martin v. Löwis130fb172001-07-19 11:00:41 +000010680 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010681 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010682 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010683fi
10684
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010685
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 if test $posix_threads != "yes"; then
10687 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10688echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10689if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10690 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010691else
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010693LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010694cat >conftest.$ac_ext <<_ACEOF
10695#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010696#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010697
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010698/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010699#ifdef __cplusplus
10700extern "C"
10701#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010702/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010703 builtin and then its argument prototype would still apply. */
10704char thr_create ();
10705#ifdef F77_DUMMY_MAIN
10706# ifdef __cplusplus
10707 extern "C"
10708# endif
10709 int F77_DUMMY_MAIN() { return 1; }
10710#endif
10711int
10712main ()
10713{
10714thr_create ();
10715 ;
10716 return 0;
10717}
10718_ACEOF
10719rm -f conftest.$ac_objext conftest$ac_exeext
10720if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10721 (eval $ac_link) 2>&5
10722 ac_status=$?
10723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10724 (exit $ac_status); } &&
10725 { ac_try='test -s conftest$ac_exeext'
10726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10727 (eval $ac_try) 2>&5
10728 ac_status=$?
10729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10730 (exit $ac_status); }; }; then
10731 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010732else
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 echo "$as_me: failed program was:" >&5
10734cat conftest.$ac_ext >&5
10735ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010736fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010737rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10738LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010740echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10741echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10742if test $ac_cv_lib_thread_thr_create = yes; then
10743 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010744#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010745_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010746
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010747 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010748 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010749 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010750fi
10751
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010752 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010753
Martin v. Löwis130fb172001-07-19 11:00:41 +000010754 if test "$USE_THREAD_MODULE" != "#"
10755 then
10756 # If the above checks didn't disable threads, (at least) OSF1
10757 # needs this '-threads' argument during linking.
10758 case $ac_sys_system in
10759 OSF1) LDLAST=-threads;;
10760 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010761 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010762fi
10763
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010765
10766
10767echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10768echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769# Check whether --enable-ipv6 or --disable-ipv6 was given.
10770if test "${enable_ipv6+set}" = set; then
10771 enableval="$enable_ipv6"
10772 case "$enableval" in
10773 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 echo "$as_me:$LINENO: result: no" >&5
10775echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010776 ipv6=no
10777 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 *) echo "$as_me:$LINENO: result: yes" >&5
10779echo "${ECHO_T}yes" >&6
10780 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010782_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783
10784 ipv6=yes
10785 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010786 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787else
Martin v. Löwis11437992002-04-12 09:54:03 +000010788
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010790 echo "$as_me:$LINENO: result: no" >&5
10791echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792 ipv6=no
10793
10794else
Martin v. Löwis11437992002-04-12 09:54:03 +000010795 cat >conftest.$ac_ext <<_ACEOF
10796#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797#include "confdefs.h"
10798 /* AF_INET6 available check */
10799#include <sys/types.h>
10800#include <sys/socket.h>
10801main()
10802{
10803 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10804 exit(1);
10805 else
10806 exit(0);
10807}
10808
Martin v. Löwis11437992002-04-12 09:54:03 +000010809_ACEOF
10810rm -f conftest$ac_exeext
10811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10812 (eval $ac_link) 2>&5
10813 ac_status=$?
10814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10815 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10817 (eval $ac_try) 2>&5
10818 ac_status=$?
10819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10820 (exit $ac_status); }; }; then
10821 echo "$as_me:$LINENO: result: yes" >&5
10822echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823 ipv6=yes
10824else
Martin v. Löwis11437992002-04-12 09:54:03 +000010825 echo "$as_me: program exited with status $ac_status" >&5
10826echo "$as_me: failed program was:" >&5
10827cat conftest.$ac_ext >&5
10828( exit $ac_status )
10829echo "$as_me:$LINENO: result: no" >&5
10830echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831 ipv6=no
10832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010833rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834fi
10835
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010836if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010837 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10838echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10839 cat >conftest.$ac_ext <<_ACEOF
10840#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010841#include "confdefs.h"
10842#include <sys/types.h>
10843#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010844#ifdef F77_DUMMY_MAIN
10845# ifdef __cplusplus
10846 extern "C"
10847# endif
10848 int F77_DUMMY_MAIN() { return 1; }
10849#endif
10850int
10851main ()
10852{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010853struct sockaddr_in6 x;
10854x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010855 ;
10856 return 0;
10857}
10858_ACEOF
10859rm -f conftest.$ac_objext
10860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10861 (eval $ac_compile) 2>&5
10862 ac_status=$?
10863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10864 (exit $ac_status); } &&
10865 { ac_try='test -s conftest.$ac_objext'
10866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10867 (eval $ac_try) 2>&5
10868 ac_status=$?
10869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10870 (exit $ac_status); }; }; then
10871 echo "$as_me:$LINENO: result: yes" >&5
10872echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010873 ipv6=yes
10874else
Martin v. Löwis11437992002-04-12 09:54:03 +000010875 echo "$as_me: failed program was:" >&5
10876cat conftest.$ac_ext >&5
10877echo "$as_me:$LINENO: result: no" >&5
10878echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010879 ipv6=no
10880fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010881rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010882fi
10883
10884if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010885 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010886#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010887_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010888
10889fi
10890
Martin v. Löwis11437992002-04-12 09:54:03 +000010891fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892
10893ipv6type=unknown
10894ipv6lib=none
10895ipv6trylibc=no
10896
10897if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010898 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10899echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010900 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10901 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010902 case $i in
10903 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010904 cat >conftest.$ac_ext <<_ACEOF
10905#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010906#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010907
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010908#include <netinet/in.h>
10909#ifdef IPV6_INRIA_VERSION
10910yes
10911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010912_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10914 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010915 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916fi
10917rm -f conftest*
10918
10919 ;;
10920 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010921 cat >conftest.$ac_ext <<_ACEOF
10922#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010924
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010925#include <netinet/in.h>
10926#ifdef __KAME__
10927yes
10928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010929_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10931 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010932 ipv6type=$i;
10933 ipv6lib=inet6
10934 ipv6libdir=/usr/local/v6/lib
10935 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010936fi
10937rm -f conftest*
10938
10939 ;;
10940 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 cat >conftest.$ac_ext <<_ACEOF
10942#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010943#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945#include <features.h>
10946#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10947yes
10948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010949_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10951 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010952 ipv6type=$i;
10953 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010954fi
10955rm -f conftest*
10956
10957 ;;
10958 linux-inet6)
10959 if test -d /usr/inet6; then
10960 ipv6type=$i
10961 ipv6lib=inet6
10962 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010963 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010964 fi
10965 ;;
10966 solaris)
10967 if test -f /etc/netconfig; then
10968 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10969 ipv6type=$i
10970 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010971 fi
10972 fi
10973 ;;
10974 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010975 cat >conftest.$ac_ext <<_ACEOF
10976#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010977#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010978
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010979#include <sys/param.h>
10980#ifdef _TOSHIBA_INET6
10981yes
10982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010983_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10985 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010986 ipv6type=$i;
10987 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010988 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010989fi
10990rm -f conftest*
10991
10992 ;;
10993 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010994 cat >conftest.$ac_ext <<_ACEOF
10995#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010996#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010998#include </usr/local/v6/include/sys/v6config.h>
10999#ifdef __V6D__
11000yes
11001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011002_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11004 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011005 ipv6type=$i;
11006 ipv6lib=v6;
11007 ipv6libdir=/usr/local/v6/lib;
11008 OPT="-I/usr/local/v6/include $OPT"
11009fi
11010rm -f conftest*
11011
11012 ;;
11013 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 cat >conftest.$ac_ext <<_ACEOF
11015#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011016#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011017
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011018#include <sys/param.h>
11019#ifdef _ZETA_MINAMI_INET6
11020yes
11021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011022_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11024 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011025 ipv6type=$i;
11026 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011027 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011028fi
11029rm -f conftest*
11030
11031 ;;
11032 esac
11033 if test "$ipv6type" != "unknown"; then
11034 break
11035 fi
11036 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011037 echo "$as_me:$LINENO: result: $ipv6type" >&5
11038echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011039fi
11040
11041if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11042 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11043 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11044 echo "using lib$ipv6lib"
11045 else
11046 if test $ipv6trylibc = "yes"; then
11047 echo "using libc"
11048 else
11049 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11050 echo "You need to fetch lib$ipv6lib.a from appropriate"
11051 echo 'ipv6 kit and compile beforehand.'
11052 exit 1
11053 fi
11054 fi
11055fi
11056
Jack Jansen7b8c7542002-04-14 20:12:41 +000011057# Check for universal newline support
11058echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
11059echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
11060
11061# Check whether --with-universal-newlines or --without-universal-newlines was given.
11062if test "${with_universal_newlines+set}" = set; then
11063 withval="$with_universal_newlines"
11064
11065fi;
11066
11067if test -z "$with_universal_newlines"
11068then with_universal_newlines="yes"
11069fi
11070if test "$with_universal_newlines" != "no"
11071then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011072
11073cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011074#define WITH_UNIVERSAL_NEWLINES 1
11075_ACEOF
11076
11077fi
11078echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11079echo "${ECHO_T}$with_universal_newlines" >&6
11080
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011081# Check for --with-doc-strings
11082echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11083echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11084
11085# Check whether --with-doc-strings or --without-doc-strings was given.
11086if test "${with_doc_strings+set}" = set; then
11087 withval="$with_doc_strings"
11088
11089fi;
11090
11091if test -z "$with_doc_strings"
11092then with_doc_strings="yes"
11093fi
11094if test "$with_doc_strings" != "no"
11095then
11096
11097cat >>confdefs.h <<\_ACEOF
11098#define WITH_DOC_STRINGS 1
11099_ACEOF
11100
11101fi
11102echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11103echo "${ECHO_T}$with_doc_strings" >&6
11104
Neil Schemenauera35c6882001-02-27 04:45:05 +000011105# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011106echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11107echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11108
Neil Schemenauera35c6882001-02-27 04:45:05 +000011109# Check whether --with-pymalloc or --without-pymalloc was given.
11110if test "${with_pymalloc+set}" = set; then
11111 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011112
Martin v. Löwis11437992002-04-12 09:54:03 +000011113fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011114
Neil Schemenauer16c22972002-03-22 15:34:49 +000011115if test -z "$with_pymalloc"
11116then with_pymalloc="yes"
11117fi
11118if test "$with_pymalloc" != "no"
11119then
Martin v. Löwis11437992002-04-12 09:54:03 +000011120
11121cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011122#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011123_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011124
11125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011126echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11127echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011128
Barry Warsawef82cd72000-06-30 16:21:01 +000011129# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011130echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11131echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11132
Barry Warsawef82cd72000-06-30 16:21:01 +000011133# Check whether --with-wctype-functions or --without-wctype-functions was given.
11134if test "${with_wctype_functions+set}" = set; then
11135 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011136
Barry Warsawef82cd72000-06-30 16:21:01 +000011137if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011138then
11139
11140cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011141#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011142_ACEOF
11143
11144 echo "$as_me:$LINENO: result: yes" >&5
11145echo "${ECHO_T}yes" >&6
11146else echo "$as_me:$LINENO: result: no" >&5
11147echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011148fi
11149else
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 echo "$as_me:$LINENO: result: no" >&5
11151echo "${ECHO_T}no" >&6
11152fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011153
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011154# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011155
Guido van Rossum98935bf2001-09-05 19:13:16 +000011156DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011157
Martin v. Löwis11437992002-04-12 09:54:03 +000011158echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11159echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11160
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011161# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011162if test "${with_sgi_dl+set}" = set; then
11163 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011164
11165echo "$as_me:$LINENO: result: $withval" >&5
11166echo "${ECHO_T}$withval" >&6
11167
11168cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011169#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011170_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011171
Guido van Rossume97ee181999-12-20 21:27:22 +000011172DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011173dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011174if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011175then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011176else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11177echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11178 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011179fi
11180DLINCLDIR=${dldir}
11181LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011182else
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 echo "$as_me:$LINENO: result: no" >&5
11184echo "${ECHO_T}no" >&6
11185fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011186
Martin v. Löwis11437992002-04-12 09:54:03 +000011187echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11188echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011189
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011190# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011191if test "${with_dl_dld+set}" = set; then
11192 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011193
11194echo "$as_me:$LINENO: result: $withval" >&5
11195echo "${ECHO_T}$withval" >&6
11196
11197cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011198#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011199_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011200
Guido van Rossume97ee181999-12-20 21:27:22 +000011201DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011202dldir=`echo "$withval" | sed 's/,.*//'`
11203dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011204if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011205then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011206else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11207echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11208 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011209fi
11210DLINCLDIR=${dldir}
11211LIBS="$LIBS -ldl -ldld"
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
Guido van Rossume97ee181999-12-20 21:27:22 +000011217# the dlopen() function means we might want to use dynload_shlib.o. some
11218# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011219
Thomas Wouters3a584202000-08-05 23:28:51 +000011220for ac_func in dlopen
11221do
Martin v. Löwis11437992002-04-12 09:54:03 +000011222as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11223echo "$as_me:$LINENO: checking for $ac_func" >&5
11224echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11225if eval "test \"\${$as_ac_var+set}\" = set"; then
11226 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011227else
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 cat >conftest.$ac_ext <<_ACEOF
11229#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011230#include "confdefs.h"
11231/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011233#include <assert.h>
11234/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011235#ifdef __cplusplus
11236extern "C"
11237#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011238/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011239 builtin and then its argument prototype would still apply. */
11240char $ac_func ();
11241char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011242
Martin v. Löwis11437992002-04-12 09:54:03 +000011243#ifdef F77_DUMMY_MAIN
11244# ifdef __cplusplus
11245 extern "C"
11246# endif
11247 int F77_DUMMY_MAIN() { return 1; }
11248#endif
11249int
11250main ()
11251{
Guido van Rossume97ee181999-12-20 21:27:22 +000011252/* The GNU C library defines this for functions which it implements
11253 to always fail with ENOSYS. Some functions are actually named
11254 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011255#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011256choke me
11257#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011258f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011259#endif
11260
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 ;
11262 return 0;
11263}
11264_ACEOF
11265rm -f conftest.$ac_objext conftest$ac_exeext
11266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11267 (eval $ac_link) 2>&5
11268 ac_status=$?
11269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11270 (exit $ac_status); } &&
11271 { ac_try='test -s conftest$ac_exeext'
11272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11273 (eval $ac_try) 2>&5
11274 ac_status=$?
11275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11276 (exit $ac_status); }; }; then
11277 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011278else
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 echo "$as_me: failed program was:" >&5
11280cat conftest.$ac_ext >&5
11281eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011283rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011284fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011285echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11286echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11287if test `eval echo '${'$as_ac_var'}'` = yes; then
11288 cat >>confdefs.h <<_ACEOF
11289#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11290_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011291
Guido van Rossume97ee181999-12-20 21:27:22 +000011292fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011293done
Guido van Rossume97ee181999-12-20 21:27:22 +000011294
Michael W. Hudson54241132001-12-07 15:38:26 +000011295
Guido van Rossume97ee181999-12-20 21:27:22 +000011296# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11297# loading of modules.
11298
Martin v. Löwis11437992002-04-12 09:54:03 +000011299echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11300echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011301if test -z "$DYNLOADFILE"
11302then
11303 case $ac_sys_system/$ac_sys_release in
11304 AIX*) DYNLOADFILE="dynload_aix.o";;
11305 BeOS*) DYNLOADFILE="dynload_beos.o";;
11306 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011307 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011308 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011309 *)
11310 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11311 # out any dynamic loading
11312 if test "$ac_cv_func_dlopen" = yes
11313 then DYNLOADFILE="dynload_shlib.o"
11314 else DYNLOADFILE="dynload_stub.o"
11315 fi
11316 ;;
11317 esac
11318fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011319echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11320echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011321if test "$DYNLOADFILE" != "dynload_stub.o"
11322then
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
11324cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011325#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011326_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011327
11328fi
11329
Neil Schemenauer4e425612001-06-19 15:44:15 +000011330# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11331
Michael W. Hudson54241132001-12-07 15:38:26 +000011332
Martin v. Löwis11437992002-04-12 09:54:03 +000011333echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11334echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011335if test -z "$MACHDEP_OBJS"
11336then
Jack Jansene578a632001-08-15 01:27:14 +000011337 MACHDEP_OBJS=$extra_machdep_objs
11338else
11339 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011340fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011341echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11342echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011343
Guido van Rossum627b2d71993-12-24 10:39:16 +000011344# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011418
Fred Drake6b3cc522002-04-15 19:20:27 +000011419
Jack Jansen0b06be72002-06-21 14:48:38 +000011420
Martin v. Löwis244edc82001-10-04 22:44:26 +000011421for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011422 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011423 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011424 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011425 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011426 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011427 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011428 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011429 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011430 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011431 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011432do
Martin v. Löwis11437992002-04-12 09:54:03 +000011433as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11434echo "$as_me:$LINENO: checking for $ac_func" >&5
11435echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11436if eval "test \"\${$as_ac_var+set}\" = set"; then
11437 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011438else
Martin v. Löwis11437992002-04-12 09:54:03 +000011439 cat >conftest.$ac_ext <<_ACEOF
11440#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011441#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011442/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011444#include <assert.h>
11445/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011446#ifdef __cplusplus
11447extern "C"
11448#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011449/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 builtin and then its argument prototype would still apply. */
11451char $ac_func ();
11452char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011453
Martin v. Löwis11437992002-04-12 09:54:03 +000011454#ifdef F77_DUMMY_MAIN
11455# ifdef __cplusplus
11456 extern "C"
11457# endif
11458 int F77_DUMMY_MAIN() { return 1; }
11459#endif
11460int
11461main ()
11462{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011463/* The GNU C library defines this for functions which it implements
11464 to always fail with ENOSYS. Some functions are actually named
11465 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011466#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011467choke me
11468#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011469f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011470#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011471
Martin v. Löwis11437992002-04-12 09:54:03 +000011472 ;
11473 return 0;
11474}
11475_ACEOF
11476rm -f conftest.$ac_objext conftest$ac_exeext
11477if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11478 (eval $ac_link) 2>&5
11479 ac_status=$?
11480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11481 (exit $ac_status); } &&
11482 { ac_try='test -s conftest$ac_exeext'
11483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11484 (eval $ac_try) 2>&5
11485 ac_status=$?
11486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11487 (exit $ac_status); }; }; then
11488 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011489else
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 echo "$as_me: failed program was:" >&5
11491cat conftest.$ac_ext >&5
11492eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011493fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011494rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011495fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011496echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11497echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11498if test `eval echo '${'$as_ac_var'}'` = yes; then
11499 cat >>confdefs.h <<_ACEOF
11500#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11501_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011502
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011503fi
11504done
11505
Michael W. Hudson54241132001-12-07 15:38:26 +000011506
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011507# check for openpty and forkpty
11508
Martin v. Löwis11437992002-04-12 09:54:03 +000011509
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011510for ac_func in openpty
11511do
Martin v. Löwis11437992002-04-12 09:54:03 +000011512as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11513echo "$as_me:$LINENO: checking for $ac_func" >&5
11514echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11515if eval "test \"\${$as_ac_var+set}\" = set"; then
11516 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011517else
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 cat >conftest.$ac_ext <<_ACEOF
11519#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011520#include "confdefs.h"
11521/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011523#include <assert.h>
11524/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011525#ifdef __cplusplus
11526extern "C"
11527#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011528/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011529 builtin and then its argument prototype would still apply. */
11530char $ac_func ();
11531char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011532
Martin v. Löwis11437992002-04-12 09:54:03 +000011533#ifdef F77_DUMMY_MAIN
11534# ifdef __cplusplus
11535 extern "C"
11536# endif
11537 int F77_DUMMY_MAIN() { return 1; }
11538#endif
11539int
11540main ()
11541{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011542/* The GNU C library defines this for functions which it implements
11543 to always fail with ENOSYS. Some functions are actually named
11544 something starting with __ and the normal name is an alias. */
11545#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11546choke me
11547#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011548f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011549#endif
11550
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 ;
11552 return 0;
11553}
11554_ACEOF
11555rm -f conftest.$ac_objext conftest$ac_exeext
11556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11557 (eval $ac_link) 2>&5
11558 ac_status=$?
11559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11560 (exit $ac_status); } &&
11561 { ac_try='test -s conftest$ac_exeext'
11562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11563 (eval $ac_try) 2>&5
11564 ac_status=$?
11565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11566 (exit $ac_status); }; }; then
11567 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011568else
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 echo "$as_me: failed program was:" >&5
11570cat conftest.$ac_ext >&5
11571eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011572fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011573rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011574fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011575echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11576echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11577if test `eval echo '${'$as_ac_var'}'` = yes; then
11578 cat >>confdefs.h <<_ACEOF
11579#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11580_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011581
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011582else
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11584echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11585if test "${ac_cv_lib_util_openpty+set}" = set; then
11586 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011587else
Martin v. Löwis11437992002-04-12 09:54:03 +000011588 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011589LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011590cat >conftest.$ac_ext <<_ACEOF
11591#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011592#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011593
Fred Drake8cef4cf2000-06-28 16:40:38 +000011594/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011595#ifdef __cplusplus
11596extern "C"
11597#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011598/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 builtin and then its argument prototype would still apply. */
11600char openpty ();
11601#ifdef F77_DUMMY_MAIN
11602# ifdef __cplusplus
11603 extern "C"
11604# endif
11605 int F77_DUMMY_MAIN() { return 1; }
11606#endif
11607int
11608main ()
11609{
11610openpty ();
11611 ;
11612 return 0;
11613}
11614_ACEOF
11615rm -f conftest.$ac_objext conftest$ac_exeext
11616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11617 (eval $ac_link) 2>&5
11618 ac_status=$?
11619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11620 (exit $ac_status); } &&
11621 { ac_try='test -s conftest$ac_exeext'
11622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11623 (eval $ac_try) 2>&5
11624 ac_status=$?
11625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11626 (exit $ac_status); }; }; then
11627 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011628else
Martin v. Löwis11437992002-04-12 09:54:03 +000011629 echo "$as_me: failed program was:" >&5
11630cat conftest.$ac_ext >&5
11631ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011632fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011633rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11634LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011636echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11637echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11638if test $ac_cv_lib_util_openpty = yes; then
11639 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011640#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011641_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011642 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011643fi
11644
11645fi
11646done
11647
Martin v. Löwis11437992002-04-12 09:54:03 +000011648
Fred Drake8cef4cf2000-06-28 16:40:38 +000011649for ac_func in forkpty
11650do
Martin v. Löwis11437992002-04-12 09:54:03 +000011651as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11652echo "$as_me:$LINENO: checking for $ac_func" >&5
11653echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11654if eval "test \"\${$as_ac_var+set}\" = set"; then
11655 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011656else
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 cat >conftest.$ac_ext <<_ACEOF
11658#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011659#include "confdefs.h"
11660/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011661 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011662#include <assert.h>
11663/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011664#ifdef __cplusplus
11665extern "C"
11666#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011667/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011668 builtin and then its argument prototype would still apply. */
11669char $ac_func ();
11670char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011671
Martin v. Löwis11437992002-04-12 09:54:03 +000011672#ifdef F77_DUMMY_MAIN
11673# ifdef __cplusplus
11674 extern "C"
11675# endif
11676 int F77_DUMMY_MAIN() { return 1; }
11677#endif
11678int
11679main ()
11680{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011681/* The GNU C library defines this for functions which it implements
11682 to always fail with ENOSYS. Some functions are actually named
11683 something starting with __ and the normal name is an alias. */
11684#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11685choke me
11686#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011687f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011688#endif
11689
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 ;
11691 return 0;
11692}
11693_ACEOF
11694rm -f conftest.$ac_objext conftest$ac_exeext
11695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11696 (eval $ac_link) 2>&5
11697 ac_status=$?
11698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11699 (exit $ac_status); } &&
11700 { ac_try='test -s conftest$ac_exeext'
11701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11702 (eval $ac_try) 2>&5
11703 ac_status=$?
11704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11705 (exit $ac_status); }; }; then
11706 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011707else
Martin v. Löwis11437992002-04-12 09:54:03 +000011708 echo "$as_me: failed program was:" >&5
11709cat conftest.$ac_ext >&5
11710eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011711fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011712rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011714echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11715echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11716if test `eval echo '${'$as_ac_var'}'` = yes; then
11717 cat >>confdefs.h <<_ACEOF
11718#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11719_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011720
Fred Drake8cef4cf2000-06-28 16:40:38 +000011721else
Martin v. Löwis11437992002-04-12 09:54:03 +000011722 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11723echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11724if test "${ac_cv_lib_util_forkpty+set}" = set; then
11725 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011726else
Martin v. Löwis11437992002-04-12 09:54:03 +000011727 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011728LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011729cat >conftest.$ac_ext <<_ACEOF
11730#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011731#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011732
Fred Drake8cef4cf2000-06-28 16:40:38 +000011733/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011734#ifdef __cplusplus
11735extern "C"
11736#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011737/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 builtin and then its argument prototype would still apply. */
11739char forkpty ();
11740#ifdef F77_DUMMY_MAIN
11741# ifdef __cplusplus
11742 extern "C"
11743# endif
11744 int F77_DUMMY_MAIN() { return 1; }
11745#endif
11746int
11747main ()
11748{
11749forkpty ();
11750 ;
11751 return 0;
11752}
11753_ACEOF
11754rm -f conftest.$ac_objext conftest$ac_exeext
11755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11756 (eval $ac_link) 2>&5
11757 ac_status=$?
11758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11759 (exit $ac_status); } &&
11760 { ac_try='test -s conftest$ac_exeext'
11761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11762 (eval $ac_try) 2>&5
11763 ac_status=$?
11764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11765 (exit $ac_status); }; }; then
11766 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011767else
Martin v. Löwis11437992002-04-12 09:54:03 +000011768 echo "$as_me: failed program was:" >&5
11769cat conftest.$ac_ext >&5
11770ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011771fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011772rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11773LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011774fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011775echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11776echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11777if test $ac_cv_lib_util_forkpty = yes; then
11778 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011779#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011780_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011781 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011782fi
11783
11784fi
11785done
11786
Jack Jansendd19cf82001-12-06 22:36:17 +000011787
Michael W. Hudson54241132001-12-07 15:38:26 +000011788# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011789
11790
11791
11792
11793
11794
Fred Drake8cef4cf2000-06-28 16:40:38 +000011795for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11796do
Martin v. Löwis11437992002-04-12 09:54:03 +000011797as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11798echo "$as_me:$LINENO: checking for $ac_func" >&5
11799echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11800if eval "test \"\${$as_ac_var+set}\" = set"; then
11801 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011802else
Martin v. Löwis11437992002-04-12 09:54:03 +000011803 cat >conftest.$ac_ext <<_ACEOF
11804#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011805#include "confdefs.h"
11806/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011807 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011808#include <assert.h>
11809/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011810#ifdef __cplusplus
11811extern "C"
11812#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011813/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011814 builtin and then its argument prototype would still apply. */
11815char $ac_func ();
11816char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011817
Martin v. Löwis11437992002-04-12 09:54:03 +000011818#ifdef F77_DUMMY_MAIN
11819# ifdef __cplusplus
11820 extern "C"
11821# endif
11822 int F77_DUMMY_MAIN() { return 1; }
11823#endif
11824int
11825main ()
11826{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011827/* The GNU C library defines this for functions which it implements
11828 to always fail with ENOSYS. Some functions are actually named
11829 something starting with __ and the normal name is an alias. */
11830#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11831choke me
11832#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011833f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011834#endif
11835
Martin v. Löwis11437992002-04-12 09:54:03 +000011836 ;
11837 return 0;
11838}
11839_ACEOF
11840rm -f conftest.$ac_objext conftest$ac_exeext
11841if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11842 (eval $ac_link) 2>&5
11843 ac_status=$?
11844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11845 (exit $ac_status); } &&
11846 { ac_try='test -s conftest$ac_exeext'
11847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11848 (eval $ac_try) 2>&5
11849 ac_status=$?
11850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11851 (exit $ac_status); }; }; then
11852 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011853else
Martin v. Löwis11437992002-04-12 09:54:03 +000011854 echo "$as_me: failed program was:" >&5
11855cat conftest.$ac_ext >&5
11856eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011858rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011859fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011860echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11861echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11862if test `eval echo '${'$as_ac_var'}'` = yes; then
11863 cat >>confdefs.h <<_ACEOF
11864#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11865_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011866
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011867fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011868done
11869
Michael W. Hudson54241132001-12-07 15:38:26 +000011870
Martin v. Löwis11437992002-04-12 09:54:03 +000011871
11872
11873
11874
11875
Martin v. Löwis1142de32002-03-29 16:28:31 +000011876for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011877do
Martin v. Löwis11437992002-04-12 09:54:03 +000011878as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11879echo "$as_me:$LINENO: checking for $ac_func" >&5
11880echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11881if eval "test \"\${$as_ac_var+set}\" = set"; then
11882 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011883else
Martin v. Löwis11437992002-04-12 09:54:03 +000011884 cat >conftest.$ac_ext <<_ACEOF
11885#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011886#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011887/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011888 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011889#include <assert.h>
11890/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011891#ifdef __cplusplus
11892extern "C"
11893#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011894/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011895 builtin and then its argument prototype would still apply. */
11896char $ac_func ();
11897char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011898
Martin v. Löwis11437992002-04-12 09:54:03 +000011899#ifdef F77_DUMMY_MAIN
11900# ifdef __cplusplus
11901 extern "C"
11902# endif
11903 int F77_DUMMY_MAIN() { return 1; }
11904#endif
11905int
11906main ()
11907{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011908/* The GNU C library defines this for functions which it implements
11909 to always fail with ENOSYS. Some functions are actually named
11910 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011911#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011912choke me
11913#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011914f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011915#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011916
Martin v. Löwis11437992002-04-12 09:54:03 +000011917 ;
11918 return 0;
11919}
11920_ACEOF
11921rm -f conftest.$ac_objext conftest$ac_exeext
11922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11923 (eval $ac_link) 2>&5
11924 ac_status=$?
11925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11926 (exit $ac_status); } &&
11927 { ac_try='test -s conftest$ac_exeext'
11928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11929 (eval $ac_try) 2>&5
11930 ac_status=$?
11931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11932 (exit $ac_status); }; }; then
11933 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011934else
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 echo "$as_me: failed program was:" >&5
11936cat conftest.$ac_ext >&5
11937eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011938fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011939rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011940fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011941echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11942echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11943if test `eval echo '${'$as_ac_var'}'` = yes; then
11944 cat >>confdefs.h <<_ACEOF
11945#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11946_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011947
Martin v. Löwis1142de32002-03-29 16:28:31 +000011948else
Martin v. Löwis11437992002-04-12 09:54:03 +000011949 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011950fi
11951done
11952
11953
Martin v. Löwis11437992002-04-12 09:54:03 +000011954
Martin v. Löwis1142de32002-03-29 16:28:31 +000011955for ac_func in getpgrp
11956do
Martin v. Löwis11437992002-04-12 09:54:03 +000011957as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11958echo "$as_me:$LINENO: checking for $ac_func" >&5
11959echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11960if eval "test \"\${$as_ac_var+set}\" = set"; then
11961 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011962else
Martin v. Löwis11437992002-04-12 09:54:03 +000011963 cat >conftest.$ac_ext <<_ACEOF
11964#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011965#include "confdefs.h"
11966/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011968#include <assert.h>
11969/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011970#ifdef __cplusplus
11971extern "C"
11972#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011973/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011974 builtin and then its argument prototype would still apply. */
11975char $ac_func ();
11976char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011977
Martin v. Löwis11437992002-04-12 09:54:03 +000011978#ifdef F77_DUMMY_MAIN
11979# ifdef __cplusplus
11980 extern "C"
11981# endif
11982 int F77_DUMMY_MAIN() { return 1; }
11983#endif
11984int
11985main ()
11986{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011987/* The GNU C library defines this for functions which it implements
11988 to always fail with ENOSYS. Some functions are actually named
11989 something starting with __ and the normal name is an alias. */
11990#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11991choke me
11992#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011993f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000011994#endif
11995
Martin v. Löwis11437992002-04-12 09:54:03 +000011996 ;
11997 return 0;
11998}
11999_ACEOF
12000rm -f conftest.$ac_objext conftest$ac_exeext
12001if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12002 (eval $ac_link) 2>&5
12003 ac_status=$?
12004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12005 (exit $ac_status); } &&
12006 { ac_try='test -s conftest$ac_exeext'
12007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12008 (eval $ac_try) 2>&5
12009 ac_status=$?
12010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12011 (exit $ac_status); }; }; then
12012 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012013else
Martin v. Löwis11437992002-04-12 09:54:03 +000012014 echo "$as_me: failed program was:" >&5
12015cat conftest.$ac_ext >&5
12016eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012017fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012018rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012020echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12021echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12022if test `eval echo '${'$as_ac_var'}'` = yes; then
12023 cat >>confdefs.h <<_ACEOF
12024#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12025_ACEOF
12026 cat >conftest.$ac_ext <<_ACEOF
12027#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012028#include "confdefs.h"
12029#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012030#ifdef F77_DUMMY_MAIN
12031# ifdef __cplusplus
12032 extern "C"
12033# endif
12034 int F77_DUMMY_MAIN() { return 1; }
12035#endif
12036int
12037main ()
12038{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012039getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 ;
12041 return 0;
12042}
12043_ACEOF
12044rm -f conftest.$ac_objext
12045if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12046 (eval $ac_compile) 2>&5
12047 ac_status=$?
12048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12049 (exit $ac_status); } &&
12050 { ac_try='test -s conftest.$ac_objext'
12051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12052 (eval $ac_try) 2>&5
12053 ac_status=$?
12054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12055 (exit $ac_status); }; }; then
12056
12057cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012058#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012059_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012060
Martin v. Löwis11437992002-04-12 09:54:03 +000012061
Guido van Rossumf78abae1997-01-21 22:02:36 +000012062else
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 echo "$as_me: failed program was:" >&5
12064cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012065fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012066rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012067
Guido van Rossum627b2d71993-12-24 10:39:16 +000012068fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012069done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012070
Martin v. Löwis11437992002-04-12 09:54:03 +000012071
Thomas Wouters3a584202000-08-05 23:28:51 +000012072for ac_func in setpgrp
12073do
Martin v. Löwis11437992002-04-12 09:54:03 +000012074as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12075echo "$as_me:$LINENO: checking for $ac_func" >&5
12076echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12077if eval "test \"\${$as_ac_var+set}\" = set"; then
12078 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012079else
Martin v. Löwis11437992002-04-12 09:54:03 +000012080 cat >conftest.$ac_ext <<_ACEOF
12081#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012082#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012083/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012085#include <assert.h>
12086/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012087#ifdef __cplusplus
12088extern "C"
12089#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012090/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012091 builtin and then its argument prototype would still apply. */
12092char $ac_func ();
12093char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012094
Martin v. Löwis11437992002-04-12 09:54:03 +000012095#ifdef F77_DUMMY_MAIN
12096# ifdef __cplusplus
12097 extern "C"
12098# endif
12099 int F77_DUMMY_MAIN() { return 1; }
12100#endif
12101int
12102main ()
12103{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012104/* The GNU C library defines this for functions which it implements
12105 to always fail with ENOSYS. Some functions are actually named
12106 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012107#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012108choke me
12109#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012110f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012111#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012112
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 ;
12114 return 0;
12115}
12116_ACEOF
12117rm -f conftest.$ac_objext conftest$ac_exeext
12118if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12119 (eval $ac_link) 2>&5
12120 ac_status=$?
12121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12122 (exit $ac_status); } &&
12123 { ac_try='test -s conftest$ac_exeext'
12124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12125 (eval $ac_try) 2>&5
12126 ac_status=$?
12127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12128 (exit $ac_status); }; }; then
12129 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012130else
Martin v. Löwis11437992002-04-12 09:54:03 +000012131 echo "$as_me: failed program was:" >&5
12132cat conftest.$ac_ext >&5
12133eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012135rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012137echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12138echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12139if test `eval echo '${'$as_ac_var'}'` = yes; then
12140 cat >>confdefs.h <<_ACEOF
12141#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12142_ACEOF
12143 cat >conftest.$ac_ext <<_ACEOF
12144#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012145#include "confdefs.h"
12146#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012147#ifdef F77_DUMMY_MAIN
12148# ifdef __cplusplus
12149 extern "C"
12150# endif
12151 int F77_DUMMY_MAIN() { return 1; }
12152#endif
12153int
12154main ()
12155{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 ;
12158 return 0;
12159}
12160_ACEOF
12161rm -f conftest.$ac_objext
12162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12163 (eval $ac_compile) 2>&5
12164 ac_status=$?
12165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12166 (exit $ac_status); } &&
12167 { ac_try='test -s conftest.$ac_objext'
12168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12169 (eval $ac_try) 2>&5
12170 ac_status=$?
12171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12172 (exit $ac_status); }; }; then
12173
12174cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012175#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012176_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012177
Martin v. Löwis11437992002-04-12 09:54:03 +000012178
Guido van Rossumf78abae1997-01-21 22:02:36 +000012179else
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 echo "$as_me: failed program was:" >&5
12181cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012183rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012184
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012185fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012186done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012187
Martin v. Löwis11437992002-04-12 09:54:03 +000012188
Thomas Wouters3a584202000-08-05 23:28:51 +000012189for ac_func in gettimeofday
12190do
Martin v. Löwis11437992002-04-12 09:54:03 +000012191as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12192echo "$as_me:$LINENO: checking for $ac_func" >&5
12193echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12194if eval "test \"\${$as_ac_var+set}\" = set"; then
12195 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012196else
Martin v. Löwis11437992002-04-12 09:54:03 +000012197 cat >conftest.$ac_ext <<_ACEOF
12198#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012199#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012200/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012201 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012202#include <assert.h>
12203/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012204#ifdef __cplusplus
12205extern "C"
12206#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012207/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 builtin and then its argument prototype would still apply. */
12209char $ac_func ();
12210char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012211
Martin v. Löwis11437992002-04-12 09:54:03 +000012212#ifdef F77_DUMMY_MAIN
12213# ifdef __cplusplus
12214 extern "C"
12215# endif
12216 int F77_DUMMY_MAIN() { return 1; }
12217#endif
12218int
12219main ()
12220{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012221/* The GNU C library defines this for functions which it implements
12222 to always fail with ENOSYS. Some functions are actually named
12223 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012224#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012225choke me
12226#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012227f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012228#endif
12229
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 ;
12231 return 0;
12232}
12233_ACEOF
12234rm -f conftest.$ac_objext conftest$ac_exeext
12235if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12236 (eval $ac_link) 2>&5
12237 ac_status=$?
12238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12239 (exit $ac_status); } &&
12240 { ac_try='test -s conftest$ac_exeext'
12241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12242 (eval $ac_try) 2>&5
12243 ac_status=$?
12244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12245 (exit $ac_status); }; }; then
12246 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012247else
Martin v. Löwis11437992002-04-12 09:54:03 +000012248 echo "$as_me: failed program was:" >&5
12249cat conftest.$ac_ext >&5
12250eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012251fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012252rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012253fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012254echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12255echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12256if test `eval echo '${'$as_ac_var'}'` = yes; then
12257 cat >>confdefs.h <<_ACEOF
12258#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12259_ACEOF
12260 cat >conftest.$ac_ext <<_ACEOF
12261#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012262#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012263#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012264#ifdef F77_DUMMY_MAIN
12265# ifdef __cplusplus
12266 extern "C"
12267# endif
12268 int F77_DUMMY_MAIN() { return 1; }
12269#endif
12270int
12271main ()
12272{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012273gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 ;
12275 return 0;
12276}
12277_ACEOF
12278rm -f conftest.$ac_objext
12279if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12280 (eval $ac_compile) 2>&5
12281 ac_status=$?
12282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12283 (exit $ac_status); } &&
12284 { ac_try='test -s conftest.$ac_objext'
12285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12286 (eval $ac_try) 2>&5
12287 ac_status=$?
12288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12289 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012290 :
12291else
Martin v. Löwis11437992002-04-12 09:54:03 +000012292 echo "$as_me: failed program was:" >&5
12293cat conftest.$ac_ext >&5
12294
12295cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012296#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012297_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012298
Martin v. Löwis11437992002-04-12 09:54:03 +000012299
Guido van Rossum627b2d71993-12-24 10:39:16 +000012300fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012301rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012302
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012303fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012304done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012305
Michael W. Hudson54241132001-12-07 15:38:26 +000012306
12307
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012308# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012309# for [no]getaddrinfo in netdb.h.
12310echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12311echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12312cat >conftest.$ac_ext <<_ACEOF
12313#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012314#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012315
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012316#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012317#include <sys/socket.h>
12318#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012319#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012320
Martin v. Löwis11437992002-04-12 09:54:03 +000012321#ifdef F77_DUMMY_MAIN
12322# ifdef __cplusplus
12323 extern "C"
12324# endif
12325 int F77_DUMMY_MAIN() { return 1; }
12326#endif
12327int
12328main ()
12329{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012330
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012331getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012332
Martin v. Löwis11437992002-04-12 09:54:03 +000012333 ;
12334 return 0;
12335}
12336_ACEOF
12337rm -f conftest.$ac_objext conftest$ac_exeext
12338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12339 (eval $ac_link) 2>&5
12340 ac_status=$?
12341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12342 (exit $ac_status); } &&
12343 { ac_try='test -s conftest$ac_exeext'
12344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12345 (eval $ac_try) 2>&5
12346 ac_status=$?
12347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12348 (exit $ac_status); }; }; then
12349
12350echo "$as_me:$LINENO: result: yes" >&5
12351echo "${ECHO_T}yes" >&6
12352echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12353echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012354if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012355 echo "$as_me:$LINENO: result: buggy" >&5
12356echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012357buggygetaddrinfo=yes
12358else
Martin v. Löwis11437992002-04-12 09:54:03 +000012359 cat >conftest.$ac_ext <<_ACEOF
12360#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012361#include "confdefs.h"
12362
12363#include <sys/types.h>
12364#include <netdb.h>
12365#include <string.h>
12366#include <sys/socket.h>
12367#include <netinet/in.h>
12368
12369main()
12370{
12371 int passive, gaierr, inet4 = 0, inet6 = 0;
12372 struct addrinfo hints, *ai, *aitop;
12373 char straddr[INET6_ADDRSTRLEN], strport[16];
12374
12375 for (passive = 0; passive <= 1; passive++) {
12376 memset(&hints, 0, sizeof(hints));
12377 hints.ai_family = AF_UNSPEC;
12378 hints.ai_flags = passive ? AI_PASSIVE : 0;
12379 hints.ai_socktype = SOCK_STREAM;
12380 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12381 (void)gai_strerror(gaierr);
12382 goto bad;
12383 }
12384 for (ai = aitop; ai; ai = ai->ai_next) {
12385 if (ai->ai_addr == NULL ||
12386 ai->ai_addrlen == 0 ||
12387 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12388 straddr, sizeof(straddr), strport, sizeof(strport),
12389 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12390 goto bad;
12391 }
12392 switch (ai->ai_family) {
12393 case AF_INET:
12394 if (strcmp(strport, "54321") != 0) {
12395 goto bad;
12396 }
12397 if (passive) {
12398 if (strcmp(straddr, "0.0.0.0") != 0) {
12399 goto bad;
12400 }
12401 } else {
12402 if (strcmp(straddr, "127.0.0.1") != 0) {
12403 goto bad;
12404 }
12405 }
12406 inet4++;
12407 break;
12408 case AF_INET6:
12409 if (strcmp(strport, "54321") != 0) {
12410 goto bad;
12411 }
12412 if (passive) {
12413 if (strcmp(straddr, "::") != 0) {
12414 goto bad;
12415 }
12416 } else {
12417 if (strcmp(straddr, "::1") != 0) {
12418 goto bad;
12419 }
12420 }
12421 inet6++;
12422 break;
12423 case AF_UNSPEC:
12424 goto bad;
12425 break;
12426 default:
12427 /* another family support? */
12428 break;
12429 }
12430 }
12431 }
12432
12433 if (!(inet4 == 0 || inet4 == 2))
12434 goto bad;
12435 if (!(inet6 == 0 || inet6 == 2))
12436 goto bad;
12437
12438 if (aitop)
12439 freeaddrinfo(aitop);
12440 exit(0);
12441
12442 bad:
12443 if (aitop)
12444 freeaddrinfo(aitop);
12445 exit(1);
12446}
12447
Martin v. Löwis11437992002-04-12 09:54:03 +000012448_ACEOF
12449rm -f conftest$ac_exeext
12450if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12451 (eval $ac_link) 2>&5
12452 ac_status=$?
12453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12456 (eval $ac_try) 2>&5
12457 ac_status=$?
12458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12459 (exit $ac_status); }; }; then
12460 echo "$as_me:$LINENO: result: good" >&5
12461echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012462buggygetaddrinfo=no
12463else
Martin v. Löwis11437992002-04-12 09:54:03 +000012464 echo "$as_me: program exited with status $ac_status" >&5
12465echo "$as_me: failed program was:" >&5
12466cat conftest.$ac_ext >&5
12467( exit $ac_status )
12468echo "$as_me:$LINENO: result: buggy" >&5
12469echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012470buggygetaddrinfo=yes
12471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012472rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012473fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012474else
Martin v. Löwis11437992002-04-12 09:54:03 +000012475 echo "$as_me: failed program was:" >&5
12476cat conftest.$ac_ext >&5
12477
12478echo "$as_me:$LINENO: result: no" >&5
12479echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012480buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012481
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012482fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012483rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012484
12485if test "$buggygetaddrinfo" = "yes"; then
12486 if test "$ipv6" = "yes"; then
12487 echo 'Fatal: You must get working getaddrinfo() function.'
12488 echo ' or you can specify "--disable-ipv6"'.
12489 exit 1
12490 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012491else
Martin v. Löwis11437992002-04-12 09:54:03 +000012492
12493cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012494#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012495_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012496
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012497fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012498
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012499for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012500do
Martin v. Löwis11437992002-04-12 09:54:03 +000012501as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12502echo "$as_me:$LINENO: checking for $ac_func" >&5
12503echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12504if eval "test \"\${$as_ac_var+set}\" = set"; then
12505 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012506else
Martin v. Löwis11437992002-04-12 09:54:03 +000012507 cat >conftest.$ac_ext <<_ACEOF
12508#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012509#include "confdefs.h"
12510/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012511 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012512#include <assert.h>
12513/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012514#ifdef __cplusplus
12515extern "C"
12516#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012517/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012518 builtin and then its argument prototype would still apply. */
12519char $ac_func ();
12520char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012521
Martin v. Löwis11437992002-04-12 09:54:03 +000012522#ifdef F77_DUMMY_MAIN
12523# ifdef __cplusplus
12524 extern "C"
12525# endif
12526 int F77_DUMMY_MAIN() { return 1; }
12527#endif
12528int
12529main ()
12530{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012531/* The GNU C library defines this for functions which it implements
12532 to always fail with ENOSYS. Some functions are actually named
12533 something starting with __ and the normal name is an alias. */
12534#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12535choke me
12536#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012537f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012538#endif
12539
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 ;
12541 return 0;
12542}
12543_ACEOF
12544rm -f conftest.$ac_objext conftest$ac_exeext
12545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12546 (eval $ac_link) 2>&5
12547 ac_status=$?
12548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12549 (exit $ac_status); } &&
12550 { ac_try='test -s conftest$ac_exeext'
12551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12552 (eval $ac_try) 2>&5
12553 ac_status=$?
12554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12555 (exit $ac_status); }; }; then
12556 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012557else
Martin v. Löwis11437992002-04-12 09:54:03 +000012558 echo "$as_me: failed program was:" >&5
12559cat conftest.$ac_ext >&5
12560eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012561fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012562rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012564echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12565echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12566if test `eval echo '${'$as_ac_var'}'` = yes; then
12567 cat >>confdefs.h <<_ACEOF
12568#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12569_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012570
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012571fi
12572done
12573
Michael W. Hudson54241132001-12-07 15:38:26 +000012574
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012575# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012576echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12577echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12578if test "${ac_cv_header_time+set}" = set; then
12579 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012580else
Martin v. Löwis11437992002-04-12 09:54:03 +000012581 cat >conftest.$ac_ext <<_ACEOF
12582#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012583#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012584#include <sys/types.h>
12585#include <sys/time.h>
12586#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012587
12588#ifdef F77_DUMMY_MAIN
12589# ifdef __cplusplus
12590 extern "C"
12591# endif
12592 int F77_DUMMY_MAIN() { return 1; }
12593#endif
12594int
12595main ()
12596{
12597if ((struct tm *) 0)
12598return 0;
12599 ;
12600 return 0;
12601}
12602_ACEOF
12603rm -f conftest.$ac_objext
12604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12605 (eval $ac_compile) 2>&5
12606 ac_status=$?
12607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12608 (exit $ac_status); } &&
12609 { ac_try='test -s conftest.$ac_objext'
12610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12611 (eval $ac_try) 2>&5
12612 ac_status=$?
12613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12614 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012615 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012616else
Martin v. Löwis11437992002-04-12 09:54:03 +000012617 echo "$as_me: failed program was:" >&5
12618cat conftest.$ac_ext >&5
12619ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012620fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012621rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012622fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012623echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12624echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012625if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012626
12627cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012628#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012629_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012630
12631fi
12632
Martin v. Löwis11437992002-04-12 09:54:03 +000012633echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12634echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12635if test "${ac_cv_struct_tm+set}" = set; then
12636 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637else
Martin v. Löwis11437992002-04-12 09:54:03 +000012638 cat >conftest.$ac_ext <<_ACEOF
12639#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012640#include "confdefs.h"
12641#include <sys/types.h>
12642#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012643
12644#ifdef F77_DUMMY_MAIN
12645# ifdef __cplusplus
12646 extern "C"
12647# endif
12648 int F77_DUMMY_MAIN() { return 1; }
12649#endif
12650int
12651main ()
12652{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012653struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012654 ;
12655 return 0;
12656}
12657_ACEOF
12658rm -f conftest.$ac_objext
12659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12660 (eval $ac_compile) 2>&5
12661 ac_status=$?
12662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12663 (exit $ac_status); } &&
12664 { ac_try='test -s conftest.$ac_objext'
12665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12666 (eval $ac_try) 2>&5
12667 ac_status=$?
12668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12669 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012670 ac_cv_struct_tm=time.h
12671else
Martin v. Löwis11437992002-04-12 09:54:03 +000012672 echo "$as_me: failed program was:" >&5
12673cat conftest.$ac_ext >&5
12674ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012676rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012677fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012678echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12679echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012680if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012681
12682cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012683#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012684_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012685
12686fi
12687
Martin v. Löwis11437992002-04-12 09:54:03 +000012688echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12689echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12690if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12691 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012692else
Martin v. Löwis11437992002-04-12 09:54:03 +000012693 cat >conftest.$ac_ext <<_ACEOF
12694#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012695#include "confdefs.h"
12696#include <sys/types.h>
12697#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
12699
12700#ifdef F77_DUMMY_MAIN
12701# ifdef __cplusplus
12702 extern "C"
12703# endif
12704 int F77_DUMMY_MAIN() { return 1; }
12705#endif
12706int
12707main ()
12708{
12709static struct tm ac_aggr;
12710if (ac_aggr.tm_zone)
12711return 0;
12712 ;
12713 return 0;
12714}
12715_ACEOF
12716rm -f conftest.$ac_objext
12717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12718 (eval $ac_compile) 2>&5
12719 ac_status=$?
12720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12721 (exit $ac_status); } &&
12722 { ac_try='test -s conftest.$ac_objext'
12723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12724 (eval $ac_try) 2>&5
12725 ac_status=$?
12726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12727 (exit $ac_status); }; }; then
12728 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012729else
Martin v. Löwis11437992002-04-12 09:54:03 +000012730 echo "$as_me: failed program was:" >&5
12731cat conftest.$ac_ext >&5
12732ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012733fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012734rm -f conftest.$ac_objext conftest.$ac_ext
12735fi
12736echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12737echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12738if test $ac_cv_member_struct_tm_tm_zone = yes; then
12739
12740cat >>confdefs.h <<_ACEOF
12741#define HAVE_STRUCT_TM_TM_ZONE 1
12742_ACEOF
12743
12744
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012745fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012746
Martin v. Löwis11437992002-04-12 09:54:03 +000012747if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12748
12749cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012750#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012751_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012752
12753else
Martin v. Löwis11437992002-04-12 09:54:03 +000012754 echo "$as_me:$LINENO: checking for tzname" >&5
12755echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12756if test "${ac_cv_var_tzname+set}" = set; then
12757 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012758else
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 cat >conftest.$ac_ext <<_ACEOF
12760#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012761#include "confdefs.h"
12762#include <time.h>
12763#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012764extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012766
12767#ifdef F77_DUMMY_MAIN
12768# ifdef __cplusplus
12769 extern "C"
12770# endif
12771 int F77_DUMMY_MAIN() { return 1; }
12772#endif
12773int
12774main ()
12775{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012776atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012777 ;
12778 return 0;
12779}
12780_ACEOF
12781rm -f conftest.$ac_objext conftest$ac_exeext
12782if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12783 (eval $ac_link) 2>&5
12784 ac_status=$?
12785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12786 (exit $ac_status); } &&
12787 { ac_try='test -s conftest$ac_exeext'
12788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12789 (eval $ac_try) 2>&5
12790 ac_status=$?
12791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12792 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012793 ac_cv_var_tzname=yes
12794else
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 echo "$as_me: failed program was:" >&5
12796cat conftest.$ac_ext >&5
12797ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012798fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012799rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012800fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012801echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12802echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012803 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012804
12805cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012806#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012807_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012808
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012809 fi
12810fi
12811
Jack Jansendd19cf82001-12-06 22:36:17 +000012812
Martin v. Löwis11437992002-04-12 09:54:03 +000012813echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12814echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12815if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12816 echo $ECHO_N "(cached) $ECHO_C" >&6
12817else
12818 cat >conftest.$ac_ext <<_ACEOF
12819#line $LINENO "configure"
12820#include "confdefs.h"
12821$ac_includes_default
12822#ifdef F77_DUMMY_MAIN
12823# ifdef __cplusplus
12824 extern "C"
12825# endif
12826 int F77_DUMMY_MAIN() { return 1; }
12827#endif
12828int
12829main ()
12830{
12831static struct stat ac_aggr;
12832if (ac_aggr.st_rdev)
12833return 0;
12834 ;
12835 return 0;
12836}
12837_ACEOF
12838rm -f conftest.$ac_objext
12839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12840 (eval $ac_compile) 2>&5
12841 ac_status=$?
12842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12843 (exit $ac_status); } &&
12844 { ac_try='test -s conftest.$ac_objext'
12845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12846 (eval $ac_try) 2>&5
12847 ac_status=$?
12848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12849 (exit $ac_status); }; }; then
12850 ac_cv_member_struct_stat_st_rdev=yes
12851else
12852 echo "$as_me: failed program was:" >&5
12853cat conftest.$ac_ext >&5
12854ac_cv_member_struct_stat_st_rdev=no
12855fi
12856rm -f conftest.$ac_objext conftest.$ac_ext
12857fi
12858echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12859echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12860if test $ac_cv_member_struct_stat_st_rdev = yes; then
12861
12862cat >>confdefs.h <<_ACEOF
12863#define HAVE_STRUCT_STAT_ST_RDEV 1
12864_ACEOF
12865
12866
12867cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012868#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012869_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012870
12871fi
12872
Martin v. Löwis11437992002-04-12 09:54:03 +000012873
12874
12875echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12876echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12877if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12878 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012879else
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 cat >conftest.$ac_ext <<_ACEOF
12881#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012882#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012883$ac_includes_default
12884#ifdef F77_DUMMY_MAIN
12885# ifdef __cplusplus
12886 extern "C"
12887# endif
12888 int F77_DUMMY_MAIN() { return 1; }
12889#endif
12890int
12891main ()
12892{
12893static struct stat ac_aggr;
12894if (ac_aggr.st_blksize)
12895return 0;
12896 ;
12897 return 0;
12898}
12899_ACEOF
12900rm -f conftest.$ac_objext
12901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12902 (eval $ac_compile) 2>&5
12903 ac_status=$?
12904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12905 (exit $ac_status); } &&
12906 { ac_try='test -s conftest.$ac_objext'
12907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12908 (eval $ac_try) 2>&5
12909 ac_status=$?
12910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12911 (exit $ac_status); }; }; then
12912 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012913else
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 echo "$as_me: failed program was:" >&5
12915cat conftest.$ac_ext >&5
12916ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012917fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012918rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012919fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012920echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12921echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12922if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012923
Martin v. Löwis11437992002-04-12 09:54:03 +000012924cat >>confdefs.h <<_ACEOF
12925#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12926_ACEOF
12927
12928
12929cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012930#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012931_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012932
12933fi
12934
Martin v. Löwis11437992002-04-12 09:54:03 +000012935
12936echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12937echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12938if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12939 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012940else
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 cat >conftest.$ac_ext <<_ACEOF
12942#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012943#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012944$ac_includes_default
12945#ifdef F77_DUMMY_MAIN
12946# ifdef __cplusplus
12947 extern "C"
12948# endif
12949 int F77_DUMMY_MAIN() { return 1; }
12950#endif
12951int
12952main ()
12953{
12954static struct stat ac_aggr;
12955if (ac_aggr.st_blocks)
12956return 0;
12957 ;
12958 return 0;
12959}
12960_ACEOF
12961rm -f conftest.$ac_objext
12962if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12963 (eval $ac_compile) 2>&5
12964 ac_status=$?
12965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12966 (exit $ac_status); } &&
12967 { ac_try='test -s conftest.$ac_objext'
12968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12969 (eval $ac_try) 2>&5
12970 ac_status=$?
12971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12972 (exit $ac_status); }; }; then
12973 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012974else
Martin v. Löwis11437992002-04-12 09:54:03 +000012975 echo "$as_me: failed program was:" >&5
12976cat conftest.$ac_ext >&5
12977ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012978fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012979rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012981echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12982echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12983if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012984
Martin v. Löwis11437992002-04-12 09:54:03 +000012985cat >>confdefs.h <<_ACEOF
12986#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12987_ACEOF
12988
12989
12990cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012991#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012992_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012993
12994else
Martin v. Löwis11437992002-04-12 09:54:03 +000012995 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012996fi
12997
Michael W. Hudson54241132001-12-07 15:38:26 +000012998
Martin v. Löwis11437992002-04-12 09:54:03 +000012999
13000echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13001echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13002if test "${ac_cv_header_time_altzone+set}" = set; then
13003 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013004else
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 cat >conftest.$ac_ext <<_ACEOF
13006#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013007#include "confdefs.h"
13008#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013009#ifdef F77_DUMMY_MAIN
13010# ifdef __cplusplus
13011 extern "C"
13012# endif
13013 int F77_DUMMY_MAIN() { return 1; }
13014#endif
13015int
13016main ()
13017{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013018return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013019 ;
13020 return 0;
13021}
13022_ACEOF
13023rm -f conftest.$ac_objext
13024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13025 (eval $ac_compile) 2>&5
13026 ac_status=$?
13027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13028 (exit $ac_status); } &&
13029 { ac_try='test -s conftest.$ac_objext'
13030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13031 (eval $ac_try) 2>&5
13032 ac_status=$?
13033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13034 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013035 ac_cv_header_time_altzone=yes
13036else
Martin v. Löwis11437992002-04-12 09:54:03 +000013037 echo "$as_me: failed program was:" >&5
13038cat conftest.$ac_ext >&5
13039ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013041rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013042fi
13043
Martin v. Löwis11437992002-04-12 09:54:03 +000013044echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13045echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013046if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013047
13048cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013049#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013050_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013051
13052fi
13053
Guido van Rossumda88dad1995-01-26 00:46:29 +000013054was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013055echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13056echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13057cat >conftest.$ac_ext <<_ACEOF
13058#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013059#include "confdefs.h"
13060
13061#include <sys/types.h>
13062#include <sys/select.h>
13063#include <sys/time.h>
13064
Martin v. Löwis11437992002-04-12 09:54:03 +000013065#ifdef F77_DUMMY_MAIN
13066# ifdef __cplusplus
13067 extern "C"
13068# endif
13069 int F77_DUMMY_MAIN() { return 1; }
13070#endif
13071int
13072main ()
13073{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013074;
Martin v. Löwis11437992002-04-12 09:54:03 +000013075 ;
13076 return 0;
13077}
13078_ACEOF
13079rm -f conftest.$ac_objext
13080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13081 (eval $ac_compile) 2>&5
13082 ac_status=$?
13083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13084 (exit $ac_status); } &&
13085 { ac_try='test -s conftest.$ac_objext'
13086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13087 (eval $ac_try) 2>&5
13088 ac_status=$?
13089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13090 (exit $ac_status); }; }; then
13091
13092
13093cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013094#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013095_ACEOF
13096
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013097 was_it_defined=yes
13098
Guido van Rossumf78abae1997-01-21 22:02:36 +000013099else
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 echo "$as_me: failed program was:" >&5
13101cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013103rm -f conftest.$ac_objext conftest.$ac_ext
13104echo "$as_me:$LINENO: result: $was_it_defined" >&5
13105echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013106
Martin v. Löwis11437992002-04-12 09:54:03 +000013107echo "$as_me:$LINENO: checking for addrinfo" >&5
13108echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13109if test "${ac_cv_struct_addrinfo+set}" = set; then
13110 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013111else
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 cat >conftest.$ac_ext <<_ACEOF
13113#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013114#include "confdefs.h"
13115
13116# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013117#ifdef F77_DUMMY_MAIN
13118# ifdef __cplusplus
13119 extern "C"
13120# endif
13121 int F77_DUMMY_MAIN() { return 1; }
13122#endif
13123int
13124main ()
13125{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013126struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013127 ;
13128 return 0;
13129}
13130_ACEOF
13131rm -f conftest.$ac_objext
13132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13133 (eval $ac_compile) 2>&5
13134 ac_status=$?
13135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13136 (exit $ac_status); } &&
13137 { ac_try='test -s conftest.$ac_objext'
13138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13139 (eval $ac_try) 2>&5
13140 ac_status=$?
13141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13142 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013143 ac_cv_struct_addrinfo=yes
13144else
Martin v. Löwis11437992002-04-12 09:54:03 +000013145 echo "$as_me: failed program was:" >&5
13146cat conftest.$ac_ext >&5
13147ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013148fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013149rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013150fi
13151
Martin v. Löwis11437992002-04-12 09:54:03 +000013152echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13153echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013154if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013155
13156cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013157#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013158_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013159
13160fi
13161
Martin v. Löwis11437992002-04-12 09:54:03 +000013162echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13163echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13164if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13165 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013166else
Martin v. Löwis11437992002-04-12 09:54:03 +000013167 cat >conftest.$ac_ext <<_ACEOF
13168#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013169#include "confdefs.h"
13170
13171# include <sys/types.h>
13172# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013173#ifdef F77_DUMMY_MAIN
13174# ifdef __cplusplus
13175 extern "C"
13176# endif
13177 int F77_DUMMY_MAIN() { return 1; }
13178#endif
13179int
13180main ()
13181{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013182struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013183 ;
13184 return 0;
13185}
13186_ACEOF
13187rm -f conftest.$ac_objext
13188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13189 (eval $ac_compile) 2>&5
13190 ac_status=$?
13191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13192 (exit $ac_status); } &&
13193 { ac_try='test -s conftest.$ac_objext'
13194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13195 (eval $ac_try) 2>&5
13196 ac_status=$?
13197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13198 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013199 ac_cv_struct_sockaddr_storage=yes
13200else
Martin v. Löwis11437992002-04-12 09:54:03 +000013201 echo "$as_me: failed program was:" >&5
13202cat conftest.$ac_ext >&5
13203ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013204fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013205rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013206fi
13207
Martin v. Löwis11437992002-04-12 09:54:03 +000013208echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13209echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013210if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013211
13212cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013213#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013214_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013215
13216fi
13217
Guido van Rossum627b2d71993-12-24 10:39:16 +000013218# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013219
Michael W. Hudson54241132001-12-07 15:38:26 +000013220
Martin v. Löwis11437992002-04-12 09:54:03 +000013221echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13222echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13223if test "${ac_cv_c_char_unsigned+set}" = set; then
13224 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013225else
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 cat >conftest.$ac_ext <<_ACEOF
13227#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013228#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013229$ac_includes_default
13230#ifdef F77_DUMMY_MAIN
13231# ifdef __cplusplus
13232 extern "C"
13233# endif
13234 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013235#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013236int
13237main ()
13238{
13239static int test_array [1 - 2 * !(((char) -1) < 0)];
13240test_array [0] = 0
13241
13242 ;
13243 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013244}
Martin v. Löwis11437992002-04-12 09:54:03 +000013245_ACEOF
13246rm -f conftest.$ac_objext
13247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13248 (eval $ac_compile) 2>&5
13249 ac_status=$?
13250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13251 (exit $ac_status); } &&
13252 { ac_try='test -s conftest.$ac_objext'
13253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13254 (eval $ac_try) 2>&5
13255 ac_status=$?
13256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13257 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013258 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013259else
13260 echo "$as_me: failed program was:" >&5
13261cat conftest.$ac_ext >&5
13262ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013263fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013264rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013266echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13267echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013268if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013269 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013270#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013271_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013272
13273fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013274
Martin v. Löwis11437992002-04-12 09:54:03 +000013275echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13276echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13277if test "${ac_cv_prog_cc_stdc+set}" = set; then
13278 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013279else
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 ac_cv_prog_cc_stdc=no
13281ac_save_CC=$CC
13282cat >conftest.$ac_ext <<_ACEOF
13283#line $LINENO "configure"
13284#include "confdefs.h"
13285#include <stdarg.h>
13286#include <stdio.h>
13287#include <sys/types.h>
13288#include <sys/stat.h>
13289/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13290struct buf { int x; };
13291FILE * (*rcsopen) (struct buf *, struct stat *, int);
13292static char *e (p, i)
13293 char **p;
13294 int i;
13295{
13296 return p[i];
13297}
13298static char *f (char * (*g) (char **, int), char **p, ...)
13299{
13300 char *s;
13301 va_list v;
13302 va_start (v,p);
13303 s = g (p, va_arg (v,int));
13304 va_end (v);
13305 return s;
13306}
13307int test (int i, double x);
13308struct s1 {int (*f) (int a);};
13309struct s2 {int (*f) (double a);};
13310int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13311int argc;
13312char **argv;
13313#ifdef F77_DUMMY_MAIN
13314# ifdef __cplusplus
13315 extern "C"
13316# endif
13317 int F77_DUMMY_MAIN() { return 1; }
13318#endif
13319int
13320main ()
13321{
13322return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13323 ;
13324 return 0;
13325}
13326_ACEOF
13327# Don't try gcc -ansi; that turns off useful extensions and
13328# breaks some systems' header files.
13329# AIX -qlanglvl=ansi
13330# Ultrix and OSF/1 -std1
13331# HP-UX 10.20 and later -Ae
13332# HP-UX older versions -Aa -D_HPUX_SOURCE
13333# SVR4 -Xc -D__EXTENSIONS__
13334for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13335do
13336 CC="$ac_save_CC $ac_arg"
13337 rm -f conftest.$ac_objext
13338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13339 (eval $ac_compile) 2>&5
13340 ac_status=$?
13341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13342 (exit $ac_status); } &&
13343 { ac_try='test -s conftest.$ac_objext'
13344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13345 (eval $ac_try) 2>&5
13346 ac_status=$?
13347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13348 (exit $ac_status); }; }; then
13349 ac_cv_prog_cc_stdc=$ac_arg
13350break
13351else
13352 echo "$as_me: failed program was:" >&5
13353cat conftest.$ac_ext >&5
13354fi
13355rm -f conftest.$ac_objext
13356done
13357rm -f conftest.$ac_ext conftest.$ac_objext
13358CC=$ac_save_CC
13359
13360fi
13361
13362case "x$ac_cv_prog_cc_stdc" in
13363 x|xno)
13364 echo "$as_me:$LINENO: result: none needed" >&5
13365echo "${ECHO_T}none needed" >&6 ;;
13366 *)
13367 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13368echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13369 CC="$CC $ac_cv_prog_cc_stdc" ;;
13370esac
13371
13372echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13373echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13374if test "${ac_cv_c_const+set}" = set; then
13375 echo $ECHO_N "(cached) $ECHO_C" >&6
13376else
13377 cat >conftest.$ac_ext <<_ACEOF
13378#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013379#include "confdefs.h"
13380
Martin v. Löwis11437992002-04-12 09:54:03 +000013381#ifdef F77_DUMMY_MAIN
13382# ifdef __cplusplus
13383 extern "C"
13384# endif
13385 int F77_DUMMY_MAIN() { return 1; }
13386#endif
13387int
13388main ()
13389{
13390/* FIXME: Include the comments suggested by Paul. */
13391#ifndef __cplusplus
13392 /* Ultrix mips cc rejects this. */
13393 typedef int charset[2];
13394 const charset x;
13395 /* SunOS 4.1.1 cc rejects this. */
13396 char const *const *ccp;
13397 char **p;
13398 /* NEC SVR4.0.2 mips cc rejects this. */
13399 struct point {int x, y;};
13400 static struct point const zero = {0,0};
13401 /* AIX XL C 1.02.0.0 rejects this.
13402 It does not let you subtract one const X* pointer from another in
13403 an arm of an if-expression whose if-part is not a constant
13404 expression */
13405 const char *g = "string";
13406 ccp = &g + (g ? g-g : 0);
13407 /* HPUX 7.0 cc rejects these. */
13408 ++ccp;
13409 p = (char**) ccp;
13410 ccp = (char const *const *) p;
13411 { /* SCO 3.2v4 cc rejects this. */
13412 char *t;
13413 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013414
Martin v. Löwis11437992002-04-12 09:54:03 +000013415 *t++ = 0;
13416 }
13417 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13418 int x[] = {25, 17};
13419 const int *foo = &x[0];
13420 ++foo;
13421 }
13422 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13423 typedef const int *iptr;
13424 iptr p = 0;
13425 ++p;
13426 }
13427 { /* AIX XL C 1.02.0.0 rejects this saying
13428 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13429 struct s { int j; const int *ap[3]; };
13430 struct s *b; b->j = 5;
13431 }
13432 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13433 const int foo = 10;
13434 }
13435#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 ;
13438 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013439}
Martin v. Löwis11437992002-04-12 09:54:03 +000013440_ACEOF
13441rm -f conftest.$ac_objext
13442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13443 (eval $ac_compile) 2>&5
13444 ac_status=$?
13445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13446 (exit $ac_status); } &&
13447 { ac_try='test -s conftest.$ac_objext'
13448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13449 (eval $ac_try) 2>&5
13450 ac_status=$?
13451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13452 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013453 ac_cv_c_const=yes
13454else
Martin v. Löwis11437992002-04-12 09:54:03 +000013455 echo "$as_me: failed program was:" >&5
13456cat conftest.$ac_ext >&5
13457ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013458fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013459rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013460fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013461echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13462echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013463if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013464
13465cat >>confdefs.h <<\_ACEOF
13466#define const
13467_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013468
13469fi
13470
Michael W. Hudson54241132001-12-07 15:38:26 +000013471
Guido van Rossumda88dad1995-01-26 00:46:29 +000013472works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013473echo "$as_me:$LINENO: checking for working volatile" >&5
13474echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13475cat >conftest.$ac_ext <<_ACEOF
13476#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013477#include "confdefs.h"
13478
Martin v. Löwis11437992002-04-12 09:54:03 +000013479#ifdef F77_DUMMY_MAIN
13480# ifdef __cplusplus
13481 extern "C"
13482# endif
13483 int F77_DUMMY_MAIN() { return 1; }
13484#endif
13485int
13486main ()
13487{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013488volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013489 ;
13490 return 0;
13491}
13492_ACEOF
13493rm -f conftest.$ac_objext
13494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13495 (eval $ac_compile) 2>&5
13496 ac_status=$?
13497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13498 (exit $ac_status); } &&
13499 { ac_try='test -s conftest.$ac_objext'
13500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13501 (eval $ac_try) 2>&5
13502 ac_status=$?
13503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13504 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013505 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013506else
Martin v. Löwis11437992002-04-12 09:54:03 +000013507 echo "$as_me: failed program was:" >&5
13508cat conftest.$ac_ext >&5
13509
13510cat >>confdefs.h <<\_ACEOF
13511#define volatile
13512_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013513
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013514
Guido van Rossum627b2d71993-12-24 10:39:16 +000013515fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013516rm -f conftest.$ac_objext conftest.$ac_ext
13517echo "$as_me:$LINENO: result: $works" >&5
13518echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013519
Guido van Rossumda88dad1995-01-26 00:46:29 +000013520works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013521echo "$as_me:$LINENO: checking for working signed char" >&5
13522echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13523cat >conftest.$ac_ext <<_ACEOF
13524#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013525#include "confdefs.h"
13526
Martin v. Löwis11437992002-04-12 09:54:03 +000013527#ifdef F77_DUMMY_MAIN
13528# ifdef __cplusplus
13529 extern "C"
13530# endif
13531 int F77_DUMMY_MAIN() { return 1; }
13532#endif
13533int
13534main ()
13535{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013537 ;
13538 return 0;
13539}
13540_ACEOF
13541rm -f conftest.$ac_objext
13542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13543 (eval $ac_compile) 2>&5
13544 ac_status=$?
13545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13546 (exit $ac_status); } &&
13547 { ac_try='test -s conftest.$ac_objext'
13548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13549 (eval $ac_try) 2>&5
13550 ac_status=$?
13551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13552 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013553 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013554else
Martin v. Löwis11437992002-04-12 09:54:03 +000013555 echo "$as_me: failed program was:" >&5
13556cat conftest.$ac_ext >&5
13557
13558cat >>confdefs.h <<\_ACEOF
13559#define signed
13560_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013561
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013562
Guido van Rossum7f43da71994-08-01 12:15:30 +000013563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013564rm -f conftest.$ac_objext conftest.$ac_ext
13565echo "$as_me:$LINENO: result: $works" >&5
13566echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013567
Guido van Rossumda88dad1995-01-26 00:46:29 +000013568have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013569echo "$as_me:$LINENO: checking for prototypes" >&5
13570echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13571cat >conftest.$ac_ext <<_ACEOF
13572#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013573#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013574int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013575#ifdef F77_DUMMY_MAIN
13576# ifdef __cplusplus
13577 extern "C"
13578# endif
13579 int F77_DUMMY_MAIN() { return 1; }
13580#endif
13581int
13582main ()
13583{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013584return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 ;
13586 return 0;
13587}
13588_ACEOF
13589rm -f conftest.$ac_objext
13590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13591 (eval $ac_compile) 2>&5
13592 ac_status=$?
13593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13594 (exit $ac_status); } &&
13595 { ac_try='test -s conftest.$ac_objext'
13596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13597 (eval $ac_try) 2>&5
13598 ac_status=$?
13599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13600 (exit $ac_status); }; }; then
13601
13602
13603cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013604#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013605_ACEOF
13606
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013607 have_prototypes=yes
13608
Guido van Rossumf78abae1997-01-21 22:02:36 +000013609else
Martin v. Löwis11437992002-04-12 09:54:03 +000013610 echo "$as_me: failed program was:" >&5
13611cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013612fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013613rm -f conftest.$ac_objext conftest.$ac_ext
13614echo "$as_me:$LINENO: result: $have_prototypes" >&5
13615echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013616
Guido van Rossumda88dad1995-01-26 00:46:29 +000013617works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013618echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13619echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13620cat >conftest.$ac_ext <<_ACEOF
13621#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013622#include "confdefs.h"
13623
13624#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013625int foo(int x, ...) {
13626 va_list va;
13627 va_start(va, x);
13628 va_arg(va, int);
13629 va_arg(va, char *);
13630 va_arg(va, double);
13631 return 0;
13632}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013633
Martin v. Löwis11437992002-04-12 09:54:03 +000013634#ifdef F77_DUMMY_MAIN
13635# ifdef __cplusplus
13636 extern "C"
13637# endif
13638 int F77_DUMMY_MAIN() { return 1; }
13639#endif
13640int
13641main ()
13642{
Guido van Rossum90eea071996-08-30 20:58:57 +000013643return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013644 ;
13645 return 0;
13646}
13647_ACEOF
13648rm -f conftest.$ac_objext
13649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13650 (eval $ac_compile) 2>&5
13651 ac_status=$?
13652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13653 (exit $ac_status); } &&
13654 { ac_try='test -s conftest.$ac_objext'
13655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13656 (eval $ac_try) 2>&5
13657 ac_status=$?
13658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13659 (exit $ac_status); }; }; then
13660
13661
13662cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013663#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013664_ACEOF
13665
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013666 works=yes
13667
Guido van Rossumf78abae1997-01-21 22:02:36 +000013668else
Martin v. Löwis11437992002-04-12 09:54:03 +000013669 echo "$as_me: failed program was:" >&5
13670cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013671fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013672rm -f conftest.$ac_objext conftest.$ac_ext
13673echo "$as_me:$LINENO: result: $works" >&5
13674echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013675
Guido van Rossumda88dad1995-01-26 00:46:29 +000013676if test "$have_prototypes" = yes; then
13677bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013678echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13679echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13680cat >conftest.$ac_ext <<_ACEOF
13681#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013682#include "confdefs.h"
13683#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013684#ifdef F77_DUMMY_MAIN
13685# ifdef __cplusplus
13686 extern "C"
13687# endif
13688 int F77_DUMMY_MAIN() { return 1; }
13689#endif
13690int
13691main ()
13692{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013693char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013694 ;
13695 return 0;
13696}
13697_ACEOF
13698rm -f conftest.$ac_objext
13699if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13700 (eval $ac_compile) 2>&5
13701 ac_status=$?
13702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13703 (exit $ac_status); } &&
13704 { ac_try='test -s conftest.$ac_objext'
13705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13706 (eval $ac_try) 2>&5
13707 ac_status=$?
13708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13709 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013710 :
13711else
Martin v. Löwis11437992002-04-12 09:54:03 +000013712 echo "$as_me: failed program was:" >&5
13713cat conftest.$ac_ext >&5
13714
13715cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013716#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013717_ACEOF
13718
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013719 bad_prototypes=yes
13720
Guido van Rossum627b2d71993-12-24 10:39:16 +000013721fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013722rm -f conftest.$ac_objext conftest.$ac_ext
13723echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13724echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013725fi
13726
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013727# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013728echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13729echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13730cat >conftest.$ac_ext <<_ACEOF
13731#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013732#include "confdefs.h"
13733#include <sys/types.h>
13734#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013735#ifdef F77_DUMMY_MAIN
13736# ifdef __cplusplus
13737 extern "C"
13738# endif
13739 int F77_DUMMY_MAIN() { return 1; }
13740#endif
13741int
13742main ()
13743{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013744struct sockaddr x;
13745x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 ;
13747 return 0;
13748}
13749_ACEOF
13750rm -f conftest.$ac_objext
13751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13752 (eval $ac_compile) 2>&5
13753 ac_status=$?
13754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13755 (exit $ac_status); } &&
13756 { ac_try='test -s conftest.$ac_objext'
13757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13758 (eval $ac_try) 2>&5
13759 ac_status=$?
13760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13761 (exit $ac_status); }; }; then
13762 echo "$as_me:$LINENO: result: yes" >&5
13763echo "${ECHO_T}yes" >&6
13764
13765cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013766#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013767_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013768
13769else
Martin v. Löwis11437992002-04-12 09:54:03 +000013770 echo "$as_me: failed program was:" >&5
13771cat conftest.$ac_ext >&5
13772echo "$as_me:$LINENO: result: no" >&5
13773echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013774fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013775rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013776
Martin v. Löwis11437992002-04-12 09:54:03 +000013777echo "$as_me:$LINENO: checking for bad static forward" >&5
13778echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13779if test "${ac_cv_bad_static_forward+set}" = set; then
13780 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013781else
13782 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013783 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013784else
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 cat >conftest.$ac_ext <<_ACEOF
13786#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013787#include "confdefs.h"
13788
13789struct s { int a; int b; };
13790static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013791int foobar() {
13792 static int random;
13793 random = (int) &foo;
13794 return random;
13795}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013796static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013797main() {
13798 exit(!((int)&foo == foobar()));
13799}
Martin v. Löwis11437992002-04-12 09:54:03 +000013800_ACEOF
13801rm -f conftest$ac_exeext
13802if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13803 (eval $ac_link) 2>&5
13804 ac_status=$?
13805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13806 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13808 (eval $ac_try) 2>&5
13809 ac_status=$?
13810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13811 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013812 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013813else
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 echo "$as_me: program exited with status $ac_status" >&5
13815echo "$as_me: failed program was:" >&5
13816cat conftest.$ac_ext >&5
13817( exit $ac_status )
13818ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013819fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013820rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13821fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013822fi
13823
Martin v. Löwis11437992002-04-12 09:54:03 +000013824echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13825echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013826if test "$ac_cv_bad_static_forward" = yes
13827then
Martin v. Löwis11437992002-04-12 09:54:03 +000013828
13829cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013830#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013831_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013832
13833fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013834
Guido van Rossumda88dad1995-01-26 00:46:29 +000013835va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013836echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13837echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13838cat >conftest.$ac_ext <<_ACEOF
13839#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013840#include "confdefs.h"
13841
13842#ifdef HAVE_STDARG_PROTOTYPES
13843#include <stdarg.h>
13844#else
13845#include <varargs.h>
13846#endif
13847
Martin v. Löwis11437992002-04-12 09:54:03 +000013848#ifdef F77_DUMMY_MAIN
13849# ifdef __cplusplus
13850 extern "C"
13851# endif
13852 int F77_DUMMY_MAIN() { return 1; }
13853#endif
13854int
13855main ()
13856{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013857va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013858 ;
13859 return 0;
13860}
13861_ACEOF
13862rm -f conftest.$ac_objext
13863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13864 (eval $ac_compile) 2>&5
13865 ac_status=$?
13866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13867 (exit $ac_status); } &&
13868 { ac_try='test -s conftest.$ac_objext'
13869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13870 (eval $ac_try) 2>&5
13871 ac_status=$?
13872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13873 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013874 :
13875else
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 echo "$as_me: failed program was:" >&5
13877cat conftest.$ac_ext >&5
13878
13879
13880cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013881#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013882_ACEOF
13883
Guido van Rossumda88dad1995-01-26 00:46:29 +000013884 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013885
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013886fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013887rm -f conftest.$ac_objext conftest.$ac_ext
13888echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13889echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013890
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013891# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013892
13893
13894
13895echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13896echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13897if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13898 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013899else
Martin v. Löwis11437992002-04-12 09:54:03 +000013900 cat >conftest.$ac_ext <<_ACEOF
13901#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013902#include "confdefs.h"
13903/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013905#include <assert.h>
13906/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013907#ifdef __cplusplus
13908extern "C"
13909#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013910/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 builtin and then its argument prototype would still apply. */
13912char gethostbyname_r ();
13913char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013914
Martin v. Löwis11437992002-04-12 09:54:03 +000013915#ifdef F77_DUMMY_MAIN
13916# ifdef __cplusplus
13917 extern "C"
13918# endif
13919 int F77_DUMMY_MAIN() { return 1; }
13920#endif
13921int
13922main ()
13923{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013924/* The GNU C library defines this for functions which it implements
13925 to always fail with ENOSYS. Some functions are actually named
13926 something starting with __ and the normal name is an alias. */
13927#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13928choke me
13929#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013930f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013931#endif
13932
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 ;
13934 return 0;
13935}
13936_ACEOF
13937rm -f conftest.$ac_objext conftest$ac_exeext
13938if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13939 (eval $ac_link) 2>&5
13940 ac_status=$?
13941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13942 (exit $ac_status); } &&
13943 { ac_try='test -s conftest$ac_exeext'
13944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13945 (eval $ac_try) 2>&5
13946 ac_status=$?
13947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13948 (exit $ac_status); }; }; then
13949 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013950else
Martin v. Löwis11437992002-04-12 09:54:03 +000013951 echo "$as_me: failed program was:" >&5
13952cat conftest.$ac_ext >&5
13953ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013954fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013955rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013956fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013957echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13958echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13959if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013960
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013962#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013963_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013964
Martin v. Löwis11437992002-04-12 09:54:03 +000013965 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13966echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013967 OLD_CFLAGS=$CFLAGS
13968 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 cat >conftest.$ac_ext <<_ACEOF
13970#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013971#include "confdefs.h"
13972
13973# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013974
13975#ifdef F77_DUMMY_MAIN
13976# ifdef __cplusplus
13977 extern "C"
13978# endif
13979 int F77_DUMMY_MAIN() { return 1; }
13980#endif
13981int
13982main ()
13983{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013984
13985 char *name;
13986 struct hostent *he, *res;
13987 char buffer[2048];
13988 int buflen = 2048;
13989 int h_errnop;
13990
13991 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013992
13993 ;
13994 return 0;
13995}
13996_ACEOF
13997rm -f conftest.$ac_objext
13998if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13999 (eval $ac_compile) 2>&5
14000 ac_status=$?
14001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14002 (exit $ac_status); } &&
14003 { ac_try='test -s conftest.$ac_objext'
14004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14005 (eval $ac_try) 2>&5
14006 ac_status=$?
14007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14008 (exit $ac_status); }; }; then
14009
14010 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014011#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014012_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014013
Martin v. Löwis11437992002-04-12 09:54:03 +000014014
14015cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014016#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014017_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014018
Martin v. Löwis11437992002-04-12 09:54:03 +000014019 echo "$as_me:$LINENO: result: yes" >&5
14020echo "${ECHO_T}yes" >&6
14021
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014022else
Martin v. Löwis11437992002-04-12 09:54:03 +000014023 echo "$as_me: failed program was:" >&5
14024cat conftest.$ac_ext >&5
14025
14026 echo "$as_me:$LINENO: result: no" >&5
14027echo "${ECHO_T}no" >&6
14028 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14029echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14030 cat >conftest.$ac_ext <<_ACEOF
14031#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014032#include "confdefs.h"
14033
14034# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014035
14036#ifdef F77_DUMMY_MAIN
14037# ifdef __cplusplus
14038 extern "C"
14039# endif
14040 int F77_DUMMY_MAIN() { return 1; }
14041#endif
14042int
14043main ()
14044{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014045
14046 char *name;
14047 struct hostent *he;
14048 char buffer[2048];
14049 int buflen = 2048;
14050 int h_errnop;
14051
14052 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014053
14054 ;
14055 return 0;
14056}
14057_ACEOF
14058rm -f conftest.$ac_objext
14059if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14060 (eval $ac_compile) 2>&5
14061 ac_status=$?
14062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14063 (exit $ac_status); } &&
14064 { ac_try='test -s conftest.$ac_objext'
14065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14066 (eval $ac_try) 2>&5
14067 ac_status=$?
14068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14069 (exit $ac_status); }; }; then
14070
14071 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014072#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014073_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014074
Martin v. Löwis11437992002-04-12 09:54:03 +000014075
14076cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014077#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014078_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014079
Martin v. Löwis11437992002-04-12 09:54:03 +000014080 echo "$as_me:$LINENO: result: yes" >&5
14081echo "${ECHO_T}yes" >&6
14082
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014083else
Martin v. Löwis11437992002-04-12 09:54:03 +000014084 echo "$as_me: failed program was:" >&5
14085cat conftest.$ac_ext >&5
14086
14087 echo "$as_me:$LINENO: result: no" >&5
14088echo "${ECHO_T}no" >&6
14089 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14090echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14091 cat >conftest.$ac_ext <<_ACEOF
14092#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014093#include "confdefs.h"
14094
14095# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014096
14097#ifdef F77_DUMMY_MAIN
14098# ifdef __cplusplus
14099 extern "C"
14100# endif
14101 int F77_DUMMY_MAIN() { return 1; }
14102#endif
14103int
14104main ()
14105{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014106
14107 char *name;
14108 struct hostent *he;
14109 struct hostent_data data;
14110
14111 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014112
14113 ;
14114 return 0;
14115}
14116_ACEOF
14117rm -f conftest.$ac_objext
14118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14119 (eval $ac_compile) 2>&5
14120 ac_status=$?
14121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14122 (exit $ac_status); } &&
14123 { ac_try='test -s conftest.$ac_objext'
14124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14125 (eval $ac_try) 2>&5
14126 ac_status=$?
14127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14128 (exit $ac_status); }; }; then
14129
14130 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014131#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014132_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014133
Martin v. Löwis11437992002-04-12 09:54:03 +000014134
14135cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014136#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014137_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014138
Martin v. Löwis11437992002-04-12 09:54:03 +000014139 echo "$as_me:$LINENO: result: yes" >&5
14140echo "${ECHO_T}yes" >&6
14141
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014142else
Martin v. Löwis11437992002-04-12 09:54:03 +000014143 echo "$as_me: failed program was:" >&5
14144cat conftest.$ac_ext >&5
14145
14146 echo "$as_me:$LINENO: result: no" >&5
14147echo "${ECHO_T}no" >&6
14148
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014149fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014150rm -f conftest.$ac_objext conftest.$ac_ext
14151
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014153rm -f conftest.$ac_objext conftest.$ac_ext
14154
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014156rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014157 CFLAGS=$OLD_CFLAGS
14158
14159else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014160
Martin v. Löwis11437992002-04-12 09:54:03 +000014161
14162for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014163do
Martin v. Löwis11437992002-04-12 09:54:03 +000014164as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14165echo "$as_me:$LINENO: checking for $ac_func" >&5
14166echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14167if eval "test \"\${$as_ac_var+set}\" = set"; then
14168 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014169else
Martin v. Löwis11437992002-04-12 09:54:03 +000014170 cat >conftest.$ac_ext <<_ACEOF
14171#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014172#include "confdefs.h"
14173/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014174 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014175#include <assert.h>
14176/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014177#ifdef __cplusplus
14178extern "C"
14179#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014180/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014181 builtin and then its argument prototype would still apply. */
14182char $ac_func ();
14183char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014184
Martin v. Löwis11437992002-04-12 09:54:03 +000014185#ifdef F77_DUMMY_MAIN
14186# ifdef __cplusplus
14187 extern "C"
14188# endif
14189 int F77_DUMMY_MAIN() { return 1; }
14190#endif
14191int
14192main ()
14193{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014194/* The GNU C library defines this for functions which it implements
14195 to always fail with ENOSYS. Some functions are actually named
14196 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014197#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014198choke me
14199#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014200f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014201#endif
14202
Martin v. Löwis11437992002-04-12 09:54:03 +000014203 ;
14204 return 0;
14205}
14206_ACEOF
14207rm -f conftest.$ac_objext conftest$ac_exeext
14208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14209 (eval $ac_link) 2>&5
14210 ac_status=$?
14211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14212 (exit $ac_status); } &&
14213 { ac_try='test -s conftest$ac_exeext'
14214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14215 (eval $ac_try) 2>&5
14216 ac_status=$?
14217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14218 (exit $ac_status); }; }; then
14219 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014220else
Martin v. Löwis11437992002-04-12 09:54:03 +000014221 echo "$as_me: failed program was:" >&5
14222cat conftest.$ac_ext >&5
14223eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014224fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014225rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014226fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014227echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14228echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14229if test `eval echo '${'$as_ac_var'}'` = yes; then
14230 cat >>confdefs.h <<_ACEOF
14231#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14232_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014233
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014234fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014235done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014236
Michael W. Hudson54241132001-12-07 15:38:26 +000014237
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014238fi
14239
Michael W. Hudson54241132001-12-07 15:38:26 +000014240
14241
14242
14243
14244
14245
Guido van Rossum627b2d71993-12-24 10:39:16 +000014246# checks for system services
14247# (none yet)
14248
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014249# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014250echo "$as_me:$LINENO: checking for __fpu_control" >&5
14251echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14252if test "${ac_cv_func___fpu_control+set}" = set; then
14253 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014254else
Martin v. Löwis11437992002-04-12 09:54:03 +000014255 cat >conftest.$ac_ext <<_ACEOF
14256#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014257#include "confdefs.h"
14258/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014259 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014260#include <assert.h>
14261/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014262#ifdef __cplusplus
14263extern "C"
14264#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014265/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014266 builtin and then its argument prototype would still apply. */
14267char __fpu_control ();
14268char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014269
Martin v. Löwis11437992002-04-12 09:54:03 +000014270#ifdef F77_DUMMY_MAIN
14271# ifdef __cplusplus
14272 extern "C"
14273# endif
14274 int F77_DUMMY_MAIN() { return 1; }
14275#endif
14276int
14277main ()
14278{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014279/* The GNU C library defines this for functions which it implements
14280 to always fail with ENOSYS. Some functions are actually named
14281 something starting with __ and the normal name is an alias. */
14282#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14283choke me
14284#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014285f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014286#endif
14287
Martin v. Löwis11437992002-04-12 09:54:03 +000014288 ;
14289 return 0;
14290}
14291_ACEOF
14292rm -f conftest.$ac_objext conftest$ac_exeext
14293if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14294 (eval $ac_link) 2>&5
14295 ac_status=$?
14296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14297 (exit $ac_status); } &&
14298 { ac_try='test -s conftest$ac_exeext'
14299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14300 (eval $ac_try) 2>&5
14301 ac_status=$?
14302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14303 (exit $ac_status); }; }; then
14304 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014305else
Martin v. Löwis11437992002-04-12 09:54:03 +000014306 echo "$as_me: failed program was:" >&5
14307cat conftest.$ac_ext >&5
14308ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014310rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014311fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014312echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14313echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14314if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014315 :
14316else
Martin v. Löwis11437992002-04-12 09:54:03 +000014317
14318echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14319echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14320if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014322else
Martin v. Löwis11437992002-04-12 09:54:03 +000014323 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014324LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014325cat >conftest.$ac_ext <<_ACEOF
14326#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014327#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014328
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014329/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014330#ifdef __cplusplus
14331extern "C"
14332#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014333/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014334 builtin and then its argument prototype would still apply. */
14335char __fpu_control ();
14336#ifdef F77_DUMMY_MAIN
14337# ifdef __cplusplus
14338 extern "C"
14339# endif
14340 int F77_DUMMY_MAIN() { return 1; }
14341#endif
14342int
14343main ()
14344{
14345__fpu_control ();
14346 ;
14347 return 0;
14348}
14349_ACEOF
14350rm -f conftest.$ac_objext conftest$ac_exeext
14351if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14352 (eval $ac_link) 2>&5
14353 ac_status=$?
14354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14355 (exit $ac_status); } &&
14356 { ac_try='test -s conftest$ac_exeext'
14357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14358 (eval $ac_try) 2>&5
14359 ac_status=$?
14360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14361 (exit $ac_status); }; }; then
14362 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014363else
Martin v. Löwis11437992002-04-12 09:54:03 +000014364 echo "$as_me: failed program was:" >&5
14365cat conftest.$ac_ext >&5
14366ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014368rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14369LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014370fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014371echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14372echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14373if test $ac_cv_lib_ieee___fpu_control = yes; then
14374 cat >>confdefs.h <<_ACEOF
14375#define HAVE_LIBIEEE 1
14376_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014377
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014378 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014379
Guido van Rossum627b2d71993-12-24 10:39:16 +000014380fi
14381
Michael W. Hudson54241132001-12-07 15:38:26 +000014382
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014383fi
14384
Michael W. Hudson54241132001-12-07 15:38:26 +000014385
Guido van Rossum7f253911997-05-09 02:42:48 +000014386# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014387echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14388echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14389
Guido van Rossum7f253911997-05-09 02:42:48 +000014390# Check whether --with-fpectl or --without-fpectl was given.
14391if test "${with_fpectl+set}" = set; then
14392 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014393
Guido van Rossum7f253911997-05-09 02:42:48 +000014394if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014395then
14396
14397cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014398#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014399_ACEOF
14400
14401 echo "$as_me:$LINENO: result: yes" >&5
14402echo "${ECHO_T}yes" >&6
14403else echo "$as_me:$LINENO: result: no" >&5
14404echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014405fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014406else
Martin v. Löwis11437992002-04-12 09:54:03 +000014407 echo "$as_me:$LINENO: result: no" >&5
14408echo "${ECHO_T}no" >&6
14409fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014410
Guido van Rossum7f43da71994-08-01 12:15:30 +000014411# check for --with-libm=...
14412
Guido van Rossum563e7081996-09-10 18:20:48 +000014413case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014414Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014415BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014416*) LIBM=-lm
14417esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014418echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14419echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14420
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014421# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014422if test "${with_libm+set}" = set; then
14423 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014424
Guido van Rossum7f253911997-05-09 02:42:48 +000014425if test "$withval" = no
14426then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014427 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14428echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014429elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014430then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014431 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14432echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14433else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14434echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14435 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014436fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014437else
Martin v. Löwis11437992002-04-12 09:54:03 +000014438 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14439echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14440fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014441
14442# check for --with-libc=...
14443
Martin v. Löwis11437992002-04-12 09:54:03 +000014444echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14445echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14446
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014447# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014448if test "${with_libc+set}" = set; then
14449 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014450
Guido van Rossum7f253911997-05-09 02:42:48 +000014451if test "$withval" = no
14452then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14454echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014455elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014456then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14458echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14459else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14460echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14461 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014462fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014463else
Martin v. Löwis11437992002-04-12 09:54:03 +000014464 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14465echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14466fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014467
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014468# check for hypot() in math library
14469LIBS_SAVE=$LIBS
14470LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014471
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014472for ac_func in hypot
14473do
Martin v. Löwis11437992002-04-12 09:54:03 +000014474as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14475echo "$as_me:$LINENO: checking for $ac_func" >&5
14476echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14477if eval "test \"\${$as_ac_var+set}\" = set"; then
14478 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014479else
Martin v. Löwis11437992002-04-12 09:54:03 +000014480 cat >conftest.$ac_ext <<_ACEOF
14481#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014482#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014483/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014485#include <assert.h>
14486/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014487#ifdef __cplusplus
14488extern "C"
14489#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014490/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 builtin and then its argument prototype would still apply. */
14492char $ac_func ();
14493char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014494
Martin v. Löwis11437992002-04-12 09:54:03 +000014495#ifdef F77_DUMMY_MAIN
14496# ifdef __cplusplus
14497 extern "C"
14498# endif
14499 int F77_DUMMY_MAIN() { return 1; }
14500#endif
14501int
14502main ()
14503{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014504/* The GNU C library defines this for functions which it implements
14505 to always fail with ENOSYS. Some functions are actually named
14506 something starting with __ and the normal name is an alias. */
14507#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14508choke me
14509#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014510f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014511#endif
14512
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 ;
14514 return 0;
14515}
14516_ACEOF
14517rm -f conftest.$ac_objext conftest$ac_exeext
14518if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14519 (eval $ac_link) 2>&5
14520 ac_status=$?
14521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14522 (exit $ac_status); } &&
14523 { ac_try='test -s conftest$ac_exeext'
14524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14525 (eval $ac_try) 2>&5
14526 ac_status=$?
14527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14528 (exit $ac_status); }; }; then
14529 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014530else
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 echo "$as_me: failed program was:" >&5
14532cat conftest.$ac_ext >&5
14533eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014534fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014535rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014536fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014537echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14538echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14539if test `eval echo '${'$as_ac_var'}'` = yes; then
14540 cat >>confdefs.h <<_ACEOF
14541#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14542_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014543
Michael W. Hudson54241132001-12-07 15:38:26 +000014544else
Martin v. Löwis11437992002-04-12 09:54:03 +000014545 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014546fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014547done
14548
Michael W. Hudson54241132001-12-07 15:38:26 +000014549
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014550LIBS=$LIBS_SAVE
14551
Guido van Rossumad713701997-07-10 22:42:38 +000014552# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014553echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14554echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14555if test "${ac_cv_malloc_zero+set}" = set; then
14556 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014557else
14558 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014559 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014560else
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 cat >conftest.$ac_ext <<_ACEOF
14562#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014563#include "confdefs.h"
14564#include <stdio.h>
14565#ifdef HAVE_STDLIB
14566#include <stdlib.h>
14567#else
14568char *malloc(), *realloc();
14569int *free();
14570#endif
14571main() {
14572 char *p;
14573 p = malloc(0);
14574 if (p == NULL) exit(1);
14575 p = realloc(p, 0);
14576 if (p == NULL) exit(1);
14577 free(p);
14578 exit(0);
14579}
Martin v. Löwis11437992002-04-12 09:54:03 +000014580_ACEOF
14581rm -f conftest$ac_exeext
14582if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14583 (eval $ac_link) 2>&5
14584 ac_status=$?
14585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14586 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14588 (eval $ac_try) 2>&5
14589 ac_status=$?
14590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14591 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014592 ac_cv_malloc_zero=nonnull
14593else
Martin v. Löwis11437992002-04-12 09:54:03 +000014594 echo "$as_me: program exited with status $ac_status" >&5
14595echo "$as_me: failed program was:" >&5
14596cat conftest.$ac_ext >&5
14597( exit $ac_status )
14598ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014599fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014600rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014601fi
Guido van Rossumad713701997-07-10 22:42:38 +000014602fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014603 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014604echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14605echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014606if test "$ac_cv_malloc_zero" = null
14607then
Martin v. Löwis11437992002-04-12 09:54:03 +000014608
14609cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014610#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014611_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014612
14613fi
14614
Guido van Rossumef2255b2000-03-10 22:30:29 +000014615# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014616if test "${ac_cv_header_wchar_h+set}" = set; then
14617 echo "$as_me:$LINENO: checking for wchar.h" >&5
14618echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14619if test "${ac_cv_header_wchar_h+set}" = set; then
14620 echo $ECHO_N "(cached) $ECHO_C" >&6
14621fi
14622echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14623echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014624else
Martin v. Löwis11437992002-04-12 09:54:03 +000014625 # Is the header compilable?
14626echo "$as_me:$LINENO: checking wchar.h usability" >&5
14627echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14628cat >conftest.$ac_ext <<_ACEOF
14629#line $LINENO "configure"
14630#include "confdefs.h"
14631$ac_includes_default
14632#include <wchar.h>
14633_ACEOF
14634rm -f conftest.$ac_objext
14635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14636 (eval $ac_compile) 2>&5
14637 ac_status=$?
14638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14639 (exit $ac_status); } &&
14640 { ac_try='test -s conftest.$ac_objext'
14641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14642 (eval $ac_try) 2>&5
14643 ac_status=$?
14644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14645 (exit $ac_status); }; }; then
14646 ac_header_compiler=yes
14647else
14648 echo "$as_me: failed program was:" >&5
14649cat conftest.$ac_ext >&5
14650ac_header_compiler=no
14651fi
14652rm -f conftest.$ac_objext conftest.$ac_ext
14653echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14654echo "${ECHO_T}$ac_header_compiler" >&6
14655
14656# Is the header present?
14657echo "$as_me:$LINENO: checking wchar.h presence" >&5
14658echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14659cat >conftest.$ac_ext <<_ACEOF
14660#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014661#include "confdefs.h"
14662#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014663_ACEOF
14664if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14665 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14666 ac_status=$?
14667 egrep -v '^ *\+' conftest.er1 >conftest.err
14668 rm -f conftest.er1
14669 cat conftest.err >&5
14670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14671 (exit $ac_status); } >/dev/null; then
14672 if test -s conftest.err; then
14673 ac_cpp_err=$ac_c_preproc_warn_flag
14674 else
14675 ac_cpp_err=
14676 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014677else
Martin v. Löwis11437992002-04-12 09:54:03 +000014678 ac_cpp_err=yes
14679fi
14680if test -z "$ac_cpp_err"; then
14681 ac_header_preproc=yes
14682else
14683 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014684 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014685 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014686fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014687rm -f conftest.err conftest.$ac_ext
14688echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14689echo "${ECHO_T}$ac_header_preproc" >&6
14690
14691# So? What about this header?
14692case $ac_header_compiler:$ac_header_preproc in
14693 yes:no )
14694 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14695echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14696 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14697echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14698 no:yes )
14699 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14700echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14701 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14702echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14703 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14704echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14705esac
14706echo "$as_me:$LINENO: checking for wchar.h" >&5
14707echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14708if test "${ac_cv_header_wchar_h+set}" = set; then
14709 echo $ECHO_N "(cached) $ECHO_C" >&6
14710else
14711 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014712fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014713echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14714echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14715
14716fi
14717if test $ac_cv_header_wchar_h = yes; then
14718
14719
14720cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014721#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014722_ACEOF
14723
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014724 wchar_h="yes"
14725
Guido van Rossumef2255b2000-03-10 22:30:29 +000014726else
Martin v. Löwis11437992002-04-12 09:54:03 +000014727 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014728
14729fi
14730
Michael W. Hudson54241132001-12-07 15:38:26 +000014731
Martin v. Löwis11437992002-04-12 09:54:03 +000014732
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014733# determine wchar_t size
14734if test "$wchar_h" = yes
14735then
Martin v. Löwis11437992002-04-12 09:54:03 +000014736 echo "$as_me:$LINENO: checking for wchar_t" >&5
14737echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14738if test "${ac_cv_type_wchar_t+set}" = set; then
14739 echo $ECHO_N "(cached) $ECHO_C" >&6
14740else
14741 cat >conftest.$ac_ext <<_ACEOF
14742#line $LINENO "configure"
14743#include "confdefs.h"
14744#include <wchar.h>
14745
14746#ifdef F77_DUMMY_MAIN
14747# ifdef __cplusplus
14748 extern "C"
14749# endif
14750 int F77_DUMMY_MAIN() { return 1; }
14751#endif
14752int
14753main ()
14754{
14755if ((wchar_t *) 0)
14756 return 0;
14757if (sizeof (wchar_t))
14758 return 0;
14759 ;
14760 return 0;
14761}
14762_ACEOF
14763rm -f conftest.$ac_objext
14764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14765 (eval $ac_compile) 2>&5
14766 ac_status=$?
14767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14768 (exit $ac_status); } &&
14769 { ac_try='test -s conftest.$ac_objext'
14770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14771 (eval $ac_try) 2>&5
14772 ac_status=$?
14773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14774 (exit $ac_status); }; }; then
14775 ac_cv_type_wchar_t=yes
14776else
14777 echo "$as_me: failed program was:" >&5
14778cat conftest.$ac_ext >&5
14779ac_cv_type_wchar_t=no
14780fi
14781rm -f conftest.$ac_objext conftest.$ac_ext
14782fi
14783echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14784echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14785
14786echo "$as_me:$LINENO: checking size of wchar_t" >&5
14787echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14788if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14789 echo $ECHO_N "(cached) $ECHO_C" >&6
14790else
14791 if test "$ac_cv_type_wchar_t" = yes; then
14792 # The cast to unsigned long works around a bug in the HP C Compiler
14793 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14794 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14795 # This bug is HP SR number 8606223364.
14796 if test "$cross_compiling" = yes; then
14797 # Depending upon the size, compute the lo and hi bounds.
14798cat >conftest.$ac_ext <<_ACEOF
14799#line $LINENO "configure"
14800#include "confdefs.h"
14801#include <wchar.h>
14802
14803#ifdef F77_DUMMY_MAIN
14804# ifdef __cplusplus
14805 extern "C"
14806# endif
14807 int F77_DUMMY_MAIN() { return 1; }
14808#endif
14809int
14810main ()
14811{
14812static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14813test_array [0] = 0
14814
14815 ;
14816 return 0;
14817}
14818_ACEOF
14819rm -f conftest.$ac_objext
14820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14821 (eval $ac_compile) 2>&5
14822 ac_status=$?
14823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14824 (exit $ac_status); } &&
14825 { ac_try='test -s conftest.$ac_objext'
14826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14827 (eval $ac_try) 2>&5
14828 ac_status=$?
14829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14830 (exit $ac_status); }; }; then
14831 ac_lo=0 ac_mid=0
14832 while :; do
14833 cat >conftest.$ac_ext <<_ACEOF
14834#line $LINENO "configure"
14835#include "confdefs.h"
14836#include <wchar.h>
14837
14838#ifdef F77_DUMMY_MAIN
14839# ifdef __cplusplus
14840 extern "C"
14841# endif
14842 int F77_DUMMY_MAIN() { return 1; }
14843#endif
14844int
14845main ()
14846{
14847static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14848test_array [0] = 0
14849
14850 ;
14851 return 0;
14852}
14853_ACEOF
14854rm -f conftest.$ac_objext
14855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14856 (eval $ac_compile) 2>&5
14857 ac_status=$?
14858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859 (exit $ac_status); } &&
14860 { ac_try='test -s conftest.$ac_objext'
14861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14862 (eval $ac_try) 2>&5
14863 ac_status=$?
14864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14865 (exit $ac_status); }; }; then
14866 ac_hi=$ac_mid; break
14867else
14868 echo "$as_me: failed program was:" >&5
14869cat conftest.$ac_ext >&5
14870ac_lo=`expr $ac_mid + 1`
14871 if test $ac_lo -le $ac_mid; then
14872 ac_lo= ac_hi=
14873 break
14874 fi
14875 ac_mid=`expr 2 '*' $ac_mid + 1`
14876fi
14877rm -f conftest.$ac_objext conftest.$ac_ext
14878 done
14879else
14880 echo "$as_me: failed program was:" >&5
14881cat conftest.$ac_ext >&5
14882cat >conftest.$ac_ext <<_ACEOF
14883#line $LINENO "configure"
14884#include "confdefs.h"
14885#include <wchar.h>
14886
14887#ifdef F77_DUMMY_MAIN
14888# ifdef __cplusplus
14889 extern "C"
14890# endif
14891 int F77_DUMMY_MAIN() { return 1; }
14892#endif
14893int
14894main ()
14895{
14896static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14897test_array [0] = 0
14898
14899 ;
14900 return 0;
14901}
14902_ACEOF
14903rm -f conftest.$ac_objext
14904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14905 (eval $ac_compile) 2>&5
14906 ac_status=$?
14907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14908 (exit $ac_status); } &&
14909 { ac_try='test -s conftest.$ac_objext'
14910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14911 (eval $ac_try) 2>&5
14912 ac_status=$?
14913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14914 (exit $ac_status); }; }; then
14915 ac_hi=-1 ac_mid=-1
14916 while :; do
14917 cat >conftest.$ac_ext <<_ACEOF
14918#line $LINENO "configure"
14919#include "confdefs.h"
14920#include <wchar.h>
14921
14922#ifdef F77_DUMMY_MAIN
14923# ifdef __cplusplus
14924 extern "C"
14925# endif
14926 int F77_DUMMY_MAIN() { return 1; }
14927#endif
14928int
14929main ()
14930{
14931static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14932test_array [0] = 0
14933
14934 ;
14935 return 0;
14936}
14937_ACEOF
14938rm -f conftest.$ac_objext
14939if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14940 (eval $ac_compile) 2>&5
14941 ac_status=$?
14942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14943 (exit $ac_status); } &&
14944 { ac_try='test -s conftest.$ac_objext'
14945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14946 (eval $ac_try) 2>&5
14947 ac_status=$?
14948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14949 (exit $ac_status); }; }; then
14950 ac_lo=$ac_mid; break
14951else
14952 echo "$as_me: failed program was:" >&5
14953cat conftest.$ac_ext >&5
14954ac_hi=`expr '(' $ac_mid ')' - 1`
14955 if test $ac_mid -le $ac_hi; then
14956 ac_lo= ac_hi=
14957 break
14958 fi
14959 ac_mid=`expr 2 '*' $ac_mid`
14960fi
14961rm -f conftest.$ac_objext conftest.$ac_ext
14962 done
14963else
14964 echo "$as_me: failed program was:" >&5
14965cat conftest.$ac_ext >&5
14966ac_lo= ac_hi=
14967fi
14968rm -f conftest.$ac_objext conftest.$ac_ext
14969fi
14970rm -f conftest.$ac_objext conftest.$ac_ext
14971# Binary search between lo and hi bounds.
14972while test "x$ac_lo" != "x$ac_hi"; do
14973 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14974 cat >conftest.$ac_ext <<_ACEOF
14975#line $LINENO "configure"
14976#include "confdefs.h"
14977#include <wchar.h>
14978
14979#ifdef F77_DUMMY_MAIN
14980# ifdef __cplusplus
14981 extern "C"
14982# endif
14983 int F77_DUMMY_MAIN() { return 1; }
14984#endif
14985int
14986main ()
14987{
14988static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14989test_array [0] = 0
14990
14991 ;
14992 return 0;
14993}
14994_ACEOF
14995rm -f conftest.$ac_objext
14996if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14997 (eval $ac_compile) 2>&5
14998 ac_status=$?
14999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15000 (exit $ac_status); } &&
15001 { ac_try='test -s conftest.$ac_objext'
15002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15003 (eval $ac_try) 2>&5
15004 ac_status=$?
15005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15006 (exit $ac_status); }; }; then
15007 ac_hi=$ac_mid
15008else
15009 echo "$as_me: failed program was:" >&5
15010cat conftest.$ac_ext >&5
15011ac_lo=`expr '(' $ac_mid ')' + 1`
15012fi
15013rm -f conftest.$ac_objext conftest.$ac_ext
15014done
15015case $ac_lo in
15016?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15017'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15018echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15019 { (exit 1); exit 1; }; } ;;
15020esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015021else
15022 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15024echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15025 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015026else
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 cat >conftest.$ac_ext <<_ACEOF
15028#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015029#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015030#include <wchar.h>
15031
15032long longval () { return (long) (sizeof (wchar_t)); }
15033unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015034#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015035#include <stdlib.h>
15036#ifdef F77_DUMMY_MAIN
15037# ifdef __cplusplus
15038 extern "C"
15039# endif
15040 int F77_DUMMY_MAIN() { return 1; }
15041#endif
15042int
15043main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015044{
Martin v. Löwis11437992002-04-12 09:54:03 +000015045
15046 FILE *f = fopen ("conftest.val", "w");
15047 if (! f)
15048 exit (1);
15049 if (((long) (sizeof (wchar_t))) < 0)
15050 {
15051 long i = longval ();
15052 if (i != ((long) (sizeof (wchar_t))))
15053 exit (1);
15054 fprintf (f, "%ld\n", i);
15055 }
15056 else
15057 {
15058 unsigned long i = ulongval ();
15059 if (i != ((long) (sizeof (wchar_t))))
15060 exit (1);
15061 fprintf (f, "%lu\n", i);
15062 }
15063 exit (ferror (f) || fclose (f) != 0);
15064
15065 ;
15066 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015067}
Martin v. Löwis11437992002-04-12 09:54:03 +000015068_ACEOF
15069rm -f conftest$ac_exeext
15070if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15071 (eval $ac_link) 2>&5
15072 ac_status=$?
15073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15076 (eval $ac_try) 2>&5
15077 ac_status=$?
15078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15079 (exit $ac_status); }; }; then
15080 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015081else
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 echo "$as_me: program exited with status $ac_status" >&5
15083echo "$as_me: failed program was:" >&5
15084cat conftest.$ac_ext >&5
15085( exit $ac_status )
15086{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15087echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15088 { (exit 1); exit 1; }; }
15089fi
15090rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15091fi
15092fi
15093rm -f conftest.val
15094else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015095 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015096fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015097fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015098echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15099echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15100cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015101#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015102_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015103
Michael W. Hudson54241132001-12-07 15:38:26 +000015104
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015105fi
15106
Martin v. Löwis11437992002-04-12 09:54:03 +000015107echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15108echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015109# Check whether --enable-unicode or --disable-unicode was given.
15110if test "${enable_unicode+set}" = set; then
15111 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015112
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015113else
15114 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015115fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015116
15117if test $enable_unicode = yes
15118then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015119 # Without any arguments, Py_UNICODE defaults to two-byte mode
15120 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015121fi
15122
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015123
15124
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015125case "$enable_unicode" in
15126ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015127 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015128#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015129_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015130
15131 ;;
15132ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015134#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015135_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015136
15137 ;;
15138esac
15139
Michael W. Hudson54241132001-12-07 15:38:26 +000015140
Martin v. Löwis11437992002-04-12 09:54:03 +000015141
15142
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015143
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015144if test "$enable_unicode" = "no"
15145then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015146 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 echo "$as_me:$LINENO: result: not used" >&5
15148echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015149else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015150 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015151
15152cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015153#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015154_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015155
15156 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15157 then
15158 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015159
Martin v. Löwis11437992002-04-12 09:54:03 +000015160cat >>confdefs.h <<\_ACEOF
15161#define HAVE_USABLE_WCHAR_T 1
15162_ACEOF
15163
15164 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015165#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015166_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015167
15168 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15169 then
15170 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015171 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015172#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015173_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015174
15175 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15176 then
15177 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015178 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015179#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015180_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015181
15182 else
15183 PY_UNICODE_TYPE="no type found"
15184 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015185 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15186echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015187fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015188
15189# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015190echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15191echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15192if test "${ac_cv_c_bigendian+set}" = set; then
15193 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015194else
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 # See if sys/param.h defines the BYTE_ORDER macro.
15196cat >conftest.$ac_ext <<_ACEOF
15197#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015198#include "confdefs.h"
15199#include <sys/types.h>
15200#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015201
Martin v. Löwis11437992002-04-12 09:54:03 +000015202#ifdef F77_DUMMY_MAIN
15203# ifdef __cplusplus
15204 extern "C"
15205# endif
15206 int F77_DUMMY_MAIN() { return 1; }
15207#endif
15208int
15209main ()
15210{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015211#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15212 bogus endian macros
15213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015214
15215 ;
15216 return 0;
15217}
15218_ACEOF
15219rm -f conftest.$ac_objext
15220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15221 (eval $ac_compile) 2>&5
15222 ac_status=$?
15223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15224 (exit $ac_status); } &&
15225 { ac_try='test -s conftest.$ac_objext'
15226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15227 (eval $ac_try) 2>&5
15228 ac_status=$?
15229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15230 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015231 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015232cat >conftest.$ac_ext <<_ACEOF
15233#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015234#include "confdefs.h"
15235#include <sys/types.h>
15236#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015237
Martin v. Löwis11437992002-04-12 09:54:03 +000015238#ifdef F77_DUMMY_MAIN
15239# ifdef __cplusplus
15240 extern "C"
15241# endif
15242 int F77_DUMMY_MAIN() { return 1; }
15243#endif
15244int
15245main ()
15246{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015247#if BYTE_ORDER != BIG_ENDIAN
15248 not big endian
15249#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015250
15251 ;
15252 return 0;
15253}
15254_ACEOF
15255rm -f conftest.$ac_objext
15256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15257 (eval $ac_compile) 2>&5
15258 ac_status=$?
15259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15260 (exit $ac_status); } &&
15261 { ac_try='test -s conftest.$ac_objext'
15262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15263 (eval $ac_try) 2>&5
15264 ac_status=$?
15265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15266 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015267 ac_cv_c_bigendian=yes
15268else
Martin v. Löwis11437992002-04-12 09:54:03 +000015269 echo "$as_me: failed program was:" >&5
15270cat conftest.$ac_ext >&5
15271ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015273rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015274else
Martin v. Löwis11437992002-04-12 09:54:03 +000015275 echo "$as_me: failed program was:" >&5
15276cat conftest.$ac_ext >&5
15277# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015278if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 # try to guess the endianess by grep'ing values into an object file
15280 ac_cv_c_bigendian=unknown
15281 cat >conftest.$ac_ext <<_ACEOF
15282#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015283#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015284short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15285short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15286void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15287short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15288short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15289void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15290#ifdef F77_DUMMY_MAIN
15291# ifdef __cplusplus
15292 extern "C"
15293# endif
15294 int F77_DUMMY_MAIN() { return 1; }
15295#endif
15296int
15297main ()
15298{
15299 _ascii (); _ebcdic ();
15300 ;
15301 return 0;
15302}
15303_ACEOF
15304rm -f conftest.$ac_objext
15305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15306 (eval $ac_compile) 2>&5
15307 ac_status=$?
15308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15309 (exit $ac_status); } &&
15310 { ac_try='test -s conftest.$ac_objext'
15311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15312 (eval $ac_try) 2>&5
15313 ac_status=$?
15314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15315 (exit $ac_status); }; }; then
15316 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15317 ac_cv_c_bigendian=yes
15318fi
15319if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15320 if test "$ac_cv_c_bigendian" = unknown; then
15321 ac_cv_c_bigendian=no
15322 else
15323 # finding both strings is unlikely to happen, but who knows?
15324 ac_cv_c_bigendian=unknown
15325 fi
15326fi
15327else
15328 echo "$as_me: failed program was:" >&5
15329cat conftest.$ac_ext >&5
15330fi
15331rm -f conftest.$ac_objext conftest.$ac_ext
15332else
15333 cat >conftest.$ac_ext <<_ACEOF
15334#line $LINENO "configure"
15335#include "confdefs.h"
15336int
15337main ()
15338{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015339 /* Are we little or big endian? From Harbison&Steele. */
15340 union
15341 {
15342 long l;
15343 char c[sizeof (long)];
15344 } u;
15345 u.l = 1;
15346 exit (u.c[sizeof (long) - 1] == 1);
15347}
Martin v. Löwis11437992002-04-12 09:54:03 +000015348_ACEOF
15349rm -f conftest$ac_exeext
15350if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15351 (eval $ac_link) 2>&5
15352 ac_status=$?
15353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15354 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15356 (eval $ac_try) 2>&5
15357 ac_status=$?
15358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15359 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015360 ac_cv_c_bigendian=no
15361else
Martin v. Löwis11437992002-04-12 09:54:03 +000015362 echo "$as_me: program exited with status $ac_status" >&5
15363echo "$as_me: failed program was:" >&5
15364cat conftest.$ac_ext >&5
15365( exit $ac_status )
15366ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015368rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015370fi
15371rm -f conftest.$ac_objext conftest.$ac_ext
15372fi
15373echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15374echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15375case $ac_cv_c_bigendian in
15376 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015377
Martin v. Löwis11437992002-04-12 09:54:03 +000015378cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015379#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015380_ACEOF
15381 ;;
15382 no)
15383 ;;
15384 *)
15385 { { echo "$as_me:$LINENO: error: unknown endianess
15386presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15387echo "$as_me: error: unknown endianess
15388presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15389 { (exit 1); exit 1; }; } ;;
15390esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015391
Michael W. Hudson54241132001-12-07 15:38:26 +000015392
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015393# Check whether right shifting a negative integer extends the sign bit
15394# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015395echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15396echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15397if test "${ac_cv_rshift_extends_sign+set}" = set; then
15398 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015399else
Martin v. Löwis11437992002-04-12 09:54:03 +000015400
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015401if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015402 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015403else
Martin v. Löwis11437992002-04-12 09:54:03 +000015404 cat >conftest.$ac_ext <<_ACEOF
15405#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015406#include "confdefs.h"
15407
15408int main()
15409{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015410 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015411}
15412
Martin v. Löwis11437992002-04-12 09:54:03 +000015413_ACEOF
15414rm -f conftest$ac_exeext
15415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15416 (eval $ac_link) 2>&5
15417 ac_status=$?
15418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15421 (eval $ac_try) 2>&5
15422 ac_status=$?
15423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15424 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015425 ac_cv_rshift_extends_sign=yes
15426else
Martin v. Löwis11437992002-04-12 09:54:03 +000015427 echo "$as_me: program exited with status $ac_status" >&5
15428echo "$as_me: failed program was:" >&5
15429cat conftest.$ac_ext >&5
15430( exit $ac_status )
15431ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015433rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15434fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015435fi
15436
Martin v. Löwis11437992002-04-12 09:54:03 +000015437echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15438echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015439if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015440then
Martin v. Löwis11437992002-04-12 09:54:03 +000015441
15442cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015443#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015444_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015445
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015446fi
15447
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015448# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015449echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15450echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15451if test "${ac_cv_have_getc_unlocked+set}" = set; then
15452 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015453else
Martin v. Löwis11437992002-04-12 09:54:03 +000015454
15455cat >conftest.$ac_ext <<_ACEOF
15456#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015457#include "confdefs.h"
15458#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015459#ifdef F77_DUMMY_MAIN
15460# ifdef __cplusplus
15461 extern "C"
15462# endif
15463 int F77_DUMMY_MAIN() { return 1; }
15464#endif
15465int
15466main ()
15467{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015468
15469 FILE *f = fopen("/dev/null", "r");
15470 flockfile(f);
15471 getc_unlocked(f);
15472 funlockfile(f);
15473
Martin v. Löwis11437992002-04-12 09:54:03 +000015474 ;
15475 return 0;
15476}
15477_ACEOF
15478rm -f conftest.$ac_objext conftest$ac_exeext
15479if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15480 (eval $ac_link) 2>&5
15481 ac_status=$?
15482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15483 (exit $ac_status); } &&
15484 { ac_try='test -s conftest$ac_exeext'
15485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15486 (eval $ac_try) 2>&5
15487 ac_status=$?
15488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15489 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015490 ac_cv_have_getc_unlocked=yes
15491else
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 echo "$as_me: failed program was:" >&5
15493cat conftest.$ac_ext >&5
15494ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015495fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015496rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015497fi
15498
Martin v. Löwis11437992002-04-12 09:54:03 +000015499echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15500echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015501if test "$ac_cv_have_getc_unlocked" = yes
15502then
Martin v. Löwis11437992002-04-12 09:54:03 +000015503
15504cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015505#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015506_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015507
15508fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015509
Martin v. Löwis0daad592001-09-30 21:09:59 +000015510# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015511echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15512echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15513if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15514 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015515else
Martin v. Löwis11437992002-04-12 09:54:03 +000015516 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015517LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015518cat >conftest.$ac_ext <<_ACEOF
15519#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015520#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015521
Guido van Rossum353ae582001-07-10 16:45:32 +000015522/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015523#ifdef __cplusplus
15524extern "C"
15525#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015526/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015527 builtin and then its argument prototype would still apply. */
15528char rl_pre_input_hook ();
15529#ifdef F77_DUMMY_MAIN
15530# ifdef __cplusplus
15531 extern "C"
15532# endif
15533 int F77_DUMMY_MAIN() { return 1; }
15534#endif
15535int
15536main ()
15537{
15538rl_pre_input_hook ();
15539 ;
15540 return 0;
15541}
15542_ACEOF
15543rm -f conftest.$ac_objext conftest$ac_exeext
15544if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15545 (eval $ac_link) 2>&5
15546 ac_status=$?
15547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15548 (exit $ac_status); } &&
15549 { ac_try='test -s conftest$ac_exeext'
15550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15551 (eval $ac_try) 2>&5
15552 ac_status=$?
15553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15554 (exit $ac_status); }; }; then
15555 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015556else
Martin v. Löwis11437992002-04-12 09:54:03 +000015557 echo "$as_me: failed program was:" >&5
15558cat conftest.$ac_ext >&5
15559ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015561rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15562LIBS=$ac_check_lib_save_LIBS
15563fi
15564echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15565echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15566if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015567
Martin v. Löwis11437992002-04-12 09:54:03 +000015568cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015569#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015570_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015571
Martin v. Löwis0daad592001-09-30 21:09:59 +000015572fi
15573
Michael W. Hudson54241132001-12-07 15:38:26 +000015574
Martin v. Löwis0daad592001-09-30 21:09:59 +000015575# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015576echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15577echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15578if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15579 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015580else
Martin v. Löwis11437992002-04-12 09:54:03 +000015581 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015582LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015583cat >conftest.$ac_ext <<_ACEOF
15584#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015585#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015586
Martin v. Löwis0daad592001-09-30 21:09:59 +000015587/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015588#ifdef __cplusplus
15589extern "C"
15590#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015591/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015592 builtin and then its argument prototype would still apply. */
15593char rl_completion_matches ();
15594#ifdef F77_DUMMY_MAIN
15595# ifdef __cplusplus
15596 extern "C"
15597# endif
15598 int F77_DUMMY_MAIN() { return 1; }
15599#endif
15600int
15601main ()
15602{
15603rl_completion_matches ();
15604 ;
15605 return 0;
15606}
15607_ACEOF
15608rm -f conftest.$ac_objext conftest$ac_exeext
15609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15610 (eval $ac_link) 2>&5
15611 ac_status=$?
15612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15613 (exit $ac_status); } &&
15614 { ac_try='test -s conftest$ac_exeext'
15615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15616 (eval $ac_try) 2>&5
15617 ac_status=$?
15618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15619 (exit $ac_status); }; }; then
15620 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015621else
Martin v. Löwis11437992002-04-12 09:54:03 +000015622 echo "$as_me: failed program was:" >&5
15623cat conftest.$ac_ext >&5
15624ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015626rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15627LIBS=$ac_check_lib_save_LIBS
15628fi
15629echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15630echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15631if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015632
Martin v. Löwis11437992002-04-12 09:54:03 +000015633cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015634#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015635_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015636
Guido van Rossum353ae582001-07-10 16:45:32 +000015637fi
15638
Jack Jansendd19cf82001-12-06 22:36:17 +000015639
Martin v. Löwis11437992002-04-12 09:54:03 +000015640echo "$as_me:$LINENO: checking for broken nice()" >&5
15641echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15642if test "${ac_cv_broken_nice+set}" = set; then
15643 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015644else
Martin v. Löwis11437992002-04-12 09:54:03 +000015645
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015646if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015647 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015648else
Martin v. Löwis11437992002-04-12 09:54:03 +000015649 cat >conftest.$ac_ext <<_ACEOF
15650#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015651#include "confdefs.h"
15652
15653int main()
15654{
15655 int val1 = nice(1);
15656 if (val1 != -1 && val1 == nice(2))
15657 exit(0);
15658 exit(1);
15659}
15660
Martin v. Löwis11437992002-04-12 09:54:03 +000015661_ACEOF
15662rm -f conftest$ac_exeext
15663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15664 (eval $ac_link) 2>&5
15665 ac_status=$?
15666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15667 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15669 (eval $ac_try) 2>&5
15670 ac_status=$?
15671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15672 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015673 ac_cv_broken_nice=yes
15674else
Martin v. Löwis11437992002-04-12 09:54:03 +000015675 echo "$as_me: program exited with status $ac_status" >&5
15676echo "$as_me: failed program was:" >&5
15677cat conftest.$ac_ext >&5
15678( exit $ac_status )
15679ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015680fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015681rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15682fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015683fi
15684
Martin v. Löwis11437992002-04-12 09:54:03 +000015685echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15686echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015687if test "$ac_cv_broken_nice" = yes
15688then
Martin v. Löwis11437992002-04-12 09:54:03 +000015689
15690cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015691#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015692_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015693
15694fi
15695
Jack Jansen666b1e72001-10-31 12:11:48 +000015696# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015697echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15698echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15699if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15700 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015701else
Martin v. Löwis11437992002-04-12 09:54:03 +000015702 cat >conftest.$ac_ext <<_ACEOF
15703#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015704#include "confdefs.h"
15705#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015706#ifdef F77_DUMMY_MAIN
15707# ifdef __cplusplus
15708 extern "C"
15709# endif
15710 int F77_DUMMY_MAIN() { return 1; }
15711#endif
15712int
15713main ()
15714{
Jack Jansen666b1e72001-10-31 12:11:48 +000015715
15716 int rtn;
15717 rtn = mvwdelch(0,0,0);
15718
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 ;
15720 return 0;
15721}
15722_ACEOF
15723rm -f conftest.$ac_objext
15724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15725 (eval $ac_compile) 2>&5
15726 ac_status=$?
15727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15728 (exit $ac_status); } &&
15729 { ac_try='test -s conftest.$ac_objext'
15730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15731 (eval $ac_try) 2>&5
15732 ac_status=$?
15733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15734 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015735 ac_cv_mvwdelch_is_expression=yes
15736else
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 echo "$as_me: failed program was:" >&5
15738cat conftest.$ac_ext >&5
15739ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015740fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015741rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015742fi
15743
Martin v. Löwis11437992002-04-12 09:54:03 +000015744echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15745echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015746
15747if test "$ac_cv_mvwdelch_is_expression" = yes
15748then
Martin v. Löwis11437992002-04-12 09:54:03 +000015749
15750cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015751#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015752_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015753
15754fi
15755
Martin v. Löwis11437992002-04-12 09:54:03 +000015756echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15757echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15758if test "${ac_cv_window_has_flags+set}" = set; then
15759 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015760else
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 cat >conftest.$ac_ext <<_ACEOF
15762#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015763#include "confdefs.h"
15764#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015765#ifdef F77_DUMMY_MAIN
15766# ifdef __cplusplus
15767 extern "C"
15768# endif
15769 int F77_DUMMY_MAIN() { return 1; }
15770#endif
15771int
15772main ()
15773{
Jack Jansen666b1e72001-10-31 12:11:48 +000015774
15775 WINDOW *w;
15776 w->_flags = 0;
15777
Martin v. Löwis11437992002-04-12 09:54:03 +000015778 ;
15779 return 0;
15780}
15781_ACEOF
15782rm -f conftest.$ac_objext
15783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15784 (eval $ac_compile) 2>&5
15785 ac_status=$?
15786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15787 (exit $ac_status); } &&
15788 { ac_try='test -s conftest.$ac_objext'
15789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15790 (eval $ac_try) 2>&5
15791 ac_status=$?
15792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15793 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015794 ac_cv_window_has_flags=yes
15795else
Martin v. Löwis11437992002-04-12 09:54:03 +000015796 echo "$as_me: failed program was:" >&5
15797cat conftest.$ac_ext >&5
15798ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015799fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015800rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015801fi
15802
Martin v. Löwis11437992002-04-12 09:54:03 +000015803echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15804echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015805
Jack Jansen666b1e72001-10-31 12:11:48 +000015806
15807if test "$ac_cv_window_has_flags" = yes
15808then
Martin v. Löwis11437992002-04-12 09:54:03 +000015809
15810cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015811#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015812_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015813
15814fi
15815
Guido van Rossum95713eb2000-05-18 20:53:31 +000015816# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15817# Add sys/socket.h to confdefs.h
15818cat >> confdefs.h <<\EOF
15819#ifdef HAVE_SYS_SOCKET_H
15820#include <sys/socket.h>
15821#endif
15822EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015823echo "$as_me:$LINENO: checking for socklen_t" >&5
15824echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15825if test "${ac_cv_type_socklen_t+set}" = set; then
15826 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015827else
Martin v. Löwis11437992002-04-12 09:54:03 +000015828 cat >conftest.$ac_ext <<_ACEOF
15829#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015830#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015831$ac_includes_default
15832#ifdef F77_DUMMY_MAIN
15833# ifdef __cplusplus
15834 extern "C"
15835# endif
15836 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015838int
15839main ()
15840{
15841if ((socklen_t *) 0)
15842 return 0;
15843if (sizeof (socklen_t))
15844 return 0;
15845 ;
15846 return 0;
15847}
15848_ACEOF
15849rm -f conftest.$ac_objext
15850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15851 (eval $ac_compile) 2>&5
15852 ac_status=$?
15853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15854 (exit $ac_status); } &&
15855 { ac_try='test -s conftest.$ac_objext'
15856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15857 (eval $ac_try) 2>&5
15858 ac_status=$?
15859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15860 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015861 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015862else
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 echo "$as_me: failed program was:" >&5
15864cat conftest.$ac_ext >&5
15865ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015867rm -f conftest.$ac_objext conftest.$ac_ext
15868fi
15869echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15870echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15871if test $ac_cv_type_socklen_t = yes; then
15872 :
15873else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015874
Martin v. Löwis11437992002-04-12 09:54:03 +000015875cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015876#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015877_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015878
15879fi
15880
Michael W. Hudson54241132001-12-07 15:38:26 +000015881
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015882#AC_MSG_CHECKING(for Modules/Setup)
15883#if test ! -f Modules/Setup ; then
15884# if test ! -d Modules ; then
15885# mkdir Modules
15886# fi
15887# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15888# AC_MSG_RESULT(creating)
15889#else
15890# AC_MSG_RESULT(already exists)
15891#fi
15892
Michael W. Hudson54241132001-12-07 15:38:26 +000015893
15894
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015895for h in `(cd $srcdir;echo Python/thread_*.h)`
15896do
15897 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15898done
15899
Michael W. Hudson54241132001-12-07 15:38:26 +000015900
Jack Jansen0b06be72002-06-21 14:48:38 +000015901SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000015902echo "$as_me:$LINENO: checking for build directories" >&5
15903echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015904for dir in $SRCDIRS; do
15905 if test ! -d $dir; then
15906 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015907 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015908done
Martin v. Löwis11437992002-04-12 09:54:03 +000015909echo "$as_me:$LINENO: result: done" >&5
15910echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015911
Guido van Rossum627b2d71993-12-24 10:39:16 +000015912# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015913ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15914cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015915# This file is a shell script that caches the results of configure
15916# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015917# scripts and configure runs, see configure's option --config-cache.
15918# It is not useful on other systems. If it contains results you don't
15919# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015920#
Martin v. Löwis11437992002-04-12 09:54:03 +000015921# config.status only pays attention to the cache file if you give it
15922# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015923#
Martin v. Löwis11437992002-04-12 09:54:03 +000015924# `ac_cv_env_foo' variables (set or unset) will be overriden when
15925# loading this file, other *unset* `ac_cv_foo' will be assigned the
15926# following values.
15927
15928_ACEOF
15929
Guido van Rossumf78abae1997-01-21 22:02:36 +000015930# The following way of writing the cache mishandles newlines in values,
15931# but we know of no workaround that is simple, portable, and efficient.
15932# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015933# Ultrix sh set writes to stderr and can't be redirected directly,
15934# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015935{
15936 (set) 2>&1 |
15937 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15938 *ac_space=\ *)
15939 # `set' does not quote correctly, so add quotes (double-quote
15940 # substitution turns \\\\ into \\, and sed turns \\ into \).
15941 sed -n \
15942 "s/'/'\\\\''/g;
15943 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15944 ;;
15945 *)
15946 # `set' quotes correctly as required by POSIX, so do not add quotes.
15947 sed -n \
15948 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15949 ;;
15950 esac;
15951} |
15952 sed '
15953 t clear
15954 : clear
15955 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15956 t end
15957 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15958 : end' >>confcache
15959if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015960 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15962 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015963 else
15964 echo "not updating unwritable cache $cache_file"
15965 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015966fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015967rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015968
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015969test "x$prefix" = xNONE && prefix=$ac_default_prefix
15970# Let make expand exec_prefix.
15971test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015972
Martin v. Löwis11437992002-04-12 09:54:03 +000015973# VPATH may cause trouble with some makes, so we remove $(srcdir),
15974# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15975# trailing colons and then remove the whole line if VPATH becomes empty
15976# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015977if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015978 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15979s/:*\$(srcdir):*/:/;
15980s/:*\${srcdir}:*/:/;
15981s/:*@srcdir@:*/:/;
15982s/^\([^=]*=[ ]*\):*/\1/;
15983s/:*$//;
15984s/^[^=]*=[ ]*$//;
15985}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015986fi
15987
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015988DEFS=-DHAVE_CONFIG_H
15989
Martin v. Löwis11437992002-04-12 09:54:03 +000015990
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015991: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015992ac_clean_files_save=$ac_clean_files
15993ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15994{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15995echo "$as_me: creating $CONFIG_STATUS" >&6;}
15996cat >$CONFIG_STATUS <<_ACEOF
15997#! $SHELL
15998# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015999# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016000# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016001# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016002
Martin v. Löwis11437992002-04-12 09:54:03 +000016003debug=false
16004SHELL=\${CONFIG_SHELL-$SHELL}
16005_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016006
Martin v. Löwis11437992002-04-12 09:54:03 +000016007cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016008
Martin v. Löwis11437992002-04-12 09:54:03 +000016009## --------------------- ##
16010## M4sh Initialization. ##
16011## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016012
Martin v. Löwis11437992002-04-12 09:54:03 +000016013# Be Bourne compatible
16014if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16015 emulate sh
16016 NULLCMD=:
16017elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16018 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016019fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016020
Martin v. Löwis11437992002-04-12 09:54:03 +000016021# NLS nuisances.
16022# Support unset when possible.
16023if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16024 as_unset=unset
16025else
16026 as_unset=false
16027fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016028
Martin v. Löwis11437992002-04-12 09:54:03 +000016029(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16030 { $as_unset LANG || test "${LANG+set}" != set; } ||
16031 { LANG=C; export LANG; }
16032(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16033 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16034 { LC_ALL=C; export LC_ALL; }
16035(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16036 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16037 { LC_TIME=C; export LC_TIME; }
16038(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16039 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16040 { LC_CTYPE=C; export LC_CTYPE; }
16041(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16042 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16043 { LANGUAGE=C; export LANGUAGE; }
16044(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16045 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16046 { LC_COLLATE=C; export LC_COLLATE; }
16047(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16048 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16049 { LC_NUMERIC=C; export LC_NUMERIC; }
16050(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16051 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16052 { LC_MESSAGES=C; export LC_MESSAGES; }
16053
16054
16055# Name of the executable.
16056as_me=`(basename "$0") 2>/dev/null ||
16057$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16058 X"$0" : 'X\(//\)$' \| \
16059 X"$0" : 'X\(/\)$' \| \
16060 . : '\(.\)' 2>/dev/null ||
16061echo X/"$0" |
16062 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16063 /^X\/\(\/\/\)$/{ s//\1/; q; }
16064 /^X\/\(\/\).*/{ s//\1/; q; }
16065 s/.*/./; q'`
16066
16067# PATH needs CR, and LINENO needs CR and PATH.
16068# Avoid depending upon Character Ranges.
16069as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16070as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16071as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16072as_cr_digits='0123456789'
16073as_cr_alnum=$as_cr_Letters$as_cr_digits
16074
16075# The user is always right.
16076if test "${PATH_SEPARATOR+set}" != set; then
16077 echo "#! /bin/sh" >conftest.sh
16078 echo "exit 0" >>conftest.sh
16079 chmod +x conftest.sh
16080 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16081 PATH_SEPARATOR=';'
16082 else
16083 PATH_SEPARATOR=:
16084 fi
16085 rm -f conftest.sh
16086fi
16087
16088
16089 as_lineno_1=$LINENO
16090 as_lineno_2=$LINENO
16091 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16092 test "x$as_lineno_1" != "x$as_lineno_2" &&
16093 test "x$as_lineno_3" = "x$as_lineno_2" || {
16094 # Find who we are. Look in the path if we contain no path at all
16095 # relative or not.
16096 case $0 in
16097 *[\\/]* ) as_myself=$0 ;;
16098 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16099for as_dir in $PATH
16100do
16101 IFS=$as_save_IFS
16102 test -z "$as_dir" && as_dir=.
16103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16104done
16105
16106 ;;
16107 esac
16108 # We did not find ourselves, most probably we were run as `sh COMMAND'
16109 # in which case we are not to be found in the path.
16110 if test "x$as_myself" = x; then
16111 as_myself=$0
16112 fi
16113 if test ! -f "$as_myself"; then
16114 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16115echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16116 { (exit 1); exit 1; }; }
16117 fi
16118 case $CONFIG_SHELL in
16119 '')
16120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16121for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16122do
16123 IFS=$as_save_IFS
16124 test -z "$as_dir" && as_dir=.
16125 for as_base in sh bash ksh sh5; do
16126 case $as_dir in
16127 /*)
16128 if ("$as_dir/$as_base" -c '
16129 as_lineno_1=$LINENO
16130 as_lineno_2=$LINENO
16131 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16132 test "x$as_lineno_1" != "x$as_lineno_2" &&
16133 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16134 CONFIG_SHELL=$as_dir/$as_base
16135 export CONFIG_SHELL
16136 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16137 fi;;
16138 esac
16139 done
16140done
16141;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016142 esac
16143
Martin v. Löwis11437992002-04-12 09:54:03 +000016144 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16145 # uniformly replaced by the line number. The first 'sed' inserts a
16146 # line-number line before each line; the second 'sed' does the real
16147 # work. The second script uses 'N' to pair each line-number line
16148 # with the numbered line, and appends trailing '-' during
16149 # substitution so that $LINENO is not a special case at line end.
16150 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16151 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16152 sed '=' <$as_myself |
16153 sed '
16154 N
16155 s,$,-,
16156 : loop
16157 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16158 t loop
16159 s,-$,,
16160 s,^['$as_cr_digits']*\n,,
16161 ' >$as_me.lineno &&
16162 chmod +x $as_me.lineno ||
16163 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16164echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16165 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016166
Martin v. Löwis11437992002-04-12 09:54:03 +000016167 # Don't try to exec as it changes $[0], causing all sort of problems
16168 # (the dirname of $[0] is not the place where we might find the
16169 # original and so on. Autoconf is especially sensible to this).
16170 . ./$as_me.lineno
16171 # Exit status is that of the last command.
16172 exit
16173}
16174
16175
16176case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16177 *c*,-n*) ECHO_N= ECHO_C='
16178' ECHO_T=' ' ;;
16179 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16180 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16181esac
16182
16183if expr a : '\(a\)' >/dev/null 2>&1; then
16184 as_expr=expr
16185else
16186 as_expr=false
16187fi
16188
16189rm -f conf$$ conf$$.exe conf$$.file
16190echo >conf$$.file
16191if ln -s conf$$.file conf$$ 2>/dev/null; then
16192 # We could just check for DJGPP; but this test a) works b) is more generic
16193 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16194 if test -f conf$$.exe; then
16195 # Don't use ln at all; we don't have any links
16196 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016197 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016198 as_ln_s='ln -s'
16199 fi
16200elif ln conf$$.file conf$$ 2>/dev/null; then
16201 as_ln_s=ln
16202else
16203 as_ln_s='cp -p'
16204fi
16205rm -f conf$$ conf$$.exe conf$$.file
16206
16207as_executable_p="test -f"
16208
16209# Sed expression to map a string onto a valid CPP name.
16210as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16211
16212# Sed expression to map a string onto a valid variable name.
16213as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16214
16215
16216# IFS
16217# We need space, tab and new line, in precisely that order.
16218as_nl='
16219'
16220IFS=" $as_nl"
16221
16222# CDPATH.
16223$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16224
16225exec 6>&1
16226
16227# Open the log real soon, to keep \$[0] and so on meaningful, and to
16228# report actual input values of CONFIG_FILES etc. instead of their
16229# values after options handling. Logging --version etc. is OK.
16230exec 5>>config.log
16231{
16232 echo
16233 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16234## Running $as_me. ##
16235_ASBOX
16236} >&5
16237cat >&5 <<_CSEOF
16238
16239This file was extended by $as_me, which was
16240generated by GNU Autoconf 2.53. Invocation command line was
16241
16242 CONFIG_FILES = $CONFIG_FILES
16243 CONFIG_HEADERS = $CONFIG_HEADERS
16244 CONFIG_LINKS = $CONFIG_LINKS
16245 CONFIG_COMMANDS = $CONFIG_COMMANDS
16246 $ $0 $@
16247
16248_CSEOF
16249echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16250echo >&5
16251_ACEOF
16252
16253# Files that config.status was made for.
16254if test -n "$ac_config_files"; then
16255 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16256fi
16257
16258if test -n "$ac_config_headers"; then
16259 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16260fi
16261
16262if test -n "$ac_config_links"; then
16263 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16264fi
16265
16266if test -n "$ac_config_commands"; then
16267 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16268fi
16269
16270cat >>$CONFIG_STATUS <<\_ACEOF
16271
16272ac_cs_usage="\
16273\`$as_me' instantiates files from templates according to the
16274current configuration.
16275
16276Usage: $0 [OPTIONS] [FILE]...
16277
16278 -h, --help print this help, then exit
16279 -V, --version print version number, then exit
16280 -d, --debug don't remove temporary files
16281 --recheck update $as_me by reconfiguring in the same conditions
16282 --file=FILE[:TEMPLATE]
16283 instantiate the configuration file FILE
16284 --header=FILE[:TEMPLATE]
16285 instantiate the configuration header FILE
16286
16287Configuration files:
16288$config_files
16289
16290Configuration headers:
16291$config_headers
16292
16293Report bugs to <bug-autoconf@gnu.org>."
16294_ACEOF
16295
16296cat >>$CONFIG_STATUS <<_ACEOF
16297ac_cs_version="\\
16298config.status
16299configured by $0, generated by GNU Autoconf 2.53,
16300 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16301
16302Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16303Free Software Foundation, Inc.
16304This config.status script is free software; the Free Software Foundation
16305gives unlimited permission to copy, distribute and modify it."
16306srcdir=$srcdir
16307INSTALL="$INSTALL"
16308_ACEOF
16309
16310cat >>$CONFIG_STATUS <<\_ACEOF
16311# If no file are specified by the user, then we need to provide default
16312# value. By we need to know if files were specified by the user.
16313ac_need_defaults=:
16314while test $# != 0
16315do
16316 case $1 in
16317 --*=*)
16318 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16319 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16320 shift
16321 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16322 shift
16323 ;;
16324 -*);;
16325 *) # This is not an option, so the user has probably given explicit
16326 # arguments.
16327 ac_need_defaults=false;;
16328 esac
16329
16330 case $1 in
16331 # Handling of the options.
16332_ACEOF
16333cat >>$CONFIG_STATUS <<_ACEOF
16334 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16335 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16336 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16337_ACEOF
16338cat >>$CONFIG_STATUS <<\_ACEOF
16339 --version | --vers* | -V )
16340 echo "$ac_cs_version"; exit 0 ;;
16341 --he | --h)
16342 # Conflict between --help and --header
16343 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16344Try \`$0 --help' for more information." >&5
16345echo "$as_me: error: ambiguous option: $1
16346Try \`$0 --help' for more information." >&2;}
16347 { (exit 1); exit 1; }; };;
16348 --help | --hel | -h )
16349 echo "$ac_cs_usage"; exit 0 ;;
16350 --debug | --d* | -d )
16351 debug=: ;;
16352 --file | --fil | --fi | --f )
16353 shift
16354 CONFIG_FILES="$CONFIG_FILES $1"
16355 ac_need_defaults=false;;
16356 --header | --heade | --head | --hea )
16357 shift
16358 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16359 ac_need_defaults=false;;
16360
16361 # This is an error.
16362 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16363Try \`$0 --help' for more information." >&5
16364echo "$as_me: error: unrecognized option: $1
16365Try \`$0 --help' for more information." >&2;}
16366 { (exit 1); exit 1; }; } ;;
16367
16368 *) ac_config_targets="$ac_config_targets $1" ;;
16369
16370 esac
16371 shift
16372done
16373
16374_ACEOF
16375
16376
16377
16378
16379
16380cat >>$CONFIG_STATUS <<\_ACEOF
16381for ac_config_target in $ac_config_targets
16382do
16383 case "$ac_config_target" in
16384 # Handling of arguments.
16385 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16386 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16387 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16388 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16389echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16390 { (exit 1); exit 1; }; };;
16391 esac
16392done
16393
16394# If the user did not use the arguments to specify the items to instantiate,
16395# then the envvar interface is used. Set only those that are not.
16396# We use the long form for the default assignment because of an extremely
16397# bizarre bug on SunOS 4.1.3.
16398if $ac_need_defaults; then
16399 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16400 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16401fi
16402
16403# Create a temporary directory, and hook for its removal unless debugging.
16404$debug ||
16405{
16406 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16407 trap '{ (exit 1); exit 1; }' 1 2 13 15
16408}
16409
16410# Create a (secure) tmp directory for tmp files.
16411: ${TMPDIR=/tmp}
16412{
16413 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16414 test -n "$tmp" && test -d "$tmp"
16415} ||
16416{
16417 tmp=$TMPDIR/cs$$-$RANDOM
16418 (umask 077 && mkdir $tmp)
16419} ||
16420{
16421 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16422 { (exit 1); exit 1; }
16423}
16424
16425_ACEOF
16426
16427cat >>$CONFIG_STATUS <<_ACEOF
16428
16429#
16430# CONFIG_FILES section.
16431#
16432
16433# No need to generate the scripts if there are no CONFIG_FILES.
16434# This happens for instance when ./config.status config.h
16435if test -n "\$CONFIG_FILES"; then
16436 # Protect against being on the right side of a sed subst in config.status.
16437 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16438 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16439s,@SHELL@,$SHELL,;t t
16440s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16441s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16442s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16443s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16444s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16445s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16446s,@exec_prefix@,$exec_prefix,;t t
16447s,@prefix@,$prefix,;t t
16448s,@program_transform_name@,$program_transform_name,;t t
16449s,@bindir@,$bindir,;t t
16450s,@sbindir@,$sbindir,;t t
16451s,@libexecdir@,$libexecdir,;t t
16452s,@datadir@,$datadir,;t t
16453s,@sysconfdir@,$sysconfdir,;t t
16454s,@sharedstatedir@,$sharedstatedir,;t t
16455s,@localstatedir@,$localstatedir,;t t
16456s,@libdir@,$libdir,;t t
16457s,@includedir@,$includedir,;t t
16458s,@oldincludedir@,$oldincludedir,;t t
16459s,@infodir@,$infodir,;t t
16460s,@mandir@,$mandir,;t t
16461s,@build_alias@,$build_alias,;t t
16462s,@host_alias@,$host_alias,;t t
16463s,@target_alias@,$target_alias,;t t
16464s,@DEFS@,$DEFS,;t t
16465s,@ECHO_C@,$ECHO_C,;t t
16466s,@ECHO_N@,$ECHO_N,;t t
16467s,@ECHO_T@,$ECHO_T,;t t
16468s,@LIBS@,$LIBS,;t t
16469s,@VERSION@,$VERSION,;t t
16470s,@SOVERSION@,$SOVERSION,;t t
16471s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16472s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16473s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16474s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16475s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16476s,@MACHDEP@,$MACHDEP,;t t
16477s,@SGI_ABI@,$SGI_ABI,;t t
16478s,@CXX@,$CXX,;t t
16479s,@MAINOBJ@,$MAINOBJ,;t t
16480s,@EXEEXT@,$EXEEXT,;t t
16481s,@CC@,$CC,;t t
16482s,@CFLAGS@,$CFLAGS,;t t
16483s,@LDFLAGS@,$LDFLAGS,;t t
16484s,@CPPFLAGS@,$CPPFLAGS,;t t
16485s,@ac_ct_CC@,$ac_ct_CC,;t t
16486s,@OBJEXT@,$OBJEXT,;t t
16487s,@CPP@,$CPP,;t t
16488s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16489s,@LIBRARY@,$LIBRARY,;t t
16490s,@LDLIBRARY@,$LDLIBRARY,;t t
16491s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16492s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16493s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16494s,@INSTSONAME@,$INSTSONAME,;t t
16495s,@RUNSHARED@,$RUNSHARED,;t t
16496s,@LINKCC@,$LINKCC,;t t
16497s,@RANLIB@,$RANLIB,;t t
16498s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16499s,@AR@,$AR,;t t
16500s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16501s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16502s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16503s,@LN@,$LN,;t t
16504s,@OPT@,$OPT,;t t
16505s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16506s,@SO@,$SO,;t t
16507s,@LDSHARED@,$LDSHARED,;t t
16508s,@BLDSHARED@,$BLDSHARED,;t t
16509s,@CCSHARED@,$CCSHARED,;t t
16510s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16511s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016512s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016513s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16514s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16515s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16516s,@LDLAST@,$LDLAST,;t t
16517s,@THREADOBJ@,$THREADOBJ,;t t
16518s,@DLINCLDIR@,$DLINCLDIR,;t t
16519s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16520s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16521s,@LIBOBJS@,$LIBOBJS,;t t
16522s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16523s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16524s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16525s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16526s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16527s,@LIBM@,$LIBM,;t t
16528s,@LIBC@,$LIBC,;t t
16529s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16530s,@THREADHEADERS@,$THREADHEADERS,;t t
16531s,@SRCDIRS@,$SRCDIRS,;t t
16532CEOF
16533
16534_ACEOF
16535
16536 cat >>$CONFIG_STATUS <<\_ACEOF
16537 # Split the substitutions into bite-sized pieces for seds with
16538 # small command number limits, like on Digital OSF/1 and HP-UX.
16539 ac_max_sed_lines=48
16540 ac_sed_frag=1 # Number of current file.
16541 ac_beg=1 # First line for current file.
16542 ac_end=$ac_max_sed_lines # Line after last line for current file.
16543 ac_more_lines=:
16544 ac_sed_cmds=
16545 while $ac_more_lines; do
16546 if test $ac_beg -gt 1; then
16547 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16548 else
16549 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16550 fi
16551 if test ! -s $tmp/subs.frag; then
16552 ac_more_lines=false
16553 else
16554 # The purpose of the label and of the branching condition is to
16555 # speed up the sed processing (if there are no `@' at all, there
16556 # is no need to browse any of the substitutions).
16557 # These are the two extra sed commands mentioned above.
16558 (echo ':t
16559 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16560 if test -z "$ac_sed_cmds"; then
16561 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16562 else
16563 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16564 fi
16565 ac_sed_frag=`expr $ac_sed_frag + 1`
16566 ac_beg=$ac_end
16567 ac_end=`expr $ac_end + $ac_max_sed_lines`
16568 fi
16569 done
16570 if test -z "$ac_sed_cmds"; then
16571 ac_sed_cmds=cat
16572 fi
16573fi # test -n "$CONFIG_FILES"
16574
16575_ACEOF
16576cat >>$CONFIG_STATUS <<\_ACEOF
16577for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16578 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16579 case $ac_file in
16580 - | *:- | *:-:* ) # input from stdin
16581 cat >$tmp/stdin
16582 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16583 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16584 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16585 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16586 * ) ac_file_in=$ac_file.in ;;
16587 esac
16588
16589 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16590 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16591$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16592 X"$ac_file" : 'X\(//\)[^/]' \| \
16593 X"$ac_file" : 'X\(//\)$' \| \
16594 X"$ac_file" : 'X\(/\)' \| \
16595 . : '\(.\)' 2>/dev/null ||
16596echo X"$ac_file" |
16597 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16598 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16599 /^X\(\/\/\)$/{ s//\1/; q; }
16600 /^X\(\/\).*/{ s//\1/; q; }
16601 s/.*/./; q'`
16602 { case "$ac_dir" in
16603 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16604 *) as_incr_dir=.;;
16605esac
16606as_dummy="$ac_dir"
16607for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16608 case $as_mkdir_dir in
16609 # Skip DOS drivespec
16610 ?:) as_incr_dir=$as_mkdir_dir ;;
16611 *)
16612 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16613 test -d "$as_incr_dir" ||
16614 mkdir "$as_incr_dir" ||
16615 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16616echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16617 { (exit 1); exit 1; }; }
16618 ;;
16619 esac
16620done; }
16621
16622 ac_builddir=.
16623
16624if test "$ac_dir" != .; then
16625 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16626 # A "../" for each directory in $ac_dir_suffix.
16627 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16628else
16629 ac_dir_suffix= ac_top_builddir=
16630fi
16631
16632case $srcdir in
16633 .) # No --srcdir option. We are building in place.
16634 ac_srcdir=.
16635 if test -z "$ac_top_builddir"; then
16636 ac_top_srcdir=.
16637 else
16638 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16639 fi ;;
16640 [\\/]* | ?:[\\/]* ) # Absolute path.
16641 ac_srcdir=$srcdir$ac_dir_suffix;
16642 ac_top_srcdir=$srcdir ;;
16643 *) # Relative path.
16644 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16645 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16646esac
16647# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16648# absolute.
16649ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16650ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16651ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16652ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16653
16654
16655 case $INSTALL in
16656 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16657 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16658 esac
16659
16660 if test x"$ac_file" != x-; then
16661 { echo "$as_me:$LINENO: creating $ac_file" >&5
16662echo "$as_me: creating $ac_file" >&6;}
16663 rm -f "$ac_file"
16664 fi
16665 # Let's still pretend it is `configure' which instantiates (i.e., don't
16666 # use $as_me), people would be surprised to read:
16667 # /* config.h. Generated by config.status. */
16668 if test x"$ac_file" = x-; then
16669 configure_input=
16670 else
16671 configure_input="$ac_file. "
16672 fi
16673 configure_input=$configure_input"Generated from `echo $ac_file_in |
16674 sed 's,.*/,,'` by configure."
16675
16676 # First look for the input files in the build tree, otherwise in the
16677 # src tree.
16678 ac_file_inputs=`IFS=:
16679 for f in $ac_file_in; do
16680 case $f in
16681 -) echo $tmp/stdin ;;
16682 [\\/$]*)
16683 # Absolute (can't be DOS-style, as IFS=:)
16684 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16685echo "$as_me: error: cannot find input file: $f" >&2;}
16686 { (exit 1); exit 1; }; }
16687 echo $f;;
16688 *) # Relative
16689 if test -f "$f"; then
16690 # Build tree
16691 echo $f
16692 elif test -f "$srcdir/$f"; then
16693 # Source tree
16694 echo $srcdir/$f
16695 else
16696 # /dev/null tree
16697 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16698echo "$as_me: error: cannot find input file: $f" >&2;}
16699 { (exit 1); exit 1; }; }
16700 fi;;
16701 esac
16702 done` || { (exit 1); exit 1; }
16703_ACEOF
16704cat >>$CONFIG_STATUS <<_ACEOF
16705 sed "$ac_vpsub
16706$extrasub
16707_ACEOF
16708cat >>$CONFIG_STATUS <<\_ACEOF
16709:t
16710/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16711s,@configure_input@,$configure_input,;t t
16712s,@srcdir@,$ac_srcdir,;t t
16713s,@abs_srcdir@,$ac_abs_srcdir,;t t
16714s,@top_srcdir@,$ac_top_srcdir,;t t
16715s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16716s,@builddir@,$ac_builddir,;t t
16717s,@abs_builddir@,$ac_abs_builddir,;t t
16718s,@top_builddir@,$ac_top_builddir,;t t
16719s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16720s,@INSTALL@,$ac_INSTALL,;t t
16721" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16722 rm -f $tmp/stdin
16723 if test x"$ac_file" != x-; then
16724 mv $tmp/out $ac_file
16725 else
16726 cat $tmp/out
16727 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016728 fi
16729
Martin v. Löwis11437992002-04-12 09:54:03 +000016730done
16731_ACEOF
16732cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016733
Martin v. Löwis11437992002-04-12 09:54:03 +000016734#
16735# CONFIG_HEADER section.
16736#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016737
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016738# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16739# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016740#
16741# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016742ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16743ac_dB='[ ].*$,\1#\2'
16744ac_dC=' '
16745ac_dD=',;t'
16746# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16747ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16748ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016749ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016750ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016751
Martin v. Löwis11437992002-04-12 09:54:03 +000016752for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016753 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016754 case $ac_file in
16755 - | *:- | *:-:* ) # input from stdin
16756 cat >$tmp/stdin
16757 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16758 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16759 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16760 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16761 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016762 esac
16763
Martin v. Löwis11437992002-04-12 09:54:03 +000016764 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16765echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016766
Martin v. Löwis11437992002-04-12 09:54:03 +000016767 # First look for the input files in the build tree, otherwise in the
16768 # src tree.
16769 ac_file_inputs=`IFS=:
16770 for f in $ac_file_in; do
16771 case $f in
16772 -) echo $tmp/stdin ;;
16773 [\\/$]*)
16774 # Absolute (can't be DOS-style, as IFS=:)
16775 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16776echo "$as_me: error: cannot find input file: $f" >&2;}
16777 { (exit 1); exit 1; }; }
16778 echo $f;;
16779 *) # Relative
16780 if test -f "$f"; then
16781 # Build tree
16782 echo $f
16783 elif test -f "$srcdir/$f"; then
16784 # Source tree
16785 echo $srcdir/$f
16786 else
16787 # /dev/null tree
16788 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16789echo "$as_me: error: cannot find input file: $f" >&2;}
16790 { (exit 1); exit 1; }; }
16791 fi;;
16792 esac
16793 done` || { (exit 1); exit 1; }
16794 # Remove the trailing spaces.
16795 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016796
Martin v. Löwis11437992002-04-12 09:54:03 +000016797_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016798
Martin v. Löwis11437992002-04-12 09:54:03 +000016799# Transform confdefs.h into two sed scripts, `conftest.defines' and
16800# `conftest.undefs', that substitutes the proper values into
16801# config.h.in to produce config.h. The first handles `#define'
16802# templates, and the second `#undef' templates.
16803# And first: Protect against being on the right side of a sed subst in
16804# config.status. Protect against being in an unquoted here document
16805# in config.status.
16806rm -f conftest.defines conftest.undefs
16807# Using a here document instead of a string reduces the quoting nightmare.
16808# Putting comments in sed scripts is not portable.
16809#
16810# `end' is used to avoid that the second main sed command (meant for
16811# 0-ary CPP macros) applies to n-ary macro definitions.
16812# See the Autoconf documentation for `clear'.
16813cat >confdef2sed.sed <<\_ACEOF
16814s/[\\&,]/\\&/g
16815s,[\\$`],\\&,g
16816t clear
16817: clear
16818s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16819t end
16820s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16821: end
16822_ACEOF
16823# If some macros were called several times there might be several times
16824# the same #defines, which is useless. Nevertheless, we may not want to
16825# sort them, since we want the *last* AC-DEFINE to be honored.
16826uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16827sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16828rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016829
16830# This sed command replaces #undef with comments. This is necessary, for
16831# example, in the case of _POSIX_SOURCE, which is predefined and required
16832# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016833cat >>conftest.undefs <<\_ACEOF
16834s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16835_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016836
Martin v. Löwis11437992002-04-12 09:54:03 +000016837# Break up conftest.defines because some shells have a limit on the size
16838# of here documents, and old seds have small limits too (100 cmds).
16839echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16840echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16841echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16842echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016843rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016844while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016845do
Martin v. Löwis11437992002-04-12 09:54:03 +000016846 # Write a limited-size here document to $tmp/defines.sed.
16847 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16848 # Speed up: don't consider the non `#define' lines.
16849 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16850 # Work around the forget-to-reset-the-flag bug.
16851 echo 't clr' >>$CONFIG_STATUS
16852 echo ': clr' >>$CONFIG_STATUS
16853 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016854 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016855 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16856 rm -f $tmp/in
16857 mv $tmp/out $tmp/in
16858' >>$CONFIG_STATUS
16859 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16860 rm -f conftest.defines
16861 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016862done
Martin v. Löwis11437992002-04-12 09:54:03 +000016863rm -f conftest.defines
16864echo ' fi # egrep' >>$CONFIG_STATUS
16865echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016866
Martin v. Löwis11437992002-04-12 09:54:03 +000016867# Break up conftest.undefs because some shells have a limit on the size
16868# of here documents, and old seds have small limits too (100 cmds).
16869echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16870rm -f conftest.tail
16871while grep . conftest.undefs >/dev/null
16872do
16873 # Write a limited-size here document to $tmp/undefs.sed.
16874 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16875 # Speed up: don't consider the non `#undef'
16876 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16877 # Work around the forget-to-reset-the-flag bug.
16878 echo 't clr' >>$CONFIG_STATUS
16879 echo ': clr' >>$CONFIG_STATUS
16880 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16881 echo 'CEOF
16882 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16883 rm -f $tmp/in
16884 mv $tmp/out $tmp/in
16885' >>$CONFIG_STATUS
16886 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16887 rm -f conftest.undefs
16888 mv conftest.tail conftest.undefs
16889done
16890rm -f conftest.undefs
16891
16892cat >>$CONFIG_STATUS <<\_ACEOF
16893 # Let's still pretend it is `configure' which instantiates (i.e., don't
16894 # use $as_me), people would be surprised to read:
16895 # /* config.h. Generated by config.status. */
16896 if test x"$ac_file" = x-; then
16897 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016898 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016899 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016900 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016901 cat $tmp/in >>$tmp/config.h
16902 rm -f $tmp/in
16903 if test x"$ac_file" != x-; then
16904 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16905 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16906echo "$as_me: $ac_file is unchanged" >&6;}
16907 else
16908 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16909$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16910 X"$ac_file" : 'X\(//\)[^/]' \| \
16911 X"$ac_file" : 'X\(//\)$' \| \
16912 X"$ac_file" : 'X\(/\)' \| \
16913 . : '\(.\)' 2>/dev/null ||
16914echo X"$ac_file" |
16915 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16916 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16917 /^X\(\/\/\)$/{ s//\1/; q; }
16918 /^X\(\/\).*/{ s//\1/; q; }
16919 s/.*/./; q'`
16920 { case "$ac_dir" in
16921 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16922 *) as_incr_dir=.;;
16923esac
16924as_dummy="$ac_dir"
16925for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16926 case $as_mkdir_dir in
16927 # Skip DOS drivespec
16928 ?:) as_incr_dir=$as_mkdir_dir ;;
16929 *)
16930 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16931 test -d "$as_incr_dir" ||
16932 mkdir "$as_incr_dir" ||
16933 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16934echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16935 { (exit 1); exit 1; }; }
16936 ;;
16937 esac
16938done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016939
Martin v. Löwis11437992002-04-12 09:54:03 +000016940 rm -f $ac_file
16941 mv $tmp/config.h $ac_file
16942 fi
16943 else
16944 cat $tmp/config.h
16945 rm -f $tmp/config.h
16946 fi
16947done
16948_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016949
Martin v. Löwis11437992002-04-12 09:54:03 +000016950cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016951
Martin v. Löwis11437992002-04-12 09:54:03 +000016952{ (exit 0); exit 0; }
16953_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016954chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016955ac_clean_files=$ac_clean_files_save
16956
16957
16958# configure is writing to config.log, and then calls config.status.
16959# config.status does its own redirection, appending to config.log.
16960# Unfortunately, on DOS this fails, as config.log is still kept open
16961# by configure, so config.status won't be able to write to it; its
16962# output is simply discarded. So we exec the FD to /dev/null,
16963# effectively closing config.log, so it can be properly (re)opened and
16964# appended to by config.status. When coming back to configure, we
16965# need to make the FD available again.
16966if test "$no_create" != yes; then
16967 ac_cs_success=:
16968 exec 5>/dev/null
16969 $SHELL $CONFIG_STATUS || ac_cs_success=false
16970 exec 5>>config.log
16971 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16972 # would make configure fail if this is the last instruction.
16973 $ac_cs_success || { (exit 1); exit 1; }
16974fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016975
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016976
16977echo "creating Setup"
16978if test ! -f Modules/Setup
16979then
16980 cp $srcdir/Modules/Setup.dist Modules/Setup
16981fi
16982
16983echo "creating Setup.local"
16984if test ! -f Modules/Setup.local
16985then
16986 echo "# Edit this file for local setup changes" >Modules/Setup.local
16987fi
16988
16989echo "creating Makefile"
16990$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16991 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016992 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016993mv config.c Modules