blob: b08af5d62d8f43b1a0066ca119fef1e93d3066c1 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00002# From configure.in Revision: 1.321 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis11437992002-04-12 09:54:03 +00004# Generated by GNU Autoconf 2.53.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
30# NLS nuisances.
31# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
38(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
256PACKAGE_NAME=
257PACKAGE_TARNAME=
258PACKAGE_VERSION=
259PACKAGE_STRING=
260PACKAGE_BUGREPORT=
261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
764\`configure' configures this package to adapt to many kinds of systems.
765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
820
821 cat <<\_ACEOF
822
823Optional Features:
824 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
825 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
826 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
827 --enable-shared disable/enable building shared python library
828 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
829 --enable-ipv6 Enable ipv6 (with ipv4) support
830 --disable-ipv6 Disable ipv6 support
831 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
832
833Optional Packages:
834 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
835 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
836 --without-gcc never use gcc
837 --with-cxx=<compiler> enable C++ support
838 --with-suffix=.exe set executable suffix
839 --with-pydebug build with Py_DEBUG defined
840 --with-libs='lib1 ...' link against additional libs
841 --with-signal-module disable/enable signal module
842 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
843 --with(out)-threads=DIRECTORY disable/enable thread support
844 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
845 --with-pth use GNU pth threading libraries
846 --with(out)-cycle-gc disable/enable garbage collection
Jack Jansen7b8c7542002-04-14 20:12:41 +0000847 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +0000848 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 --with(out)-pymalloc disable/enable specialized mallocs
850 --with-wctype-functions use wctype.h functions
851 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
852 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
853 --with-fpectl enable SIGFPE catching
854 --with-libm=STRING math library
855 --with-libc=STRING C library
856
857Some influential environment variables:
858 CC C compiler command
859 CFLAGS C compiler flags
860 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
861 nonstandard directory <lib dir>
862 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
863 headers in a nonstandard directory <include dir>
864 CPP C preprocessor
865
866Use these variables to override the choices made by `configure' or to help
867it to find libraries and programs with nonstandard names/locations.
868
869_ACEOF
870fi
871
872if test "$ac_init_help" = "recursive"; then
873 # If there are subdirs, report their specific --help.
874 ac_popdir=`pwd`
875 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
876 test -d $ac_dir || continue
877 ac_builddir=.
878
879if test "$ac_dir" != .; then
880 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
881 # A "../" for each directory in $ac_dir_suffix.
882 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
883else
884 ac_dir_suffix= ac_top_builddir=
885fi
886
887case $srcdir in
888 .) # No --srcdir option. We are building in place.
889 ac_srcdir=.
890 if test -z "$ac_top_builddir"; then
891 ac_top_srcdir=.
892 else
893 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
894 fi ;;
895 [\\/]* | ?:[\\/]* ) # Absolute path.
896 ac_srcdir=$srcdir$ac_dir_suffix;
897 ac_top_srcdir=$srcdir ;;
898 *) # Relative path.
899 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
900 ac_top_srcdir=$ac_top_builddir$srcdir ;;
901esac
902# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
903# absolute.
904ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
905ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
906ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
907ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
908
909 cd $ac_dir
910 # Check for guested configure; otherwise get Cygnus style configure.
911 if test -f $ac_srcdir/configure.gnu; then
912 echo
913 $SHELL $ac_srcdir/configure.gnu --help=recursive
914 elif test -f $ac_srcdir/configure; then
915 echo
916 $SHELL $ac_srcdir/configure --help=recursive
917 elif test -f $ac_srcdir/configure.ac ||
918 test -f $ac_srcdir/configure.in; then
919 echo
920 $ac_configure --help
921 else
922 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
923 fi
924 cd $ac_popdir
925 done
926fi
927
928test -n "$ac_init_help" && exit 0
929if $ac_init_version; then
930 cat <<\_ACEOF
931
932Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
933Free Software Foundation, Inc.
934This configure script is free software; the Free Software Foundation
935gives unlimited permission to copy, distribute and modify it.
936_ACEOF
937 exit 0
938fi
939exec 5>config.log
940cat >&5 <<_ACEOF
941This file contains any messages produced by compilers while
942running configure, to aid debugging if configure makes a mistake.
943
944It was created by $as_me, which was
945generated by GNU Autoconf 2.53. Invocation command line was
946
947 $ $0 $@
948
949_ACEOF
950{
951cat <<_ASUNAME
952## --------- ##
953## Platform. ##
954## --------- ##
955
956hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
957uname -m = `(uname -m) 2>/dev/null || echo unknown`
958uname -r = `(uname -r) 2>/dev/null || echo unknown`
959uname -s = `(uname -s) 2>/dev/null || echo unknown`
960uname -v = `(uname -v) 2>/dev/null || echo unknown`
961
962/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
963/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
964
965/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
966/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
967/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
968hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
969/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
970/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
971/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
972
973_ASUNAME
974
975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
976for as_dir in $PATH
977do
978 IFS=$as_save_IFS
979 test -z "$as_dir" && as_dir=.
980 echo "PATH: $as_dir"
981done
982
983} >&5
984
985cat >&5 <<_ACEOF
986
987
988## ----------- ##
989## Core tests. ##
990## ----------- ##
991
992_ACEOF
993
994
995# Keep a trace of the command line.
996# Strip out --no-create and --no-recursion so they do not pile up.
997# Also quote any args containing shell meta-characters.
998ac_configure_args=
999ac_sep=
1000for ac_arg
1001do
1002 case $ac_arg in
1003 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1004 | --no-cr | --no-c | -n ) continue ;;
1005 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1006 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1007 continue ;;
1008 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1009 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1010 esac
1011 case " $ac_configure_args " in
1012 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1013 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1014 ac_sep=" " ;;
1015 esac
1016 # Get rid of the leading space.
1017done
1018
1019# When interrupted or exit'd, cleanup temporary files, and complete
1020# config.log. We remove comments because anyway the quotes in there
1021# would cause problems or look ugly.
1022# WARNING: Be sure not to use single quotes in there, as some shells,
1023# such as our DU 5.0 friend, will then `close' the trap.
1024trap 'exit_status=$?
1025 # Save into config.log some information that might help in debugging.
1026 {
1027 echo
1028 cat <<\_ASBOX
1029## ---------------- ##
1030## Cache variables. ##
1031## ---------------- ##
1032_ASBOX
1033 echo
1034 # The following way of writing the cache mishandles newlines in values,
1035{
1036 (set) 2>&1 |
1037 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1038 *ac_space=\ *)
1039 sed -n \
1040 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1041 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1042 ;;
1043 *)
1044 sed -n \
1045 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1046 ;;
1047 esac;
1048}
1049 echo
1050 if test -s confdefs.h; then
1051 cat <<\_ASBOX
1052## ----------- ##
1053## confdefs.h. ##
1054## ----------- ##
1055_ASBOX
1056 echo
1057 sed "/^$/d" confdefs.h
1058 echo
1059 fi
1060 test "$ac_signal" != 0 &&
1061 echo "$as_me: caught signal $ac_signal"
1062 echo "$as_me: exit $exit_status"
1063 } >&5
1064 rm -f core core.* *.core &&
1065 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1066 exit $exit_status
1067 ' 0
1068for ac_signal in 1 2 13 15; do
1069 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1070done
1071ac_signal=0
1072
1073# confdefs.h avoids OS command line length limits that DEFS can exceed.
1074rm -rf conftest* confdefs.h
1075# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1076echo >confdefs.h
1077
1078# Predefined preprocessor variables.
1079
1080cat >>confdefs.h <<_ACEOF
1081#define PACKAGE_NAME "$PACKAGE_NAME"
1082_ACEOF
1083
1084
1085cat >>confdefs.h <<_ACEOF
1086#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1087_ACEOF
1088
1089
1090cat >>confdefs.h <<_ACEOF
1091#define PACKAGE_VERSION "$PACKAGE_VERSION"
1092_ACEOF
1093
1094
1095cat >>confdefs.h <<_ACEOF
1096#define PACKAGE_STRING "$PACKAGE_STRING"
1097_ACEOF
1098
1099
1100cat >>confdefs.h <<_ACEOF
1101#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1102_ACEOF
1103
1104
1105# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106# Prefer explicitly selected file to automatically selected ones.
1107if test -z "$CONFIG_SITE"; then
1108 if test "x$prefix" != xNONE; then
1109 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1110 else
1111 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1112 fi
1113fi
1114for ac_site_file in $CONFIG_SITE; do
1115 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1117echo "$as_me: loading site script $ac_site_file" >&6;}
1118 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 . "$ac_site_file"
1120 fi
1121done
1122
1123if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 # Some versions of bash will fail to source /dev/null (special
1125 # files actually), so we avoid doing that.
1126 if test -f "$cache_file"; then
1127 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1128echo "$as_me: loading cache $cache_file" >&6;}
1129 case $cache_file in
1130 [\\/]* | ?:[\\/]* ) . $cache_file;;
1131 *) . ./$cache_file;;
1132 esac
1133 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134else
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1136echo "$as_me: creating cache $cache_file" >&6;}
1137 >$cache_file
1138fi
1139
1140# Check that the precious variables saved in the cache have kept the same
1141# value.
1142ac_cache_corrupted=false
1143for ac_var in `(set) 2>&1 |
1144 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1145 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1146 eval ac_new_set=\$ac_env_${ac_var}_set
1147 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1148 eval ac_new_val="\$ac_env_${ac_var}_value"
1149 case $ac_old_set,$ac_new_set in
1150 set,)
1151 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1152echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1153 ac_cache_corrupted=: ;;
1154 ,set)
1155 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1156echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1157 ac_cache_corrupted=: ;;
1158 ,);;
1159 *)
1160 if test "x$ac_old_val" != "x$ac_new_val"; then
1161 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1162echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1163 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1164echo "$as_me: former value: $ac_old_val" >&2;}
1165 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1166echo "$as_me: current value: $ac_new_val" >&2;}
1167 ac_cache_corrupted=:
1168 fi;;
1169 esac
1170 # Pass precious variables to config.status.
1171 if test "$ac_new_set" = set; then
1172 case $ac_new_val in
1173 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1174 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1175 *) ac_arg=$ac_var=$ac_new_val ;;
1176 esac
1177 case " $ac_configure_args " in
1178 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1179 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1180 esac
1181 fi
1182done
1183if $ac_cache_corrupted; then
1184 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1185echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1186 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1187echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1188 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001189fi
1190
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001193ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1194ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1195ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196
Guido van Rossum627b2d71993-12-24 10:39:16 +00001197
Michael W. Hudson54241132001-12-07 15:38:26 +00001198
1199
Guido van Rossum627b2d71993-12-24 10:39:16 +00001200
Martin v. Löwis11437992002-04-12 09:54:03 +00001201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214ac_config_headers="$ac_config_headers pyconfig.h"
1215
1216
1217# This is for stuff that absolutely must end up in pyconfig.h.
1218# Please use pyport.h instead, if possible.
1219
1220
1221
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001222# Set VERSION so we only need to edit in one place (i.e., here)
1223
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001224VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001225
Martin v. Löwis1142de32002-03-29 16:28:31 +00001226
1227SOVERSION=1.0
1228
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001229# Arguments passed to configure.
1230
1231CONFIG_ARGS="$ac_configure_args"
1232
Michael W. Hudson54241132001-12-07 15:38:26 +00001233
Jack Jansene578a632001-08-15 01:27:14 +00001234# Check whether --enable-framework or --disable-framework was given.
1235if test "${enable_framework+set}" = set; then
1236 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001237
Jack Jansene578a632001-08-15 01:27:14 +00001238 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001240 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001241 esac
1242 case $enableval in
1243 no)
1244 PYTHONFRAMEWORK=
1245 PYTHONFRAMEWORKDIR=no-framework
1246 PYTHONFRAMEWORKPREFIX=
1247 PYTHONFRAMEWORKINSTALLDIR=
1248 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001249 ;;
1250 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001251 PYTHONFRAMEWORK=Python
1252 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001253 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001254 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1255 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001256 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001257
Guido van Rossum563e7081996-09-10 18:20:48 +00001258else
Martin v. Löwis11437992002-04-12 09:54:03 +00001259
Jack Jansene578a632001-08-15 01:27:14 +00001260 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001261 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001262 PYTHONFRAMEWORKPREFIX=
1263 PYTHONFRAMEWORKINSTALLDIR=
1264 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001265
Martin v. Löwis11437992002-04-12 09:54:03 +00001266fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001267
1268
1269
1270
Jack Jansene578a632001-08-15 01:27:14 +00001271
1272##AC_ARG_WITH(dyld,
1273##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1274##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001275# Set name for machine-dependent library files
1276
Martin v. Löwis11437992002-04-12 09:54:03 +00001277echo "$as_me:$LINENO: checking MACHDEP" >&5
1278echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001279if test -z "$MACHDEP"
1280then
Guido van Rossum563e7081996-09-10 18:20:48 +00001281 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001282 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001283 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001284 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001285 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001286 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001287 ac_md_system=`echo $ac_sys_system |
1288 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1289 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001290 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001291 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001292
Guido van Rossum07397971997-04-29 21:49:50 +00001293 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001294 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001295 darwin*) MACHDEP="darwin";;
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 Jansen1999ef42001-12-06 21:47:20 +00002953if test -d "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
3075 CYGWIN*)
3076 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 ;;
3134 esac
3135 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3136 case $MACHDEP in
3137 dguxR4)
3138 LDLIBRARY='libpython$(VERSION).so'
3139 OPT="$OPT -pic"
3140 ;;
3141 esac
3142fi
3143
Martin v. Löwis11437992002-04-12 09:54:03 +00003144echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3145echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003146
Martin v. Löwis11437992002-04-12 09:54:03 +00003147if test -n "$ac_tool_prefix"; then
3148 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3149set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3150echo "$as_me:$LINENO: checking for $ac_word" >&5
3151echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3152if test "${ac_cv_prog_RANLIB+set}" = set; then
3153 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003154else
3155 if test -n "$RANLIB"; then
3156 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3157else
Martin v. Löwis11437992002-04-12 09:54:03 +00003158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3159for as_dir in $PATH
3160do
3161 IFS=$as_save_IFS
3162 test -z "$as_dir" && as_dir=.
3163 for ac_exec_ext in '' $ac_executable_extensions; do
3164 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3165 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3166 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3167 break 2
3168 fi
3169done
3170done
3171
Guido van Rossum627b2d71993-12-24 10:39:16 +00003172fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003174RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003175if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003176 echo "$as_me:$LINENO: result: $RANLIB" >&5
3177echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003178else
Martin v. Löwis11437992002-04-12 09:54:03 +00003179 echo "$as_me:$LINENO: result: no" >&5
3180echo "${ECHO_T}no" >&6
3181fi
3182
3183fi
3184if test -z "$ac_cv_prog_RANLIB"; then
3185 ac_ct_RANLIB=$RANLIB
3186 # Extract the first word of "ranlib", so it can be a program name with args.
3187set dummy ranlib; ac_word=$2
3188echo "$as_me:$LINENO: checking for $ac_word" >&5
3189echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3190if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3191 echo $ECHO_N "(cached) $ECHO_C" >&6
3192else
3193 if test -n "$ac_ct_RANLIB"; then
3194 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3195else
3196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3197for as_dir in $PATH
3198do
3199 IFS=$as_save_IFS
3200 test -z "$as_dir" && as_dir=.
3201 for ac_exec_ext in '' $ac_executable_extensions; do
3202 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3203 ac_cv_prog_ac_ct_RANLIB="ranlib"
3204 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3205 break 2
3206 fi
3207done
3208done
3209
3210 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3211fi
3212fi
3213ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3214if test -n "$ac_ct_RANLIB"; then
3215 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3216echo "${ECHO_T}$ac_ct_RANLIB" >&6
3217else
3218 echo "$as_me:$LINENO: result: no" >&5
3219echo "${ECHO_T}no" >&6
3220fi
3221
3222 RANLIB=$ac_ct_RANLIB
3223else
3224 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003225fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003226
3227
Guido van Rossum7f43da71994-08-01 12:15:30 +00003228for ac_prog in ar aal
3229do
Martin v. Löwis11437992002-04-12 09:54:03 +00003230 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003231set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003232echo "$as_me:$LINENO: checking for $ac_word" >&5
3233echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3234if test "${ac_cv_prog_AR+set}" = set; then
3235 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003236else
3237 if test -n "$AR"; then
3238 ac_cv_prog_AR="$AR" # Let the user override the test.
3239else
Martin v. Löwis11437992002-04-12 09:54:03 +00003240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3241for as_dir in $PATH
3242do
3243 IFS=$as_save_IFS
3244 test -z "$as_dir" && as_dir=.
3245 for ac_exec_ext in '' $ac_executable_extensions; do
3246 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3247 ac_cv_prog_AR="$ac_prog"
3248 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3249 break 2
3250 fi
3251done
3252done
3253
Guido van Rossum7f43da71994-08-01 12:15:30 +00003254fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003255fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003256AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003258 echo "$as_me:$LINENO: result: $AR" >&5
3259echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003260else
Martin v. Löwis11437992002-04-12 09:54:03 +00003261 echo "$as_me:$LINENO: result: no" >&5
3262echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003263fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003264
Martin v. Löwis11437992002-04-12 09:54:03 +00003265 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003266done
3267test -n "$AR" || AR="ar"
3268
Michael W. Hudson54241132001-12-07 15:38:26 +00003269
Neil Schemenauera42c8272001-03-31 00:01:55 +00003270case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003271bsdos*|hp*|HP*)
3272 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003273 if test -z "$INSTALL"
3274 then
3275 INSTALL="${srcdir}/install-sh -c"
3276 fi
3277esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003278ac_aux_dir=
3279for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3280 if test -f $ac_dir/install-sh; then
3281 ac_aux_dir=$ac_dir
3282 ac_install_sh="$ac_aux_dir/install-sh -c"
3283 break
3284 elif test -f $ac_dir/install.sh; then
3285 ac_aux_dir=$ac_dir
3286 ac_install_sh="$ac_aux_dir/install.sh -c"
3287 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003288 elif test -f $ac_dir/shtool; then
3289 ac_aux_dir=$ac_dir
3290 ac_install_sh="$ac_aux_dir/shtool install -c"
3291 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003292 fi
3293done
3294if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003295 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3296echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3297 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003298fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003299ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3300ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3301ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003302
3303# Find a good install program. We prefer a C program (faster),
3304# so one script is as good as another. But avoid the broken or
3305# incompatible versions:
3306# SysV /etc/install, /usr/sbin/install
3307# SunOS /usr/etc/install
3308# IRIX /sbin/install
3309# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003310# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003311# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3312# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3313# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3314# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003315echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3316echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003317if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003318if test "${ac_cv_path_install+set}" = set; then
3319 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003320else
Martin v. Löwis11437992002-04-12 09:54:03 +00003321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3322for as_dir in $PATH
3323do
3324 IFS=$as_save_IFS
3325 test -z "$as_dir" && as_dir=.
3326 # Account for people who put trailing slashes in PATH elements.
3327case $as_dir/ in
3328 ./ | .// | /cC/* | \
3329 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3330 /usr/ucb/* ) ;;
3331 *)
3332 # OSF1 and SCO ODT 3.0 have their own names for install.
3333 # Don't use installbsd from OSF since it installs stuff as root
3334 # by default.
3335 for ac_prog in ginstall scoinst install; do
3336 for ac_exec_ext in '' $ac_executable_extensions; do
3337 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3338 if test $ac_prog = install &&
3339 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3340 # AIX install. It has an incompatible calling convention.
3341 :
3342 elif test $ac_prog = install &&
3343 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3344 # program-specific install script used by HP pwplus--don't use.
3345 :
3346 else
3347 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3348 break 3
3349 fi
3350 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003351 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003352 done
3353 ;;
3354esac
3355done
3356
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003357
3358fi
3359 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003360 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003361 else
3362 # As a last resort, use the slow shell script. We don't cache a
3363 # path for INSTALL within a source directory, because that will
3364 # break other packages using the cache if that directory is
3365 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003367 fi
3368fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003369echo "$as_me:$LINENO: result: $INSTALL" >&5
3370echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003371
3372# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3373# It thinks the first close brace ends the variable substitution.
3374test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3375
Martin v. Löwis11437992002-04-12 09:54:03 +00003376test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003377
3378test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3379
Michael W. Hudson54241132001-12-07 15:38:26 +00003380
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003381# Not every filesystem supports hard links
3382
3383if test -z "$LN" ; then
3384 case $ac_sys_system in
3385 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003386 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003387 *) LN=ln;;
3388 esac
3389fi
3390
Fred Drake109d9862001-07-11 06:27:56 +00003391# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003392echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3393echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3394
Fred Drake109d9862001-07-11 06:27:56 +00003395# Check whether --with-pydebug or --without-pydebug was given.
3396if test "${with_pydebug+set}" = set; then
3397 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003398
Fred Drake109d9862001-07-11 06:27:56 +00003399if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003400then
3401
3402cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003403#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003404_ACEOF
3405
3406 echo "$as_me:$LINENO: result: yes" >&5
3407echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003408 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003409else echo "$as_me:$LINENO: result: no" >&5
3410echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003411fi
3412else
Martin v. Löwis11437992002-04-12 09:54:03 +00003413 echo "$as_me:$LINENO: result: no" >&5
3414echo "${ECHO_T}no" >&6
3415fi;
Fred Drake109d9862001-07-11 06:27:56 +00003416
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003417# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003418
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003419if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003420then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003421 case $GCC in
3422 yes)
3423 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003424 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003425 if test "$Py_DEBUG" = 'true' ; then
3426 # Optimization messes up debuggers, so turn it off for
3427 # debug builds.
3428 OPT="-g -Wall -Wstrict-prototypes"
3429 else
3430 OPT="-g -O3 -Wall -Wstrict-prototypes"
3431 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003432 *)
Fred Drake109d9862001-07-11 06:27:56 +00003433 OPT="-O3 -Wall -Wstrict-prototypes";;
3434 esac
3435 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003436 *)
3437 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003438 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003439 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3440 *)
3441 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003442 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003443 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003444 case $ac_sys_system in
3445 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003446 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003447 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003448fi
3449
Fred Drakee1ceaa02001-12-04 20:55:47 +00003450if test "$Py_DEBUG" = 'true'; then
3451 :
3452else
3453 OPT="-DNDEBUG $OPT"
3454fi
3455
Trent Mick635f6fb2000-08-23 21:33:05 +00003456# The current (beta) Monterey compiler dies with optimizations
3457case $ac_sys_system in
3458Monterey*) OPT="";;
3459esac
3460
Guido van Rossum563e7081996-09-10 18:20:48 +00003461if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003462then
3463 OPT="$OPT $ac_arch_flags"
3464fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003465
Martin v. Löwis11437992002-04-12 09:54:03 +00003466echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3467echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3468if test "${ac_cv_opt_olimit_ok+set}" = set; then
3469 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003470else
3471 ac_save_cc="$CC"
3472CC="$CC -OPT:Olimit=0"
3473if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003474 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003475else
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 cat >conftest.$ac_ext <<_ACEOF
3477#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003478#include "confdefs.h"
3479int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003480_ACEOF
3481rm -f conftest$ac_exeext
3482if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3483 (eval $ac_link) 2>&5
3484 ac_status=$?
3485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3486 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3488 (eval $ac_try) 2>&5
3489 ac_status=$?
3490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3491 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003492 ac_cv_opt_olimit_ok=yes
3493else
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 echo "$as_me: program exited with status $ac_status" >&5
3495echo "$as_me: failed program was:" >&5
3496cat conftest.$ac_ext >&5
3497( exit $ac_status )
3498ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003499fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003500rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003501fi
Guido van Rossum91922671997-10-09 20:24:13 +00003502CC="$ac_save_cc"
3503fi
3504
Martin v. Löwis11437992002-04-12 09:54:03 +00003505echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3506echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003507if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003508 case $ac_sys_system in
3509 Darwin*) OPT="$OPT" ;;
3510 *) OPT="$OPT -OPT:Olimit=0";;
3511 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003512else
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3514echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3515 if test "${ac_cv_olimit_ok+set}" = set; then
3516 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003517else
3518 ac_save_cc="$CC"
3519 CC="$CC -Olimit 1500"
3520 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003521 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003522else
Martin v. Löwis11437992002-04-12 09:54:03 +00003523 cat >conftest.$ac_ext <<_ACEOF
3524#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003525#include "confdefs.h"
3526int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003527_ACEOF
3528rm -f conftest$ac_exeext
3529if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3530 (eval $ac_link) 2>&5
3531 ac_status=$?
3532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3533 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3535 (eval $ac_try) 2>&5
3536 ac_status=$?
3537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3538 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003539 ac_cv_olimit_ok=yes
3540else
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 echo "$as_me: program exited with status $ac_status" >&5
3542echo "$as_me: failed program was:" >&5
3543cat conftest.$ac_ext >&5
3544( exit $ac_status )
3545ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003546fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003547rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003548fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003549 CC="$ac_save_cc"
3550fi
3551
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3553echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003554 if test $ac_cv_olimit_ok = yes; then
3555 OPT="$OPT -Olimit 1500"
3556 fi
3557fi
3558
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003559# On some compilers, pthreads are available without further options
3560# (e.g. MacOS X). On some of these systems, the compiler will not
3561# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3562# So we have to see first whether pthreads are available without
3563# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003564echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3565echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3566if test "${ac_cv_pthread_is_default+set}" = set; then
3567 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003568else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003569 if test "$cross_compiling" = yes; then
3570 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003571else
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 cat >conftest.$ac_ext <<_ACEOF
3573#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003574#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003575
Martin v. Löwis130fb172001-07-19 11:00:41 +00003576#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003577
3578void* routine(void* p){return NULL;}
3579
3580int main(){
3581 pthread_t p;
3582 if(pthread_create(&p,NULL,routine,NULL)!=0)
3583 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003584 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003585 return 0;
3586}
3587
Martin v. Löwis11437992002-04-12 09:54:03 +00003588_ACEOF
3589rm -f conftest$ac_exeext
3590if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3591 (eval $ac_link) 2>&5
3592 ac_status=$?
3593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3594 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3596 (eval $ac_try) 2>&5
3597 ac_status=$?
3598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3599 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003600 ac_cv_pthread_is_default=yes
3601else
Martin v. Löwis11437992002-04-12 09:54:03 +00003602 echo "$as_me: program exited with status $ac_status" >&5
3603echo "$as_me: failed program was:" >&5
3604cat conftest.$ac_ext >&5
3605( exit $ac_status )
3606ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003607fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003608rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003609fi
3610
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003611fi
3612
Martin v. Löwis11437992002-04-12 09:54:03 +00003613echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3614echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003615
Michael W. Hudson54241132001-12-07 15:38:26 +00003616
Martin v. Löwis11437992002-04-12 09:54:03 +00003617if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003618then
3619 ac_cv_kpthread=no
3620else
3621# -Kpthread, if available, provides the right #defines
3622# and linker options to make pthread_create available
3623# Some compilers won't report that they do not support -Kpthread,
3624# so we need to run a program to see whether it really made the
3625# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003626echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3627echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3628if test "${ac_cv_kpthread+set}" = set; then
3629 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003630else
3631 ac_save_cc="$CC"
3632CC="$CC -Kpthread"
3633if test "$cross_compiling" = yes; then
3634 ac_cv_kpthread=no
3635else
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 cat >conftest.$ac_ext <<_ACEOF
3637#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003638#include "confdefs.h"
3639
3640#include <pthread.h>
3641
3642void* routine(void* p){return NULL;}
3643
3644int main(){
3645 pthread_t p;
3646 if(pthread_create(&p,NULL,routine,NULL)!=0)
3647 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003648 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003649 return 0;
3650}
3651
Martin v. Löwis11437992002-04-12 09:54:03 +00003652_ACEOF
3653rm -f conftest$ac_exeext
3654if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3655 (eval $ac_link) 2>&5
3656 ac_status=$?
3657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3658 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3660 (eval $ac_try) 2>&5
3661 ac_status=$?
3662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3663 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003664 ac_cv_kpthread=yes
3665else
Martin v. Löwis11437992002-04-12 09:54:03 +00003666 echo "$as_me: program exited with status $ac_status" >&5
3667echo "$as_me: failed program was:" >&5
3668cat conftest.$ac_ext >&5
3669( exit $ac_status )
3670ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003671fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003672rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003673fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003674CC="$ac_save_cc"
3675fi
3676
Martin v. Löwis11437992002-04-12 09:54:03 +00003677echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3678echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003679fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003680
Michael W. Hudson54241132001-12-07 15:38:26 +00003681
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003682# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003683echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3684echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3685if test "${ac_cv_header_stdc+set}" = set; then
3686 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003687else
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 cat >conftest.$ac_ext <<_ACEOF
3689#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003690#include "confdefs.h"
3691#include <stdlib.h>
3692#include <stdarg.h>
3693#include <string.h>
3694#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003695
3696_ACEOF
3697if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3698 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3699 ac_status=$?
3700 egrep -v '^ *\+' conftest.er1 >conftest.err
3701 rm -f conftest.er1
3702 cat conftest.err >&5
3703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3704 (exit $ac_status); } >/dev/null; then
3705 if test -s conftest.err; then
3706 ac_cpp_err=$ac_c_preproc_warn_flag
3707 else
3708 ac_cpp_err=
3709 fi
3710else
3711 ac_cpp_err=yes
3712fi
3713if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003714 ac_cv_header_stdc=yes
3715else
Martin v. Löwis11437992002-04-12 09:54:03 +00003716 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003717 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003718 ac_cv_header_stdc=no
3719fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003720rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003721
3722if test $ac_cv_header_stdc = yes; then
3723 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003724 cat >conftest.$ac_ext <<_ACEOF
3725#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003726#include "confdefs.h"
3727#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003728
3729_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003730if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3731 egrep "memchr" >/dev/null 2>&1; then
3732 :
3733else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003734 ac_cv_header_stdc=no
3735fi
3736rm -f conftest*
3737
3738fi
3739
3740if test $ac_cv_header_stdc = yes; then
3741 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003742 cat >conftest.$ac_ext <<_ACEOF
3743#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003744#include "confdefs.h"
3745#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003746
3747_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3749 egrep "free" >/dev/null 2>&1; then
3750 :
3751else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003752 ac_cv_header_stdc=no
3753fi
3754rm -f conftest*
3755
3756fi
3757
3758if test $ac_cv_header_stdc = yes; then
3759 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003762else
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 cat >conftest.$ac_ext <<_ACEOF
3764#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003765#include "confdefs.h"
3766#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003767#if ((' ' & 0x0FF) == 0x020)
3768# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3769# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3770#else
3771# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3772 || ('j' <= (c) && (c) <= 'r') \
3773 || ('s' <= (c) && (c) <= 'z'))
3774# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3775#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003776
Martin v. Löwis11437992002-04-12 09:54:03 +00003777#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3778int
3779main ()
3780{
3781 int i;
3782 for (i = 0; i < 256; i++)
3783 if (XOR (islower (i), ISLOWER (i))
3784 || toupper (i) != TOUPPER (i))
3785 exit(2);
3786 exit (0);
3787}
3788_ACEOF
3789rm -f conftest$ac_exeext
3790if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3791 (eval $ac_link) 2>&5
3792 ac_status=$?
3793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3794 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3796 (eval $ac_try) 2>&5
3797 ac_status=$?
3798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3799 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003800 :
3801else
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 echo "$as_me: program exited with status $ac_status" >&5
3803echo "$as_me: failed program was:" >&5
3804cat conftest.$ac_ext >&5
3805( exit $ac_status )
3806ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003808rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003809fi
3810fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003811fi
3812echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3813echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003814if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003815
3816cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003817#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003818_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003819
3820fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003821
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
3823
3824
3825
3826
3827
3828
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
Neal Norwitz3d949422002-04-20 13:46:43 +00003863
Martin v. Löwis11437992002-04-12 09:54:03 +00003864for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003865libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003866signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Neal Norwitz3d949422002-04-20 13:46:43 +00003867sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003868sys/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 +00003869sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00003870ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003871do
Martin v. Löwis11437992002-04-12 09:54:03 +00003872as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3873if eval "test \"\${$as_ac_Header+set}\" = set"; then
3874 echo "$as_me:$LINENO: checking for $ac_header" >&5
3875echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3876if eval "test \"\${$as_ac_Header+set}\" = set"; then
3877 echo $ECHO_N "(cached) $ECHO_C" >&6
3878fi
3879echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3880echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003881else
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 # Is the header compilable?
3883echo "$as_me:$LINENO: checking $ac_header usability" >&5
3884echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3885cat >conftest.$ac_ext <<_ACEOF
3886#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003887#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003888$ac_includes_default
3889#include <$ac_header>
3890_ACEOF
3891rm -f conftest.$ac_objext
3892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3893 (eval $ac_compile) 2>&5
3894 ac_status=$?
3895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3896 (exit $ac_status); } &&
3897 { ac_try='test -s conftest.$ac_objext'
3898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3899 (eval $ac_try) 2>&5
3900 ac_status=$?
3901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3902 (exit $ac_status); }; }; then
3903 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003904else
Martin v. Löwis11437992002-04-12 09:54:03 +00003905 echo "$as_me: failed program was:" >&5
3906cat conftest.$ac_ext >&5
3907ac_header_compiler=no
3908fi
3909rm -f conftest.$ac_objext conftest.$ac_ext
3910echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3911echo "${ECHO_T}$ac_header_compiler" >&6
3912
3913# Is the header present?
3914echo "$as_me:$LINENO: checking $ac_header presence" >&5
3915echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3916cat >conftest.$ac_ext <<_ACEOF
3917#line $LINENO "configure"
3918#include "confdefs.h"
3919#include <$ac_header>
3920_ACEOF
3921if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3922 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3923 ac_status=$?
3924 egrep -v '^ *\+' conftest.er1 >conftest.err
3925 rm -f conftest.er1
3926 cat conftest.err >&5
3927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3928 (exit $ac_status); } >/dev/null; then
3929 if test -s conftest.err; then
3930 ac_cpp_err=$ac_c_preproc_warn_flag
3931 else
3932 ac_cpp_err=
3933 fi
3934else
3935 ac_cpp_err=yes
3936fi
3937if test -z "$ac_cpp_err"; then
3938 ac_header_preproc=yes
3939else
3940 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003941 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003942 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003943fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003944rm -f conftest.err conftest.$ac_ext
3945echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3946echo "${ECHO_T}$ac_header_preproc" >&6
3947
3948# So? What about this header?
3949case $ac_header_compiler:$ac_header_preproc in
3950 yes:no )
3951 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3952echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3953 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3954echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3955 no:yes )
3956 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3957echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3958 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3959echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3960 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3961echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3962esac
3963echo "$as_me:$LINENO: checking for $ac_header" >&5
3964echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3965if eval "test \"\${$as_ac_Header+set}\" = set"; then
3966 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003967else
Martin v. Löwis11437992002-04-12 09:54:03 +00003968 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003969fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003970echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3971echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3972
3973fi
3974if test `eval echo '${'$as_ac_Header'}'` = yes; then
3975 cat >>confdefs.h <<_ACEOF
3976#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3977_ACEOF
3978
3979fi
3980
Guido van Rossum627b2d71993-12-24 10:39:16 +00003981done
3982
Martin v. Löwis11437992002-04-12 09:54:03 +00003983
3984
3985
3986
3987
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003988ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003989for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3990 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3991echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3992echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3993if eval "test \"\${$as_ac_Header+set}\" = set"; then
3994 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003995else
Martin v. Löwis11437992002-04-12 09:54:03 +00003996 cat >conftest.$ac_ext <<_ACEOF
3997#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003998#include "confdefs.h"
3999#include <sys/types.h>
4000#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004001
4002#ifdef F77_DUMMY_MAIN
4003# ifdef __cplusplus
4004 extern "C"
4005# endif
4006 int F77_DUMMY_MAIN() { return 1; }
4007#endif
4008int
4009main ()
4010{
4011if ((DIR *) 0)
4012return 0;
4013 ;
4014 return 0;
4015}
4016_ACEOF
4017rm -f conftest.$ac_objext
4018if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4019 (eval $ac_compile) 2>&5
4020 ac_status=$?
4021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4022 (exit $ac_status); } &&
4023 { ac_try='test -s conftest.$ac_objext'
4024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4025 (eval $ac_try) 2>&5
4026 ac_status=$?
4027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4028 (exit $ac_status); }; }; then
4029 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004030else
Martin v. Löwis11437992002-04-12 09:54:03 +00004031 echo "$as_me: failed program was:" >&5
4032cat conftest.$ac_ext >&5
4033eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004034fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004035rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004036fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004037echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4038echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4039if test `eval echo '${'$as_ac_Header'}'` = yes; then
4040 cat >>confdefs.h <<_ACEOF
4041#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4042_ACEOF
4043
4044ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004045fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004046
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004047done
4048# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4049if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004050 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4051echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4052if test "${ac_cv_search_opendir+set}" = set; then
4053 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004054else
Martin v. Löwis11437992002-04-12 09:54:03 +00004055 ac_func_search_save_LIBS=$LIBS
4056ac_cv_search_opendir=no
4057cat >conftest.$ac_ext <<_ACEOF
4058#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004059#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004060
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004061/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004062#ifdef __cplusplus
4063extern "C"
4064#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004065/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004066 builtin and then its argument prototype would still apply. */
4067char opendir ();
4068#ifdef F77_DUMMY_MAIN
4069# ifdef __cplusplus
4070 extern "C"
4071# endif
4072 int F77_DUMMY_MAIN() { return 1; }
4073#endif
4074int
4075main ()
4076{
4077opendir ();
4078 ;
4079 return 0;
4080}
4081_ACEOF
4082rm -f conftest.$ac_objext conftest$ac_exeext
4083if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4084 (eval $ac_link) 2>&5
4085 ac_status=$?
4086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4087 (exit $ac_status); } &&
4088 { ac_try='test -s conftest$ac_exeext'
4089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4090 (eval $ac_try) 2>&5
4091 ac_status=$?
4092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4093 (exit $ac_status); }; }; then
4094 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004095else
Martin v. Löwis11437992002-04-12 09:54:03 +00004096 echo "$as_me: failed program was:" >&5
4097cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004098fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004099rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4100if test "$ac_cv_search_opendir" = no; then
4101 for ac_lib in dir; do
4102 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4103 cat >conftest.$ac_ext <<_ACEOF
4104#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004105#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004106
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004107/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004108#ifdef __cplusplus
4109extern "C"
4110#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004111/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004112 builtin and then its argument prototype would still apply. */
4113char opendir ();
4114#ifdef F77_DUMMY_MAIN
4115# ifdef __cplusplus
4116 extern "C"
4117# endif
4118 int F77_DUMMY_MAIN() { return 1; }
4119#endif
4120int
4121main ()
4122{
4123opendir ();
4124 ;
4125 return 0;
4126}
4127_ACEOF
4128rm -f conftest.$ac_objext conftest$ac_exeext
4129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4130 (eval $ac_link) 2>&5
4131 ac_status=$?
4132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4133 (exit $ac_status); } &&
4134 { ac_try='test -s conftest$ac_exeext'
4135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4136 (eval $ac_try) 2>&5
4137 ac_status=$?
4138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4139 (exit $ac_status); }; }; then
4140 ac_cv_search_opendir="-l$ac_lib"
4141break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004142else
Martin v. Löwis11437992002-04-12 09:54:03 +00004143 echo "$as_me: failed program was:" >&5
4144cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004145fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004146rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4147 done
4148fi
4149LIBS=$ac_func_search_save_LIBS
4150fi
4151echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4152echo "${ECHO_T}$ac_cv_search_opendir" >&6
4153if test "$ac_cv_search_opendir" != no; then
4154 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004156fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004157
Michael W. Hudson54241132001-12-07 15:38:26 +00004158else
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4160echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4161if test "${ac_cv_search_opendir+set}" = set; then
4162 echo $ECHO_N "(cached) $ECHO_C" >&6
4163else
4164 ac_func_search_save_LIBS=$LIBS
4165ac_cv_search_opendir=no
4166cat >conftest.$ac_ext <<_ACEOF
4167#line $LINENO "configure"
4168#include "confdefs.h"
4169
4170/* Override any gcc2 internal prototype to avoid an error. */
4171#ifdef __cplusplus
4172extern "C"
4173#endif
4174/* We use char because int might match the return type of a gcc2
4175 builtin and then its argument prototype would still apply. */
4176char opendir ();
4177#ifdef F77_DUMMY_MAIN
4178# ifdef __cplusplus
4179 extern "C"
4180# endif
4181 int F77_DUMMY_MAIN() { return 1; }
4182#endif
4183int
4184main ()
4185{
4186opendir ();
4187 ;
4188 return 0;
4189}
4190_ACEOF
4191rm -f conftest.$ac_objext conftest$ac_exeext
4192if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4193 (eval $ac_link) 2>&5
4194 ac_status=$?
4195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4196 (exit $ac_status); } &&
4197 { ac_try='test -s conftest$ac_exeext'
4198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4199 (eval $ac_try) 2>&5
4200 ac_status=$?
4201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4202 (exit $ac_status); }; }; then
4203 ac_cv_search_opendir="none required"
4204else
4205 echo "$as_me: failed program was:" >&5
4206cat conftest.$ac_ext >&5
4207fi
4208rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4209if test "$ac_cv_search_opendir" = no; then
4210 for ac_lib in x; do
4211 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4212 cat >conftest.$ac_ext <<_ACEOF
4213#line $LINENO "configure"
4214#include "confdefs.h"
4215
4216/* Override any gcc2 internal prototype to avoid an error. */
4217#ifdef __cplusplus
4218extern "C"
4219#endif
4220/* We use char because int might match the return type of a gcc2
4221 builtin and then its argument prototype would still apply. */
4222char opendir ();
4223#ifdef F77_DUMMY_MAIN
4224# ifdef __cplusplus
4225 extern "C"
4226# endif
4227 int F77_DUMMY_MAIN() { return 1; }
4228#endif
4229int
4230main ()
4231{
4232opendir ();
4233 ;
4234 return 0;
4235}
4236_ACEOF
4237rm -f conftest.$ac_objext conftest$ac_exeext
4238if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4239 (eval $ac_link) 2>&5
4240 ac_status=$?
4241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4242 (exit $ac_status); } &&
4243 { ac_try='test -s conftest$ac_exeext'
4244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4245 (eval $ac_try) 2>&5
4246 ac_status=$?
4247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4248 (exit $ac_status); }; }; then
4249 ac_cv_search_opendir="-l$ac_lib"
4250break
4251else
4252 echo "$as_me: failed program was:" >&5
4253cat conftest.$ac_ext >&5
4254fi
4255rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4256 done
4257fi
4258LIBS=$ac_func_search_save_LIBS
4259fi
4260echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4261echo "${ECHO_T}$ac_cv_search_opendir" >&6
4262if test "$ac_cv_search_opendir" != no; then
4263 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4264
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265fi
4266
4267fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004268
Michael W. Hudson54241132001-12-07 15:38:26 +00004269
Guido van Rossum627b2d71993-12-24 10:39:16 +00004270# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004271was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004272echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4273echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4274cat >conftest.$ac_ext <<_ACEOF
4275#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004276#include "confdefs.h"
4277#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004278
4279_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4281 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004282 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004283else
Martin v. Löwis11437992002-04-12 09:54:03 +00004284
4285
4286cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004288_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004289
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004290
Guido van Rossum627b2d71993-12-24 10:39:16 +00004291fi
4292rm -f conftest*
4293
Martin v. Löwis11437992002-04-12 09:54:03 +00004294echo "$as_me:$LINENO: result: $was_it_defined" >&5
4295echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004296
Guido van Rossum810cc512001-09-09 23:51:39 +00004297# Two defines needed to enable largefile support on various platforms
4298# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004299
Martin v. Löwis11437992002-04-12 09:54:03 +00004300cat >>confdefs.h <<\_ACEOF
4301#define _LARGEFILE_SOURCE 1
4302_ACEOF
4303
4304
4305cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004306#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004307_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004308
Michael W. Hudson54241132001-12-07 15:38:26 +00004309
Guido van Rossum84e7b241996-08-19 21:59:00 +00004310# Add some code to confdefs.h so that the test for off_t works on SCO
4311cat >> confdefs.h <<\EOF
4312#if defined(SCO_DS)
4313#undef _OFF_T
4314#endif
4315EOF
4316
Guido van Rossumef2255b2000-03-10 22:30:29 +00004317# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004318echo "$as_me:$LINENO: checking for mode_t" >&5
4319echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4320if test "${ac_cv_type_mode_t+set}" = set; then
4321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004322else
Martin v. Löwis11437992002-04-12 09:54:03 +00004323 cat >conftest.$ac_ext <<_ACEOF
4324#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004325#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004326$ac_includes_default
4327#ifdef F77_DUMMY_MAIN
4328# ifdef __cplusplus
4329 extern "C"
4330# endif
4331 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004333int
4334main ()
4335{
4336if ((mode_t *) 0)
4337 return 0;
4338if (sizeof (mode_t))
4339 return 0;
4340 ;
4341 return 0;
4342}
4343_ACEOF
4344rm -f conftest.$ac_objext
4345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4346 (eval $ac_compile) 2>&5
4347 ac_status=$?
4348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4349 (exit $ac_status); } &&
4350 { ac_try='test -s conftest.$ac_objext'
4351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4352 (eval $ac_try) 2>&5
4353 ac_status=$?
4354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4355 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004356 ac_cv_type_mode_t=yes
4357else
Martin v. Löwis11437992002-04-12 09:54:03 +00004358 echo "$as_me: failed program was:" >&5
4359cat conftest.$ac_ext >&5
4360ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004361fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004362rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004364echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4365echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4366if test $ac_cv_type_mode_t = yes; then
4367 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004368else
Martin v. Löwis11437992002-04-12 09:54:03 +00004369
4370cat >>confdefs.h <<_ACEOF
4371#define mode_t int
4372_ACEOF
4373
4374fi
4375
4376echo "$as_me:$LINENO: checking for off_t" >&5
4377echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4378if test "${ac_cv_type_off_t+set}" = set; then
4379 echo $ECHO_N "(cached) $ECHO_C" >&6
4380else
4381 cat >conftest.$ac_ext <<_ACEOF
4382#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004383#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004384$ac_includes_default
4385#ifdef F77_DUMMY_MAIN
4386# ifdef __cplusplus
4387 extern "C"
4388# endif
4389 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004390#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004391int
4392main ()
4393{
4394if ((off_t *) 0)
4395 return 0;
4396if (sizeof (off_t))
4397 return 0;
4398 ;
4399 return 0;
4400}
4401_ACEOF
4402rm -f conftest.$ac_objext
4403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4404 (eval $ac_compile) 2>&5
4405 ac_status=$?
4406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4407 (exit $ac_status); } &&
4408 { ac_try='test -s conftest.$ac_objext'
4409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4410 (eval $ac_try) 2>&5
4411 ac_status=$?
4412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4413 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004414 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004415else
Martin v. Löwis11437992002-04-12 09:54:03 +00004416 echo "$as_me: failed program was:" >&5
4417cat conftest.$ac_ext >&5
4418ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004419fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004420rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004421fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004422echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4423echo "${ECHO_T}$ac_cv_type_off_t" >&6
4424if test $ac_cv_type_off_t = yes; then
4425 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004426else
Martin v. Löwis11437992002-04-12 09:54:03 +00004427
4428cat >>confdefs.h <<_ACEOF
4429#define off_t long
4430_ACEOF
4431
4432fi
4433
4434echo "$as_me:$LINENO: checking for pid_t" >&5
4435echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4436if test "${ac_cv_type_pid_t+set}" = set; then
4437 echo $ECHO_N "(cached) $ECHO_C" >&6
4438else
4439 cat >conftest.$ac_ext <<_ACEOF
4440#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004441#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004442$ac_includes_default
4443#ifdef F77_DUMMY_MAIN
4444# ifdef __cplusplus
4445 extern "C"
4446# endif
4447 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004449int
4450main ()
4451{
4452if ((pid_t *) 0)
4453 return 0;
4454if (sizeof (pid_t))
4455 return 0;
4456 ;
4457 return 0;
4458}
4459_ACEOF
4460rm -f conftest.$ac_objext
4461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4462 (eval $ac_compile) 2>&5
4463 ac_status=$?
4464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4465 (exit $ac_status); } &&
4466 { ac_try='test -s conftest.$ac_objext'
4467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4468 (eval $ac_try) 2>&5
4469 ac_status=$?
4470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4471 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004472 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004473else
Martin v. Löwis11437992002-04-12 09:54:03 +00004474 echo "$as_me: failed program was:" >&5
4475cat conftest.$ac_ext >&5
4476ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004477fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004478rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004479fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004480echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4481echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4482if test $ac_cv_type_pid_t = yes; then
4483 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004484else
Martin v. Löwis11437992002-04-12 09:54:03 +00004485
4486cat >>confdefs.h <<_ACEOF
4487#define pid_t int
4488_ACEOF
4489
4490fi
4491
4492echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4493echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4494if test "${ac_cv_type_signal+set}" = set; then
4495 echo $ECHO_N "(cached) $ECHO_C" >&6
4496else
4497 cat >conftest.$ac_ext <<_ACEOF
4498#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004499#include "confdefs.h"
4500#include <sys/types.h>
4501#include <signal.h>
4502#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004503# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004504#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004505#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004506extern "C" void (*signal (int, void (*)(int)))(int);
4507#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004508void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004509#endif
4510
Martin v. Löwis11437992002-04-12 09:54:03 +00004511#ifdef F77_DUMMY_MAIN
4512# ifdef __cplusplus
4513 extern "C"
4514# endif
4515 int F77_DUMMY_MAIN() { return 1; }
4516#endif
4517int
4518main ()
4519{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004520int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004521 ;
4522 return 0;
4523}
4524_ACEOF
4525rm -f conftest.$ac_objext
4526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4527 (eval $ac_compile) 2>&5
4528 ac_status=$?
4529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4530 (exit $ac_status); } &&
4531 { ac_try='test -s conftest.$ac_objext'
4532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4533 (eval $ac_try) 2>&5
4534 ac_status=$?
4535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4536 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004537 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004538else
Martin v. Löwis11437992002-04-12 09:54:03 +00004539 echo "$as_me: failed program was:" >&5
4540cat conftest.$ac_ext >&5
4541ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004542fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004543rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004544fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004545echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4546echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004547
Martin v. Löwis11437992002-04-12 09:54:03 +00004548cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004549#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004550_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004551
Michael W. Hudson54241132001-12-07 15:38:26 +00004552
Martin v. Löwis11437992002-04-12 09:54:03 +00004553echo "$as_me:$LINENO: checking for size_t" >&5
4554echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4555if test "${ac_cv_type_size_t+set}" = set; then
4556 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004557else
Martin v. Löwis11437992002-04-12 09:54:03 +00004558 cat >conftest.$ac_ext <<_ACEOF
4559#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004560#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004561$ac_includes_default
4562#ifdef F77_DUMMY_MAIN
4563# ifdef __cplusplus
4564 extern "C"
4565# endif
4566 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004568int
4569main ()
4570{
4571if ((size_t *) 0)
4572 return 0;
4573if (sizeof (size_t))
4574 return 0;
4575 ;
4576 return 0;
4577}
4578_ACEOF
4579rm -f conftest.$ac_objext
4580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4581 (eval $ac_compile) 2>&5
4582 ac_status=$?
4583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4584 (exit $ac_status); } &&
4585 { ac_try='test -s conftest.$ac_objext'
4586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4587 (eval $ac_try) 2>&5
4588 ac_status=$?
4589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4590 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004591 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004592else
Martin v. Löwis11437992002-04-12 09:54:03 +00004593 echo "$as_me: failed program was:" >&5
4594cat conftest.$ac_ext >&5
4595ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004596fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004597rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004598fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004599echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4600echo "${ECHO_T}$ac_cv_type_size_t" >&6
4601if test $ac_cv_type_size_t = yes; then
4602 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004603else
Martin v. Löwis11437992002-04-12 09:54:03 +00004604
4605cat >>confdefs.h <<_ACEOF
4606#define size_t unsigned
4607_ACEOF
4608
4609fi
4610
4611echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4612echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4613if test "${ac_cv_type_uid_t+set}" = set; then
4614 echo $ECHO_N "(cached) $ECHO_C" >&6
4615else
4616 cat >conftest.$ac_ext <<_ACEOF
4617#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004618#include "confdefs.h"
4619#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004620
4621_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4623 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004624 ac_cv_type_uid_t=yes
4625else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004626 ac_cv_type_uid_t=no
4627fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004628rm -f conftest*
4629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004630fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004631echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4632echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004633if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004634
Martin v. Löwis11437992002-04-12 09:54:03 +00004635cat >>confdefs.h <<\_ACEOF
4636#define uid_t int
4637_ACEOF
4638
4639
4640cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004641#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004642_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004643
4644fi
4645
Jack Jansendd19cf82001-12-06 22:36:17 +00004646
Michael W. Hudson54241132001-12-07 15:38:26 +00004647# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004648echo "$as_me:$LINENO: checking for int" >&5
4649echo $ECHO_N "checking for int... $ECHO_C" >&6
4650if test "${ac_cv_type_int+set}" = set; then
4651 echo $ECHO_N "(cached) $ECHO_C" >&6
4652else
4653 cat >conftest.$ac_ext <<_ACEOF
4654#line $LINENO "configure"
4655#include "confdefs.h"
4656$ac_includes_default
4657#ifdef F77_DUMMY_MAIN
4658# ifdef __cplusplus
4659 extern "C"
4660# endif
4661 int F77_DUMMY_MAIN() { return 1; }
4662#endif
4663int
4664main ()
4665{
4666if ((int *) 0)
4667 return 0;
4668if (sizeof (int))
4669 return 0;
4670 ;
4671 return 0;
4672}
4673_ACEOF
4674rm -f conftest.$ac_objext
4675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4676 (eval $ac_compile) 2>&5
4677 ac_status=$?
4678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4679 (exit $ac_status); } &&
4680 { ac_try='test -s conftest.$ac_objext'
4681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4682 (eval $ac_try) 2>&5
4683 ac_status=$?
4684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4685 (exit $ac_status); }; }; then
4686 ac_cv_type_int=yes
4687else
4688 echo "$as_me: failed program was:" >&5
4689cat conftest.$ac_ext >&5
4690ac_cv_type_int=no
4691fi
4692rm -f conftest.$ac_objext conftest.$ac_ext
4693fi
4694echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4695echo "${ECHO_T}$ac_cv_type_int" >&6
4696
4697echo "$as_me:$LINENO: checking size of int" >&5
4698echo $ECHO_N "checking size of int... $ECHO_C" >&6
4699if test "${ac_cv_sizeof_int+set}" = set; then
4700 echo $ECHO_N "(cached) $ECHO_C" >&6
4701else
4702 if test "$ac_cv_type_int" = yes; then
4703 # The cast to unsigned long works around a bug in the HP C Compiler
4704 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4705 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4706 # This bug is HP SR number 8606223364.
4707 if test "$cross_compiling" = yes; then
4708 # Depending upon the size, compute the lo and hi bounds.
4709cat >conftest.$ac_ext <<_ACEOF
4710#line $LINENO "configure"
4711#include "confdefs.h"
4712$ac_includes_default
4713#ifdef F77_DUMMY_MAIN
4714# ifdef __cplusplus
4715 extern "C"
4716# endif
4717 int F77_DUMMY_MAIN() { return 1; }
4718#endif
4719int
4720main ()
4721{
4722static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4723test_array [0] = 0
4724
4725 ;
4726 return 0;
4727}
4728_ACEOF
4729rm -f conftest.$ac_objext
4730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4731 (eval $ac_compile) 2>&5
4732 ac_status=$?
4733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4734 (exit $ac_status); } &&
4735 { ac_try='test -s conftest.$ac_objext'
4736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4737 (eval $ac_try) 2>&5
4738 ac_status=$?
4739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4740 (exit $ac_status); }; }; then
4741 ac_lo=0 ac_mid=0
4742 while :; do
4743 cat >conftest.$ac_ext <<_ACEOF
4744#line $LINENO "configure"
4745#include "confdefs.h"
4746$ac_includes_default
4747#ifdef F77_DUMMY_MAIN
4748# ifdef __cplusplus
4749 extern "C"
4750# endif
4751 int F77_DUMMY_MAIN() { return 1; }
4752#endif
4753int
4754main ()
4755{
4756static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4757test_array [0] = 0
4758
4759 ;
4760 return 0;
4761}
4762_ACEOF
4763rm -f conftest.$ac_objext
4764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4765 (eval $ac_compile) 2>&5
4766 ac_status=$?
4767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4768 (exit $ac_status); } &&
4769 { ac_try='test -s conftest.$ac_objext'
4770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4771 (eval $ac_try) 2>&5
4772 ac_status=$?
4773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4774 (exit $ac_status); }; }; then
4775 ac_hi=$ac_mid; break
4776else
4777 echo "$as_me: failed program was:" >&5
4778cat conftest.$ac_ext >&5
4779ac_lo=`expr $ac_mid + 1`
4780 if test $ac_lo -le $ac_mid; then
4781 ac_lo= ac_hi=
4782 break
4783 fi
4784 ac_mid=`expr 2 '*' $ac_mid + 1`
4785fi
4786rm -f conftest.$ac_objext conftest.$ac_ext
4787 done
4788else
4789 echo "$as_me: failed program was:" >&5
4790cat conftest.$ac_ext >&5
4791cat >conftest.$ac_ext <<_ACEOF
4792#line $LINENO "configure"
4793#include "confdefs.h"
4794$ac_includes_default
4795#ifdef F77_DUMMY_MAIN
4796# ifdef __cplusplus
4797 extern "C"
4798# endif
4799 int F77_DUMMY_MAIN() { return 1; }
4800#endif
4801int
4802main ()
4803{
4804static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4805test_array [0] = 0
4806
4807 ;
4808 return 0;
4809}
4810_ACEOF
4811rm -f conftest.$ac_objext
4812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4813 (eval $ac_compile) 2>&5
4814 ac_status=$?
4815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4816 (exit $ac_status); } &&
4817 { ac_try='test -s conftest.$ac_objext'
4818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4819 (eval $ac_try) 2>&5
4820 ac_status=$?
4821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4822 (exit $ac_status); }; }; then
4823 ac_hi=-1 ac_mid=-1
4824 while :; do
4825 cat >conftest.$ac_ext <<_ACEOF
4826#line $LINENO "configure"
4827#include "confdefs.h"
4828$ac_includes_default
4829#ifdef F77_DUMMY_MAIN
4830# ifdef __cplusplus
4831 extern "C"
4832# endif
4833 int F77_DUMMY_MAIN() { return 1; }
4834#endif
4835int
4836main ()
4837{
4838static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4839test_array [0] = 0
4840
4841 ;
4842 return 0;
4843}
4844_ACEOF
4845rm -f conftest.$ac_objext
4846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4847 (eval $ac_compile) 2>&5
4848 ac_status=$?
4849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4850 (exit $ac_status); } &&
4851 { ac_try='test -s conftest.$ac_objext'
4852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4853 (eval $ac_try) 2>&5
4854 ac_status=$?
4855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4856 (exit $ac_status); }; }; then
4857 ac_lo=$ac_mid; break
4858else
4859 echo "$as_me: failed program was:" >&5
4860cat conftest.$ac_ext >&5
4861ac_hi=`expr '(' $ac_mid ')' - 1`
4862 if test $ac_mid -le $ac_hi; then
4863 ac_lo= ac_hi=
4864 break
4865 fi
4866 ac_mid=`expr 2 '*' $ac_mid`
4867fi
4868rm -f conftest.$ac_objext conftest.$ac_ext
4869 done
4870else
4871 echo "$as_me: failed program was:" >&5
4872cat conftest.$ac_ext >&5
4873ac_lo= ac_hi=
4874fi
4875rm -f conftest.$ac_objext conftest.$ac_ext
4876fi
4877rm -f conftest.$ac_objext conftest.$ac_ext
4878# Binary search between lo and hi bounds.
4879while test "x$ac_lo" != "x$ac_hi"; do
4880 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4881 cat >conftest.$ac_ext <<_ACEOF
4882#line $LINENO "configure"
4883#include "confdefs.h"
4884$ac_includes_default
4885#ifdef F77_DUMMY_MAIN
4886# ifdef __cplusplus
4887 extern "C"
4888# endif
4889 int F77_DUMMY_MAIN() { return 1; }
4890#endif
4891int
4892main ()
4893{
4894static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4895test_array [0] = 0
4896
4897 ;
4898 return 0;
4899}
4900_ACEOF
4901rm -f conftest.$ac_objext
4902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4903 (eval $ac_compile) 2>&5
4904 ac_status=$?
4905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4906 (exit $ac_status); } &&
4907 { ac_try='test -s conftest.$ac_objext'
4908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4909 (eval $ac_try) 2>&5
4910 ac_status=$?
4911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4912 (exit $ac_status); }; }; then
4913 ac_hi=$ac_mid
4914else
4915 echo "$as_me: failed program was:" >&5
4916cat conftest.$ac_ext >&5
4917ac_lo=`expr '(' $ac_mid ')' + 1`
4918fi
4919rm -f conftest.$ac_objext conftest.$ac_ext
4920done
4921case $ac_lo in
4922?*) ac_cv_sizeof_int=$ac_lo;;
4923'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4924echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4925 { (exit 1); exit 1; }; } ;;
4926esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004927else
4928 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004929 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4930echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4931 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004932else
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 cat >conftest.$ac_ext <<_ACEOF
4934#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004935#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004936$ac_includes_default
4937long longval () { return (long) (sizeof (int)); }
4938unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004939#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004940#include <stdlib.h>
4941#ifdef F77_DUMMY_MAIN
4942# ifdef __cplusplus
4943 extern "C"
4944# endif
4945 int F77_DUMMY_MAIN() { return 1; }
4946#endif
4947int
4948main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004949{
Martin v. Löwis11437992002-04-12 09:54:03 +00004950
4951 FILE *f = fopen ("conftest.val", "w");
4952 if (! f)
4953 exit (1);
4954 if (((long) (sizeof (int))) < 0)
4955 {
4956 long i = longval ();
4957 if (i != ((long) (sizeof (int))))
4958 exit (1);
4959 fprintf (f, "%ld\n", i);
4960 }
4961 else
4962 {
4963 unsigned long i = ulongval ();
4964 if (i != ((long) (sizeof (int))))
4965 exit (1);
4966 fprintf (f, "%lu\n", i);
4967 }
4968 exit (ferror (f) || fclose (f) != 0);
4969
4970 ;
4971 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004972}
Martin v. Löwis11437992002-04-12 09:54:03 +00004973_ACEOF
4974rm -f conftest$ac_exeext
4975if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4976 (eval $ac_link) 2>&5
4977 ac_status=$?
4978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4981 (eval $ac_try) 2>&5
4982 ac_status=$?
4983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4984 (exit $ac_status); }; }; then
4985 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004986else
Martin v. Löwis11437992002-04-12 09:54:03 +00004987 echo "$as_me: program exited with status $ac_status" >&5
4988echo "$as_me: failed program was:" >&5
4989cat conftest.$ac_ext >&5
4990( exit $ac_status )
4991{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4992echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4993 { (exit 1); exit 1; }; }
4994fi
4995rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4996fi
4997fi
4998rm -f conftest.val
4999else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005000 ac_cv_sizeof_int=0
5001fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005003echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5004echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5005cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005006#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005007_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005008
5009
Martin v. Löwis11437992002-04-12 09:54:03 +00005010echo "$as_me:$LINENO: checking for long" >&5
5011echo $ECHO_N "checking for long... $ECHO_C" >&6
5012if test "${ac_cv_type_long+set}" = set; then
5013 echo $ECHO_N "(cached) $ECHO_C" >&6
5014else
5015 cat >conftest.$ac_ext <<_ACEOF
5016#line $LINENO "configure"
5017#include "confdefs.h"
5018$ac_includes_default
5019#ifdef F77_DUMMY_MAIN
5020# ifdef __cplusplus
5021 extern "C"
5022# endif
5023 int F77_DUMMY_MAIN() { return 1; }
5024#endif
5025int
5026main ()
5027{
5028if ((long *) 0)
5029 return 0;
5030if (sizeof (long))
5031 return 0;
5032 ;
5033 return 0;
5034}
5035_ACEOF
5036rm -f conftest.$ac_objext
5037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5038 (eval $ac_compile) 2>&5
5039 ac_status=$?
5040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5041 (exit $ac_status); } &&
5042 { ac_try='test -s conftest.$ac_objext'
5043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5044 (eval $ac_try) 2>&5
5045 ac_status=$?
5046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5047 (exit $ac_status); }; }; then
5048 ac_cv_type_long=yes
5049else
5050 echo "$as_me: failed program was:" >&5
5051cat conftest.$ac_ext >&5
5052ac_cv_type_long=no
5053fi
5054rm -f conftest.$ac_objext conftest.$ac_ext
5055fi
5056echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5057echo "${ECHO_T}$ac_cv_type_long" >&6
5058
5059echo "$as_me:$LINENO: checking size of long" >&5
5060echo $ECHO_N "checking size of long... $ECHO_C" >&6
5061if test "${ac_cv_sizeof_long+set}" = set; then
5062 echo $ECHO_N "(cached) $ECHO_C" >&6
5063else
5064 if test "$ac_cv_type_long" = yes; then
5065 # The cast to unsigned long works around a bug in the HP C Compiler
5066 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5067 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5068 # This bug is HP SR number 8606223364.
5069 if test "$cross_compiling" = yes; then
5070 # Depending upon the size, compute the lo and hi bounds.
5071cat >conftest.$ac_ext <<_ACEOF
5072#line $LINENO "configure"
5073#include "confdefs.h"
5074$ac_includes_default
5075#ifdef F77_DUMMY_MAIN
5076# ifdef __cplusplus
5077 extern "C"
5078# endif
5079 int F77_DUMMY_MAIN() { return 1; }
5080#endif
5081int
5082main ()
5083{
5084static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5085test_array [0] = 0
5086
5087 ;
5088 return 0;
5089}
5090_ACEOF
5091rm -f conftest.$ac_objext
5092if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5093 (eval $ac_compile) 2>&5
5094 ac_status=$?
5095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5096 (exit $ac_status); } &&
5097 { ac_try='test -s conftest.$ac_objext'
5098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5099 (eval $ac_try) 2>&5
5100 ac_status=$?
5101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5102 (exit $ac_status); }; }; then
5103 ac_lo=0 ac_mid=0
5104 while :; do
5105 cat >conftest.$ac_ext <<_ACEOF
5106#line $LINENO "configure"
5107#include "confdefs.h"
5108$ac_includes_default
5109#ifdef F77_DUMMY_MAIN
5110# ifdef __cplusplus
5111 extern "C"
5112# endif
5113 int F77_DUMMY_MAIN() { return 1; }
5114#endif
5115int
5116main ()
5117{
5118static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5119test_array [0] = 0
5120
5121 ;
5122 return 0;
5123}
5124_ACEOF
5125rm -f conftest.$ac_objext
5126if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5127 (eval $ac_compile) 2>&5
5128 ac_status=$?
5129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5130 (exit $ac_status); } &&
5131 { ac_try='test -s conftest.$ac_objext'
5132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5133 (eval $ac_try) 2>&5
5134 ac_status=$?
5135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5136 (exit $ac_status); }; }; then
5137 ac_hi=$ac_mid; break
5138else
5139 echo "$as_me: failed program was:" >&5
5140cat conftest.$ac_ext >&5
5141ac_lo=`expr $ac_mid + 1`
5142 if test $ac_lo -le $ac_mid; then
5143 ac_lo= ac_hi=
5144 break
5145 fi
5146 ac_mid=`expr 2 '*' $ac_mid + 1`
5147fi
5148rm -f conftest.$ac_objext conftest.$ac_ext
5149 done
5150else
5151 echo "$as_me: failed program was:" >&5
5152cat conftest.$ac_ext >&5
5153cat >conftest.$ac_ext <<_ACEOF
5154#line $LINENO "configure"
5155#include "confdefs.h"
5156$ac_includes_default
5157#ifdef F77_DUMMY_MAIN
5158# ifdef __cplusplus
5159 extern "C"
5160# endif
5161 int F77_DUMMY_MAIN() { return 1; }
5162#endif
5163int
5164main ()
5165{
5166static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5167test_array [0] = 0
5168
5169 ;
5170 return 0;
5171}
5172_ACEOF
5173rm -f conftest.$ac_objext
5174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5175 (eval $ac_compile) 2>&5
5176 ac_status=$?
5177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5178 (exit $ac_status); } &&
5179 { ac_try='test -s conftest.$ac_objext'
5180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5181 (eval $ac_try) 2>&5
5182 ac_status=$?
5183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5184 (exit $ac_status); }; }; then
5185 ac_hi=-1 ac_mid=-1
5186 while :; do
5187 cat >conftest.$ac_ext <<_ACEOF
5188#line $LINENO "configure"
5189#include "confdefs.h"
5190$ac_includes_default
5191#ifdef F77_DUMMY_MAIN
5192# ifdef __cplusplus
5193 extern "C"
5194# endif
5195 int F77_DUMMY_MAIN() { return 1; }
5196#endif
5197int
5198main ()
5199{
5200static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5201test_array [0] = 0
5202
5203 ;
5204 return 0;
5205}
5206_ACEOF
5207rm -f conftest.$ac_objext
5208if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5209 (eval $ac_compile) 2>&5
5210 ac_status=$?
5211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5212 (exit $ac_status); } &&
5213 { ac_try='test -s conftest.$ac_objext'
5214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5215 (eval $ac_try) 2>&5
5216 ac_status=$?
5217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5218 (exit $ac_status); }; }; then
5219 ac_lo=$ac_mid; break
5220else
5221 echo "$as_me: failed program was:" >&5
5222cat conftest.$ac_ext >&5
5223ac_hi=`expr '(' $ac_mid ')' - 1`
5224 if test $ac_mid -le $ac_hi; then
5225 ac_lo= ac_hi=
5226 break
5227 fi
5228 ac_mid=`expr 2 '*' $ac_mid`
5229fi
5230rm -f conftest.$ac_objext conftest.$ac_ext
5231 done
5232else
5233 echo "$as_me: failed program was:" >&5
5234cat conftest.$ac_ext >&5
5235ac_lo= ac_hi=
5236fi
5237rm -f conftest.$ac_objext conftest.$ac_ext
5238fi
5239rm -f conftest.$ac_objext conftest.$ac_ext
5240# Binary search between lo and hi bounds.
5241while test "x$ac_lo" != "x$ac_hi"; do
5242 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5243 cat >conftest.$ac_ext <<_ACEOF
5244#line $LINENO "configure"
5245#include "confdefs.h"
5246$ac_includes_default
5247#ifdef F77_DUMMY_MAIN
5248# ifdef __cplusplus
5249 extern "C"
5250# endif
5251 int F77_DUMMY_MAIN() { return 1; }
5252#endif
5253int
5254main ()
5255{
5256static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5257test_array [0] = 0
5258
5259 ;
5260 return 0;
5261}
5262_ACEOF
5263rm -f conftest.$ac_objext
5264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5265 (eval $ac_compile) 2>&5
5266 ac_status=$?
5267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5268 (exit $ac_status); } &&
5269 { ac_try='test -s conftest.$ac_objext'
5270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5271 (eval $ac_try) 2>&5
5272 ac_status=$?
5273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5274 (exit $ac_status); }; }; then
5275 ac_hi=$ac_mid
5276else
5277 echo "$as_me: failed program was:" >&5
5278cat conftest.$ac_ext >&5
5279ac_lo=`expr '(' $ac_mid ')' + 1`
5280fi
5281rm -f conftest.$ac_objext conftest.$ac_ext
5282done
5283case $ac_lo in
5284?*) ac_cv_sizeof_long=$ac_lo;;
5285'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5286echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5287 { (exit 1); exit 1; }; } ;;
5288esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005289else
5290 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005291 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5292echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5293 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005294else
Martin v. Löwis11437992002-04-12 09:54:03 +00005295 cat >conftest.$ac_ext <<_ACEOF
5296#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005297#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005298$ac_includes_default
5299long longval () { return (long) (sizeof (long)); }
5300unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005301#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005302#include <stdlib.h>
5303#ifdef F77_DUMMY_MAIN
5304# ifdef __cplusplus
5305 extern "C"
5306# endif
5307 int F77_DUMMY_MAIN() { return 1; }
5308#endif
5309int
5310main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005311{
Martin v. Löwis11437992002-04-12 09:54:03 +00005312
5313 FILE *f = fopen ("conftest.val", "w");
5314 if (! f)
5315 exit (1);
5316 if (((long) (sizeof (long))) < 0)
5317 {
5318 long i = longval ();
5319 if (i != ((long) (sizeof (long))))
5320 exit (1);
5321 fprintf (f, "%ld\n", i);
5322 }
5323 else
5324 {
5325 unsigned long i = ulongval ();
5326 if (i != ((long) (sizeof (long))))
5327 exit (1);
5328 fprintf (f, "%lu\n", i);
5329 }
5330 exit (ferror (f) || fclose (f) != 0);
5331
5332 ;
5333 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005334}
Martin v. Löwis11437992002-04-12 09:54:03 +00005335_ACEOF
5336rm -f conftest$ac_exeext
5337if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5338 (eval $ac_link) 2>&5
5339 ac_status=$?
5340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5341 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5343 (eval $ac_try) 2>&5
5344 ac_status=$?
5345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5346 (exit $ac_status); }; }; then
5347 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005348else
Martin v. Löwis11437992002-04-12 09:54:03 +00005349 echo "$as_me: program exited with status $ac_status" >&5
5350echo "$as_me: failed program was:" >&5
5351cat conftest.$ac_ext >&5
5352( exit $ac_status )
5353{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5354echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5355 { (exit 1); exit 1; }; }
5356fi
5357rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5358fi
5359fi
5360rm -f conftest.val
5361else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005362 ac_cv_sizeof_long=0
5363fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005365echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5366echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5367cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005368#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005369_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005370
5371
Martin v. Löwis11437992002-04-12 09:54:03 +00005372echo "$as_me:$LINENO: checking for void *" >&5
5373echo $ECHO_N "checking for void *... $ECHO_C" >&6
5374if test "${ac_cv_type_void_p+set}" = set; then
5375 echo $ECHO_N "(cached) $ECHO_C" >&6
5376else
5377 cat >conftest.$ac_ext <<_ACEOF
5378#line $LINENO "configure"
5379#include "confdefs.h"
5380$ac_includes_default
5381#ifdef F77_DUMMY_MAIN
5382# ifdef __cplusplus
5383 extern "C"
5384# endif
5385 int F77_DUMMY_MAIN() { return 1; }
5386#endif
5387int
5388main ()
5389{
5390if ((void * *) 0)
5391 return 0;
5392if (sizeof (void *))
5393 return 0;
5394 ;
5395 return 0;
5396}
5397_ACEOF
5398rm -f conftest.$ac_objext
5399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5400 (eval $ac_compile) 2>&5
5401 ac_status=$?
5402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5403 (exit $ac_status); } &&
5404 { ac_try='test -s conftest.$ac_objext'
5405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5406 (eval $ac_try) 2>&5
5407 ac_status=$?
5408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5409 (exit $ac_status); }; }; then
5410 ac_cv_type_void_p=yes
5411else
5412 echo "$as_me: failed program was:" >&5
5413cat conftest.$ac_ext >&5
5414ac_cv_type_void_p=no
5415fi
5416rm -f conftest.$ac_objext conftest.$ac_ext
5417fi
5418echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5419echo "${ECHO_T}$ac_cv_type_void_p" >&6
5420
5421echo "$as_me:$LINENO: checking size of void *" >&5
5422echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5423if test "${ac_cv_sizeof_void_p+set}" = set; then
5424 echo $ECHO_N "(cached) $ECHO_C" >&6
5425else
5426 if test "$ac_cv_type_void_p" = yes; then
5427 # The cast to unsigned long works around a bug in the HP C Compiler
5428 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5429 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5430 # This bug is HP SR number 8606223364.
5431 if test "$cross_compiling" = yes; then
5432 # Depending upon the size, compute the lo and hi bounds.
5433cat >conftest.$ac_ext <<_ACEOF
5434#line $LINENO "configure"
5435#include "confdefs.h"
5436$ac_includes_default
5437#ifdef F77_DUMMY_MAIN
5438# ifdef __cplusplus
5439 extern "C"
5440# endif
5441 int F77_DUMMY_MAIN() { return 1; }
5442#endif
5443int
5444main ()
5445{
5446static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5447test_array [0] = 0
5448
5449 ;
5450 return 0;
5451}
5452_ACEOF
5453rm -f conftest.$ac_objext
5454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5455 (eval $ac_compile) 2>&5
5456 ac_status=$?
5457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5458 (exit $ac_status); } &&
5459 { ac_try='test -s conftest.$ac_objext'
5460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5461 (eval $ac_try) 2>&5
5462 ac_status=$?
5463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5464 (exit $ac_status); }; }; then
5465 ac_lo=0 ac_mid=0
5466 while :; do
5467 cat >conftest.$ac_ext <<_ACEOF
5468#line $LINENO "configure"
5469#include "confdefs.h"
5470$ac_includes_default
5471#ifdef F77_DUMMY_MAIN
5472# ifdef __cplusplus
5473 extern "C"
5474# endif
5475 int F77_DUMMY_MAIN() { return 1; }
5476#endif
5477int
5478main ()
5479{
5480static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5481test_array [0] = 0
5482
5483 ;
5484 return 0;
5485}
5486_ACEOF
5487rm -f conftest.$ac_objext
5488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5489 (eval $ac_compile) 2>&5
5490 ac_status=$?
5491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5492 (exit $ac_status); } &&
5493 { ac_try='test -s conftest.$ac_objext'
5494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5495 (eval $ac_try) 2>&5
5496 ac_status=$?
5497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5498 (exit $ac_status); }; }; then
5499 ac_hi=$ac_mid; break
5500else
5501 echo "$as_me: failed program was:" >&5
5502cat conftest.$ac_ext >&5
5503ac_lo=`expr $ac_mid + 1`
5504 if test $ac_lo -le $ac_mid; then
5505 ac_lo= ac_hi=
5506 break
5507 fi
5508 ac_mid=`expr 2 '*' $ac_mid + 1`
5509fi
5510rm -f conftest.$ac_objext conftest.$ac_ext
5511 done
5512else
5513 echo "$as_me: failed program was:" >&5
5514cat conftest.$ac_ext >&5
5515cat >conftest.$ac_ext <<_ACEOF
5516#line $LINENO "configure"
5517#include "confdefs.h"
5518$ac_includes_default
5519#ifdef F77_DUMMY_MAIN
5520# ifdef __cplusplus
5521 extern "C"
5522# endif
5523 int F77_DUMMY_MAIN() { return 1; }
5524#endif
5525int
5526main ()
5527{
5528static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5529test_array [0] = 0
5530
5531 ;
5532 return 0;
5533}
5534_ACEOF
5535rm -f conftest.$ac_objext
5536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5537 (eval $ac_compile) 2>&5
5538 ac_status=$?
5539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5540 (exit $ac_status); } &&
5541 { ac_try='test -s conftest.$ac_objext'
5542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5543 (eval $ac_try) 2>&5
5544 ac_status=$?
5545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5546 (exit $ac_status); }; }; then
5547 ac_hi=-1 ac_mid=-1
5548 while :; do
5549 cat >conftest.$ac_ext <<_ACEOF
5550#line $LINENO "configure"
5551#include "confdefs.h"
5552$ac_includes_default
5553#ifdef F77_DUMMY_MAIN
5554# ifdef __cplusplus
5555 extern "C"
5556# endif
5557 int F77_DUMMY_MAIN() { return 1; }
5558#endif
5559int
5560main ()
5561{
5562static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5563test_array [0] = 0
5564
5565 ;
5566 return 0;
5567}
5568_ACEOF
5569rm -f conftest.$ac_objext
5570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5571 (eval $ac_compile) 2>&5
5572 ac_status=$?
5573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5574 (exit $ac_status); } &&
5575 { ac_try='test -s conftest.$ac_objext'
5576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5577 (eval $ac_try) 2>&5
5578 ac_status=$?
5579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5580 (exit $ac_status); }; }; then
5581 ac_lo=$ac_mid; break
5582else
5583 echo "$as_me: failed program was:" >&5
5584cat conftest.$ac_ext >&5
5585ac_hi=`expr '(' $ac_mid ')' - 1`
5586 if test $ac_mid -le $ac_hi; then
5587 ac_lo= ac_hi=
5588 break
5589 fi
5590 ac_mid=`expr 2 '*' $ac_mid`
5591fi
5592rm -f conftest.$ac_objext conftest.$ac_ext
5593 done
5594else
5595 echo "$as_me: failed program was:" >&5
5596cat conftest.$ac_ext >&5
5597ac_lo= ac_hi=
5598fi
5599rm -f conftest.$ac_objext conftest.$ac_ext
5600fi
5601rm -f conftest.$ac_objext conftest.$ac_ext
5602# Binary search between lo and hi bounds.
5603while test "x$ac_lo" != "x$ac_hi"; do
5604 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5605 cat >conftest.$ac_ext <<_ACEOF
5606#line $LINENO "configure"
5607#include "confdefs.h"
5608$ac_includes_default
5609#ifdef F77_DUMMY_MAIN
5610# ifdef __cplusplus
5611 extern "C"
5612# endif
5613 int F77_DUMMY_MAIN() { return 1; }
5614#endif
5615int
5616main ()
5617{
5618static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5619test_array [0] = 0
5620
5621 ;
5622 return 0;
5623}
5624_ACEOF
5625rm -f conftest.$ac_objext
5626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5627 (eval $ac_compile) 2>&5
5628 ac_status=$?
5629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5630 (exit $ac_status); } &&
5631 { ac_try='test -s conftest.$ac_objext'
5632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5633 (eval $ac_try) 2>&5
5634 ac_status=$?
5635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5636 (exit $ac_status); }; }; then
5637 ac_hi=$ac_mid
5638else
5639 echo "$as_me: failed program was:" >&5
5640cat conftest.$ac_ext >&5
5641ac_lo=`expr '(' $ac_mid ')' + 1`
5642fi
5643rm -f conftest.$ac_objext conftest.$ac_ext
5644done
5645case $ac_lo in
5646?*) ac_cv_sizeof_void_p=$ac_lo;;
5647'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5648echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5649 { (exit 1); exit 1; }; } ;;
5650esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005651else
5652 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005653 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5654echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5655 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005656else
Martin v. Löwis11437992002-04-12 09:54:03 +00005657 cat >conftest.$ac_ext <<_ACEOF
5658#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005659#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005660$ac_includes_default
5661long longval () { return (long) (sizeof (void *)); }
5662unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005663#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005664#include <stdlib.h>
5665#ifdef F77_DUMMY_MAIN
5666# ifdef __cplusplus
5667 extern "C"
5668# endif
5669 int F77_DUMMY_MAIN() { return 1; }
5670#endif
5671int
5672main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005673{
Martin v. Löwis11437992002-04-12 09:54:03 +00005674
5675 FILE *f = fopen ("conftest.val", "w");
5676 if (! f)
5677 exit (1);
5678 if (((long) (sizeof (void *))) < 0)
5679 {
5680 long i = longval ();
5681 if (i != ((long) (sizeof (void *))))
5682 exit (1);
5683 fprintf (f, "%ld\n", i);
5684 }
5685 else
5686 {
5687 unsigned long i = ulongval ();
5688 if (i != ((long) (sizeof (void *))))
5689 exit (1);
5690 fprintf (f, "%lu\n", i);
5691 }
5692 exit (ferror (f) || fclose (f) != 0);
5693
5694 ;
5695 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005696}
Martin v. Löwis11437992002-04-12 09:54:03 +00005697_ACEOF
5698rm -f conftest$ac_exeext
5699if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5700 (eval $ac_link) 2>&5
5701 ac_status=$?
5702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5703 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5705 (eval $ac_try) 2>&5
5706 ac_status=$?
5707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5708 (exit $ac_status); }; }; then
5709 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005710else
Martin v. Löwis11437992002-04-12 09:54:03 +00005711 echo "$as_me: program exited with status $ac_status" >&5
5712echo "$as_me: failed program was:" >&5
5713cat conftest.$ac_ext >&5
5714( exit $ac_status )
5715{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5716echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5717 { (exit 1); exit 1; }; }
5718fi
5719rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5720fi
5721fi
5722rm -f conftest.val
5723else
Guido van Rossumad678af1998-10-02 14:42:15 +00005724 ac_cv_sizeof_void_p=0
5725fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005727echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5728echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5729cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005730#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005731_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005732
5733
Martin v. Löwis11437992002-04-12 09:54:03 +00005734echo "$as_me:$LINENO: checking for char" >&5
5735echo $ECHO_N "checking for char... $ECHO_C" >&6
5736if test "${ac_cv_type_char+set}" = set; then
5737 echo $ECHO_N "(cached) $ECHO_C" >&6
5738else
5739 cat >conftest.$ac_ext <<_ACEOF
5740#line $LINENO "configure"
5741#include "confdefs.h"
5742$ac_includes_default
5743#ifdef F77_DUMMY_MAIN
5744# ifdef __cplusplus
5745 extern "C"
5746# endif
5747 int F77_DUMMY_MAIN() { return 1; }
5748#endif
5749int
5750main ()
5751{
5752if ((char *) 0)
5753 return 0;
5754if (sizeof (char))
5755 return 0;
5756 ;
5757 return 0;
5758}
5759_ACEOF
5760rm -f conftest.$ac_objext
5761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5762 (eval $ac_compile) 2>&5
5763 ac_status=$?
5764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5765 (exit $ac_status); } &&
5766 { ac_try='test -s conftest.$ac_objext'
5767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5768 (eval $ac_try) 2>&5
5769 ac_status=$?
5770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5771 (exit $ac_status); }; }; then
5772 ac_cv_type_char=yes
5773else
5774 echo "$as_me: failed program was:" >&5
5775cat conftest.$ac_ext >&5
5776ac_cv_type_char=no
5777fi
5778rm -f conftest.$ac_objext conftest.$ac_ext
5779fi
5780echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5781echo "${ECHO_T}$ac_cv_type_char" >&6
5782
5783echo "$as_me:$LINENO: checking size of char" >&5
5784echo $ECHO_N "checking size of char... $ECHO_C" >&6
5785if test "${ac_cv_sizeof_char+set}" = set; then
5786 echo $ECHO_N "(cached) $ECHO_C" >&6
5787else
5788 if test "$ac_cv_type_char" = yes; then
5789 # The cast to unsigned long works around a bug in the HP C Compiler
5790 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5791 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5792 # This bug is HP SR number 8606223364.
5793 if test "$cross_compiling" = yes; then
5794 # Depending upon the size, compute the lo and hi bounds.
5795cat >conftest.$ac_ext <<_ACEOF
5796#line $LINENO "configure"
5797#include "confdefs.h"
5798$ac_includes_default
5799#ifdef F77_DUMMY_MAIN
5800# ifdef __cplusplus
5801 extern "C"
5802# endif
5803 int F77_DUMMY_MAIN() { return 1; }
5804#endif
5805int
5806main ()
5807{
5808static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5809test_array [0] = 0
5810
5811 ;
5812 return 0;
5813}
5814_ACEOF
5815rm -f conftest.$ac_objext
5816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5817 (eval $ac_compile) 2>&5
5818 ac_status=$?
5819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820 (exit $ac_status); } &&
5821 { ac_try='test -s conftest.$ac_objext'
5822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5823 (eval $ac_try) 2>&5
5824 ac_status=$?
5825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826 (exit $ac_status); }; }; then
5827 ac_lo=0 ac_mid=0
5828 while :; do
5829 cat >conftest.$ac_ext <<_ACEOF
5830#line $LINENO "configure"
5831#include "confdefs.h"
5832$ac_includes_default
5833#ifdef F77_DUMMY_MAIN
5834# ifdef __cplusplus
5835 extern "C"
5836# endif
5837 int F77_DUMMY_MAIN() { return 1; }
5838#endif
5839int
5840main ()
5841{
5842static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5843test_array [0] = 0
5844
5845 ;
5846 return 0;
5847}
5848_ACEOF
5849rm -f conftest.$ac_objext
5850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5851 (eval $ac_compile) 2>&5
5852 ac_status=$?
5853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5854 (exit $ac_status); } &&
5855 { ac_try='test -s conftest.$ac_objext'
5856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5857 (eval $ac_try) 2>&5
5858 ac_status=$?
5859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5860 (exit $ac_status); }; }; then
5861 ac_hi=$ac_mid; break
5862else
5863 echo "$as_me: failed program was:" >&5
5864cat conftest.$ac_ext >&5
5865ac_lo=`expr $ac_mid + 1`
5866 if test $ac_lo -le $ac_mid; then
5867 ac_lo= ac_hi=
5868 break
5869 fi
5870 ac_mid=`expr 2 '*' $ac_mid + 1`
5871fi
5872rm -f conftest.$ac_objext conftest.$ac_ext
5873 done
5874else
5875 echo "$as_me: failed program was:" >&5
5876cat conftest.$ac_ext >&5
5877cat >conftest.$ac_ext <<_ACEOF
5878#line $LINENO "configure"
5879#include "confdefs.h"
5880$ac_includes_default
5881#ifdef F77_DUMMY_MAIN
5882# ifdef __cplusplus
5883 extern "C"
5884# endif
5885 int F77_DUMMY_MAIN() { return 1; }
5886#endif
5887int
5888main ()
5889{
5890static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5891test_array [0] = 0
5892
5893 ;
5894 return 0;
5895}
5896_ACEOF
5897rm -f conftest.$ac_objext
5898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5899 (eval $ac_compile) 2>&5
5900 ac_status=$?
5901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5902 (exit $ac_status); } &&
5903 { ac_try='test -s conftest.$ac_objext'
5904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5905 (eval $ac_try) 2>&5
5906 ac_status=$?
5907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5908 (exit $ac_status); }; }; then
5909 ac_hi=-1 ac_mid=-1
5910 while :; do
5911 cat >conftest.$ac_ext <<_ACEOF
5912#line $LINENO "configure"
5913#include "confdefs.h"
5914$ac_includes_default
5915#ifdef F77_DUMMY_MAIN
5916# ifdef __cplusplus
5917 extern "C"
5918# endif
5919 int F77_DUMMY_MAIN() { return 1; }
5920#endif
5921int
5922main ()
5923{
5924static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5925test_array [0] = 0
5926
5927 ;
5928 return 0;
5929}
5930_ACEOF
5931rm -f conftest.$ac_objext
5932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5933 (eval $ac_compile) 2>&5
5934 ac_status=$?
5935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5936 (exit $ac_status); } &&
5937 { ac_try='test -s conftest.$ac_objext'
5938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5939 (eval $ac_try) 2>&5
5940 ac_status=$?
5941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5942 (exit $ac_status); }; }; then
5943 ac_lo=$ac_mid; break
5944else
5945 echo "$as_me: failed program was:" >&5
5946cat conftest.$ac_ext >&5
5947ac_hi=`expr '(' $ac_mid ')' - 1`
5948 if test $ac_mid -le $ac_hi; then
5949 ac_lo= ac_hi=
5950 break
5951 fi
5952 ac_mid=`expr 2 '*' $ac_mid`
5953fi
5954rm -f conftest.$ac_objext conftest.$ac_ext
5955 done
5956else
5957 echo "$as_me: failed program was:" >&5
5958cat conftest.$ac_ext >&5
5959ac_lo= ac_hi=
5960fi
5961rm -f conftest.$ac_objext conftest.$ac_ext
5962fi
5963rm -f conftest.$ac_objext conftest.$ac_ext
5964# Binary search between lo and hi bounds.
5965while test "x$ac_lo" != "x$ac_hi"; do
5966 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5967 cat >conftest.$ac_ext <<_ACEOF
5968#line $LINENO "configure"
5969#include "confdefs.h"
5970$ac_includes_default
5971#ifdef F77_DUMMY_MAIN
5972# ifdef __cplusplus
5973 extern "C"
5974# endif
5975 int F77_DUMMY_MAIN() { return 1; }
5976#endif
5977int
5978main ()
5979{
5980static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5981test_array [0] = 0
5982
5983 ;
5984 return 0;
5985}
5986_ACEOF
5987rm -f conftest.$ac_objext
5988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5989 (eval $ac_compile) 2>&5
5990 ac_status=$?
5991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5992 (exit $ac_status); } &&
5993 { ac_try='test -s conftest.$ac_objext'
5994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5995 (eval $ac_try) 2>&5
5996 ac_status=$?
5997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5998 (exit $ac_status); }; }; then
5999 ac_hi=$ac_mid
6000else
6001 echo "$as_me: failed program was:" >&5
6002cat conftest.$ac_ext >&5
6003ac_lo=`expr '(' $ac_mid ')' + 1`
6004fi
6005rm -f conftest.$ac_objext conftest.$ac_ext
6006done
6007case $ac_lo in
6008?*) ac_cv_sizeof_char=$ac_lo;;
6009'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6010echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6011 { (exit 1); exit 1; }; } ;;
6012esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006013else
6014 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006015 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6016echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6017 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006018else
Martin v. Löwis11437992002-04-12 09:54:03 +00006019 cat >conftest.$ac_ext <<_ACEOF
6020#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006021#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006022$ac_includes_default
6023long longval () { return (long) (sizeof (char)); }
6024unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006025#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006026#include <stdlib.h>
6027#ifdef F77_DUMMY_MAIN
6028# ifdef __cplusplus
6029 extern "C"
6030# endif
6031 int F77_DUMMY_MAIN() { return 1; }
6032#endif
6033int
6034main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006035{
Martin v. Löwis11437992002-04-12 09:54:03 +00006036
6037 FILE *f = fopen ("conftest.val", "w");
6038 if (! f)
6039 exit (1);
6040 if (((long) (sizeof (char))) < 0)
6041 {
6042 long i = longval ();
6043 if (i != ((long) (sizeof (char))))
6044 exit (1);
6045 fprintf (f, "%ld\n", i);
6046 }
6047 else
6048 {
6049 unsigned long i = ulongval ();
6050 if (i != ((long) (sizeof (char))))
6051 exit (1);
6052 fprintf (f, "%lu\n", i);
6053 }
6054 exit (ferror (f) || fclose (f) != 0);
6055
6056 ;
6057 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006058}
Martin v. Löwis11437992002-04-12 09:54:03 +00006059_ACEOF
6060rm -f conftest$ac_exeext
6061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6062 (eval $ac_link) 2>&5
6063 ac_status=$?
6064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6067 (eval $ac_try) 2>&5
6068 ac_status=$?
6069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6070 (exit $ac_status); }; }; then
6071 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006072else
Martin v. Löwis11437992002-04-12 09:54:03 +00006073 echo "$as_me: program exited with status $ac_status" >&5
6074echo "$as_me: failed program was:" >&5
6075cat conftest.$ac_ext >&5
6076( exit $ac_status )
6077{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6078echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6079 { (exit 1); exit 1; }; }
6080fi
6081rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6082fi
6083fi
6084rm -f conftest.val
6085else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006086 ac_cv_sizeof_char=0
6087fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006088fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006089echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6090echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6091cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006092#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006093_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006094
6095
Martin v. Löwis11437992002-04-12 09:54:03 +00006096echo "$as_me:$LINENO: checking for short" >&5
6097echo $ECHO_N "checking for short... $ECHO_C" >&6
6098if test "${ac_cv_type_short+set}" = set; then
6099 echo $ECHO_N "(cached) $ECHO_C" >&6
6100else
6101 cat >conftest.$ac_ext <<_ACEOF
6102#line $LINENO "configure"
6103#include "confdefs.h"
6104$ac_includes_default
6105#ifdef F77_DUMMY_MAIN
6106# ifdef __cplusplus
6107 extern "C"
6108# endif
6109 int F77_DUMMY_MAIN() { return 1; }
6110#endif
6111int
6112main ()
6113{
6114if ((short *) 0)
6115 return 0;
6116if (sizeof (short))
6117 return 0;
6118 ;
6119 return 0;
6120}
6121_ACEOF
6122rm -f conftest.$ac_objext
6123if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6124 (eval $ac_compile) 2>&5
6125 ac_status=$?
6126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6127 (exit $ac_status); } &&
6128 { ac_try='test -s conftest.$ac_objext'
6129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6130 (eval $ac_try) 2>&5
6131 ac_status=$?
6132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6133 (exit $ac_status); }; }; then
6134 ac_cv_type_short=yes
6135else
6136 echo "$as_me: failed program was:" >&5
6137cat conftest.$ac_ext >&5
6138ac_cv_type_short=no
6139fi
6140rm -f conftest.$ac_objext conftest.$ac_ext
6141fi
6142echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6143echo "${ECHO_T}$ac_cv_type_short" >&6
6144
6145echo "$as_me:$LINENO: checking size of short" >&5
6146echo $ECHO_N "checking size of short... $ECHO_C" >&6
6147if test "${ac_cv_sizeof_short+set}" = set; then
6148 echo $ECHO_N "(cached) $ECHO_C" >&6
6149else
6150 if test "$ac_cv_type_short" = yes; then
6151 # The cast to unsigned long works around a bug in the HP C Compiler
6152 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6153 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6154 # This bug is HP SR number 8606223364.
6155 if test "$cross_compiling" = yes; then
6156 # Depending upon the size, compute the lo and hi bounds.
6157cat >conftest.$ac_ext <<_ACEOF
6158#line $LINENO "configure"
6159#include "confdefs.h"
6160$ac_includes_default
6161#ifdef F77_DUMMY_MAIN
6162# ifdef __cplusplus
6163 extern "C"
6164# endif
6165 int F77_DUMMY_MAIN() { return 1; }
6166#endif
6167int
6168main ()
6169{
6170static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6171test_array [0] = 0
6172
6173 ;
6174 return 0;
6175}
6176_ACEOF
6177rm -f conftest.$ac_objext
6178if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6179 (eval $ac_compile) 2>&5
6180 ac_status=$?
6181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6182 (exit $ac_status); } &&
6183 { ac_try='test -s conftest.$ac_objext'
6184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6185 (eval $ac_try) 2>&5
6186 ac_status=$?
6187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6188 (exit $ac_status); }; }; then
6189 ac_lo=0 ac_mid=0
6190 while :; do
6191 cat >conftest.$ac_ext <<_ACEOF
6192#line $LINENO "configure"
6193#include "confdefs.h"
6194$ac_includes_default
6195#ifdef F77_DUMMY_MAIN
6196# ifdef __cplusplus
6197 extern "C"
6198# endif
6199 int F77_DUMMY_MAIN() { return 1; }
6200#endif
6201int
6202main ()
6203{
6204static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6205test_array [0] = 0
6206
6207 ;
6208 return 0;
6209}
6210_ACEOF
6211rm -f conftest.$ac_objext
6212if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6213 (eval $ac_compile) 2>&5
6214 ac_status=$?
6215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6216 (exit $ac_status); } &&
6217 { ac_try='test -s conftest.$ac_objext'
6218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6219 (eval $ac_try) 2>&5
6220 ac_status=$?
6221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6222 (exit $ac_status); }; }; then
6223 ac_hi=$ac_mid; break
6224else
6225 echo "$as_me: failed program was:" >&5
6226cat conftest.$ac_ext >&5
6227ac_lo=`expr $ac_mid + 1`
6228 if test $ac_lo -le $ac_mid; then
6229 ac_lo= ac_hi=
6230 break
6231 fi
6232 ac_mid=`expr 2 '*' $ac_mid + 1`
6233fi
6234rm -f conftest.$ac_objext conftest.$ac_ext
6235 done
6236else
6237 echo "$as_me: failed program was:" >&5
6238cat conftest.$ac_ext >&5
6239cat >conftest.$ac_ext <<_ACEOF
6240#line $LINENO "configure"
6241#include "confdefs.h"
6242$ac_includes_default
6243#ifdef F77_DUMMY_MAIN
6244# ifdef __cplusplus
6245 extern "C"
6246# endif
6247 int F77_DUMMY_MAIN() { return 1; }
6248#endif
6249int
6250main ()
6251{
6252static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6253test_array [0] = 0
6254
6255 ;
6256 return 0;
6257}
6258_ACEOF
6259rm -f conftest.$ac_objext
6260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6261 (eval $ac_compile) 2>&5
6262 ac_status=$?
6263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6264 (exit $ac_status); } &&
6265 { ac_try='test -s conftest.$ac_objext'
6266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6267 (eval $ac_try) 2>&5
6268 ac_status=$?
6269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6270 (exit $ac_status); }; }; then
6271 ac_hi=-1 ac_mid=-1
6272 while :; do
6273 cat >conftest.$ac_ext <<_ACEOF
6274#line $LINENO "configure"
6275#include "confdefs.h"
6276$ac_includes_default
6277#ifdef F77_DUMMY_MAIN
6278# ifdef __cplusplus
6279 extern "C"
6280# endif
6281 int F77_DUMMY_MAIN() { return 1; }
6282#endif
6283int
6284main ()
6285{
6286static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6287test_array [0] = 0
6288
6289 ;
6290 return 0;
6291}
6292_ACEOF
6293rm -f conftest.$ac_objext
6294if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6295 (eval $ac_compile) 2>&5
6296 ac_status=$?
6297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6298 (exit $ac_status); } &&
6299 { ac_try='test -s conftest.$ac_objext'
6300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6301 (eval $ac_try) 2>&5
6302 ac_status=$?
6303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6304 (exit $ac_status); }; }; then
6305 ac_lo=$ac_mid; break
6306else
6307 echo "$as_me: failed program was:" >&5
6308cat conftest.$ac_ext >&5
6309ac_hi=`expr '(' $ac_mid ')' - 1`
6310 if test $ac_mid -le $ac_hi; then
6311 ac_lo= ac_hi=
6312 break
6313 fi
6314 ac_mid=`expr 2 '*' $ac_mid`
6315fi
6316rm -f conftest.$ac_objext conftest.$ac_ext
6317 done
6318else
6319 echo "$as_me: failed program was:" >&5
6320cat conftest.$ac_ext >&5
6321ac_lo= ac_hi=
6322fi
6323rm -f conftest.$ac_objext conftest.$ac_ext
6324fi
6325rm -f conftest.$ac_objext conftest.$ac_ext
6326# Binary search between lo and hi bounds.
6327while test "x$ac_lo" != "x$ac_hi"; do
6328 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6329 cat >conftest.$ac_ext <<_ACEOF
6330#line $LINENO "configure"
6331#include "confdefs.h"
6332$ac_includes_default
6333#ifdef F77_DUMMY_MAIN
6334# ifdef __cplusplus
6335 extern "C"
6336# endif
6337 int F77_DUMMY_MAIN() { return 1; }
6338#endif
6339int
6340main ()
6341{
6342static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6343test_array [0] = 0
6344
6345 ;
6346 return 0;
6347}
6348_ACEOF
6349rm -f conftest.$ac_objext
6350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6351 (eval $ac_compile) 2>&5
6352 ac_status=$?
6353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354 (exit $ac_status); } &&
6355 { ac_try='test -s conftest.$ac_objext'
6356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6357 (eval $ac_try) 2>&5
6358 ac_status=$?
6359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6360 (exit $ac_status); }; }; then
6361 ac_hi=$ac_mid
6362else
6363 echo "$as_me: failed program was:" >&5
6364cat conftest.$ac_ext >&5
6365ac_lo=`expr '(' $ac_mid ')' + 1`
6366fi
6367rm -f conftest.$ac_objext conftest.$ac_ext
6368done
6369case $ac_lo in
6370?*) ac_cv_sizeof_short=$ac_lo;;
6371'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6372echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6373 { (exit 1); exit 1; }; } ;;
6374esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006375else
6376 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006377 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6378echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6379 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006380else
Martin v. Löwis11437992002-04-12 09:54:03 +00006381 cat >conftest.$ac_ext <<_ACEOF
6382#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006383#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006384$ac_includes_default
6385long longval () { return (long) (sizeof (short)); }
6386unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006387#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006388#include <stdlib.h>
6389#ifdef F77_DUMMY_MAIN
6390# ifdef __cplusplus
6391 extern "C"
6392# endif
6393 int F77_DUMMY_MAIN() { return 1; }
6394#endif
6395int
6396main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006397{
Martin v. Löwis11437992002-04-12 09:54:03 +00006398
6399 FILE *f = fopen ("conftest.val", "w");
6400 if (! f)
6401 exit (1);
6402 if (((long) (sizeof (short))) < 0)
6403 {
6404 long i = longval ();
6405 if (i != ((long) (sizeof (short))))
6406 exit (1);
6407 fprintf (f, "%ld\n", i);
6408 }
6409 else
6410 {
6411 unsigned long i = ulongval ();
6412 if (i != ((long) (sizeof (short))))
6413 exit (1);
6414 fprintf (f, "%lu\n", i);
6415 }
6416 exit (ferror (f) || fclose (f) != 0);
6417
6418 ;
6419 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006420}
Martin v. Löwis11437992002-04-12 09:54:03 +00006421_ACEOF
6422rm -f conftest$ac_exeext
6423if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6424 (eval $ac_link) 2>&5
6425 ac_status=$?
6426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6427 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6429 (eval $ac_try) 2>&5
6430 ac_status=$?
6431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6432 (exit $ac_status); }; }; then
6433 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006434else
Martin v. Löwis11437992002-04-12 09:54:03 +00006435 echo "$as_me: program exited with status $ac_status" >&5
6436echo "$as_me: failed program was:" >&5
6437cat conftest.$ac_ext >&5
6438( exit $ac_status )
6439{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6440echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6441 { (exit 1); exit 1; }; }
6442fi
6443rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6444fi
6445fi
6446rm -f conftest.val
6447else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006448 ac_cv_sizeof_short=0
6449fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006450fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006451echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6452echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6453cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006454#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006455_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006456
6457
Martin v. Löwis11437992002-04-12 09:54:03 +00006458echo "$as_me:$LINENO: checking for float" >&5
6459echo $ECHO_N "checking for float... $ECHO_C" >&6
6460if test "${ac_cv_type_float+set}" = set; then
6461 echo $ECHO_N "(cached) $ECHO_C" >&6
6462else
6463 cat >conftest.$ac_ext <<_ACEOF
6464#line $LINENO "configure"
6465#include "confdefs.h"
6466$ac_includes_default
6467#ifdef F77_DUMMY_MAIN
6468# ifdef __cplusplus
6469 extern "C"
6470# endif
6471 int F77_DUMMY_MAIN() { return 1; }
6472#endif
6473int
6474main ()
6475{
6476if ((float *) 0)
6477 return 0;
6478if (sizeof (float))
6479 return 0;
6480 ;
6481 return 0;
6482}
6483_ACEOF
6484rm -f conftest.$ac_objext
6485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6486 (eval $ac_compile) 2>&5
6487 ac_status=$?
6488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6489 (exit $ac_status); } &&
6490 { ac_try='test -s conftest.$ac_objext'
6491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6492 (eval $ac_try) 2>&5
6493 ac_status=$?
6494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6495 (exit $ac_status); }; }; then
6496 ac_cv_type_float=yes
6497else
6498 echo "$as_me: failed program was:" >&5
6499cat conftest.$ac_ext >&5
6500ac_cv_type_float=no
6501fi
6502rm -f conftest.$ac_objext conftest.$ac_ext
6503fi
6504echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6505echo "${ECHO_T}$ac_cv_type_float" >&6
6506
6507echo "$as_me:$LINENO: checking size of float" >&5
6508echo $ECHO_N "checking size of float... $ECHO_C" >&6
6509if test "${ac_cv_sizeof_float+set}" = set; then
6510 echo $ECHO_N "(cached) $ECHO_C" >&6
6511else
6512 if test "$ac_cv_type_float" = yes; then
6513 # The cast to unsigned long works around a bug in the HP C Compiler
6514 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6515 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6516 # This bug is HP SR number 8606223364.
6517 if test "$cross_compiling" = yes; then
6518 # Depending upon the size, compute the lo and hi bounds.
6519cat >conftest.$ac_ext <<_ACEOF
6520#line $LINENO "configure"
6521#include "confdefs.h"
6522$ac_includes_default
6523#ifdef F77_DUMMY_MAIN
6524# ifdef __cplusplus
6525 extern "C"
6526# endif
6527 int F77_DUMMY_MAIN() { return 1; }
6528#endif
6529int
6530main ()
6531{
6532static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6533test_array [0] = 0
6534
6535 ;
6536 return 0;
6537}
6538_ACEOF
6539rm -f conftest.$ac_objext
6540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6541 (eval $ac_compile) 2>&5
6542 ac_status=$?
6543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6544 (exit $ac_status); } &&
6545 { ac_try='test -s conftest.$ac_objext'
6546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6547 (eval $ac_try) 2>&5
6548 ac_status=$?
6549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6550 (exit $ac_status); }; }; then
6551 ac_lo=0 ac_mid=0
6552 while :; do
6553 cat >conftest.$ac_ext <<_ACEOF
6554#line $LINENO "configure"
6555#include "confdefs.h"
6556$ac_includes_default
6557#ifdef F77_DUMMY_MAIN
6558# ifdef __cplusplus
6559 extern "C"
6560# endif
6561 int F77_DUMMY_MAIN() { return 1; }
6562#endif
6563int
6564main ()
6565{
6566static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6567test_array [0] = 0
6568
6569 ;
6570 return 0;
6571}
6572_ACEOF
6573rm -f conftest.$ac_objext
6574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6575 (eval $ac_compile) 2>&5
6576 ac_status=$?
6577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6578 (exit $ac_status); } &&
6579 { ac_try='test -s conftest.$ac_objext'
6580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6581 (eval $ac_try) 2>&5
6582 ac_status=$?
6583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6584 (exit $ac_status); }; }; then
6585 ac_hi=$ac_mid; break
6586else
6587 echo "$as_me: failed program was:" >&5
6588cat conftest.$ac_ext >&5
6589ac_lo=`expr $ac_mid + 1`
6590 if test $ac_lo -le $ac_mid; then
6591 ac_lo= ac_hi=
6592 break
6593 fi
6594 ac_mid=`expr 2 '*' $ac_mid + 1`
6595fi
6596rm -f conftest.$ac_objext conftest.$ac_ext
6597 done
6598else
6599 echo "$as_me: failed program was:" >&5
6600cat conftest.$ac_ext >&5
6601cat >conftest.$ac_ext <<_ACEOF
6602#line $LINENO "configure"
6603#include "confdefs.h"
6604$ac_includes_default
6605#ifdef F77_DUMMY_MAIN
6606# ifdef __cplusplus
6607 extern "C"
6608# endif
6609 int F77_DUMMY_MAIN() { return 1; }
6610#endif
6611int
6612main ()
6613{
6614static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6615test_array [0] = 0
6616
6617 ;
6618 return 0;
6619}
6620_ACEOF
6621rm -f conftest.$ac_objext
6622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6623 (eval $ac_compile) 2>&5
6624 ac_status=$?
6625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6626 (exit $ac_status); } &&
6627 { ac_try='test -s conftest.$ac_objext'
6628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6629 (eval $ac_try) 2>&5
6630 ac_status=$?
6631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6632 (exit $ac_status); }; }; then
6633 ac_hi=-1 ac_mid=-1
6634 while :; do
6635 cat >conftest.$ac_ext <<_ACEOF
6636#line $LINENO "configure"
6637#include "confdefs.h"
6638$ac_includes_default
6639#ifdef F77_DUMMY_MAIN
6640# ifdef __cplusplus
6641 extern "C"
6642# endif
6643 int F77_DUMMY_MAIN() { return 1; }
6644#endif
6645int
6646main ()
6647{
6648static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6649test_array [0] = 0
6650
6651 ;
6652 return 0;
6653}
6654_ACEOF
6655rm -f conftest.$ac_objext
6656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6657 (eval $ac_compile) 2>&5
6658 ac_status=$?
6659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6660 (exit $ac_status); } &&
6661 { ac_try='test -s conftest.$ac_objext'
6662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6663 (eval $ac_try) 2>&5
6664 ac_status=$?
6665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6666 (exit $ac_status); }; }; then
6667 ac_lo=$ac_mid; break
6668else
6669 echo "$as_me: failed program was:" >&5
6670cat conftest.$ac_ext >&5
6671ac_hi=`expr '(' $ac_mid ')' - 1`
6672 if test $ac_mid -le $ac_hi; then
6673 ac_lo= ac_hi=
6674 break
6675 fi
6676 ac_mid=`expr 2 '*' $ac_mid`
6677fi
6678rm -f conftest.$ac_objext conftest.$ac_ext
6679 done
6680else
6681 echo "$as_me: failed program was:" >&5
6682cat conftest.$ac_ext >&5
6683ac_lo= ac_hi=
6684fi
6685rm -f conftest.$ac_objext conftest.$ac_ext
6686fi
6687rm -f conftest.$ac_objext conftest.$ac_ext
6688# Binary search between lo and hi bounds.
6689while test "x$ac_lo" != "x$ac_hi"; do
6690 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6691 cat >conftest.$ac_ext <<_ACEOF
6692#line $LINENO "configure"
6693#include "confdefs.h"
6694$ac_includes_default
6695#ifdef F77_DUMMY_MAIN
6696# ifdef __cplusplus
6697 extern "C"
6698# endif
6699 int F77_DUMMY_MAIN() { return 1; }
6700#endif
6701int
6702main ()
6703{
6704static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6705test_array [0] = 0
6706
6707 ;
6708 return 0;
6709}
6710_ACEOF
6711rm -f conftest.$ac_objext
6712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6713 (eval $ac_compile) 2>&5
6714 ac_status=$?
6715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6716 (exit $ac_status); } &&
6717 { ac_try='test -s conftest.$ac_objext'
6718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6719 (eval $ac_try) 2>&5
6720 ac_status=$?
6721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6722 (exit $ac_status); }; }; then
6723 ac_hi=$ac_mid
6724else
6725 echo "$as_me: failed program was:" >&5
6726cat conftest.$ac_ext >&5
6727ac_lo=`expr '(' $ac_mid ')' + 1`
6728fi
6729rm -f conftest.$ac_objext conftest.$ac_ext
6730done
6731case $ac_lo in
6732?*) ac_cv_sizeof_float=$ac_lo;;
6733'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6734echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6735 { (exit 1); exit 1; }; } ;;
6736esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006737else
6738 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006739 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6740echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6741 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006742else
Martin v. Löwis11437992002-04-12 09:54:03 +00006743 cat >conftest.$ac_ext <<_ACEOF
6744#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006745#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006746$ac_includes_default
6747long longval () { return (long) (sizeof (float)); }
6748unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006749#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006750#include <stdlib.h>
6751#ifdef F77_DUMMY_MAIN
6752# ifdef __cplusplus
6753 extern "C"
6754# endif
6755 int F77_DUMMY_MAIN() { return 1; }
6756#endif
6757int
6758main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006759{
Martin v. Löwis11437992002-04-12 09:54:03 +00006760
6761 FILE *f = fopen ("conftest.val", "w");
6762 if (! f)
6763 exit (1);
6764 if (((long) (sizeof (float))) < 0)
6765 {
6766 long i = longval ();
6767 if (i != ((long) (sizeof (float))))
6768 exit (1);
6769 fprintf (f, "%ld\n", i);
6770 }
6771 else
6772 {
6773 unsigned long i = ulongval ();
6774 if (i != ((long) (sizeof (float))))
6775 exit (1);
6776 fprintf (f, "%lu\n", i);
6777 }
6778 exit (ferror (f) || fclose (f) != 0);
6779
6780 ;
6781 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006782}
Martin v. Löwis11437992002-04-12 09:54:03 +00006783_ACEOF
6784rm -f conftest$ac_exeext
6785if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6786 (eval $ac_link) 2>&5
6787 ac_status=$?
6788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6789 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6791 (eval $ac_try) 2>&5
6792 ac_status=$?
6793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6794 (exit $ac_status); }; }; then
6795 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006796else
Martin v. Löwis11437992002-04-12 09:54:03 +00006797 echo "$as_me: program exited with status $ac_status" >&5
6798echo "$as_me: failed program was:" >&5
6799cat conftest.$ac_ext >&5
6800( exit $ac_status )
6801{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6802echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6803 { (exit 1); exit 1; }; }
6804fi
6805rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6806fi
6807fi
6808rm -f conftest.val
6809else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006810 ac_cv_sizeof_float=0
6811fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006812fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006813echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6814echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6815cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006816#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006817_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006818
6819
Martin v. Löwis11437992002-04-12 09:54:03 +00006820echo "$as_me:$LINENO: checking for double" >&5
6821echo $ECHO_N "checking for double... $ECHO_C" >&6
6822if test "${ac_cv_type_double+set}" = set; then
6823 echo $ECHO_N "(cached) $ECHO_C" >&6
6824else
6825 cat >conftest.$ac_ext <<_ACEOF
6826#line $LINENO "configure"
6827#include "confdefs.h"
6828$ac_includes_default
6829#ifdef F77_DUMMY_MAIN
6830# ifdef __cplusplus
6831 extern "C"
6832# endif
6833 int F77_DUMMY_MAIN() { return 1; }
6834#endif
6835int
6836main ()
6837{
6838if ((double *) 0)
6839 return 0;
6840if (sizeof (double))
6841 return 0;
6842 ;
6843 return 0;
6844}
6845_ACEOF
6846rm -f conftest.$ac_objext
6847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6848 (eval $ac_compile) 2>&5
6849 ac_status=$?
6850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6851 (exit $ac_status); } &&
6852 { ac_try='test -s conftest.$ac_objext'
6853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6854 (eval $ac_try) 2>&5
6855 ac_status=$?
6856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6857 (exit $ac_status); }; }; then
6858 ac_cv_type_double=yes
6859else
6860 echo "$as_me: failed program was:" >&5
6861cat conftest.$ac_ext >&5
6862ac_cv_type_double=no
6863fi
6864rm -f conftest.$ac_objext conftest.$ac_ext
6865fi
6866echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6867echo "${ECHO_T}$ac_cv_type_double" >&6
6868
6869echo "$as_me:$LINENO: checking size of double" >&5
6870echo $ECHO_N "checking size of double... $ECHO_C" >&6
6871if test "${ac_cv_sizeof_double+set}" = set; then
6872 echo $ECHO_N "(cached) $ECHO_C" >&6
6873else
6874 if test "$ac_cv_type_double" = yes; then
6875 # The cast to unsigned long works around a bug in the HP C Compiler
6876 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6877 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6878 # This bug is HP SR number 8606223364.
6879 if test "$cross_compiling" = yes; then
6880 # Depending upon the size, compute the lo and hi bounds.
6881cat >conftest.$ac_ext <<_ACEOF
6882#line $LINENO "configure"
6883#include "confdefs.h"
6884$ac_includes_default
6885#ifdef F77_DUMMY_MAIN
6886# ifdef __cplusplus
6887 extern "C"
6888# endif
6889 int F77_DUMMY_MAIN() { return 1; }
6890#endif
6891int
6892main ()
6893{
6894static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6895test_array [0] = 0
6896
6897 ;
6898 return 0;
6899}
6900_ACEOF
6901rm -f conftest.$ac_objext
6902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6903 (eval $ac_compile) 2>&5
6904 ac_status=$?
6905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6906 (exit $ac_status); } &&
6907 { ac_try='test -s conftest.$ac_objext'
6908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6909 (eval $ac_try) 2>&5
6910 ac_status=$?
6911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6912 (exit $ac_status); }; }; then
6913 ac_lo=0 ac_mid=0
6914 while :; do
6915 cat >conftest.$ac_ext <<_ACEOF
6916#line $LINENO "configure"
6917#include "confdefs.h"
6918$ac_includes_default
6919#ifdef F77_DUMMY_MAIN
6920# ifdef __cplusplus
6921 extern "C"
6922# endif
6923 int F77_DUMMY_MAIN() { return 1; }
6924#endif
6925int
6926main ()
6927{
6928static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6929test_array [0] = 0
6930
6931 ;
6932 return 0;
6933}
6934_ACEOF
6935rm -f conftest.$ac_objext
6936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6937 (eval $ac_compile) 2>&5
6938 ac_status=$?
6939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6940 (exit $ac_status); } &&
6941 { ac_try='test -s conftest.$ac_objext'
6942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6943 (eval $ac_try) 2>&5
6944 ac_status=$?
6945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6946 (exit $ac_status); }; }; then
6947 ac_hi=$ac_mid; break
6948else
6949 echo "$as_me: failed program was:" >&5
6950cat conftest.$ac_ext >&5
6951ac_lo=`expr $ac_mid + 1`
6952 if test $ac_lo -le $ac_mid; then
6953 ac_lo= ac_hi=
6954 break
6955 fi
6956 ac_mid=`expr 2 '*' $ac_mid + 1`
6957fi
6958rm -f conftest.$ac_objext conftest.$ac_ext
6959 done
6960else
6961 echo "$as_me: failed program was:" >&5
6962cat conftest.$ac_ext >&5
6963cat >conftest.$ac_ext <<_ACEOF
6964#line $LINENO "configure"
6965#include "confdefs.h"
6966$ac_includes_default
6967#ifdef F77_DUMMY_MAIN
6968# ifdef __cplusplus
6969 extern "C"
6970# endif
6971 int F77_DUMMY_MAIN() { return 1; }
6972#endif
6973int
6974main ()
6975{
6976static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6977test_array [0] = 0
6978
6979 ;
6980 return 0;
6981}
6982_ACEOF
6983rm -f conftest.$ac_objext
6984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6985 (eval $ac_compile) 2>&5
6986 ac_status=$?
6987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6988 (exit $ac_status); } &&
6989 { ac_try='test -s conftest.$ac_objext'
6990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6991 (eval $ac_try) 2>&5
6992 ac_status=$?
6993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6994 (exit $ac_status); }; }; then
6995 ac_hi=-1 ac_mid=-1
6996 while :; do
6997 cat >conftest.$ac_ext <<_ACEOF
6998#line $LINENO "configure"
6999#include "confdefs.h"
7000$ac_includes_default
7001#ifdef F77_DUMMY_MAIN
7002# ifdef __cplusplus
7003 extern "C"
7004# endif
7005 int F77_DUMMY_MAIN() { return 1; }
7006#endif
7007int
7008main ()
7009{
7010static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7011test_array [0] = 0
7012
7013 ;
7014 return 0;
7015}
7016_ACEOF
7017rm -f conftest.$ac_objext
7018if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7019 (eval $ac_compile) 2>&5
7020 ac_status=$?
7021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7022 (exit $ac_status); } &&
7023 { ac_try='test -s conftest.$ac_objext'
7024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7025 (eval $ac_try) 2>&5
7026 ac_status=$?
7027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7028 (exit $ac_status); }; }; then
7029 ac_lo=$ac_mid; break
7030else
7031 echo "$as_me: failed program was:" >&5
7032cat conftest.$ac_ext >&5
7033ac_hi=`expr '(' $ac_mid ')' - 1`
7034 if test $ac_mid -le $ac_hi; then
7035 ac_lo= ac_hi=
7036 break
7037 fi
7038 ac_mid=`expr 2 '*' $ac_mid`
7039fi
7040rm -f conftest.$ac_objext conftest.$ac_ext
7041 done
7042else
7043 echo "$as_me: failed program was:" >&5
7044cat conftest.$ac_ext >&5
7045ac_lo= ac_hi=
7046fi
7047rm -f conftest.$ac_objext conftest.$ac_ext
7048fi
7049rm -f conftest.$ac_objext conftest.$ac_ext
7050# Binary search between lo and hi bounds.
7051while test "x$ac_lo" != "x$ac_hi"; do
7052 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7053 cat >conftest.$ac_ext <<_ACEOF
7054#line $LINENO "configure"
7055#include "confdefs.h"
7056$ac_includes_default
7057#ifdef F77_DUMMY_MAIN
7058# ifdef __cplusplus
7059 extern "C"
7060# endif
7061 int F77_DUMMY_MAIN() { return 1; }
7062#endif
7063int
7064main ()
7065{
7066static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7067test_array [0] = 0
7068
7069 ;
7070 return 0;
7071}
7072_ACEOF
7073rm -f conftest.$ac_objext
7074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7075 (eval $ac_compile) 2>&5
7076 ac_status=$?
7077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7078 (exit $ac_status); } &&
7079 { ac_try='test -s conftest.$ac_objext'
7080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7081 (eval $ac_try) 2>&5
7082 ac_status=$?
7083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7084 (exit $ac_status); }; }; then
7085 ac_hi=$ac_mid
7086else
7087 echo "$as_me: failed program was:" >&5
7088cat conftest.$ac_ext >&5
7089ac_lo=`expr '(' $ac_mid ')' + 1`
7090fi
7091rm -f conftest.$ac_objext conftest.$ac_ext
7092done
7093case $ac_lo in
7094?*) ac_cv_sizeof_double=$ac_lo;;
7095'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7096echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7097 { (exit 1); exit 1; }; } ;;
7098esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007099else
7100 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007101 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7102echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7103 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007104else
Martin v. Löwis11437992002-04-12 09:54:03 +00007105 cat >conftest.$ac_ext <<_ACEOF
7106#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007107#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007108$ac_includes_default
7109long longval () { return (long) (sizeof (double)); }
7110unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007111#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007112#include <stdlib.h>
7113#ifdef F77_DUMMY_MAIN
7114# ifdef __cplusplus
7115 extern "C"
7116# endif
7117 int F77_DUMMY_MAIN() { return 1; }
7118#endif
7119int
7120main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007121{
Martin v. Löwis11437992002-04-12 09:54:03 +00007122
7123 FILE *f = fopen ("conftest.val", "w");
7124 if (! f)
7125 exit (1);
7126 if (((long) (sizeof (double))) < 0)
7127 {
7128 long i = longval ();
7129 if (i != ((long) (sizeof (double))))
7130 exit (1);
7131 fprintf (f, "%ld\n", i);
7132 }
7133 else
7134 {
7135 unsigned long i = ulongval ();
7136 if (i != ((long) (sizeof (double))))
7137 exit (1);
7138 fprintf (f, "%lu\n", i);
7139 }
7140 exit (ferror (f) || fclose (f) != 0);
7141
7142 ;
7143 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007144}
Martin v. Löwis11437992002-04-12 09:54:03 +00007145_ACEOF
7146rm -f conftest$ac_exeext
7147if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7148 (eval $ac_link) 2>&5
7149 ac_status=$?
7150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7151 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7153 (eval $ac_try) 2>&5
7154 ac_status=$?
7155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7156 (exit $ac_status); }; }; then
7157 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007158else
Martin v. Löwis11437992002-04-12 09:54:03 +00007159 echo "$as_me: program exited with status $ac_status" >&5
7160echo "$as_me: failed program was:" >&5
7161cat conftest.$ac_ext >&5
7162( exit $ac_status )
7163{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7164echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7165 { (exit 1); exit 1; }; }
7166fi
7167rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7168fi
7169fi
7170rm -f conftest.val
7171else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007172 ac_cv_sizeof_double=0
7173fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007175echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7176echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7177cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007178#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007179_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007180
7181
Martin v. Löwis11437992002-04-12 09:54:03 +00007182echo "$as_me:$LINENO: checking for fpos_t" >&5
7183echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7184if test "${ac_cv_type_fpos_t+set}" = set; then
7185 echo $ECHO_N "(cached) $ECHO_C" >&6
7186else
7187 cat >conftest.$ac_ext <<_ACEOF
7188#line $LINENO "configure"
7189#include "confdefs.h"
7190$ac_includes_default
7191#ifdef F77_DUMMY_MAIN
7192# ifdef __cplusplus
7193 extern "C"
7194# endif
7195 int F77_DUMMY_MAIN() { return 1; }
7196#endif
7197int
7198main ()
7199{
7200if ((fpos_t *) 0)
7201 return 0;
7202if (sizeof (fpos_t))
7203 return 0;
7204 ;
7205 return 0;
7206}
7207_ACEOF
7208rm -f conftest.$ac_objext
7209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7210 (eval $ac_compile) 2>&5
7211 ac_status=$?
7212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7213 (exit $ac_status); } &&
7214 { ac_try='test -s conftest.$ac_objext'
7215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7216 (eval $ac_try) 2>&5
7217 ac_status=$?
7218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7219 (exit $ac_status); }; }; then
7220 ac_cv_type_fpos_t=yes
7221else
7222 echo "$as_me: failed program was:" >&5
7223cat conftest.$ac_ext >&5
7224ac_cv_type_fpos_t=no
7225fi
7226rm -f conftest.$ac_objext conftest.$ac_ext
7227fi
7228echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7229echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7230
7231echo "$as_me:$LINENO: checking size of fpos_t" >&5
7232echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7233if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7234 echo $ECHO_N "(cached) $ECHO_C" >&6
7235else
7236 if test "$ac_cv_type_fpos_t" = yes; then
7237 # The cast to unsigned long works around a bug in the HP C Compiler
7238 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7239 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7240 # This bug is HP SR number 8606223364.
7241 if test "$cross_compiling" = yes; then
7242 # Depending upon the size, compute the lo and hi bounds.
7243cat >conftest.$ac_ext <<_ACEOF
7244#line $LINENO "configure"
7245#include "confdefs.h"
7246$ac_includes_default
7247#ifdef F77_DUMMY_MAIN
7248# ifdef __cplusplus
7249 extern "C"
7250# endif
7251 int F77_DUMMY_MAIN() { return 1; }
7252#endif
7253int
7254main ()
7255{
7256static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7257test_array [0] = 0
7258
7259 ;
7260 return 0;
7261}
7262_ACEOF
7263rm -f conftest.$ac_objext
7264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7265 (eval $ac_compile) 2>&5
7266 ac_status=$?
7267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7268 (exit $ac_status); } &&
7269 { ac_try='test -s conftest.$ac_objext'
7270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7271 (eval $ac_try) 2>&5
7272 ac_status=$?
7273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7274 (exit $ac_status); }; }; then
7275 ac_lo=0 ac_mid=0
7276 while :; do
7277 cat >conftest.$ac_ext <<_ACEOF
7278#line $LINENO "configure"
7279#include "confdefs.h"
7280$ac_includes_default
7281#ifdef F77_DUMMY_MAIN
7282# ifdef __cplusplus
7283 extern "C"
7284# endif
7285 int F77_DUMMY_MAIN() { return 1; }
7286#endif
7287int
7288main ()
7289{
7290static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7291test_array [0] = 0
7292
7293 ;
7294 return 0;
7295}
7296_ACEOF
7297rm -f conftest.$ac_objext
7298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7299 (eval $ac_compile) 2>&5
7300 ac_status=$?
7301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7302 (exit $ac_status); } &&
7303 { ac_try='test -s conftest.$ac_objext'
7304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7305 (eval $ac_try) 2>&5
7306 ac_status=$?
7307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7308 (exit $ac_status); }; }; then
7309 ac_hi=$ac_mid; break
7310else
7311 echo "$as_me: failed program was:" >&5
7312cat conftest.$ac_ext >&5
7313ac_lo=`expr $ac_mid + 1`
7314 if test $ac_lo -le $ac_mid; then
7315 ac_lo= ac_hi=
7316 break
7317 fi
7318 ac_mid=`expr 2 '*' $ac_mid + 1`
7319fi
7320rm -f conftest.$ac_objext conftest.$ac_ext
7321 done
7322else
7323 echo "$as_me: failed program was:" >&5
7324cat conftest.$ac_ext >&5
7325cat >conftest.$ac_ext <<_ACEOF
7326#line $LINENO "configure"
7327#include "confdefs.h"
7328$ac_includes_default
7329#ifdef F77_DUMMY_MAIN
7330# ifdef __cplusplus
7331 extern "C"
7332# endif
7333 int F77_DUMMY_MAIN() { return 1; }
7334#endif
7335int
7336main ()
7337{
7338static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7339test_array [0] = 0
7340
7341 ;
7342 return 0;
7343}
7344_ACEOF
7345rm -f conftest.$ac_objext
7346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7347 (eval $ac_compile) 2>&5
7348 ac_status=$?
7349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7350 (exit $ac_status); } &&
7351 { ac_try='test -s conftest.$ac_objext'
7352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7353 (eval $ac_try) 2>&5
7354 ac_status=$?
7355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7356 (exit $ac_status); }; }; then
7357 ac_hi=-1 ac_mid=-1
7358 while :; do
7359 cat >conftest.$ac_ext <<_ACEOF
7360#line $LINENO "configure"
7361#include "confdefs.h"
7362$ac_includes_default
7363#ifdef F77_DUMMY_MAIN
7364# ifdef __cplusplus
7365 extern "C"
7366# endif
7367 int F77_DUMMY_MAIN() { return 1; }
7368#endif
7369int
7370main ()
7371{
7372static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7373test_array [0] = 0
7374
7375 ;
7376 return 0;
7377}
7378_ACEOF
7379rm -f conftest.$ac_objext
7380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7381 (eval $ac_compile) 2>&5
7382 ac_status=$?
7383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7384 (exit $ac_status); } &&
7385 { ac_try='test -s conftest.$ac_objext'
7386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7387 (eval $ac_try) 2>&5
7388 ac_status=$?
7389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7390 (exit $ac_status); }; }; then
7391 ac_lo=$ac_mid; break
7392else
7393 echo "$as_me: failed program was:" >&5
7394cat conftest.$ac_ext >&5
7395ac_hi=`expr '(' $ac_mid ')' - 1`
7396 if test $ac_mid -le $ac_hi; then
7397 ac_lo= ac_hi=
7398 break
7399 fi
7400 ac_mid=`expr 2 '*' $ac_mid`
7401fi
7402rm -f conftest.$ac_objext conftest.$ac_ext
7403 done
7404else
7405 echo "$as_me: failed program was:" >&5
7406cat conftest.$ac_ext >&5
7407ac_lo= ac_hi=
7408fi
7409rm -f conftest.$ac_objext conftest.$ac_ext
7410fi
7411rm -f conftest.$ac_objext conftest.$ac_ext
7412# Binary search between lo and hi bounds.
7413while test "x$ac_lo" != "x$ac_hi"; do
7414 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7415 cat >conftest.$ac_ext <<_ACEOF
7416#line $LINENO "configure"
7417#include "confdefs.h"
7418$ac_includes_default
7419#ifdef F77_DUMMY_MAIN
7420# ifdef __cplusplus
7421 extern "C"
7422# endif
7423 int F77_DUMMY_MAIN() { return 1; }
7424#endif
7425int
7426main ()
7427{
7428static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7429test_array [0] = 0
7430
7431 ;
7432 return 0;
7433}
7434_ACEOF
7435rm -f conftest.$ac_objext
7436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7437 (eval $ac_compile) 2>&5
7438 ac_status=$?
7439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7440 (exit $ac_status); } &&
7441 { ac_try='test -s conftest.$ac_objext'
7442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7443 (eval $ac_try) 2>&5
7444 ac_status=$?
7445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7446 (exit $ac_status); }; }; then
7447 ac_hi=$ac_mid
7448else
7449 echo "$as_me: failed program was:" >&5
7450cat conftest.$ac_ext >&5
7451ac_lo=`expr '(' $ac_mid ')' + 1`
7452fi
7453rm -f conftest.$ac_objext conftest.$ac_ext
7454done
7455case $ac_lo in
7456?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7457'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7458echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7459 { (exit 1); exit 1; }; } ;;
7460esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007461else
7462 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007463 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7464echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7465 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007466else
Martin v. Löwis11437992002-04-12 09:54:03 +00007467 cat >conftest.$ac_ext <<_ACEOF
7468#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007469#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007470$ac_includes_default
7471long longval () { return (long) (sizeof (fpos_t)); }
7472unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007473#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007474#include <stdlib.h>
7475#ifdef F77_DUMMY_MAIN
7476# ifdef __cplusplus
7477 extern "C"
7478# endif
7479 int F77_DUMMY_MAIN() { return 1; }
7480#endif
7481int
7482main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007483{
Martin v. Löwis11437992002-04-12 09:54:03 +00007484
7485 FILE *f = fopen ("conftest.val", "w");
7486 if (! f)
7487 exit (1);
7488 if (((long) (sizeof (fpos_t))) < 0)
7489 {
7490 long i = longval ();
7491 if (i != ((long) (sizeof (fpos_t))))
7492 exit (1);
7493 fprintf (f, "%ld\n", i);
7494 }
7495 else
7496 {
7497 unsigned long i = ulongval ();
7498 if (i != ((long) (sizeof (fpos_t))))
7499 exit (1);
7500 fprintf (f, "%lu\n", i);
7501 }
7502 exit (ferror (f) || fclose (f) != 0);
7503
7504 ;
7505 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007506}
Martin v. Löwis11437992002-04-12 09:54:03 +00007507_ACEOF
7508rm -f conftest$ac_exeext
7509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7510 (eval $ac_link) 2>&5
7511 ac_status=$?
7512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7513 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7515 (eval $ac_try) 2>&5
7516 ac_status=$?
7517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7518 (exit $ac_status); }; }; then
7519 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007520else
Martin v. Löwis11437992002-04-12 09:54:03 +00007521 echo "$as_me: program exited with status $ac_status" >&5
7522echo "$as_me: failed program was:" >&5
7523cat conftest.$ac_ext >&5
7524( exit $ac_status )
7525{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7526echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7527 { (exit 1); exit 1; }; }
7528fi
7529rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7530fi
7531fi
7532rm -f conftest.val
7533else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007534 ac_cv_sizeof_fpos_t=0
7535fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007536fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007537echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7538echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7539cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007540#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007541_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007542
Michael W. Hudson54241132001-12-07 15:38:26 +00007543
7544
Martin v. Löwis11437992002-04-12 09:54:03 +00007545echo "$as_me:$LINENO: checking for long long support" >&5
7546echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007547have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007548cat >conftest.$ac_ext <<_ACEOF
7549#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007550#include "confdefs.h"
7551
Martin v. Löwis11437992002-04-12 09:54:03 +00007552#ifdef F77_DUMMY_MAIN
7553# ifdef __cplusplus
7554 extern "C"
7555# endif
7556 int F77_DUMMY_MAIN() { return 1; }
7557#endif
7558int
7559main ()
7560{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007561long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007562 ;
7563 return 0;
7564}
7565_ACEOF
7566rm -f conftest.$ac_objext
7567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7568 (eval $ac_compile) 2>&5
7569 ac_status=$?
7570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7571 (exit $ac_status); } &&
7572 { ac_try='test -s conftest.$ac_objext'
7573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7574 (eval $ac_try) 2>&5
7575 ac_status=$?
7576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7577 (exit $ac_status); }; }; then
7578
7579
7580cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007581#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007582_ACEOF
7583
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007584 have_long_long=yes
7585
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007586else
Martin v. Löwis11437992002-04-12 09:54:03 +00007587 echo "$as_me: failed program was:" >&5
7588cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007590rm -f conftest.$ac_objext conftest.$ac_ext
7591echo "$as_me:$LINENO: result: $have_long_long" >&5
7592echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007593if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007594echo "$as_me:$LINENO: checking for long long" >&5
7595echo $ECHO_N "checking for long long... $ECHO_C" >&6
7596if test "${ac_cv_type_long_long+set}" = set; then
7597 echo $ECHO_N "(cached) $ECHO_C" >&6
7598else
7599 cat >conftest.$ac_ext <<_ACEOF
7600#line $LINENO "configure"
7601#include "confdefs.h"
7602$ac_includes_default
7603#ifdef F77_DUMMY_MAIN
7604# ifdef __cplusplus
7605 extern "C"
7606# endif
7607 int F77_DUMMY_MAIN() { return 1; }
7608#endif
7609int
7610main ()
7611{
7612if ((long long *) 0)
7613 return 0;
7614if (sizeof (long long))
7615 return 0;
7616 ;
7617 return 0;
7618}
7619_ACEOF
7620rm -f conftest.$ac_objext
7621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7622 (eval $ac_compile) 2>&5
7623 ac_status=$?
7624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7625 (exit $ac_status); } &&
7626 { ac_try='test -s conftest.$ac_objext'
7627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7628 (eval $ac_try) 2>&5
7629 ac_status=$?
7630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7631 (exit $ac_status); }; }; then
7632 ac_cv_type_long_long=yes
7633else
7634 echo "$as_me: failed program was:" >&5
7635cat conftest.$ac_ext >&5
7636ac_cv_type_long_long=no
7637fi
7638rm -f conftest.$ac_objext conftest.$ac_ext
7639fi
7640echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7641echo "${ECHO_T}$ac_cv_type_long_long" >&6
7642
7643echo "$as_me:$LINENO: checking size of long long" >&5
7644echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7645if test "${ac_cv_sizeof_long_long+set}" = set; then
7646 echo $ECHO_N "(cached) $ECHO_C" >&6
7647else
7648 if test "$ac_cv_type_long_long" = yes; then
7649 # The cast to unsigned long works around a bug in the HP C Compiler
7650 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7651 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7652 # This bug is HP SR number 8606223364.
7653 if test "$cross_compiling" = yes; then
7654 # Depending upon the size, compute the lo and hi bounds.
7655cat >conftest.$ac_ext <<_ACEOF
7656#line $LINENO "configure"
7657#include "confdefs.h"
7658$ac_includes_default
7659#ifdef F77_DUMMY_MAIN
7660# ifdef __cplusplus
7661 extern "C"
7662# endif
7663 int F77_DUMMY_MAIN() { return 1; }
7664#endif
7665int
7666main ()
7667{
7668static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7669test_array [0] = 0
7670
7671 ;
7672 return 0;
7673}
7674_ACEOF
7675rm -f conftest.$ac_objext
7676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7677 (eval $ac_compile) 2>&5
7678 ac_status=$?
7679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7680 (exit $ac_status); } &&
7681 { ac_try='test -s conftest.$ac_objext'
7682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7683 (eval $ac_try) 2>&5
7684 ac_status=$?
7685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7686 (exit $ac_status); }; }; then
7687 ac_lo=0 ac_mid=0
7688 while :; do
7689 cat >conftest.$ac_ext <<_ACEOF
7690#line $LINENO "configure"
7691#include "confdefs.h"
7692$ac_includes_default
7693#ifdef F77_DUMMY_MAIN
7694# ifdef __cplusplus
7695 extern "C"
7696# endif
7697 int F77_DUMMY_MAIN() { return 1; }
7698#endif
7699int
7700main ()
7701{
7702static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7703test_array [0] = 0
7704
7705 ;
7706 return 0;
7707}
7708_ACEOF
7709rm -f conftest.$ac_objext
7710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7711 (eval $ac_compile) 2>&5
7712 ac_status=$?
7713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7714 (exit $ac_status); } &&
7715 { ac_try='test -s conftest.$ac_objext'
7716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7717 (eval $ac_try) 2>&5
7718 ac_status=$?
7719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7720 (exit $ac_status); }; }; then
7721 ac_hi=$ac_mid; break
7722else
7723 echo "$as_me: failed program was:" >&5
7724cat conftest.$ac_ext >&5
7725ac_lo=`expr $ac_mid + 1`
7726 if test $ac_lo -le $ac_mid; then
7727 ac_lo= ac_hi=
7728 break
7729 fi
7730 ac_mid=`expr 2 '*' $ac_mid + 1`
7731fi
7732rm -f conftest.$ac_objext conftest.$ac_ext
7733 done
7734else
7735 echo "$as_me: failed program was:" >&5
7736cat conftest.$ac_ext >&5
7737cat >conftest.$ac_ext <<_ACEOF
7738#line $LINENO "configure"
7739#include "confdefs.h"
7740$ac_includes_default
7741#ifdef F77_DUMMY_MAIN
7742# ifdef __cplusplus
7743 extern "C"
7744# endif
7745 int F77_DUMMY_MAIN() { return 1; }
7746#endif
7747int
7748main ()
7749{
7750static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7751test_array [0] = 0
7752
7753 ;
7754 return 0;
7755}
7756_ACEOF
7757rm -f conftest.$ac_objext
7758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7759 (eval $ac_compile) 2>&5
7760 ac_status=$?
7761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7762 (exit $ac_status); } &&
7763 { ac_try='test -s conftest.$ac_objext'
7764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7765 (eval $ac_try) 2>&5
7766 ac_status=$?
7767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7768 (exit $ac_status); }; }; then
7769 ac_hi=-1 ac_mid=-1
7770 while :; do
7771 cat >conftest.$ac_ext <<_ACEOF
7772#line $LINENO "configure"
7773#include "confdefs.h"
7774$ac_includes_default
7775#ifdef F77_DUMMY_MAIN
7776# ifdef __cplusplus
7777 extern "C"
7778# endif
7779 int F77_DUMMY_MAIN() { return 1; }
7780#endif
7781int
7782main ()
7783{
7784static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7785test_array [0] = 0
7786
7787 ;
7788 return 0;
7789}
7790_ACEOF
7791rm -f conftest.$ac_objext
7792if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7793 (eval $ac_compile) 2>&5
7794 ac_status=$?
7795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7796 (exit $ac_status); } &&
7797 { ac_try='test -s conftest.$ac_objext'
7798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7799 (eval $ac_try) 2>&5
7800 ac_status=$?
7801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7802 (exit $ac_status); }; }; then
7803 ac_lo=$ac_mid; break
7804else
7805 echo "$as_me: failed program was:" >&5
7806cat conftest.$ac_ext >&5
7807ac_hi=`expr '(' $ac_mid ')' - 1`
7808 if test $ac_mid -le $ac_hi; then
7809 ac_lo= ac_hi=
7810 break
7811 fi
7812 ac_mid=`expr 2 '*' $ac_mid`
7813fi
7814rm -f conftest.$ac_objext conftest.$ac_ext
7815 done
7816else
7817 echo "$as_me: failed program was:" >&5
7818cat conftest.$ac_ext >&5
7819ac_lo= ac_hi=
7820fi
7821rm -f conftest.$ac_objext conftest.$ac_ext
7822fi
7823rm -f conftest.$ac_objext conftest.$ac_ext
7824# Binary search between lo and hi bounds.
7825while test "x$ac_lo" != "x$ac_hi"; do
7826 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7827 cat >conftest.$ac_ext <<_ACEOF
7828#line $LINENO "configure"
7829#include "confdefs.h"
7830$ac_includes_default
7831#ifdef F77_DUMMY_MAIN
7832# ifdef __cplusplus
7833 extern "C"
7834# endif
7835 int F77_DUMMY_MAIN() { return 1; }
7836#endif
7837int
7838main ()
7839{
7840static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7841test_array [0] = 0
7842
7843 ;
7844 return 0;
7845}
7846_ACEOF
7847rm -f conftest.$ac_objext
7848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7849 (eval $ac_compile) 2>&5
7850 ac_status=$?
7851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7852 (exit $ac_status); } &&
7853 { ac_try='test -s conftest.$ac_objext'
7854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7855 (eval $ac_try) 2>&5
7856 ac_status=$?
7857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7858 (exit $ac_status); }; }; then
7859 ac_hi=$ac_mid
7860else
7861 echo "$as_me: failed program was:" >&5
7862cat conftest.$ac_ext >&5
7863ac_lo=`expr '(' $ac_mid ')' + 1`
7864fi
7865rm -f conftest.$ac_objext conftest.$ac_ext
7866done
7867case $ac_lo in
7868?*) ac_cv_sizeof_long_long=$ac_lo;;
7869'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7870echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7871 { (exit 1); exit 1; }; } ;;
7872esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007873else
7874 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7876echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7877 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007878else
Martin v. Löwis11437992002-04-12 09:54:03 +00007879 cat >conftest.$ac_ext <<_ACEOF
7880#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007881#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007882$ac_includes_default
7883long longval () { return (long) (sizeof (long long)); }
7884unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007885#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007886#include <stdlib.h>
7887#ifdef F77_DUMMY_MAIN
7888# ifdef __cplusplus
7889 extern "C"
7890# endif
7891 int F77_DUMMY_MAIN() { return 1; }
7892#endif
7893int
7894main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007895{
Martin v. Löwis11437992002-04-12 09:54:03 +00007896
7897 FILE *f = fopen ("conftest.val", "w");
7898 if (! f)
7899 exit (1);
7900 if (((long) (sizeof (long long))) < 0)
7901 {
7902 long i = longval ();
7903 if (i != ((long) (sizeof (long long))))
7904 exit (1);
7905 fprintf (f, "%ld\n", i);
7906 }
7907 else
7908 {
7909 unsigned long i = ulongval ();
7910 if (i != ((long) (sizeof (long long))))
7911 exit (1);
7912 fprintf (f, "%lu\n", i);
7913 }
7914 exit (ferror (f) || fclose (f) != 0);
7915
7916 ;
7917 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007918}
Martin v. Löwis11437992002-04-12 09:54:03 +00007919_ACEOF
7920rm -f conftest$ac_exeext
7921if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7922 (eval $ac_link) 2>&5
7923 ac_status=$?
7924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7925 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7927 (eval $ac_try) 2>&5
7928 ac_status=$?
7929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7930 (exit $ac_status); }; }; then
7931 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007932else
Martin v. Löwis11437992002-04-12 09:54:03 +00007933 echo "$as_me: program exited with status $ac_status" >&5
7934echo "$as_me: failed program was:" >&5
7935cat conftest.$ac_ext >&5
7936( exit $ac_status )
7937{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7938echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7939 { (exit 1); exit 1; }; }
7940fi
7941rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7942fi
7943fi
7944rm -f conftest.val
7945else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007946 ac_cv_sizeof_long_long=0
7947fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007948fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007949echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7950echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7951cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007952#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007953_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007954
Michael W. Hudson54241132001-12-07 15:38:26 +00007955
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007956fi
7957
Martin v. Löwis11437992002-04-12 09:54:03 +00007958echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7959echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007960have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007961cat >conftest.$ac_ext <<_ACEOF
7962#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007963#include "confdefs.h"
7964
Martin v. Löwis11437992002-04-12 09:54:03 +00007965#ifdef F77_DUMMY_MAIN
7966# ifdef __cplusplus
7967 extern "C"
7968# endif
7969 int F77_DUMMY_MAIN() { return 1; }
7970#endif
7971int
7972main ()
7973{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007974uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 ;
7976 return 0;
7977}
7978_ACEOF
7979rm -f conftest.$ac_objext
7980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7981 (eval $ac_compile) 2>&5
7982 ac_status=$?
7983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7984 (exit $ac_status); } &&
7985 { ac_try='test -s conftest.$ac_objext'
7986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7987 (eval $ac_try) 2>&5
7988 ac_status=$?
7989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7990 (exit $ac_status); }; }; then
7991
7992
7993cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007994#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007995_ACEOF
7996
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007997 have_uintptr_t=yes
7998
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007999else
Martin v. Löwis11437992002-04-12 09:54:03 +00008000 echo "$as_me: failed program was:" >&5
8001cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008003rm -f conftest.$ac_objext conftest.$ac_ext
8004echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8005echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008006if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008007echo "$as_me:$LINENO: checking for uintptr_t" >&5
8008echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8009if test "${ac_cv_type_uintptr_t+set}" = set; then
8010 echo $ECHO_N "(cached) $ECHO_C" >&6
8011else
8012 cat >conftest.$ac_ext <<_ACEOF
8013#line $LINENO "configure"
8014#include "confdefs.h"
8015$ac_includes_default
8016#ifdef F77_DUMMY_MAIN
8017# ifdef __cplusplus
8018 extern "C"
8019# endif
8020 int F77_DUMMY_MAIN() { return 1; }
8021#endif
8022int
8023main ()
8024{
8025if ((uintptr_t *) 0)
8026 return 0;
8027if (sizeof (uintptr_t))
8028 return 0;
8029 ;
8030 return 0;
8031}
8032_ACEOF
8033rm -f conftest.$ac_objext
8034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8035 (eval $ac_compile) 2>&5
8036 ac_status=$?
8037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8038 (exit $ac_status); } &&
8039 { ac_try='test -s conftest.$ac_objext'
8040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8041 (eval $ac_try) 2>&5
8042 ac_status=$?
8043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8044 (exit $ac_status); }; }; then
8045 ac_cv_type_uintptr_t=yes
8046else
8047 echo "$as_me: failed program was:" >&5
8048cat conftest.$ac_ext >&5
8049ac_cv_type_uintptr_t=no
8050fi
8051rm -f conftest.$ac_objext conftest.$ac_ext
8052fi
8053echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8054echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8055
8056echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8057echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8058if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8059 echo $ECHO_N "(cached) $ECHO_C" >&6
8060else
8061 if test "$ac_cv_type_uintptr_t" = yes; then
8062 # The cast to unsigned long works around a bug in the HP C Compiler
8063 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8064 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8065 # This bug is HP SR number 8606223364.
8066 if test "$cross_compiling" = yes; then
8067 # Depending upon the size, compute the lo and hi bounds.
8068cat >conftest.$ac_ext <<_ACEOF
8069#line $LINENO "configure"
8070#include "confdefs.h"
8071$ac_includes_default
8072#ifdef F77_DUMMY_MAIN
8073# ifdef __cplusplus
8074 extern "C"
8075# endif
8076 int F77_DUMMY_MAIN() { return 1; }
8077#endif
8078int
8079main ()
8080{
8081static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8082test_array [0] = 0
8083
8084 ;
8085 return 0;
8086}
8087_ACEOF
8088rm -f conftest.$ac_objext
8089if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8090 (eval $ac_compile) 2>&5
8091 ac_status=$?
8092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8093 (exit $ac_status); } &&
8094 { ac_try='test -s conftest.$ac_objext'
8095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8096 (eval $ac_try) 2>&5
8097 ac_status=$?
8098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8099 (exit $ac_status); }; }; then
8100 ac_lo=0 ac_mid=0
8101 while :; do
8102 cat >conftest.$ac_ext <<_ACEOF
8103#line $LINENO "configure"
8104#include "confdefs.h"
8105$ac_includes_default
8106#ifdef F77_DUMMY_MAIN
8107# ifdef __cplusplus
8108 extern "C"
8109# endif
8110 int F77_DUMMY_MAIN() { return 1; }
8111#endif
8112int
8113main ()
8114{
8115static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8116test_array [0] = 0
8117
8118 ;
8119 return 0;
8120}
8121_ACEOF
8122rm -f conftest.$ac_objext
8123if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8124 (eval $ac_compile) 2>&5
8125 ac_status=$?
8126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8127 (exit $ac_status); } &&
8128 { ac_try='test -s conftest.$ac_objext'
8129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8130 (eval $ac_try) 2>&5
8131 ac_status=$?
8132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8133 (exit $ac_status); }; }; then
8134 ac_hi=$ac_mid; break
8135else
8136 echo "$as_me: failed program was:" >&5
8137cat conftest.$ac_ext >&5
8138ac_lo=`expr $ac_mid + 1`
8139 if test $ac_lo -le $ac_mid; then
8140 ac_lo= ac_hi=
8141 break
8142 fi
8143 ac_mid=`expr 2 '*' $ac_mid + 1`
8144fi
8145rm -f conftest.$ac_objext conftest.$ac_ext
8146 done
8147else
8148 echo "$as_me: failed program was:" >&5
8149cat conftest.$ac_ext >&5
8150cat >conftest.$ac_ext <<_ACEOF
8151#line $LINENO "configure"
8152#include "confdefs.h"
8153$ac_includes_default
8154#ifdef F77_DUMMY_MAIN
8155# ifdef __cplusplus
8156 extern "C"
8157# endif
8158 int F77_DUMMY_MAIN() { return 1; }
8159#endif
8160int
8161main ()
8162{
8163static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8164test_array [0] = 0
8165
8166 ;
8167 return 0;
8168}
8169_ACEOF
8170rm -f conftest.$ac_objext
8171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8172 (eval $ac_compile) 2>&5
8173 ac_status=$?
8174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8175 (exit $ac_status); } &&
8176 { ac_try='test -s conftest.$ac_objext'
8177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8178 (eval $ac_try) 2>&5
8179 ac_status=$?
8180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8181 (exit $ac_status); }; }; then
8182 ac_hi=-1 ac_mid=-1
8183 while :; do
8184 cat >conftest.$ac_ext <<_ACEOF
8185#line $LINENO "configure"
8186#include "confdefs.h"
8187$ac_includes_default
8188#ifdef F77_DUMMY_MAIN
8189# ifdef __cplusplus
8190 extern "C"
8191# endif
8192 int F77_DUMMY_MAIN() { return 1; }
8193#endif
8194int
8195main ()
8196{
8197static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8198test_array [0] = 0
8199
8200 ;
8201 return 0;
8202}
8203_ACEOF
8204rm -f conftest.$ac_objext
8205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8206 (eval $ac_compile) 2>&5
8207 ac_status=$?
8208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8209 (exit $ac_status); } &&
8210 { ac_try='test -s conftest.$ac_objext'
8211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8212 (eval $ac_try) 2>&5
8213 ac_status=$?
8214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8215 (exit $ac_status); }; }; then
8216 ac_lo=$ac_mid; break
8217else
8218 echo "$as_me: failed program was:" >&5
8219cat conftest.$ac_ext >&5
8220ac_hi=`expr '(' $ac_mid ')' - 1`
8221 if test $ac_mid -le $ac_hi; then
8222 ac_lo= ac_hi=
8223 break
8224 fi
8225 ac_mid=`expr 2 '*' $ac_mid`
8226fi
8227rm -f conftest.$ac_objext conftest.$ac_ext
8228 done
8229else
8230 echo "$as_me: failed program was:" >&5
8231cat conftest.$ac_ext >&5
8232ac_lo= ac_hi=
8233fi
8234rm -f conftest.$ac_objext conftest.$ac_ext
8235fi
8236rm -f conftest.$ac_objext conftest.$ac_ext
8237# Binary search between lo and hi bounds.
8238while test "x$ac_lo" != "x$ac_hi"; do
8239 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8240 cat >conftest.$ac_ext <<_ACEOF
8241#line $LINENO "configure"
8242#include "confdefs.h"
8243$ac_includes_default
8244#ifdef F77_DUMMY_MAIN
8245# ifdef __cplusplus
8246 extern "C"
8247# endif
8248 int F77_DUMMY_MAIN() { return 1; }
8249#endif
8250int
8251main ()
8252{
8253static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8254test_array [0] = 0
8255
8256 ;
8257 return 0;
8258}
8259_ACEOF
8260rm -f conftest.$ac_objext
8261if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8262 (eval $ac_compile) 2>&5
8263 ac_status=$?
8264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8265 (exit $ac_status); } &&
8266 { ac_try='test -s conftest.$ac_objext'
8267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8268 (eval $ac_try) 2>&5
8269 ac_status=$?
8270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8271 (exit $ac_status); }; }; then
8272 ac_hi=$ac_mid
8273else
8274 echo "$as_me: failed program was:" >&5
8275cat conftest.$ac_ext >&5
8276ac_lo=`expr '(' $ac_mid ')' + 1`
8277fi
8278rm -f conftest.$ac_objext conftest.$ac_ext
8279done
8280case $ac_lo in
8281?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8282'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8283echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8284 { (exit 1); exit 1; }; } ;;
8285esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008286else
8287 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008288 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8289echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8290 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008291else
Martin v. Löwis11437992002-04-12 09:54:03 +00008292 cat >conftest.$ac_ext <<_ACEOF
8293#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008294#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008295$ac_includes_default
8296long longval () { return (long) (sizeof (uintptr_t)); }
8297unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008298#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008299#include <stdlib.h>
8300#ifdef F77_DUMMY_MAIN
8301# ifdef __cplusplus
8302 extern "C"
8303# endif
8304 int F77_DUMMY_MAIN() { return 1; }
8305#endif
8306int
8307main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008308{
Martin v. Löwis11437992002-04-12 09:54:03 +00008309
8310 FILE *f = fopen ("conftest.val", "w");
8311 if (! f)
8312 exit (1);
8313 if (((long) (sizeof (uintptr_t))) < 0)
8314 {
8315 long i = longval ();
8316 if (i != ((long) (sizeof (uintptr_t))))
8317 exit (1);
8318 fprintf (f, "%ld\n", i);
8319 }
8320 else
8321 {
8322 unsigned long i = ulongval ();
8323 if (i != ((long) (sizeof (uintptr_t))))
8324 exit (1);
8325 fprintf (f, "%lu\n", i);
8326 }
8327 exit (ferror (f) || fclose (f) != 0);
8328
8329 ;
8330 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008331}
Martin v. Löwis11437992002-04-12 09:54:03 +00008332_ACEOF
8333rm -f conftest$ac_exeext
8334if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8335 (eval $ac_link) 2>&5
8336 ac_status=$?
8337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8338 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8340 (eval $ac_try) 2>&5
8341 ac_status=$?
8342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8343 (exit $ac_status); }; }; then
8344 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008345else
Martin v. Löwis11437992002-04-12 09:54:03 +00008346 echo "$as_me: program exited with status $ac_status" >&5
8347echo "$as_me: failed program was:" >&5
8348cat conftest.$ac_ext >&5
8349( exit $ac_status )
8350{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8351echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8352 { (exit 1); exit 1; }; }
8353fi
8354rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8355fi
8356fi
8357rm -f conftest.val
8358else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008359 ac_cv_sizeof_uintptr_t=0
8360fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008361fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008362echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8363echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8364cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008365#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008366_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008367
Michael W. Hudson54241132001-12-07 15:38:26 +00008368
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008369fi
8370
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008371# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008372echo "$as_me:$LINENO: checking size of off_t" >&5
8373echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8374if test "${ac_cv_sizeof_off_t+set}" = set; then
8375 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008376else
8377 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008378 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008379else
Martin v. Löwis11437992002-04-12 09:54:03 +00008380 cat >conftest.$ac_ext <<_ACEOF
8381#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008382#include "confdefs.h"
8383#include <stdio.h>
8384#include <sys/types.h>
8385main()
8386{
8387 FILE *f=fopen("conftestval", "w");
8388 if (!f) exit(1);
8389 fprintf(f, "%d\n", sizeof(off_t));
8390 exit(0);
8391}
Martin v. Löwis11437992002-04-12 09:54:03 +00008392_ACEOF
8393rm -f conftest$ac_exeext
8394if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8395 (eval $ac_link) 2>&5
8396 ac_status=$?
8397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8398 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8400 (eval $ac_try) 2>&5
8401 ac_status=$?
8402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8403 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008404 ac_cv_sizeof_off_t=`cat conftestval`
8405else
Martin v. Löwis11437992002-04-12 09:54:03 +00008406 echo "$as_me: program exited with status $ac_status" >&5
8407echo "$as_me: failed program was:" >&5
8408cat conftest.$ac_ext >&5
8409( exit $ac_status )
8410ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008411fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008412rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008413fi
8414
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008415fi
8416
Martin v. Löwis11437992002-04-12 09:54:03 +00008417echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8418echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8419
8420cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008421#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008422_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008423
Michael W. Hudson54241132001-12-07 15:38:26 +00008424
Martin v. Löwis11437992002-04-12 09:54:03 +00008425echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8426echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008427if test "$have_long_long" = yes -a \
8428 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8429 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008430
Martin v. Löwis11437992002-04-12 09:54:03 +00008431cat >>confdefs.h <<\_ACEOF
8432#define HAVE_LARGEFILE_SUPPORT 1
8433_ACEOF
8434
8435 echo "$as_me:$LINENO: result: yes" >&5
8436echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008437else
Martin v. Löwis11437992002-04-12 09:54:03 +00008438 echo "$as_me:$LINENO: result: no" >&5
8439echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008440fi
8441
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008442# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008443echo "$as_me:$LINENO: checking size of time_t" >&5
8444echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8445if test "${ac_cv_sizeof_time_t+set}" = set; then
8446 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008447else
8448 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008449 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008450else
Martin v. Löwis11437992002-04-12 09:54:03 +00008451 cat >conftest.$ac_ext <<_ACEOF
8452#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008453#include "confdefs.h"
8454#include <stdio.h>
8455#include <time.h>
8456main()
8457{
8458 FILE *f=fopen("conftestval", "w");
8459 if (!f) exit(1);
8460 fprintf(f, "%d\n", sizeof(time_t));
8461 exit(0);
8462}
Martin v. Löwis11437992002-04-12 09:54:03 +00008463_ACEOF
8464rm -f conftest$ac_exeext
8465if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8466 (eval $ac_link) 2>&5
8467 ac_status=$?
8468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8469 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8471 (eval $ac_try) 2>&5
8472 ac_status=$?
8473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8474 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008475 ac_cv_sizeof_time_t=`cat conftestval`
8476else
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 echo "$as_me: program exited with status $ac_status" >&5
8478echo "$as_me: failed program was:" >&5
8479cat conftest.$ac_ext >&5
8480( exit $ac_status )
8481ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008482fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008483rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008484fi
8485
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008486fi
8487
Martin v. Löwis11437992002-04-12 09:54:03 +00008488echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8489echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8490
8491cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008492#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008493_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008494
Michael W. Hudson54241132001-12-07 15:38:26 +00008495
8496
Trent Mick635f6fb2000-08-23 21:33:05 +00008497# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008498ac_save_cc="$CC"
8499if test "$ac_cv_kpthread" = "yes"
8500then CC="$CC -Kpthread"
8501fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008502echo "$as_me:$LINENO: checking for pthread_t" >&5
8503echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008504have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008505cat >conftest.$ac_ext <<_ACEOF
8506#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008507#include "confdefs.h"
8508#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008509#ifdef F77_DUMMY_MAIN
8510# ifdef __cplusplus
8511 extern "C"
8512# endif
8513 int F77_DUMMY_MAIN() { return 1; }
8514#endif
8515int
8516main ()
8517{
Guido van Rossum12580492000-09-24 16:47:19 +00008518pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ;
8520 return 0;
8521}
8522_ACEOF
8523rm -f conftest.$ac_objext
8524if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8525 (eval $ac_compile) 2>&5
8526 ac_status=$?
8527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8528 (exit $ac_status); } &&
8529 { ac_try='test -s conftest.$ac_objext'
8530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8531 (eval $ac_try) 2>&5
8532 ac_status=$?
8533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008535 have_pthread_t=yes
8536else
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 echo "$as_me: failed program was:" >&5
8538cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008539fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008540rm -f conftest.$ac_objext conftest.$ac_ext
8541echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8542echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008543if test "$have_pthread_t" = yes ; then
8544 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008545 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8546echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8547 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8548 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008549else
8550 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008551 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008552else
Martin v. Löwis11437992002-04-12 09:54:03 +00008553 cat >conftest.$ac_ext <<_ACEOF
8554#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008555#include "confdefs.h"
8556#include <stdio.h>
8557 #include <pthread.h>
8558 main()
8559 {
8560 FILE *f=fopen("conftestval", "w");
8561 if (!f) exit(1);
8562 fprintf(f, "%d\n", sizeof(pthread_t));
8563 exit(0);
8564 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008565_ACEOF
8566rm -f conftest$ac_exeext
8567if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8568 (eval $ac_link) 2>&5
8569 ac_status=$?
8570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8571 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8573 (eval $ac_try) 2>&5
8574 ac_status=$?
8575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8576 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008577 ac_cv_sizeof_pthread_t=`cat conftestval`
8578else
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 echo "$as_me: program exited with status $ac_status" >&5
8580echo "$as_me: failed program was:" >&5
8581cat conftest.$ac_ext >&5
8582( exit $ac_status )
8583ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008584fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008585rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008586fi
8587
Trent Mick635f6fb2000-08-23 21:33:05 +00008588fi
8589
Martin v. Löwis11437992002-04-12 09:54:03 +00008590 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8591echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8592
8593cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008594#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008595_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008596
8597fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008598CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008599
Martin v. Löwis11437992002-04-12 09:54:03 +00008600echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8601echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008602# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8603if test "${enable_toolbox_glue+set}" = set; then
8604 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008605
Martin v. Löwis11437992002-04-12 09:54:03 +00008606fi;
Jack Jansene578a632001-08-15 01:27:14 +00008607
8608if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008609then
Jack Jansene578a632001-08-15 01:27:14 +00008610 case $ac_sys_system/$ac_sys_release in
8611 Darwin/*)
8612 enable_toolbox_glue="yes";;
8613 *)
8614 enable_toolbox_glue="no";;
8615 esac
8616fi
8617case "$enable_toolbox_glue" in
8618yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008619 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008620 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008621 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008622
8623cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008624#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008625_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008626
8627 ;;
8628*)
8629 extra_frameworks=""
8630 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008631 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008632 ;;
8633esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008634echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8635echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008636
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008637
8638case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008639 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008640 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008641 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8642 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008643 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8644 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008645 Darwin/*)
8646 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008647 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8648 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008649 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8650 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008651esac
8652
Martin v. Löwis11437992002-04-12 09:54:03 +00008653echo "$as_me:$LINENO: checking for --enable-framework" >&5
8654echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008655if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008656then
Jack Jansenca06bc62001-08-03 15:32:23 +00008657 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008658 # -U __environ is needed since bundles don't have access
8659 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008660 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008661 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008662
Jack Jansena3891ea2001-09-07 14:25:12 +00008663 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008664 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8665 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008666 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008667
Martin v. Löwis11437992002-04-12 09:54:03 +00008668cat >>confdefs.h <<\_ACEOF
8669#define WITH_NEXT_FRAMEWORK 1
8670_ACEOF
8671
8672 echo "$as_me:$LINENO: result: yes" >&5
8673echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008674else
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 echo "$as_me:$LINENO: result: no" >&5
8676echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008677fi
8678
Martin v. Löwis11437992002-04-12 09:54:03 +00008679echo "$as_me:$LINENO: checking for dyld" >&5
8680echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008681case $ac_sys_system/$ac_sys_release in
8682 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684cat >>confdefs.h <<\_ACEOF
8685#define WITH_DYLD 1
8686_ACEOF
8687
8688 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8689echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008690 ;;
8691 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 echo "$as_me:$LINENO: result: no" >&5
8693echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008694 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008695esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008696
Guido van Rossum0a516c91994-09-12 10:58:40 +00008697# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008698
Michael W. Hudson54241132001-12-07 15:38:26 +00008699
8700
8701
8702
Guido van Rossum0a516c91994-09-12 10:58:40 +00008703# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008704# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008705echo "$as_me:$LINENO: checking SO" >&5
8706echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008707if test -z "$SO"
8708then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008709 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008710 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008711 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008712 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008713 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008714fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008715echo "$as_me:$LINENO: result: $SO" >&5
8716echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008717# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008718# -- "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 +00008719# (Shared libraries in this instance are shared modules to be loaded into
8720# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008721echo "$as_me:$LINENO: checking LDSHARED" >&5
8722echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008723if test -z "$LDSHARED"
8724then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008725 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008726 AIX*)
8727 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008728 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008729 ;;
8730 BeOS*)
8731 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008732 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008733 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008734 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008735 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008736 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00008738 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008739 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008740 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00008741 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008742 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008743 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8744 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008745 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008746 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8747 if test "$enable_framework" ; then
8748 # Link against the framework. All externals should be defined.
8749 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8750 else
8751 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008752 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008753 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008754 Darwin/*)
8755 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8756 if test "$enable_framework" ; then
8757 # Link against the framework. All externals should be defined.
8758 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8759 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008760 # No framework, use the Python app as bundle-loader
8761 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8762 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008763 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008764 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008765 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008766 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008767 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008768 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008769 then
8770 LDSHARED="cc -shared ${LDFLAGS}"
8771 else
8772 LDSHARED="ld -Bshareable ${LDFLAGS}"
8773 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008774 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008775 if test "$GCC" = "yes"
8776 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008777 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008778 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008779 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008780 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008781 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008782 *) LDSHARED="ld";;
8783 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008784fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008785echo "$as_me:$LINENO: result: $LDSHARED" >&5
8786echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008787BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008788# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008789# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008790echo "$as_me:$LINENO: checking CCSHARED" >&5
8791echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008792if test -z "$CCSHARED"
8793then
Guido van Rossum07397971997-04-29 21:49:50 +00008794 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008795 SunOS*) if test "$GCC" = yes;
8796 then CCSHARED="-fPIC";
8797 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008798 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008799 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008800 else CCSHARED="+z";
8801 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008802 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008803 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008804 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008805 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008806 if test "$GCC" = "yes"
8807 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008808 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008809 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008810 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008811 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008812 IRIX*/6*) case $CC in
8813 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008814 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008815 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008816 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008817 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008818fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008819echo "$as_me:$LINENO: result: $CCSHARED" >&5
8820echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008821# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008822# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008823echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8824echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008825if test -z "$LINKFORSHARED"
8826then
Guido van Rossum07397971997-04-29 21:49:50 +00008827 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008828 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008829 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008830 LINKFORSHARED="-Wl,-E -Wl,+s";;
8831# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008832 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008833 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008834 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008836 # -u __dummy makes the linker aware of the objc runtime
8837 # in System.framework; otherwise, __objcInit (referenced in
8838 # crt1.o) gets erroneously defined as common, which breaks dynamic
8839 # loading of any modules which reference it in System.framework.
8840 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8841 # not used by the core itself but which needs to be in the core so
8842 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008843 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008844 if test "$enable_framework"
8845 then
8846 LINKFORSHARED="$LINKFORSHARED -framework Python"
8847 fi
8848 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008849 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008850 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008851 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008853 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8854 then
8855 LINKFORSHARED="-Wl,--export-dynamic"
8856 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008857 SunOS/5*) case $CC in
8858 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008859 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008860 then
8861 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008862 fi;;
8863 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008864 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008865fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008866echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8867echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008868
Michael W. Hudson54241132001-12-07 15:38:26 +00008869
Martin v. Löwis11437992002-04-12 09:54:03 +00008870echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8871echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008872if test ! "$LIBRARY" = "$LDLIBRARY"
8873then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008874 case $ac_sys_system in
8875 CYGWIN*)
8876 # Cygwin needs CCSHARED when building extension DLLs
8877 # but not when building the interpreter DLL.
8878 CFLAGSFORSHARED='';;
8879 *)
8880 CFLAGSFORSHARED='$(CCSHARED)'
8881 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008882fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008883echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8884echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008885
Guido van Rossum627b2d71993-12-24 10:39:16 +00008886# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008887
8888echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8889echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8890if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8891 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008892else
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008894LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008895cat >conftest.$ac_ext <<_ACEOF
8896#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008897#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008898
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008899/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008900#ifdef __cplusplus
8901extern "C"
8902#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008903/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 builtin and then its argument prototype would still apply. */
8905char dlopen ();
8906#ifdef F77_DUMMY_MAIN
8907# ifdef __cplusplus
8908 extern "C"
8909# endif
8910 int F77_DUMMY_MAIN() { return 1; }
8911#endif
8912int
8913main ()
8914{
8915dlopen ();
8916 ;
8917 return 0;
8918}
8919_ACEOF
8920rm -f conftest.$ac_objext conftest$ac_exeext
8921if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8922 (eval $ac_link) 2>&5
8923 ac_status=$?
8924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8925 (exit $ac_status); } &&
8926 { ac_try='test -s conftest$ac_exeext'
8927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8928 (eval $ac_try) 2>&5
8929 ac_status=$?
8930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8931 (exit $ac_status); }; }; then
8932 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008933else
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 echo "$as_me: failed program was:" >&5
8935cat conftest.$ac_ext >&5
8936ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008937fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008938rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8939LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008940fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008941echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8942echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8943if test $ac_cv_lib_dl_dlopen = yes; then
8944 cat >>confdefs.h <<_ACEOF
8945#define HAVE_LIBDL 1
8946_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008947
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008948 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008949
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008950fi
8951 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008952
8953echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8954echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8955if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8956 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008957else
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008959LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008960cat >conftest.$ac_ext <<_ACEOF
8961#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008962#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008964/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008965#ifdef __cplusplus
8966extern "C"
8967#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008968/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 builtin and then its argument prototype would still apply. */
8970char shl_load ();
8971#ifdef F77_DUMMY_MAIN
8972# ifdef __cplusplus
8973 extern "C"
8974# endif
8975 int F77_DUMMY_MAIN() { return 1; }
8976#endif
8977int
8978main ()
8979{
8980shl_load ();
8981 ;
8982 return 0;
8983}
8984_ACEOF
8985rm -f conftest.$ac_objext conftest$ac_exeext
8986if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8987 (eval $ac_link) 2>&5
8988 ac_status=$?
8989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8990 (exit $ac_status); } &&
8991 { ac_try='test -s conftest$ac_exeext'
8992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8993 (eval $ac_try) 2>&5
8994 ac_status=$?
8995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8996 (exit $ac_status); }; }; then
8997 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008998else
Martin v. Löwis11437992002-04-12 09:54:03 +00008999 echo "$as_me: failed program was:" >&5
9000cat conftest.$ac_ext >&5
9001ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009003rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9004LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009005fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009006echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9007echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9008if test $ac_cv_lib_dld_shl_load = yes; then
9009 cat >>confdefs.h <<_ACEOF
9010#define HAVE_LIBDLD 1
9011_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009012
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009013 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009014
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009015fi
9016 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009017
9018echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9019echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9020if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9021 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009022else
Martin v. Löwis11437992002-04-12 09:54:03 +00009023 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009024LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009025cat >conftest.$ac_ext <<_ACEOF
9026#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009027#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009029/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009030#ifdef __cplusplus
9031extern "C"
9032#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009033/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009034 builtin and then its argument prototype would still apply. */
9035char sem_init ();
9036#ifdef F77_DUMMY_MAIN
9037# ifdef __cplusplus
9038 extern "C"
9039# endif
9040 int F77_DUMMY_MAIN() { return 1; }
9041#endif
9042int
9043main ()
9044{
9045sem_init ();
9046 ;
9047 return 0;
9048}
9049_ACEOF
9050rm -f conftest.$ac_objext conftest$ac_exeext
9051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9052 (eval $ac_link) 2>&5
9053 ac_status=$?
9054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9055 (exit $ac_status); } &&
9056 { ac_try='test -s conftest$ac_exeext'
9057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9058 (eval $ac_try) 2>&5
9059 ac_status=$?
9060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9061 (exit $ac_status); }; }; then
9062 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009063else
Martin v. Löwis11437992002-04-12 09:54:03 +00009064 echo "$as_me: failed program was:" >&5
9065cat conftest.$ac_ext >&5
9066ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009067fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009068rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9069LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009070fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009071echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9072echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9073if test $ac_cv_lib_rt_sem_init = yes; then
9074 cat >>confdefs.h <<_ACEOF
9075#define HAVE_LIBRT 1
9076_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009077
9078 LIBS="-lrt $LIBS"
9079
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009080fi
9081 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009082
9083# checks for system dependent C++ extensions support
9084case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9086echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9087 cat >conftest.$ac_ext <<_ACEOF
9088#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009089#include "confdefs.h"
9090#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009091#ifdef F77_DUMMY_MAIN
9092# ifdef __cplusplus
9093 extern "C"
9094# endif
9095 int F77_DUMMY_MAIN() { return 1; }
9096#endif
9097int
9098main ()
9099{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009100loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 ;
9102 return 0;
9103}
9104_ACEOF
9105rm -f conftest.$ac_objext conftest$ac_exeext
9106if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9107 (eval $ac_link) 2>&5
9108 ac_status=$?
9109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9110 (exit $ac_status); } &&
9111 { ac_try='test -s conftest$ac_exeext'
9112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9113 (eval $ac_try) 2>&5
9114 ac_status=$?
9115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9116 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009117
Martin v. Löwis11437992002-04-12 09:54:03 +00009118cat >>confdefs.h <<\_ACEOF
9119#define AIX_GENUINE_CPLUSPLUS 1
9120_ACEOF
9121
9122 echo "$as_me:$LINENO: result: yes" >&5
9123echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009124else
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 echo "$as_me: failed program was:" >&5
9126cat conftest.$ac_ext >&5
9127echo "$as_me:$LINENO: result: no" >&5
9128echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009129fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009130rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009131 *) ;;
9132esac
9133
Guido van Rossum70c7f481998-03-26 18:44:10 +00009134# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9135# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009136# BeOS' sockets are stashed in libnet.
9137case "$ac_sys_system" in
9138IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009139*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009140echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9141echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9142if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9143 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009144else
Martin v. Löwis11437992002-04-12 09:54:03 +00009145 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009146LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009147cat >conftest.$ac_ext <<_ACEOF
9148#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009149#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009151/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009152#ifdef __cplusplus
9153extern "C"
9154#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009155/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009156 builtin and then its argument prototype would still apply. */
9157char t_open ();
9158#ifdef F77_DUMMY_MAIN
9159# ifdef __cplusplus
9160 extern "C"
9161# endif
9162 int F77_DUMMY_MAIN() { return 1; }
9163#endif
9164int
9165main ()
9166{
9167t_open ();
9168 ;
9169 return 0;
9170}
9171_ACEOF
9172rm -f conftest.$ac_objext conftest$ac_exeext
9173if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9174 (eval $ac_link) 2>&5
9175 ac_status=$?
9176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9177 (exit $ac_status); } &&
9178 { ac_try='test -s conftest$ac_exeext'
9179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9180 (eval $ac_try) 2>&5
9181 ac_status=$?
9182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9183 (exit $ac_status); }; }; then
9184 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009185else
Martin v. Löwis11437992002-04-12 09:54:03 +00009186 echo "$as_me: failed program was:" >&5
9187cat conftest.$ac_ext >&5
9188ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009189fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009190rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9191LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009193echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9194echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9195if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009196 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009197fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009198 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009199echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9200echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9201if test "${ac_cv_lib_socket_socket+set}" = set; then
9202 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009203else
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009205LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009206cat >conftest.$ac_ext <<_ACEOF
9207#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009208#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009209
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009210/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009211#ifdef __cplusplus
9212extern "C"
9213#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009214/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009215 builtin and then its argument prototype would still apply. */
9216char socket ();
9217#ifdef F77_DUMMY_MAIN
9218# ifdef __cplusplus
9219 extern "C"
9220# endif
9221 int F77_DUMMY_MAIN() { return 1; }
9222#endif
9223int
9224main ()
9225{
9226socket ();
9227 ;
9228 return 0;
9229}
9230_ACEOF
9231rm -f conftest.$ac_objext conftest$ac_exeext
9232if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9233 (eval $ac_link) 2>&5
9234 ac_status=$?
9235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9236 (exit $ac_status); } &&
9237 { ac_try='test -s conftest$ac_exeext'
9238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9239 (eval $ac_try) 2>&5
9240 ac_status=$?
9241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9242 (exit $ac_status); }; }; then
9243 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009244else
Martin v. Löwis11437992002-04-12 09:54:03 +00009245 echo "$as_me: failed program was:" >&5
9246cat conftest.$ac_ext >&5
9247ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009248fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009249rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9250LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009251fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009252echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9253echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9254if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009255 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009256fi
9257 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009258;;
9259esac
9260case "$ac_sys_system" in
9261BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009262echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9263echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9264if test "${ac_cv_lib_net_socket+set}" = set; then
9265 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009266else
Martin v. Löwis11437992002-04-12 09:54:03 +00009267 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009268LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009269cat >conftest.$ac_ext <<_ACEOF
9270#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009271#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009272
Guido van Rossumad678af1998-10-02 14:42:15 +00009273/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009274#ifdef __cplusplus
9275extern "C"
9276#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009277/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009278 builtin and then its argument prototype would still apply. */
9279char socket ();
9280#ifdef F77_DUMMY_MAIN
9281# ifdef __cplusplus
9282 extern "C"
9283# endif
9284 int F77_DUMMY_MAIN() { return 1; }
9285#endif
9286int
9287main ()
9288{
9289socket ();
9290 ;
9291 return 0;
9292}
9293_ACEOF
9294rm -f conftest.$ac_objext conftest$ac_exeext
9295if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9296 (eval $ac_link) 2>&5
9297 ac_status=$?
9298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9299 (exit $ac_status); } &&
9300 { ac_try='test -s conftest$ac_exeext'
9301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9302 (eval $ac_try) 2>&5
9303 ac_status=$?
9304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9305 (exit $ac_status); }; }; then
9306 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009307else
Martin v. Löwis11437992002-04-12 09:54:03 +00009308 echo "$as_me: failed program was:" >&5
9309cat conftest.$ac_ext >&5
9310ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009311fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009312rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9313LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009314fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009315echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9316echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9317if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009318 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009319fi
9320 # BeOS
9321;;
9322esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009323
Martin v. Löwis11437992002-04-12 09:54:03 +00009324echo "$as_me:$LINENO: checking for --with-libs" >&5
9325echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9326
Guido van Rossuma68acba1996-07-31 17:36:39 +00009327# Check whether --with-libs or --without-libs was given.
9328if test "${with_libs+set}" = set; then
9329 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009330
9331echo "$as_me:$LINENO: result: $withval" >&5
9332echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009333LIBS="$withval $LIBS"
9334
9335else
Martin v. Löwis11437992002-04-12 09:54:03 +00009336 echo "$as_me:$LINENO: result: no" >&5
9337echo "${ECHO_T}no" >&6
9338fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009339
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009340# Determine if signalmodule should be used.
9341
9342
Martin v. Löwis11437992002-04-12 09:54:03 +00009343echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9344echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9345
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009346# Check whether --with-signal-module or --without-signal-module was given.
9347if test "${with_signal_module+set}" = set; then
9348 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009349
Martin v. Löwis11437992002-04-12 09:54:03 +00009350fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009351
9352if test -z "$with_signal_module"
9353then with_signal_module="yes"
9354fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009355echo "$as_me:$LINENO: result: $with_signal_module" >&5
9356echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009357
9358if test "${with_signal_module}" = "yes"; then
9359 USE_SIGNAL_MODULE=""
9360 SIGNAL_OBJS=""
9361else
9362 USE_SIGNAL_MODULE="#"
9363 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9364fi
9365
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009366# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009367
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009368USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009369
Martin v. Löwis11437992002-04-12 09:54:03 +00009370echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9371echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9372
Guido van Rossumec2f0731997-01-22 20:54:01 +00009373
9374# Check whether --with-dec-threads or --without-dec-threads was given.
9375if test "${with_dec_threads+set}" = set; then
9376 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009377
9378echo "$as_me:$LINENO: result: $withval" >&5
9379echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009380LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009381if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009382 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009383fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009384else
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 echo "$as_me:$LINENO: result: no" >&5
9386echo "${ECHO_T}no" >&6
9387fi;
9388
9389# Templates for things AC_DEFINEd more than once.
9390# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009391
9392
Martin v. Löwis11437992002-04-12 09:54:03 +00009393
9394
9395
9396
9397
9398echo "$as_me:$LINENO: checking for --with-threads" >&5
9399echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9400
Guido van Rossumec2f0731997-01-22 20:54:01 +00009401# Check whether --with-threads or --without-threads was given.
9402if test "${with_threads+set}" = set; then
9403 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009404
Martin v. Löwis11437992002-04-12 09:54:03 +00009405fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009406
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009407# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009408
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009409# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009410if test "${with_thread+set}" = set; then
9411 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009412
Martin v. Löwis11437992002-04-12 09:54:03 +00009413with_threads=$with_thread
9414fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009415
9416if test -z "$with_threads"
9417then with_threads="yes"
9418fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009419echo "$as_me:$LINENO: result: $with_threads" >&5
9420echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009421
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009422
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009423if test "$with_threads" = "no"
9424then
9425 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009426elif test "$ac_cv_pthread_is_default" = yes
9427then
Martin v. Löwis11437992002-04-12 09:54:03 +00009428 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009429#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009430_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009431
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009432 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009434#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009435_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009436
9437 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009438 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009439elif test "$ac_cv_kpthread" = "yes"
9440then
9441 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009443#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009444_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009445
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009446 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009447 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009448else
9449 if test ! -z "$with_threads" -a -d "$with_threads"
9450 then LDFLAGS="$LDFLAGS -L$with_threads"
9451 fi
9452 if test ! -z "$withval" -a -d "$withval"
9453 then LDFLAGS="$LDFLAGS -L$withval"
9454 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009455
9456 # According to the POSIX spec, a pthreads implementation must
9457 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9459echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9460 cat >conftest.$ac_ext <<_ACEOF
9461#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009462#include "confdefs.h"
9463#include <unistd.h>
9464 #ifdef _POSIX_THREADS
9465 yes
9466 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009467
9468_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9470 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009471 unistd_defines_pthreads=yes
9472else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009473 unistd_defines_pthreads=no
9474fi
9475rm -f conftest*
9476
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9478echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009479
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009481#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009482_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009483
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 if test "${ac_cv_header_cthreads_h+set}" = set; then
9485 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9486echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9487if test "${ac_cv_header_cthreads_h+set}" = set; then
9488 echo $ECHO_N "(cached) $ECHO_C" >&6
9489fi
9490echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9491echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009492else
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 # Is the header compilable?
9494echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9495echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9496cat >conftest.$ac_ext <<_ACEOF
9497#line $LINENO "configure"
9498#include "confdefs.h"
9499$ac_includes_default
9500#include <cthreads.h>
9501_ACEOF
9502rm -f conftest.$ac_objext
9503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9504 (eval $ac_compile) 2>&5
9505 ac_status=$?
9506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9507 (exit $ac_status); } &&
9508 { ac_try='test -s conftest.$ac_objext'
9509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9510 (eval $ac_try) 2>&5
9511 ac_status=$?
9512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9513 (exit $ac_status); }; }; then
9514 ac_header_compiler=yes
9515else
9516 echo "$as_me: failed program was:" >&5
9517cat conftest.$ac_ext >&5
9518ac_header_compiler=no
9519fi
9520rm -f conftest.$ac_objext conftest.$ac_ext
9521echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9522echo "${ECHO_T}$ac_header_compiler" >&6
9523
9524# Is the header present?
9525echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9526echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9527cat >conftest.$ac_ext <<_ACEOF
9528#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009529#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009530#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009531_ACEOF
9532if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9533 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9534 ac_status=$?
9535 egrep -v '^ *\+' conftest.er1 >conftest.err
9536 rm -f conftest.er1
9537 cat conftest.err >&5
9538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9539 (exit $ac_status); } >/dev/null; then
9540 if test -s conftest.err; then
9541 ac_cpp_err=$ac_c_preproc_warn_flag
9542 else
9543 ac_cpp_err=
9544 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009545else
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 ac_cpp_err=yes
9547fi
9548if test -z "$ac_cpp_err"; then
9549 ac_header_preproc=yes
9550else
9551 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009552 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009554fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009555rm -f conftest.err conftest.$ac_ext
9556echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9557echo "${ECHO_T}$ac_header_preproc" >&6
9558
9559# So? What about this header?
9560case $ac_header_compiler:$ac_header_preproc in
9561 yes:no )
9562 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9563echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9564 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9565echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9566 no:yes )
9567 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9568echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9569 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9570echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9571 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9572echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9573esac
9574echo "$as_me:$LINENO: checking for cthreads.h" >&5
9575echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9576if test "${ac_cv_header_cthreads_h+set}" = set; then
9577 echo $ECHO_N "(cached) $ECHO_C" >&6
9578else
9579 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009581echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9582echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9583
9584fi
9585if test $ac_cv_header_cthreads_h = yes; then
9586 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009587#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009588_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009589
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009591#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009592_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009593
Martin v. Löwis11437992002-04-12 09:54:03 +00009594
9595cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009596#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009597_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009598
9599 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009600 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009601else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009602
Martin v. Löwis11437992002-04-12 09:54:03 +00009603 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9604 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9605echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9606if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9607 echo $ECHO_N "(cached) $ECHO_C" >&6
9608fi
9609echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9610echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009611else
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 # Is the header compilable?
9613echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9614echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9615cat >conftest.$ac_ext <<_ACEOF
9616#line $LINENO "configure"
9617#include "confdefs.h"
9618$ac_includes_default
9619#include <mach/cthreads.h>
9620_ACEOF
9621rm -f conftest.$ac_objext
9622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9623 (eval $ac_compile) 2>&5
9624 ac_status=$?
9625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9626 (exit $ac_status); } &&
9627 { ac_try='test -s conftest.$ac_objext'
9628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9629 (eval $ac_try) 2>&5
9630 ac_status=$?
9631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9632 (exit $ac_status); }; }; then
9633 ac_header_compiler=yes
9634else
9635 echo "$as_me: failed program was:" >&5
9636cat conftest.$ac_ext >&5
9637ac_header_compiler=no
9638fi
9639rm -f conftest.$ac_objext conftest.$ac_ext
9640echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9641echo "${ECHO_T}$ac_header_compiler" >&6
9642
9643# Is the header present?
9644echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9645echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9646cat >conftest.$ac_ext <<_ACEOF
9647#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009648#include "confdefs.h"
9649#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009650_ACEOF
9651if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9652 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9653 ac_status=$?
9654 egrep -v '^ *\+' conftest.er1 >conftest.err
9655 rm -f conftest.er1
9656 cat conftest.err >&5
9657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9658 (exit $ac_status); } >/dev/null; then
9659 if test -s conftest.err; then
9660 ac_cpp_err=$ac_c_preproc_warn_flag
9661 else
9662 ac_cpp_err=
9663 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009664else
Martin v. Löwis11437992002-04-12 09:54:03 +00009665 ac_cpp_err=yes
9666fi
9667if test -z "$ac_cpp_err"; then
9668 ac_header_preproc=yes
9669else
9670 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009671 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009672 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009673fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009674rm -f conftest.err conftest.$ac_ext
9675echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9676echo "${ECHO_T}$ac_header_preproc" >&6
9677
9678# So? What about this header?
9679case $ac_header_compiler:$ac_header_preproc in
9680 yes:no )
9681 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9682echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9683 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9684echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9685 no:yes )
9686 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9687echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9688 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9689echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9690 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9691echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9692esac
9693echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9694echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9695if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9696 echo $ECHO_N "(cached) $ECHO_C" >&6
9697else
9698 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009699fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009700echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9701echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9702
9703fi
9704if test $ac_cv_header_mach_cthreads_h = yes; then
9705 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009706#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009707_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009708
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009710#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009711_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009712
Martin v. Löwis11437992002-04-12 09:54:03 +00009713
9714cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009715#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009716_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009717
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009718 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009719else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009720
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 echo "$as_me:$LINENO: checking for --with-pth" >&5
9722echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9723
9724# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009725if test "${with_pth+set}" = set; then
9726 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009727
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 echo "$as_me:$LINENO: result: $withval" >&5
9729echo "${ECHO_T}$withval" >&6
9730 cat >>confdefs.h <<\_ACEOF
9731#define WITH_THREAD 1
9732_ACEOF
9733
9734
9735cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009736#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009737_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009738
Martin v. Löwis130fb172001-07-19 11:00:41 +00009739 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009740 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009741else
Martin v. Löwis11437992002-04-12 09:54:03 +00009742
9743 echo "$as_me:$LINENO: result: no" >&5
9744echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009745
9746 # Just looking for pthread_create in libpthread is not enough:
9747 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9748 # So we really have to include pthread.h, and then link.
9749 _libs=$LIBS
9750 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9752echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9753 cat >conftest.$ac_ext <<_ACEOF
9754#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009755#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009756#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009757
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009758void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009759#ifdef F77_DUMMY_MAIN
9760# ifdef __cplusplus
9761 extern "C"
9762# endif
9763 int F77_DUMMY_MAIN() { return 1; }
9764#endif
9765int
9766main ()
9767{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009768
9769pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009770 ;
9771 return 0;
9772}
9773_ACEOF
9774rm -f conftest.$ac_objext conftest$ac_exeext
9775if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9776 (eval $ac_link) 2>&5
9777 ac_status=$?
9778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9779 (exit $ac_status); } &&
9780 { ac_try='test -s conftest$ac_exeext'
9781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9782 (eval $ac_try) 2>&5
9783 ac_status=$?
9784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9785 (exit $ac_status); }; }; then
9786
9787 echo "$as_me:$LINENO: result: yes" >&5
9788echo "${ECHO_T}yes" >&6
9789 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009790#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009791_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009792
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009793 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009794 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009795else
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 echo "$as_me: failed program was:" >&5
9797cat conftest.$ac_ext >&5
9798
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009799 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9801echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9802if test "${ac_cv_func_pthread_detach+set}" = set; then
9803 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009804else
Martin v. Löwis11437992002-04-12 09:54:03 +00009805 cat >conftest.$ac_ext <<_ACEOF
9806#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009807#include "confdefs.h"
9808/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009810#include <assert.h>
9811/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009812#ifdef __cplusplus
9813extern "C"
9814#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009815/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009816 builtin and then its argument prototype would still apply. */
9817char pthread_detach ();
9818char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009819
Martin v. Löwis11437992002-04-12 09:54:03 +00009820#ifdef F77_DUMMY_MAIN
9821# ifdef __cplusplus
9822 extern "C"
9823# endif
9824 int F77_DUMMY_MAIN() { return 1; }
9825#endif
9826int
9827main ()
9828{
Guido van Rossumad678af1998-10-02 14:42:15 +00009829/* The GNU C library defines this for functions which it implements
9830 to always fail with ENOSYS. Some functions are actually named
9831 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009832#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009833choke me
9834#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009835f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009836#endif
9837
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ;
9839 return 0;
9840}
9841_ACEOF
9842rm -f conftest.$ac_objext conftest$ac_exeext
9843if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9844 (eval $ac_link) 2>&5
9845 ac_status=$?
9846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9847 (exit $ac_status); } &&
9848 { ac_try='test -s conftest$ac_exeext'
9849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9850 (eval $ac_try) 2>&5
9851 ac_status=$?
9852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9853 (exit $ac_status); }; }; then
9854 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009855else
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 echo "$as_me: failed program was:" >&5
9857cat conftest.$ac_ext >&5
9858ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009859fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009860rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009861fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009862echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9863echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9864if test $ac_cv_func_pthread_detach = yes; then
9865 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009866#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009867_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009868
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009869 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009870 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009871else
Guido van Rossumad678af1998-10-02 14:42:15 +00009872
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9874 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9875echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9876if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9877 echo $ECHO_N "(cached) $ECHO_C" >&6
9878fi
9879echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9880echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009881else
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 # Is the header compilable?
9883echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
9884echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
9885cat >conftest.$ac_ext <<_ACEOF
9886#line $LINENO "configure"
9887#include "confdefs.h"
9888$ac_includes_default
9889#include <kernel/OS.h>
9890_ACEOF
9891rm -f conftest.$ac_objext
9892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9893 (eval $ac_compile) 2>&5
9894 ac_status=$?
9895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9896 (exit $ac_status); } &&
9897 { ac_try='test -s conftest.$ac_objext'
9898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9899 (eval $ac_try) 2>&5
9900 ac_status=$?
9901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9902 (exit $ac_status); }; }; then
9903 ac_header_compiler=yes
9904else
9905 echo "$as_me: failed program was:" >&5
9906cat conftest.$ac_ext >&5
9907ac_header_compiler=no
9908fi
9909rm -f conftest.$ac_objext conftest.$ac_ext
9910echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9911echo "${ECHO_T}$ac_header_compiler" >&6
9912
9913# Is the header present?
9914echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
9915echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
9916cat >conftest.$ac_ext <<_ACEOF
9917#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009918#include "confdefs.h"
9919#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009920_ACEOF
9921if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9922 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9923 ac_status=$?
9924 egrep -v '^ *\+' conftest.er1 >conftest.err
9925 rm -f conftest.er1
9926 cat conftest.err >&5
9927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9928 (exit $ac_status); } >/dev/null; then
9929 if test -s conftest.err; then
9930 ac_cpp_err=$ac_c_preproc_warn_flag
9931 else
9932 ac_cpp_err=
9933 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009934else
Martin v. Löwis11437992002-04-12 09:54:03 +00009935 ac_cpp_err=yes
9936fi
9937if test -z "$ac_cpp_err"; then
9938 ac_header_preproc=yes
9939else
9940 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009941 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009942 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009943fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009944rm -f conftest.err conftest.$ac_ext
9945echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9946echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009947
Martin v. Löwis11437992002-04-12 09:54:03 +00009948# So? What about this header?
9949case $ac_header_compiler:$ac_header_preproc in
9950 yes:no )
9951 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
9952echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9953 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9954echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9955 no:yes )
9956 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
9957echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
9958 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
9959echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
9960 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9961echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9962esac
9963echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9964echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9965if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9966 echo $ECHO_N "(cached) $ECHO_C" >&6
9967else
9968 ac_cv_header_kernel_OS_h=$ac_header_preproc
9969fi
9970echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9971echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
9972
9973fi
9974if test $ac_cv_header_kernel_OS_h = yes; then
9975 cat >>confdefs.h <<\_ACEOF
9976#define WITH_THREAD 1
9977_ACEOF
9978
9979
9980cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009981#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009982_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009983
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009984 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009985else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009986
Martin v. Löwis11437992002-04-12 09:54:03 +00009987 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
9988echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
9989if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
9990 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009991else
Martin v. Löwis11437992002-04-12 09:54:03 +00009992 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009993LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009994cat >conftest.$ac_ext <<_ACEOF
9995#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00009996#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009997
Greg Steinadf63d62000-07-05 10:38:09 +00009998/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009999#ifdef __cplusplus
10000extern "C"
10001#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010002/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010003 builtin and then its argument prototype would still apply. */
10004char pthread_create ();
10005#ifdef F77_DUMMY_MAIN
10006# ifdef __cplusplus
10007 extern "C"
10008# endif
10009 int F77_DUMMY_MAIN() { return 1; }
10010#endif
10011int
10012main ()
10013{
10014pthread_create ();
10015 ;
10016 return 0;
10017}
10018_ACEOF
10019rm -f conftest.$ac_objext conftest$ac_exeext
10020if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10021 (eval $ac_link) 2>&5
10022 ac_status=$?
10023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10024 (exit $ac_status); } &&
10025 { ac_try='test -s conftest$ac_exeext'
10026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10027 (eval $ac_try) 2>&5
10028 ac_status=$?
10029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10030 (exit $ac_status); }; }; then
10031 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010032else
Martin v. Löwis11437992002-04-12 09:54:03 +000010033 echo "$as_me: failed program was:" >&5
10034cat conftest.$ac_ext >&5
10035ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010036fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010037rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10038LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010039fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010040echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10041echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10042if test $ac_cv_lib_pthreads_pthread_create = yes; then
10043 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010044#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010045_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010046
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010047 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010048 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010049 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010050else
Greg Steinadf63d62000-07-05 10:38:09 +000010051
Martin v. Löwis11437992002-04-12 09:54:03 +000010052 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10053echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10054if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10055 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010056else
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010058LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010059cat >conftest.$ac_ext <<_ACEOF
10060#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010061#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010062
Guido van Rossum49545951997-12-02 19:28:29 +000010063/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010064#ifdef __cplusplus
10065extern "C"
10066#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010067/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010068 builtin and then its argument prototype would still apply. */
10069char pthread_create ();
10070#ifdef F77_DUMMY_MAIN
10071# ifdef __cplusplus
10072 extern "C"
10073# endif
10074 int F77_DUMMY_MAIN() { return 1; }
10075#endif
10076int
10077main ()
10078{
10079pthread_create ();
10080 ;
10081 return 0;
10082}
10083_ACEOF
10084rm -f conftest.$ac_objext conftest$ac_exeext
10085if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10086 (eval $ac_link) 2>&5
10087 ac_status=$?
10088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10089 (exit $ac_status); } &&
10090 { ac_try='test -s conftest$ac_exeext'
10091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10092 (eval $ac_try) 2>&5
10093 ac_status=$?
10094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10095 (exit $ac_status); }; }; then
10096 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010097else
Martin v. Löwis11437992002-04-12 09:54:03 +000010098 echo "$as_me: failed program was:" >&5
10099cat conftest.$ac_ext >&5
10100ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010101fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010102rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10103LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010105echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10106echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10107if test $ac_cv_lib_c_r_pthread_create = yes; then
10108 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010109#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010110_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010111
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010112 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010113 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010114 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010115else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010116
Martin v. Löwis11437992002-04-12 09:54:03 +000010117 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10118echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10119if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10120 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010121else
Martin v. Löwis11437992002-04-12 09:54:03 +000010122 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010123LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010124cat >conftest.$ac_ext <<_ACEOF
10125#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010126#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010127
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010128/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010129#ifdef __cplusplus
10130extern "C"
10131#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010132/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010133 builtin and then its argument prototype would still apply. */
10134char __d6_pthread_create ();
10135#ifdef F77_DUMMY_MAIN
10136# ifdef __cplusplus
10137 extern "C"
10138# endif
10139 int F77_DUMMY_MAIN() { return 1; }
10140#endif
10141int
10142main ()
10143{
10144__d6_pthread_create ();
10145 ;
10146 return 0;
10147}
10148_ACEOF
10149rm -f conftest.$ac_objext conftest$ac_exeext
10150if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10151 (eval $ac_link) 2>&5
10152 ac_status=$?
10153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10154 (exit $ac_status); } &&
10155 { ac_try='test -s conftest$ac_exeext'
10156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10157 (eval $ac_try) 2>&5
10158 ac_status=$?
10159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10160 (exit $ac_status); }; }; then
10161 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010162else
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 echo "$as_me: failed program was:" >&5
10164cat conftest.$ac_ext >&5
10165ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010166fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010167rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10168LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010169fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010170echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10171echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10172if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10173 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010174#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010175_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010176
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010177 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010178 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010179 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010180else
Guido van Rossum49545951997-12-02 19:28:29 +000010181
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10183echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10184if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10185 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010186else
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010188LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010189cat >conftest.$ac_ext <<_ACEOF
10190#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010191#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010192
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010193/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010194#ifdef __cplusplus
10195extern "C"
10196#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010197/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010198 builtin and then its argument prototype would still apply. */
10199char __pthread_create_system ();
10200#ifdef F77_DUMMY_MAIN
10201# ifdef __cplusplus
10202 extern "C"
10203# endif
10204 int F77_DUMMY_MAIN() { return 1; }
10205#endif
10206int
10207main ()
10208{
10209__pthread_create_system ();
10210 ;
10211 return 0;
10212}
10213_ACEOF
10214rm -f conftest.$ac_objext conftest$ac_exeext
10215if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10216 (eval $ac_link) 2>&5
10217 ac_status=$?
10218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10219 (exit $ac_status); } &&
10220 { ac_try='test -s conftest$ac_exeext'
10221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10222 (eval $ac_try) 2>&5
10223 ac_status=$?
10224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10225 (exit $ac_status); }; }; then
10226 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010227else
Martin v. Löwis11437992002-04-12 09:54:03 +000010228 echo "$as_me: failed program was:" >&5
10229cat conftest.$ac_ext >&5
10230ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010231fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010232rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10233LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010234fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010235echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10236echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10237if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10238 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010239#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010240_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010241
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010242 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010243 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010244 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010245else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010246
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10248echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10249if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010251else
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010253LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010254cat >conftest.$ac_ext <<_ACEOF
10255#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010256#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010257
Guido van Rossumb93a8621998-05-07 13:27:32 +000010258/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010259#ifdef __cplusplus
10260extern "C"
10261#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010262/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 builtin and then its argument prototype would still apply. */
10264char pthread_create ();
10265#ifdef F77_DUMMY_MAIN
10266# ifdef __cplusplus
10267 extern "C"
10268# endif
10269 int F77_DUMMY_MAIN() { return 1; }
10270#endif
10271int
10272main ()
10273{
10274pthread_create ();
10275 ;
10276 return 0;
10277}
10278_ACEOF
10279rm -f conftest.$ac_objext conftest$ac_exeext
10280if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10281 (eval $ac_link) 2>&5
10282 ac_status=$?
10283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10284 (exit $ac_status); } &&
10285 { ac_try='test -s conftest$ac_exeext'
10286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10287 (eval $ac_try) 2>&5
10288 ac_status=$?
10289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10290 (exit $ac_status); }; }; then
10291 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010292else
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 echo "$as_me: failed program was:" >&5
10294cat conftest.$ac_ext >&5
10295ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010296fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010297rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10298LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010300echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10301echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10302if test $ac_cv_lib_cma_pthread_create = yes; then
10303 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010304#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010305_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010306
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010307 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010308 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010309 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010310else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010311
Martin v. Löwis130fb172001-07-19 11:00:41 +000010312 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010313fi
10314
Guido van Rossum627b2d71993-12-24 10:39:16 +000010315
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010316fi
10317
Guido van Rossum0be3e491997-05-22 20:33:33 +000010318fi
10319
Guido van Rossum49545951997-12-02 19:28:29 +000010320fi
10321
Guido van Rossumb93a8621998-05-07 13:27:32 +000010322fi
10323
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010324fi
10325
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010326
Michael W. Hudson54241132001-12-07 15:38:26 +000010327fi
10328
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010329fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010330rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10331fi;
10332fi
10333
10334
10335fi
10336
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010337
Michael W. Hudson54241132001-12-07 15:38:26 +000010338
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010339 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010340 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010341
10342cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010343#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010344_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010345
10346 fi
10347
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10349echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10350 if test "${ac_cv_pthread_system_supported+set}" = set; then
10351 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010352else
10353 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010354 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010355else
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 cat >conftest.$ac_ext <<_ACEOF
10357#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010358#include "confdefs.h"
10359#include <pthread.h>
10360 void *foo(void *parm) {
10361 return NULL;
10362 }
10363 main() {
10364 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010365 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010366 if (pthread_attr_init(&attr)) exit(-1);
10367 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010368 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010369 exit(0);
10370 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010371_ACEOF
10372rm -f conftest$ac_exeext
10373if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10374 (eval $ac_link) 2>&5
10375 ac_status=$?
10376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10377 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10379 (eval $ac_try) 2>&5
10380 ac_status=$?
10381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10382 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010383 ac_cv_pthread_system_supported=yes
10384else
Martin v. Löwis11437992002-04-12 09:54:03 +000010385 echo "$as_me: program exited with status $ac_status" >&5
10386echo "$as_me: failed program was:" >&5
10387cat conftest.$ac_ext >&5
10388( exit $ac_status )
10389ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010390fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010391rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010392fi
10393
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010394fi
10395
Martin v. Löwis11437992002-04-12 09:54:03 +000010396 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10397echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010398 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010399
10400cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010401#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010402_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010403
10404 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010405
10406for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010407do
Martin v. Löwis11437992002-04-12 09:54:03 +000010408as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10409echo "$as_me:$LINENO: checking for $ac_func" >&5
10410echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10411if eval "test \"\${$as_ac_var+set}\" = set"; then
10412 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010413else
Martin v. Löwis11437992002-04-12 09:54:03 +000010414 cat >conftest.$ac_ext <<_ACEOF
10415#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010416#include "confdefs.h"
10417/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010419#include <assert.h>
10420/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010421#ifdef __cplusplus
10422extern "C"
10423#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010424/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 builtin and then its argument prototype would still apply. */
10426char $ac_func ();
10427char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010428
Martin v. Löwis11437992002-04-12 09:54:03 +000010429#ifdef F77_DUMMY_MAIN
10430# ifdef __cplusplus
10431 extern "C"
10432# endif
10433 int F77_DUMMY_MAIN() { return 1; }
10434#endif
10435int
10436main ()
10437{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010438/* The GNU C library defines this for functions which it implements
10439 to always fail with ENOSYS. Some functions are actually named
10440 something starting with __ and the normal name is an alias. */
10441#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10442choke me
10443#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010444f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010445#endif
10446
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 ;
10448 return 0;
10449}
10450_ACEOF
10451rm -f conftest.$ac_objext conftest$ac_exeext
10452if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10453 (eval $ac_link) 2>&5
10454 ac_status=$?
10455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10456 (exit $ac_status); } &&
10457 { ac_try='test -s conftest$ac_exeext'
10458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10459 (eval $ac_try) 2>&5
10460 ac_status=$?
10461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10462 (exit $ac_status); }; }; then
10463 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010464else
Martin v. Löwis11437992002-04-12 09:54:03 +000010465 echo "$as_me: failed program was:" >&5
10466cat conftest.$ac_ext >&5
10467eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010468fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010469rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010470fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010471echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10472echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10473if test `eval echo '${'$as_ac_var'}'` = yes; then
10474 cat >>confdefs.h <<_ACEOF
10475#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10476_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010477
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010478fi
10479done
10480
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010481 fi
10482
Martin v. Löwis11437992002-04-12 09:54:03 +000010483 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10484echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10485if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10486 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010487else
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010489LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010490cat >conftest.$ac_ext <<_ACEOF
10491#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010492#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010493
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010494/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010495#ifdef __cplusplus
10496extern "C"
10497#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010498/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010499 builtin and then its argument prototype would still apply. */
10500char usconfig ();
10501#ifdef F77_DUMMY_MAIN
10502# ifdef __cplusplus
10503 extern "C"
10504# endif
10505 int F77_DUMMY_MAIN() { return 1; }
10506#endif
10507int
10508main ()
10509{
10510usconfig ();
10511 ;
10512 return 0;
10513}
10514_ACEOF
10515rm -f conftest.$ac_objext conftest$ac_exeext
10516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10517 (eval $ac_link) 2>&5
10518 ac_status=$?
10519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10520 (exit $ac_status); } &&
10521 { ac_try='test -s conftest$ac_exeext'
10522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10523 (eval $ac_try) 2>&5
10524 ac_status=$?
10525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10526 (exit $ac_status); }; }; then
10527 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010528else
Martin v. Löwis11437992002-04-12 09:54:03 +000010529 echo "$as_me: failed program was:" >&5
10530cat conftest.$ac_ext >&5
10531ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010532fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010533rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10534LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010535fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010536echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10537echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10538if test $ac_cv_lib_mpc_usconfig = yes; then
10539 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010540#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010541_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010542
Martin v. Löwis130fb172001-07-19 11:00:41 +000010543 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010544 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010545 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010546fi
10547
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010548
Martin v. Löwis11437992002-04-12 09:54:03 +000010549 if test $posix_threads != "yes"; then
10550 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10551echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10552if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10553 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010554else
Martin v. Löwis11437992002-04-12 09:54:03 +000010555 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010556LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010557cat >conftest.$ac_ext <<_ACEOF
10558#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010559#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010560
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010561/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010562#ifdef __cplusplus
10563extern "C"
10564#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010565/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 builtin and then its argument prototype would still apply. */
10567char thr_create ();
10568#ifdef F77_DUMMY_MAIN
10569# ifdef __cplusplus
10570 extern "C"
10571# endif
10572 int F77_DUMMY_MAIN() { return 1; }
10573#endif
10574int
10575main ()
10576{
10577thr_create ();
10578 ;
10579 return 0;
10580}
10581_ACEOF
10582rm -f conftest.$ac_objext conftest$ac_exeext
10583if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10584 (eval $ac_link) 2>&5
10585 ac_status=$?
10586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10587 (exit $ac_status); } &&
10588 { ac_try='test -s conftest$ac_exeext'
10589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10590 (eval $ac_try) 2>&5
10591 ac_status=$?
10592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10593 (exit $ac_status); }; }; then
10594 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010595else
Martin v. Löwis11437992002-04-12 09:54:03 +000010596 echo "$as_me: failed program was:" >&5
10597cat conftest.$ac_ext >&5
10598ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010599fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010600rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10601LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010602fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010603echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10604echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10605if test $ac_cv_lib_thread_thr_create = yes; then
10606 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010607#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010608_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010609
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010610 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010611 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010612 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010613fi
10614
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010615 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010616
Martin v. Löwis130fb172001-07-19 11:00:41 +000010617 if test "$USE_THREAD_MODULE" != "#"
10618 then
10619 # If the above checks didn't disable threads, (at least) OSF1
10620 # needs this '-threads' argument during linking.
10621 case $ac_sys_system in
10622 OSF1) LDLAST=-threads;;
10623 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010624 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010625fi
10626
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010627# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010628
10629
10630echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10631echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010632# Check whether --enable-ipv6 or --disable-ipv6 was given.
10633if test "${enable_ipv6+set}" = set; then
10634 enableval="$enable_ipv6"
10635 case "$enableval" in
10636 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 echo "$as_me:$LINENO: result: no" >&5
10638echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010639 ipv6=no
10640 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 *) echo "$as_me:$LINENO: result: yes" >&5
10642echo "${ECHO_T}yes" >&6
10643 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010644#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010645_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010646
10647 ipv6=yes
10648 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010649 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010650else
Martin v. Löwis11437992002-04-12 09:54:03 +000010651
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010652 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010653 echo "$as_me:$LINENO: result: no" >&5
10654echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010655 ipv6=no
10656
10657else
Martin v. Löwis11437992002-04-12 09:54:03 +000010658 cat >conftest.$ac_ext <<_ACEOF
10659#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010660#include "confdefs.h"
10661 /* AF_INET6 available check */
10662#include <sys/types.h>
10663#include <sys/socket.h>
10664main()
10665{
10666 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10667 exit(1);
10668 else
10669 exit(0);
10670}
10671
Martin v. Löwis11437992002-04-12 09:54:03 +000010672_ACEOF
10673rm -f conftest$ac_exeext
10674if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10675 (eval $ac_link) 2>&5
10676 ac_status=$?
10677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10678 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10680 (eval $ac_try) 2>&5
10681 ac_status=$?
10682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10683 (exit $ac_status); }; }; then
10684 echo "$as_me:$LINENO: result: yes" >&5
10685echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010686 ipv6=yes
10687else
Martin v. Löwis11437992002-04-12 09:54:03 +000010688 echo "$as_me: program exited with status $ac_status" >&5
10689echo "$as_me: failed program was:" >&5
10690cat conftest.$ac_ext >&5
10691( exit $ac_status )
10692echo "$as_me:$LINENO: result: no" >&5
10693echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010694 ipv6=no
10695fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010696rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010697fi
10698
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010699if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010700 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10701echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10702 cat >conftest.$ac_ext <<_ACEOF
10703#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010704#include "confdefs.h"
10705#include <sys/types.h>
10706#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010707#ifdef F77_DUMMY_MAIN
10708# ifdef __cplusplus
10709 extern "C"
10710# endif
10711 int F77_DUMMY_MAIN() { return 1; }
10712#endif
10713int
10714main ()
10715{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010716struct sockaddr_in6 x;
10717x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ;
10719 return 0;
10720}
10721_ACEOF
10722rm -f conftest.$ac_objext
10723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10724 (eval $ac_compile) 2>&5
10725 ac_status=$?
10726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10727 (exit $ac_status); } &&
10728 { ac_try='test -s conftest.$ac_objext'
10729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10730 (eval $ac_try) 2>&5
10731 ac_status=$?
10732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10733 (exit $ac_status); }; }; then
10734 echo "$as_me:$LINENO: result: yes" >&5
10735echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010736 ipv6=yes
10737else
Martin v. Löwis11437992002-04-12 09:54:03 +000010738 echo "$as_me: failed program was:" >&5
10739cat conftest.$ac_ext >&5
10740echo "$as_me:$LINENO: result: no" >&5
10741echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010742 ipv6=no
10743fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010744rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010745fi
10746
10747if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010748 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010749#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010750_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010751
10752fi
10753
Martin v. Löwis11437992002-04-12 09:54:03 +000010754fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755
10756ipv6type=unknown
10757ipv6lib=none
10758ipv6trylibc=no
10759
10760if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010761 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10762echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010763 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10764 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765 case $i in
10766 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010767 cat >conftest.$ac_ext <<_ACEOF
10768#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010770
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010771#include <netinet/in.h>
10772#ifdef IPV6_INRIA_VERSION
10773yes
10774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010775_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10777 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010778 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779fi
10780rm -f conftest*
10781
10782 ;;
10783 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010784 cat >conftest.$ac_ext <<_ACEOF
10785#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010787
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788#include <netinet/in.h>
10789#ifdef __KAME__
10790yes
10791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010792_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10794 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 ipv6type=$i;
10796 ipv6lib=inet6
10797 ipv6libdir=/usr/local/v6/lib
10798 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010799fi
10800rm -f conftest*
10801
10802 ;;
10803 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010804 cat >conftest.$ac_ext <<_ACEOF
10805#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010807
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010808#include <features.h>
10809#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10810yes
10811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010812_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010813if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10814 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010815 ipv6type=$i;
10816 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817fi
10818rm -f conftest*
10819
10820 ;;
10821 linux-inet6)
10822 if test -d /usr/inet6; then
10823 ipv6type=$i
10824 ipv6lib=inet6
10825 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010826 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827 fi
10828 ;;
10829 solaris)
10830 if test -f /etc/netconfig; then
10831 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10832 ipv6type=$i
10833 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834 fi
10835 fi
10836 ;;
10837 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010838 cat >conftest.$ac_ext <<_ACEOF
10839#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010841
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842#include <sys/param.h>
10843#ifdef _TOSHIBA_INET6
10844yes
10845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010846_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10848 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010849 ipv6type=$i;
10850 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010851 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852fi
10853rm -f conftest*
10854
10855 ;;
10856 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 cat >conftest.$ac_ext <<_ACEOF
10858#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010860
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861#include </usr/local/v6/include/sys/v6config.h>
10862#ifdef __V6D__
10863yes
10864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010865_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10867 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868 ipv6type=$i;
10869 ipv6lib=v6;
10870 ipv6libdir=/usr/local/v6/lib;
10871 OPT="-I/usr/local/v6/include $OPT"
10872fi
10873rm -f conftest*
10874
10875 ;;
10876 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000010877 cat >conftest.$ac_ext <<_ACEOF
10878#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010880
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010881#include <sys/param.h>
10882#ifdef _ZETA_MINAMI_INET6
10883yes
10884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010885_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10887 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010888 ipv6type=$i;
10889 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010890 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891fi
10892rm -f conftest*
10893
10894 ;;
10895 esac
10896 if test "$ipv6type" != "unknown"; then
10897 break
10898 fi
10899 done
Martin v. Löwis11437992002-04-12 09:54:03 +000010900 echo "$as_me:$LINENO: result: $ipv6type" >&5
10901echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010902fi
10903
10904if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10905 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10906 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10907 echo "using lib$ipv6lib"
10908 else
10909 if test $ipv6trylibc = "yes"; then
10910 echo "using libc"
10911 else
10912 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10913 echo "You need to fetch lib$ipv6lib.a from appropriate"
10914 echo 'ipv6 kit and compile beforehand.'
10915 exit 1
10916 fi
10917 fi
10918fi
10919
Barry Warsawef82cd72000-06-30 16:21:01 +000010920# Check for GC support
Martin v. Löwis11437992002-04-12 09:54:03 +000010921echo "$as_me:$LINENO: checking for --with-cycle-gc" >&5
10922echo $ECHO_N "checking for --with-cycle-gc... $ECHO_C" >&6
10923
Barry Warsawef82cd72000-06-30 16:21:01 +000010924# Check whether --with-cycle-gc or --without-cycle-gc was given.
10925if test "${with_cycle_gc+set}" = set; then
10926 withval="$with_cycle_gc"
Barry Warsawef82cd72000-06-30 16:21:01 +000010927
Martin v. Löwis11437992002-04-12 09:54:03 +000010928fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000010929
10930if test -z "$with_cycle_gc"
10931then with_cycle_gc="yes"
10932fi
Neil Schemenauercf229462001-08-29 23:58:47 +000010933if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +000010934then
Martin v. Löwis11437992002-04-12 09:54:03 +000010935
10936cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010937#define WITH_CYCLE_GC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010938_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010939
10940fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010941echo "$as_me:$LINENO: result: $with_cycle_gc" >&5
10942echo "${ECHO_T}$with_cycle_gc" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000010943
Jack Jansen7b8c7542002-04-14 20:12:41 +000010944# Check for universal newline support
10945echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
10946echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
10947
10948# Check whether --with-universal-newlines or --without-universal-newlines was given.
10949if test "${with_universal_newlines+set}" = set; then
10950 withval="$with_universal_newlines"
10951
10952fi;
10953
10954if test -z "$with_universal_newlines"
10955then with_universal_newlines="yes"
10956fi
10957if test "$with_universal_newlines" != "no"
10958then
Martin v. Löwise8aea582002-04-16 05:51:02 +000010959
10960cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000010961#define WITH_UNIVERSAL_NEWLINES 1
10962_ACEOF
10963
10964fi
10965echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
10966echo "${ECHO_T}$with_universal_newlines" >&6
10967
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010968# Check for --with-doc-strings
10969echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
10970echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
10971
10972# Check whether --with-doc-strings or --without-doc-strings was given.
10973if test "${with_doc_strings+set}" = set; then
10974 withval="$with_doc_strings"
10975
10976fi;
10977
10978if test -z "$with_doc_strings"
10979then with_doc_strings="yes"
10980fi
10981if test "$with_doc_strings" != "no"
10982then
10983
10984cat >>confdefs.h <<\_ACEOF
10985#define WITH_DOC_STRINGS 1
10986_ACEOF
10987
10988fi
10989echo "$as_me:$LINENO: result: $with_doc_strings" >&5
10990echo "${ECHO_T}$with_doc_strings" >&6
10991
Neil Schemenauera35c6882001-02-27 04:45:05 +000010992# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000010993echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
10994echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
10995
Neil Schemenauera35c6882001-02-27 04:45:05 +000010996# Check whether --with-pymalloc or --without-pymalloc was given.
10997if test "${with_pymalloc+set}" = set; then
10998 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000010999
Martin v. Löwis11437992002-04-12 09:54:03 +000011000fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011001
Neil Schemenauer16c22972002-03-22 15:34:49 +000011002if test -z "$with_pymalloc"
11003then with_pymalloc="yes"
11004fi
11005if test "$with_pymalloc" != "no"
11006then
Martin v. Löwis11437992002-04-12 09:54:03 +000011007
11008cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011009#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011010_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011011
11012fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011013echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11014echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011015
Barry Warsawef82cd72000-06-30 16:21:01 +000011016# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011017echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11018echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11019
Barry Warsawef82cd72000-06-30 16:21:01 +000011020# Check whether --with-wctype-functions or --without-wctype-functions was given.
11021if test "${with_wctype_functions+set}" = set; then
11022 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011023
Barry Warsawef82cd72000-06-30 16:21:01 +000011024if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011025then
11026
11027cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011028#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011029_ACEOF
11030
11031 echo "$as_me:$LINENO: result: yes" >&5
11032echo "${ECHO_T}yes" >&6
11033else echo "$as_me:$LINENO: result: no" >&5
11034echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011035fi
11036else
Martin v. Löwis11437992002-04-12 09:54:03 +000011037 echo "$as_me:$LINENO: result: no" >&5
11038echo "${ECHO_T}no" >&6
11039fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011040
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011041# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011042
Guido van Rossum98935bf2001-09-05 19:13:16 +000011043DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011044
Martin v. Löwis11437992002-04-12 09:54:03 +000011045echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11046echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11047
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011048# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011049if test "${with_sgi_dl+set}" = set; then
11050 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011051
11052echo "$as_me:$LINENO: result: $withval" >&5
11053echo "${ECHO_T}$withval" >&6
11054
11055cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011056#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011057_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011058
Guido van Rossume97ee181999-12-20 21:27:22 +000011059DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011060dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011061if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011062then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011063else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11064echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11065 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011066fi
11067DLINCLDIR=${dldir}
11068LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011069else
Martin v. Löwis11437992002-04-12 09:54:03 +000011070 echo "$as_me:$LINENO: result: no" >&5
11071echo "${ECHO_T}no" >&6
11072fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011073
Martin v. Löwis11437992002-04-12 09:54:03 +000011074echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11075echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011076
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011077# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011078if test "${with_dl_dld+set}" = set; then
11079 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011080
11081echo "$as_me:$LINENO: result: $withval" >&5
11082echo "${ECHO_T}$withval" >&6
11083
11084cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011085#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011086_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011087
Guido van Rossume97ee181999-12-20 21:27:22 +000011088DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011089dldir=`echo "$withval" | sed 's/,.*//'`
11090dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011091if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011092then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011093else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11094echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11095 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011096fi
11097DLINCLDIR=${dldir}
11098LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011099else
Martin v. Löwis11437992002-04-12 09:54:03 +000011100 echo "$as_me:$LINENO: result: no" >&5
11101echo "${ECHO_T}no" >&6
11102fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011103
Guido van Rossume97ee181999-12-20 21:27:22 +000011104# the dlopen() function means we might want to use dynload_shlib.o. some
11105# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011106
Thomas Wouters3a584202000-08-05 23:28:51 +000011107for ac_func in dlopen
11108do
Martin v. Löwis11437992002-04-12 09:54:03 +000011109as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11110echo "$as_me:$LINENO: checking for $ac_func" >&5
11111echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11112if eval "test \"\${$as_ac_var+set}\" = set"; then
11113 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011114else
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 cat >conftest.$ac_ext <<_ACEOF
11116#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011117#include "confdefs.h"
11118/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011119 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011120#include <assert.h>
11121/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011122#ifdef __cplusplus
11123extern "C"
11124#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011125/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 builtin and then its argument prototype would still apply. */
11127char $ac_func ();
11128char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011129
Martin v. Löwis11437992002-04-12 09:54:03 +000011130#ifdef F77_DUMMY_MAIN
11131# ifdef __cplusplus
11132 extern "C"
11133# endif
11134 int F77_DUMMY_MAIN() { return 1; }
11135#endif
11136int
11137main ()
11138{
Guido van Rossume97ee181999-12-20 21:27:22 +000011139/* The GNU C library defines this for functions which it implements
11140 to always fail with ENOSYS. Some functions are actually named
11141 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011142#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011143choke me
11144#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011145f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011146#endif
11147
Martin v. Löwis11437992002-04-12 09:54:03 +000011148 ;
11149 return 0;
11150}
11151_ACEOF
11152rm -f conftest.$ac_objext conftest$ac_exeext
11153if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11154 (eval $ac_link) 2>&5
11155 ac_status=$?
11156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11157 (exit $ac_status); } &&
11158 { ac_try='test -s conftest$ac_exeext'
11159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11160 (eval $ac_try) 2>&5
11161 ac_status=$?
11162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11163 (exit $ac_status); }; }; then
11164 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011165else
Martin v. Löwis11437992002-04-12 09:54:03 +000011166 echo "$as_me: failed program was:" >&5
11167cat conftest.$ac_ext >&5
11168eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011169fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011170rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011171fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011172echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11173echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11174if test `eval echo '${'$as_ac_var'}'` = yes; then
11175 cat >>confdefs.h <<_ACEOF
11176#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11177_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011178
Guido van Rossume97ee181999-12-20 21:27:22 +000011179fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011180done
Guido van Rossume97ee181999-12-20 21:27:22 +000011181
Michael W. Hudson54241132001-12-07 15:38:26 +000011182
Guido van Rossume97ee181999-12-20 21:27:22 +000011183# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11184# loading of modules.
11185
Martin v. Löwis11437992002-04-12 09:54:03 +000011186echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11187echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011188if test -z "$DYNLOADFILE"
11189then
11190 case $ac_sys_system/$ac_sys_release in
11191 AIX*) DYNLOADFILE="dynload_aix.o";;
11192 BeOS*) DYNLOADFILE="dynload_beos.o";;
11193 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011194 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011195 *)
11196 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11197 # out any dynamic loading
11198 if test "$ac_cv_func_dlopen" = yes
11199 then DYNLOADFILE="dynload_shlib.o"
11200 else DYNLOADFILE="dynload_stub.o"
11201 fi
11202 ;;
11203 esac
11204fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011205echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11206echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011207if test "$DYNLOADFILE" != "dynload_stub.o"
11208then
Martin v. Löwis11437992002-04-12 09:54:03 +000011209
11210cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011211#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011212_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011213
11214fi
11215
Neil Schemenauer4e425612001-06-19 15:44:15 +000011216# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11217
Michael W. Hudson54241132001-12-07 15:38:26 +000011218
Martin v. Löwis11437992002-04-12 09:54:03 +000011219echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11220echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011221if test -z "$MACHDEP_OBJS"
11222then
Jack Jansene578a632001-08-15 01:27:14 +000011223 MACHDEP_OBJS=$extra_machdep_objs
11224else
11225 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011226fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011227echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11228echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011229
Guido van Rossum627b2d71993-12-24 10:39:16 +000011230# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011304
Fred Drake6b3cc522002-04-15 19:20:27 +000011305
Martin v. Löwis244edc82001-10-04 22:44:26 +000011306for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011307 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +000011308 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011309 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011310 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011311 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011312 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011313 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011314 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011315 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011316 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011317do
Martin v. Löwis11437992002-04-12 09:54:03 +000011318as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11319echo "$as_me:$LINENO: checking for $ac_func" >&5
11320echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11321if eval "test \"\${$as_ac_var+set}\" = set"; then
11322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011323else
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 cat >conftest.$ac_ext <<_ACEOF
11325#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011326#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011327/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011329#include <assert.h>
11330/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011331#ifdef __cplusplus
11332extern "C"
11333#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011334/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 builtin and then its argument prototype would still apply. */
11336char $ac_func ();
11337char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011338
Martin v. Löwis11437992002-04-12 09:54:03 +000011339#ifdef F77_DUMMY_MAIN
11340# ifdef __cplusplus
11341 extern "C"
11342# endif
11343 int F77_DUMMY_MAIN() { return 1; }
11344#endif
11345int
11346main ()
11347{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011348/* The GNU C library defines this for functions which it implements
11349 to always fail with ENOSYS. Some functions are actually named
11350 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011351#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011352choke me
11353#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011354f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011355#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011356
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 ;
11358 return 0;
11359}
11360_ACEOF
11361rm -f conftest.$ac_objext conftest$ac_exeext
11362if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11363 (eval $ac_link) 2>&5
11364 ac_status=$?
11365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11366 (exit $ac_status); } &&
11367 { ac_try='test -s conftest$ac_exeext'
11368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11369 (eval $ac_try) 2>&5
11370 ac_status=$?
11371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11372 (exit $ac_status); }; }; then
11373 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011374else
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 echo "$as_me: failed program was:" >&5
11376cat conftest.$ac_ext >&5
11377eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011378fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011379rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011380fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011381echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11382echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11383if test `eval echo '${'$as_ac_var'}'` = yes; then
11384 cat >>confdefs.h <<_ACEOF
11385#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11386_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011387
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011388fi
11389done
11390
Michael W. Hudson54241132001-12-07 15:38:26 +000011391
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011392# check for openpty and forkpty
11393
Martin v. Löwis11437992002-04-12 09:54:03 +000011394
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011395for ac_func in openpty
11396do
Martin v. Löwis11437992002-04-12 09:54:03 +000011397as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11398echo "$as_me:$LINENO: checking for $ac_func" >&5
11399echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11400if eval "test \"\${$as_ac_var+set}\" = set"; then
11401 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011402else
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 cat >conftest.$ac_ext <<_ACEOF
11404#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011405#include "confdefs.h"
11406/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011407 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011408#include <assert.h>
11409/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011410#ifdef __cplusplus
11411extern "C"
11412#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011413/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011414 builtin and then its argument prototype would still apply. */
11415char $ac_func ();
11416char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011417
Martin v. Löwis11437992002-04-12 09:54:03 +000011418#ifdef F77_DUMMY_MAIN
11419# ifdef __cplusplus
11420 extern "C"
11421# endif
11422 int F77_DUMMY_MAIN() { return 1; }
11423#endif
11424int
11425main ()
11426{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011427/* The GNU C library defines this for functions which it implements
11428 to always fail with ENOSYS. Some functions are actually named
11429 something starting with __ and the normal name is an alias. */
11430#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11431choke me
11432#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011433f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011434#endif
11435
Martin v. Löwis11437992002-04-12 09:54:03 +000011436 ;
11437 return 0;
11438}
11439_ACEOF
11440rm -f conftest.$ac_objext conftest$ac_exeext
11441if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11442 (eval $ac_link) 2>&5
11443 ac_status=$?
11444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11445 (exit $ac_status); } &&
11446 { ac_try='test -s conftest$ac_exeext'
11447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11448 (eval $ac_try) 2>&5
11449 ac_status=$?
11450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11451 (exit $ac_status); }; }; then
11452 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011453else
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 echo "$as_me: failed program was:" >&5
11455cat conftest.$ac_ext >&5
11456eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011457fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011458rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011459fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011460echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11461echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11462if test `eval echo '${'$as_ac_var'}'` = yes; then
11463 cat >>confdefs.h <<_ACEOF
11464#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11465_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011466
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011467else
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11469echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11470if test "${ac_cv_lib_util_openpty+set}" = set; then
11471 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011472else
Martin v. Löwis11437992002-04-12 09:54:03 +000011473 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011474LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011475cat >conftest.$ac_ext <<_ACEOF
11476#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011477#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011478
Fred Drake8cef4cf2000-06-28 16:40:38 +000011479/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011480#ifdef __cplusplus
11481extern "C"
11482#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011483/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 builtin and then its argument prototype would still apply. */
11485char openpty ();
11486#ifdef F77_DUMMY_MAIN
11487# ifdef __cplusplus
11488 extern "C"
11489# endif
11490 int F77_DUMMY_MAIN() { return 1; }
11491#endif
11492int
11493main ()
11494{
11495openpty ();
11496 ;
11497 return 0;
11498}
11499_ACEOF
11500rm -f conftest.$ac_objext conftest$ac_exeext
11501if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11502 (eval $ac_link) 2>&5
11503 ac_status=$?
11504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11505 (exit $ac_status); } &&
11506 { ac_try='test -s conftest$ac_exeext'
11507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11508 (eval $ac_try) 2>&5
11509 ac_status=$?
11510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11511 (exit $ac_status); }; }; then
11512 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011513else
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 echo "$as_me: failed program was:" >&5
11515cat conftest.$ac_ext >&5
11516ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011517fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011518rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11519LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011520fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011521echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11522echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11523if test $ac_cv_lib_util_openpty = yes; then
11524 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011525#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011526_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011527 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011528fi
11529
11530fi
11531done
11532
Martin v. Löwis11437992002-04-12 09:54:03 +000011533
Fred Drake8cef4cf2000-06-28 16:40:38 +000011534for ac_func in forkpty
11535do
Martin v. Löwis11437992002-04-12 09:54:03 +000011536as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11537echo "$as_me:$LINENO: checking for $ac_func" >&5
11538echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11539if eval "test \"\${$as_ac_var+set}\" = set"; then
11540 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011541else
Martin v. Löwis11437992002-04-12 09:54:03 +000011542 cat >conftest.$ac_ext <<_ACEOF
11543#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011544#include "confdefs.h"
11545/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011547#include <assert.h>
11548/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011549#ifdef __cplusplus
11550extern "C"
11551#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011552/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011553 builtin and then its argument prototype would still apply. */
11554char $ac_func ();
11555char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011556
Martin v. Löwis11437992002-04-12 09:54:03 +000011557#ifdef F77_DUMMY_MAIN
11558# ifdef __cplusplus
11559 extern "C"
11560# endif
11561 int F77_DUMMY_MAIN() { return 1; }
11562#endif
11563int
11564main ()
11565{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011566/* The GNU C library defines this for functions which it implements
11567 to always fail with ENOSYS. Some functions are actually named
11568 something starting with __ and the normal name is an alias. */
11569#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11570choke me
11571#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011572f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011573#endif
11574
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 ;
11576 return 0;
11577}
11578_ACEOF
11579rm -f conftest.$ac_objext conftest$ac_exeext
11580if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11581 (eval $ac_link) 2>&5
11582 ac_status=$?
11583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11584 (exit $ac_status); } &&
11585 { ac_try='test -s conftest$ac_exeext'
11586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11587 (eval $ac_try) 2>&5
11588 ac_status=$?
11589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11590 (exit $ac_status); }; }; then
11591 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011592else
Martin v. Löwis11437992002-04-12 09:54:03 +000011593 echo "$as_me: failed program was:" >&5
11594cat conftest.$ac_ext >&5
11595eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011596fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011597rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011598fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011599echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11600echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11601if test `eval echo '${'$as_ac_var'}'` = yes; then
11602 cat >>confdefs.h <<_ACEOF
11603#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11604_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011605
Fred Drake8cef4cf2000-06-28 16:40:38 +000011606else
Martin v. Löwis11437992002-04-12 09:54:03 +000011607 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11608echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11609if test "${ac_cv_lib_util_forkpty+set}" = set; then
11610 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011611else
Martin v. Löwis11437992002-04-12 09:54:03 +000011612 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011613LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011614cat >conftest.$ac_ext <<_ACEOF
11615#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011616#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011617
Fred Drake8cef4cf2000-06-28 16:40:38 +000011618/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011619#ifdef __cplusplus
11620extern "C"
11621#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011622/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011623 builtin and then its argument prototype would still apply. */
11624char forkpty ();
11625#ifdef F77_DUMMY_MAIN
11626# ifdef __cplusplus
11627 extern "C"
11628# endif
11629 int F77_DUMMY_MAIN() { return 1; }
11630#endif
11631int
11632main ()
11633{
11634forkpty ();
11635 ;
11636 return 0;
11637}
11638_ACEOF
11639rm -f conftest.$ac_objext conftest$ac_exeext
11640if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11641 (eval $ac_link) 2>&5
11642 ac_status=$?
11643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11644 (exit $ac_status); } &&
11645 { ac_try='test -s conftest$ac_exeext'
11646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11647 (eval $ac_try) 2>&5
11648 ac_status=$?
11649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11650 (exit $ac_status); }; }; then
11651 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011652else
Martin v. Löwis11437992002-04-12 09:54:03 +000011653 echo "$as_me: failed program was:" >&5
11654cat conftest.$ac_ext >&5
11655ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011656fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011657rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11658LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011660echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11661echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11662if test $ac_cv_lib_util_forkpty = yes; then
11663 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011664#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011665_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011666 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011667fi
11668
11669fi
11670done
11671
Jack Jansendd19cf82001-12-06 22:36:17 +000011672
Michael W. Hudson54241132001-12-07 15:38:26 +000011673# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011674
11675
11676
11677
11678
11679
Fred Drake8cef4cf2000-06-28 16:40:38 +000011680for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11681do
Martin v. Löwis11437992002-04-12 09:54:03 +000011682as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11683echo "$as_me:$LINENO: checking for $ac_func" >&5
11684echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11685if eval "test \"\${$as_ac_var+set}\" = set"; then
11686 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011687else
Martin v. Löwis11437992002-04-12 09:54:03 +000011688 cat >conftest.$ac_ext <<_ACEOF
11689#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011690#include "confdefs.h"
11691/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011692 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011693#include <assert.h>
11694/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011695#ifdef __cplusplus
11696extern "C"
11697#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011698/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011699 builtin and then its argument prototype would still apply. */
11700char $ac_func ();
11701char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011702
Martin v. Löwis11437992002-04-12 09:54:03 +000011703#ifdef F77_DUMMY_MAIN
11704# ifdef __cplusplus
11705 extern "C"
11706# endif
11707 int F77_DUMMY_MAIN() { return 1; }
11708#endif
11709int
11710main ()
11711{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011712/* The GNU C library defines this for functions which it implements
11713 to always fail with ENOSYS. Some functions are actually named
11714 something starting with __ and the normal name is an alias. */
11715#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11716choke me
11717#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011718f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011719#endif
11720
Martin v. Löwis11437992002-04-12 09:54:03 +000011721 ;
11722 return 0;
11723}
11724_ACEOF
11725rm -f conftest.$ac_objext conftest$ac_exeext
11726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11727 (eval $ac_link) 2>&5
11728 ac_status=$?
11729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11730 (exit $ac_status); } &&
11731 { ac_try='test -s conftest$ac_exeext'
11732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11733 (eval $ac_try) 2>&5
11734 ac_status=$?
11735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11736 (exit $ac_status); }; }; then
11737 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011738else
Martin v. Löwis11437992002-04-12 09:54:03 +000011739 echo "$as_me: failed program was:" >&5
11740cat conftest.$ac_ext >&5
11741eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011743rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011744fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011745echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11746echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11747if test `eval echo '${'$as_ac_var'}'` = yes; then
11748 cat >>confdefs.h <<_ACEOF
11749#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11750_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011751
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011752fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011753done
11754
Michael W. Hudson54241132001-12-07 15:38:26 +000011755
Martin v. Löwis11437992002-04-12 09:54:03 +000011756
11757
11758
11759
11760
Martin v. Löwis1142de32002-03-29 16:28:31 +000011761for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011762do
Martin v. Löwis11437992002-04-12 09:54:03 +000011763as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11764echo "$as_me:$LINENO: checking for $ac_func" >&5
11765echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11766if eval "test \"\${$as_ac_var+set}\" = set"; then
11767 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011768else
Martin v. Löwis11437992002-04-12 09:54:03 +000011769 cat >conftest.$ac_ext <<_ACEOF
11770#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011771#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011772/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011773 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011774#include <assert.h>
11775/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011776#ifdef __cplusplus
11777extern "C"
11778#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011779/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011780 builtin and then its argument prototype would still apply. */
11781char $ac_func ();
11782char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011783
Martin v. Löwis11437992002-04-12 09:54:03 +000011784#ifdef F77_DUMMY_MAIN
11785# ifdef __cplusplus
11786 extern "C"
11787# endif
11788 int F77_DUMMY_MAIN() { return 1; }
11789#endif
11790int
11791main ()
11792{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011793/* The GNU C library defines this for functions which it implements
11794 to always fail with ENOSYS. Some functions are actually named
11795 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011796#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011797choke me
11798#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011799f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011800#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011801
Martin v. Löwis11437992002-04-12 09:54:03 +000011802 ;
11803 return 0;
11804}
11805_ACEOF
11806rm -f conftest.$ac_objext conftest$ac_exeext
11807if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11808 (eval $ac_link) 2>&5
11809 ac_status=$?
11810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11811 (exit $ac_status); } &&
11812 { ac_try='test -s conftest$ac_exeext'
11813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11814 (eval $ac_try) 2>&5
11815 ac_status=$?
11816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11817 (exit $ac_status); }; }; then
11818 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011819else
Martin v. Löwis11437992002-04-12 09:54:03 +000011820 echo "$as_me: failed program was:" >&5
11821cat conftest.$ac_ext >&5
11822eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011823fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011824rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011825fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011826echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11827echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11828if test `eval echo '${'$as_ac_var'}'` = yes; then
11829 cat >>confdefs.h <<_ACEOF
11830#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11831_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011832
Martin v. Löwis1142de32002-03-29 16:28:31 +000011833else
Martin v. Löwis11437992002-04-12 09:54:03 +000011834 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011835fi
11836done
11837
11838
Martin v. Löwis11437992002-04-12 09:54:03 +000011839
Martin v. Löwis1142de32002-03-29 16:28:31 +000011840for ac_func in getpgrp
11841do
Martin v. Löwis11437992002-04-12 09:54:03 +000011842as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11843echo "$as_me:$LINENO: checking for $ac_func" >&5
11844echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11845if eval "test \"\${$as_ac_var+set}\" = set"; then
11846 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011847else
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 cat >conftest.$ac_ext <<_ACEOF
11849#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011850#include "confdefs.h"
11851/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011852 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011853#include <assert.h>
11854/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011855#ifdef __cplusplus
11856extern "C"
11857#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011858/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011859 builtin and then its argument prototype would still apply. */
11860char $ac_func ();
11861char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011862
Martin v. Löwis11437992002-04-12 09:54:03 +000011863#ifdef F77_DUMMY_MAIN
11864# ifdef __cplusplus
11865 extern "C"
11866# endif
11867 int F77_DUMMY_MAIN() { return 1; }
11868#endif
11869int
11870main ()
11871{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011872/* The GNU C library defines this for functions which it implements
11873 to always fail with ENOSYS. Some functions are actually named
11874 something starting with __ and the normal name is an alias. */
11875#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11876choke me
11877#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011878f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000011879#endif
11880
Martin v. Löwis11437992002-04-12 09:54:03 +000011881 ;
11882 return 0;
11883}
11884_ACEOF
11885rm -f conftest.$ac_objext conftest$ac_exeext
11886if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11887 (eval $ac_link) 2>&5
11888 ac_status=$?
11889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11890 (exit $ac_status); } &&
11891 { ac_try='test -s conftest$ac_exeext'
11892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11893 (eval $ac_try) 2>&5
11894 ac_status=$?
11895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11896 (exit $ac_status); }; }; then
11897 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011898else
Martin v. Löwis11437992002-04-12 09:54:03 +000011899 echo "$as_me: failed program was:" >&5
11900cat conftest.$ac_ext >&5
11901eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011902fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011903rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011904fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011905echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11906echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11907if test `eval echo '${'$as_ac_var'}'` = yes; then
11908 cat >>confdefs.h <<_ACEOF
11909#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11910_ACEOF
11911 cat >conftest.$ac_ext <<_ACEOF
11912#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011913#include "confdefs.h"
11914#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011915#ifdef F77_DUMMY_MAIN
11916# ifdef __cplusplus
11917 extern "C"
11918# endif
11919 int F77_DUMMY_MAIN() { return 1; }
11920#endif
11921int
11922main ()
11923{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011924getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011925 ;
11926 return 0;
11927}
11928_ACEOF
11929rm -f conftest.$ac_objext
11930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11931 (eval $ac_compile) 2>&5
11932 ac_status=$?
11933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11934 (exit $ac_status); } &&
11935 { ac_try='test -s conftest.$ac_objext'
11936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11937 (eval $ac_try) 2>&5
11938 ac_status=$?
11939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11940 (exit $ac_status); }; }; then
11941
11942cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011943#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011944_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011945
Martin v. Löwis11437992002-04-12 09:54:03 +000011946
Guido van Rossumf78abae1997-01-21 22:02:36 +000011947else
Martin v. Löwis11437992002-04-12 09:54:03 +000011948 echo "$as_me: failed program was:" >&5
11949cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000011950fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011951rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011952
Guido van Rossum627b2d71993-12-24 10:39:16 +000011953fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011954done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011955
Martin v. Löwis11437992002-04-12 09:54:03 +000011956
Thomas Wouters3a584202000-08-05 23:28:51 +000011957for ac_func in setpgrp
11958do
Martin v. Löwis11437992002-04-12 09:54:03 +000011959as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11960echo "$as_me:$LINENO: checking for $ac_func" >&5
11961echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11962if eval "test \"\${$as_ac_var+set}\" = set"; then
11963 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011964else
Martin v. Löwis11437992002-04-12 09:54:03 +000011965 cat >conftest.$ac_ext <<_ACEOF
11966#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011967#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011968/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011969 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011970#include <assert.h>
11971/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011972#ifdef __cplusplus
11973extern "C"
11974#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011975/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011976 builtin and then its argument prototype would still apply. */
11977char $ac_func ();
11978char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011979
Martin v. Löwis11437992002-04-12 09:54:03 +000011980#ifdef F77_DUMMY_MAIN
11981# ifdef __cplusplus
11982 extern "C"
11983# endif
11984 int F77_DUMMY_MAIN() { return 1; }
11985#endif
11986int
11987main ()
11988{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011989/* The GNU C library defines this for functions which it implements
11990 to always fail with ENOSYS. Some functions are actually named
11991 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011992#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011993choke me
11994#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011995f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011996#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011997
Martin v. Löwis11437992002-04-12 09:54:03 +000011998 ;
11999 return 0;
12000}
12001_ACEOF
12002rm -f conftest.$ac_objext conftest$ac_exeext
12003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12004 (eval $ac_link) 2>&5
12005 ac_status=$?
12006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12007 (exit $ac_status); } &&
12008 { ac_try='test -s conftest$ac_exeext'
12009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12010 (eval $ac_try) 2>&5
12011 ac_status=$?
12012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12013 (exit $ac_status); }; }; then
12014 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012015else
Martin v. Löwis11437992002-04-12 09:54:03 +000012016 echo "$as_me: failed program was:" >&5
12017cat conftest.$ac_ext >&5
12018eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012020rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012022echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12023echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12024if test `eval echo '${'$as_ac_var'}'` = yes; then
12025 cat >>confdefs.h <<_ACEOF
12026#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12027_ACEOF
12028 cat >conftest.$ac_ext <<_ACEOF
12029#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012030#include "confdefs.h"
12031#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012032#ifdef F77_DUMMY_MAIN
12033# ifdef __cplusplus
12034 extern "C"
12035# endif
12036 int F77_DUMMY_MAIN() { return 1; }
12037#endif
12038int
12039main ()
12040{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012041setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012042 ;
12043 return 0;
12044}
12045_ACEOF
12046rm -f conftest.$ac_objext
12047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12048 (eval $ac_compile) 2>&5
12049 ac_status=$?
12050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12051 (exit $ac_status); } &&
12052 { ac_try='test -s conftest.$ac_objext'
12053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12054 (eval $ac_try) 2>&5
12055 ac_status=$?
12056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12057 (exit $ac_status); }; }; then
12058
12059cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012060#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012061_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012062
Martin v. Löwis11437992002-04-12 09:54:03 +000012063
Guido van Rossumf78abae1997-01-21 22:02:36 +000012064else
Martin v. Löwis11437992002-04-12 09:54:03 +000012065 echo "$as_me: failed program was:" >&5
12066cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012068rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012069
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012070fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012071done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012072
Martin v. Löwis11437992002-04-12 09:54:03 +000012073
Thomas Wouters3a584202000-08-05 23:28:51 +000012074for ac_func in gettimeofday
12075do
Martin v. Löwis11437992002-04-12 09:54:03 +000012076as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12077echo "$as_me:$LINENO: checking for $ac_func" >&5
12078echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12079if eval "test \"\${$as_ac_var+set}\" = set"; then
12080 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012081else
Martin v. Löwis11437992002-04-12 09:54:03 +000012082 cat >conftest.$ac_ext <<_ACEOF
12083#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012084#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012085/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012086 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012087#include <assert.h>
12088/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012089#ifdef __cplusplus
12090extern "C"
12091#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012092/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012093 builtin and then its argument prototype would still apply. */
12094char $ac_func ();
12095char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012096
Martin v. Löwis11437992002-04-12 09:54:03 +000012097#ifdef F77_DUMMY_MAIN
12098# ifdef __cplusplus
12099 extern "C"
12100# endif
12101 int F77_DUMMY_MAIN() { return 1; }
12102#endif
12103int
12104main ()
12105{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012106/* The GNU C library defines this for functions which it implements
12107 to always fail with ENOSYS. Some functions are actually named
12108 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012109#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012110choke me
12111#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012112f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012113#endif
12114
Martin v. Löwis11437992002-04-12 09:54:03 +000012115 ;
12116 return 0;
12117}
12118_ACEOF
12119rm -f conftest.$ac_objext conftest$ac_exeext
12120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12121 (eval $ac_link) 2>&5
12122 ac_status=$?
12123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12124 (exit $ac_status); } &&
12125 { ac_try='test -s conftest$ac_exeext'
12126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12127 (eval $ac_try) 2>&5
12128 ac_status=$?
12129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12130 (exit $ac_status); }; }; then
12131 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012132else
Martin v. Löwis11437992002-04-12 09:54:03 +000012133 echo "$as_me: failed program was:" >&5
12134cat conftest.$ac_ext >&5
12135eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012137rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012138fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012139echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12140echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12141if test `eval echo '${'$as_ac_var'}'` = yes; then
12142 cat >>confdefs.h <<_ACEOF
12143#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12144_ACEOF
12145 cat >conftest.$ac_ext <<_ACEOF
12146#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012147#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012148#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012149#ifdef F77_DUMMY_MAIN
12150# ifdef __cplusplus
12151 extern "C"
12152# endif
12153 int F77_DUMMY_MAIN() { return 1; }
12154#endif
12155int
12156main ()
12157{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012158gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012159 ;
12160 return 0;
12161}
12162_ACEOF
12163rm -f conftest.$ac_objext
12164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12165 (eval $ac_compile) 2>&5
12166 ac_status=$?
12167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12168 (exit $ac_status); } &&
12169 { ac_try='test -s conftest.$ac_objext'
12170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12171 (eval $ac_try) 2>&5
12172 ac_status=$?
12173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12174 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012175 :
12176else
Martin v. Löwis11437992002-04-12 09:54:03 +000012177 echo "$as_me: failed program was:" >&5
12178cat conftest.$ac_ext >&5
12179
12180cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012181#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012182_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012183
Martin v. Löwis11437992002-04-12 09:54:03 +000012184
Guido van Rossum627b2d71993-12-24 10:39:16 +000012185fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012186rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012187
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012188fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012189done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012190
Michael W. Hudson54241132001-12-07 15:38:26 +000012191
12192
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012193# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012194# for [no]getaddrinfo in netdb.h.
12195echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12196echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12197cat >conftest.$ac_ext <<_ACEOF
12198#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012199#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012200
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012201#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012202#include <sys/socket.h>
12203#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012204#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012205
Martin v. Löwis11437992002-04-12 09:54:03 +000012206#ifdef F77_DUMMY_MAIN
12207# ifdef __cplusplus
12208 extern "C"
12209# endif
12210 int F77_DUMMY_MAIN() { return 1; }
12211#endif
12212int
12213main ()
12214{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012215
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012216getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012217
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 ;
12219 return 0;
12220}
12221_ACEOF
12222rm -f conftest.$ac_objext conftest$ac_exeext
12223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12224 (eval $ac_link) 2>&5
12225 ac_status=$?
12226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12227 (exit $ac_status); } &&
12228 { ac_try='test -s conftest$ac_exeext'
12229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12230 (eval $ac_try) 2>&5
12231 ac_status=$?
12232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12233 (exit $ac_status); }; }; then
12234
12235echo "$as_me:$LINENO: result: yes" >&5
12236echo "${ECHO_T}yes" >&6
12237echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12238echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012239if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012240 echo "$as_me:$LINENO: result: buggy" >&5
12241echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012242buggygetaddrinfo=yes
12243else
Martin v. Löwis11437992002-04-12 09:54:03 +000012244 cat >conftest.$ac_ext <<_ACEOF
12245#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012246#include "confdefs.h"
12247
12248#include <sys/types.h>
12249#include <netdb.h>
12250#include <string.h>
12251#include <sys/socket.h>
12252#include <netinet/in.h>
12253
12254main()
12255{
12256 int passive, gaierr, inet4 = 0, inet6 = 0;
12257 struct addrinfo hints, *ai, *aitop;
12258 char straddr[INET6_ADDRSTRLEN], strport[16];
12259
12260 for (passive = 0; passive <= 1; passive++) {
12261 memset(&hints, 0, sizeof(hints));
12262 hints.ai_family = AF_UNSPEC;
12263 hints.ai_flags = passive ? AI_PASSIVE : 0;
12264 hints.ai_socktype = SOCK_STREAM;
12265 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12266 (void)gai_strerror(gaierr);
12267 goto bad;
12268 }
12269 for (ai = aitop; ai; ai = ai->ai_next) {
12270 if (ai->ai_addr == NULL ||
12271 ai->ai_addrlen == 0 ||
12272 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12273 straddr, sizeof(straddr), strport, sizeof(strport),
12274 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12275 goto bad;
12276 }
12277 switch (ai->ai_family) {
12278 case AF_INET:
12279 if (strcmp(strport, "54321") != 0) {
12280 goto bad;
12281 }
12282 if (passive) {
12283 if (strcmp(straddr, "0.0.0.0") != 0) {
12284 goto bad;
12285 }
12286 } else {
12287 if (strcmp(straddr, "127.0.0.1") != 0) {
12288 goto bad;
12289 }
12290 }
12291 inet4++;
12292 break;
12293 case AF_INET6:
12294 if (strcmp(strport, "54321") != 0) {
12295 goto bad;
12296 }
12297 if (passive) {
12298 if (strcmp(straddr, "::") != 0) {
12299 goto bad;
12300 }
12301 } else {
12302 if (strcmp(straddr, "::1") != 0) {
12303 goto bad;
12304 }
12305 }
12306 inet6++;
12307 break;
12308 case AF_UNSPEC:
12309 goto bad;
12310 break;
12311 default:
12312 /* another family support? */
12313 break;
12314 }
12315 }
12316 }
12317
12318 if (!(inet4 == 0 || inet4 == 2))
12319 goto bad;
12320 if (!(inet6 == 0 || inet6 == 2))
12321 goto bad;
12322
12323 if (aitop)
12324 freeaddrinfo(aitop);
12325 exit(0);
12326
12327 bad:
12328 if (aitop)
12329 freeaddrinfo(aitop);
12330 exit(1);
12331}
12332
Martin v. Löwis11437992002-04-12 09:54:03 +000012333_ACEOF
12334rm -f conftest$ac_exeext
12335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12336 (eval $ac_link) 2>&5
12337 ac_status=$?
12338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12339 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12341 (eval $ac_try) 2>&5
12342 ac_status=$?
12343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12344 (exit $ac_status); }; }; then
12345 echo "$as_me:$LINENO: result: good" >&5
12346echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012347buggygetaddrinfo=no
12348else
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 echo "$as_me: program exited with status $ac_status" >&5
12350echo "$as_me: failed program was:" >&5
12351cat conftest.$ac_ext >&5
12352( exit $ac_status )
12353echo "$as_me:$LINENO: result: buggy" >&5
12354echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012355buggygetaddrinfo=yes
12356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012357rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012358fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012359else
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 echo "$as_me: failed program was:" >&5
12361cat conftest.$ac_ext >&5
12362
12363echo "$as_me:$LINENO: result: no" >&5
12364echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012365buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012366
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012368rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012369
12370if test "$buggygetaddrinfo" = "yes"; then
12371 if test "$ipv6" = "yes"; then
12372 echo 'Fatal: You must get working getaddrinfo() function.'
12373 echo ' or you can specify "--disable-ipv6"'.
12374 exit 1
12375 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012376else
Martin v. Löwis11437992002-04-12 09:54:03 +000012377
12378cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012379#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012380_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012381
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012383
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012384for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012385do
Martin v. Löwis11437992002-04-12 09:54:03 +000012386as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12387echo "$as_me:$LINENO: checking for $ac_func" >&5
12388echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12389if eval "test \"\${$as_ac_var+set}\" = set"; then
12390 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012391else
Martin v. Löwis11437992002-04-12 09:54:03 +000012392 cat >conftest.$ac_ext <<_ACEOF
12393#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012394#include "confdefs.h"
12395/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012396 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012397#include <assert.h>
12398/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012399#ifdef __cplusplus
12400extern "C"
12401#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012402/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012403 builtin and then its argument prototype would still apply. */
12404char $ac_func ();
12405char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012406
Martin v. Löwis11437992002-04-12 09:54:03 +000012407#ifdef F77_DUMMY_MAIN
12408# ifdef __cplusplus
12409 extern "C"
12410# endif
12411 int F77_DUMMY_MAIN() { return 1; }
12412#endif
12413int
12414main ()
12415{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012416/* The GNU C library defines this for functions which it implements
12417 to always fail with ENOSYS. Some functions are actually named
12418 something starting with __ and the normal name is an alias. */
12419#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12420choke me
12421#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012422f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012423#endif
12424
Martin v. Löwis11437992002-04-12 09:54:03 +000012425 ;
12426 return 0;
12427}
12428_ACEOF
12429rm -f conftest.$ac_objext conftest$ac_exeext
12430if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12431 (eval $ac_link) 2>&5
12432 ac_status=$?
12433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12434 (exit $ac_status); } &&
12435 { ac_try='test -s conftest$ac_exeext'
12436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12437 (eval $ac_try) 2>&5
12438 ac_status=$?
12439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12440 (exit $ac_status); }; }; then
12441 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012442else
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 echo "$as_me: failed program was:" >&5
12444cat conftest.$ac_ext >&5
12445eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012446fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012447rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012448fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012449echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12450echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12451if test `eval echo '${'$as_ac_var'}'` = yes; then
12452 cat >>confdefs.h <<_ACEOF
12453#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12454_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012455
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012456fi
12457done
12458
Michael W. Hudson54241132001-12-07 15:38:26 +000012459
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012460# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012461echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12462echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12463if test "${ac_cv_header_time+set}" = set; then
12464 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012465else
Martin v. Löwis11437992002-04-12 09:54:03 +000012466 cat >conftest.$ac_ext <<_ACEOF
12467#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012468#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012469#include <sys/types.h>
12470#include <sys/time.h>
12471#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012472
12473#ifdef F77_DUMMY_MAIN
12474# ifdef __cplusplus
12475 extern "C"
12476# endif
12477 int F77_DUMMY_MAIN() { return 1; }
12478#endif
12479int
12480main ()
12481{
12482if ((struct tm *) 0)
12483return 0;
12484 ;
12485 return 0;
12486}
12487_ACEOF
12488rm -f conftest.$ac_objext
12489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12490 (eval $ac_compile) 2>&5
12491 ac_status=$?
12492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12493 (exit $ac_status); } &&
12494 { ac_try='test -s conftest.$ac_objext'
12495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12496 (eval $ac_try) 2>&5
12497 ac_status=$?
12498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12499 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012500 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012501else
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 echo "$as_me: failed program was:" >&5
12503cat conftest.$ac_ext >&5
12504ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012505fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012506rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012507fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012508echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12509echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012510if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012511
12512cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012513#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012514_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012515
12516fi
12517
Martin v. Löwis11437992002-04-12 09:54:03 +000012518echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12519echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12520if test "${ac_cv_struct_tm+set}" = set; then
12521 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012522else
Martin v. Löwis11437992002-04-12 09:54:03 +000012523 cat >conftest.$ac_ext <<_ACEOF
12524#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012525#include "confdefs.h"
12526#include <sys/types.h>
12527#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012528
12529#ifdef F77_DUMMY_MAIN
12530# ifdef __cplusplus
12531 extern "C"
12532# endif
12533 int F77_DUMMY_MAIN() { return 1; }
12534#endif
12535int
12536main ()
12537{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012538struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012539 ;
12540 return 0;
12541}
12542_ACEOF
12543rm -f conftest.$ac_objext
12544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12545 (eval $ac_compile) 2>&5
12546 ac_status=$?
12547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12548 (exit $ac_status); } &&
12549 { ac_try='test -s conftest.$ac_objext'
12550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12551 (eval $ac_try) 2>&5
12552 ac_status=$?
12553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12554 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012555 ac_cv_struct_tm=time.h
12556else
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 echo "$as_me: failed program was:" >&5
12558cat conftest.$ac_ext >&5
12559ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012561rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012562fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012563echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12564echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012565if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012566
12567cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012568#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012569_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012570
12571fi
12572
Martin v. Löwis11437992002-04-12 09:54:03 +000012573echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12574echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12575if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12576 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012577else
Martin v. Löwis11437992002-04-12 09:54:03 +000012578 cat >conftest.$ac_ext <<_ACEOF
12579#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012580#include "confdefs.h"
12581#include <sys/types.h>
12582#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012583
12584
12585#ifdef F77_DUMMY_MAIN
12586# ifdef __cplusplus
12587 extern "C"
12588# endif
12589 int F77_DUMMY_MAIN() { return 1; }
12590#endif
12591int
12592main ()
12593{
12594static struct tm ac_aggr;
12595if (ac_aggr.tm_zone)
12596return 0;
12597 ;
12598 return 0;
12599}
12600_ACEOF
12601rm -f conftest.$ac_objext
12602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12603 (eval $ac_compile) 2>&5
12604 ac_status=$?
12605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12606 (exit $ac_status); } &&
12607 { ac_try='test -s conftest.$ac_objext'
12608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12609 (eval $ac_try) 2>&5
12610 ac_status=$?
12611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12612 (exit $ac_status); }; }; then
12613 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012614else
Martin v. Löwis11437992002-04-12 09:54:03 +000012615 echo "$as_me: failed program was:" >&5
12616cat conftest.$ac_ext >&5
12617ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012618fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012619rm -f conftest.$ac_objext conftest.$ac_ext
12620fi
12621echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12622echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12623if test $ac_cv_member_struct_tm_tm_zone = yes; then
12624
12625cat >>confdefs.h <<_ACEOF
12626#define HAVE_STRUCT_TM_TM_ZONE 1
12627_ACEOF
12628
12629
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012630fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012631
Martin v. Löwis11437992002-04-12 09:54:03 +000012632if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12633
12634cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012635#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012636_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637
12638else
Martin v. Löwis11437992002-04-12 09:54:03 +000012639 echo "$as_me:$LINENO: checking for tzname" >&5
12640echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12641if test "${ac_cv_var_tzname+set}" = set; then
12642 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012643else
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 cat >conftest.$ac_ext <<_ACEOF
12645#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012646#include "confdefs.h"
12647#include <time.h>
12648#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012649extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012651
12652#ifdef F77_DUMMY_MAIN
12653# ifdef __cplusplus
12654 extern "C"
12655# endif
12656 int F77_DUMMY_MAIN() { return 1; }
12657#endif
12658int
12659main ()
12660{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012661atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012662 ;
12663 return 0;
12664}
12665_ACEOF
12666rm -f conftest.$ac_objext conftest$ac_exeext
12667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12668 (eval $ac_link) 2>&5
12669 ac_status=$?
12670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12671 (exit $ac_status); } &&
12672 { ac_try='test -s conftest$ac_exeext'
12673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12674 (eval $ac_try) 2>&5
12675 ac_status=$?
12676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12677 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012678 ac_cv_var_tzname=yes
12679else
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 echo "$as_me: failed program was:" >&5
12681cat conftest.$ac_ext >&5
12682ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012683fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012684rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012685fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012686echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12687echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012688 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012689
12690cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012691#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012692_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012693
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012694 fi
12695fi
12696
Jack Jansendd19cf82001-12-06 22:36:17 +000012697
Martin v. Löwis11437992002-04-12 09:54:03 +000012698echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12699echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12700if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12701 echo $ECHO_N "(cached) $ECHO_C" >&6
12702else
12703 cat >conftest.$ac_ext <<_ACEOF
12704#line $LINENO "configure"
12705#include "confdefs.h"
12706$ac_includes_default
12707#ifdef F77_DUMMY_MAIN
12708# ifdef __cplusplus
12709 extern "C"
12710# endif
12711 int F77_DUMMY_MAIN() { return 1; }
12712#endif
12713int
12714main ()
12715{
12716static struct stat ac_aggr;
12717if (ac_aggr.st_rdev)
12718return 0;
12719 ;
12720 return 0;
12721}
12722_ACEOF
12723rm -f conftest.$ac_objext
12724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12725 (eval $ac_compile) 2>&5
12726 ac_status=$?
12727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12728 (exit $ac_status); } &&
12729 { ac_try='test -s conftest.$ac_objext'
12730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12731 (eval $ac_try) 2>&5
12732 ac_status=$?
12733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12734 (exit $ac_status); }; }; then
12735 ac_cv_member_struct_stat_st_rdev=yes
12736else
12737 echo "$as_me: failed program was:" >&5
12738cat conftest.$ac_ext >&5
12739ac_cv_member_struct_stat_st_rdev=no
12740fi
12741rm -f conftest.$ac_objext conftest.$ac_ext
12742fi
12743echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12744echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12745if test $ac_cv_member_struct_stat_st_rdev = yes; then
12746
12747cat >>confdefs.h <<_ACEOF
12748#define HAVE_STRUCT_STAT_ST_RDEV 1
12749_ACEOF
12750
12751
12752cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012753#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012754_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012755
12756fi
12757
Martin v. Löwis11437992002-04-12 09:54:03 +000012758
12759
12760echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12761echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12762if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12763 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012764else
Martin v. Löwis11437992002-04-12 09:54:03 +000012765 cat >conftest.$ac_ext <<_ACEOF
12766#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012767#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012768$ac_includes_default
12769#ifdef F77_DUMMY_MAIN
12770# ifdef __cplusplus
12771 extern "C"
12772# endif
12773 int F77_DUMMY_MAIN() { return 1; }
12774#endif
12775int
12776main ()
12777{
12778static struct stat ac_aggr;
12779if (ac_aggr.st_blksize)
12780return 0;
12781 ;
12782 return 0;
12783}
12784_ACEOF
12785rm -f conftest.$ac_objext
12786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12787 (eval $ac_compile) 2>&5
12788 ac_status=$?
12789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12790 (exit $ac_status); } &&
12791 { ac_try='test -s conftest.$ac_objext'
12792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12793 (eval $ac_try) 2>&5
12794 ac_status=$?
12795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12796 (exit $ac_status); }; }; then
12797 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012798else
Martin v. Löwis11437992002-04-12 09:54:03 +000012799 echo "$as_me: failed program was:" >&5
12800cat conftest.$ac_ext >&5
12801ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012802fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012803rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012804fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012805echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12806echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12807if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012808
Martin v. Löwis11437992002-04-12 09:54:03 +000012809cat >>confdefs.h <<_ACEOF
12810#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12811_ACEOF
12812
12813
12814cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012815#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012816_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012817
12818fi
12819
Martin v. Löwis11437992002-04-12 09:54:03 +000012820
12821echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12822echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12823if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12824 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012825else
Martin v. Löwis11437992002-04-12 09:54:03 +000012826 cat >conftest.$ac_ext <<_ACEOF
12827#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012828#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012829$ac_includes_default
12830#ifdef F77_DUMMY_MAIN
12831# ifdef __cplusplus
12832 extern "C"
12833# endif
12834 int F77_DUMMY_MAIN() { return 1; }
12835#endif
12836int
12837main ()
12838{
12839static struct stat ac_aggr;
12840if (ac_aggr.st_blocks)
12841return 0;
12842 ;
12843 return 0;
12844}
12845_ACEOF
12846rm -f conftest.$ac_objext
12847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12848 (eval $ac_compile) 2>&5
12849 ac_status=$?
12850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12851 (exit $ac_status); } &&
12852 { ac_try='test -s conftest.$ac_objext'
12853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12854 (eval $ac_try) 2>&5
12855 ac_status=$?
12856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12857 (exit $ac_status); }; }; then
12858 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012859else
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 echo "$as_me: failed program was:" >&5
12861cat conftest.$ac_ext >&5
12862ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012863fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012864rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012865fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012866echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12867echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12868if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012869
Martin v. Löwis11437992002-04-12 09:54:03 +000012870cat >>confdefs.h <<_ACEOF
12871#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12872_ACEOF
12873
12874
12875cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012876#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012877_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012878
12879else
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012881fi
12882
Michael W. Hudson54241132001-12-07 15:38:26 +000012883
Martin v. Löwis11437992002-04-12 09:54:03 +000012884
12885echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12886echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12887if test "${ac_cv_header_time_altzone+set}" = set; then
12888 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012889else
Martin v. Löwis11437992002-04-12 09:54:03 +000012890 cat >conftest.$ac_ext <<_ACEOF
12891#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012892#include "confdefs.h"
12893#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012894#ifdef F77_DUMMY_MAIN
12895# ifdef __cplusplus
12896 extern "C"
12897# endif
12898 int F77_DUMMY_MAIN() { return 1; }
12899#endif
12900int
12901main ()
12902{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012903return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 ;
12905 return 0;
12906}
12907_ACEOF
12908rm -f conftest.$ac_objext
12909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12910 (eval $ac_compile) 2>&5
12911 ac_status=$?
12912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12913 (exit $ac_status); } &&
12914 { ac_try='test -s conftest.$ac_objext'
12915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12916 (eval $ac_try) 2>&5
12917 ac_status=$?
12918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12919 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012920 ac_cv_header_time_altzone=yes
12921else
Martin v. Löwis11437992002-04-12 09:54:03 +000012922 echo "$as_me: failed program was:" >&5
12923cat conftest.$ac_ext >&5
12924ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012925fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012926rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012927fi
12928
Martin v. Löwis11437992002-04-12 09:54:03 +000012929echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
12930echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012931if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
12933cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012934#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012935_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012936
12937fi
12938
Guido van Rossumda88dad1995-01-26 00:46:29 +000012939was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012940echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
12941echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
12942cat >conftest.$ac_ext <<_ACEOF
12943#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012944#include "confdefs.h"
12945
12946#include <sys/types.h>
12947#include <sys/select.h>
12948#include <sys/time.h>
12949
Martin v. Löwis11437992002-04-12 09:54:03 +000012950#ifdef F77_DUMMY_MAIN
12951# ifdef __cplusplus
12952 extern "C"
12953# endif
12954 int F77_DUMMY_MAIN() { return 1; }
12955#endif
12956int
12957main ()
12958{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012959;
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 ;
12961 return 0;
12962}
12963_ACEOF
12964rm -f conftest.$ac_objext
12965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12966 (eval $ac_compile) 2>&5
12967 ac_status=$?
12968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12969 (exit $ac_status); } &&
12970 { ac_try='test -s conftest.$ac_objext'
12971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12972 (eval $ac_try) 2>&5
12973 ac_status=$?
12974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12975 (exit $ac_status); }; }; then
12976
12977
12978cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012979#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012980_ACEOF
12981
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012982 was_it_defined=yes
12983
Guido van Rossumf78abae1997-01-21 22:02:36 +000012984else
Martin v. Löwis11437992002-04-12 09:54:03 +000012985 echo "$as_me: failed program was:" >&5
12986cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012988rm -f conftest.$ac_objext conftest.$ac_ext
12989echo "$as_me:$LINENO: result: $was_it_defined" >&5
12990echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000012991
Martin v. Löwis11437992002-04-12 09:54:03 +000012992echo "$as_me:$LINENO: checking for addrinfo" >&5
12993echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
12994if test "${ac_cv_struct_addrinfo+set}" = set; then
12995 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012996else
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 cat >conftest.$ac_ext <<_ACEOF
12998#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012999#include "confdefs.h"
13000
13001# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013002#ifdef F77_DUMMY_MAIN
13003# ifdef __cplusplus
13004 extern "C"
13005# endif
13006 int F77_DUMMY_MAIN() { return 1; }
13007#endif
13008int
13009main ()
13010{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013011struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 ;
13013 return 0;
13014}
13015_ACEOF
13016rm -f conftest.$ac_objext
13017if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13018 (eval $ac_compile) 2>&5
13019 ac_status=$?
13020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13021 (exit $ac_status); } &&
13022 { ac_try='test -s conftest.$ac_objext'
13023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13024 (eval $ac_try) 2>&5
13025 ac_status=$?
13026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13027 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013028 ac_cv_struct_addrinfo=yes
13029else
Martin v. Löwis11437992002-04-12 09:54:03 +000013030 echo "$as_me: failed program was:" >&5
13031cat conftest.$ac_ext >&5
13032ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013033fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013034rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013035fi
13036
Martin v. Löwis11437992002-04-12 09:54:03 +000013037echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13038echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013039if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013040
13041cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013042#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013043_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013044
13045fi
13046
Martin v. Löwis11437992002-04-12 09:54:03 +000013047echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13048echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13049if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13050 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013051else
Martin v. Löwis11437992002-04-12 09:54:03 +000013052 cat >conftest.$ac_ext <<_ACEOF
13053#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013054#include "confdefs.h"
13055
13056# include <sys/types.h>
13057# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013058#ifdef F77_DUMMY_MAIN
13059# ifdef __cplusplus
13060 extern "C"
13061# endif
13062 int F77_DUMMY_MAIN() { return 1; }
13063#endif
13064int
13065main ()
13066{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013067struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013068 ;
13069 return 0;
13070}
13071_ACEOF
13072rm -f conftest.$ac_objext
13073if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13074 (eval $ac_compile) 2>&5
13075 ac_status=$?
13076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13077 (exit $ac_status); } &&
13078 { ac_try='test -s conftest.$ac_objext'
13079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13080 (eval $ac_try) 2>&5
13081 ac_status=$?
13082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13083 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013084 ac_cv_struct_sockaddr_storage=yes
13085else
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 echo "$as_me: failed program was:" >&5
13087cat conftest.$ac_ext >&5
13088ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013089fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013090rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013091fi
13092
Martin v. Löwis11437992002-04-12 09:54:03 +000013093echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13094echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013095if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013096
13097cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013098#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013099_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013100
13101fi
13102
Guido van Rossum627b2d71993-12-24 10:39:16 +000013103# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013104
Michael W. Hudson54241132001-12-07 15:38:26 +000013105
Martin v. Löwis11437992002-04-12 09:54:03 +000013106echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13107echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13108if test "${ac_cv_c_char_unsigned+set}" = set; then
13109 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013110else
Martin v. Löwis11437992002-04-12 09:54:03 +000013111 cat >conftest.$ac_ext <<_ACEOF
13112#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013113#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013114$ac_includes_default
13115#ifdef F77_DUMMY_MAIN
13116# ifdef __cplusplus
13117 extern "C"
13118# endif
13119 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013121int
13122main ()
13123{
13124static int test_array [1 - 2 * !(((char) -1) < 0)];
13125test_array [0] = 0
13126
13127 ;
13128 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013129}
Martin v. Löwis11437992002-04-12 09:54:03 +000013130_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
Michael W. Hudson54241132001-12-07 15:38:26 +000013143 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013144else
13145 echo "$as_me: failed program was:" >&5
13146cat conftest.$ac_ext >&5
13147ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013148fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013149rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013150fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013151echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13152echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013153if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013154 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013155#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013156_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013157
13158fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013159
Martin v. Löwis11437992002-04-12 09:54:03 +000013160echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13161echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13162if test "${ac_cv_prog_cc_stdc+set}" = set; then
13163 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013164else
Martin v. Löwis11437992002-04-12 09:54:03 +000013165 ac_cv_prog_cc_stdc=no
13166ac_save_CC=$CC
13167cat >conftest.$ac_ext <<_ACEOF
13168#line $LINENO "configure"
13169#include "confdefs.h"
13170#include <stdarg.h>
13171#include <stdio.h>
13172#include <sys/types.h>
13173#include <sys/stat.h>
13174/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13175struct buf { int x; };
13176FILE * (*rcsopen) (struct buf *, struct stat *, int);
13177static char *e (p, i)
13178 char **p;
13179 int i;
13180{
13181 return p[i];
13182}
13183static char *f (char * (*g) (char **, int), char **p, ...)
13184{
13185 char *s;
13186 va_list v;
13187 va_start (v,p);
13188 s = g (p, va_arg (v,int));
13189 va_end (v);
13190 return s;
13191}
13192int test (int i, double x);
13193struct s1 {int (*f) (int a);};
13194struct s2 {int (*f) (double a);};
13195int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13196int argc;
13197char **argv;
13198#ifdef F77_DUMMY_MAIN
13199# ifdef __cplusplus
13200 extern "C"
13201# endif
13202 int F77_DUMMY_MAIN() { return 1; }
13203#endif
13204int
13205main ()
13206{
13207return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13208 ;
13209 return 0;
13210}
13211_ACEOF
13212# Don't try gcc -ansi; that turns off useful extensions and
13213# breaks some systems' header files.
13214# AIX -qlanglvl=ansi
13215# Ultrix and OSF/1 -std1
13216# HP-UX 10.20 and later -Ae
13217# HP-UX older versions -Aa -D_HPUX_SOURCE
13218# SVR4 -Xc -D__EXTENSIONS__
13219for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13220do
13221 CC="$ac_save_CC $ac_arg"
13222 rm -f conftest.$ac_objext
13223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13224 (eval $ac_compile) 2>&5
13225 ac_status=$?
13226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13227 (exit $ac_status); } &&
13228 { ac_try='test -s conftest.$ac_objext'
13229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13230 (eval $ac_try) 2>&5
13231 ac_status=$?
13232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13233 (exit $ac_status); }; }; then
13234 ac_cv_prog_cc_stdc=$ac_arg
13235break
13236else
13237 echo "$as_me: failed program was:" >&5
13238cat conftest.$ac_ext >&5
13239fi
13240rm -f conftest.$ac_objext
13241done
13242rm -f conftest.$ac_ext conftest.$ac_objext
13243CC=$ac_save_CC
13244
13245fi
13246
13247case "x$ac_cv_prog_cc_stdc" in
13248 x|xno)
13249 echo "$as_me:$LINENO: result: none needed" >&5
13250echo "${ECHO_T}none needed" >&6 ;;
13251 *)
13252 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13253echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13254 CC="$CC $ac_cv_prog_cc_stdc" ;;
13255esac
13256
13257echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13258echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13259if test "${ac_cv_c_const+set}" = set; then
13260 echo $ECHO_N "(cached) $ECHO_C" >&6
13261else
13262 cat >conftest.$ac_ext <<_ACEOF
13263#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013264#include "confdefs.h"
13265
Martin v. Löwis11437992002-04-12 09:54:03 +000013266#ifdef F77_DUMMY_MAIN
13267# ifdef __cplusplus
13268 extern "C"
13269# endif
13270 int F77_DUMMY_MAIN() { return 1; }
13271#endif
13272int
13273main ()
13274{
13275/* FIXME: Include the comments suggested by Paul. */
13276#ifndef __cplusplus
13277 /* Ultrix mips cc rejects this. */
13278 typedef int charset[2];
13279 const charset x;
13280 /* SunOS 4.1.1 cc rejects this. */
13281 char const *const *ccp;
13282 char **p;
13283 /* NEC SVR4.0.2 mips cc rejects this. */
13284 struct point {int x, y;};
13285 static struct point const zero = {0,0};
13286 /* AIX XL C 1.02.0.0 rejects this.
13287 It does not let you subtract one const X* pointer from another in
13288 an arm of an if-expression whose if-part is not a constant
13289 expression */
13290 const char *g = "string";
13291 ccp = &g + (g ? g-g : 0);
13292 /* HPUX 7.0 cc rejects these. */
13293 ++ccp;
13294 p = (char**) ccp;
13295 ccp = (char const *const *) p;
13296 { /* SCO 3.2v4 cc rejects this. */
13297 char *t;
13298 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013299
Martin v. Löwis11437992002-04-12 09:54:03 +000013300 *t++ = 0;
13301 }
13302 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13303 int x[] = {25, 17};
13304 const int *foo = &x[0];
13305 ++foo;
13306 }
13307 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13308 typedef const int *iptr;
13309 iptr p = 0;
13310 ++p;
13311 }
13312 { /* AIX XL C 1.02.0.0 rejects this saying
13313 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13314 struct s { int j; const int *ap[3]; };
13315 struct s *b; b->j = 5;
13316 }
13317 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13318 const int foo = 10;
13319 }
13320#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013321
Martin v. Löwis11437992002-04-12 09:54:03 +000013322 ;
13323 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013324}
Martin v. Löwis11437992002-04-12 09:54:03 +000013325_ACEOF
13326rm -f conftest.$ac_objext
13327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13328 (eval $ac_compile) 2>&5
13329 ac_status=$?
13330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13331 (exit $ac_status); } &&
13332 { ac_try='test -s conftest.$ac_objext'
13333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13334 (eval $ac_try) 2>&5
13335 ac_status=$?
13336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13337 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338 ac_cv_c_const=yes
13339else
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 echo "$as_me: failed program was:" >&5
13341cat conftest.$ac_ext >&5
13342ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013344rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013346echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13347echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013348if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
13350cat >>confdefs.h <<\_ACEOF
13351#define const
13352_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013353
13354fi
13355
Michael W. Hudson54241132001-12-07 15:38:26 +000013356
Guido van Rossumda88dad1995-01-26 00:46:29 +000013357works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013358echo "$as_me:$LINENO: checking for working volatile" >&5
13359echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13360cat >conftest.$ac_ext <<_ACEOF
13361#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013362#include "confdefs.h"
13363
Martin v. Löwis11437992002-04-12 09:54:03 +000013364#ifdef F77_DUMMY_MAIN
13365# ifdef __cplusplus
13366 extern "C"
13367# endif
13368 int F77_DUMMY_MAIN() { return 1; }
13369#endif
13370int
13371main ()
13372{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013373volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013374 ;
13375 return 0;
13376}
13377_ACEOF
13378rm -f conftest.$ac_objext
13379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13380 (eval $ac_compile) 2>&5
13381 ac_status=$?
13382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13383 (exit $ac_status); } &&
13384 { ac_try='test -s conftest.$ac_objext'
13385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13386 (eval $ac_try) 2>&5
13387 ac_status=$?
13388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13389 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013390 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013391else
Martin v. Löwis11437992002-04-12 09:54:03 +000013392 echo "$as_me: failed program was:" >&5
13393cat conftest.$ac_ext >&5
13394
13395cat >>confdefs.h <<\_ACEOF
13396#define volatile
13397_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013398
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013399
Guido van Rossum627b2d71993-12-24 10:39:16 +000013400fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013401rm -f conftest.$ac_objext conftest.$ac_ext
13402echo "$as_me:$LINENO: result: $works" >&5
13403echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013404
Guido van Rossumda88dad1995-01-26 00:46:29 +000013405works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013406echo "$as_me:$LINENO: checking for working signed char" >&5
13407echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13408cat >conftest.$ac_ext <<_ACEOF
13409#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013410#include "confdefs.h"
13411
Martin v. Löwis11437992002-04-12 09:54:03 +000013412#ifdef F77_DUMMY_MAIN
13413# ifdef __cplusplus
13414 extern "C"
13415# endif
13416 int F77_DUMMY_MAIN() { return 1; }
13417#endif
13418int
13419main ()
13420{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013421signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 ;
13423 return 0;
13424}
13425_ACEOF
13426rm -f conftest.$ac_objext
13427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13428 (eval $ac_compile) 2>&5
13429 ac_status=$?
13430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13431 (exit $ac_status); } &&
13432 { ac_try='test -s conftest.$ac_objext'
13433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13434 (eval $ac_try) 2>&5
13435 ac_status=$?
13436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13437 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013438 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013439else
Martin v. Löwis11437992002-04-12 09:54:03 +000013440 echo "$as_me: failed program was:" >&5
13441cat conftest.$ac_ext >&5
13442
13443cat >>confdefs.h <<\_ACEOF
13444#define signed
13445_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013446
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013447
Guido van Rossum7f43da71994-08-01 12:15:30 +000013448fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013449rm -f conftest.$ac_objext conftest.$ac_ext
13450echo "$as_me:$LINENO: result: $works" >&5
13451echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013452
Guido van Rossumda88dad1995-01-26 00:46:29 +000013453have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013454echo "$as_me:$LINENO: checking for prototypes" >&5
13455echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13456cat >conftest.$ac_ext <<_ACEOF
13457#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013458#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013459int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013460#ifdef F77_DUMMY_MAIN
13461# ifdef __cplusplus
13462 extern "C"
13463# endif
13464 int F77_DUMMY_MAIN() { return 1; }
13465#endif
13466int
13467main ()
13468{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013469return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013470 ;
13471 return 0;
13472}
13473_ACEOF
13474rm -f conftest.$ac_objext
13475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13476 (eval $ac_compile) 2>&5
13477 ac_status=$?
13478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13479 (exit $ac_status); } &&
13480 { ac_try='test -s conftest.$ac_objext'
13481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13482 (eval $ac_try) 2>&5
13483 ac_status=$?
13484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13485 (exit $ac_status); }; }; then
13486
13487
13488cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013489#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013490_ACEOF
13491
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013492 have_prototypes=yes
13493
Guido van Rossumf78abae1997-01-21 22:02:36 +000013494else
Martin v. Löwis11437992002-04-12 09:54:03 +000013495 echo "$as_me: failed program was:" >&5
13496cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013497fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013498rm -f conftest.$ac_objext conftest.$ac_ext
13499echo "$as_me:$LINENO: result: $have_prototypes" >&5
13500echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013501
Guido van Rossumda88dad1995-01-26 00:46:29 +000013502works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013503echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13504echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13505cat >conftest.$ac_ext <<_ACEOF
13506#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013507#include "confdefs.h"
13508
13509#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013510int foo(int x, ...) {
13511 va_list va;
13512 va_start(va, x);
13513 va_arg(va, int);
13514 va_arg(va, char *);
13515 va_arg(va, double);
13516 return 0;
13517}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013518
Martin v. Löwis11437992002-04-12 09:54:03 +000013519#ifdef F77_DUMMY_MAIN
13520# ifdef __cplusplus
13521 extern "C"
13522# endif
13523 int F77_DUMMY_MAIN() { return 1; }
13524#endif
13525int
13526main ()
13527{
Guido van Rossum90eea071996-08-30 20:58:57 +000013528return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 ;
13530 return 0;
13531}
13532_ACEOF
13533rm -f conftest.$ac_objext
13534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13535 (eval $ac_compile) 2>&5
13536 ac_status=$?
13537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13538 (exit $ac_status); } &&
13539 { ac_try='test -s conftest.$ac_objext'
13540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13541 (eval $ac_try) 2>&5
13542 ac_status=$?
13543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13544 (exit $ac_status); }; }; then
13545
13546
13547cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013548#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013549_ACEOF
13550
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013551 works=yes
13552
Guido van Rossumf78abae1997-01-21 22:02:36 +000013553else
Martin v. Löwis11437992002-04-12 09:54:03 +000013554 echo "$as_me: failed program was:" >&5
13555cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013556fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013557rm -f conftest.$ac_objext conftest.$ac_ext
13558echo "$as_me:$LINENO: result: $works" >&5
13559echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013560
Guido van Rossumda88dad1995-01-26 00:46:29 +000013561if test "$have_prototypes" = yes; then
13562bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013563echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13564echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13565cat >conftest.$ac_ext <<_ACEOF
13566#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013567#include "confdefs.h"
13568#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013569#ifdef F77_DUMMY_MAIN
13570# ifdef __cplusplus
13571 extern "C"
13572# endif
13573 int F77_DUMMY_MAIN() { return 1; }
13574#endif
13575int
13576main ()
13577{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013578char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013579 ;
13580 return 0;
13581}
13582_ACEOF
13583rm -f conftest.$ac_objext
13584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13585 (eval $ac_compile) 2>&5
13586 ac_status=$?
13587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13588 (exit $ac_status); } &&
13589 { ac_try='test -s conftest.$ac_objext'
13590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13591 (eval $ac_try) 2>&5
13592 ac_status=$?
13593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13594 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013595 :
13596else
Martin v. Löwis11437992002-04-12 09:54:03 +000013597 echo "$as_me: failed program was:" >&5
13598cat conftest.$ac_ext >&5
13599
13600cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013601#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013602_ACEOF
13603
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013604 bad_prototypes=yes
13605
Guido van Rossum627b2d71993-12-24 10:39:16 +000013606fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013607rm -f conftest.$ac_objext conftest.$ac_ext
13608echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13609echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013610fi
13611
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013612# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013613echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13614echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13615cat >conftest.$ac_ext <<_ACEOF
13616#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013617#include "confdefs.h"
13618#include <sys/types.h>
13619#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013620#ifdef F77_DUMMY_MAIN
13621# ifdef __cplusplus
13622 extern "C"
13623# endif
13624 int F77_DUMMY_MAIN() { return 1; }
13625#endif
13626int
13627main ()
13628{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013629struct sockaddr x;
13630x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013631 ;
13632 return 0;
13633}
13634_ACEOF
13635rm -f conftest.$ac_objext
13636if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13637 (eval $ac_compile) 2>&5
13638 ac_status=$?
13639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13640 (exit $ac_status); } &&
13641 { ac_try='test -s conftest.$ac_objext'
13642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13643 (eval $ac_try) 2>&5
13644 ac_status=$?
13645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13646 (exit $ac_status); }; }; then
13647 echo "$as_me:$LINENO: result: yes" >&5
13648echo "${ECHO_T}yes" >&6
13649
13650cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013651#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013652_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013653
13654else
Martin v. Löwis11437992002-04-12 09:54:03 +000013655 echo "$as_me: failed program was:" >&5
13656cat conftest.$ac_ext >&5
13657echo "$as_me:$LINENO: result: no" >&5
13658echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013660rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013661
Martin v. Löwis11437992002-04-12 09:54:03 +000013662echo "$as_me:$LINENO: checking for bad static forward" >&5
13663echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13664if test "${ac_cv_bad_static_forward+set}" = set; then
13665 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013666else
13667 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013668 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013669else
Martin v. Löwis11437992002-04-12 09:54:03 +000013670 cat >conftest.$ac_ext <<_ACEOF
13671#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013672#include "confdefs.h"
13673
13674struct s { int a; int b; };
13675static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013676int foobar() {
13677 static int random;
13678 random = (int) &foo;
13679 return random;
13680}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013681static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013682main() {
13683 exit(!((int)&foo == foobar()));
13684}
Martin v. Löwis11437992002-04-12 09:54:03 +000013685_ACEOF
13686rm -f conftest$ac_exeext
13687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13688 (eval $ac_link) 2>&5
13689 ac_status=$?
13690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13691 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13693 (eval $ac_try) 2>&5
13694 ac_status=$?
13695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13696 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013697 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013698else
Martin v. Löwis11437992002-04-12 09:54:03 +000013699 echo "$as_me: program exited with status $ac_status" >&5
13700echo "$as_me: failed program was:" >&5
13701cat conftest.$ac_ext >&5
13702( exit $ac_status )
13703ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013704fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013705rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13706fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013707fi
13708
Martin v. Löwis11437992002-04-12 09:54:03 +000013709echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13710echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013711if test "$ac_cv_bad_static_forward" = yes
13712then
Martin v. Löwis11437992002-04-12 09:54:03 +000013713
13714cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013715#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013716_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013717
13718fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013719
Guido van Rossumda88dad1995-01-26 00:46:29 +000013720va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013721echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13722echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13723cat >conftest.$ac_ext <<_ACEOF
13724#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013725#include "confdefs.h"
13726
13727#ifdef HAVE_STDARG_PROTOTYPES
13728#include <stdarg.h>
13729#else
13730#include <varargs.h>
13731#endif
13732
Martin v. Löwis11437992002-04-12 09:54:03 +000013733#ifdef F77_DUMMY_MAIN
13734# ifdef __cplusplus
13735 extern "C"
13736# endif
13737 int F77_DUMMY_MAIN() { return 1; }
13738#endif
13739int
13740main ()
13741{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013742va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 ;
13744 return 0;
13745}
13746_ACEOF
13747rm -f conftest.$ac_objext
13748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13749 (eval $ac_compile) 2>&5
13750 ac_status=$?
13751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13752 (exit $ac_status); } &&
13753 { ac_try='test -s conftest.$ac_objext'
13754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13755 (eval $ac_try) 2>&5
13756 ac_status=$?
13757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13758 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013759 :
13760else
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 echo "$as_me: failed program was:" >&5
13762cat conftest.$ac_ext >&5
13763
13764
13765cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013766#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013767_ACEOF
13768
Guido van Rossumda88dad1995-01-26 00:46:29 +000013769 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013770
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013771fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013772rm -f conftest.$ac_objext conftest.$ac_ext
13773echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13774echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013775
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013776# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013777
13778
13779
13780echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13781echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13782if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013784else
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 cat >conftest.$ac_ext <<_ACEOF
13786#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013787#include "confdefs.h"
13788/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013789 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013790#include <assert.h>
13791/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013792#ifdef __cplusplus
13793extern "C"
13794#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013795/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 builtin and then its argument prototype would still apply. */
13797char gethostbyname_r ();
13798char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013799
Martin v. Löwis11437992002-04-12 09:54:03 +000013800#ifdef F77_DUMMY_MAIN
13801# ifdef __cplusplus
13802 extern "C"
13803# endif
13804 int F77_DUMMY_MAIN() { return 1; }
13805#endif
13806int
13807main ()
13808{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013809/* The GNU C library defines this for functions which it implements
13810 to always fail with ENOSYS. Some functions are actually named
13811 something starting with __ and the normal name is an alias. */
13812#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13813choke me
13814#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013815f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013816#endif
13817
Martin v. Löwis11437992002-04-12 09:54:03 +000013818 ;
13819 return 0;
13820}
13821_ACEOF
13822rm -f conftest.$ac_objext conftest$ac_exeext
13823if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13824 (eval $ac_link) 2>&5
13825 ac_status=$?
13826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13827 (exit $ac_status); } &&
13828 { ac_try='test -s conftest$ac_exeext'
13829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13830 (eval $ac_try) 2>&5
13831 ac_status=$?
13832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13833 (exit $ac_status); }; }; then
13834 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013835else
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 echo "$as_me: failed program was:" >&5
13837cat conftest.$ac_ext >&5
13838ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013839fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013840rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013841fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013842echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13843echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13844if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013845
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013847#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013848_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013849
Martin v. Löwis11437992002-04-12 09:54:03 +000013850 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13851echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013852 OLD_CFLAGS=$CFLAGS
13853 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013854 cat >conftest.$ac_ext <<_ACEOF
13855#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013856#include "confdefs.h"
13857
13858# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013859
13860#ifdef F77_DUMMY_MAIN
13861# ifdef __cplusplus
13862 extern "C"
13863# endif
13864 int F77_DUMMY_MAIN() { return 1; }
13865#endif
13866int
13867main ()
13868{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013869
13870 char *name;
13871 struct hostent *he, *res;
13872 char buffer[2048];
13873 int buflen = 2048;
13874 int h_errnop;
13875
13876 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013877
13878 ;
13879 return 0;
13880}
13881_ACEOF
13882rm -f conftest.$ac_objext
13883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13884 (eval $ac_compile) 2>&5
13885 ac_status=$?
13886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13887 (exit $ac_status); } &&
13888 { ac_try='test -s conftest.$ac_objext'
13889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13890 (eval $ac_try) 2>&5
13891 ac_status=$?
13892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13893 (exit $ac_status); }; }; then
13894
13895 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013896#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013897_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013898
Martin v. Löwis11437992002-04-12 09:54:03 +000013899
13900cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013901#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013902_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013903
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 echo "$as_me:$LINENO: result: yes" >&5
13905echo "${ECHO_T}yes" >&6
13906
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013907else
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 echo "$as_me: failed program was:" >&5
13909cat conftest.$ac_ext >&5
13910
13911 echo "$as_me:$LINENO: result: no" >&5
13912echo "${ECHO_T}no" >&6
13913 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13914echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13915 cat >conftest.$ac_ext <<_ACEOF
13916#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013917#include "confdefs.h"
13918
13919# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013920
13921#ifdef F77_DUMMY_MAIN
13922# ifdef __cplusplus
13923 extern "C"
13924# endif
13925 int F77_DUMMY_MAIN() { return 1; }
13926#endif
13927int
13928main ()
13929{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013930
13931 char *name;
13932 struct hostent *he;
13933 char buffer[2048];
13934 int buflen = 2048;
13935 int h_errnop;
13936
13937 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013938
13939 ;
13940 return 0;
13941}
13942_ACEOF
13943rm -f conftest.$ac_objext
13944if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13945 (eval $ac_compile) 2>&5
13946 ac_status=$?
13947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13948 (exit $ac_status); } &&
13949 { ac_try='test -s conftest.$ac_objext'
13950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13951 (eval $ac_try) 2>&5
13952 ac_status=$?
13953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13954 (exit $ac_status); }; }; then
13955
13956 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013957#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013958_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013959
Martin v. Löwis11437992002-04-12 09:54:03 +000013960
13961cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013962#define HAVE_GETHOSTBYNAME_R_5_ARG 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: result: yes" >&5
13966echo "${ECHO_T}yes" >&6
13967
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013968else
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 echo "$as_me: failed program was:" >&5
13970cat conftest.$ac_ext >&5
13971
13972 echo "$as_me:$LINENO: result: no" >&5
13973echo "${ECHO_T}no" >&6
13974 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
13975echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
13976 cat >conftest.$ac_ext <<_ACEOF
13977#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013978#include "confdefs.h"
13979
13980# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013981
13982#ifdef F77_DUMMY_MAIN
13983# ifdef __cplusplus
13984 extern "C"
13985# endif
13986 int F77_DUMMY_MAIN() { return 1; }
13987#endif
13988int
13989main ()
13990{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013991
13992 char *name;
13993 struct hostent *he;
13994 struct hostent_data data;
13995
13996 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000013997
13998 ;
13999 return 0;
14000}
14001_ACEOF
14002rm -f conftest.$ac_objext
14003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14004 (eval $ac_compile) 2>&5
14005 ac_status=$?
14006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14007 (exit $ac_status); } &&
14008 { ac_try='test -s conftest.$ac_objext'
14009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14010 (eval $ac_try) 2>&5
14011 ac_status=$?
14012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14013 (exit $ac_status); }; }; then
14014
14015 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014016#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014017_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014018
Martin v. Löwis11437992002-04-12 09:54:03 +000014019
14020cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014021#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014022_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014023
Martin v. Löwis11437992002-04-12 09:54:03 +000014024 echo "$as_me:$LINENO: result: yes" >&5
14025echo "${ECHO_T}yes" >&6
14026
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014027else
Martin v. Löwis11437992002-04-12 09:54:03 +000014028 echo "$as_me: failed program was:" >&5
14029cat conftest.$ac_ext >&5
14030
14031 echo "$as_me:$LINENO: result: no" >&5
14032echo "${ECHO_T}no" >&6
14033
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014034fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014035rm -f conftest.$ac_objext conftest.$ac_ext
14036
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014037fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014038rm -f conftest.$ac_objext conftest.$ac_ext
14039
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014041rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014042 CFLAGS=$OLD_CFLAGS
14043
14044else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014045
Martin v. Löwis11437992002-04-12 09:54:03 +000014046
14047for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014048do
Martin v. Löwis11437992002-04-12 09:54:03 +000014049as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14050echo "$as_me:$LINENO: checking for $ac_func" >&5
14051echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14052if eval "test \"\${$as_ac_var+set}\" = set"; then
14053 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014054else
Martin v. Löwis11437992002-04-12 09:54:03 +000014055 cat >conftest.$ac_ext <<_ACEOF
14056#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014057#include "confdefs.h"
14058/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014060#include <assert.h>
14061/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014062#ifdef __cplusplus
14063extern "C"
14064#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014065/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014066 builtin and then its argument prototype would still apply. */
14067char $ac_func ();
14068char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014069
Martin v. Löwis11437992002-04-12 09:54:03 +000014070#ifdef F77_DUMMY_MAIN
14071# ifdef __cplusplus
14072 extern "C"
14073# endif
14074 int F77_DUMMY_MAIN() { return 1; }
14075#endif
14076int
14077main ()
14078{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014079/* The GNU C library defines this for functions which it implements
14080 to always fail with ENOSYS. Some functions are actually named
14081 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014082#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014083choke me
14084#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014085f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014086#endif
14087
Martin v. Löwis11437992002-04-12 09:54:03 +000014088 ;
14089 return 0;
14090}
14091_ACEOF
14092rm -f conftest.$ac_objext conftest$ac_exeext
14093if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14094 (eval $ac_link) 2>&5
14095 ac_status=$?
14096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14097 (exit $ac_status); } &&
14098 { ac_try='test -s conftest$ac_exeext'
14099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14100 (eval $ac_try) 2>&5
14101 ac_status=$?
14102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14103 (exit $ac_status); }; }; then
14104 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014105else
Martin v. Löwis11437992002-04-12 09:54:03 +000014106 echo "$as_me: failed program was:" >&5
14107cat conftest.$ac_ext >&5
14108eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014109fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014110rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014112echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14113echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14114if test `eval echo '${'$as_ac_var'}'` = yes; then
14115 cat >>confdefs.h <<_ACEOF
14116#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14117_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014118
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014119fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014120done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014121
Michael W. Hudson54241132001-12-07 15:38:26 +000014122
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014123fi
14124
Michael W. Hudson54241132001-12-07 15:38:26 +000014125
14126
14127
14128
14129
14130
Guido van Rossum627b2d71993-12-24 10:39:16 +000014131# checks for system services
14132# (none yet)
14133
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014134# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014135echo "$as_me:$LINENO: checking for __fpu_control" >&5
14136echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14137if test "${ac_cv_func___fpu_control+set}" = set; then
14138 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014139else
Martin v. Löwis11437992002-04-12 09:54:03 +000014140 cat >conftest.$ac_ext <<_ACEOF
14141#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014142#include "confdefs.h"
14143/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014144 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014145#include <assert.h>
14146/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014147#ifdef __cplusplus
14148extern "C"
14149#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014150/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 builtin and then its argument prototype would still apply. */
14152char __fpu_control ();
14153char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014154
Martin v. Löwis11437992002-04-12 09:54:03 +000014155#ifdef F77_DUMMY_MAIN
14156# ifdef __cplusplus
14157 extern "C"
14158# endif
14159 int F77_DUMMY_MAIN() { return 1; }
14160#endif
14161int
14162main ()
14163{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014164/* The GNU C library defines this for functions which it implements
14165 to always fail with ENOSYS. Some functions are actually named
14166 something starting with __ and the normal name is an alias. */
14167#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14168choke me
14169#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014170f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014171#endif
14172
Martin v. Löwis11437992002-04-12 09:54:03 +000014173 ;
14174 return 0;
14175}
14176_ACEOF
14177rm -f conftest.$ac_objext conftest$ac_exeext
14178if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14179 (eval $ac_link) 2>&5
14180 ac_status=$?
14181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14182 (exit $ac_status); } &&
14183 { ac_try='test -s conftest$ac_exeext'
14184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14185 (eval $ac_try) 2>&5
14186 ac_status=$?
14187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14188 (exit $ac_status); }; }; then
14189 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014190else
Martin v. Löwis11437992002-04-12 09:54:03 +000014191 echo "$as_me: failed program was:" >&5
14192cat conftest.$ac_ext >&5
14193ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014194fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014195rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014197echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14198echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14199if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014200 :
14201else
Martin v. Löwis11437992002-04-12 09:54:03 +000014202
14203echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14204echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14205if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14206 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014207else
Martin v. Löwis11437992002-04-12 09:54:03 +000014208 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014209LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014210cat >conftest.$ac_ext <<_ACEOF
14211#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014212#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014213
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014214/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014215#ifdef __cplusplus
14216extern "C"
14217#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014218/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014219 builtin and then its argument prototype would still apply. */
14220char __fpu_control ();
14221#ifdef F77_DUMMY_MAIN
14222# ifdef __cplusplus
14223 extern "C"
14224# endif
14225 int F77_DUMMY_MAIN() { return 1; }
14226#endif
14227int
14228main ()
14229{
14230__fpu_control ();
14231 ;
14232 return 0;
14233}
14234_ACEOF
14235rm -f conftest.$ac_objext conftest$ac_exeext
14236if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14237 (eval $ac_link) 2>&5
14238 ac_status=$?
14239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14240 (exit $ac_status); } &&
14241 { ac_try='test -s conftest$ac_exeext'
14242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14243 (eval $ac_try) 2>&5
14244 ac_status=$?
14245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14246 (exit $ac_status); }; }; then
14247 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014248else
Martin v. Löwis11437992002-04-12 09:54:03 +000014249 echo "$as_me: failed program was:" >&5
14250cat conftest.$ac_ext >&5
14251ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014252fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014253rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14254LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014255fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014256echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14257echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14258if test $ac_cv_lib_ieee___fpu_control = yes; then
14259 cat >>confdefs.h <<_ACEOF
14260#define HAVE_LIBIEEE 1
14261_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014262
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014263 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014264
Guido van Rossum627b2d71993-12-24 10:39:16 +000014265fi
14266
Michael W. Hudson54241132001-12-07 15:38:26 +000014267
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014268fi
14269
Michael W. Hudson54241132001-12-07 15:38:26 +000014270
Guido van Rossum7f253911997-05-09 02:42:48 +000014271# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014272echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14273echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14274
Guido van Rossum7f253911997-05-09 02:42:48 +000014275# Check whether --with-fpectl or --without-fpectl was given.
14276if test "${with_fpectl+set}" = set; then
14277 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014278
Guido van Rossum7f253911997-05-09 02:42:48 +000014279if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014280then
14281
14282cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014283#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014284_ACEOF
14285
14286 echo "$as_me:$LINENO: result: yes" >&5
14287echo "${ECHO_T}yes" >&6
14288else echo "$as_me:$LINENO: result: no" >&5
14289echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014290fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014291else
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 echo "$as_me:$LINENO: result: no" >&5
14293echo "${ECHO_T}no" >&6
14294fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014295
Guido van Rossum7f43da71994-08-01 12:15:30 +000014296# check for --with-libm=...
14297
Guido van Rossum563e7081996-09-10 18:20:48 +000014298case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014299Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014300BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014301*) LIBM=-lm
14302esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014303echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14304echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14305
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014306# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014307if test "${with_libm+set}" = set; then
14308 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014309
Guido van Rossum7f253911997-05-09 02:42:48 +000014310if test "$withval" = no
14311then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014312 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14313echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014314elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014315then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014316 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14317echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14318else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14319echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14320 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014321fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014322else
Martin v. Löwis11437992002-04-12 09:54:03 +000014323 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14324echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14325fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014326
14327# check for --with-libc=...
14328
Martin v. Löwis11437992002-04-12 09:54:03 +000014329echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14330echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14331
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014332# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014333if test "${with_libc+set}" = set; then
14334 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014335
Guido van Rossum7f253911997-05-09 02:42:48 +000014336if test "$withval" = no
14337then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14339echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014340elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014341then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014342 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14343echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14344else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14345echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14346 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014347fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014348else
Martin v. Löwis11437992002-04-12 09:54:03 +000014349 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14350echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14351fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014352
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014353# check for hypot() in math library
14354LIBS_SAVE=$LIBS
14355LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014356
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014357for ac_func in hypot
14358do
Martin v. Löwis11437992002-04-12 09:54:03 +000014359as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14360echo "$as_me:$LINENO: checking for $ac_func" >&5
14361echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14362if eval "test \"\${$as_ac_var+set}\" = set"; then
14363 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014364else
Martin v. Löwis11437992002-04-12 09:54:03 +000014365 cat >conftest.$ac_ext <<_ACEOF
14366#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014367#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014368/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014370#include <assert.h>
14371/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014372#ifdef __cplusplus
14373extern "C"
14374#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014375/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014376 builtin and then its argument prototype would still apply. */
14377char $ac_func ();
14378char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014379
Martin v. Löwis11437992002-04-12 09:54:03 +000014380#ifdef F77_DUMMY_MAIN
14381# ifdef __cplusplus
14382 extern "C"
14383# endif
14384 int F77_DUMMY_MAIN() { return 1; }
14385#endif
14386int
14387main ()
14388{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014389/* The GNU C library defines this for functions which it implements
14390 to always fail with ENOSYS. Some functions are actually named
14391 something starting with __ and the normal name is an alias. */
14392#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14393choke me
14394#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014395f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014396#endif
14397
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 ;
14399 return 0;
14400}
14401_ACEOF
14402rm -f conftest.$ac_objext conftest$ac_exeext
14403if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14404 (eval $ac_link) 2>&5
14405 ac_status=$?
14406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14407 (exit $ac_status); } &&
14408 { ac_try='test -s conftest$ac_exeext'
14409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14410 (eval $ac_try) 2>&5
14411 ac_status=$?
14412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14413 (exit $ac_status); }; }; then
14414 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014415else
Martin v. Löwis11437992002-04-12 09:54:03 +000014416 echo "$as_me: failed program was:" >&5
14417cat conftest.$ac_ext >&5
14418eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014420rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014421fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014422echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14423echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14424if test `eval echo '${'$as_ac_var'}'` = yes; then
14425 cat >>confdefs.h <<_ACEOF
14426#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14427_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014428
Michael W. Hudson54241132001-12-07 15:38:26 +000014429else
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014431fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014432done
14433
Michael W. Hudson54241132001-12-07 15:38:26 +000014434
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014435LIBS=$LIBS_SAVE
14436
Guido van Rossumad713701997-07-10 22:42:38 +000014437# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014438echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14439echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14440if test "${ac_cv_malloc_zero+set}" = set; then
14441 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014442else
14443 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014444 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014445else
Martin v. Löwis11437992002-04-12 09:54:03 +000014446 cat >conftest.$ac_ext <<_ACEOF
14447#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014448#include "confdefs.h"
14449#include <stdio.h>
14450#ifdef HAVE_STDLIB
14451#include <stdlib.h>
14452#else
14453char *malloc(), *realloc();
14454int *free();
14455#endif
14456main() {
14457 char *p;
14458 p = malloc(0);
14459 if (p == NULL) exit(1);
14460 p = realloc(p, 0);
14461 if (p == NULL) exit(1);
14462 free(p);
14463 exit(0);
14464}
Martin v. Löwis11437992002-04-12 09:54:03 +000014465_ACEOF
14466rm -f conftest$ac_exeext
14467if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14468 (eval $ac_link) 2>&5
14469 ac_status=$?
14470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14471 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14473 (eval $ac_try) 2>&5
14474 ac_status=$?
14475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14476 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014477 ac_cv_malloc_zero=nonnull
14478else
Martin v. Löwis11437992002-04-12 09:54:03 +000014479 echo "$as_me: program exited with status $ac_status" >&5
14480echo "$as_me: failed program was:" >&5
14481cat conftest.$ac_ext >&5
14482( exit $ac_status )
14483ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014484fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014485rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014486fi
Guido van Rossumad713701997-07-10 22:42:38 +000014487fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014488 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014489echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14490echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014491if test "$ac_cv_malloc_zero" = null
14492then
Martin v. Löwis11437992002-04-12 09:54:03 +000014493
14494cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014495#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014496_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014497
14498fi
14499
Guido van Rossumef2255b2000-03-10 22:30:29 +000014500# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014501if test "${ac_cv_header_wchar_h+set}" = set; then
14502 echo "$as_me:$LINENO: checking for wchar.h" >&5
14503echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14504if test "${ac_cv_header_wchar_h+set}" = set; then
14505 echo $ECHO_N "(cached) $ECHO_C" >&6
14506fi
14507echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14508echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014509else
Martin v. Löwis11437992002-04-12 09:54:03 +000014510 # Is the header compilable?
14511echo "$as_me:$LINENO: checking wchar.h usability" >&5
14512echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14513cat >conftest.$ac_ext <<_ACEOF
14514#line $LINENO "configure"
14515#include "confdefs.h"
14516$ac_includes_default
14517#include <wchar.h>
14518_ACEOF
14519rm -f conftest.$ac_objext
14520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14521 (eval $ac_compile) 2>&5
14522 ac_status=$?
14523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14524 (exit $ac_status); } &&
14525 { ac_try='test -s conftest.$ac_objext'
14526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14527 (eval $ac_try) 2>&5
14528 ac_status=$?
14529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14530 (exit $ac_status); }; }; then
14531 ac_header_compiler=yes
14532else
14533 echo "$as_me: failed program was:" >&5
14534cat conftest.$ac_ext >&5
14535ac_header_compiler=no
14536fi
14537rm -f conftest.$ac_objext conftest.$ac_ext
14538echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14539echo "${ECHO_T}$ac_header_compiler" >&6
14540
14541# Is the header present?
14542echo "$as_me:$LINENO: checking wchar.h presence" >&5
14543echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14544cat >conftest.$ac_ext <<_ACEOF
14545#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014546#include "confdefs.h"
14547#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014548_ACEOF
14549if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14550 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14551 ac_status=$?
14552 egrep -v '^ *\+' conftest.er1 >conftest.err
14553 rm -f conftest.er1
14554 cat conftest.err >&5
14555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14556 (exit $ac_status); } >/dev/null; then
14557 if test -s conftest.err; then
14558 ac_cpp_err=$ac_c_preproc_warn_flag
14559 else
14560 ac_cpp_err=
14561 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014562else
Martin v. Löwis11437992002-04-12 09:54:03 +000014563 ac_cpp_err=yes
14564fi
14565if test -z "$ac_cpp_err"; then
14566 ac_header_preproc=yes
14567else
14568 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014569 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014570 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014571fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014572rm -f conftest.err conftest.$ac_ext
14573echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14574echo "${ECHO_T}$ac_header_preproc" >&6
14575
14576# So? What about this header?
14577case $ac_header_compiler:$ac_header_preproc in
14578 yes:no )
14579 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14580echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14581 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14582echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14583 no:yes )
14584 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14585echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14586 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14587echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14588 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14589echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14590esac
14591echo "$as_me:$LINENO: checking for wchar.h" >&5
14592echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14593if test "${ac_cv_header_wchar_h+set}" = set; then
14594 echo $ECHO_N "(cached) $ECHO_C" >&6
14595else
14596 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014597fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014598echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14599echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14600
14601fi
14602if test $ac_cv_header_wchar_h = yes; then
14603
14604
14605cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014606#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014607_ACEOF
14608
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014609 wchar_h="yes"
14610
Guido van Rossumef2255b2000-03-10 22:30:29 +000014611else
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014613
14614fi
14615
Michael W. Hudson54241132001-12-07 15:38:26 +000014616
Martin v. Löwis11437992002-04-12 09:54:03 +000014617
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014618# determine wchar_t size
14619if test "$wchar_h" = yes
14620then
Martin v. Löwis11437992002-04-12 09:54:03 +000014621 echo "$as_me:$LINENO: checking for wchar_t" >&5
14622echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14623if test "${ac_cv_type_wchar_t+set}" = set; then
14624 echo $ECHO_N "(cached) $ECHO_C" >&6
14625else
14626 cat >conftest.$ac_ext <<_ACEOF
14627#line $LINENO "configure"
14628#include "confdefs.h"
14629#include <wchar.h>
14630
14631#ifdef F77_DUMMY_MAIN
14632# ifdef __cplusplus
14633 extern "C"
14634# endif
14635 int F77_DUMMY_MAIN() { return 1; }
14636#endif
14637int
14638main ()
14639{
14640if ((wchar_t *) 0)
14641 return 0;
14642if (sizeof (wchar_t))
14643 return 0;
14644 ;
14645 return 0;
14646}
14647_ACEOF
14648rm -f conftest.$ac_objext
14649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14650 (eval $ac_compile) 2>&5
14651 ac_status=$?
14652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14653 (exit $ac_status); } &&
14654 { ac_try='test -s conftest.$ac_objext'
14655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14656 (eval $ac_try) 2>&5
14657 ac_status=$?
14658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14659 (exit $ac_status); }; }; then
14660 ac_cv_type_wchar_t=yes
14661else
14662 echo "$as_me: failed program was:" >&5
14663cat conftest.$ac_ext >&5
14664ac_cv_type_wchar_t=no
14665fi
14666rm -f conftest.$ac_objext conftest.$ac_ext
14667fi
14668echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14669echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14670
14671echo "$as_me:$LINENO: checking size of wchar_t" >&5
14672echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14673if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14674 echo $ECHO_N "(cached) $ECHO_C" >&6
14675else
14676 if test "$ac_cv_type_wchar_t" = yes; then
14677 # The cast to unsigned long works around a bug in the HP C Compiler
14678 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14679 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14680 # This bug is HP SR number 8606223364.
14681 if test "$cross_compiling" = yes; then
14682 # Depending upon the size, compute the lo and hi bounds.
14683cat >conftest.$ac_ext <<_ACEOF
14684#line $LINENO "configure"
14685#include "confdefs.h"
14686#include <wchar.h>
14687
14688#ifdef F77_DUMMY_MAIN
14689# ifdef __cplusplus
14690 extern "C"
14691# endif
14692 int F77_DUMMY_MAIN() { return 1; }
14693#endif
14694int
14695main ()
14696{
14697static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14698test_array [0] = 0
14699
14700 ;
14701 return 0;
14702}
14703_ACEOF
14704rm -f conftest.$ac_objext
14705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14706 (eval $ac_compile) 2>&5
14707 ac_status=$?
14708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14709 (exit $ac_status); } &&
14710 { ac_try='test -s conftest.$ac_objext'
14711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14712 (eval $ac_try) 2>&5
14713 ac_status=$?
14714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14715 (exit $ac_status); }; }; then
14716 ac_lo=0 ac_mid=0
14717 while :; do
14718 cat >conftest.$ac_ext <<_ACEOF
14719#line $LINENO "configure"
14720#include "confdefs.h"
14721#include <wchar.h>
14722
14723#ifdef F77_DUMMY_MAIN
14724# ifdef __cplusplus
14725 extern "C"
14726# endif
14727 int F77_DUMMY_MAIN() { return 1; }
14728#endif
14729int
14730main ()
14731{
14732static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14733test_array [0] = 0
14734
14735 ;
14736 return 0;
14737}
14738_ACEOF
14739rm -f conftest.$ac_objext
14740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14741 (eval $ac_compile) 2>&5
14742 ac_status=$?
14743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14744 (exit $ac_status); } &&
14745 { ac_try='test -s conftest.$ac_objext'
14746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14747 (eval $ac_try) 2>&5
14748 ac_status=$?
14749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14750 (exit $ac_status); }; }; then
14751 ac_hi=$ac_mid; break
14752else
14753 echo "$as_me: failed program was:" >&5
14754cat conftest.$ac_ext >&5
14755ac_lo=`expr $ac_mid + 1`
14756 if test $ac_lo -le $ac_mid; then
14757 ac_lo= ac_hi=
14758 break
14759 fi
14760 ac_mid=`expr 2 '*' $ac_mid + 1`
14761fi
14762rm -f conftest.$ac_objext conftest.$ac_ext
14763 done
14764else
14765 echo "$as_me: failed program was:" >&5
14766cat conftest.$ac_ext >&5
14767cat >conftest.$ac_ext <<_ACEOF
14768#line $LINENO "configure"
14769#include "confdefs.h"
14770#include <wchar.h>
14771
14772#ifdef F77_DUMMY_MAIN
14773# ifdef __cplusplus
14774 extern "C"
14775# endif
14776 int F77_DUMMY_MAIN() { return 1; }
14777#endif
14778int
14779main ()
14780{
14781static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14782test_array [0] = 0
14783
14784 ;
14785 return 0;
14786}
14787_ACEOF
14788rm -f conftest.$ac_objext
14789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14790 (eval $ac_compile) 2>&5
14791 ac_status=$?
14792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14793 (exit $ac_status); } &&
14794 { ac_try='test -s conftest.$ac_objext'
14795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14796 (eval $ac_try) 2>&5
14797 ac_status=$?
14798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14799 (exit $ac_status); }; }; then
14800 ac_hi=-1 ac_mid=-1
14801 while :; do
14802 cat >conftest.$ac_ext <<_ACEOF
14803#line $LINENO "configure"
14804#include "confdefs.h"
14805#include <wchar.h>
14806
14807#ifdef F77_DUMMY_MAIN
14808# ifdef __cplusplus
14809 extern "C"
14810# endif
14811 int F77_DUMMY_MAIN() { return 1; }
14812#endif
14813int
14814main ()
14815{
14816static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14817test_array [0] = 0
14818
14819 ;
14820 return 0;
14821}
14822_ACEOF
14823rm -f conftest.$ac_objext
14824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14825 (eval $ac_compile) 2>&5
14826 ac_status=$?
14827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14828 (exit $ac_status); } &&
14829 { ac_try='test -s conftest.$ac_objext'
14830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14831 (eval $ac_try) 2>&5
14832 ac_status=$?
14833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14834 (exit $ac_status); }; }; then
14835 ac_lo=$ac_mid; break
14836else
14837 echo "$as_me: failed program was:" >&5
14838cat conftest.$ac_ext >&5
14839ac_hi=`expr '(' $ac_mid ')' - 1`
14840 if test $ac_mid -le $ac_hi; then
14841 ac_lo= ac_hi=
14842 break
14843 fi
14844 ac_mid=`expr 2 '*' $ac_mid`
14845fi
14846rm -f conftest.$ac_objext conftest.$ac_ext
14847 done
14848else
14849 echo "$as_me: failed program was:" >&5
14850cat conftest.$ac_ext >&5
14851ac_lo= ac_hi=
14852fi
14853rm -f conftest.$ac_objext conftest.$ac_ext
14854fi
14855rm -f conftest.$ac_objext conftest.$ac_ext
14856# Binary search between lo and hi bounds.
14857while test "x$ac_lo" != "x$ac_hi"; do
14858 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14859 cat >conftest.$ac_ext <<_ACEOF
14860#line $LINENO "configure"
14861#include "confdefs.h"
14862#include <wchar.h>
14863
14864#ifdef F77_DUMMY_MAIN
14865# ifdef __cplusplus
14866 extern "C"
14867# endif
14868 int F77_DUMMY_MAIN() { return 1; }
14869#endif
14870int
14871main ()
14872{
14873static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14874test_array [0] = 0
14875
14876 ;
14877 return 0;
14878}
14879_ACEOF
14880rm -f conftest.$ac_objext
14881if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14882 (eval $ac_compile) 2>&5
14883 ac_status=$?
14884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14885 (exit $ac_status); } &&
14886 { ac_try='test -s conftest.$ac_objext'
14887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14888 (eval $ac_try) 2>&5
14889 ac_status=$?
14890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14891 (exit $ac_status); }; }; then
14892 ac_hi=$ac_mid
14893else
14894 echo "$as_me: failed program was:" >&5
14895cat conftest.$ac_ext >&5
14896ac_lo=`expr '(' $ac_mid ')' + 1`
14897fi
14898rm -f conftest.$ac_objext conftest.$ac_ext
14899done
14900case $ac_lo in
14901?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14902'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14903echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14904 { (exit 1); exit 1; }; } ;;
14905esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014906else
14907 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014908 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14909echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14910 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014911else
Martin v. Löwis11437992002-04-12 09:54:03 +000014912 cat >conftest.$ac_ext <<_ACEOF
14913#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014914#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014915#include <wchar.h>
14916
14917long longval () { return (long) (sizeof (wchar_t)); }
14918unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014919#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014920#include <stdlib.h>
14921#ifdef F77_DUMMY_MAIN
14922# ifdef __cplusplus
14923 extern "C"
14924# endif
14925 int F77_DUMMY_MAIN() { return 1; }
14926#endif
14927int
14928main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014929{
Martin v. Löwis11437992002-04-12 09:54:03 +000014930
14931 FILE *f = fopen ("conftest.val", "w");
14932 if (! f)
14933 exit (1);
14934 if (((long) (sizeof (wchar_t))) < 0)
14935 {
14936 long i = longval ();
14937 if (i != ((long) (sizeof (wchar_t))))
14938 exit (1);
14939 fprintf (f, "%ld\n", i);
14940 }
14941 else
14942 {
14943 unsigned long i = ulongval ();
14944 if (i != ((long) (sizeof (wchar_t))))
14945 exit (1);
14946 fprintf (f, "%lu\n", i);
14947 }
14948 exit (ferror (f) || fclose (f) != 0);
14949
14950 ;
14951 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014952}
Martin v. Löwis11437992002-04-12 09:54:03 +000014953_ACEOF
14954rm -f conftest$ac_exeext
14955if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14956 (eval $ac_link) 2>&5
14957 ac_status=$?
14958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14959 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14961 (eval $ac_try) 2>&5
14962 ac_status=$?
14963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14964 (exit $ac_status); }; }; then
14965 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014966else
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 echo "$as_me: program exited with status $ac_status" >&5
14968echo "$as_me: failed program was:" >&5
14969cat conftest.$ac_ext >&5
14970( exit $ac_status )
14971{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14972echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14973 { (exit 1); exit 1; }; }
14974fi
14975rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14976fi
14977fi
14978rm -f conftest.val
14979else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014980 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000014981fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014982fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014983echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
14984echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
14985cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014986#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014987_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014988
Michael W. Hudson54241132001-12-07 15:38:26 +000014989
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014990fi
14991
Martin v. Löwis11437992002-04-12 09:54:03 +000014992echo "$as_me:$LINENO: checking what type to use for unicode" >&5
14993echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014994# Check whether --enable-unicode or --disable-unicode was given.
14995if test "${enable_unicode+set}" = set; then
14996 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000014997
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014998else
14999 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015000fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015001
15002if test $enable_unicode = yes
15003then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015004 # Without any arguments, Py_UNICODE defaults to two-byte mode
15005 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015006fi
15007
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015008
15009
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015010case "$enable_unicode" in
15011ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015012 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015013#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015014_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015015
15016 ;;
15017ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015018 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015019#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015020_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015021
15022 ;;
15023esac
15024
Michael W. Hudson54241132001-12-07 15:38:26 +000015025
Martin v. Löwis11437992002-04-12 09:54:03 +000015026
15027
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015028
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015029if test "$enable_unicode" = "no"
15030then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015031 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 echo "$as_me:$LINENO: result: not used" >&5
15033echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015034else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015035 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015036
15037cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015038#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015039_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015040
15041 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15042 then
15043 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015044
Martin v. Löwis11437992002-04-12 09:54:03 +000015045cat >>confdefs.h <<\_ACEOF
15046#define HAVE_USABLE_WCHAR_T 1
15047_ACEOF
15048
15049 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015050#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015051_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015052
15053 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15054 then
15055 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015056 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015057#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015058_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015059
15060 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15061 then
15062 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015064#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015065_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015066
15067 else
15068 PY_UNICODE_TYPE="no type found"
15069 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015070 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15071echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015072fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015073
15074# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015075echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15076echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15077if test "${ac_cv_c_bigendian+set}" = set; then
15078 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015079else
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 # See if sys/param.h defines the BYTE_ORDER macro.
15081cat >conftest.$ac_ext <<_ACEOF
15082#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015083#include "confdefs.h"
15084#include <sys/types.h>
15085#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015086
Martin v. Löwis11437992002-04-12 09:54:03 +000015087#ifdef F77_DUMMY_MAIN
15088# ifdef __cplusplus
15089 extern "C"
15090# endif
15091 int F77_DUMMY_MAIN() { return 1; }
15092#endif
15093int
15094main ()
15095{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015096#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15097 bogus endian macros
15098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015099
15100 ;
15101 return 0;
15102}
15103_ACEOF
15104rm -f conftest.$ac_objext
15105if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15106 (eval $ac_compile) 2>&5
15107 ac_status=$?
15108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15109 (exit $ac_status); } &&
15110 { ac_try='test -s conftest.$ac_objext'
15111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15112 (eval $ac_try) 2>&5
15113 ac_status=$?
15114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15115 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015116 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015117cat >conftest.$ac_ext <<_ACEOF
15118#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015119#include "confdefs.h"
15120#include <sys/types.h>
15121#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015122
Martin v. Löwis11437992002-04-12 09:54:03 +000015123#ifdef F77_DUMMY_MAIN
15124# ifdef __cplusplus
15125 extern "C"
15126# endif
15127 int F77_DUMMY_MAIN() { return 1; }
15128#endif
15129int
15130main ()
15131{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015132#if BYTE_ORDER != BIG_ENDIAN
15133 not big endian
15134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015135
15136 ;
15137 return 0;
15138}
15139_ACEOF
15140rm -f conftest.$ac_objext
15141if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15142 (eval $ac_compile) 2>&5
15143 ac_status=$?
15144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15145 (exit $ac_status); } &&
15146 { ac_try='test -s conftest.$ac_objext'
15147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15148 (eval $ac_try) 2>&5
15149 ac_status=$?
15150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15151 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015152 ac_cv_c_bigendian=yes
15153else
Martin v. Löwis11437992002-04-12 09:54:03 +000015154 echo "$as_me: failed program was:" >&5
15155cat conftest.$ac_ext >&5
15156ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015157fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015158rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015159else
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 echo "$as_me: failed program was:" >&5
15161cat conftest.$ac_ext >&5
15162# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015163if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 # try to guess the endianess by grep'ing values into an object file
15165 ac_cv_c_bigendian=unknown
15166 cat >conftest.$ac_ext <<_ACEOF
15167#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015168#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015169short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15170short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15171void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15172short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15173short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15174void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15175#ifdef F77_DUMMY_MAIN
15176# ifdef __cplusplus
15177 extern "C"
15178# endif
15179 int F77_DUMMY_MAIN() { return 1; }
15180#endif
15181int
15182main ()
15183{
15184 _ascii (); _ebcdic ();
15185 ;
15186 return 0;
15187}
15188_ACEOF
15189rm -f conftest.$ac_objext
15190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15191 (eval $ac_compile) 2>&5
15192 ac_status=$?
15193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15194 (exit $ac_status); } &&
15195 { ac_try='test -s conftest.$ac_objext'
15196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15197 (eval $ac_try) 2>&5
15198 ac_status=$?
15199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15200 (exit $ac_status); }; }; then
15201 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15202 ac_cv_c_bigendian=yes
15203fi
15204if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15205 if test "$ac_cv_c_bigendian" = unknown; then
15206 ac_cv_c_bigendian=no
15207 else
15208 # finding both strings is unlikely to happen, but who knows?
15209 ac_cv_c_bigendian=unknown
15210 fi
15211fi
15212else
15213 echo "$as_me: failed program was:" >&5
15214cat conftest.$ac_ext >&5
15215fi
15216rm -f conftest.$ac_objext conftest.$ac_ext
15217else
15218 cat >conftest.$ac_ext <<_ACEOF
15219#line $LINENO "configure"
15220#include "confdefs.h"
15221int
15222main ()
15223{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015224 /* Are we little or big endian? From Harbison&Steele. */
15225 union
15226 {
15227 long l;
15228 char c[sizeof (long)];
15229 } u;
15230 u.l = 1;
15231 exit (u.c[sizeof (long) - 1] == 1);
15232}
Martin v. Löwis11437992002-04-12 09:54:03 +000015233_ACEOF
15234rm -f conftest$ac_exeext
15235if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15236 (eval $ac_link) 2>&5
15237 ac_status=$?
15238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15239 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15241 (eval $ac_try) 2>&5
15242 ac_status=$?
15243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15244 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015245 ac_cv_c_bigendian=no
15246else
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 echo "$as_me: program exited with status $ac_status" >&5
15248echo "$as_me: failed program was:" >&5
15249cat conftest.$ac_ext >&5
15250( exit $ac_status )
15251ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015252fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015253rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015254fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015255fi
15256rm -f conftest.$ac_objext conftest.$ac_ext
15257fi
15258echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15259echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15260case $ac_cv_c_bigendian in
15261 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015262
Martin v. Löwis11437992002-04-12 09:54:03 +000015263cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015264#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015265_ACEOF
15266 ;;
15267 no)
15268 ;;
15269 *)
15270 { { echo "$as_me:$LINENO: error: unknown endianess
15271presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15272echo "$as_me: error: unknown endianess
15273presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15274 { (exit 1); exit 1; }; } ;;
15275esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015276
Michael W. Hudson54241132001-12-07 15:38:26 +000015277
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015278# Check whether right shifting a negative integer extends the sign bit
15279# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015280echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15281echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15282if test "${ac_cv_rshift_extends_sign+set}" = set; then
15283 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015284else
Martin v. Löwis11437992002-04-12 09:54:03 +000015285
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015286if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015287 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015288else
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 cat >conftest.$ac_ext <<_ACEOF
15290#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015291#include "confdefs.h"
15292
15293int main()
15294{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015295 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015296}
15297
Martin v. Löwis11437992002-04-12 09:54:03 +000015298_ACEOF
15299rm -f conftest$ac_exeext
15300if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15301 (eval $ac_link) 2>&5
15302 ac_status=$?
15303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15304 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15306 (eval $ac_try) 2>&5
15307 ac_status=$?
15308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15309 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015310 ac_cv_rshift_extends_sign=yes
15311else
Martin v. Löwis11437992002-04-12 09:54:03 +000015312 echo "$as_me: program exited with status $ac_status" >&5
15313echo "$as_me: failed program was:" >&5
15314cat conftest.$ac_ext >&5
15315( exit $ac_status )
15316ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015317fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015318rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15319fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015320fi
15321
Martin v. Löwis11437992002-04-12 09:54:03 +000015322echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15323echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015324if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015325then
Martin v. Löwis11437992002-04-12 09:54:03 +000015326
15327cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015328#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015329_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015330
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015331fi
15332
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015333# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015334echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15335echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15336if test "${ac_cv_have_getc_unlocked+set}" = set; then
15337 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015338else
Martin v. Löwis11437992002-04-12 09:54:03 +000015339
15340cat >conftest.$ac_ext <<_ACEOF
15341#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015342#include "confdefs.h"
15343#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015344#ifdef F77_DUMMY_MAIN
15345# ifdef __cplusplus
15346 extern "C"
15347# endif
15348 int F77_DUMMY_MAIN() { return 1; }
15349#endif
15350int
15351main ()
15352{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015353
15354 FILE *f = fopen("/dev/null", "r");
15355 flockfile(f);
15356 getc_unlocked(f);
15357 funlockfile(f);
15358
Martin v. Löwis11437992002-04-12 09:54:03 +000015359 ;
15360 return 0;
15361}
15362_ACEOF
15363rm -f conftest.$ac_objext conftest$ac_exeext
15364if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15365 (eval $ac_link) 2>&5
15366 ac_status=$?
15367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15368 (exit $ac_status); } &&
15369 { ac_try='test -s conftest$ac_exeext'
15370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15371 (eval $ac_try) 2>&5
15372 ac_status=$?
15373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15374 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015375 ac_cv_have_getc_unlocked=yes
15376else
Martin v. Löwis11437992002-04-12 09:54:03 +000015377 echo "$as_me: failed program was:" >&5
15378cat conftest.$ac_ext >&5
15379ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015380fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015381rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015382fi
15383
Martin v. Löwis11437992002-04-12 09:54:03 +000015384echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15385echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015386if test "$ac_cv_have_getc_unlocked" = yes
15387then
Martin v. Löwis11437992002-04-12 09:54:03 +000015388
15389cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015390#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015391_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015392
15393fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015394
Martin v. Löwis0daad592001-09-30 21:09:59 +000015395# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015396echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15397echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15398if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15399 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015400else
Martin v. Löwis11437992002-04-12 09:54:03 +000015401 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015402LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015403cat >conftest.$ac_ext <<_ACEOF
15404#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015405#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015406
Guido van Rossum353ae582001-07-10 16:45:32 +000015407/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015408#ifdef __cplusplus
15409extern "C"
15410#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015411/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015412 builtin and then its argument prototype would still apply. */
15413char rl_pre_input_hook ();
15414#ifdef F77_DUMMY_MAIN
15415# ifdef __cplusplus
15416 extern "C"
15417# endif
15418 int F77_DUMMY_MAIN() { return 1; }
15419#endif
15420int
15421main ()
15422{
15423rl_pre_input_hook ();
15424 ;
15425 return 0;
15426}
15427_ACEOF
15428rm -f conftest.$ac_objext conftest$ac_exeext
15429if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15430 (eval $ac_link) 2>&5
15431 ac_status=$?
15432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15433 (exit $ac_status); } &&
15434 { ac_try='test -s conftest$ac_exeext'
15435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15436 (eval $ac_try) 2>&5
15437 ac_status=$?
15438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15439 (exit $ac_status); }; }; then
15440 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015441else
Martin v. Löwis11437992002-04-12 09:54:03 +000015442 echo "$as_me: failed program was:" >&5
15443cat conftest.$ac_ext >&5
15444ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015445fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015446rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15447LIBS=$ac_check_lib_save_LIBS
15448fi
15449echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15450echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15451if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015452
Martin v. Löwis11437992002-04-12 09:54:03 +000015453cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015454#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015455_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015456
Martin v. Löwis0daad592001-09-30 21:09:59 +000015457fi
15458
Michael W. Hudson54241132001-12-07 15:38:26 +000015459
Martin v. Löwis0daad592001-09-30 21:09:59 +000015460# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015461echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15462echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15463if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015465else
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015467LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015468cat >conftest.$ac_ext <<_ACEOF
15469#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015470#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015471
Martin v. Löwis0daad592001-09-30 21:09:59 +000015472/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015473#ifdef __cplusplus
15474extern "C"
15475#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015476/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 builtin and then its argument prototype would still apply. */
15478char rl_completion_matches ();
15479#ifdef F77_DUMMY_MAIN
15480# ifdef __cplusplus
15481 extern "C"
15482# endif
15483 int F77_DUMMY_MAIN() { return 1; }
15484#endif
15485int
15486main ()
15487{
15488rl_completion_matches ();
15489 ;
15490 return 0;
15491}
15492_ACEOF
15493rm -f conftest.$ac_objext conftest$ac_exeext
15494if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15495 (eval $ac_link) 2>&5
15496 ac_status=$?
15497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15498 (exit $ac_status); } &&
15499 { ac_try='test -s conftest$ac_exeext'
15500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15501 (eval $ac_try) 2>&5
15502 ac_status=$?
15503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15504 (exit $ac_status); }; }; then
15505 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015506else
Martin v. Löwis11437992002-04-12 09:54:03 +000015507 echo "$as_me: failed program was:" >&5
15508cat conftest.$ac_ext >&5
15509ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015510fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015511rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15512LIBS=$ac_check_lib_save_LIBS
15513fi
15514echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15515echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15516if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015517
Martin v. Löwis11437992002-04-12 09:54:03 +000015518cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015519#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015520_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015521
Guido van Rossum353ae582001-07-10 16:45:32 +000015522fi
15523
Jack Jansendd19cf82001-12-06 22:36:17 +000015524
Martin v. Löwis11437992002-04-12 09:54:03 +000015525echo "$as_me:$LINENO: checking for broken nice()" >&5
15526echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15527if test "${ac_cv_broken_nice+set}" = set; then
15528 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015529else
Martin v. Löwis11437992002-04-12 09:54:03 +000015530
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015531if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015532 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015533else
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 cat >conftest.$ac_ext <<_ACEOF
15535#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015536#include "confdefs.h"
15537
15538int main()
15539{
15540 int val1 = nice(1);
15541 if (val1 != -1 && val1 == nice(2))
15542 exit(0);
15543 exit(1);
15544}
15545
Martin v. Löwis11437992002-04-12 09:54:03 +000015546_ACEOF
15547rm -f conftest$ac_exeext
15548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15549 (eval $ac_link) 2>&5
15550 ac_status=$?
15551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15552 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15554 (eval $ac_try) 2>&5
15555 ac_status=$?
15556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15557 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015558 ac_cv_broken_nice=yes
15559else
Martin v. Löwis11437992002-04-12 09:54:03 +000015560 echo "$as_me: program exited with status $ac_status" >&5
15561echo "$as_me: failed program was:" >&5
15562cat conftest.$ac_ext >&5
15563( exit $ac_status )
15564ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015566rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15567fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015568fi
15569
Martin v. Löwis11437992002-04-12 09:54:03 +000015570echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15571echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015572if test "$ac_cv_broken_nice" = yes
15573then
Martin v. Löwis11437992002-04-12 09:54:03 +000015574
15575cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015576#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015577_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015578
15579fi
15580
Jack Jansen666b1e72001-10-31 12:11:48 +000015581# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015582echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15583echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15584if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15585 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015586else
Martin v. Löwis11437992002-04-12 09:54:03 +000015587 cat >conftest.$ac_ext <<_ACEOF
15588#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015589#include "confdefs.h"
15590#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015591#ifdef F77_DUMMY_MAIN
15592# ifdef __cplusplus
15593 extern "C"
15594# endif
15595 int F77_DUMMY_MAIN() { return 1; }
15596#endif
15597int
15598main ()
15599{
Jack Jansen666b1e72001-10-31 12:11:48 +000015600
15601 int rtn;
15602 rtn = mvwdelch(0,0,0);
15603
Martin v. Löwis11437992002-04-12 09:54:03 +000015604 ;
15605 return 0;
15606}
15607_ACEOF
15608rm -f conftest.$ac_objext
15609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15610 (eval $ac_compile) 2>&5
15611 ac_status=$?
15612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15613 (exit $ac_status); } &&
15614 { ac_try='test -s conftest.$ac_objext'
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
Jack Jansen666b1e72001-10-31 12:11:48 +000015620 ac_cv_mvwdelch_is_expression=yes
15621else
Martin v. Löwis11437992002-04-12 09:54:03 +000015622 echo "$as_me: failed program was:" >&5
15623cat conftest.$ac_ext >&5
15624ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015626rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015627fi
15628
Martin v. Löwis11437992002-04-12 09:54:03 +000015629echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15630echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015631
15632if test "$ac_cv_mvwdelch_is_expression" = yes
15633then
Martin v. Löwis11437992002-04-12 09:54:03 +000015634
15635cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015636#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015637_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015638
15639fi
15640
Martin v. Löwis11437992002-04-12 09:54:03 +000015641echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15642echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15643if test "${ac_cv_window_has_flags+set}" = set; then
15644 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015645else
Martin v. Löwis11437992002-04-12 09:54:03 +000015646 cat >conftest.$ac_ext <<_ACEOF
15647#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015648#include "confdefs.h"
15649#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015650#ifdef F77_DUMMY_MAIN
15651# ifdef __cplusplus
15652 extern "C"
15653# endif
15654 int F77_DUMMY_MAIN() { return 1; }
15655#endif
15656int
15657main ()
15658{
Jack Jansen666b1e72001-10-31 12:11:48 +000015659
15660 WINDOW *w;
15661 w->_flags = 0;
15662
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 ;
15664 return 0;
15665}
15666_ACEOF
15667rm -f conftest.$ac_objext
15668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15669 (eval $ac_compile) 2>&5
15670 ac_status=$?
15671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15672 (exit $ac_status); } &&
15673 { ac_try='test -s conftest.$ac_objext'
15674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15675 (eval $ac_try) 2>&5
15676 ac_status=$?
15677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15678 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015679 ac_cv_window_has_flags=yes
15680else
Martin v. Löwis11437992002-04-12 09:54:03 +000015681 echo "$as_me: failed program was:" >&5
15682cat conftest.$ac_ext >&5
15683ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015684fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015685rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015686fi
15687
Martin v. Löwis11437992002-04-12 09:54:03 +000015688echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15689echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015690
Jack Jansen666b1e72001-10-31 12:11:48 +000015691
15692if test "$ac_cv_window_has_flags" = yes
15693then
Martin v. Löwis11437992002-04-12 09:54:03 +000015694
15695cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015696#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015697_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015698
15699fi
15700
Guido van Rossum95713eb2000-05-18 20:53:31 +000015701# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15702# Add sys/socket.h to confdefs.h
15703cat >> confdefs.h <<\EOF
15704#ifdef HAVE_SYS_SOCKET_H
15705#include <sys/socket.h>
15706#endif
15707EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015708echo "$as_me:$LINENO: checking for socklen_t" >&5
15709echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15710if test "${ac_cv_type_socklen_t+set}" = set; then
15711 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015712else
Martin v. Löwis11437992002-04-12 09:54:03 +000015713 cat >conftest.$ac_ext <<_ACEOF
15714#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015715#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015716$ac_includes_default
15717#ifdef F77_DUMMY_MAIN
15718# ifdef __cplusplus
15719 extern "C"
15720# endif
15721 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015723int
15724main ()
15725{
15726if ((socklen_t *) 0)
15727 return 0;
15728if (sizeof (socklen_t))
15729 return 0;
15730 ;
15731 return 0;
15732}
15733_ACEOF
15734rm -f conftest.$ac_objext
15735if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15736 (eval $ac_compile) 2>&5
15737 ac_status=$?
15738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15739 (exit $ac_status); } &&
15740 { ac_try='test -s conftest.$ac_objext'
15741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15742 (eval $ac_try) 2>&5
15743 ac_status=$?
15744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15745 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015746 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015747else
Martin v. Löwis11437992002-04-12 09:54:03 +000015748 echo "$as_me: failed program was:" >&5
15749cat conftest.$ac_ext >&5
15750ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015751fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015752rm -f conftest.$ac_objext conftest.$ac_ext
15753fi
15754echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15755echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15756if test $ac_cv_type_socklen_t = yes; then
15757 :
15758else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015759
Martin v. Löwis11437992002-04-12 09:54:03 +000015760cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015761#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015762_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015763
15764fi
15765
Michael W. Hudson54241132001-12-07 15:38:26 +000015766
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015767#AC_MSG_CHECKING(for Modules/Setup)
15768#if test ! -f Modules/Setup ; then
15769# if test ! -d Modules ; then
15770# mkdir Modules
15771# fi
15772# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15773# AC_MSG_RESULT(creating)
15774#else
15775# AC_MSG_RESULT(already exists)
15776#fi
15777
Michael W. Hudson54241132001-12-07 15:38:26 +000015778
15779
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015780for h in `(cd $srcdir;echo Python/thread_*.h)`
15781do
15782 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15783done
15784
Michael W. Hudson54241132001-12-07 15:38:26 +000015785
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +000015786SRCDIRS="Parser Grammar Objects Python Modules"
Martin v. Löwis11437992002-04-12 09:54:03 +000015787echo "$as_me:$LINENO: checking for build directories" >&5
15788echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015789for dir in $SRCDIRS; do
15790 if test ! -d $dir; then
15791 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015792 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015793done
Martin v. Löwis11437992002-04-12 09:54:03 +000015794echo "$as_me:$LINENO: result: done" >&5
15795echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015796
Guido van Rossum627b2d71993-12-24 10:39:16 +000015797# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015798ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15799cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015800# This file is a shell script that caches the results of configure
15801# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015802# scripts and configure runs, see configure's option --config-cache.
15803# It is not useful on other systems. If it contains results you don't
15804# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015805#
Martin v. Löwis11437992002-04-12 09:54:03 +000015806# config.status only pays attention to the cache file if you give it
15807# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015808#
Martin v. Löwis11437992002-04-12 09:54:03 +000015809# `ac_cv_env_foo' variables (set or unset) will be overriden when
15810# loading this file, other *unset* `ac_cv_foo' will be assigned the
15811# following values.
15812
15813_ACEOF
15814
Guido van Rossumf78abae1997-01-21 22:02:36 +000015815# The following way of writing the cache mishandles newlines in values,
15816# but we know of no workaround that is simple, portable, and efficient.
15817# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015818# Ultrix sh set writes to stderr and can't be redirected directly,
15819# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015820{
15821 (set) 2>&1 |
15822 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15823 *ac_space=\ *)
15824 # `set' does not quote correctly, so add quotes (double-quote
15825 # substitution turns \\\\ into \\, and sed turns \\ into \).
15826 sed -n \
15827 "s/'/'\\\\''/g;
15828 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15829 ;;
15830 *)
15831 # `set' quotes correctly as required by POSIX, so do not add quotes.
15832 sed -n \
15833 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15834 ;;
15835 esac;
15836} |
15837 sed '
15838 t clear
15839 : clear
15840 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15841 t end
15842 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15843 : end' >>confcache
15844if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015845 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15847 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015848 else
15849 echo "not updating unwritable cache $cache_file"
15850 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015851fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015852rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015853
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015854test "x$prefix" = xNONE && prefix=$ac_default_prefix
15855# Let make expand exec_prefix.
15856test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015857
Martin v. Löwis11437992002-04-12 09:54:03 +000015858# VPATH may cause trouble with some makes, so we remove $(srcdir),
15859# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15860# trailing colons and then remove the whole line if VPATH becomes empty
15861# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015862if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15864s/:*\$(srcdir):*/:/;
15865s/:*\${srcdir}:*/:/;
15866s/:*@srcdir@:*/:/;
15867s/^\([^=]*=[ ]*\):*/\1/;
15868s/:*$//;
15869s/^[^=]*=[ ]*$//;
15870}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015871fi
15872
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015873DEFS=-DHAVE_CONFIG_H
15874
Martin v. Löwis11437992002-04-12 09:54:03 +000015875
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015876: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015877ac_clean_files_save=$ac_clean_files
15878ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15879{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15880echo "$as_me: creating $CONFIG_STATUS" >&6;}
15881cat >$CONFIG_STATUS <<_ACEOF
15882#! $SHELL
15883# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015884# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015885# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015886# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015887
Martin v. Löwis11437992002-04-12 09:54:03 +000015888debug=false
15889SHELL=\${CONFIG_SHELL-$SHELL}
15890_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015891
Martin v. Löwis11437992002-04-12 09:54:03 +000015892cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015893
Martin v. Löwis11437992002-04-12 09:54:03 +000015894## --------------------- ##
15895## M4sh Initialization. ##
15896## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015897
Martin v. Löwis11437992002-04-12 09:54:03 +000015898# Be Bourne compatible
15899if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15900 emulate sh
15901 NULLCMD=:
15902elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15903 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015904fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015905
Martin v. Löwis11437992002-04-12 09:54:03 +000015906# NLS nuisances.
15907# Support unset when possible.
15908if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15909 as_unset=unset
15910else
15911 as_unset=false
15912fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015913
Martin v. Löwis11437992002-04-12 09:54:03 +000015914(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15915 { $as_unset LANG || test "${LANG+set}" != set; } ||
15916 { LANG=C; export LANG; }
15917(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15918 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15919 { LC_ALL=C; export LC_ALL; }
15920(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15921 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15922 { LC_TIME=C; export LC_TIME; }
15923(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15924 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15925 { LC_CTYPE=C; export LC_CTYPE; }
15926(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15927 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15928 { LANGUAGE=C; export LANGUAGE; }
15929(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15930 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15931 { LC_COLLATE=C; export LC_COLLATE; }
15932(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15933 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15934 { LC_NUMERIC=C; export LC_NUMERIC; }
15935(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15936 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15937 { LC_MESSAGES=C; export LC_MESSAGES; }
15938
15939
15940# Name of the executable.
15941as_me=`(basename "$0") 2>/dev/null ||
15942$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15943 X"$0" : 'X\(//\)$' \| \
15944 X"$0" : 'X\(/\)$' \| \
15945 . : '\(.\)' 2>/dev/null ||
15946echo X/"$0" |
15947 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15948 /^X\/\(\/\/\)$/{ s//\1/; q; }
15949 /^X\/\(\/\).*/{ s//\1/; q; }
15950 s/.*/./; q'`
15951
15952# PATH needs CR, and LINENO needs CR and PATH.
15953# Avoid depending upon Character Ranges.
15954as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15955as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15956as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15957as_cr_digits='0123456789'
15958as_cr_alnum=$as_cr_Letters$as_cr_digits
15959
15960# The user is always right.
15961if test "${PATH_SEPARATOR+set}" != set; then
15962 echo "#! /bin/sh" >conftest.sh
15963 echo "exit 0" >>conftest.sh
15964 chmod +x conftest.sh
15965 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15966 PATH_SEPARATOR=';'
15967 else
15968 PATH_SEPARATOR=:
15969 fi
15970 rm -f conftest.sh
15971fi
15972
15973
15974 as_lineno_1=$LINENO
15975 as_lineno_2=$LINENO
15976 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15977 test "x$as_lineno_1" != "x$as_lineno_2" &&
15978 test "x$as_lineno_3" = "x$as_lineno_2" || {
15979 # Find who we are. Look in the path if we contain no path at all
15980 # relative or not.
15981 case $0 in
15982 *[\\/]* ) as_myself=$0 ;;
15983 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15984for as_dir in $PATH
15985do
15986 IFS=$as_save_IFS
15987 test -z "$as_dir" && as_dir=.
15988 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15989done
15990
15991 ;;
15992 esac
15993 # We did not find ourselves, most probably we were run as `sh COMMAND'
15994 # in which case we are not to be found in the path.
15995 if test "x$as_myself" = x; then
15996 as_myself=$0
15997 fi
15998 if test ! -f "$as_myself"; then
15999 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16000echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16001 { (exit 1); exit 1; }; }
16002 fi
16003 case $CONFIG_SHELL in
16004 '')
16005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16006for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16007do
16008 IFS=$as_save_IFS
16009 test -z "$as_dir" && as_dir=.
16010 for as_base in sh bash ksh sh5; do
16011 case $as_dir in
16012 /*)
16013 if ("$as_dir/$as_base" -c '
16014 as_lineno_1=$LINENO
16015 as_lineno_2=$LINENO
16016 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16017 test "x$as_lineno_1" != "x$as_lineno_2" &&
16018 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16019 CONFIG_SHELL=$as_dir/$as_base
16020 export CONFIG_SHELL
16021 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16022 fi;;
16023 esac
16024 done
16025done
16026;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016027 esac
16028
Martin v. Löwis11437992002-04-12 09:54:03 +000016029 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16030 # uniformly replaced by the line number. The first 'sed' inserts a
16031 # line-number line before each line; the second 'sed' does the real
16032 # work. The second script uses 'N' to pair each line-number line
16033 # with the numbered line, and appends trailing '-' during
16034 # substitution so that $LINENO is not a special case at line end.
16035 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16036 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16037 sed '=' <$as_myself |
16038 sed '
16039 N
16040 s,$,-,
16041 : loop
16042 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16043 t loop
16044 s,-$,,
16045 s,^['$as_cr_digits']*\n,,
16046 ' >$as_me.lineno &&
16047 chmod +x $as_me.lineno ||
16048 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16049echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16050 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016051
Martin v. Löwis11437992002-04-12 09:54:03 +000016052 # Don't try to exec as it changes $[0], causing all sort of problems
16053 # (the dirname of $[0] is not the place where we might find the
16054 # original and so on. Autoconf is especially sensible to this).
16055 . ./$as_me.lineno
16056 # Exit status is that of the last command.
16057 exit
16058}
16059
16060
16061case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16062 *c*,-n*) ECHO_N= ECHO_C='
16063' ECHO_T=' ' ;;
16064 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16065 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16066esac
16067
16068if expr a : '\(a\)' >/dev/null 2>&1; then
16069 as_expr=expr
16070else
16071 as_expr=false
16072fi
16073
16074rm -f conf$$ conf$$.exe conf$$.file
16075echo >conf$$.file
16076if ln -s conf$$.file conf$$ 2>/dev/null; then
16077 # We could just check for DJGPP; but this test a) works b) is more generic
16078 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16079 if test -f conf$$.exe; then
16080 # Don't use ln at all; we don't have any links
16081 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016082 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016083 as_ln_s='ln -s'
16084 fi
16085elif ln conf$$.file conf$$ 2>/dev/null; then
16086 as_ln_s=ln
16087else
16088 as_ln_s='cp -p'
16089fi
16090rm -f conf$$ conf$$.exe conf$$.file
16091
16092as_executable_p="test -f"
16093
16094# Sed expression to map a string onto a valid CPP name.
16095as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16096
16097# Sed expression to map a string onto a valid variable name.
16098as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16099
16100
16101# IFS
16102# We need space, tab and new line, in precisely that order.
16103as_nl='
16104'
16105IFS=" $as_nl"
16106
16107# CDPATH.
16108$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16109
16110exec 6>&1
16111
16112# Open the log real soon, to keep \$[0] and so on meaningful, and to
16113# report actual input values of CONFIG_FILES etc. instead of their
16114# values after options handling. Logging --version etc. is OK.
16115exec 5>>config.log
16116{
16117 echo
16118 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16119## Running $as_me. ##
16120_ASBOX
16121} >&5
16122cat >&5 <<_CSEOF
16123
16124This file was extended by $as_me, which was
16125generated by GNU Autoconf 2.53. Invocation command line was
16126
16127 CONFIG_FILES = $CONFIG_FILES
16128 CONFIG_HEADERS = $CONFIG_HEADERS
16129 CONFIG_LINKS = $CONFIG_LINKS
16130 CONFIG_COMMANDS = $CONFIG_COMMANDS
16131 $ $0 $@
16132
16133_CSEOF
16134echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16135echo >&5
16136_ACEOF
16137
16138# Files that config.status was made for.
16139if test -n "$ac_config_files"; then
16140 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16141fi
16142
16143if test -n "$ac_config_headers"; then
16144 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16145fi
16146
16147if test -n "$ac_config_links"; then
16148 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16149fi
16150
16151if test -n "$ac_config_commands"; then
16152 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16153fi
16154
16155cat >>$CONFIG_STATUS <<\_ACEOF
16156
16157ac_cs_usage="\
16158\`$as_me' instantiates files from templates according to the
16159current configuration.
16160
16161Usage: $0 [OPTIONS] [FILE]...
16162
16163 -h, --help print this help, then exit
16164 -V, --version print version number, then exit
16165 -d, --debug don't remove temporary files
16166 --recheck update $as_me by reconfiguring in the same conditions
16167 --file=FILE[:TEMPLATE]
16168 instantiate the configuration file FILE
16169 --header=FILE[:TEMPLATE]
16170 instantiate the configuration header FILE
16171
16172Configuration files:
16173$config_files
16174
16175Configuration headers:
16176$config_headers
16177
16178Report bugs to <bug-autoconf@gnu.org>."
16179_ACEOF
16180
16181cat >>$CONFIG_STATUS <<_ACEOF
16182ac_cs_version="\\
16183config.status
16184configured by $0, generated by GNU Autoconf 2.53,
16185 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16186
16187Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16188Free Software Foundation, Inc.
16189This config.status script is free software; the Free Software Foundation
16190gives unlimited permission to copy, distribute and modify it."
16191srcdir=$srcdir
16192INSTALL="$INSTALL"
16193_ACEOF
16194
16195cat >>$CONFIG_STATUS <<\_ACEOF
16196# If no file are specified by the user, then we need to provide default
16197# value. By we need to know if files were specified by the user.
16198ac_need_defaults=:
16199while test $# != 0
16200do
16201 case $1 in
16202 --*=*)
16203 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16204 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16205 shift
16206 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16207 shift
16208 ;;
16209 -*);;
16210 *) # This is not an option, so the user has probably given explicit
16211 # arguments.
16212 ac_need_defaults=false;;
16213 esac
16214
16215 case $1 in
16216 # Handling of the options.
16217_ACEOF
16218cat >>$CONFIG_STATUS <<_ACEOF
16219 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16220 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16221 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16222_ACEOF
16223cat >>$CONFIG_STATUS <<\_ACEOF
16224 --version | --vers* | -V )
16225 echo "$ac_cs_version"; exit 0 ;;
16226 --he | --h)
16227 # Conflict between --help and --header
16228 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16229Try \`$0 --help' for more information." >&5
16230echo "$as_me: error: ambiguous option: $1
16231Try \`$0 --help' for more information." >&2;}
16232 { (exit 1); exit 1; }; };;
16233 --help | --hel | -h )
16234 echo "$ac_cs_usage"; exit 0 ;;
16235 --debug | --d* | -d )
16236 debug=: ;;
16237 --file | --fil | --fi | --f )
16238 shift
16239 CONFIG_FILES="$CONFIG_FILES $1"
16240 ac_need_defaults=false;;
16241 --header | --heade | --head | --hea )
16242 shift
16243 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16244 ac_need_defaults=false;;
16245
16246 # This is an error.
16247 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16248Try \`$0 --help' for more information." >&5
16249echo "$as_me: error: unrecognized option: $1
16250Try \`$0 --help' for more information." >&2;}
16251 { (exit 1); exit 1; }; } ;;
16252
16253 *) ac_config_targets="$ac_config_targets $1" ;;
16254
16255 esac
16256 shift
16257done
16258
16259_ACEOF
16260
16261
16262
16263
16264
16265cat >>$CONFIG_STATUS <<\_ACEOF
16266for ac_config_target in $ac_config_targets
16267do
16268 case "$ac_config_target" in
16269 # Handling of arguments.
16270 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16271 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16272 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16273 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16274echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16275 { (exit 1); exit 1; }; };;
16276 esac
16277done
16278
16279# If the user did not use the arguments to specify the items to instantiate,
16280# then the envvar interface is used. Set only those that are not.
16281# We use the long form for the default assignment because of an extremely
16282# bizarre bug on SunOS 4.1.3.
16283if $ac_need_defaults; then
16284 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16285 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16286fi
16287
16288# Create a temporary directory, and hook for its removal unless debugging.
16289$debug ||
16290{
16291 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16292 trap '{ (exit 1); exit 1; }' 1 2 13 15
16293}
16294
16295# Create a (secure) tmp directory for tmp files.
16296: ${TMPDIR=/tmp}
16297{
16298 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16299 test -n "$tmp" && test -d "$tmp"
16300} ||
16301{
16302 tmp=$TMPDIR/cs$$-$RANDOM
16303 (umask 077 && mkdir $tmp)
16304} ||
16305{
16306 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16307 { (exit 1); exit 1; }
16308}
16309
16310_ACEOF
16311
16312cat >>$CONFIG_STATUS <<_ACEOF
16313
16314#
16315# CONFIG_FILES section.
16316#
16317
16318# No need to generate the scripts if there are no CONFIG_FILES.
16319# This happens for instance when ./config.status config.h
16320if test -n "\$CONFIG_FILES"; then
16321 # Protect against being on the right side of a sed subst in config.status.
16322 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16323 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16324s,@SHELL@,$SHELL,;t t
16325s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16326s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16327s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16328s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16329s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16330s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16331s,@exec_prefix@,$exec_prefix,;t t
16332s,@prefix@,$prefix,;t t
16333s,@program_transform_name@,$program_transform_name,;t t
16334s,@bindir@,$bindir,;t t
16335s,@sbindir@,$sbindir,;t t
16336s,@libexecdir@,$libexecdir,;t t
16337s,@datadir@,$datadir,;t t
16338s,@sysconfdir@,$sysconfdir,;t t
16339s,@sharedstatedir@,$sharedstatedir,;t t
16340s,@localstatedir@,$localstatedir,;t t
16341s,@libdir@,$libdir,;t t
16342s,@includedir@,$includedir,;t t
16343s,@oldincludedir@,$oldincludedir,;t t
16344s,@infodir@,$infodir,;t t
16345s,@mandir@,$mandir,;t t
16346s,@build_alias@,$build_alias,;t t
16347s,@host_alias@,$host_alias,;t t
16348s,@target_alias@,$target_alias,;t t
16349s,@DEFS@,$DEFS,;t t
16350s,@ECHO_C@,$ECHO_C,;t t
16351s,@ECHO_N@,$ECHO_N,;t t
16352s,@ECHO_T@,$ECHO_T,;t t
16353s,@LIBS@,$LIBS,;t t
16354s,@VERSION@,$VERSION,;t t
16355s,@SOVERSION@,$SOVERSION,;t t
16356s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16357s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16358s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16359s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16360s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16361s,@MACHDEP@,$MACHDEP,;t t
16362s,@SGI_ABI@,$SGI_ABI,;t t
16363s,@CXX@,$CXX,;t t
16364s,@MAINOBJ@,$MAINOBJ,;t t
16365s,@EXEEXT@,$EXEEXT,;t t
16366s,@CC@,$CC,;t t
16367s,@CFLAGS@,$CFLAGS,;t t
16368s,@LDFLAGS@,$LDFLAGS,;t t
16369s,@CPPFLAGS@,$CPPFLAGS,;t t
16370s,@ac_ct_CC@,$ac_ct_CC,;t t
16371s,@OBJEXT@,$OBJEXT,;t t
16372s,@CPP@,$CPP,;t t
16373s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16374s,@LIBRARY@,$LIBRARY,;t t
16375s,@LDLIBRARY@,$LDLIBRARY,;t t
16376s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16377s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16378s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16379s,@INSTSONAME@,$INSTSONAME,;t t
16380s,@RUNSHARED@,$RUNSHARED,;t t
16381s,@LINKCC@,$LINKCC,;t t
16382s,@RANLIB@,$RANLIB,;t t
16383s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16384s,@AR@,$AR,;t t
16385s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16386s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16387s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16388s,@LN@,$LN,;t t
16389s,@OPT@,$OPT,;t t
16390s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16391s,@SO@,$SO,;t t
16392s,@LDSHARED@,$LDSHARED,;t t
16393s,@BLDSHARED@,$BLDSHARED,;t t
16394s,@CCSHARED@,$CCSHARED,;t t
16395s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16396s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
16397s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16398s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16399s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16400s,@LDLAST@,$LDLAST,;t t
16401s,@THREADOBJ@,$THREADOBJ,;t t
16402s,@DLINCLDIR@,$DLINCLDIR,;t t
16403s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16404s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16405s,@LIBOBJS@,$LIBOBJS,;t t
16406s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16407s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16408s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16409s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16410s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16411s,@LIBM@,$LIBM,;t t
16412s,@LIBC@,$LIBC,;t t
16413s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16414s,@THREADHEADERS@,$THREADHEADERS,;t t
16415s,@SRCDIRS@,$SRCDIRS,;t t
16416CEOF
16417
16418_ACEOF
16419
16420 cat >>$CONFIG_STATUS <<\_ACEOF
16421 # Split the substitutions into bite-sized pieces for seds with
16422 # small command number limits, like on Digital OSF/1 and HP-UX.
16423 ac_max_sed_lines=48
16424 ac_sed_frag=1 # Number of current file.
16425 ac_beg=1 # First line for current file.
16426 ac_end=$ac_max_sed_lines # Line after last line for current file.
16427 ac_more_lines=:
16428 ac_sed_cmds=
16429 while $ac_more_lines; do
16430 if test $ac_beg -gt 1; then
16431 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16432 else
16433 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16434 fi
16435 if test ! -s $tmp/subs.frag; then
16436 ac_more_lines=false
16437 else
16438 # The purpose of the label and of the branching condition is to
16439 # speed up the sed processing (if there are no `@' at all, there
16440 # is no need to browse any of the substitutions).
16441 # These are the two extra sed commands mentioned above.
16442 (echo ':t
16443 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16444 if test -z "$ac_sed_cmds"; then
16445 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16446 else
16447 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16448 fi
16449 ac_sed_frag=`expr $ac_sed_frag + 1`
16450 ac_beg=$ac_end
16451 ac_end=`expr $ac_end + $ac_max_sed_lines`
16452 fi
16453 done
16454 if test -z "$ac_sed_cmds"; then
16455 ac_sed_cmds=cat
16456 fi
16457fi # test -n "$CONFIG_FILES"
16458
16459_ACEOF
16460cat >>$CONFIG_STATUS <<\_ACEOF
16461for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16462 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16463 case $ac_file in
16464 - | *:- | *:-:* ) # input from stdin
16465 cat >$tmp/stdin
16466 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16467 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16468 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16469 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16470 * ) ac_file_in=$ac_file.in ;;
16471 esac
16472
16473 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16474 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16475$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16476 X"$ac_file" : 'X\(//\)[^/]' \| \
16477 X"$ac_file" : 'X\(//\)$' \| \
16478 X"$ac_file" : 'X\(/\)' \| \
16479 . : '\(.\)' 2>/dev/null ||
16480echo X"$ac_file" |
16481 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16482 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16483 /^X\(\/\/\)$/{ s//\1/; q; }
16484 /^X\(\/\).*/{ s//\1/; q; }
16485 s/.*/./; q'`
16486 { case "$ac_dir" in
16487 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16488 *) as_incr_dir=.;;
16489esac
16490as_dummy="$ac_dir"
16491for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16492 case $as_mkdir_dir in
16493 # Skip DOS drivespec
16494 ?:) as_incr_dir=$as_mkdir_dir ;;
16495 *)
16496 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16497 test -d "$as_incr_dir" ||
16498 mkdir "$as_incr_dir" ||
16499 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16500echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16501 { (exit 1); exit 1; }; }
16502 ;;
16503 esac
16504done; }
16505
16506 ac_builddir=.
16507
16508if test "$ac_dir" != .; then
16509 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16510 # A "../" for each directory in $ac_dir_suffix.
16511 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16512else
16513 ac_dir_suffix= ac_top_builddir=
16514fi
16515
16516case $srcdir in
16517 .) # No --srcdir option. We are building in place.
16518 ac_srcdir=.
16519 if test -z "$ac_top_builddir"; then
16520 ac_top_srcdir=.
16521 else
16522 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16523 fi ;;
16524 [\\/]* | ?:[\\/]* ) # Absolute path.
16525 ac_srcdir=$srcdir$ac_dir_suffix;
16526 ac_top_srcdir=$srcdir ;;
16527 *) # Relative path.
16528 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16529 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16530esac
16531# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16532# absolute.
16533ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16534ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16535ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16536ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16537
16538
16539 case $INSTALL in
16540 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16541 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16542 esac
16543
16544 if test x"$ac_file" != x-; then
16545 { echo "$as_me:$LINENO: creating $ac_file" >&5
16546echo "$as_me: creating $ac_file" >&6;}
16547 rm -f "$ac_file"
16548 fi
16549 # Let's still pretend it is `configure' which instantiates (i.e., don't
16550 # use $as_me), people would be surprised to read:
16551 # /* config.h. Generated by config.status. */
16552 if test x"$ac_file" = x-; then
16553 configure_input=
16554 else
16555 configure_input="$ac_file. "
16556 fi
16557 configure_input=$configure_input"Generated from `echo $ac_file_in |
16558 sed 's,.*/,,'` by configure."
16559
16560 # First look for the input files in the build tree, otherwise in the
16561 # src tree.
16562 ac_file_inputs=`IFS=:
16563 for f in $ac_file_in; do
16564 case $f in
16565 -) echo $tmp/stdin ;;
16566 [\\/$]*)
16567 # Absolute (can't be DOS-style, as IFS=:)
16568 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16569echo "$as_me: error: cannot find input file: $f" >&2;}
16570 { (exit 1); exit 1; }; }
16571 echo $f;;
16572 *) # Relative
16573 if test -f "$f"; then
16574 # Build tree
16575 echo $f
16576 elif test -f "$srcdir/$f"; then
16577 # Source tree
16578 echo $srcdir/$f
16579 else
16580 # /dev/null tree
16581 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16582echo "$as_me: error: cannot find input file: $f" >&2;}
16583 { (exit 1); exit 1; }; }
16584 fi;;
16585 esac
16586 done` || { (exit 1); exit 1; }
16587_ACEOF
16588cat >>$CONFIG_STATUS <<_ACEOF
16589 sed "$ac_vpsub
16590$extrasub
16591_ACEOF
16592cat >>$CONFIG_STATUS <<\_ACEOF
16593:t
16594/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16595s,@configure_input@,$configure_input,;t t
16596s,@srcdir@,$ac_srcdir,;t t
16597s,@abs_srcdir@,$ac_abs_srcdir,;t t
16598s,@top_srcdir@,$ac_top_srcdir,;t t
16599s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16600s,@builddir@,$ac_builddir,;t t
16601s,@abs_builddir@,$ac_abs_builddir,;t t
16602s,@top_builddir@,$ac_top_builddir,;t t
16603s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16604s,@INSTALL@,$ac_INSTALL,;t t
16605" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16606 rm -f $tmp/stdin
16607 if test x"$ac_file" != x-; then
16608 mv $tmp/out $ac_file
16609 else
16610 cat $tmp/out
16611 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016612 fi
16613
Martin v. Löwis11437992002-04-12 09:54:03 +000016614done
16615_ACEOF
16616cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016617
Martin v. Löwis11437992002-04-12 09:54:03 +000016618#
16619# CONFIG_HEADER section.
16620#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016621
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016622# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16623# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016624#
16625# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016626ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16627ac_dB='[ ].*$,\1#\2'
16628ac_dC=' '
16629ac_dD=',;t'
16630# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16631ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16632ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016633ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016634ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016635
Martin v. Löwis11437992002-04-12 09:54:03 +000016636for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016637 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016638 case $ac_file in
16639 - | *:- | *:-:* ) # input from stdin
16640 cat >$tmp/stdin
16641 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16642 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16643 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16644 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16645 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016646 esac
16647
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16649echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016650
Martin v. Löwis11437992002-04-12 09:54:03 +000016651 # First look for the input files in the build tree, otherwise in the
16652 # src tree.
16653 ac_file_inputs=`IFS=:
16654 for f in $ac_file_in; do
16655 case $f in
16656 -) echo $tmp/stdin ;;
16657 [\\/$]*)
16658 # Absolute (can't be DOS-style, as IFS=:)
16659 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16660echo "$as_me: error: cannot find input file: $f" >&2;}
16661 { (exit 1); exit 1; }; }
16662 echo $f;;
16663 *) # Relative
16664 if test -f "$f"; then
16665 # Build tree
16666 echo $f
16667 elif test -f "$srcdir/$f"; then
16668 # Source tree
16669 echo $srcdir/$f
16670 else
16671 # /dev/null tree
16672 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16673echo "$as_me: error: cannot find input file: $f" >&2;}
16674 { (exit 1); exit 1; }; }
16675 fi;;
16676 esac
16677 done` || { (exit 1); exit 1; }
16678 # Remove the trailing spaces.
16679 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016680
Martin v. Löwis11437992002-04-12 09:54:03 +000016681_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016682
Martin v. Löwis11437992002-04-12 09:54:03 +000016683# Transform confdefs.h into two sed scripts, `conftest.defines' and
16684# `conftest.undefs', that substitutes the proper values into
16685# config.h.in to produce config.h. The first handles `#define'
16686# templates, and the second `#undef' templates.
16687# And first: Protect against being on the right side of a sed subst in
16688# config.status. Protect against being in an unquoted here document
16689# in config.status.
16690rm -f conftest.defines conftest.undefs
16691# Using a here document instead of a string reduces the quoting nightmare.
16692# Putting comments in sed scripts is not portable.
16693#
16694# `end' is used to avoid that the second main sed command (meant for
16695# 0-ary CPP macros) applies to n-ary macro definitions.
16696# See the Autoconf documentation for `clear'.
16697cat >confdef2sed.sed <<\_ACEOF
16698s/[\\&,]/\\&/g
16699s,[\\$`],\\&,g
16700t clear
16701: clear
16702s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16703t end
16704s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16705: end
16706_ACEOF
16707# If some macros were called several times there might be several times
16708# the same #defines, which is useless. Nevertheless, we may not want to
16709# sort them, since we want the *last* AC-DEFINE to be honored.
16710uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16711sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16712rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016713
16714# This sed command replaces #undef with comments. This is necessary, for
16715# example, in the case of _POSIX_SOURCE, which is predefined and required
16716# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016717cat >>conftest.undefs <<\_ACEOF
16718s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16719_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016720
Martin v. Löwis11437992002-04-12 09:54:03 +000016721# Break up conftest.defines because some shells have a limit on the size
16722# of here documents, and old seds have small limits too (100 cmds).
16723echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16724echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16725echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16726echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016727rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016728while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016729do
Martin v. Löwis11437992002-04-12 09:54:03 +000016730 # Write a limited-size here document to $tmp/defines.sed.
16731 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16732 # Speed up: don't consider the non `#define' lines.
16733 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16734 # Work around the forget-to-reset-the-flag bug.
16735 echo 't clr' >>$CONFIG_STATUS
16736 echo ': clr' >>$CONFIG_STATUS
16737 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016738 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016739 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16740 rm -f $tmp/in
16741 mv $tmp/out $tmp/in
16742' >>$CONFIG_STATUS
16743 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16744 rm -f conftest.defines
16745 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016746done
Martin v. Löwis11437992002-04-12 09:54:03 +000016747rm -f conftest.defines
16748echo ' fi # egrep' >>$CONFIG_STATUS
16749echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016750
Martin v. Löwis11437992002-04-12 09:54:03 +000016751# Break up conftest.undefs because some shells have a limit on the size
16752# of here documents, and old seds have small limits too (100 cmds).
16753echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16754rm -f conftest.tail
16755while grep . conftest.undefs >/dev/null
16756do
16757 # Write a limited-size here document to $tmp/undefs.sed.
16758 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16759 # Speed up: don't consider the non `#undef'
16760 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16761 # Work around the forget-to-reset-the-flag bug.
16762 echo 't clr' >>$CONFIG_STATUS
16763 echo ': clr' >>$CONFIG_STATUS
16764 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16765 echo 'CEOF
16766 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16767 rm -f $tmp/in
16768 mv $tmp/out $tmp/in
16769' >>$CONFIG_STATUS
16770 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16771 rm -f conftest.undefs
16772 mv conftest.tail conftest.undefs
16773done
16774rm -f conftest.undefs
16775
16776cat >>$CONFIG_STATUS <<\_ACEOF
16777 # Let's still pretend it is `configure' which instantiates (i.e., don't
16778 # use $as_me), people would be surprised to read:
16779 # /* config.h. Generated by config.status. */
16780 if test x"$ac_file" = x-; then
16781 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016782 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016783 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016784 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016785 cat $tmp/in >>$tmp/config.h
16786 rm -f $tmp/in
16787 if test x"$ac_file" != x-; then
16788 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16789 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16790echo "$as_me: $ac_file is unchanged" >&6;}
16791 else
16792 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16793$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16794 X"$ac_file" : 'X\(//\)[^/]' \| \
16795 X"$ac_file" : 'X\(//\)$' \| \
16796 X"$ac_file" : 'X\(/\)' \| \
16797 . : '\(.\)' 2>/dev/null ||
16798echo X"$ac_file" |
16799 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16800 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16801 /^X\(\/\/\)$/{ s//\1/; q; }
16802 /^X\(\/\).*/{ s//\1/; q; }
16803 s/.*/./; q'`
16804 { case "$ac_dir" in
16805 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16806 *) as_incr_dir=.;;
16807esac
16808as_dummy="$ac_dir"
16809for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16810 case $as_mkdir_dir in
16811 # Skip DOS drivespec
16812 ?:) as_incr_dir=$as_mkdir_dir ;;
16813 *)
16814 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16815 test -d "$as_incr_dir" ||
16816 mkdir "$as_incr_dir" ||
16817 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16818echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16819 { (exit 1); exit 1; }; }
16820 ;;
16821 esac
16822done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016823
Martin v. Löwis11437992002-04-12 09:54:03 +000016824 rm -f $ac_file
16825 mv $tmp/config.h $ac_file
16826 fi
16827 else
16828 cat $tmp/config.h
16829 rm -f $tmp/config.h
16830 fi
16831done
16832_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016833
Martin v. Löwis11437992002-04-12 09:54:03 +000016834cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016835
Martin v. Löwis11437992002-04-12 09:54:03 +000016836{ (exit 0); exit 0; }
16837_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016838chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016839ac_clean_files=$ac_clean_files_save
16840
16841
16842# configure is writing to config.log, and then calls config.status.
16843# config.status does its own redirection, appending to config.log.
16844# Unfortunately, on DOS this fails, as config.log is still kept open
16845# by configure, so config.status won't be able to write to it; its
16846# output is simply discarded. So we exec the FD to /dev/null,
16847# effectively closing config.log, so it can be properly (re)opened and
16848# appended to by config.status. When coming back to configure, we
16849# need to make the FD available again.
16850if test "$no_create" != yes; then
16851 ac_cs_success=:
16852 exec 5>/dev/null
16853 $SHELL $CONFIG_STATUS || ac_cs_success=false
16854 exec 5>>config.log
16855 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16856 # would make configure fail if this is the last instruction.
16857 $ac_cs_success || { (exit 1); exit 1; }
16858fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016859
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016860
16861echo "creating Setup"
16862if test ! -f Modules/Setup
16863then
16864 cp $srcdir/Modules/Setup.dist Modules/Setup
16865fi
16866
16867echo "creating Setup.local"
16868if test ! -f Modules/Setup.local
16869then
16870 echo "# Edit this file for local setup changes" >Modules/Setup.local
16871fi
16872
16873echo "creating Makefile"
16874$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16875 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016876 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016877mv config.c Modules