blob: 1641fd10a4e59c7b18fee1aa31da0bf67f93b083 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jeremy Hylton5a7ef7e2002-07-18 22:39:34 +00002# From configure.in Revision: 1.330 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis11437992002-04-12 09:54:03 +00004# Generated by GNU Autoconf 2.53.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
30# NLS nuisances.
31# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
38(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
256PACKAGE_NAME=
257PACKAGE_TARNAME=
258PACKAGE_VERSION=
259PACKAGE_STRING=
260PACKAGE_BUGREPORT=
261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
764\`configure' configures this package to adapt to many kinds of systems.
765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
820
821 cat <<\_ACEOF
822
823Optional Features:
824 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
825 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
826 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
827 --enable-shared disable/enable building shared python library
828 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
829 --enable-ipv6 Enable ipv6 (with ipv4) support
830 --disable-ipv6 Disable ipv6 support
831 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
832
833Optional Packages:
834 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
835 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
836 --without-gcc never use gcc
837 --with-cxx=<compiler> enable C++ support
838 --with-suffix=.exe set executable suffix
839 --with-pydebug build with Py_DEBUG defined
840 --with-libs='lib1 ...' link against additional libs
841 --with-signal-module disable/enable signal module
842 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
843 --with(out)-threads=DIRECTORY disable/enable thread support
844 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
845 --with-pth use GNU pth threading libraries
Jack Jansen7b8c7542002-04-14 20:12:41 +0000846 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +0000847 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 --with(out)-pymalloc disable/enable specialized mallocs
849 --with-wctype-functions use wctype.h functions
850 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
851 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
852 --with-fpectl enable SIGFPE catching
853 --with-libm=STRING math library
854 --with-libc=STRING C library
855
856Some influential environment variables:
857 CC C compiler command
858 CFLAGS C compiler flags
859 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
860 nonstandard directory <lib dir>
861 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
862 headers in a nonstandard directory <include dir>
863 CPP C preprocessor
864
865Use these variables to override the choices made by `configure' or to help
866it to find libraries and programs with nonstandard names/locations.
867
868_ACEOF
869fi
870
871if test "$ac_init_help" = "recursive"; then
872 # If there are subdirs, report their specific --help.
873 ac_popdir=`pwd`
874 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
875 test -d $ac_dir || continue
876 ac_builddir=.
877
878if test "$ac_dir" != .; then
879 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
880 # A "../" for each directory in $ac_dir_suffix.
881 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
882else
883 ac_dir_suffix= ac_top_builddir=
884fi
885
886case $srcdir in
887 .) # No --srcdir option. We are building in place.
888 ac_srcdir=.
889 if test -z "$ac_top_builddir"; then
890 ac_top_srcdir=.
891 else
892 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
893 fi ;;
894 [\\/]* | ?:[\\/]* ) # Absolute path.
895 ac_srcdir=$srcdir$ac_dir_suffix;
896 ac_top_srcdir=$srcdir ;;
897 *) # Relative path.
898 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
899 ac_top_srcdir=$ac_top_builddir$srcdir ;;
900esac
901# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
902# absolute.
903ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
904ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
905ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
906ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
907
908 cd $ac_dir
909 # Check for guested configure; otherwise get Cygnus style configure.
910 if test -f $ac_srcdir/configure.gnu; then
911 echo
912 $SHELL $ac_srcdir/configure.gnu --help=recursive
913 elif test -f $ac_srcdir/configure; then
914 echo
915 $SHELL $ac_srcdir/configure --help=recursive
916 elif test -f $ac_srcdir/configure.ac ||
917 test -f $ac_srcdir/configure.in; then
918 echo
919 $ac_configure --help
920 else
921 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
922 fi
923 cd $ac_popdir
924 done
925fi
926
927test -n "$ac_init_help" && exit 0
928if $ac_init_version; then
929 cat <<\_ACEOF
930
931Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
932Free Software Foundation, Inc.
933This configure script is free software; the Free Software Foundation
934gives unlimited permission to copy, distribute and modify it.
935_ACEOF
936 exit 0
937fi
938exec 5>config.log
939cat >&5 <<_ACEOF
940This file contains any messages produced by compilers while
941running configure, to aid debugging if configure makes a mistake.
942
943It was created by $as_me, which was
944generated by GNU Autoconf 2.53. Invocation command line was
945
946 $ $0 $@
947
948_ACEOF
949{
950cat <<_ASUNAME
951## --------- ##
952## Platform. ##
953## --------- ##
954
955hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
956uname -m = `(uname -m) 2>/dev/null || echo unknown`
957uname -r = `(uname -r) 2>/dev/null || echo unknown`
958uname -s = `(uname -s) 2>/dev/null || echo unknown`
959uname -v = `(uname -v) 2>/dev/null || echo unknown`
960
961/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
962/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
963
964/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
965/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
966/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
967hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
968/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
969/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
970/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
971
972_ASUNAME
973
974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
975for as_dir in $PATH
976do
977 IFS=$as_save_IFS
978 test -z "$as_dir" && as_dir=.
979 echo "PATH: $as_dir"
980done
981
982} >&5
983
984cat >&5 <<_ACEOF
985
986
987## ----------- ##
988## Core tests. ##
989## ----------- ##
990
991_ACEOF
992
993
994# Keep a trace of the command line.
995# Strip out --no-create and --no-recursion so they do not pile up.
996# Also quote any args containing shell meta-characters.
997ac_configure_args=
998ac_sep=
999for ac_arg
1000do
1001 case $ac_arg in
1002 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003 | --no-cr | --no-c | -n ) continue ;;
1004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 continue ;;
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1009 esac
1010 case " $ac_configure_args " in
1011 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1012 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1013 ac_sep=" " ;;
1014 esac
1015 # Get rid of the leading space.
1016done
1017
1018# When interrupted or exit'd, cleanup temporary files, and complete
1019# config.log. We remove comments because anyway the quotes in there
1020# would cause problems or look ugly.
1021# WARNING: Be sure not to use single quotes in there, as some shells,
1022# such as our DU 5.0 friend, will then `close' the trap.
1023trap 'exit_status=$?
1024 # Save into config.log some information that might help in debugging.
1025 {
1026 echo
1027 cat <<\_ASBOX
1028## ---------------- ##
1029## Cache variables. ##
1030## ---------------- ##
1031_ASBOX
1032 echo
1033 # The following way of writing the cache mishandles newlines in values,
1034{
1035 (set) 2>&1 |
1036 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1037 *ac_space=\ *)
1038 sed -n \
1039 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1040 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1041 ;;
1042 *)
1043 sed -n \
1044 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1045 ;;
1046 esac;
1047}
1048 echo
1049 if test -s confdefs.h; then
1050 cat <<\_ASBOX
1051## ----------- ##
1052## confdefs.h. ##
1053## ----------- ##
1054_ASBOX
1055 echo
1056 sed "/^$/d" confdefs.h
1057 echo
1058 fi
1059 test "$ac_signal" != 0 &&
1060 echo "$as_me: caught signal $ac_signal"
1061 echo "$as_me: exit $exit_status"
1062 } >&5
1063 rm -f core core.* *.core &&
1064 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1065 exit $exit_status
1066 ' 0
1067for ac_signal in 1 2 13 15; do
1068 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1069done
1070ac_signal=0
1071
1072# confdefs.h avoids OS command line length limits that DEFS can exceed.
1073rm -rf conftest* confdefs.h
1074# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1075echo >confdefs.h
1076
1077# Predefined preprocessor variables.
1078
1079cat >>confdefs.h <<_ACEOF
1080#define PACKAGE_NAME "$PACKAGE_NAME"
1081_ACEOF
1082
1083
1084cat >>confdefs.h <<_ACEOF
1085#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1086_ACEOF
1087
1088
1089cat >>confdefs.h <<_ACEOF
1090#define PACKAGE_VERSION "$PACKAGE_VERSION"
1091_ACEOF
1092
1093
1094cat >>confdefs.h <<_ACEOF
1095#define PACKAGE_STRING "$PACKAGE_STRING"
1096_ACEOF
1097
1098
1099cat >>confdefs.h <<_ACEOF
1100#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1101_ACEOF
1102
1103
1104# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105# Prefer explicitly selected file to automatically selected ones.
1106if test -z "$CONFIG_SITE"; then
1107 if test "x$prefix" != xNONE; then
1108 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1109 else
1110 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1111 fi
1112fi
1113for ac_site_file in $CONFIG_SITE; do
1114 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1116echo "$as_me: loading site script $ac_site_file" >&6;}
1117 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 . "$ac_site_file"
1119 fi
1120done
1121
1122if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # Some versions of bash will fail to source /dev/null (special
1124 # files actually), so we avoid doing that.
1125 if test -f "$cache_file"; then
1126 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1127echo "$as_me: loading cache $cache_file" >&6;}
1128 case $cache_file in
1129 [\\/]* | ?:[\\/]* ) . $cache_file;;
1130 *) . ./$cache_file;;
1131 esac
1132 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133else
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1135echo "$as_me: creating cache $cache_file" >&6;}
1136 >$cache_file
1137fi
1138
1139# Check that the precious variables saved in the cache have kept the same
1140# value.
1141ac_cache_corrupted=false
1142for ac_var in `(set) 2>&1 |
1143 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1144 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1145 eval ac_new_set=\$ac_env_${ac_var}_set
1146 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1147 eval ac_new_val="\$ac_env_${ac_var}_value"
1148 case $ac_old_set,$ac_new_set in
1149 set,)
1150 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1151echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1152 ac_cache_corrupted=: ;;
1153 ,set)
1154 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1155echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1156 ac_cache_corrupted=: ;;
1157 ,);;
1158 *)
1159 if test "x$ac_old_val" != "x$ac_new_val"; then
1160 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1161echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1162 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1163echo "$as_me: former value: $ac_old_val" >&2;}
1164 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1165echo "$as_me: current value: $ac_new_val" >&2;}
1166 ac_cache_corrupted=:
1167 fi;;
1168 esac
1169 # Pass precious variables to config.status.
1170 if test "$ac_new_set" = set; then
1171 case $ac_new_val in
1172 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1173 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1174 *) ac_arg=$ac_var=$ac_new_val ;;
1175 esac
1176 case " $ac_configure_args " in
1177 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1178 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1179 esac
1180 fi
1181done
1182if $ac_cache_corrupted; then
1183 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1184echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1185 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1186echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1187 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188fi
1189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1194ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196
Michael W. Hudson54241132001-12-07 15:38:26 +00001197
1198
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213ac_config_headers="$ac_config_headers pyconfig.h"
1214
1215
1216# This is for stuff that absolutely must end up in pyconfig.h.
1217# Please use pyport.h instead, if possible.
1218
1219
1220
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001221# Set VERSION so we only need to edit in one place (i.e., here)
1222
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001223VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001224
Martin v. Löwis1142de32002-03-29 16:28:31 +00001225
1226SOVERSION=1.0
1227
Jeremy Hylton5a7ef7e2002-07-18 22:39:34 +00001228cat >>confdefs.h <<\_ACEOF
1229#define _XOPEN_SOURCE 500
1230_ACEOF
1231
1232
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001233# Arguments passed to configure.
1234
1235CONFIG_ARGS="$ac_configure_args"
1236
Michael W. Hudson54241132001-12-07 15:38:26 +00001237
Jack Jansene578a632001-08-15 01:27:14 +00001238# Check whether --enable-framework or --disable-framework was given.
1239if test "${enable_framework+set}" = set; then
1240 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001241
Jack Jansene578a632001-08-15 01:27:14 +00001242 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001244 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001245 esac
1246 case $enableval in
1247 no)
1248 PYTHONFRAMEWORK=
1249 PYTHONFRAMEWORKDIR=no-framework
1250 PYTHONFRAMEWORKPREFIX=
1251 PYTHONFRAMEWORKINSTALLDIR=
1252 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001253 ;;
1254 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001255 PYTHONFRAMEWORK=Python
1256 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001257 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001258 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1259 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001260 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001261
Guido van Rossum563e7081996-09-10 18:20:48 +00001262else
Martin v. Löwis11437992002-04-12 09:54:03 +00001263
Jack Jansene578a632001-08-15 01:27:14 +00001264 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001265 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001266 PYTHONFRAMEWORKPREFIX=
1267 PYTHONFRAMEWORKINSTALLDIR=
1268 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001271
1272
1273
1274
Jack Jansene578a632001-08-15 01:27:14 +00001275
1276##AC_ARG_WITH(dyld,
1277##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1278##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001279# Set name for machine-dependent library files
1280
Martin v. Löwis11437992002-04-12 09:54:03 +00001281echo "$as_me:$LINENO: checking MACHDEP" >&5
1282echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001283if test -z "$MACHDEP"
1284then
Guido van Rossum563e7081996-09-10 18:20:48 +00001285 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001286 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001287 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001288 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001289 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001290 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001291 ac_md_system=`echo $ac_sys_system |
1292 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1293 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001294 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001295 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001296
Guido van Rossum07397971997-04-29 21:49:50 +00001297 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001298 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001299 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001300 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001301 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001302 esac
1303fi
Guido van Rossum91922671997-10-09 20:24:13 +00001304
1305#
1306# SGI compilers allow the specification of the both the ABI and the
1307# ISA on the command line. Depending on the values of these switches,
1308# different and often incompatable code will be generated.
1309#
1310# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1311# thus supply support for various ABI/ISA combinations. The MACHDEP
1312# variable is also adjusted.
1313#
1314
1315if test ! -z "$SGI_ABI"
1316then
1317 CC="cc $SGI_ABI"
1318 LDFLAGS="$SGI_ABI $LDFLAGS"
1319 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1320fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001321echo "$as_me:$LINENO: result: $MACHDEP" >&5
1322echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001325echo "$as_me:$LINENO: checking for --without-gcc" >&5
1326echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1327
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001328# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001329if test "${with_gcc+set}" = set; then
1330 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001331
Guido van Rossum7f43da71994-08-01 12:15:30 +00001332 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001333 no) CC=cc
1334 without_gcc=yes;;
1335 yes) CC=gcc
1336 without_gcc=no;;
1337 *) CC=$withval
1338 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001339 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001340else
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001342 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001343 AIX*) CC=cc_r
1344 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001345 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001346 case $BE_HOST_CPU in
1347 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001348 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001349 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +00001350 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 +00001351 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001352 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001353 ;;
1354 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001355 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001356 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001357 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001358 ;;
1359 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001360 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1361echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1362 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001363 ;;
1364 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001365 AR="\$(srcdir)/Modules/ar_beos"
1366 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001367 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001368 Monterey*)
1369 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001370 without_gcc=;;
1371 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001372 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001373fi;
1374echo "$as_me:$LINENO: result: $without_gcc" >&5
1375echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001376
1377
Guido van Rossum95012191999-12-16 17:50:52 +00001378
Fred Drakea1a84e72001-03-06 05:52:16 +00001379MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001380echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1381echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1382
Guido van Rossum95012191999-12-16 17:50:52 +00001383# Check whether --with-cxx or --without-cxx was given.
1384if test "${with_cxx+set}" = set; then
1385 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
Martin v. Löwis22352952000-12-13 17:37:02 +00001387 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001388 case $withval in
1389 no) CXX=
1390 with_cxx=no;;
1391 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001392 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001393 with_cxx=$withval;;
1394 esac
1395else
Martin v. Löwis11437992002-04-12 09:54:03 +00001396
Guido van Rossum95012191999-12-16 17:50:52 +00001397 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001398 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001399
Martin v. Löwis11437992002-04-12 09:54:03 +00001400fi;
1401echo "$as_me:$LINENO: result: $with_cxx" >&5
1402echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001403
1404if test "$with_cxx" = "yes"
1405then
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1407echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1408 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001409fi
1410
1411
1412
1413
Martin v. Löwis11437992002-04-12 09:54:03 +00001414if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001415then
1416 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1417do
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 # 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 +00001419set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001420echo "$as_me:$LINENO: checking for $ac_word" >&5
1421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1422if test "${ac_cv_prog_CXX+set}" = set; then
1423 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001424else
1425 if test -n "$CXX"; then
1426 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1427else
Martin v. Löwis11437992002-04-12 09:54:03 +00001428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1429for as_dir in $PATH
1430do
1431 IFS=$as_save_IFS
1432 test -z "$as_dir" && as_dir=.
1433 for ac_exec_ext in '' $ac_executable_extensions; do
1434 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1435 ac_cv_prog_CXX="$ac_prog"
1436 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1437 break 2
1438 fi
1439done
1440done
1441
Martin v. Löwis22352952000-12-13 17:37:02 +00001442fi
1443fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001444CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001445if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 echo "$as_me:$LINENO: result: $CXX" >&5
1447echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001448else
Martin v. Löwis11437992002-04-12 09:54:03 +00001449 echo "$as_me:$LINENO: result: no" >&5
1450echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001451fi
1452
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001454done
1455test -n "$CXX" || CXX="notfound"
1456
1457 if test "$CXX" = "notfound"
1458 then
1459 CXX=
1460 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001462ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001463ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1464ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1465ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1466 cat >conftest.$ac_ext <<_ACEOF
1467#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001468#include "confdefs.h"
1469
Martin v. Löwis11437992002-04-12 09:54:03 +00001470#ifdef F77_DUMMY_MAIN
1471# ifdef __cplusplus
1472 extern "C"
1473# endif
1474 int F77_DUMMY_MAIN() { return 1; }
1475#endif
1476int
1477main ()
1478{
Michael W. Hudson54241132001-12-07 15:38:26 +00001479
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 ;
1481 return 0;
1482}
1483_ACEOF
1484ac_clean_files_save=$ac_clean_files
1485ac_clean_files="$ac_clean_files a.out a.exe"
1486# Try to create an executable without -o first, disregard a.out.
1487# It will help us diagnose broken compilers, and finding out an intuition
1488# of exeext.
1489echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1490echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1491ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1492if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1493 (eval $ac_link_default) 2>&5
1494 ac_status=$?
1495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1496 (exit $ac_status); }; then
1497 # Find the output, starting from the most likely. This scheme is
1498# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1499# resort.
1500
1501# Be careful to initialize this variable, since it used to be cached.
1502# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1503ac_cv_exeext=
1504for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1505 ls a.out conftest 2>/dev/null;
1506 ls a.* conftest.* 2>/dev/null`; do
1507 case $ac_file in
1508 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1509 a.out ) # We found the default executable, but exeext='' is most
1510 # certainly right.
1511 break;;
1512 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1513 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1514 export ac_cv_exeext
1515 break;;
1516 * ) break;;
1517 esac
1518done
1519else
1520 echo "$as_me: failed program was:" >&5
1521cat conftest.$ac_ext >&5
1522{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1523echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1524 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001525fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001526
1527ac_exeext=$ac_cv_exeext
1528echo "$as_me:$LINENO: result: $ac_file" >&5
1529echo "${ECHO_T}$ac_file" >&6
1530
1531# Check the compiler produces executables we can run. If not, either
1532# the compiler is broken, or we cross compile.
1533echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1534echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1535# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1536# If not cross compiling, check that we can run a simple program.
1537if test "$cross_compiling" != yes; then
1538 if { ac_try='./$ac_file'
1539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1540 (eval $ac_try) 2>&5
1541 ac_status=$?
1542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1543 (exit $ac_status); }; }; then
1544 cross_compiling=no
1545 else
1546 if test "$cross_compiling" = maybe; then
1547 cross_compiling=yes
1548 else
1549 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1550If you meant to cross compile, use \`--host'." >&5
1551echo "$as_me: error: cannot run C++ compiled programs.
1552If you meant to cross compile, use \`--host'." >&2;}
1553 { (exit 1); exit 1; }; }
1554 fi
1555 fi
1556fi
1557echo "$as_me:$LINENO: result: yes" >&5
1558echo "${ECHO_T}yes" >&6
1559
1560rm -f a.out a.exe conftest$ac_cv_exeext
1561ac_clean_files=$ac_clean_files_save
1562# Check the compiler produces executables we can run. If not, either
1563# the compiler is broken, or we cross compile.
1564echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1565echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1566echo "$as_me:$LINENO: result: $cross_compiling" >&5
1567echo "${ECHO_T}$cross_compiling" >&6
1568
1569echo "$as_me:$LINENO: checking for suffix of executables" >&5
1570echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1571if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1572 (eval $ac_link) 2>&5
1573 ac_status=$?
1574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1575 (exit $ac_status); }; then
1576 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1577# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1578# work properly (i.e., refer to `conftest.exe'), while it won't with
1579# `rm'.
1580for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1581 case $ac_file in
1582 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1583 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1584 export ac_cv_exeext
1585 break;;
1586 * ) break;;
1587 esac
1588done
1589else
1590 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1591echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1592 { (exit 1); exit 1; }; }
1593fi
1594
1595rm -f conftest$ac_cv_exeext
1596echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1597echo "${ECHO_T}$ac_cv_exeext" >&6
1598
1599rm -f conftest.$ac_ext
1600EXEEXT=$ac_cv_exeext
1601ac_exeext=$EXEEXT
1602
1603 ac_ext=c
1604ac_cpp='$CPP $CPPFLAGS'
1605ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1606ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1607ac_compiler_gnu=$ac_cv_c_compiler_gnu
1608
1609
Martin v. Löwis22352952000-12-13 17:37:02 +00001610
1611 fi
1612fi
1613
Guido van Rossum8b131c51995-03-09 14:10:13 +00001614# If the user switches compilers, we can't believe the cache
1615if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1616then
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1618(it is also a good idea to do 'make clean' before compiling)" >&5
1619echo "$as_me: error: cached CC is different -- throw away $cache_file
1620(it is also a good idea to do 'make clean' before compiling)" >&2;}
1621 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001622fi
1623
Martin v. Löwis11437992002-04-12 09:54:03 +00001624ac_ext=c
1625ac_cpp='$CPP $CPPFLAGS'
1626ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1627ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1628ac_compiler_gnu=$ac_cv_c_compiler_gnu
1629if test -n "$ac_tool_prefix"; then
1630 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1631set dummy ${ac_tool_prefix}gcc; ac_word=$2
1632echo "$as_me:$LINENO: checking for $ac_word" >&5
1633echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1634if test "${ac_cv_prog_CC+set}" = set; then
1635 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001636else
1637 if test -n "$CC"; then
1638 ac_cv_prog_CC="$CC" # Let the user override the test.
1639else
Martin v. Löwis11437992002-04-12 09:54:03 +00001640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1641for as_dir in $PATH
1642do
1643 IFS=$as_save_IFS
1644 test -z "$as_dir" && as_dir=.
1645 for ac_exec_ext in '' $ac_executable_extensions; do
1646 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1647 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1648 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1649 break 2
1650 fi
1651done
1652done
1653
Jack Jansendd19cf82001-12-06 22:36:17 +00001654fi
1655fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001656CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001657if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 echo "$as_me:$LINENO: result: $CC" >&5
1659echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001660else
Martin v. Löwis11437992002-04-12 09:54:03 +00001661 echo "$as_me:$LINENO: result: no" >&5
1662echo "${ECHO_T}no" >&6
1663fi
1664
1665fi
1666if test -z "$ac_cv_prog_CC"; then
1667 ac_ct_CC=$CC
1668 # Extract the first word of "gcc", so it can be a program name with args.
1669set dummy gcc; ac_word=$2
1670echo "$as_me:$LINENO: checking for $ac_word" >&5
1671echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1672if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1673 echo $ECHO_N "(cached) $ECHO_C" >&6
1674else
1675 if test -n "$ac_ct_CC"; then
1676 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1677else
1678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1679for as_dir in $PATH
1680do
1681 IFS=$as_save_IFS
1682 test -z "$as_dir" && as_dir=.
1683 for ac_exec_ext in '' $ac_executable_extensions; do
1684 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1685 ac_cv_prog_ac_ct_CC="gcc"
1686 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1687 break 2
1688 fi
1689done
1690done
1691
1692fi
1693fi
1694ac_ct_CC=$ac_cv_prog_ac_ct_CC
1695if test -n "$ac_ct_CC"; then
1696 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1697echo "${ECHO_T}$ac_ct_CC" >&6
1698else
1699 echo "$as_me:$LINENO: result: no" >&5
1700echo "${ECHO_T}no" >&6
1701fi
1702
1703 CC=$ac_ct_CC
1704else
1705 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001706fi
1707
Jack Jansendd19cf82001-12-06 22:36:17 +00001708if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 if test -n "$ac_tool_prefix"; then
1710 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1711set dummy ${ac_tool_prefix}cc; ac_word=$2
1712echo "$as_me:$LINENO: checking for $ac_word" >&5
1713echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1714if test "${ac_cv_prog_CC+set}" = set; then
1715 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001716else
1717 if test -n "$CC"; then
1718 ac_cv_prog_CC="$CC" # Let the user override the test.
1719else
Martin v. Löwis11437992002-04-12 09:54:03 +00001720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1721for as_dir in $PATH
1722do
1723 IFS=$as_save_IFS
1724 test -z "$as_dir" && as_dir=.
1725 for ac_exec_ext in '' $ac_executable_extensions; do
1726 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1727 ac_cv_prog_CC="${ac_tool_prefix}cc"
1728 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1729 break 2
1730 fi
1731done
1732done
1733
1734fi
1735fi
1736CC=$ac_cv_prog_CC
1737if test -n "$CC"; then
1738 echo "$as_me:$LINENO: result: $CC" >&5
1739echo "${ECHO_T}$CC" >&6
1740else
1741 echo "$as_me:$LINENO: result: no" >&5
1742echo "${ECHO_T}no" >&6
1743fi
1744
1745fi
1746if test -z "$ac_cv_prog_CC"; then
1747 ac_ct_CC=$CC
1748 # Extract the first word of "cc", so it can be a program name with args.
1749set dummy cc; ac_word=$2
1750echo "$as_me:$LINENO: checking for $ac_word" >&5
1751echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1752if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1753 echo $ECHO_N "(cached) $ECHO_C" >&6
1754else
1755 if test -n "$ac_ct_CC"; then
1756 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1757else
1758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1759for as_dir in $PATH
1760do
1761 IFS=$as_save_IFS
1762 test -z "$as_dir" && as_dir=.
1763 for ac_exec_ext in '' $ac_executable_extensions; do
1764 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1765 ac_cv_prog_ac_ct_CC="cc"
1766 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1767 break 2
1768 fi
1769done
1770done
1771
1772fi
1773fi
1774ac_ct_CC=$ac_cv_prog_ac_ct_CC
1775if test -n "$ac_ct_CC"; then
1776 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1777echo "${ECHO_T}$ac_ct_CC" >&6
1778else
1779 echo "$as_me:$LINENO: result: no" >&5
1780echo "${ECHO_T}no" >&6
1781fi
1782
1783 CC=$ac_ct_CC
1784else
1785 CC="$ac_cv_prog_CC"
1786fi
1787
1788fi
1789if test -z "$CC"; then
1790 # Extract the first word of "cc", so it can be a program name with args.
1791set dummy cc; ac_word=$2
1792echo "$as_me:$LINENO: checking for $ac_word" >&5
1793echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1794if test "${ac_cv_prog_CC+set}" = set; then
1795 echo $ECHO_N "(cached) $ECHO_C" >&6
1796else
1797 if test -n "$CC"; then
1798 ac_cv_prog_CC="$CC" # Let the user override the test.
1799else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001800 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1802for as_dir in $PATH
1803do
1804 IFS=$as_save_IFS
1805 test -z "$as_dir" && as_dir=.
1806 for ac_exec_ext in '' $ac_executable_extensions; do
1807 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1808 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1809 ac_prog_rejected=yes
1810 continue
1811 fi
1812 ac_cv_prog_CC="cc"
1813 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1814 break 2
1815 fi
1816done
1817done
1818
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001819if test $ac_prog_rejected = yes; then
1820 # We found a bogon in the path, so make sure we never use it.
1821 set dummy $ac_cv_prog_CC
1822 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001823 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001824 # We chose a different compiler from the bogus one.
1825 # However, it has the same basename, so the bogon will be chosen
1826 # first if we set CC to just the basename; use the full file name.
1827 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001828 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001829 shift
1830 ac_cv_prog_CC="$@"
1831 fi
1832fi
1833fi
1834fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001835CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001836if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001837 echo "$as_me:$LINENO: result: $CC" >&5
1838echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001839else
Martin v. Löwis11437992002-04-12 09:54:03 +00001840 echo "$as_me:$LINENO: result: no" >&5
1841echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001842fi
1843
Martin v. Löwis11437992002-04-12 09:54:03 +00001844fi
1845if test -z "$CC"; then
1846 if test -n "$ac_tool_prefix"; then
1847 for ac_prog in cl
1848 do
1849 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1850set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1851echo "$as_me:$LINENO: checking for $ac_word" >&5
1852echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1853if test "${ac_cv_prog_CC+set}" = set; then
1854 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001855else
1856 if test -n "$CC"; then
1857 ac_cv_prog_CC="$CC" # Let the user override the test.
1858else
Martin v. Löwis11437992002-04-12 09:54:03 +00001859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1860for as_dir in $PATH
1861do
1862 IFS=$as_save_IFS
1863 test -z "$as_dir" && as_dir=.
1864 for ac_exec_ext in '' $ac_executable_extensions; do
1865 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1866 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1867 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1868 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001869 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001870done
1871done
1872
1873fi
1874fi
1875CC=$ac_cv_prog_CC
1876if test -n "$CC"; then
1877 echo "$as_me:$LINENO: result: $CC" >&5
1878echo "${ECHO_T}$CC" >&6
1879else
1880 echo "$as_me:$LINENO: result: no" >&5
1881echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001882fi
1883
Martin v. Löwis11437992002-04-12 09:54:03 +00001884 test -n "$CC" && break
1885 done
1886fi
1887if test -z "$CC"; then
1888 ac_ct_CC=$CC
1889 for ac_prog in cl
1890do
1891 # Extract the first word of "$ac_prog", so it can be a program name with args.
1892set dummy $ac_prog; ac_word=$2
1893echo "$as_me:$LINENO: checking for $ac_word" >&5
1894echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1895if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1896 echo $ECHO_N "(cached) $ECHO_C" >&6
1897else
1898 if test -n "$ac_ct_CC"; then
1899 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1900else
1901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1902for as_dir in $PATH
1903do
1904 IFS=$as_save_IFS
1905 test -z "$as_dir" && as_dir=.
1906 for ac_exec_ext in '' $ac_executable_extensions; do
1907 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1908 ac_cv_prog_ac_ct_CC="$ac_prog"
1909 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1910 break 2
1911 fi
1912done
1913done
Jack Jansendd19cf82001-12-06 22:36:17 +00001914
Martin v. Löwis11437992002-04-12 09:54:03 +00001915fi
1916fi
1917ac_ct_CC=$ac_cv_prog_ac_ct_CC
1918if test -n "$ac_ct_CC"; then
1919 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1920echo "${ECHO_T}$ac_ct_CC" >&6
1921else
1922 echo "$as_me:$LINENO: result: no" >&5
1923echo "${ECHO_T}no" >&6
1924fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001925
Martin v. Löwis11437992002-04-12 09:54:03 +00001926 test -n "$ac_ct_CC" && break
1927done
Michael W. Hudson54241132001-12-07 15:38:26 +00001928
Martin v. Löwis11437992002-04-12 09:54:03 +00001929 CC=$ac_ct_CC
1930fi
1931
1932fi
1933
1934
1935test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1936echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1937 { (exit 1); exit 1; }; }
1938
1939# Provide some information about the compiler.
1940echo "$as_me:$LINENO:" \
1941 "checking for C compiler version" >&5
1942ac_compiler=`set X $ac_compile; echo $2`
1943{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1944 (eval $ac_compiler --version </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{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1954 (eval $ac_compiler -V </dev/null >&5) 2>&5
1955 ac_status=$?
1956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1957 (exit $ac_status); }
1958
1959cat >conftest.$ac_ext <<_ACEOF
1960#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001961#include "confdefs.h"
1962
Martin v. Löwis11437992002-04-12 09:54:03 +00001963#ifdef F77_DUMMY_MAIN
1964# ifdef __cplusplus
1965 extern "C"
1966# endif
1967 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001969int
1970main ()
1971{
1972
1973 ;
1974 return 0;
1975}
1976_ACEOF
1977ac_clean_files_save=$ac_clean_files
1978ac_clean_files="$ac_clean_files a.out a.exe"
1979# Try to create an executable without -o first, disregard a.out.
1980# It will help us diagnose broken compilers, and finding out an intuition
1981# of exeext.
1982echo "$as_me:$LINENO: checking for C compiler default output" >&5
1983echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1984ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1985if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1986 (eval $ac_link_default) 2>&5
1987 ac_status=$?
1988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1989 (exit $ac_status); }; then
1990 # Find the output, starting from the most likely. This scheme is
1991# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1992# resort.
1993
1994# Be careful to initialize this variable, since it used to be cached.
1995# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1996ac_cv_exeext=
1997for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1998 ls a.out conftest 2>/dev/null;
1999 ls a.* conftest.* 2>/dev/null`; do
2000 case $ac_file in
2001 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2002 a.out ) # We found the default executable, but exeext='' is most
2003 # certainly right.
2004 break;;
2005 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2006 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2007 export ac_cv_exeext
2008 break;;
2009 * ) break;;
2010 esac
2011done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002012else
Martin v. Löwis11437992002-04-12 09:54:03 +00002013 echo "$as_me: failed program was:" >&5
2014cat conftest.$ac_ext >&5
2015{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2016echo "$as_me: error: C compiler cannot create executables" >&2;}
2017 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002018fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002019
Martin v. Löwis11437992002-04-12 09:54:03 +00002020ac_exeext=$ac_cv_exeext
2021echo "$as_me:$LINENO: result: $ac_file" >&5
2022echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002023
Martin v. Löwis11437992002-04-12 09:54:03 +00002024# Check the compiler produces executables we can run. If not, either
2025# the compiler is broken, or we cross compile.
2026echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2027echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2028# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2029# If not cross compiling, check that we can run a simple program.
2030if test "$cross_compiling" != yes; then
2031 if { ac_try='./$ac_file'
2032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2033 (eval $ac_try) 2>&5
2034 ac_status=$?
2035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2036 (exit $ac_status); }; }; then
2037 cross_compiling=no
2038 else
2039 if test "$cross_compiling" = maybe; then
2040 cross_compiling=yes
2041 else
2042 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2043If you meant to cross compile, use \`--host'." >&5
2044echo "$as_me: error: cannot run C compiled programs.
2045If you meant to cross compile, use \`--host'." >&2;}
2046 { (exit 1); exit 1; }; }
2047 fi
2048 fi
2049fi
2050echo "$as_me:$LINENO: result: yes" >&5
2051echo "${ECHO_T}yes" >&6
2052
2053rm -f a.out a.exe conftest$ac_cv_exeext
2054ac_clean_files=$ac_clean_files_save
2055# Check the compiler produces executables we can run. If not, either
2056# the compiler is broken, or we cross compile.
2057echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2058echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2059echo "$as_me:$LINENO: result: $cross_compiling" >&5
2060echo "${ECHO_T}$cross_compiling" >&6
2061
2062echo "$as_me:$LINENO: checking for suffix of executables" >&5
2063echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2065 (eval $ac_link) 2>&5
2066 ac_status=$?
2067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2068 (exit $ac_status); }; then
2069 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2070# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2071# work properly (i.e., refer to `conftest.exe'), while it won't with
2072# `rm'.
2073for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2074 case $ac_file in
2075 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2076 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2077 export ac_cv_exeext
2078 break;;
2079 * ) break;;
2080 esac
2081done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002082else
Martin v. Löwis11437992002-04-12 09:54:03 +00002083 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2084echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2085 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002086fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002087
Martin v. Löwis11437992002-04-12 09:54:03 +00002088rm -f conftest$ac_cv_exeext
2089echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2090echo "${ECHO_T}$ac_cv_exeext" >&6
2091
2092rm -f conftest.$ac_ext
2093EXEEXT=$ac_cv_exeext
2094ac_exeext=$EXEEXT
2095echo "$as_me:$LINENO: checking for suffix of object files" >&5
2096echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2097if test "${ac_cv_objext+set}" = set; then
2098 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002099else
Martin v. Löwis11437992002-04-12 09:54:03 +00002100 cat >conftest.$ac_ext <<_ACEOF
2101#line $LINENO "configure"
2102#include "confdefs.h"
2103
2104#ifdef F77_DUMMY_MAIN
2105# ifdef __cplusplus
2106 extern "C"
2107# endif
2108 int F77_DUMMY_MAIN() { return 1; }
2109#endif
2110int
2111main ()
2112{
2113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118rm -f conftest.o conftest.obj
2119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2120 (eval $ac_compile) 2>&5
2121 ac_status=$?
2122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2123 (exit $ac_status); }; then
2124 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2125 case $ac_file in
2126 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2127 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2128 break;;
2129 esac
2130done
2131else
2132 echo "$as_me: failed program was:" >&5
2133cat conftest.$ac_ext >&5
2134{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2135echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2136 { (exit 1); exit 1; }; }
2137fi
2138
2139rm -f conftest.$ac_cv_objext conftest.$ac_ext
2140fi
2141echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2142echo "${ECHO_T}$ac_cv_objext" >&6
2143OBJEXT=$ac_cv_objext
2144ac_objext=$OBJEXT
2145echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2146echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2147if test "${ac_cv_c_compiler_gnu+set}" = set; then
2148 echo $ECHO_N "(cached) $ECHO_C" >&6
2149else
2150 cat >conftest.$ac_ext <<_ACEOF
2151#line $LINENO "configure"
2152#include "confdefs.h"
2153
2154#ifdef F77_DUMMY_MAIN
2155# ifdef __cplusplus
2156 extern "C"
2157# endif
2158 int F77_DUMMY_MAIN() { return 1; }
2159#endif
2160int
2161main ()
2162{
2163#ifndef __GNUC__
2164 choke me
2165#endif
2166
2167 ;
2168 return 0;
2169}
2170_ACEOF
2171rm -f conftest.$ac_objext
2172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2173 (eval $ac_compile) 2>&5
2174 ac_status=$?
2175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2176 (exit $ac_status); } &&
2177 { ac_try='test -s conftest.$ac_objext'
2178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2179 (eval $ac_try) 2>&5
2180 ac_status=$?
2181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182 (exit $ac_status); }; }; then
2183 ac_compiler_gnu=yes
2184else
2185 echo "$as_me: failed program was:" >&5
2186cat conftest.$ac_ext >&5
2187ac_compiler_gnu=no
2188fi
2189rm -f conftest.$ac_objext conftest.$ac_ext
2190ac_cv_c_compiler_gnu=$ac_compiler_gnu
2191
2192fi
2193echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2194echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2195GCC=`test $ac_compiler_gnu = yes && echo yes`
2196ac_test_CFLAGS=${CFLAGS+set}
2197ac_save_CFLAGS=$CFLAGS
2198CFLAGS="-g"
2199echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2200echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2201if test "${ac_cv_prog_cc_g+set}" = set; then
2202 echo $ECHO_N "(cached) $ECHO_C" >&6
2203else
2204 cat >conftest.$ac_ext <<_ACEOF
2205#line $LINENO "configure"
2206#include "confdefs.h"
2207
2208#ifdef F77_DUMMY_MAIN
2209# ifdef __cplusplus
2210 extern "C"
2211# endif
2212 int F77_DUMMY_MAIN() { return 1; }
2213#endif
2214int
2215main ()
2216{
2217
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222rm -f conftest.$ac_objext
2223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2224 (eval $ac_compile) 2>&5
2225 ac_status=$?
2226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2227 (exit $ac_status); } &&
2228 { ac_try='test -s conftest.$ac_objext'
2229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2230 (eval $ac_try) 2>&5
2231 ac_status=$?
2232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2233 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002234 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002235else
Martin v. Löwis11437992002-04-12 09:54:03 +00002236 echo "$as_me: failed program was:" >&5
2237cat conftest.$ac_ext >&5
2238ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002239fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002240rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002241fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002242echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2243echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002244if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002245 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002246elif test $ac_cv_prog_cc_g = yes; then
2247 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002248 CFLAGS="-g -O2"
2249 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002250 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002251 fi
2252else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002253 if test "$GCC" = yes; then
2254 CFLAGS="-O2"
2255 else
2256 CFLAGS=
2257 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002258fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002259# Some people use a C++ compiler to compile C. Since we use `exit',
2260# in C++ we need to declare it. In case someone uses the same compiler
2261# for both compiling C and C++ we need to have the C++ compiler decide
2262# the declaration of exit, since it's the most demanding environment.
2263cat >conftest.$ac_ext <<_ACEOF
2264#ifndef __cplusplus
2265 choke me
2266#endif
2267_ACEOF
2268rm -f conftest.$ac_objext
2269if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2270 (eval $ac_compile) 2>&5
2271 ac_status=$?
2272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2273 (exit $ac_status); } &&
2274 { ac_try='test -s conftest.$ac_objext'
2275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2276 (eval $ac_try) 2>&5
2277 ac_status=$?
2278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2279 (exit $ac_status); }; }; then
2280 for ac_declaration in \
2281 ''\
2282 '#include <stdlib.h>' \
2283 'extern "C" void std::exit (int) throw (); using std::exit;' \
2284 'extern "C" void std::exit (int); using std::exit;' \
2285 'extern "C" void exit (int) throw ();' \
2286 'extern "C" void exit (int);' \
2287 'void exit (int);'
2288do
2289 cat >conftest.$ac_ext <<_ACEOF
2290#line $LINENO "configure"
2291#include "confdefs.h"
2292#include <stdlib.h>
2293$ac_declaration
2294#ifdef F77_DUMMY_MAIN
2295# ifdef __cplusplus
2296 extern "C"
2297# endif
2298 int F77_DUMMY_MAIN() { return 1; }
2299#endif
2300int
2301main ()
2302{
2303exit (42);
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308rm -f conftest.$ac_objext
2309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2310 (eval $ac_compile) 2>&5
2311 ac_status=$?
2312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2313 (exit $ac_status); } &&
2314 { ac_try='test -s conftest.$ac_objext'
2315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2316 (eval $ac_try) 2>&5
2317 ac_status=$?
2318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2319 (exit $ac_status); }; }; then
2320 :
2321else
2322 echo "$as_me: failed program was:" >&5
2323cat conftest.$ac_ext >&5
2324continue
2325fi
2326rm -f conftest.$ac_objext conftest.$ac_ext
2327 cat >conftest.$ac_ext <<_ACEOF
2328#line $LINENO "configure"
2329#include "confdefs.h"
2330$ac_declaration
2331#ifdef F77_DUMMY_MAIN
2332# ifdef __cplusplus
2333 extern "C"
2334# endif
2335 int F77_DUMMY_MAIN() { return 1; }
2336#endif
2337int
2338main ()
2339{
2340exit (42);
2341 ;
2342 return 0;
2343}
2344_ACEOF
2345rm -f conftest.$ac_objext
2346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2347 (eval $ac_compile) 2>&5
2348 ac_status=$?
2349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2350 (exit $ac_status); } &&
2351 { ac_try='test -s conftest.$ac_objext'
2352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2353 (eval $ac_try) 2>&5
2354 ac_status=$?
2355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2356 (exit $ac_status); }; }; then
2357 break
2358else
2359 echo "$as_me: failed program was:" >&5
2360cat conftest.$ac_ext >&5
2361fi
2362rm -f conftest.$ac_objext conftest.$ac_ext
2363done
2364rm -f conftest*
2365if test -n "$ac_declaration"; then
2366 echo '#ifdef __cplusplus' >>confdefs.h
2367 echo $ac_declaration >>confdefs.h
2368 echo '#endif' >>confdefs.h
2369fi
2370
2371else
2372 echo "$as_me: failed program was:" >&5
2373cat conftest.$ac_ext >&5
2374fi
2375rm -f conftest.$ac_objext conftest.$ac_ext
2376ac_ext=c
2377ac_cpp='$CPP $CPPFLAGS'
2378ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2379ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2380ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002381
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002382
2383# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385ac_ext=c
2386ac_cpp='$CPP $CPPFLAGS'
2387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2389ac_compiler_gnu=$ac_cv_c_compiler_gnu
2390echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2391echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002392# On Suns, sometimes $CPP names a directory.
2393if test -n "$CPP" && test -d "$CPP"; then
2394 CPP=
2395fi
2396if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002397 if test "${ac_cv_prog_CPP+set}" = set; then
2398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002399else
Martin v. Löwis11437992002-04-12 09:54:03 +00002400 # Double quotes because CPP needs to be expanded
2401 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2402 do
2403 ac_preproc_ok=false
2404for ac_c_preproc_warn_flag in '' yes
2405do
2406 # Use a header file that comes with gcc, so configuring glibc
2407 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002408 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002409 # not just through cpp. "Syntax error" is here to catch this case.
2410 cat >conftest.$ac_ext <<_ACEOF
2411#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002412#include "confdefs.h"
2413#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002414 Syntax error
2415_ACEOF
2416if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2417 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2418 ac_status=$?
2419 egrep -v '^ *\+' conftest.er1 >conftest.err
2420 rm -f conftest.er1
2421 cat conftest.err >&5
2422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2423 (exit $ac_status); } >/dev/null; then
2424 if test -s conftest.err; then
2425 ac_cpp_err=$ac_c_preproc_warn_flag
2426 else
2427 ac_cpp_err=
2428 fi
2429else
2430 ac_cpp_err=yes
2431fi
2432if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002433 :
2434else
Martin v. Löwis11437992002-04-12 09:54:03 +00002435 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002436 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 # Broken: fails on valid input.
2438continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002439fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002440rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002441
Martin v. Löwis11437992002-04-12 09:54:03 +00002442 # OK, works on sane cases. Now check whether non-existent headers
2443 # can be detected and how.
2444 cat >conftest.$ac_ext <<_ACEOF
2445#line $LINENO "configure"
2446#include "confdefs.h"
2447#include <ac_nonexistent.h>
2448_ACEOF
2449if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2450 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2451 ac_status=$?
2452 egrep -v '^ *\+' conftest.er1 >conftest.err
2453 rm -f conftest.er1
2454 cat conftest.err >&5
2455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2456 (exit $ac_status); } >/dev/null; then
2457 if test -s conftest.err; then
2458 ac_cpp_err=$ac_c_preproc_warn_flag
2459 else
2460 ac_cpp_err=
2461 fi
2462else
2463 ac_cpp_err=yes
2464fi
2465if test -z "$ac_cpp_err"; then
2466 # Broken: success on invalid input.
2467continue
2468else
2469 echo "$as_me: failed program was:" >&5
2470 cat conftest.$ac_ext >&5
2471 # Passes both tests.
2472ac_preproc_ok=:
2473break
2474fi
2475rm -f conftest.err conftest.$ac_ext
2476
2477done
2478# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2479rm -f conftest.err conftest.$ac_ext
2480if $ac_preproc_ok; then
2481 break
2482fi
2483
2484 done
2485 ac_cv_prog_CPP=$CPP
2486
2487fi
2488 CPP=$ac_cv_prog_CPP
2489else
2490 ac_cv_prog_CPP=$CPP
2491fi
2492echo "$as_me:$LINENO: result: $CPP" >&5
2493echo "${ECHO_T}$CPP" >&6
2494ac_preproc_ok=false
2495for ac_c_preproc_warn_flag in '' yes
2496do
2497 # Use a header file that comes with gcc, so configuring glibc
2498 # with a fresh cross-compiler works.
2499 # On the NeXT, cc -E runs the code through the compiler's parser,
2500 # not just through cpp. "Syntax error" is here to catch this case.
2501 cat >conftest.$ac_ext <<_ACEOF
2502#line $LINENO "configure"
2503#include "confdefs.h"
2504#include <assert.h>
2505 Syntax error
2506_ACEOF
2507if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2508 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2509 ac_status=$?
2510 egrep -v '^ *\+' conftest.er1 >conftest.err
2511 rm -f conftest.er1
2512 cat conftest.err >&5
2513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2514 (exit $ac_status); } >/dev/null; then
2515 if test -s conftest.err; then
2516 ac_cpp_err=$ac_c_preproc_warn_flag
2517 else
2518 ac_cpp_err=
2519 fi
2520else
2521 ac_cpp_err=yes
2522fi
2523if test -z "$ac_cpp_err"; then
2524 :
2525else
2526 echo "$as_me: failed program was:" >&5
2527 cat conftest.$ac_ext >&5
2528 # Broken: fails on valid input.
2529continue
2530fi
2531rm -f conftest.err conftest.$ac_ext
2532
2533 # OK, works on sane cases. Now check whether non-existent headers
2534 # can be detected and how.
2535 cat >conftest.$ac_ext <<_ACEOF
2536#line $LINENO "configure"
2537#include "confdefs.h"
2538#include <ac_nonexistent.h>
2539_ACEOF
2540if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2541 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2542 ac_status=$?
2543 egrep -v '^ *\+' conftest.er1 >conftest.err
2544 rm -f conftest.er1
2545 cat conftest.err >&5
2546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2547 (exit $ac_status); } >/dev/null; then
2548 if test -s conftest.err; then
2549 ac_cpp_err=$ac_c_preproc_warn_flag
2550 else
2551 ac_cpp_err=
2552 fi
2553else
2554 ac_cpp_err=yes
2555fi
2556if test -z "$ac_cpp_err"; then
2557 # Broken: success on invalid input.
2558continue
2559else
2560 echo "$as_me: failed program was:" >&5
2561 cat conftest.$ac_ext >&5
2562 # Passes both tests.
2563ac_preproc_ok=:
2564break
2565fi
2566rm -f conftest.err conftest.$ac_ext
2567
2568done
2569# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2570rm -f conftest.err conftest.$ac_ext
2571if $ac_preproc_ok; then
2572 :
2573else
2574 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2575echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2576 { (exit 1); exit 1; }; }
2577fi
2578
2579ac_ext=c
2580ac_cpp='$CPP $CPPFLAGS'
2581ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2582ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2583ac_compiler_gnu=$ac_cv_c_compiler_gnu
2584
2585
2586
2587echo "$as_me:$LINENO: checking for AIX" >&5
2588echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2589cat >conftest.$ac_ext <<_ACEOF
2590#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002591#include "confdefs.h"
2592#ifdef _AIX
2593 yes
2594#endif
2595
Martin v. Löwis11437992002-04-12 09:54:03 +00002596_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002597if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2598 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 echo "$as_me:$LINENO: result: yes" >&5
2600echo "${ECHO_T}yes" >&6
2601cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002602#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002603_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002604
2605else
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 echo "$as_me:$LINENO: result: no" >&5
2607echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002608fi
2609rm -f conftest*
2610
Michael W. Hudson54241132001-12-07 15:38:26 +00002611
Martin v. Löwis11437992002-04-12 09:54:03 +00002612echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2613echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2614if test "${ac_cv_header_stdc+set}" = set; then
2615 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002616else
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 cat >conftest.$ac_ext <<_ACEOF
2618#line $LINENO "configure"
2619#include "confdefs.h"
2620#include <stdlib.h>
2621#include <stdarg.h>
2622#include <string.h>
2623#include <float.h>
2624
2625_ACEOF
2626if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2627 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2628 ac_status=$?
2629 egrep -v '^ *\+' conftest.er1 >conftest.err
2630 rm -f conftest.er1
2631 cat conftest.err >&5
2632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2633 (exit $ac_status); } >/dev/null; then
2634 if test -s conftest.err; then
2635 ac_cpp_err=$ac_c_preproc_warn_flag
2636 else
2637 ac_cpp_err=
2638 fi
2639else
2640 ac_cpp_err=yes
2641fi
2642if test -z "$ac_cpp_err"; then
2643 ac_cv_header_stdc=yes
2644else
2645 echo "$as_me: failed program was:" >&5
2646 cat conftest.$ac_ext >&5
2647 ac_cv_header_stdc=no
2648fi
2649rm -f conftest.err conftest.$ac_ext
2650
2651if test $ac_cv_header_stdc = yes; then
2652 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2653 cat >conftest.$ac_ext <<_ACEOF
2654#line $LINENO "configure"
2655#include "confdefs.h"
2656#include <string.h>
2657
2658_ACEOF
2659if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2660 egrep "memchr" >/dev/null 2>&1; then
2661 :
2662else
2663 ac_cv_header_stdc=no
2664fi
2665rm -f conftest*
2666
2667fi
2668
2669if test $ac_cv_header_stdc = yes; then
2670 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2671 cat >conftest.$ac_ext <<_ACEOF
2672#line $LINENO "configure"
2673#include "confdefs.h"
2674#include <stdlib.h>
2675
2676_ACEOF
2677if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2678 egrep "free" >/dev/null 2>&1; then
2679 :
2680else
2681 ac_cv_header_stdc=no
2682fi
2683rm -f conftest*
2684
2685fi
2686
2687if test $ac_cv_header_stdc = yes; then
2688 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2689 if test "$cross_compiling" = yes; then
2690 :
2691else
2692 cat >conftest.$ac_ext <<_ACEOF
2693#line $LINENO "configure"
2694#include "confdefs.h"
2695#include <ctype.h>
2696#if ((' ' & 0x0FF) == 0x020)
2697# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2698# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2699#else
2700# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2701 || ('j' <= (c) && (c) <= 'r') \
2702 || ('s' <= (c) && (c) <= 'z'))
2703# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2704#endif
2705
2706#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2707int
2708main ()
2709{
2710 int i;
2711 for (i = 0; i < 256; i++)
2712 if (XOR (islower (i), ISLOWER (i))
2713 || toupper (i) != TOUPPER (i))
2714 exit(2);
2715 exit (0);
2716}
2717_ACEOF
2718rm -f conftest$ac_exeext
2719if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2720 (eval $ac_link) 2>&5
2721 ac_status=$?
2722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2725 (eval $ac_try) 2>&5
2726 ac_status=$?
2727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2728 (exit $ac_status); }; }; then
2729 :
2730else
2731 echo "$as_me: program exited with status $ac_status" >&5
2732echo "$as_me: failed program was:" >&5
2733cat conftest.$ac_ext >&5
2734( exit $ac_status )
2735ac_cv_header_stdc=no
2736fi
2737rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2738fi
2739fi
2740fi
2741echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2742echo "${ECHO_T}$ac_cv_header_stdc" >&6
2743if test $ac_cv_header_stdc = yes; then
2744
2745cat >>confdefs.h <<\_ACEOF
2746#define STDC_HEADERS 1
2747_ACEOF
2748
2749fi
2750
2751# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2762 inttypes.h stdint.h unistd.h
2763do
2764as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2765echo "$as_me:$LINENO: checking for $ac_header" >&5
2766echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2767if eval "test \"\${$as_ac_Header+set}\" = set"; then
2768 echo $ECHO_N "(cached) $ECHO_C" >&6
2769else
2770 cat >conftest.$ac_ext <<_ACEOF
2771#line $LINENO "configure"
2772#include "confdefs.h"
2773$ac_includes_default
2774
2775#include <$ac_header>
2776_ACEOF
2777rm -f conftest.$ac_objext
2778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2779 (eval $ac_compile) 2>&5
2780 ac_status=$?
2781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2782 (exit $ac_status); } &&
2783 { ac_try='test -s conftest.$ac_objext'
2784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2785 (eval $ac_try) 2>&5
2786 ac_status=$?
2787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2788 (exit $ac_status); }; }; then
2789 eval "$as_ac_Header=yes"
2790else
2791 echo "$as_me: failed program was:" >&5
2792cat conftest.$ac_ext >&5
2793eval "$as_ac_Header=no"
2794fi
2795rm -f conftest.$ac_objext conftest.$ac_ext
2796fi
2797echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2798echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2799if test `eval echo '${'$as_ac_Header'}'` = yes; then
2800 cat >>confdefs.h <<_ACEOF
2801#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2802_ACEOF
2803
2804fi
2805
2806done
2807
2808
2809if test "${ac_cv_header_minix_config_h+set}" = set; then
2810 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2811echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2812if test "${ac_cv_header_minix_config_h+set}" = set; then
2813 echo $ECHO_N "(cached) $ECHO_C" >&6
2814fi
2815echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2816echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2817else
2818 # Is the header compilable?
2819echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2820echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2821cat >conftest.$ac_ext <<_ACEOF
2822#line $LINENO "configure"
2823#include "confdefs.h"
2824$ac_includes_default
2825#include <minix/config.h>
2826_ACEOF
2827rm -f conftest.$ac_objext
2828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2829 (eval $ac_compile) 2>&5
2830 ac_status=$?
2831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2832 (exit $ac_status); } &&
2833 { ac_try='test -s conftest.$ac_objext'
2834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2835 (eval $ac_try) 2>&5
2836 ac_status=$?
2837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2838 (exit $ac_status); }; }; then
2839 ac_header_compiler=yes
2840else
2841 echo "$as_me: failed program was:" >&5
2842cat conftest.$ac_ext >&5
2843ac_header_compiler=no
2844fi
2845rm -f conftest.$ac_objext conftest.$ac_ext
2846echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2847echo "${ECHO_T}$ac_header_compiler" >&6
2848
2849# Is the header present?
2850echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2851echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2852cat >conftest.$ac_ext <<_ACEOF
2853#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002854#include "confdefs.h"
2855#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002856_ACEOF
2857if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2858 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2859 ac_status=$?
2860 egrep -v '^ *\+' conftest.er1 >conftest.err
2861 rm -f conftest.er1
2862 cat conftest.err >&5
2863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2864 (exit $ac_status); } >/dev/null; then
2865 if test -s conftest.err; then
2866 ac_cpp_err=$ac_c_preproc_warn_flag
2867 else
2868 ac_cpp_err=
2869 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002870else
Martin v. Löwis11437992002-04-12 09:54:03 +00002871 ac_cpp_err=yes
2872fi
2873if test -z "$ac_cpp_err"; then
2874 ac_header_preproc=yes
2875else
2876 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002877 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002878 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002879fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002880rm -f conftest.err conftest.$ac_ext
2881echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2882echo "${ECHO_T}$ac_header_preproc" >&6
2883
2884# So? What about this header?
2885case $ac_header_compiler:$ac_header_preproc in
2886 yes:no )
2887 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2888echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2889 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2890echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2891 no:yes )
2892 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2893echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2894 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2895echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2896 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2897echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2898esac
2899echo "$as_me:$LINENO: checking for minix/config.h" >&5
2900echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2901if test "${ac_cv_header_minix_config_h+set}" = set; then
2902 echo $ECHO_N "(cached) $ECHO_C" >&6
2903else
2904 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002905fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002906echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2907echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2908
2909fi
2910if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002911 MINIX=yes
2912else
Martin v. Löwis11437992002-04-12 09:54:03 +00002913 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002914fi
2915
Martin v. Löwis11437992002-04-12 09:54:03 +00002916
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002917if test "$MINIX" = yes; then
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_SOURCE 1
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 _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002926_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002927
Martin v. Löwis11437992002-04-12 09:54:03 +00002928
2929cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002930#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002931_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002932
2933fi
2934
2935
Michael W. Hudson54241132001-12-07 15:38:26 +00002936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937echo "$as_me:$LINENO: checking for --with-suffix" >&5
2938echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002939
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002940# Check whether --with-suffix or --without-suffix was given.
2941if test "${with_suffix+set}" = set; then
2942 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002944 case $withval in
2945 no) EXEEXT=;;
2946 yes) EXEEXT=.exe;;
2947 *) EXEEXT=$withval;;
2948 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002949fi;
2950echo "$as_me:$LINENO: result: $EXEEXT" >&5
2951echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002952
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002953# Test whether we're running on a non-case-sensitive system, in which
2954# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002955
Martin v. Löwis11437992002-04-12 09:54:03 +00002956echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2957echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00002958if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002959then
Martin v. Löwis11437992002-04-12 09:54:03 +00002960 echo "$as_me:$LINENO: result: yes" >&5
2961echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002962 BUILDEXEEXT=.exe
2963else
Martin v. Löwis11437992002-04-12 09:54:03 +00002964 echo "$as_me:$LINENO: result: no" >&5
2965echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002966 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002967fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002968
Guido van Rossumdd997f71998-10-07 19:58:26 +00002969case $MACHDEP in
2970bsdos*)
2971 case $CC in
2972 gcc) CC="$CC -D_HAVE_BSDI";;
2973 esac;;
2974esac
2975
Guido van Rossum24b1e751997-08-21 02:29:16 +00002976case $ac_sys_system in
2977hp*|HP*)
2978 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002979 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002980 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002981Monterey*)
2982 case $CC in
2983 cc) CC="$CC -Wl,-Bexport";;
2984 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002985SunOS*)
2986 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
2988cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002989#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002990_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002991
2992 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002993esac
2994
Michael W. Hudson54241132001-12-07 15:38:26 +00002995
2996
Martin v. Löwis11437992002-04-12 09:54:03 +00002997echo "$as_me:$LINENO: checking LIBRARY" >&5
2998echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002999if test -z "$LIBRARY"
3000then
3001 LIBRARY='libpython$(VERSION).a'
3002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003003echo "$as_me:$LINENO: result: $LIBRARY" >&5
3004echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003005
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003006# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003007# name of the library into which to insert object files). BLDLIBRARY is also
3008# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3009# is blank as the main program is not linked directly against LDLIBRARY.
3010# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3011# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3012# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3013# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003014#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003015# RUNSHARED is used to run shared python without installed libraries
3016#
3017# INSTSONAME is the name of the shared library that will be use to install
3018# on the system - some systems like version suffix, others don't
3019
3020
Michael W. Hudson54241132001-12-07 15:38:26 +00003021
3022
3023
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003024
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003025LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003026BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003027INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003028DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003029LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003030RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003031
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003032# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003033# If CXX is set, and if it is needed to link a main function that was
3034# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3035# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003036# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003037# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003038
Martin v. Löwis11437992002-04-12 09:54:03 +00003039echo "$as_me:$LINENO: checking LINKCC" >&5
3040echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003041if test -z "$LINKCC"
3042then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003043 if test -z "$CXX"; then
3044 LINKCC="\$(PURIFY) \$(CC)"
3045 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003046 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003047 $CXX -c conftest.$ac_ext 2>&5
3048 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3049 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3050 then
3051 LINKCC="\$(PURIFY) \$(CC)"
3052 else
3053 LINKCC="\$(PURIFY) \$(CXX)"
3054 fi
3055 rm -fr conftest*
3056 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003057 case $ac_sys_system in
3058 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003059 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003060 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003061 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003062 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003063 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003064 esac
3065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003066echo "$as_me:$LINENO: result: $LINKCC" >&5
3067echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003068
Martin v. Löwis11437992002-04-12 09:54:03 +00003069echo "$as_me:$LINENO: checking for --enable-shared" >&5
3070echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003071# Check whether --enable-shared or --disable-shared was given.
3072if test "${enable_shared+set}" = set; then
3073 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003074
Martin v. Löwis11437992002-04-12 09:54:03 +00003075fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003076
3077if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003078then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003079 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003080 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003081 enable_shared="yes";;
3082 *)
3083 enable_shared="no";;
3084 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003085fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003086echo "$as_me:$LINENO: result: $enable_shared" >&5
3087echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003088
3089
Martin v. Löwis11437992002-04-12 09:54:03 +00003090echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3091echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003092
Guido van Rossumb8552162001-09-05 14:58:11 +00003093# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3094# library that we build, but we do not want to link against it (we
3095# will find it with a -framework option). For this reason there is an
3096# extra variable BLDLIBRARY against which Python and the extension
3097# modules are linked, BLDLIBRARY. This is normally the same as
3098# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003099if test "$enable_framework"
3100then
3101 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3102 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3103 BLDLIBRARY=''
3104else
3105 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003106fi
Jack Jansene578a632001-08-15 01:27:14 +00003107
Martin v. Löwis1142de32002-03-29 16:28:31 +00003108# Other platforms follow
3109if test $enable_shared = "yes"; then
3110 case $ac_sys_system in
3111 BeOS*)
3112 LDLIBRARY='libpython$(VERSION).so'
3113 ;;
3114 CYGWIN*)
3115 LDLIBRARY='libpython$(VERSION).dll.a'
3116 DLLLIBRARY='libpython$(VERSION).dll'
3117 ;;
3118 SunOS*)
3119 LDLIBRARY='libpython$(VERSION).so'
3120 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3121 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3122 ;;
3123 Linux*)
3124 LDLIBRARY='libpython$(VERSION).so'
3125 BLDLIBRARY='-L. -lpython$(VERSION)'
3126 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3127 INSTSONAME="$LDLIBRARY".$SOVERSION
3128 ;;
3129 hp*|HP*)
3130 LDLIBRARY='libpython$(VERSION).sl'
3131 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3132 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3133 ;;
3134 OSF*)
3135 LDLIBRARY='libpython$(VERSION).so'
3136 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3137 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3138 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003139 atheos*)
3140 LDLIBRARY='libpython$(VERSION).so'
3141 BLDLIBRARY='-L. -lpython$(VERSION)'
3142 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3143 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003144 esac
3145 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3146 case $MACHDEP in
3147 dguxR4)
3148 LDLIBRARY='libpython$(VERSION).so'
3149 OPT="$OPT -pic"
3150 ;;
3151 esac
3152fi
3153
Martin v. Löwis11437992002-04-12 09:54:03 +00003154echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3155echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003156
Martin v. Löwis11437992002-04-12 09:54:03 +00003157if test -n "$ac_tool_prefix"; then
3158 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3159set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3160echo "$as_me:$LINENO: checking for $ac_word" >&5
3161echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3162if test "${ac_cv_prog_RANLIB+set}" = set; then
3163 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003164else
3165 if test -n "$RANLIB"; then
3166 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3167else
Martin v. Löwis11437992002-04-12 09:54:03 +00003168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3169for as_dir in $PATH
3170do
3171 IFS=$as_save_IFS
3172 test -z "$as_dir" && as_dir=.
3173 for ac_exec_ext in '' $ac_executable_extensions; do
3174 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3175 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3176 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3177 break 2
3178 fi
3179done
3180done
3181
Guido van Rossum627b2d71993-12-24 10:39:16 +00003182fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003183fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003184RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003185if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003186 echo "$as_me:$LINENO: result: $RANLIB" >&5
3187echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003188else
Martin v. Löwis11437992002-04-12 09:54:03 +00003189 echo "$as_me:$LINENO: result: no" >&5
3190echo "${ECHO_T}no" >&6
3191fi
3192
3193fi
3194if test -z "$ac_cv_prog_RANLIB"; then
3195 ac_ct_RANLIB=$RANLIB
3196 # Extract the first word of "ranlib", so it can be a program name with args.
3197set dummy ranlib; ac_word=$2
3198echo "$as_me:$LINENO: checking for $ac_word" >&5
3199echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3200if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3201 echo $ECHO_N "(cached) $ECHO_C" >&6
3202else
3203 if test -n "$ac_ct_RANLIB"; then
3204 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3205else
3206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3207for as_dir in $PATH
3208do
3209 IFS=$as_save_IFS
3210 test -z "$as_dir" && as_dir=.
3211 for ac_exec_ext in '' $ac_executable_extensions; do
3212 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3213 ac_cv_prog_ac_ct_RANLIB="ranlib"
3214 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3215 break 2
3216 fi
3217done
3218done
3219
3220 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3221fi
3222fi
3223ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3224if test -n "$ac_ct_RANLIB"; then
3225 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3226echo "${ECHO_T}$ac_ct_RANLIB" >&6
3227else
3228 echo "$as_me:$LINENO: result: no" >&5
3229echo "${ECHO_T}no" >&6
3230fi
3231
3232 RANLIB=$ac_ct_RANLIB
3233else
3234 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003235fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003236
3237
Guido van Rossum7f43da71994-08-01 12:15:30 +00003238for ac_prog in ar aal
3239do
Martin v. Löwis11437992002-04-12 09:54:03 +00003240 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003241set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003242echo "$as_me:$LINENO: checking for $ac_word" >&5
3243echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3244if test "${ac_cv_prog_AR+set}" = set; then
3245 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003246else
3247 if test -n "$AR"; then
3248 ac_cv_prog_AR="$AR" # Let the user override the test.
3249else
Martin v. Löwis11437992002-04-12 09:54:03 +00003250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3251for as_dir in $PATH
3252do
3253 IFS=$as_save_IFS
3254 test -z "$as_dir" && as_dir=.
3255 for ac_exec_ext in '' $ac_executable_extensions; do
3256 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3257 ac_cv_prog_AR="$ac_prog"
3258 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3259 break 2
3260 fi
3261done
3262done
3263
Guido van Rossum7f43da71994-08-01 12:15:30 +00003264fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003265fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003266AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003267if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003268 echo "$as_me:$LINENO: result: $AR" >&5
3269echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003270else
Martin v. Löwis11437992002-04-12 09:54:03 +00003271 echo "$as_me:$LINENO: result: no" >&5
3272echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003273fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003274
Martin v. Löwis11437992002-04-12 09:54:03 +00003275 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003276done
3277test -n "$AR" || AR="ar"
3278
Michael W. Hudson54241132001-12-07 15:38:26 +00003279
Neil Schemenauera42c8272001-03-31 00:01:55 +00003280case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003281bsdos*|hp*|HP*)
3282 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003283 if test -z "$INSTALL"
3284 then
3285 INSTALL="${srcdir}/install-sh -c"
3286 fi
3287esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003288ac_aux_dir=
3289for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3290 if test -f $ac_dir/install-sh; then
3291 ac_aux_dir=$ac_dir
3292 ac_install_sh="$ac_aux_dir/install-sh -c"
3293 break
3294 elif test -f $ac_dir/install.sh; then
3295 ac_aux_dir=$ac_dir
3296 ac_install_sh="$ac_aux_dir/install.sh -c"
3297 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003298 elif test -f $ac_dir/shtool; then
3299 ac_aux_dir=$ac_dir
3300 ac_install_sh="$ac_aux_dir/shtool install -c"
3301 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003302 fi
3303done
3304if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003305 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3306echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3307 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003308fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003309ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3310ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3311ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003312
3313# Find a good install program. We prefer a C program (faster),
3314# so one script is as good as another. But avoid the broken or
3315# incompatible versions:
3316# SysV /etc/install, /usr/sbin/install
3317# SunOS /usr/etc/install
3318# IRIX /sbin/install
3319# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003320# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003321# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3322# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3323# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3324# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003325echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3326echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003327if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003328if test "${ac_cv_path_install+set}" = set; then
3329 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003330else
Martin v. Löwis11437992002-04-12 09:54:03 +00003331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3332for as_dir in $PATH
3333do
3334 IFS=$as_save_IFS
3335 test -z "$as_dir" && as_dir=.
3336 # Account for people who put trailing slashes in PATH elements.
3337case $as_dir/ in
3338 ./ | .// | /cC/* | \
3339 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3340 /usr/ucb/* ) ;;
3341 *)
3342 # OSF1 and SCO ODT 3.0 have their own names for install.
3343 # Don't use installbsd from OSF since it installs stuff as root
3344 # by default.
3345 for ac_prog in ginstall scoinst install; do
3346 for ac_exec_ext in '' $ac_executable_extensions; do
3347 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3348 if test $ac_prog = install &&
3349 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3350 # AIX install. It has an incompatible calling convention.
3351 :
3352 elif test $ac_prog = install &&
3353 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3354 # program-specific install script used by HP pwplus--don't use.
3355 :
3356 else
3357 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3358 break 3
3359 fi
3360 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003361 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003362 done
3363 ;;
3364esac
3365done
3366
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003367
3368fi
3369 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003370 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003371 else
3372 # As a last resort, use the slow shell script. We don't cache a
3373 # path for INSTALL within a source directory, because that will
3374 # break other packages using the cache if that directory is
3375 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003376 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003377 fi
3378fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003379echo "$as_me:$LINENO: result: $INSTALL" >&5
3380echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003381
3382# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3383# It thinks the first close brace ends the variable substitution.
3384test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3385
Martin v. Löwis11437992002-04-12 09:54:03 +00003386test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003387
3388test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3389
Michael W. Hudson54241132001-12-07 15:38:26 +00003390
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003391# Not every filesystem supports hard links
3392
3393if test -z "$LN" ; then
3394 case $ac_sys_system in
3395 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003396 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003397 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003398 *) LN=ln;;
3399 esac
3400fi
3401
Fred Drake109d9862001-07-11 06:27:56 +00003402# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003403echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3404echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3405
Fred Drake109d9862001-07-11 06:27:56 +00003406# Check whether --with-pydebug or --without-pydebug was given.
3407if test "${with_pydebug+set}" = set; then
3408 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003409
Fred Drake109d9862001-07-11 06:27:56 +00003410if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003411then
3412
3413cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003414#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003415_ACEOF
3416
3417 echo "$as_me:$LINENO: result: yes" >&5
3418echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003419 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003420else echo "$as_me:$LINENO: result: no" >&5
3421echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003422fi
3423else
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 echo "$as_me:$LINENO: result: no" >&5
3425echo "${ECHO_T}no" >&6
3426fi;
Fred Drake109d9862001-07-11 06:27:56 +00003427
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003428# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003429
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003430if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003431then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003432 case $GCC in
3433 yes)
3434 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003435 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003436 if test "$Py_DEBUG" = 'true' ; then
3437 # Optimization messes up debuggers, so turn it off for
3438 # debug builds.
3439 OPT="-g -Wall -Wstrict-prototypes"
3440 else
3441 OPT="-g -O3 -Wall -Wstrict-prototypes"
3442 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003443 *)
Fred Drake109d9862001-07-11 06:27:56 +00003444 OPT="-O3 -Wall -Wstrict-prototypes";;
3445 esac
3446 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003447 *)
3448 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003449 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003450 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3451 *)
3452 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003453 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003454 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003455 case $ac_sys_system in
3456 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003457 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003458 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003459fi
3460
Fred Drakee1ceaa02001-12-04 20:55:47 +00003461if test "$Py_DEBUG" = 'true'; then
3462 :
3463else
3464 OPT="-DNDEBUG $OPT"
3465fi
3466
Trent Mick635f6fb2000-08-23 21:33:05 +00003467# The current (beta) Monterey compiler dies with optimizations
3468case $ac_sys_system in
3469Monterey*) OPT="";;
3470esac
3471
Guido van Rossum563e7081996-09-10 18:20:48 +00003472if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003473then
3474 OPT="$OPT $ac_arch_flags"
3475fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003476
Martin v. Löwis11437992002-04-12 09:54:03 +00003477echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3478echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3479if test "${ac_cv_opt_olimit_ok+set}" = set; then
3480 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003481else
3482 ac_save_cc="$CC"
3483CC="$CC -OPT:Olimit=0"
3484if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003485 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003486else
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 cat >conftest.$ac_ext <<_ACEOF
3488#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003489#include "confdefs.h"
3490int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003491_ACEOF
3492rm -f conftest$ac_exeext
3493if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3494 (eval $ac_link) 2>&5
3495 ac_status=$?
3496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3497 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3499 (eval $ac_try) 2>&5
3500 ac_status=$?
3501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3502 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003503 ac_cv_opt_olimit_ok=yes
3504else
Martin v. Löwis11437992002-04-12 09:54:03 +00003505 echo "$as_me: program exited with status $ac_status" >&5
3506echo "$as_me: failed program was:" >&5
3507cat conftest.$ac_ext >&5
3508( exit $ac_status )
3509ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003510fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003511rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003512fi
Guido van Rossum91922671997-10-09 20:24:13 +00003513CC="$ac_save_cc"
3514fi
3515
Martin v. Löwis11437992002-04-12 09:54:03 +00003516echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3517echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003518if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003519 case $ac_sys_system in
3520 Darwin*) OPT="$OPT" ;;
3521 *) OPT="$OPT -OPT:Olimit=0";;
3522 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003523else
Martin v. Löwis11437992002-04-12 09:54:03 +00003524 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3525echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3526 if test "${ac_cv_olimit_ok+set}" = set; then
3527 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003528else
3529 ac_save_cc="$CC"
3530 CC="$CC -Olimit 1500"
3531 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003532 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003533else
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 cat >conftest.$ac_ext <<_ACEOF
3535#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003536#include "confdefs.h"
3537int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003538_ACEOF
3539rm -f conftest$ac_exeext
3540if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3541 (eval $ac_link) 2>&5
3542 ac_status=$?
3543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3544 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3546 (eval $ac_try) 2>&5
3547 ac_status=$?
3548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3549 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003550 ac_cv_olimit_ok=yes
3551else
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 echo "$as_me: program exited with status $ac_status" >&5
3553echo "$as_me: failed program was:" >&5
3554cat conftest.$ac_ext >&5
3555( exit $ac_status )
3556ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003557fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003558rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003559fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003560 CC="$ac_save_cc"
3561fi
3562
Martin v. Löwis11437992002-04-12 09:54:03 +00003563 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3564echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003565 if test $ac_cv_olimit_ok = yes; then
3566 OPT="$OPT -Olimit 1500"
3567 fi
3568fi
3569
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003570# On some compilers, pthreads are available without further options
3571# (e.g. MacOS X). On some of these systems, the compiler will not
3572# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3573# So we have to see first whether pthreads are available without
3574# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003575echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3576echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3577if test "${ac_cv_pthread_is_default+set}" = set; then
3578 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003579else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003580 if test "$cross_compiling" = yes; then
3581 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003582else
Martin v. Löwis11437992002-04-12 09:54:03 +00003583 cat >conftest.$ac_ext <<_ACEOF
3584#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003585#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003586
Martin v. Löwis130fb172001-07-19 11:00:41 +00003587#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003588
3589void* routine(void* p){return NULL;}
3590
3591int main(){
3592 pthread_t p;
3593 if(pthread_create(&p,NULL,routine,NULL)!=0)
3594 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003595 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003596 return 0;
3597}
3598
Martin v. Löwis11437992002-04-12 09:54:03 +00003599_ACEOF
3600rm -f conftest$ac_exeext
3601if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3602 (eval $ac_link) 2>&5
3603 ac_status=$?
3604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3605 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3607 (eval $ac_try) 2>&5
3608 ac_status=$?
3609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3610 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003611 ac_cv_pthread_is_default=yes
3612else
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 echo "$as_me: program exited with status $ac_status" >&5
3614echo "$as_me: failed program was:" >&5
3615cat conftest.$ac_ext >&5
3616( exit $ac_status )
3617ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003618fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003619rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003620fi
3621
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003622fi
3623
Martin v. Löwis11437992002-04-12 09:54:03 +00003624echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3625echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003626
Michael W. Hudson54241132001-12-07 15:38:26 +00003627
Martin v. Löwis11437992002-04-12 09:54:03 +00003628if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003629then
3630 ac_cv_kpthread=no
3631else
3632# -Kpthread, if available, provides the right #defines
3633# and linker options to make pthread_create available
3634# Some compilers won't report that they do not support -Kpthread,
3635# so we need to run a program to see whether it really made the
3636# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003637echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3638echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3639if test "${ac_cv_kpthread+set}" = set; then
3640 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003641else
3642 ac_save_cc="$CC"
3643CC="$CC -Kpthread"
3644if test "$cross_compiling" = yes; then
3645 ac_cv_kpthread=no
3646else
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 cat >conftest.$ac_ext <<_ACEOF
3648#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003649#include "confdefs.h"
3650
3651#include <pthread.h>
3652
3653void* routine(void* p){return NULL;}
3654
3655int main(){
3656 pthread_t p;
3657 if(pthread_create(&p,NULL,routine,NULL)!=0)
3658 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003659 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003660 return 0;
3661}
3662
Martin v. Löwis11437992002-04-12 09:54:03 +00003663_ACEOF
3664rm -f conftest$ac_exeext
3665if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3666 (eval $ac_link) 2>&5
3667 ac_status=$?
3668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3669 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3671 (eval $ac_try) 2>&5
3672 ac_status=$?
3673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3674 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003675 ac_cv_kpthread=yes
3676else
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 echo "$as_me: program exited with status $ac_status" >&5
3678echo "$as_me: failed program was:" >&5
3679cat conftest.$ac_ext >&5
3680( exit $ac_status )
3681ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003682fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003683rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003684fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003685CC="$ac_save_cc"
3686fi
3687
Martin v. Löwis11437992002-04-12 09:54:03 +00003688echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3689echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003690fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003691
Michael W. Hudson54241132001-12-07 15:38:26 +00003692
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003693# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003694echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3695echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3696if test "${ac_cv_header_stdc+set}" = set; then
3697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003698else
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 cat >conftest.$ac_ext <<_ACEOF
3700#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003701#include "confdefs.h"
3702#include <stdlib.h>
3703#include <stdarg.h>
3704#include <string.h>
3705#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003706
3707_ACEOF
3708if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3709 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3710 ac_status=$?
3711 egrep -v '^ *\+' conftest.er1 >conftest.err
3712 rm -f conftest.er1
3713 cat conftest.err >&5
3714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3715 (exit $ac_status); } >/dev/null; then
3716 if test -s conftest.err; then
3717 ac_cpp_err=$ac_c_preproc_warn_flag
3718 else
3719 ac_cpp_err=
3720 fi
3721else
3722 ac_cpp_err=yes
3723fi
3724if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003725 ac_cv_header_stdc=yes
3726else
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003728 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003729 ac_cv_header_stdc=no
3730fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003731rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003732
3733if test $ac_cv_header_stdc = yes; then
3734 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 cat >conftest.$ac_ext <<_ACEOF
3736#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003737#include "confdefs.h"
3738#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003739
3740_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003741if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3742 egrep "memchr" >/dev/null 2>&1; then
3743 :
3744else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003745 ac_cv_header_stdc=no
3746fi
3747rm -f conftest*
3748
3749fi
3750
3751if test $ac_cv_header_stdc = yes; then
3752 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 cat >conftest.$ac_ext <<_ACEOF
3754#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003755#include "confdefs.h"
3756#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003757
3758_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003759if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3760 egrep "free" >/dev/null 2>&1; then
3761 :
3762else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003763 ac_cv_header_stdc=no
3764fi
3765rm -f conftest*
3766
3767fi
3768
3769if test $ac_cv_header_stdc = yes; then
3770 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003773else
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 cat >conftest.$ac_ext <<_ACEOF
3775#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003776#include "confdefs.h"
3777#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003778#if ((' ' & 0x0FF) == 0x020)
3779# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3780# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3781#else
3782# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3783 || ('j' <= (c) && (c) <= 'r') \
3784 || ('s' <= (c) && (c) <= 'z'))
3785# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3786#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003787
Martin v. Löwis11437992002-04-12 09:54:03 +00003788#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3789int
3790main ()
3791{
3792 int i;
3793 for (i = 0; i < 256; i++)
3794 if (XOR (islower (i), ISLOWER (i))
3795 || toupper (i) != TOUPPER (i))
3796 exit(2);
3797 exit (0);
3798}
3799_ACEOF
3800rm -f conftest$ac_exeext
3801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3802 (eval $ac_link) 2>&5
3803 ac_status=$?
3804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3805 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3807 (eval $ac_try) 2>&5
3808 ac_status=$?
3809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3810 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003811 :
3812else
Martin v. Löwis11437992002-04-12 09:54:03 +00003813 echo "$as_me: program exited with status $ac_status" >&5
3814echo "$as_me: failed program was:" >&5
3815cat conftest.$ac_ext >&5
3816( exit $ac_status )
3817ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003818fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003819rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003820fi
3821fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003822fi
3823echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3824echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003825if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003826
3827cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003828#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003829_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003830
3831fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003832
Martin v. Löwis11437992002-04-12 09:54:03 +00003833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003871libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003872signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003873sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003874sys/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 +00003875sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003876sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003877do
Martin v. Löwis11437992002-04-12 09:54:03 +00003878as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3879if eval "test \"\${$as_ac_Header+set}\" = set"; then
3880 echo "$as_me:$LINENO: checking for $ac_header" >&5
3881echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3882if eval "test \"\${$as_ac_Header+set}\" = set"; then
3883 echo $ECHO_N "(cached) $ECHO_C" >&6
3884fi
3885echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3886echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003887else
Martin v. Löwis11437992002-04-12 09:54:03 +00003888 # Is the header compilable?
3889echo "$as_me:$LINENO: checking $ac_header usability" >&5
3890echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3891cat >conftest.$ac_ext <<_ACEOF
3892#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003893#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003894$ac_includes_default
3895#include <$ac_header>
3896_ACEOF
3897rm -f conftest.$ac_objext
3898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3899 (eval $ac_compile) 2>&5
3900 ac_status=$?
3901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3902 (exit $ac_status); } &&
3903 { ac_try='test -s conftest.$ac_objext'
3904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3905 (eval $ac_try) 2>&5
3906 ac_status=$?
3907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3908 (exit $ac_status); }; }; then
3909 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003910else
Martin v. Löwis11437992002-04-12 09:54:03 +00003911 echo "$as_me: failed program was:" >&5
3912cat conftest.$ac_ext >&5
3913ac_header_compiler=no
3914fi
3915rm -f conftest.$ac_objext conftest.$ac_ext
3916echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3917echo "${ECHO_T}$ac_header_compiler" >&6
3918
3919# Is the header present?
3920echo "$as_me:$LINENO: checking $ac_header presence" >&5
3921echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3922cat >conftest.$ac_ext <<_ACEOF
3923#line $LINENO "configure"
3924#include "confdefs.h"
3925#include <$ac_header>
3926_ACEOF
3927if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3928 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3929 ac_status=$?
3930 egrep -v '^ *\+' conftest.er1 >conftest.err
3931 rm -f conftest.er1
3932 cat conftest.err >&5
3933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3934 (exit $ac_status); } >/dev/null; then
3935 if test -s conftest.err; then
3936 ac_cpp_err=$ac_c_preproc_warn_flag
3937 else
3938 ac_cpp_err=
3939 fi
3940else
3941 ac_cpp_err=yes
3942fi
3943if test -z "$ac_cpp_err"; then
3944 ac_header_preproc=yes
3945else
3946 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003947 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003948 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003949fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003950rm -f conftest.err conftest.$ac_ext
3951echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3952echo "${ECHO_T}$ac_header_preproc" >&6
3953
3954# So? What about this header?
3955case $ac_header_compiler:$ac_header_preproc in
3956 yes:no )
3957 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3958echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3959 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3960echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3961 no:yes )
3962 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3963echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3964 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3965echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3966 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3967echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3968esac
3969echo "$as_me:$LINENO: checking for $ac_header" >&5
3970echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3971if eval "test \"\${$as_ac_Header+set}\" = set"; then
3972 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003973else
Martin v. Löwis11437992002-04-12 09:54:03 +00003974 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003975fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003976echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3977echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3978
3979fi
3980if test `eval echo '${'$as_ac_Header'}'` = yes; then
3981 cat >>confdefs.h <<_ACEOF
3982#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3983_ACEOF
3984
3985fi
3986
Guido van Rossum627b2d71993-12-24 10:39:16 +00003987done
3988
Martin v. Löwis11437992002-04-12 09:54:03 +00003989
3990
3991
3992
3993
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003994ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003995for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3996 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3997echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3998echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3999if eval "test \"\${$as_ac_Header+set}\" = set"; then
4000 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004001else
Martin v. Löwis11437992002-04-12 09:54:03 +00004002 cat >conftest.$ac_ext <<_ACEOF
4003#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004004#include "confdefs.h"
4005#include <sys/types.h>
4006#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004007
4008#ifdef F77_DUMMY_MAIN
4009# ifdef __cplusplus
4010 extern "C"
4011# endif
4012 int F77_DUMMY_MAIN() { return 1; }
4013#endif
4014int
4015main ()
4016{
4017if ((DIR *) 0)
4018return 0;
4019 ;
4020 return 0;
4021}
4022_ACEOF
4023rm -f conftest.$ac_objext
4024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4025 (eval $ac_compile) 2>&5
4026 ac_status=$?
4027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4028 (exit $ac_status); } &&
4029 { ac_try='test -s conftest.$ac_objext'
4030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4031 (eval $ac_try) 2>&5
4032 ac_status=$?
4033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4034 (exit $ac_status); }; }; then
4035 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004036else
Martin v. Löwis11437992002-04-12 09:54:03 +00004037 echo "$as_me: failed program was:" >&5
4038cat conftest.$ac_ext >&5
4039eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004040fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004041rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004042fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004043echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4044echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4045if test `eval echo '${'$as_ac_Header'}'` = yes; then
4046 cat >>confdefs.h <<_ACEOF
4047#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4048_ACEOF
4049
4050ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004051fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004052
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004053done
4054# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4055if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4057echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4058if test "${ac_cv_search_opendir+set}" = set; then
4059 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004060else
Martin v. Löwis11437992002-04-12 09:54:03 +00004061 ac_func_search_save_LIBS=$LIBS
4062ac_cv_search_opendir=no
4063cat >conftest.$ac_ext <<_ACEOF
4064#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004067/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004068#ifdef __cplusplus
4069extern "C"
4070#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004071/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004072 builtin and then its argument prototype would still apply. */
4073char opendir ();
4074#ifdef F77_DUMMY_MAIN
4075# ifdef __cplusplus
4076 extern "C"
4077# endif
4078 int F77_DUMMY_MAIN() { return 1; }
4079#endif
4080int
4081main ()
4082{
4083opendir ();
4084 ;
4085 return 0;
4086}
4087_ACEOF
4088rm -f conftest.$ac_objext conftest$ac_exeext
4089if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4090 (eval $ac_link) 2>&5
4091 ac_status=$?
4092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4093 (exit $ac_status); } &&
4094 { ac_try='test -s conftest$ac_exeext'
4095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4096 (eval $ac_try) 2>&5
4097 ac_status=$?
4098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4099 (exit $ac_status); }; }; then
4100 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004101else
Martin v. Löwis11437992002-04-12 09:54:03 +00004102 echo "$as_me: failed program was:" >&5
4103cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004104fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004105rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4106if test "$ac_cv_search_opendir" = no; then
4107 for ac_lib in dir; do
4108 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4109 cat >conftest.$ac_ext <<_ACEOF
4110#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004111#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004113/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004114#ifdef __cplusplus
4115extern "C"
4116#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004117/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004118 builtin and then its argument prototype would still apply. */
4119char opendir ();
4120#ifdef F77_DUMMY_MAIN
4121# ifdef __cplusplus
4122 extern "C"
4123# endif
4124 int F77_DUMMY_MAIN() { return 1; }
4125#endif
4126int
4127main ()
4128{
4129opendir ();
4130 ;
4131 return 0;
4132}
4133_ACEOF
4134rm -f conftest.$ac_objext conftest$ac_exeext
4135if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4136 (eval $ac_link) 2>&5
4137 ac_status=$?
4138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4139 (exit $ac_status); } &&
4140 { ac_try='test -s conftest$ac_exeext'
4141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4142 (eval $ac_try) 2>&5
4143 ac_status=$?
4144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4145 (exit $ac_status); }; }; then
4146 ac_cv_search_opendir="-l$ac_lib"
4147break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004148else
Martin v. Löwis11437992002-04-12 09:54:03 +00004149 echo "$as_me: failed program was:" >&5
4150cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004151fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004152rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4153 done
4154fi
4155LIBS=$ac_func_search_save_LIBS
4156fi
4157echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4158echo "${ECHO_T}$ac_cv_search_opendir" >&6
4159if test "$ac_cv_search_opendir" != no; then
4160 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004161
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004162fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004163
Michael W. Hudson54241132001-12-07 15:38:26 +00004164else
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4166echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4167if test "${ac_cv_search_opendir+set}" = set; then
4168 echo $ECHO_N "(cached) $ECHO_C" >&6
4169else
4170 ac_func_search_save_LIBS=$LIBS
4171ac_cv_search_opendir=no
4172cat >conftest.$ac_ext <<_ACEOF
4173#line $LINENO "configure"
4174#include "confdefs.h"
4175
4176/* Override any gcc2 internal prototype to avoid an error. */
4177#ifdef __cplusplus
4178extern "C"
4179#endif
4180/* We use char because int might match the return type of a gcc2
4181 builtin and then its argument prototype would still apply. */
4182char opendir ();
4183#ifdef F77_DUMMY_MAIN
4184# ifdef __cplusplus
4185 extern "C"
4186# endif
4187 int F77_DUMMY_MAIN() { return 1; }
4188#endif
4189int
4190main ()
4191{
4192opendir ();
4193 ;
4194 return 0;
4195}
4196_ACEOF
4197rm -f conftest.$ac_objext conftest$ac_exeext
4198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4199 (eval $ac_link) 2>&5
4200 ac_status=$?
4201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4202 (exit $ac_status); } &&
4203 { ac_try='test -s conftest$ac_exeext'
4204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4205 (eval $ac_try) 2>&5
4206 ac_status=$?
4207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4208 (exit $ac_status); }; }; then
4209 ac_cv_search_opendir="none required"
4210else
4211 echo "$as_me: failed program was:" >&5
4212cat conftest.$ac_ext >&5
4213fi
4214rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4215if test "$ac_cv_search_opendir" = no; then
4216 for ac_lib in x; do
4217 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4218 cat >conftest.$ac_ext <<_ACEOF
4219#line $LINENO "configure"
4220#include "confdefs.h"
4221
4222/* Override any gcc2 internal prototype to avoid an error. */
4223#ifdef __cplusplus
4224extern "C"
4225#endif
4226/* We use char because int might match the return type of a gcc2
4227 builtin and then its argument prototype would still apply. */
4228char opendir ();
4229#ifdef F77_DUMMY_MAIN
4230# ifdef __cplusplus
4231 extern "C"
4232# endif
4233 int F77_DUMMY_MAIN() { return 1; }
4234#endif
4235int
4236main ()
4237{
4238opendir ();
4239 ;
4240 return 0;
4241}
4242_ACEOF
4243rm -f conftest.$ac_objext conftest$ac_exeext
4244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4245 (eval $ac_link) 2>&5
4246 ac_status=$?
4247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4248 (exit $ac_status); } &&
4249 { ac_try='test -s conftest$ac_exeext'
4250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4251 (eval $ac_try) 2>&5
4252 ac_status=$?
4253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4254 (exit $ac_status); }; }; then
4255 ac_cv_search_opendir="-l$ac_lib"
4256break
4257else
4258 echo "$as_me: failed program was:" >&5
4259cat conftest.$ac_ext >&5
4260fi
4261rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4262 done
4263fi
4264LIBS=$ac_func_search_save_LIBS
4265fi
4266echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4267echo "${ECHO_T}$ac_cv_search_opendir" >&6
4268if test "$ac_cv_search_opendir" != no; then
4269 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4270
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004271fi
4272
4273fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004274
Michael W. Hudson54241132001-12-07 15:38:26 +00004275
Guido van Rossum627b2d71993-12-24 10:39:16 +00004276# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004277was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004278echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4279echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4280cat >conftest.$ac_ext <<_ACEOF
4281#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282#include "confdefs.h"
4283#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004284
4285_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004286if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4287 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004288 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004289else
Martin v. Löwis11437992002-04-12 09:54:03 +00004290
4291
4292cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004293#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004294_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004295
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004296
Guido van Rossum627b2d71993-12-24 10:39:16 +00004297fi
4298rm -f conftest*
4299
Martin v. Löwis11437992002-04-12 09:54:03 +00004300echo "$as_me:$LINENO: result: $was_it_defined" >&5
4301echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004302
Guido van Rossum810cc512001-09-09 23:51:39 +00004303# Two defines needed to enable largefile support on various platforms
4304# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004305
Martin v. Löwis11437992002-04-12 09:54:03 +00004306cat >>confdefs.h <<\_ACEOF
4307#define _LARGEFILE_SOURCE 1
4308_ACEOF
4309
4310
4311cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004312#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004313_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004314
Michael W. Hudson54241132001-12-07 15:38:26 +00004315
Guido van Rossum84e7b241996-08-19 21:59:00 +00004316# Add some code to confdefs.h so that the test for off_t works on SCO
4317cat >> confdefs.h <<\EOF
4318#if defined(SCO_DS)
4319#undef _OFF_T
4320#endif
4321EOF
4322
Guido van Rossumef2255b2000-03-10 22:30:29 +00004323# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004324echo "$as_me:$LINENO: checking for mode_t" >&5
4325echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4326if test "${ac_cv_type_mode_t+set}" = set; then
4327 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328else
Martin v. Löwis11437992002-04-12 09:54:03 +00004329 cat >conftest.$ac_ext <<_ACEOF
4330#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004331#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004332$ac_includes_default
4333#ifdef F77_DUMMY_MAIN
4334# ifdef __cplusplus
4335 extern "C"
4336# endif
4337 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004339int
4340main ()
4341{
4342if ((mode_t *) 0)
4343 return 0;
4344if (sizeof (mode_t))
4345 return 0;
4346 ;
4347 return 0;
4348}
4349_ACEOF
4350rm -f conftest.$ac_objext
4351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4352 (eval $ac_compile) 2>&5
4353 ac_status=$?
4354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4355 (exit $ac_status); } &&
4356 { ac_try='test -s conftest.$ac_objext'
4357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4358 (eval $ac_try) 2>&5
4359 ac_status=$?
4360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4361 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004362 ac_cv_type_mode_t=yes
4363else
Martin v. Löwis11437992002-04-12 09:54:03 +00004364 echo "$as_me: failed program was:" >&5
4365cat conftest.$ac_ext >&5
4366ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004367fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004368rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004369fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004370echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4371echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4372if test $ac_cv_type_mode_t = yes; then
4373 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004374else
Martin v. Löwis11437992002-04-12 09:54:03 +00004375
4376cat >>confdefs.h <<_ACEOF
4377#define mode_t int
4378_ACEOF
4379
4380fi
4381
4382echo "$as_me:$LINENO: checking for off_t" >&5
4383echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4384if test "${ac_cv_type_off_t+set}" = set; then
4385 echo $ECHO_N "(cached) $ECHO_C" >&6
4386else
4387 cat >conftest.$ac_ext <<_ACEOF
4388#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004389#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004390$ac_includes_default
4391#ifdef F77_DUMMY_MAIN
4392# ifdef __cplusplus
4393 extern "C"
4394# endif
4395 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004397int
4398main ()
4399{
4400if ((off_t *) 0)
4401 return 0;
4402if (sizeof (off_t))
4403 return 0;
4404 ;
4405 return 0;
4406}
4407_ACEOF
4408rm -f conftest.$ac_objext
4409if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4410 (eval $ac_compile) 2>&5
4411 ac_status=$?
4412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4413 (exit $ac_status); } &&
4414 { ac_try='test -s conftest.$ac_objext'
4415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4416 (eval $ac_try) 2>&5
4417 ac_status=$?
4418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4419 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004420 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004421else
Martin v. Löwis11437992002-04-12 09:54:03 +00004422 echo "$as_me: failed program was:" >&5
4423cat conftest.$ac_ext >&5
4424ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004425fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004426rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004427fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004428echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4429echo "${ECHO_T}$ac_cv_type_off_t" >&6
4430if test $ac_cv_type_off_t = yes; then
4431 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004432else
Martin v. Löwis11437992002-04-12 09:54:03 +00004433
4434cat >>confdefs.h <<_ACEOF
4435#define off_t long
4436_ACEOF
4437
4438fi
4439
4440echo "$as_me:$LINENO: checking for pid_t" >&5
4441echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4442if test "${ac_cv_type_pid_t+set}" = set; then
4443 echo $ECHO_N "(cached) $ECHO_C" >&6
4444else
4445 cat >conftest.$ac_ext <<_ACEOF
4446#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004447#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004448$ac_includes_default
4449#ifdef F77_DUMMY_MAIN
4450# ifdef __cplusplus
4451 extern "C"
4452# endif
4453 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004455int
4456main ()
4457{
4458if ((pid_t *) 0)
4459 return 0;
4460if (sizeof (pid_t))
4461 return 0;
4462 ;
4463 return 0;
4464}
4465_ACEOF
4466rm -f conftest.$ac_objext
4467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4468 (eval $ac_compile) 2>&5
4469 ac_status=$?
4470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4471 (exit $ac_status); } &&
4472 { ac_try='test -s conftest.$ac_objext'
4473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4474 (eval $ac_try) 2>&5
4475 ac_status=$?
4476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4477 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004478 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004479else
Martin v. Löwis11437992002-04-12 09:54:03 +00004480 echo "$as_me: failed program was:" >&5
4481cat conftest.$ac_ext >&5
4482ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004483fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004484rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004485fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004486echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4487echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4488if test $ac_cv_type_pid_t = yes; then
4489 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004490else
Martin v. Löwis11437992002-04-12 09:54:03 +00004491
4492cat >>confdefs.h <<_ACEOF
4493#define pid_t int
4494_ACEOF
4495
4496fi
4497
4498echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4499echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4500if test "${ac_cv_type_signal+set}" = set; then
4501 echo $ECHO_N "(cached) $ECHO_C" >&6
4502else
4503 cat >conftest.$ac_ext <<_ACEOF
4504#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004505#include "confdefs.h"
4506#include <sys/types.h>
4507#include <signal.h>
4508#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004509# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004510#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004511#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004512extern "C" void (*signal (int, void (*)(int)))(int);
4513#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004514void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004515#endif
4516
Martin v. Löwis11437992002-04-12 09:54:03 +00004517#ifdef F77_DUMMY_MAIN
4518# ifdef __cplusplus
4519 extern "C"
4520# endif
4521 int F77_DUMMY_MAIN() { return 1; }
4522#endif
4523int
4524main ()
4525{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004526int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004527 ;
4528 return 0;
4529}
4530_ACEOF
4531rm -f conftest.$ac_objext
4532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4533 (eval $ac_compile) 2>&5
4534 ac_status=$?
4535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4536 (exit $ac_status); } &&
4537 { ac_try='test -s conftest.$ac_objext'
4538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4539 (eval $ac_try) 2>&5
4540 ac_status=$?
4541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4542 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004543 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004544else
Martin v. Löwis11437992002-04-12 09:54:03 +00004545 echo "$as_me: failed program was:" >&5
4546cat conftest.$ac_ext >&5
4547ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004548fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004549rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004550fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004551echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4552echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004553
Martin v. Löwis11437992002-04-12 09:54:03 +00004554cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004555#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004556_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004557
Michael W. Hudson54241132001-12-07 15:38:26 +00004558
Martin v. Löwis11437992002-04-12 09:54:03 +00004559echo "$as_me:$LINENO: checking for size_t" >&5
4560echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4561if test "${ac_cv_type_size_t+set}" = set; then
4562 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004563else
Martin v. Löwis11437992002-04-12 09:54:03 +00004564 cat >conftest.$ac_ext <<_ACEOF
4565#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004566#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004567$ac_includes_default
4568#ifdef F77_DUMMY_MAIN
4569# ifdef __cplusplus
4570 extern "C"
4571# endif
4572 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004573#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004574int
4575main ()
4576{
4577if ((size_t *) 0)
4578 return 0;
4579if (sizeof (size_t))
4580 return 0;
4581 ;
4582 return 0;
4583}
4584_ACEOF
4585rm -f conftest.$ac_objext
4586if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4587 (eval $ac_compile) 2>&5
4588 ac_status=$?
4589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4590 (exit $ac_status); } &&
4591 { ac_try='test -s conftest.$ac_objext'
4592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4593 (eval $ac_try) 2>&5
4594 ac_status=$?
4595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4596 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004597 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004598else
Martin v. Löwis11437992002-04-12 09:54:03 +00004599 echo "$as_me: failed program was:" >&5
4600cat conftest.$ac_ext >&5
4601ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004603rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004604fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004605echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4606echo "${ECHO_T}$ac_cv_type_size_t" >&6
4607if test $ac_cv_type_size_t = yes; then
4608 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004609else
Martin v. Löwis11437992002-04-12 09:54:03 +00004610
4611cat >>confdefs.h <<_ACEOF
4612#define size_t unsigned
4613_ACEOF
4614
4615fi
4616
4617echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4618echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4619if test "${ac_cv_type_uid_t+set}" = set; then
4620 echo $ECHO_N "(cached) $ECHO_C" >&6
4621else
4622 cat >conftest.$ac_ext <<_ACEOF
4623#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004624#include "confdefs.h"
4625#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004626
4627_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004628if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4629 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004630 ac_cv_type_uid_t=yes
4631else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004632 ac_cv_type_uid_t=no
4633fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004634rm -f conftest*
4635
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004636fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004637echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4638echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004639if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004640
Martin v. Löwis11437992002-04-12 09:54:03 +00004641cat >>confdefs.h <<\_ACEOF
4642#define uid_t int
4643_ACEOF
4644
4645
4646cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004647#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004648_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004649
4650fi
4651
Jack Jansendd19cf82001-12-06 22:36:17 +00004652
Michael W. Hudson54241132001-12-07 15:38:26 +00004653# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004654echo "$as_me:$LINENO: checking for int" >&5
4655echo $ECHO_N "checking for int... $ECHO_C" >&6
4656if test "${ac_cv_type_int+set}" = set; then
4657 echo $ECHO_N "(cached) $ECHO_C" >&6
4658else
4659 cat >conftest.$ac_ext <<_ACEOF
4660#line $LINENO "configure"
4661#include "confdefs.h"
4662$ac_includes_default
4663#ifdef F77_DUMMY_MAIN
4664# ifdef __cplusplus
4665 extern "C"
4666# endif
4667 int F77_DUMMY_MAIN() { return 1; }
4668#endif
4669int
4670main ()
4671{
4672if ((int *) 0)
4673 return 0;
4674if (sizeof (int))
4675 return 0;
4676 ;
4677 return 0;
4678}
4679_ACEOF
4680rm -f conftest.$ac_objext
4681if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4682 (eval $ac_compile) 2>&5
4683 ac_status=$?
4684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4685 (exit $ac_status); } &&
4686 { ac_try='test -s conftest.$ac_objext'
4687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4688 (eval $ac_try) 2>&5
4689 ac_status=$?
4690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4691 (exit $ac_status); }; }; then
4692 ac_cv_type_int=yes
4693else
4694 echo "$as_me: failed program was:" >&5
4695cat conftest.$ac_ext >&5
4696ac_cv_type_int=no
4697fi
4698rm -f conftest.$ac_objext conftest.$ac_ext
4699fi
4700echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4701echo "${ECHO_T}$ac_cv_type_int" >&6
4702
4703echo "$as_me:$LINENO: checking size of int" >&5
4704echo $ECHO_N "checking size of int... $ECHO_C" >&6
4705if test "${ac_cv_sizeof_int+set}" = set; then
4706 echo $ECHO_N "(cached) $ECHO_C" >&6
4707else
4708 if test "$ac_cv_type_int" = yes; then
4709 # The cast to unsigned long works around a bug in the HP C Compiler
4710 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4711 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4712 # This bug is HP SR number 8606223364.
4713 if test "$cross_compiling" = yes; then
4714 # Depending upon the size, compute the lo and hi bounds.
4715cat >conftest.$ac_ext <<_ACEOF
4716#line $LINENO "configure"
4717#include "confdefs.h"
4718$ac_includes_default
4719#ifdef F77_DUMMY_MAIN
4720# ifdef __cplusplus
4721 extern "C"
4722# endif
4723 int F77_DUMMY_MAIN() { return 1; }
4724#endif
4725int
4726main ()
4727{
4728static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4729test_array [0] = 0
4730
4731 ;
4732 return 0;
4733}
4734_ACEOF
4735rm -f conftest.$ac_objext
4736if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4737 (eval $ac_compile) 2>&5
4738 ac_status=$?
4739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4740 (exit $ac_status); } &&
4741 { ac_try='test -s conftest.$ac_objext'
4742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4743 (eval $ac_try) 2>&5
4744 ac_status=$?
4745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4746 (exit $ac_status); }; }; then
4747 ac_lo=0 ac_mid=0
4748 while :; do
4749 cat >conftest.$ac_ext <<_ACEOF
4750#line $LINENO "configure"
4751#include "confdefs.h"
4752$ac_includes_default
4753#ifdef F77_DUMMY_MAIN
4754# ifdef __cplusplus
4755 extern "C"
4756# endif
4757 int F77_DUMMY_MAIN() { return 1; }
4758#endif
4759int
4760main ()
4761{
4762static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4763test_array [0] = 0
4764
4765 ;
4766 return 0;
4767}
4768_ACEOF
4769rm -f conftest.$ac_objext
4770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4771 (eval $ac_compile) 2>&5
4772 ac_status=$?
4773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4774 (exit $ac_status); } &&
4775 { ac_try='test -s conftest.$ac_objext'
4776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4777 (eval $ac_try) 2>&5
4778 ac_status=$?
4779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4780 (exit $ac_status); }; }; then
4781 ac_hi=$ac_mid; break
4782else
4783 echo "$as_me: failed program was:" >&5
4784cat conftest.$ac_ext >&5
4785ac_lo=`expr $ac_mid + 1`
4786 if test $ac_lo -le $ac_mid; then
4787 ac_lo= ac_hi=
4788 break
4789 fi
4790 ac_mid=`expr 2 '*' $ac_mid + 1`
4791fi
4792rm -f conftest.$ac_objext conftest.$ac_ext
4793 done
4794else
4795 echo "$as_me: failed program was:" >&5
4796cat conftest.$ac_ext >&5
4797cat >conftest.$ac_ext <<_ACEOF
4798#line $LINENO "configure"
4799#include "confdefs.h"
4800$ac_includes_default
4801#ifdef F77_DUMMY_MAIN
4802# ifdef __cplusplus
4803 extern "C"
4804# endif
4805 int F77_DUMMY_MAIN() { return 1; }
4806#endif
4807int
4808main ()
4809{
4810static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4811test_array [0] = 0
4812
4813 ;
4814 return 0;
4815}
4816_ACEOF
4817rm -f conftest.$ac_objext
4818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4819 (eval $ac_compile) 2>&5
4820 ac_status=$?
4821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4822 (exit $ac_status); } &&
4823 { ac_try='test -s conftest.$ac_objext'
4824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4825 (eval $ac_try) 2>&5
4826 ac_status=$?
4827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4828 (exit $ac_status); }; }; then
4829 ac_hi=-1 ac_mid=-1
4830 while :; do
4831 cat >conftest.$ac_ext <<_ACEOF
4832#line $LINENO "configure"
4833#include "confdefs.h"
4834$ac_includes_default
4835#ifdef F77_DUMMY_MAIN
4836# ifdef __cplusplus
4837 extern "C"
4838# endif
4839 int F77_DUMMY_MAIN() { return 1; }
4840#endif
4841int
4842main ()
4843{
4844static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4845test_array [0] = 0
4846
4847 ;
4848 return 0;
4849}
4850_ACEOF
4851rm -f conftest.$ac_objext
4852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4853 (eval $ac_compile) 2>&5
4854 ac_status=$?
4855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4856 (exit $ac_status); } &&
4857 { ac_try='test -s conftest.$ac_objext'
4858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4859 (eval $ac_try) 2>&5
4860 ac_status=$?
4861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862 (exit $ac_status); }; }; then
4863 ac_lo=$ac_mid; break
4864else
4865 echo "$as_me: failed program was:" >&5
4866cat conftest.$ac_ext >&5
4867ac_hi=`expr '(' $ac_mid ')' - 1`
4868 if test $ac_mid -le $ac_hi; then
4869 ac_lo= ac_hi=
4870 break
4871 fi
4872 ac_mid=`expr 2 '*' $ac_mid`
4873fi
4874rm -f conftest.$ac_objext conftest.$ac_ext
4875 done
4876else
4877 echo "$as_me: failed program was:" >&5
4878cat conftest.$ac_ext >&5
4879ac_lo= ac_hi=
4880fi
4881rm -f conftest.$ac_objext conftest.$ac_ext
4882fi
4883rm -f conftest.$ac_objext conftest.$ac_ext
4884# Binary search between lo and hi bounds.
4885while test "x$ac_lo" != "x$ac_hi"; do
4886 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4887 cat >conftest.$ac_ext <<_ACEOF
4888#line $LINENO "configure"
4889#include "confdefs.h"
4890$ac_includes_default
4891#ifdef F77_DUMMY_MAIN
4892# ifdef __cplusplus
4893 extern "C"
4894# endif
4895 int F77_DUMMY_MAIN() { return 1; }
4896#endif
4897int
4898main ()
4899{
4900static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4901test_array [0] = 0
4902
4903 ;
4904 return 0;
4905}
4906_ACEOF
4907rm -f conftest.$ac_objext
4908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4909 (eval $ac_compile) 2>&5
4910 ac_status=$?
4911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4912 (exit $ac_status); } &&
4913 { ac_try='test -s conftest.$ac_objext'
4914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4915 (eval $ac_try) 2>&5
4916 ac_status=$?
4917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4918 (exit $ac_status); }; }; then
4919 ac_hi=$ac_mid
4920else
4921 echo "$as_me: failed program was:" >&5
4922cat conftest.$ac_ext >&5
4923ac_lo=`expr '(' $ac_mid ')' + 1`
4924fi
4925rm -f conftest.$ac_objext conftest.$ac_ext
4926done
4927case $ac_lo in
4928?*) ac_cv_sizeof_int=$ac_lo;;
4929'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4930echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4931 { (exit 1); exit 1; }; } ;;
4932esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004933else
4934 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004935 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4936echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4937 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004938else
Martin v. Löwis11437992002-04-12 09:54:03 +00004939 cat >conftest.$ac_ext <<_ACEOF
4940#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004941#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004942$ac_includes_default
4943long longval () { return (long) (sizeof (int)); }
4944unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004945#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004946#include <stdlib.h>
4947#ifdef F77_DUMMY_MAIN
4948# ifdef __cplusplus
4949 extern "C"
4950# endif
4951 int F77_DUMMY_MAIN() { return 1; }
4952#endif
4953int
4954main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004955{
Martin v. Löwis11437992002-04-12 09:54:03 +00004956
4957 FILE *f = fopen ("conftest.val", "w");
4958 if (! f)
4959 exit (1);
4960 if (((long) (sizeof (int))) < 0)
4961 {
4962 long i = longval ();
4963 if (i != ((long) (sizeof (int))))
4964 exit (1);
4965 fprintf (f, "%ld\n", i);
4966 }
4967 else
4968 {
4969 unsigned long i = ulongval ();
4970 if (i != ((long) (sizeof (int))))
4971 exit (1);
4972 fprintf (f, "%lu\n", i);
4973 }
4974 exit (ferror (f) || fclose (f) != 0);
4975
4976 ;
4977 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004978}
Martin v. Löwis11437992002-04-12 09:54:03 +00004979_ACEOF
4980rm -f conftest$ac_exeext
4981if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4982 (eval $ac_link) 2>&5
4983 ac_status=$?
4984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4985 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4987 (eval $ac_try) 2>&5
4988 ac_status=$?
4989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4990 (exit $ac_status); }; }; then
4991 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004992else
Martin v. Löwis11437992002-04-12 09:54:03 +00004993 echo "$as_me: program exited with status $ac_status" >&5
4994echo "$as_me: failed program was:" >&5
4995cat conftest.$ac_ext >&5
4996( exit $ac_status )
4997{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4998echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4999 { (exit 1); exit 1; }; }
5000fi
5001rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5002fi
5003fi
5004rm -f conftest.val
5005else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005006 ac_cv_sizeof_int=0
5007fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005008fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005009echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5010echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5011cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005012#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005013_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005014
5015
Martin v. Löwis11437992002-04-12 09:54:03 +00005016echo "$as_me:$LINENO: checking for long" >&5
5017echo $ECHO_N "checking for long... $ECHO_C" >&6
5018if test "${ac_cv_type_long+set}" = set; then
5019 echo $ECHO_N "(cached) $ECHO_C" >&6
5020else
5021 cat >conftest.$ac_ext <<_ACEOF
5022#line $LINENO "configure"
5023#include "confdefs.h"
5024$ac_includes_default
5025#ifdef F77_DUMMY_MAIN
5026# ifdef __cplusplus
5027 extern "C"
5028# endif
5029 int F77_DUMMY_MAIN() { return 1; }
5030#endif
5031int
5032main ()
5033{
5034if ((long *) 0)
5035 return 0;
5036if (sizeof (long))
5037 return 0;
5038 ;
5039 return 0;
5040}
5041_ACEOF
5042rm -f conftest.$ac_objext
5043if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5044 (eval $ac_compile) 2>&5
5045 ac_status=$?
5046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5047 (exit $ac_status); } &&
5048 { ac_try='test -s conftest.$ac_objext'
5049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5050 (eval $ac_try) 2>&5
5051 ac_status=$?
5052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5053 (exit $ac_status); }; }; then
5054 ac_cv_type_long=yes
5055else
5056 echo "$as_me: failed program was:" >&5
5057cat conftest.$ac_ext >&5
5058ac_cv_type_long=no
5059fi
5060rm -f conftest.$ac_objext conftest.$ac_ext
5061fi
5062echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5063echo "${ECHO_T}$ac_cv_type_long" >&6
5064
5065echo "$as_me:$LINENO: checking size of long" >&5
5066echo $ECHO_N "checking size of long... $ECHO_C" >&6
5067if test "${ac_cv_sizeof_long+set}" = set; then
5068 echo $ECHO_N "(cached) $ECHO_C" >&6
5069else
5070 if test "$ac_cv_type_long" = yes; then
5071 # The cast to unsigned long works around a bug in the HP C Compiler
5072 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5073 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5074 # This bug is HP SR number 8606223364.
5075 if test "$cross_compiling" = yes; then
5076 # Depending upon the size, compute the lo and hi bounds.
5077cat >conftest.$ac_ext <<_ACEOF
5078#line $LINENO "configure"
5079#include "confdefs.h"
5080$ac_includes_default
5081#ifdef F77_DUMMY_MAIN
5082# ifdef __cplusplus
5083 extern "C"
5084# endif
5085 int F77_DUMMY_MAIN() { return 1; }
5086#endif
5087int
5088main ()
5089{
5090static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5091test_array [0] = 0
5092
5093 ;
5094 return 0;
5095}
5096_ACEOF
5097rm -f conftest.$ac_objext
5098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5099 (eval $ac_compile) 2>&5
5100 ac_status=$?
5101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5102 (exit $ac_status); } &&
5103 { ac_try='test -s conftest.$ac_objext'
5104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5105 (eval $ac_try) 2>&5
5106 ac_status=$?
5107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5108 (exit $ac_status); }; }; then
5109 ac_lo=0 ac_mid=0
5110 while :; do
5111 cat >conftest.$ac_ext <<_ACEOF
5112#line $LINENO "configure"
5113#include "confdefs.h"
5114$ac_includes_default
5115#ifdef F77_DUMMY_MAIN
5116# ifdef __cplusplus
5117 extern "C"
5118# endif
5119 int F77_DUMMY_MAIN() { return 1; }
5120#endif
5121int
5122main ()
5123{
5124static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5125test_array [0] = 0
5126
5127 ;
5128 return 0;
5129}
5130_ACEOF
5131rm -f conftest.$ac_objext
5132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5133 (eval $ac_compile) 2>&5
5134 ac_status=$?
5135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5136 (exit $ac_status); } &&
5137 { ac_try='test -s conftest.$ac_objext'
5138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5139 (eval $ac_try) 2>&5
5140 ac_status=$?
5141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5142 (exit $ac_status); }; }; then
5143 ac_hi=$ac_mid; break
5144else
5145 echo "$as_me: failed program was:" >&5
5146cat conftest.$ac_ext >&5
5147ac_lo=`expr $ac_mid + 1`
5148 if test $ac_lo -le $ac_mid; then
5149 ac_lo= ac_hi=
5150 break
5151 fi
5152 ac_mid=`expr 2 '*' $ac_mid + 1`
5153fi
5154rm -f conftest.$ac_objext conftest.$ac_ext
5155 done
5156else
5157 echo "$as_me: failed program was:" >&5
5158cat conftest.$ac_ext >&5
5159cat >conftest.$ac_ext <<_ACEOF
5160#line $LINENO "configure"
5161#include "confdefs.h"
5162$ac_includes_default
5163#ifdef F77_DUMMY_MAIN
5164# ifdef __cplusplus
5165 extern "C"
5166# endif
5167 int F77_DUMMY_MAIN() { return 1; }
5168#endif
5169int
5170main ()
5171{
5172static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5173test_array [0] = 0
5174
5175 ;
5176 return 0;
5177}
5178_ACEOF
5179rm -f conftest.$ac_objext
5180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5181 (eval $ac_compile) 2>&5
5182 ac_status=$?
5183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5184 (exit $ac_status); } &&
5185 { ac_try='test -s conftest.$ac_objext'
5186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5187 (eval $ac_try) 2>&5
5188 ac_status=$?
5189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5190 (exit $ac_status); }; }; then
5191 ac_hi=-1 ac_mid=-1
5192 while :; do
5193 cat >conftest.$ac_ext <<_ACEOF
5194#line $LINENO "configure"
5195#include "confdefs.h"
5196$ac_includes_default
5197#ifdef F77_DUMMY_MAIN
5198# ifdef __cplusplus
5199 extern "C"
5200# endif
5201 int F77_DUMMY_MAIN() { return 1; }
5202#endif
5203int
5204main ()
5205{
5206static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5207test_array [0] = 0
5208
5209 ;
5210 return 0;
5211}
5212_ACEOF
5213rm -f conftest.$ac_objext
5214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5215 (eval $ac_compile) 2>&5
5216 ac_status=$?
5217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5218 (exit $ac_status); } &&
5219 { ac_try='test -s conftest.$ac_objext'
5220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5221 (eval $ac_try) 2>&5
5222 ac_status=$?
5223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5224 (exit $ac_status); }; }; then
5225 ac_lo=$ac_mid; break
5226else
5227 echo "$as_me: failed program was:" >&5
5228cat conftest.$ac_ext >&5
5229ac_hi=`expr '(' $ac_mid ')' - 1`
5230 if test $ac_mid -le $ac_hi; then
5231 ac_lo= ac_hi=
5232 break
5233 fi
5234 ac_mid=`expr 2 '*' $ac_mid`
5235fi
5236rm -f conftest.$ac_objext conftest.$ac_ext
5237 done
5238else
5239 echo "$as_me: failed program was:" >&5
5240cat conftest.$ac_ext >&5
5241ac_lo= ac_hi=
5242fi
5243rm -f conftest.$ac_objext conftest.$ac_ext
5244fi
5245rm -f conftest.$ac_objext conftest.$ac_ext
5246# Binary search between lo and hi bounds.
5247while test "x$ac_lo" != "x$ac_hi"; do
5248 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5249 cat >conftest.$ac_ext <<_ACEOF
5250#line $LINENO "configure"
5251#include "confdefs.h"
5252$ac_includes_default
5253#ifdef F77_DUMMY_MAIN
5254# ifdef __cplusplus
5255 extern "C"
5256# endif
5257 int F77_DUMMY_MAIN() { return 1; }
5258#endif
5259int
5260main ()
5261{
5262static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5263test_array [0] = 0
5264
5265 ;
5266 return 0;
5267}
5268_ACEOF
5269rm -f conftest.$ac_objext
5270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5271 (eval $ac_compile) 2>&5
5272 ac_status=$?
5273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5274 (exit $ac_status); } &&
5275 { ac_try='test -s conftest.$ac_objext'
5276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5277 (eval $ac_try) 2>&5
5278 ac_status=$?
5279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5280 (exit $ac_status); }; }; then
5281 ac_hi=$ac_mid
5282else
5283 echo "$as_me: failed program was:" >&5
5284cat conftest.$ac_ext >&5
5285ac_lo=`expr '(' $ac_mid ')' + 1`
5286fi
5287rm -f conftest.$ac_objext conftest.$ac_ext
5288done
5289case $ac_lo in
5290?*) ac_cv_sizeof_long=$ac_lo;;
5291'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5292echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5293 { (exit 1); exit 1; }; } ;;
5294esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005295else
5296 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005297 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5298echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5299 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005300else
Martin v. Löwis11437992002-04-12 09:54:03 +00005301 cat >conftest.$ac_ext <<_ACEOF
5302#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005303#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005304$ac_includes_default
5305long longval () { return (long) (sizeof (long)); }
5306unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005307#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005308#include <stdlib.h>
5309#ifdef F77_DUMMY_MAIN
5310# ifdef __cplusplus
5311 extern "C"
5312# endif
5313 int F77_DUMMY_MAIN() { return 1; }
5314#endif
5315int
5316main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005317{
Martin v. Löwis11437992002-04-12 09:54:03 +00005318
5319 FILE *f = fopen ("conftest.val", "w");
5320 if (! f)
5321 exit (1);
5322 if (((long) (sizeof (long))) < 0)
5323 {
5324 long i = longval ();
5325 if (i != ((long) (sizeof (long))))
5326 exit (1);
5327 fprintf (f, "%ld\n", i);
5328 }
5329 else
5330 {
5331 unsigned long i = ulongval ();
5332 if (i != ((long) (sizeof (long))))
5333 exit (1);
5334 fprintf (f, "%lu\n", i);
5335 }
5336 exit (ferror (f) || fclose (f) != 0);
5337
5338 ;
5339 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005340}
Martin v. Löwis11437992002-04-12 09:54:03 +00005341_ACEOF
5342rm -f conftest$ac_exeext
5343if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5344 (eval $ac_link) 2>&5
5345 ac_status=$?
5346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5347 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5349 (eval $ac_try) 2>&5
5350 ac_status=$?
5351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5352 (exit $ac_status); }; }; then
5353 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005354else
Martin v. Löwis11437992002-04-12 09:54:03 +00005355 echo "$as_me: program exited with status $ac_status" >&5
5356echo "$as_me: failed program was:" >&5
5357cat conftest.$ac_ext >&5
5358( exit $ac_status )
5359{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5360echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5361 { (exit 1); exit 1; }; }
5362fi
5363rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5364fi
5365fi
5366rm -f conftest.val
5367else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005368 ac_cv_sizeof_long=0
5369fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005370fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005371echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5372echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5373cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005374#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005375_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005376
5377
Martin v. Löwis11437992002-04-12 09:54:03 +00005378echo "$as_me:$LINENO: checking for void *" >&5
5379echo $ECHO_N "checking for void *... $ECHO_C" >&6
5380if test "${ac_cv_type_void_p+set}" = set; then
5381 echo $ECHO_N "(cached) $ECHO_C" >&6
5382else
5383 cat >conftest.$ac_ext <<_ACEOF
5384#line $LINENO "configure"
5385#include "confdefs.h"
5386$ac_includes_default
5387#ifdef F77_DUMMY_MAIN
5388# ifdef __cplusplus
5389 extern "C"
5390# endif
5391 int F77_DUMMY_MAIN() { return 1; }
5392#endif
5393int
5394main ()
5395{
5396if ((void * *) 0)
5397 return 0;
5398if (sizeof (void *))
5399 return 0;
5400 ;
5401 return 0;
5402}
5403_ACEOF
5404rm -f conftest.$ac_objext
5405if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5406 (eval $ac_compile) 2>&5
5407 ac_status=$?
5408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5409 (exit $ac_status); } &&
5410 { ac_try='test -s conftest.$ac_objext'
5411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5412 (eval $ac_try) 2>&5
5413 ac_status=$?
5414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5415 (exit $ac_status); }; }; then
5416 ac_cv_type_void_p=yes
5417else
5418 echo "$as_me: failed program was:" >&5
5419cat conftest.$ac_ext >&5
5420ac_cv_type_void_p=no
5421fi
5422rm -f conftest.$ac_objext conftest.$ac_ext
5423fi
5424echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5425echo "${ECHO_T}$ac_cv_type_void_p" >&6
5426
5427echo "$as_me:$LINENO: checking size of void *" >&5
5428echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5429if test "${ac_cv_sizeof_void_p+set}" = set; then
5430 echo $ECHO_N "(cached) $ECHO_C" >&6
5431else
5432 if test "$ac_cv_type_void_p" = yes; then
5433 # The cast to unsigned long works around a bug in the HP C Compiler
5434 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5435 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5436 # This bug is HP SR number 8606223364.
5437 if test "$cross_compiling" = yes; then
5438 # Depending upon the size, compute the lo and hi bounds.
5439cat >conftest.$ac_ext <<_ACEOF
5440#line $LINENO "configure"
5441#include "confdefs.h"
5442$ac_includes_default
5443#ifdef F77_DUMMY_MAIN
5444# ifdef __cplusplus
5445 extern "C"
5446# endif
5447 int F77_DUMMY_MAIN() { return 1; }
5448#endif
5449int
5450main ()
5451{
5452static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5453test_array [0] = 0
5454
5455 ;
5456 return 0;
5457}
5458_ACEOF
5459rm -f conftest.$ac_objext
5460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5461 (eval $ac_compile) 2>&5
5462 ac_status=$?
5463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5464 (exit $ac_status); } &&
5465 { ac_try='test -s conftest.$ac_objext'
5466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5467 (eval $ac_try) 2>&5
5468 ac_status=$?
5469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470 (exit $ac_status); }; }; then
5471 ac_lo=0 ac_mid=0
5472 while :; do
5473 cat >conftest.$ac_ext <<_ACEOF
5474#line $LINENO "configure"
5475#include "confdefs.h"
5476$ac_includes_default
5477#ifdef F77_DUMMY_MAIN
5478# ifdef __cplusplus
5479 extern "C"
5480# endif
5481 int F77_DUMMY_MAIN() { return 1; }
5482#endif
5483int
5484main ()
5485{
5486static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5487test_array [0] = 0
5488
5489 ;
5490 return 0;
5491}
5492_ACEOF
5493rm -f conftest.$ac_objext
5494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5495 (eval $ac_compile) 2>&5
5496 ac_status=$?
5497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5498 (exit $ac_status); } &&
5499 { ac_try='test -s conftest.$ac_objext'
5500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5501 (eval $ac_try) 2>&5
5502 ac_status=$?
5503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5504 (exit $ac_status); }; }; then
5505 ac_hi=$ac_mid; break
5506else
5507 echo "$as_me: failed program was:" >&5
5508cat conftest.$ac_ext >&5
5509ac_lo=`expr $ac_mid + 1`
5510 if test $ac_lo -le $ac_mid; then
5511 ac_lo= ac_hi=
5512 break
5513 fi
5514 ac_mid=`expr 2 '*' $ac_mid + 1`
5515fi
5516rm -f conftest.$ac_objext conftest.$ac_ext
5517 done
5518else
5519 echo "$as_me: failed program was:" >&5
5520cat conftest.$ac_ext >&5
5521cat >conftest.$ac_ext <<_ACEOF
5522#line $LINENO "configure"
5523#include "confdefs.h"
5524$ac_includes_default
5525#ifdef F77_DUMMY_MAIN
5526# ifdef __cplusplus
5527 extern "C"
5528# endif
5529 int F77_DUMMY_MAIN() { return 1; }
5530#endif
5531int
5532main ()
5533{
5534static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5535test_array [0] = 0
5536
5537 ;
5538 return 0;
5539}
5540_ACEOF
5541rm -f conftest.$ac_objext
5542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5543 (eval $ac_compile) 2>&5
5544 ac_status=$?
5545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5546 (exit $ac_status); } &&
5547 { ac_try='test -s conftest.$ac_objext'
5548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5549 (eval $ac_try) 2>&5
5550 ac_status=$?
5551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5552 (exit $ac_status); }; }; then
5553 ac_hi=-1 ac_mid=-1
5554 while :; do
5555 cat >conftest.$ac_ext <<_ACEOF
5556#line $LINENO "configure"
5557#include "confdefs.h"
5558$ac_includes_default
5559#ifdef F77_DUMMY_MAIN
5560# ifdef __cplusplus
5561 extern "C"
5562# endif
5563 int F77_DUMMY_MAIN() { return 1; }
5564#endif
5565int
5566main ()
5567{
5568static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5569test_array [0] = 0
5570
5571 ;
5572 return 0;
5573}
5574_ACEOF
5575rm -f conftest.$ac_objext
5576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5577 (eval $ac_compile) 2>&5
5578 ac_status=$?
5579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5580 (exit $ac_status); } &&
5581 { ac_try='test -s conftest.$ac_objext'
5582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5583 (eval $ac_try) 2>&5
5584 ac_status=$?
5585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5586 (exit $ac_status); }; }; then
5587 ac_lo=$ac_mid; break
5588else
5589 echo "$as_me: failed program was:" >&5
5590cat conftest.$ac_ext >&5
5591ac_hi=`expr '(' $ac_mid ')' - 1`
5592 if test $ac_mid -le $ac_hi; then
5593 ac_lo= ac_hi=
5594 break
5595 fi
5596 ac_mid=`expr 2 '*' $ac_mid`
5597fi
5598rm -f conftest.$ac_objext conftest.$ac_ext
5599 done
5600else
5601 echo "$as_me: failed program was:" >&5
5602cat conftest.$ac_ext >&5
5603ac_lo= ac_hi=
5604fi
5605rm -f conftest.$ac_objext conftest.$ac_ext
5606fi
5607rm -f conftest.$ac_objext conftest.$ac_ext
5608# Binary search between lo and hi bounds.
5609while test "x$ac_lo" != "x$ac_hi"; do
5610 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5611 cat >conftest.$ac_ext <<_ACEOF
5612#line $LINENO "configure"
5613#include "confdefs.h"
5614$ac_includes_default
5615#ifdef F77_DUMMY_MAIN
5616# ifdef __cplusplus
5617 extern "C"
5618# endif
5619 int F77_DUMMY_MAIN() { return 1; }
5620#endif
5621int
5622main ()
5623{
5624static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5625test_array [0] = 0
5626
5627 ;
5628 return 0;
5629}
5630_ACEOF
5631rm -f conftest.$ac_objext
5632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5633 (eval $ac_compile) 2>&5
5634 ac_status=$?
5635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5636 (exit $ac_status); } &&
5637 { ac_try='test -s conftest.$ac_objext'
5638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5639 (eval $ac_try) 2>&5
5640 ac_status=$?
5641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5642 (exit $ac_status); }; }; then
5643 ac_hi=$ac_mid
5644else
5645 echo "$as_me: failed program was:" >&5
5646cat conftest.$ac_ext >&5
5647ac_lo=`expr '(' $ac_mid ')' + 1`
5648fi
5649rm -f conftest.$ac_objext conftest.$ac_ext
5650done
5651case $ac_lo in
5652?*) ac_cv_sizeof_void_p=$ac_lo;;
5653'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5654echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5655 { (exit 1); exit 1; }; } ;;
5656esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005657else
5658 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005659 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5660echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5661 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005662else
Martin v. Löwis11437992002-04-12 09:54:03 +00005663 cat >conftest.$ac_ext <<_ACEOF
5664#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005665#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005666$ac_includes_default
5667long longval () { return (long) (sizeof (void *)); }
5668unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005669#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005670#include <stdlib.h>
5671#ifdef F77_DUMMY_MAIN
5672# ifdef __cplusplus
5673 extern "C"
5674# endif
5675 int F77_DUMMY_MAIN() { return 1; }
5676#endif
5677int
5678main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005679{
Martin v. Löwis11437992002-04-12 09:54:03 +00005680
5681 FILE *f = fopen ("conftest.val", "w");
5682 if (! f)
5683 exit (1);
5684 if (((long) (sizeof (void *))) < 0)
5685 {
5686 long i = longval ();
5687 if (i != ((long) (sizeof (void *))))
5688 exit (1);
5689 fprintf (f, "%ld\n", i);
5690 }
5691 else
5692 {
5693 unsigned long i = ulongval ();
5694 if (i != ((long) (sizeof (void *))))
5695 exit (1);
5696 fprintf (f, "%lu\n", i);
5697 }
5698 exit (ferror (f) || fclose (f) != 0);
5699
5700 ;
5701 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005702}
Martin v. Löwis11437992002-04-12 09:54:03 +00005703_ACEOF
5704rm -f conftest$ac_exeext
5705if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5706 (eval $ac_link) 2>&5
5707 ac_status=$?
5708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5709 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5711 (eval $ac_try) 2>&5
5712 ac_status=$?
5713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5714 (exit $ac_status); }; }; then
5715 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005716else
Martin v. Löwis11437992002-04-12 09:54:03 +00005717 echo "$as_me: program exited with status $ac_status" >&5
5718echo "$as_me: failed program was:" >&5
5719cat conftest.$ac_ext >&5
5720( exit $ac_status )
5721{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5722echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5723 { (exit 1); exit 1; }; }
5724fi
5725rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5726fi
5727fi
5728rm -f conftest.val
5729else
Guido van Rossumad678af1998-10-02 14:42:15 +00005730 ac_cv_sizeof_void_p=0
5731fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005732fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005733echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5734echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5735cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005736#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005737_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005738
5739
Martin v. Löwis11437992002-04-12 09:54:03 +00005740echo "$as_me:$LINENO: checking for char" >&5
5741echo $ECHO_N "checking for char... $ECHO_C" >&6
5742if test "${ac_cv_type_char+set}" = set; then
5743 echo $ECHO_N "(cached) $ECHO_C" >&6
5744else
5745 cat >conftest.$ac_ext <<_ACEOF
5746#line $LINENO "configure"
5747#include "confdefs.h"
5748$ac_includes_default
5749#ifdef F77_DUMMY_MAIN
5750# ifdef __cplusplus
5751 extern "C"
5752# endif
5753 int F77_DUMMY_MAIN() { return 1; }
5754#endif
5755int
5756main ()
5757{
5758if ((char *) 0)
5759 return 0;
5760if (sizeof (char))
5761 return 0;
5762 ;
5763 return 0;
5764}
5765_ACEOF
5766rm -f conftest.$ac_objext
5767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5768 (eval $ac_compile) 2>&5
5769 ac_status=$?
5770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5771 (exit $ac_status); } &&
5772 { ac_try='test -s conftest.$ac_objext'
5773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5774 (eval $ac_try) 2>&5
5775 ac_status=$?
5776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5777 (exit $ac_status); }; }; then
5778 ac_cv_type_char=yes
5779else
5780 echo "$as_me: failed program was:" >&5
5781cat conftest.$ac_ext >&5
5782ac_cv_type_char=no
5783fi
5784rm -f conftest.$ac_objext conftest.$ac_ext
5785fi
5786echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5787echo "${ECHO_T}$ac_cv_type_char" >&6
5788
5789echo "$as_me:$LINENO: checking size of char" >&5
5790echo $ECHO_N "checking size of char... $ECHO_C" >&6
5791if test "${ac_cv_sizeof_char+set}" = set; then
5792 echo $ECHO_N "(cached) $ECHO_C" >&6
5793else
5794 if test "$ac_cv_type_char" = yes; then
5795 # The cast to unsigned long works around a bug in the HP C Compiler
5796 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5797 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5798 # This bug is HP SR number 8606223364.
5799 if test "$cross_compiling" = yes; then
5800 # Depending upon the size, compute the lo and hi bounds.
5801cat >conftest.$ac_ext <<_ACEOF
5802#line $LINENO "configure"
5803#include "confdefs.h"
5804$ac_includes_default
5805#ifdef F77_DUMMY_MAIN
5806# ifdef __cplusplus
5807 extern "C"
5808# endif
5809 int F77_DUMMY_MAIN() { return 1; }
5810#endif
5811int
5812main ()
5813{
5814static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5815test_array [0] = 0
5816
5817 ;
5818 return 0;
5819}
5820_ACEOF
5821rm -f conftest.$ac_objext
5822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5823 (eval $ac_compile) 2>&5
5824 ac_status=$?
5825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826 (exit $ac_status); } &&
5827 { ac_try='test -s conftest.$ac_objext'
5828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5829 (eval $ac_try) 2>&5
5830 ac_status=$?
5831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5832 (exit $ac_status); }; }; then
5833 ac_lo=0 ac_mid=0
5834 while :; do
5835 cat >conftest.$ac_ext <<_ACEOF
5836#line $LINENO "configure"
5837#include "confdefs.h"
5838$ac_includes_default
5839#ifdef F77_DUMMY_MAIN
5840# ifdef __cplusplus
5841 extern "C"
5842# endif
5843 int F77_DUMMY_MAIN() { return 1; }
5844#endif
5845int
5846main ()
5847{
5848static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5849test_array [0] = 0
5850
5851 ;
5852 return 0;
5853}
5854_ACEOF
5855rm -f conftest.$ac_objext
5856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5857 (eval $ac_compile) 2>&5
5858 ac_status=$?
5859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5860 (exit $ac_status); } &&
5861 { ac_try='test -s conftest.$ac_objext'
5862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5863 (eval $ac_try) 2>&5
5864 ac_status=$?
5865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5866 (exit $ac_status); }; }; then
5867 ac_hi=$ac_mid; break
5868else
5869 echo "$as_me: failed program was:" >&5
5870cat conftest.$ac_ext >&5
5871ac_lo=`expr $ac_mid + 1`
5872 if test $ac_lo -le $ac_mid; then
5873 ac_lo= ac_hi=
5874 break
5875 fi
5876 ac_mid=`expr 2 '*' $ac_mid + 1`
5877fi
5878rm -f conftest.$ac_objext conftest.$ac_ext
5879 done
5880else
5881 echo "$as_me: failed program was:" >&5
5882cat conftest.$ac_ext >&5
5883cat >conftest.$ac_ext <<_ACEOF
5884#line $LINENO "configure"
5885#include "confdefs.h"
5886$ac_includes_default
5887#ifdef F77_DUMMY_MAIN
5888# ifdef __cplusplus
5889 extern "C"
5890# endif
5891 int F77_DUMMY_MAIN() { return 1; }
5892#endif
5893int
5894main ()
5895{
5896static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5897test_array [0] = 0
5898
5899 ;
5900 return 0;
5901}
5902_ACEOF
5903rm -f conftest.$ac_objext
5904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5905 (eval $ac_compile) 2>&5
5906 ac_status=$?
5907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5908 (exit $ac_status); } &&
5909 { ac_try='test -s conftest.$ac_objext'
5910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5911 (eval $ac_try) 2>&5
5912 ac_status=$?
5913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5914 (exit $ac_status); }; }; then
5915 ac_hi=-1 ac_mid=-1
5916 while :; do
5917 cat >conftest.$ac_ext <<_ACEOF
5918#line $LINENO "configure"
5919#include "confdefs.h"
5920$ac_includes_default
5921#ifdef F77_DUMMY_MAIN
5922# ifdef __cplusplus
5923 extern "C"
5924# endif
5925 int F77_DUMMY_MAIN() { return 1; }
5926#endif
5927int
5928main ()
5929{
5930static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5931test_array [0] = 0
5932
5933 ;
5934 return 0;
5935}
5936_ACEOF
5937rm -f conftest.$ac_objext
5938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5939 (eval $ac_compile) 2>&5
5940 ac_status=$?
5941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5942 (exit $ac_status); } &&
5943 { ac_try='test -s conftest.$ac_objext'
5944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5945 (eval $ac_try) 2>&5
5946 ac_status=$?
5947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5948 (exit $ac_status); }; }; then
5949 ac_lo=$ac_mid; break
5950else
5951 echo "$as_me: failed program was:" >&5
5952cat conftest.$ac_ext >&5
5953ac_hi=`expr '(' $ac_mid ')' - 1`
5954 if test $ac_mid -le $ac_hi; then
5955 ac_lo= ac_hi=
5956 break
5957 fi
5958 ac_mid=`expr 2 '*' $ac_mid`
5959fi
5960rm -f conftest.$ac_objext conftest.$ac_ext
5961 done
5962else
5963 echo "$as_me: failed program was:" >&5
5964cat conftest.$ac_ext >&5
5965ac_lo= ac_hi=
5966fi
5967rm -f conftest.$ac_objext conftest.$ac_ext
5968fi
5969rm -f conftest.$ac_objext conftest.$ac_ext
5970# Binary search between lo and hi bounds.
5971while test "x$ac_lo" != "x$ac_hi"; do
5972 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5973 cat >conftest.$ac_ext <<_ACEOF
5974#line $LINENO "configure"
5975#include "confdefs.h"
5976$ac_includes_default
5977#ifdef F77_DUMMY_MAIN
5978# ifdef __cplusplus
5979 extern "C"
5980# endif
5981 int F77_DUMMY_MAIN() { return 1; }
5982#endif
5983int
5984main ()
5985{
5986static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5987test_array [0] = 0
5988
5989 ;
5990 return 0;
5991}
5992_ACEOF
5993rm -f conftest.$ac_objext
5994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5995 (eval $ac_compile) 2>&5
5996 ac_status=$?
5997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5998 (exit $ac_status); } &&
5999 { ac_try='test -s conftest.$ac_objext'
6000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6001 (eval $ac_try) 2>&5
6002 ac_status=$?
6003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6004 (exit $ac_status); }; }; then
6005 ac_hi=$ac_mid
6006else
6007 echo "$as_me: failed program was:" >&5
6008cat conftest.$ac_ext >&5
6009ac_lo=`expr '(' $ac_mid ')' + 1`
6010fi
6011rm -f conftest.$ac_objext conftest.$ac_ext
6012done
6013case $ac_lo in
6014?*) ac_cv_sizeof_char=$ac_lo;;
6015'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6016echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6017 { (exit 1); exit 1; }; } ;;
6018esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006019else
6020 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006021 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6022echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6023 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006024else
Martin v. Löwis11437992002-04-12 09:54:03 +00006025 cat >conftest.$ac_ext <<_ACEOF
6026#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006027#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006028$ac_includes_default
6029long longval () { return (long) (sizeof (char)); }
6030unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006031#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006032#include <stdlib.h>
6033#ifdef F77_DUMMY_MAIN
6034# ifdef __cplusplus
6035 extern "C"
6036# endif
6037 int F77_DUMMY_MAIN() { return 1; }
6038#endif
6039int
6040main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006041{
Martin v. Löwis11437992002-04-12 09:54:03 +00006042
6043 FILE *f = fopen ("conftest.val", "w");
6044 if (! f)
6045 exit (1);
6046 if (((long) (sizeof (char))) < 0)
6047 {
6048 long i = longval ();
6049 if (i != ((long) (sizeof (char))))
6050 exit (1);
6051 fprintf (f, "%ld\n", i);
6052 }
6053 else
6054 {
6055 unsigned long i = ulongval ();
6056 if (i != ((long) (sizeof (char))))
6057 exit (1);
6058 fprintf (f, "%lu\n", i);
6059 }
6060 exit (ferror (f) || fclose (f) != 0);
6061
6062 ;
6063 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006064}
Martin v. Löwis11437992002-04-12 09:54:03 +00006065_ACEOF
6066rm -f conftest$ac_exeext
6067if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6068 (eval $ac_link) 2>&5
6069 ac_status=$?
6070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6071 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6073 (eval $ac_try) 2>&5
6074 ac_status=$?
6075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6076 (exit $ac_status); }; }; then
6077 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006078else
Martin v. Löwis11437992002-04-12 09:54:03 +00006079 echo "$as_me: program exited with status $ac_status" >&5
6080echo "$as_me: failed program was:" >&5
6081cat conftest.$ac_ext >&5
6082( exit $ac_status )
6083{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6084echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6085 { (exit 1); exit 1; }; }
6086fi
6087rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6088fi
6089fi
6090rm -f conftest.val
6091else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006092 ac_cv_sizeof_char=0
6093fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006095echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6096echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6097cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006098#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006099_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006100
6101
Martin v. Löwis11437992002-04-12 09:54:03 +00006102echo "$as_me:$LINENO: checking for short" >&5
6103echo $ECHO_N "checking for short... $ECHO_C" >&6
6104if test "${ac_cv_type_short+set}" = set; then
6105 echo $ECHO_N "(cached) $ECHO_C" >&6
6106else
6107 cat >conftest.$ac_ext <<_ACEOF
6108#line $LINENO "configure"
6109#include "confdefs.h"
6110$ac_includes_default
6111#ifdef F77_DUMMY_MAIN
6112# ifdef __cplusplus
6113 extern "C"
6114# endif
6115 int F77_DUMMY_MAIN() { return 1; }
6116#endif
6117int
6118main ()
6119{
6120if ((short *) 0)
6121 return 0;
6122if (sizeof (short))
6123 return 0;
6124 ;
6125 return 0;
6126}
6127_ACEOF
6128rm -f conftest.$ac_objext
6129if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6130 (eval $ac_compile) 2>&5
6131 ac_status=$?
6132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6133 (exit $ac_status); } &&
6134 { ac_try='test -s conftest.$ac_objext'
6135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6136 (eval $ac_try) 2>&5
6137 ac_status=$?
6138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6139 (exit $ac_status); }; }; then
6140 ac_cv_type_short=yes
6141else
6142 echo "$as_me: failed program was:" >&5
6143cat conftest.$ac_ext >&5
6144ac_cv_type_short=no
6145fi
6146rm -f conftest.$ac_objext conftest.$ac_ext
6147fi
6148echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6149echo "${ECHO_T}$ac_cv_type_short" >&6
6150
6151echo "$as_me:$LINENO: checking size of short" >&5
6152echo $ECHO_N "checking size of short... $ECHO_C" >&6
6153if test "${ac_cv_sizeof_short+set}" = set; then
6154 echo $ECHO_N "(cached) $ECHO_C" >&6
6155else
6156 if test "$ac_cv_type_short" = yes; then
6157 # The cast to unsigned long works around a bug in the HP C Compiler
6158 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6159 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6160 # This bug is HP SR number 8606223364.
6161 if test "$cross_compiling" = yes; then
6162 # Depending upon the size, compute the lo and hi bounds.
6163cat >conftest.$ac_ext <<_ACEOF
6164#line $LINENO "configure"
6165#include "confdefs.h"
6166$ac_includes_default
6167#ifdef F77_DUMMY_MAIN
6168# ifdef __cplusplus
6169 extern "C"
6170# endif
6171 int F77_DUMMY_MAIN() { return 1; }
6172#endif
6173int
6174main ()
6175{
6176static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6177test_array [0] = 0
6178
6179 ;
6180 return 0;
6181}
6182_ACEOF
6183rm -f conftest.$ac_objext
6184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6185 (eval $ac_compile) 2>&5
6186 ac_status=$?
6187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6188 (exit $ac_status); } &&
6189 { ac_try='test -s conftest.$ac_objext'
6190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6191 (eval $ac_try) 2>&5
6192 ac_status=$?
6193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6194 (exit $ac_status); }; }; then
6195 ac_lo=0 ac_mid=0
6196 while :; do
6197 cat >conftest.$ac_ext <<_ACEOF
6198#line $LINENO "configure"
6199#include "confdefs.h"
6200$ac_includes_default
6201#ifdef F77_DUMMY_MAIN
6202# ifdef __cplusplus
6203 extern "C"
6204# endif
6205 int F77_DUMMY_MAIN() { return 1; }
6206#endif
6207int
6208main ()
6209{
6210static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6211test_array [0] = 0
6212
6213 ;
6214 return 0;
6215}
6216_ACEOF
6217rm -f conftest.$ac_objext
6218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6219 (eval $ac_compile) 2>&5
6220 ac_status=$?
6221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6222 (exit $ac_status); } &&
6223 { ac_try='test -s conftest.$ac_objext'
6224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6225 (eval $ac_try) 2>&5
6226 ac_status=$?
6227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6228 (exit $ac_status); }; }; then
6229 ac_hi=$ac_mid; break
6230else
6231 echo "$as_me: failed program was:" >&5
6232cat conftest.$ac_ext >&5
6233ac_lo=`expr $ac_mid + 1`
6234 if test $ac_lo -le $ac_mid; then
6235 ac_lo= ac_hi=
6236 break
6237 fi
6238 ac_mid=`expr 2 '*' $ac_mid + 1`
6239fi
6240rm -f conftest.$ac_objext conftest.$ac_ext
6241 done
6242else
6243 echo "$as_me: failed program was:" >&5
6244cat conftest.$ac_ext >&5
6245cat >conftest.$ac_ext <<_ACEOF
6246#line $LINENO "configure"
6247#include "confdefs.h"
6248$ac_includes_default
6249#ifdef F77_DUMMY_MAIN
6250# ifdef __cplusplus
6251 extern "C"
6252# endif
6253 int F77_DUMMY_MAIN() { return 1; }
6254#endif
6255int
6256main ()
6257{
6258static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6259test_array [0] = 0
6260
6261 ;
6262 return 0;
6263}
6264_ACEOF
6265rm -f conftest.$ac_objext
6266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6267 (eval $ac_compile) 2>&5
6268 ac_status=$?
6269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6270 (exit $ac_status); } &&
6271 { ac_try='test -s conftest.$ac_objext'
6272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6273 (eval $ac_try) 2>&5
6274 ac_status=$?
6275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6276 (exit $ac_status); }; }; then
6277 ac_hi=-1 ac_mid=-1
6278 while :; do
6279 cat >conftest.$ac_ext <<_ACEOF
6280#line $LINENO "configure"
6281#include "confdefs.h"
6282$ac_includes_default
6283#ifdef F77_DUMMY_MAIN
6284# ifdef __cplusplus
6285 extern "C"
6286# endif
6287 int F77_DUMMY_MAIN() { return 1; }
6288#endif
6289int
6290main ()
6291{
6292static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6293test_array [0] = 0
6294
6295 ;
6296 return 0;
6297}
6298_ACEOF
6299rm -f conftest.$ac_objext
6300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6301 (eval $ac_compile) 2>&5
6302 ac_status=$?
6303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6304 (exit $ac_status); } &&
6305 { ac_try='test -s conftest.$ac_objext'
6306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6307 (eval $ac_try) 2>&5
6308 ac_status=$?
6309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6310 (exit $ac_status); }; }; then
6311 ac_lo=$ac_mid; break
6312else
6313 echo "$as_me: failed program was:" >&5
6314cat conftest.$ac_ext >&5
6315ac_hi=`expr '(' $ac_mid ')' - 1`
6316 if test $ac_mid -le $ac_hi; then
6317 ac_lo= ac_hi=
6318 break
6319 fi
6320 ac_mid=`expr 2 '*' $ac_mid`
6321fi
6322rm -f conftest.$ac_objext conftest.$ac_ext
6323 done
6324else
6325 echo "$as_me: failed program was:" >&5
6326cat conftest.$ac_ext >&5
6327ac_lo= ac_hi=
6328fi
6329rm -f conftest.$ac_objext conftest.$ac_ext
6330fi
6331rm -f conftest.$ac_objext conftest.$ac_ext
6332# Binary search between lo and hi bounds.
6333while test "x$ac_lo" != "x$ac_hi"; do
6334 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6335 cat >conftest.$ac_ext <<_ACEOF
6336#line $LINENO "configure"
6337#include "confdefs.h"
6338$ac_includes_default
6339#ifdef F77_DUMMY_MAIN
6340# ifdef __cplusplus
6341 extern "C"
6342# endif
6343 int F77_DUMMY_MAIN() { return 1; }
6344#endif
6345int
6346main ()
6347{
6348static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6349test_array [0] = 0
6350
6351 ;
6352 return 0;
6353}
6354_ACEOF
6355rm -f conftest.$ac_objext
6356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6357 (eval $ac_compile) 2>&5
6358 ac_status=$?
6359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6360 (exit $ac_status); } &&
6361 { ac_try='test -s conftest.$ac_objext'
6362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6363 (eval $ac_try) 2>&5
6364 ac_status=$?
6365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6366 (exit $ac_status); }; }; then
6367 ac_hi=$ac_mid
6368else
6369 echo "$as_me: failed program was:" >&5
6370cat conftest.$ac_ext >&5
6371ac_lo=`expr '(' $ac_mid ')' + 1`
6372fi
6373rm -f conftest.$ac_objext conftest.$ac_ext
6374done
6375case $ac_lo in
6376?*) ac_cv_sizeof_short=$ac_lo;;
6377'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6378echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6379 { (exit 1); exit 1; }; } ;;
6380esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006381else
6382 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006383 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6384echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6385 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006386else
Martin v. Löwis11437992002-04-12 09:54:03 +00006387 cat >conftest.$ac_ext <<_ACEOF
6388#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006389#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006390$ac_includes_default
6391long longval () { return (long) (sizeof (short)); }
6392unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006393#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006394#include <stdlib.h>
6395#ifdef F77_DUMMY_MAIN
6396# ifdef __cplusplus
6397 extern "C"
6398# endif
6399 int F77_DUMMY_MAIN() { return 1; }
6400#endif
6401int
6402main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006403{
Martin v. Löwis11437992002-04-12 09:54:03 +00006404
6405 FILE *f = fopen ("conftest.val", "w");
6406 if (! f)
6407 exit (1);
6408 if (((long) (sizeof (short))) < 0)
6409 {
6410 long i = longval ();
6411 if (i != ((long) (sizeof (short))))
6412 exit (1);
6413 fprintf (f, "%ld\n", i);
6414 }
6415 else
6416 {
6417 unsigned long i = ulongval ();
6418 if (i != ((long) (sizeof (short))))
6419 exit (1);
6420 fprintf (f, "%lu\n", i);
6421 }
6422 exit (ferror (f) || fclose (f) != 0);
6423
6424 ;
6425 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006426}
Martin v. Löwis11437992002-04-12 09:54:03 +00006427_ACEOF
6428rm -f conftest$ac_exeext
6429if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6430 (eval $ac_link) 2>&5
6431 ac_status=$?
6432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6433 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6435 (eval $ac_try) 2>&5
6436 ac_status=$?
6437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6438 (exit $ac_status); }; }; then
6439 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006440else
Martin v. Löwis11437992002-04-12 09:54:03 +00006441 echo "$as_me: program exited with status $ac_status" >&5
6442echo "$as_me: failed program was:" >&5
6443cat conftest.$ac_ext >&5
6444( exit $ac_status )
6445{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6446echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6447 { (exit 1); exit 1; }; }
6448fi
6449rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6450fi
6451fi
6452rm -f conftest.val
6453else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006454 ac_cv_sizeof_short=0
6455fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006456fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006457echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6458echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6459cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006460#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006461_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006462
6463
Martin v. Löwis11437992002-04-12 09:54:03 +00006464echo "$as_me:$LINENO: checking for float" >&5
6465echo $ECHO_N "checking for float... $ECHO_C" >&6
6466if test "${ac_cv_type_float+set}" = set; then
6467 echo $ECHO_N "(cached) $ECHO_C" >&6
6468else
6469 cat >conftest.$ac_ext <<_ACEOF
6470#line $LINENO "configure"
6471#include "confdefs.h"
6472$ac_includes_default
6473#ifdef F77_DUMMY_MAIN
6474# ifdef __cplusplus
6475 extern "C"
6476# endif
6477 int F77_DUMMY_MAIN() { return 1; }
6478#endif
6479int
6480main ()
6481{
6482if ((float *) 0)
6483 return 0;
6484if (sizeof (float))
6485 return 0;
6486 ;
6487 return 0;
6488}
6489_ACEOF
6490rm -f conftest.$ac_objext
6491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6492 (eval $ac_compile) 2>&5
6493 ac_status=$?
6494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6495 (exit $ac_status); } &&
6496 { ac_try='test -s conftest.$ac_objext'
6497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6498 (eval $ac_try) 2>&5
6499 ac_status=$?
6500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6501 (exit $ac_status); }; }; then
6502 ac_cv_type_float=yes
6503else
6504 echo "$as_me: failed program was:" >&5
6505cat conftest.$ac_ext >&5
6506ac_cv_type_float=no
6507fi
6508rm -f conftest.$ac_objext conftest.$ac_ext
6509fi
6510echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6511echo "${ECHO_T}$ac_cv_type_float" >&6
6512
6513echo "$as_me:$LINENO: checking size of float" >&5
6514echo $ECHO_N "checking size of float... $ECHO_C" >&6
6515if test "${ac_cv_sizeof_float+set}" = set; then
6516 echo $ECHO_N "(cached) $ECHO_C" >&6
6517else
6518 if test "$ac_cv_type_float" = yes; then
6519 # The cast to unsigned long works around a bug in the HP C Compiler
6520 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6521 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6522 # This bug is HP SR number 8606223364.
6523 if test "$cross_compiling" = yes; then
6524 # Depending upon the size, compute the lo and hi bounds.
6525cat >conftest.$ac_ext <<_ACEOF
6526#line $LINENO "configure"
6527#include "confdefs.h"
6528$ac_includes_default
6529#ifdef F77_DUMMY_MAIN
6530# ifdef __cplusplus
6531 extern "C"
6532# endif
6533 int F77_DUMMY_MAIN() { return 1; }
6534#endif
6535int
6536main ()
6537{
6538static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6539test_array [0] = 0
6540
6541 ;
6542 return 0;
6543}
6544_ACEOF
6545rm -f conftest.$ac_objext
6546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6547 (eval $ac_compile) 2>&5
6548 ac_status=$?
6549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6550 (exit $ac_status); } &&
6551 { ac_try='test -s conftest.$ac_objext'
6552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6553 (eval $ac_try) 2>&5
6554 ac_status=$?
6555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6556 (exit $ac_status); }; }; then
6557 ac_lo=0 ac_mid=0
6558 while :; do
6559 cat >conftest.$ac_ext <<_ACEOF
6560#line $LINENO "configure"
6561#include "confdefs.h"
6562$ac_includes_default
6563#ifdef F77_DUMMY_MAIN
6564# ifdef __cplusplus
6565 extern "C"
6566# endif
6567 int F77_DUMMY_MAIN() { return 1; }
6568#endif
6569int
6570main ()
6571{
6572static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6573test_array [0] = 0
6574
6575 ;
6576 return 0;
6577}
6578_ACEOF
6579rm -f conftest.$ac_objext
6580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6581 (eval $ac_compile) 2>&5
6582 ac_status=$?
6583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6584 (exit $ac_status); } &&
6585 { ac_try='test -s conftest.$ac_objext'
6586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6587 (eval $ac_try) 2>&5
6588 ac_status=$?
6589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6590 (exit $ac_status); }; }; then
6591 ac_hi=$ac_mid; break
6592else
6593 echo "$as_me: failed program was:" >&5
6594cat conftest.$ac_ext >&5
6595ac_lo=`expr $ac_mid + 1`
6596 if test $ac_lo -le $ac_mid; then
6597 ac_lo= ac_hi=
6598 break
6599 fi
6600 ac_mid=`expr 2 '*' $ac_mid + 1`
6601fi
6602rm -f conftest.$ac_objext conftest.$ac_ext
6603 done
6604else
6605 echo "$as_me: failed program was:" >&5
6606cat conftest.$ac_ext >&5
6607cat >conftest.$ac_ext <<_ACEOF
6608#line $LINENO "configure"
6609#include "confdefs.h"
6610$ac_includes_default
6611#ifdef F77_DUMMY_MAIN
6612# ifdef __cplusplus
6613 extern "C"
6614# endif
6615 int F77_DUMMY_MAIN() { return 1; }
6616#endif
6617int
6618main ()
6619{
6620static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6621test_array [0] = 0
6622
6623 ;
6624 return 0;
6625}
6626_ACEOF
6627rm -f conftest.$ac_objext
6628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6629 (eval $ac_compile) 2>&5
6630 ac_status=$?
6631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6632 (exit $ac_status); } &&
6633 { ac_try='test -s conftest.$ac_objext'
6634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6635 (eval $ac_try) 2>&5
6636 ac_status=$?
6637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6638 (exit $ac_status); }; }; then
6639 ac_hi=-1 ac_mid=-1
6640 while :; do
6641 cat >conftest.$ac_ext <<_ACEOF
6642#line $LINENO "configure"
6643#include "confdefs.h"
6644$ac_includes_default
6645#ifdef F77_DUMMY_MAIN
6646# ifdef __cplusplus
6647 extern "C"
6648# endif
6649 int F77_DUMMY_MAIN() { return 1; }
6650#endif
6651int
6652main ()
6653{
6654static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6655test_array [0] = 0
6656
6657 ;
6658 return 0;
6659}
6660_ACEOF
6661rm -f conftest.$ac_objext
6662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6663 (eval $ac_compile) 2>&5
6664 ac_status=$?
6665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6666 (exit $ac_status); } &&
6667 { ac_try='test -s conftest.$ac_objext'
6668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6669 (eval $ac_try) 2>&5
6670 ac_status=$?
6671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6672 (exit $ac_status); }; }; then
6673 ac_lo=$ac_mid; break
6674else
6675 echo "$as_me: failed program was:" >&5
6676cat conftest.$ac_ext >&5
6677ac_hi=`expr '(' $ac_mid ')' - 1`
6678 if test $ac_mid -le $ac_hi; then
6679 ac_lo= ac_hi=
6680 break
6681 fi
6682 ac_mid=`expr 2 '*' $ac_mid`
6683fi
6684rm -f conftest.$ac_objext conftest.$ac_ext
6685 done
6686else
6687 echo "$as_me: failed program was:" >&5
6688cat conftest.$ac_ext >&5
6689ac_lo= ac_hi=
6690fi
6691rm -f conftest.$ac_objext conftest.$ac_ext
6692fi
6693rm -f conftest.$ac_objext conftest.$ac_ext
6694# Binary search between lo and hi bounds.
6695while test "x$ac_lo" != "x$ac_hi"; do
6696 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6697 cat >conftest.$ac_ext <<_ACEOF
6698#line $LINENO "configure"
6699#include "confdefs.h"
6700$ac_includes_default
6701#ifdef F77_DUMMY_MAIN
6702# ifdef __cplusplus
6703 extern "C"
6704# endif
6705 int F77_DUMMY_MAIN() { return 1; }
6706#endif
6707int
6708main ()
6709{
6710static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6711test_array [0] = 0
6712
6713 ;
6714 return 0;
6715}
6716_ACEOF
6717rm -f conftest.$ac_objext
6718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6719 (eval $ac_compile) 2>&5
6720 ac_status=$?
6721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6722 (exit $ac_status); } &&
6723 { ac_try='test -s conftest.$ac_objext'
6724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6725 (eval $ac_try) 2>&5
6726 ac_status=$?
6727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6728 (exit $ac_status); }; }; then
6729 ac_hi=$ac_mid
6730else
6731 echo "$as_me: failed program was:" >&5
6732cat conftest.$ac_ext >&5
6733ac_lo=`expr '(' $ac_mid ')' + 1`
6734fi
6735rm -f conftest.$ac_objext conftest.$ac_ext
6736done
6737case $ac_lo in
6738?*) ac_cv_sizeof_float=$ac_lo;;
6739'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6740echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6741 { (exit 1); exit 1; }; } ;;
6742esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006743else
6744 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006745 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6746echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6747 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006748else
Martin v. Löwis11437992002-04-12 09:54:03 +00006749 cat >conftest.$ac_ext <<_ACEOF
6750#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006751#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006752$ac_includes_default
6753long longval () { return (long) (sizeof (float)); }
6754unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006755#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006756#include <stdlib.h>
6757#ifdef F77_DUMMY_MAIN
6758# ifdef __cplusplus
6759 extern "C"
6760# endif
6761 int F77_DUMMY_MAIN() { return 1; }
6762#endif
6763int
6764main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006765{
Martin v. Löwis11437992002-04-12 09:54:03 +00006766
6767 FILE *f = fopen ("conftest.val", "w");
6768 if (! f)
6769 exit (1);
6770 if (((long) (sizeof (float))) < 0)
6771 {
6772 long i = longval ();
6773 if (i != ((long) (sizeof (float))))
6774 exit (1);
6775 fprintf (f, "%ld\n", i);
6776 }
6777 else
6778 {
6779 unsigned long i = ulongval ();
6780 if (i != ((long) (sizeof (float))))
6781 exit (1);
6782 fprintf (f, "%lu\n", i);
6783 }
6784 exit (ferror (f) || fclose (f) != 0);
6785
6786 ;
6787 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006788}
Martin v. Löwis11437992002-04-12 09:54:03 +00006789_ACEOF
6790rm -f conftest$ac_exeext
6791if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6792 (eval $ac_link) 2>&5
6793 ac_status=$?
6794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6795 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6797 (eval $ac_try) 2>&5
6798 ac_status=$?
6799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6800 (exit $ac_status); }; }; then
6801 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006802else
Martin v. Löwis11437992002-04-12 09:54:03 +00006803 echo "$as_me: program exited with status $ac_status" >&5
6804echo "$as_me: failed program was:" >&5
6805cat conftest.$ac_ext >&5
6806( exit $ac_status )
6807{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6808echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6809 { (exit 1); exit 1; }; }
6810fi
6811rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6812fi
6813fi
6814rm -f conftest.val
6815else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006816 ac_cv_sizeof_float=0
6817fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006818fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006819echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6820echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6821cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006822#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006823_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006824
6825
Martin v. Löwis11437992002-04-12 09:54:03 +00006826echo "$as_me:$LINENO: checking for double" >&5
6827echo $ECHO_N "checking for double... $ECHO_C" >&6
6828if test "${ac_cv_type_double+set}" = set; then
6829 echo $ECHO_N "(cached) $ECHO_C" >&6
6830else
6831 cat >conftest.$ac_ext <<_ACEOF
6832#line $LINENO "configure"
6833#include "confdefs.h"
6834$ac_includes_default
6835#ifdef F77_DUMMY_MAIN
6836# ifdef __cplusplus
6837 extern "C"
6838# endif
6839 int F77_DUMMY_MAIN() { return 1; }
6840#endif
6841int
6842main ()
6843{
6844if ((double *) 0)
6845 return 0;
6846if (sizeof (double))
6847 return 0;
6848 ;
6849 return 0;
6850}
6851_ACEOF
6852rm -f conftest.$ac_objext
6853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6854 (eval $ac_compile) 2>&5
6855 ac_status=$?
6856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6857 (exit $ac_status); } &&
6858 { ac_try='test -s conftest.$ac_objext'
6859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6860 (eval $ac_try) 2>&5
6861 ac_status=$?
6862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6863 (exit $ac_status); }; }; then
6864 ac_cv_type_double=yes
6865else
6866 echo "$as_me: failed program was:" >&5
6867cat conftest.$ac_ext >&5
6868ac_cv_type_double=no
6869fi
6870rm -f conftest.$ac_objext conftest.$ac_ext
6871fi
6872echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6873echo "${ECHO_T}$ac_cv_type_double" >&6
6874
6875echo "$as_me:$LINENO: checking size of double" >&5
6876echo $ECHO_N "checking size of double... $ECHO_C" >&6
6877if test "${ac_cv_sizeof_double+set}" = set; then
6878 echo $ECHO_N "(cached) $ECHO_C" >&6
6879else
6880 if test "$ac_cv_type_double" = yes; then
6881 # The cast to unsigned long works around a bug in the HP C Compiler
6882 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6883 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6884 # This bug is HP SR number 8606223364.
6885 if test "$cross_compiling" = yes; then
6886 # Depending upon the size, compute the lo and hi bounds.
6887cat >conftest.$ac_ext <<_ACEOF
6888#line $LINENO "configure"
6889#include "confdefs.h"
6890$ac_includes_default
6891#ifdef F77_DUMMY_MAIN
6892# ifdef __cplusplus
6893 extern "C"
6894# endif
6895 int F77_DUMMY_MAIN() { return 1; }
6896#endif
6897int
6898main ()
6899{
6900static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6901test_array [0] = 0
6902
6903 ;
6904 return 0;
6905}
6906_ACEOF
6907rm -f conftest.$ac_objext
6908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6909 (eval $ac_compile) 2>&5
6910 ac_status=$?
6911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6912 (exit $ac_status); } &&
6913 { ac_try='test -s conftest.$ac_objext'
6914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6915 (eval $ac_try) 2>&5
6916 ac_status=$?
6917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6918 (exit $ac_status); }; }; then
6919 ac_lo=0 ac_mid=0
6920 while :; do
6921 cat >conftest.$ac_ext <<_ACEOF
6922#line $LINENO "configure"
6923#include "confdefs.h"
6924$ac_includes_default
6925#ifdef F77_DUMMY_MAIN
6926# ifdef __cplusplus
6927 extern "C"
6928# endif
6929 int F77_DUMMY_MAIN() { return 1; }
6930#endif
6931int
6932main ()
6933{
6934static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6935test_array [0] = 0
6936
6937 ;
6938 return 0;
6939}
6940_ACEOF
6941rm -f conftest.$ac_objext
6942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6943 (eval $ac_compile) 2>&5
6944 ac_status=$?
6945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6946 (exit $ac_status); } &&
6947 { ac_try='test -s conftest.$ac_objext'
6948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6949 (eval $ac_try) 2>&5
6950 ac_status=$?
6951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6952 (exit $ac_status); }; }; then
6953 ac_hi=$ac_mid; break
6954else
6955 echo "$as_me: failed program was:" >&5
6956cat conftest.$ac_ext >&5
6957ac_lo=`expr $ac_mid + 1`
6958 if test $ac_lo -le $ac_mid; then
6959 ac_lo= ac_hi=
6960 break
6961 fi
6962 ac_mid=`expr 2 '*' $ac_mid + 1`
6963fi
6964rm -f conftest.$ac_objext conftest.$ac_ext
6965 done
6966else
6967 echo "$as_me: failed program was:" >&5
6968cat conftest.$ac_ext >&5
6969cat >conftest.$ac_ext <<_ACEOF
6970#line $LINENO "configure"
6971#include "confdefs.h"
6972$ac_includes_default
6973#ifdef F77_DUMMY_MAIN
6974# ifdef __cplusplus
6975 extern "C"
6976# endif
6977 int F77_DUMMY_MAIN() { return 1; }
6978#endif
6979int
6980main ()
6981{
6982static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6983test_array [0] = 0
6984
6985 ;
6986 return 0;
6987}
6988_ACEOF
6989rm -f conftest.$ac_objext
6990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6991 (eval $ac_compile) 2>&5
6992 ac_status=$?
6993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6994 (exit $ac_status); } &&
6995 { ac_try='test -s conftest.$ac_objext'
6996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6997 (eval $ac_try) 2>&5
6998 ac_status=$?
6999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7000 (exit $ac_status); }; }; then
7001 ac_hi=-1 ac_mid=-1
7002 while :; do
7003 cat >conftest.$ac_ext <<_ACEOF
7004#line $LINENO "configure"
7005#include "confdefs.h"
7006$ac_includes_default
7007#ifdef F77_DUMMY_MAIN
7008# ifdef __cplusplus
7009 extern "C"
7010# endif
7011 int F77_DUMMY_MAIN() { return 1; }
7012#endif
7013int
7014main ()
7015{
7016static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7017test_array [0] = 0
7018
7019 ;
7020 return 0;
7021}
7022_ACEOF
7023rm -f conftest.$ac_objext
7024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7025 (eval $ac_compile) 2>&5
7026 ac_status=$?
7027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7028 (exit $ac_status); } &&
7029 { ac_try='test -s conftest.$ac_objext'
7030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7031 (eval $ac_try) 2>&5
7032 ac_status=$?
7033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7034 (exit $ac_status); }; }; then
7035 ac_lo=$ac_mid; break
7036else
7037 echo "$as_me: failed program was:" >&5
7038cat conftest.$ac_ext >&5
7039ac_hi=`expr '(' $ac_mid ')' - 1`
7040 if test $ac_mid -le $ac_hi; then
7041 ac_lo= ac_hi=
7042 break
7043 fi
7044 ac_mid=`expr 2 '*' $ac_mid`
7045fi
7046rm -f conftest.$ac_objext conftest.$ac_ext
7047 done
7048else
7049 echo "$as_me: failed program was:" >&5
7050cat conftest.$ac_ext >&5
7051ac_lo= ac_hi=
7052fi
7053rm -f conftest.$ac_objext conftest.$ac_ext
7054fi
7055rm -f conftest.$ac_objext conftest.$ac_ext
7056# Binary search between lo and hi bounds.
7057while test "x$ac_lo" != "x$ac_hi"; do
7058 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7059 cat >conftest.$ac_ext <<_ACEOF
7060#line $LINENO "configure"
7061#include "confdefs.h"
7062$ac_includes_default
7063#ifdef F77_DUMMY_MAIN
7064# ifdef __cplusplus
7065 extern "C"
7066# endif
7067 int F77_DUMMY_MAIN() { return 1; }
7068#endif
7069int
7070main ()
7071{
7072static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7073test_array [0] = 0
7074
7075 ;
7076 return 0;
7077}
7078_ACEOF
7079rm -f conftest.$ac_objext
7080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7081 (eval $ac_compile) 2>&5
7082 ac_status=$?
7083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7084 (exit $ac_status); } &&
7085 { ac_try='test -s conftest.$ac_objext'
7086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7087 (eval $ac_try) 2>&5
7088 ac_status=$?
7089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7090 (exit $ac_status); }; }; then
7091 ac_hi=$ac_mid
7092else
7093 echo "$as_me: failed program was:" >&5
7094cat conftest.$ac_ext >&5
7095ac_lo=`expr '(' $ac_mid ')' + 1`
7096fi
7097rm -f conftest.$ac_objext conftest.$ac_ext
7098done
7099case $ac_lo in
7100?*) ac_cv_sizeof_double=$ac_lo;;
7101'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7102echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7103 { (exit 1); exit 1; }; } ;;
7104esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007105else
7106 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007107 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7108echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7109 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007110else
Martin v. Löwis11437992002-04-12 09:54:03 +00007111 cat >conftest.$ac_ext <<_ACEOF
7112#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007113#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007114$ac_includes_default
7115long longval () { return (long) (sizeof (double)); }
7116unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007117#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007118#include <stdlib.h>
7119#ifdef F77_DUMMY_MAIN
7120# ifdef __cplusplus
7121 extern "C"
7122# endif
7123 int F77_DUMMY_MAIN() { return 1; }
7124#endif
7125int
7126main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007127{
Martin v. Löwis11437992002-04-12 09:54:03 +00007128
7129 FILE *f = fopen ("conftest.val", "w");
7130 if (! f)
7131 exit (1);
7132 if (((long) (sizeof (double))) < 0)
7133 {
7134 long i = longval ();
7135 if (i != ((long) (sizeof (double))))
7136 exit (1);
7137 fprintf (f, "%ld\n", i);
7138 }
7139 else
7140 {
7141 unsigned long i = ulongval ();
7142 if (i != ((long) (sizeof (double))))
7143 exit (1);
7144 fprintf (f, "%lu\n", i);
7145 }
7146 exit (ferror (f) || fclose (f) != 0);
7147
7148 ;
7149 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007150}
Martin v. Löwis11437992002-04-12 09:54:03 +00007151_ACEOF
7152rm -f conftest$ac_exeext
7153if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7154 (eval $ac_link) 2>&5
7155 ac_status=$?
7156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7157 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7159 (eval $ac_try) 2>&5
7160 ac_status=$?
7161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7162 (exit $ac_status); }; }; then
7163 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007164else
Martin v. Löwis11437992002-04-12 09:54:03 +00007165 echo "$as_me: program exited with status $ac_status" >&5
7166echo "$as_me: failed program was:" >&5
7167cat conftest.$ac_ext >&5
7168( exit $ac_status )
7169{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7170echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7171 { (exit 1); exit 1; }; }
7172fi
7173rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7174fi
7175fi
7176rm -f conftest.val
7177else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007178 ac_cv_sizeof_double=0
7179fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007180fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007181echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7182echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7183cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007184#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007185_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007186
7187
Martin v. Löwis11437992002-04-12 09:54:03 +00007188echo "$as_me:$LINENO: checking for fpos_t" >&5
7189echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7190if test "${ac_cv_type_fpos_t+set}" = set; then
7191 echo $ECHO_N "(cached) $ECHO_C" >&6
7192else
7193 cat >conftest.$ac_ext <<_ACEOF
7194#line $LINENO "configure"
7195#include "confdefs.h"
7196$ac_includes_default
7197#ifdef F77_DUMMY_MAIN
7198# ifdef __cplusplus
7199 extern "C"
7200# endif
7201 int F77_DUMMY_MAIN() { return 1; }
7202#endif
7203int
7204main ()
7205{
7206if ((fpos_t *) 0)
7207 return 0;
7208if (sizeof (fpos_t))
7209 return 0;
7210 ;
7211 return 0;
7212}
7213_ACEOF
7214rm -f conftest.$ac_objext
7215if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7216 (eval $ac_compile) 2>&5
7217 ac_status=$?
7218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7219 (exit $ac_status); } &&
7220 { ac_try='test -s conftest.$ac_objext'
7221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7222 (eval $ac_try) 2>&5
7223 ac_status=$?
7224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7225 (exit $ac_status); }; }; then
7226 ac_cv_type_fpos_t=yes
7227else
7228 echo "$as_me: failed program was:" >&5
7229cat conftest.$ac_ext >&5
7230ac_cv_type_fpos_t=no
7231fi
7232rm -f conftest.$ac_objext conftest.$ac_ext
7233fi
7234echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7235echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7236
7237echo "$as_me:$LINENO: checking size of fpos_t" >&5
7238echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7239if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7240 echo $ECHO_N "(cached) $ECHO_C" >&6
7241else
7242 if test "$ac_cv_type_fpos_t" = yes; then
7243 # The cast to unsigned long works around a bug in the HP C Compiler
7244 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7245 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7246 # This bug is HP SR number 8606223364.
7247 if test "$cross_compiling" = yes; then
7248 # Depending upon the size, compute the lo and hi bounds.
7249cat >conftest.$ac_ext <<_ACEOF
7250#line $LINENO "configure"
7251#include "confdefs.h"
7252$ac_includes_default
7253#ifdef F77_DUMMY_MAIN
7254# ifdef __cplusplus
7255 extern "C"
7256# endif
7257 int F77_DUMMY_MAIN() { return 1; }
7258#endif
7259int
7260main ()
7261{
7262static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7263test_array [0] = 0
7264
7265 ;
7266 return 0;
7267}
7268_ACEOF
7269rm -f conftest.$ac_objext
7270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7271 (eval $ac_compile) 2>&5
7272 ac_status=$?
7273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7274 (exit $ac_status); } &&
7275 { ac_try='test -s conftest.$ac_objext'
7276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7277 (eval $ac_try) 2>&5
7278 ac_status=$?
7279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7280 (exit $ac_status); }; }; then
7281 ac_lo=0 ac_mid=0
7282 while :; do
7283 cat >conftest.$ac_ext <<_ACEOF
7284#line $LINENO "configure"
7285#include "confdefs.h"
7286$ac_includes_default
7287#ifdef F77_DUMMY_MAIN
7288# ifdef __cplusplus
7289 extern "C"
7290# endif
7291 int F77_DUMMY_MAIN() { return 1; }
7292#endif
7293int
7294main ()
7295{
7296static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7297test_array [0] = 0
7298
7299 ;
7300 return 0;
7301}
7302_ACEOF
7303rm -f conftest.$ac_objext
7304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7305 (eval $ac_compile) 2>&5
7306 ac_status=$?
7307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7308 (exit $ac_status); } &&
7309 { ac_try='test -s conftest.$ac_objext'
7310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7311 (eval $ac_try) 2>&5
7312 ac_status=$?
7313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7314 (exit $ac_status); }; }; then
7315 ac_hi=$ac_mid; break
7316else
7317 echo "$as_me: failed program was:" >&5
7318cat conftest.$ac_ext >&5
7319ac_lo=`expr $ac_mid + 1`
7320 if test $ac_lo -le $ac_mid; then
7321 ac_lo= ac_hi=
7322 break
7323 fi
7324 ac_mid=`expr 2 '*' $ac_mid + 1`
7325fi
7326rm -f conftest.$ac_objext conftest.$ac_ext
7327 done
7328else
7329 echo "$as_me: failed program was:" >&5
7330cat conftest.$ac_ext >&5
7331cat >conftest.$ac_ext <<_ACEOF
7332#line $LINENO "configure"
7333#include "confdefs.h"
7334$ac_includes_default
7335#ifdef F77_DUMMY_MAIN
7336# ifdef __cplusplus
7337 extern "C"
7338# endif
7339 int F77_DUMMY_MAIN() { return 1; }
7340#endif
7341int
7342main ()
7343{
7344static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7345test_array [0] = 0
7346
7347 ;
7348 return 0;
7349}
7350_ACEOF
7351rm -f conftest.$ac_objext
7352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7353 (eval $ac_compile) 2>&5
7354 ac_status=$?
7355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7356 (exit $ac_status); } &&
7357 { ac_try='test -s conftest.$ac_objext'
7358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7359 (eval $ac_try) 2>&5
7360 ac_status=$?
7361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7362 (exit $ac_status); }; }; then
7363 ac_hi=-1 ac_mid=-1
7364 while :; do
7365 cat >conftest.$ac_ext <<_ACEOF
7366#line $LINENO "configure"
7367#include "confdefs.h"
7368$ac_includes_default
7369#ifdef F77_DUMMY_MAIN
7370# ifdef __cplusplus
7371 extern "C"
7372# endif
7373 int F77_DUMMY_MAIN() { return 1; }
7374#endif
7375int
7376main ()
7377{
7378static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7379test_array [0] = 0
7380
7381 ;
7382 return 0;
7383}
7384_ACEOF
7385rm -f conftest.$ac_objext
7386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7387 (eval $ac_compile) 2>&5
7388 ac_status=$?
7389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7390 (exit $ac_status); } &&
7391 { ac_try='test -s conftest.$ac_objext'
7392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7393 (eval $ac_try) 2>&5
7394 ac_status=$?
7395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7396 (exit $ac_status); }; }; then
7397 ac_lo=$ac_mid; break
7398else
7399 echo "$as_me: failed program was:" >&5
7400cat conftest.$ac_ext >&5
7401ac_hi=`expr '(' $ac_mid ')' - 1`
7402 if test $ac_mid -le $ac_hi; then
7403 ac_lo= ac_hi=
7404 break
7405 fi
7406 ac_mid=`expr 2 '*' $ac_mid`
7407fi
7408rm -f conftest.$ac_objext conftest.$ac_ext
7409 done
7410else
7411 echo "$as_me: failed program was:" >&5
7412cat conftest.$ac_ext >&5
7413ac_lo= ac_hi=
7414fi
7415rm -f conftest.$ac_objext conftest.$ac_ext
7416fi
7417rm -f conftest.$ac_objext conftest.$ac_ext
7418# Binary search between lo and hi bounds.
7419while test "x$ac_lo" != "x$ac_hi"; do
7420 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7421 cat >conftest.$ac_ext <<_ACEOF
7422#line $LINENO "configure"
7423#include "confdefs.h"
7424$ac_includes_default
7425#ifdef F77_DUMMY_MAIN
7426# ifdef __cplusplus
7427 extern "C"
7428# endif
7429 int F77_DUMMY_MAIN() { return 1; }
7430#endif
7431int
7432main ()
7433{
7434static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7435test_array [0] = 0
7436
7437 ;
7438 return 0;
7439}
7440_ACEOF
7441rm -f conftest.$ac_objext
7442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7443 (eval $ac_compile) 2>&5
7444 ac_status=$?
7445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7446 (exit $ac_status); } &&
7447 { ac_try='test -s conftest.$ac_objext'
7448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7449 (eval $ac_try) 2>&5
7450 ac_status=$?
7451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7452 (exit $ac_status); }; }; then
7453 ac_hi=$ac_mid
7454else
7455 echo "$as_me: failed program was:" >&5
7456cat conftest.$ac_ext >&5
7457ac_lo=`expr '(' $ac_mid ')' + 1`
7458fi
7459rm -f conftest.$ac_objext conftest.$ac_ext
7460done
7461case $ac_lo in
7462?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7463'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7464echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7465 { (exit 1); exit 1; }; } ;;
7466esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007467else
7468 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007469 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7470echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7471 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007472else
Martin v. Löwis11437992002-04-12 09:54:03 +00007473 cat >conftest.$ac_ext <<_ACEOF
7474#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007475#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007476$ac_includes_default
7477long longval () { return (long) (sizeof (fpos_t)); }
7478unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007479#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007480#include <stdlib.h>
7481#ifdef F77_DUMMY_MAIN
7482# ifdef __cplusplus
7483 extern "C"
7484# endif
7485 int F77_DUMMY_MAIN() { return 1; }
7486#endif
7487int
7488main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007489{
Martin v. Löwis11437992002-04-12 09:54:03 +00007490
7491 FILE *f = fopen ("conftest.val", "w");
7492 if (! f)
7493 exit (1);
7494 if (((long) (sizeof (fpos_t))) < 0)
7495 {
7496 long i = longval ();
7497 if (i != ((long) (sizeof (fpos_t))))
7498 exit (1);
7499 fprintf (f, "%ld\n", i);
7500 }
7501 else
7502 {
7503 unsigned long i = ulongval ();
7504 if (i != ((long) (sizeof (fpos_t))))
7505 exit (1);
7506 fprintf (f, "%lu\n", i);
7507 }
7508 exit (ferror (f) || fclose (f) != 0);
7509
7510 ;
7511 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007512}
Martin v. Löwis11437992002-04-12 09:54:03 +00007513_ACEOF
7514rm -f conftest$ac_exeext
7515if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7516 (eval $ac_link) 2>&5
7517 ac_status=$?
7518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7519 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7521 (eval $ac_try) 2>&5
7522 ac_status=$?
7523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7524 (exit $ac_status); }; }; then
7525 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007526else
Martin v. Löwis11437992002-04-12 09:54:03 +00007527 echo "$as_me: program exited with status $ac_status" >&5
7528echo "$as_me: failed program was:" >&5
7529cat conftest.$ac_ext >&5
7530( exit $ac_status )
7531{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7532echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7533 { (exit 1); exit 1; }; }
7534fi
7535rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7536fi
7537fi
7538rm -f conftest.val
7539else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007540 ac_cv_sizeof_fpos_t=0
7541fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007542fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007543echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7544echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7545cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007546#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007547_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007548
Michael W. Hudson54241132001-12-07 15:38:26 +00007549
7550
Martin v. Löwis11437992002-04-12 09:54:03 +00007551echo "$as_me:$LINENO: checking for long long support" >&5
7552echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007553have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007554cat >conftest.$ac_ext <<_ACEOF
7555#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007556#include "confdefs.h"
7557
Martin v. Löwis11437992002-04-12 09:54:03 +00007558#ifdef F77_DUMMY_MAIN
7559# ifdef __cplusplus
7560 extern "C"
7561# endif
7562 int F77_DUMMY_MAIN() { return 1; }
7563#endif
7564int
7565main ()
7566{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007567long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007568 ;
7569 return 0;
7570}
7571_ACEOF
7572rm -f conftest.$ac_objext
7573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7574 (eval $ac_compile) 2>&5
7575 ac_status=$?
7576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7577 (exit $ac_status); } &&
7578 { ac_try='test -s conftest.$ac_objext'
7579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7580 (eval $ac_try) 2>&5
7581 ac_status=$?
7582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7583 (exit $ac_status); }; }; then
7584
7585
7586cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007587#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007588_ACEOF
7589
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007590 have_long_long=yes
7591
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007592else
Martin v. Löwis11437992002-04-12 09:54:03 +00007593 echo "$as_me: failed program was:" >&5
7594cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007595fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007596rm -f conftest.$ac_objext conftest.$ac_ext
7597echo "$as_me:$LINENO: result: $have_long_long" >&5
7598echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007599if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007600echo "$as_me:$LINENO: checking for long long" >&5
7601echo $ECHO_N "checking for long long... $ECHO_C" >&6
7602if test "${ac_cv_type_long_long+set}" = set; then
7603 echo $ECHO_N "(cached) $ECHO_C" >&6
7604else
7605 cat >conftest.$ac_ext <<_ACEOF
7606#line $LINENO "configure"
7607#include "confdefs.h"
7608$ac_includes_default
7609#ifdef F77_DUMMY_MAIN
7610# ifdef __cplusplus
7611 extern "C"
7612# endif
7613 int F77_DUMMY_MAIN() { return 1; }
7614#endif
7615int
7616main ()
7617{
7618if ((long long *) 0)
7619 return 0;
7620if (sizeof (long long))
7621 return 0;
7622 ;
7623 return 0;
7624}
7625_ACEOF
7626rm -f conftest.$ac_objext
7627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7628 (eval $ac_compile) 2>&5
7629 ac_status=$?
7630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7631 (exit $ac_status); } &&
7632 { ac_try='test -s conftest.$ac_objext'
7633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7634 (eval $ac_try) 2>&5
7635 ac_status=$?
7636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7637 (exit $ac_status); }; }; then
7638 ac_cv_type_long_long=yes
7639else
7640 echo "$as_me: failed program was:" >&5
7641cat conftest.$ac_ext >&5
7642ac_cv_type_long_long=no
7643fi
7644rm -f conftest.$ac_objext conftest.$ac_ext
7645fi
7646echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7647echo "${ECHO_T}$ac_cv_type_long_long" >&6
7648
7649echo "$as_me:$LINENO: checking size of long long" >&5
7650echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7651if test "${ac_cv_sizeof_long_long+set}" = set; then
7652 echo $ECHO_N "(cached) $ECHO_C" >&6
7653else
7654 if test "$ac_cv_type_long_long" = yes; then
7655 # The cast to unsigned long works around a bug in the HP C Compiler
7656 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7657 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7658 # This bug is HP SR number 8606223364.
7659 if test "$cross_compiling" = yes; then
7660 # Depending upon the size, compute the lo and hi bounds.
7661cat >conftest.$ac_ext <<_ACEOF
7662#line $LINENO "configure"
7663#include "confdefs.h"
7664$ac_includes_default
7665#ifdef F77_DUMMY_MAIN
7666# ifdef __cplusplus
7667 extern "C"
7668# endif
7669 int F77_DUMMY_MAIN() { return 1; }
7670#endif
7671int
7672main ()
7673{
7674static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7675test_array [0] = 0
7676
7677 ;
7678 return 0;
7679}
7680_ACEOF
7681rm -f conftest.$ac_objext
7682if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7683 (eval $ac_compile) 2>&5
7684 ac_status=$?
7685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7686 (exit $ac_status); } &&
7687 { ac_try='test -s conftest.$ac_objext'
7688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7689 (eval $ac_try) 2>&5
7690 ac_status=$?
7691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7692 (exit $ac_status); }; }; then
7693 ac_lo=0 ac_mid=0
7694 while :; do
7695 cat >conftest.$ac_ext <<_ACEOF
7696#line $LINENO "configure"
7697#include "confdefs.h"
7698$ac_includes_default
7699#ifdef F77_DUMMY_MAIN
7700# ifdef __cplusplus
7701 extern "C"
7702# endif
7703 int F77_DUMMY_MAIN() { return 1; }
7704#endif
7705int
7706main ()
7707{
7708static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7709test_array [0] = 0
7710
7711 ;
7712 return 0;
7713}
7714_ACEOF
7715rm -f conftest.$ac_objext
7716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7717 (eval $ac_compile) 2>&5
7718 ac_status=$?
7719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7720 (exit $ac_status); } &&
7721 { ac_try='test -s conftest.$ac_objext'
7722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7723 (eval $ac_try) 2>&5
7724 ac_status=$?
7725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7726 (exit $ac_status); }; }; then
7727 ac_hi=$ac_mid; break
7728else
7729 echo "$as_me: failed program was:" >&5
7730cat conftest.$ac_ext >&5
7731ac_lo=`expr $ac_mid + 1`
7732 if test $ac_lo -le $ac_mid; then
7733 ac_lo= ac_hi=
7734 break
7735 fi
7736 ac_mid=`expr 2 '*' $ac_mid + 1`
7737fi
7738rm -f conftest.$ac_objext conftest.$ac_ext
7739 done
7740else
7741 echo "$as_me: failed program was:" >&5
7742cat conftest.$ac_ext >&5
7743cat >conftest.$ac_ext <<_ACEOF
7744#line $LINENO "configure"
7745#include "confdefs.h"
7746$ac_includes_default
7747#ifdef F77_DUMMY_MAIN
7748# ifdef __cplusplus
7749 extern "C"
7750# endif
7751 int F77_DUMMY_MAIN() { return 1; }
7752#endif
7753int
7754main ()
7755{
7756static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7757test_array [0] = 0
7758
7759 ;
7760 return 0;
7761}
7762_ACEOF
7763rm -f conftest.$ac_objext
7764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7765 (eval $ac_compile) 2>&5
7766 ac_status=$?
7767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7768 (exit $ac_status); } &&
7769 { ac_try='test -s conftest.$ac_objext'
7770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7771 (eval $ac_try) 2>&5
7772 ac_status=$?
7773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7774 (exit $ac_status); }; }; then
7775 ac_hi=-1 ac_mid=-1
7776 while :; do
7777 cat >conftest.$ac_ext <<_ACEOF
7778#line $LINENO "configure"
7779#include "confdefs.h"
7780$ac_includes_default
7781#ifdef F77_DUMMY_MAIN
7782# ifdef __cplusplus
7783 extern "C"
7784# endif
7785 int F77_DUMMY_MAIN() { return 1; }
7786#endif
7787int
7788main ()
7789{
7790static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7791test_array [0] = 0
7792
7793 ;
7794 return 0;
7795}
7796_ACEOF
7797rm -f conftest.$ac_objext
7798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7799 (eval $ac_compile) 2>&5
7800 ac_status=$?
7801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7802 (exit $ac_status); } &&
7803 { ac_try='test -s conftest.$ac_objext'
7804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7805 (eval $ac_try) 2>&5
7806 ac_status=$?
7807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7808 (exit $ac_status); }; }; then
7809 ac_lo=$ac_mid; break
7810else
7811 echo "$as_me: failed program was:" >&5
7812cat conftest.$ac_ext >&5
7813ac_hi=`expr '(' $ac_mid ')' - 1`
7814 if test $ac_mid -le $ac_hi; then
7815 ac_lo= ac_hi=
7816 break
7817 fi
7818 ac_mid=`expr 2 '*' $ac_mid`
7819fi
7820rm -f conftest.$ac_objext conftest.$ac_ext
7821 done
7822else
7823 echo "$as_me: failed program was:" >&5
7824cat conftest.$ac_ext >&5
7825ac_lo= ac_hi=
7826fi
7827rm -f conftest.$ac_objext conftest.$ac_ext
7828fi
7829rm -f conftest.$ac_objext conftest.$ac_ext
7830# Binary search between lo and hi bounds.
7831while test "x$ac_lo" != "x$ac_hi"; do
7832 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7833 cat >conftest.$ac_ext <<_ACEOF
7834#line $LINENO "configure"
7835#include "confdefs.h"
7836$ac_includes_default
7837#ifdef F77_DUMMY_MAIN
7838# ifdef __cplusplus
7839 extern "C"
7840# endif
7841 int F77_DUMMY_MAIN() { return 1; }
7842#endif
7843int
7844main ()
7845{
7846static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7847test_array [0] = 0
7848
7849 ;
7850 return 0;
7851}
7852_ACEOF
7853rm -f conftest.$ac_objext
7854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7855 (eval $ac_compile) 2>&5
7856 ac_status=$?
7857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7858 (exit $ac_status); } &&
7859 { ac_try='test -s conftest.$ac_objext'
7860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7861 (eval $ac_try) 2>&5
7862 ac_status=$?
7863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7864 (exit $ac_status); }; }; then
7865 ac_hi=$ac_mid
7866else
7867 echo "$as_me: failed program was:" >&5
7868cat conftest.$ac_ext >&5
7869ac_lo=`expr '(' $ac_mid ')' + 1`
7870fi
7871rm -f conftest.$ac_objext conftest.$ac_ext
7872done
7873case $ac_lo in
7874?*) ac_cv_sizeof_long_long=$ac_lo;;
7875'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7876echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7877 { (exit 1); exit 1; }; } ;;
7878esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007879else
7880 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7882echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7883 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007884else
Martin v. Löwis11437992002-04-12 09:54:03 +00007885 cat >conftest.$ac_ext <<_ACEOF
7886#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007887#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007888$ac_includes_default
7889long longval () { return (long) (sizeof (long long)); }
7890unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007891#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007892#include <stdlib.h>
7893#ifdef F77_DUMMY_MAIN
7894# ifdef __cplusplus
7895 extern "C"
7896# endif
7897 int F77_DUMMY_MAIN() { return 1; }
7898#endif
7899int
7900main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007901{
Martin v. Löwis11437992002-04-12 09:54:03 +00007902
7903 FILE *f = fopen ("conftest.val", "w");
7904 if (! f)
7905 exit (1);
7906 if (((long) (sizeof (long long))) < 0)
7907 {
7908 long i = longval ();
7909 if (i != ((long) (sizeof (long long))))
7910 exit (1);
7911 fprintf (f, "%ld\n", i);
7912 }
7913 else
7914 {
7915 unsigned long i = ulongval ();
7916 if (i != ((long) (sizeof (long long))))
7917 exit (1);
7918 fprintf (f, "%lu\n", i);
7919 }
7920 exit (ferror (f) || fclose (f) != 0);
7921
7922 ;
7923 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007924}
Martin v. Löwis11437992002-04-12 09:54:03 +00007925_ACEOF
7926rm -f conftest$ac_exeext
7927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7928 (eval $ac_link) 2>&5
7929 ac_status=$?
7930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7931 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7933 (eval $ac_try) 2>&5
7934 ac_status=$?
7935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7936 (exit $ac_status); }; }; then
7937 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007938else
Martin v. Löwis11437992002-04-12 09:54:03 +00007939 echo "$as_me: program exited with status $ac_status" >&5
7940echo "$as_me: failed program was:" >&5
7941cat conftest.$ac_ext >&5
7942( exit $ac_status )
7943{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7944echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7945 { (exit 1); exit 1; }; }
7946fi
7947rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7948fi
7949fi
7950rm -f conftest.val
7951else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007952 ac_cv_sizeof_long_long=0
7953fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007954fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007955echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7956echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7957cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007958#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007959_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007960
Michael W. Hudson54241132001-12-07 15:38:26 +00007961
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007962fi
7963
Martin v. Löwis11437992002-04-12 09:54:03 +00007964echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7965echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007966have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007967cat >conftest.$ac_ext <<_ACEOF
7968#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007969#include "confdefs.h"
7970
Martin v. Löwis11437992002-04-12 09:54:03 +00007971#ifdef F77_DUMMY_MAIN
7972# ifdef __cplusplus
7973 extern "C"
7974# endif
7975 int F77_DUMMY_MAIN() { return 1; }
7976#endif
7977int
7978main ()
7979{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007980uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007981 ;
7982 return 0;
7983}
7984_ACEOF
7985rm -f conftest.$ac_objext
7986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7987 (eval $ac_compile) 2>&5
7988 ac_status=$?
7989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7990 (exit $ac_status); } &&
7991 { ac_try='test -s conftest.$ac_objext'
7992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7993 (eval $ac_try) 2>&5
7994 ac_status=$?
7995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7996 (exit $ac_status); }; }; then
7997
7998
7999cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008000#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008001_ACEOF
8002
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008003 have_uintptr_t=yes
8004
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008005else
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 echo "$as_me: failed program was:" >&5
8007cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008008fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008009rm -f conftest.$ac_objext conftest.$ac_ext
8010echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8011echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008012if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008013echo "$as_me:$LINENO: checking for uintptr_t" >&5
8014echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8015if test "${ac_cv_type_uintptr_t+set}" = set; then
8016 echo $ECHO_N "(cached) $ECHO_C" >&6
8017else
8018 cat >conftest.$ac_ext <<_ACEOF
8019#line $LINENO "configure"
8020#include "confdefs.h"
8021$ac_includes_default
8022#ifdef F77_DUMMY_MAIN
8023# ifdef __cplusplus
8024 extern "C"
8025# endif
8026 int F77_DUMMY_MAIN() { return 1; }
8027#endif
8028int
8029main ()
8030{
8031if ((uintptr_t *) 0)
8032 return 0;
8033if (sizeof (uintptr_t))
8034 return 0;
8035 ;
8036 return 0;
8037}
8038_ACEOF
8039rm -f conftest.$ac_objext
8040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8041 (eval $ac_compile) 2>&5
8042 ac_status=$?
8043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8044 (exit $ac_status); } &&
8045 { ac_try='test -s conftest.$ac_objext'
8046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8047 (eval $ac_try) 2>&5
8048 ac_status=$?
8049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8050 (exit $ac_status); }; }; then
8051 ac_cv_type_uintptr_t=yes
8052else
8053 echo "$as_me: failed program was:" >&5
8054cat conftest.$ac_ext >&5
8055ac_cv_type_uintptr_t=no
8056fi
8057rm -f conftest.$ac_objext conftest.$ac_ext
8058fi
8059echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8060echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8061
8062echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8063echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8064if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8065 echo $ECHO_N "(cached) $ECHO_C" >&6
8066else
8067 if test "$ac_cv_type_uintptr_t" = yes; then
8068 # The cast to unsigned long works around a bug in the HP C Compiler
8069 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8070 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8071 # This bug is HP SR number 8606223364.
8072 if test "$cross_compiling" = yes; then
8073 # Depending upon the size, compute the lo and hi bounds.
8074cat >conftest.$ac_ext <<_ACEOF
8075#line $LINENO "configure"
8076#include "confdefs.h"
8077$ac_includes_default
8078#ifdef F77_DUMMY_MAIN
8079# ifdef __cplusplus
8080 extern "C"
8081# endif
8082 int F77_DUMMY_MAIN() { return 1; }
8083#endif
8084int
8085main ()
8086{
8087static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8088test_array [0] = 0
8089
8090 ;
8091 return 0;
8092}
8093_ACEOF
8094rm -f conftest.$ac_objext
8095if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8096 (eval $ac_compile) 2>&5
8097 ac_status=$?
8098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8099 (exit $ac_status); } &&
8100 { ac_try='test -s conftest.$ac_objext'
8101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8102 (eval $ac_try) 2>&5
8103 ac_status=$?
8104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8105 (exit $ac_status); }; }; then
8106 ac_lo=0 ac_mid=0
8107 while :; do
8108 cat >conftest.$ac_ext <<_ACEOF
8109#line $LINENO "configure"
8110#include "confdefs.h"
8111$ac_includes_default
8112#ifdef F77_DUMMY_MAIN
8113# ifdef __cplusplus
8114 extern "C"
8115# endif
8116 int F77_DUMMY_MAIN() { return 1; }
8117#endif
8118int
8119main ()
8120{
8121static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8122test_array [0] = 0
8123
8124 ;
8125 return 0;
8126}
8127_ACEOF
8128rm -f conftest.$ac_objext
8129if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8130 (eval $ac_compile) 2>&5
8131 ac_status=$?
8132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8133 (exit $ac_status); } &&
8134 { ac_try='test -s conftest.$ac_objext'
8135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8136 (eval $ac_try) 2>&5
8137 ac_status=$?
8138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8139 (exit $ac_status); }; }; then
8140 ac_hi=$ac_mid; break
8141else
8142 echo "$as_me: failed program was:" >&5
8143cat conftest.$ac_ext >&5
8144ac_lo=`expr $ac_mid + 1`
8145 if test $ac_lo -le $ac_mid; then
8146 ac_lo= ac_hi=
8147 break
8148 fi
8149 ac_mid=`expr 2 '*' $ac_mid + 1`
8150fi
8151rm -f conftest.$ac_objext conftest.$ac_ext
8152 done
8153else
8154 echo "$as_me: failed program was:" >&5
8155cat conftest.$ac_ext >&5
8156cat >conftest.$ac_ext <<_ACEOF
8157#line $LINENO "configure"
8158#include "confdefs.h"
8159$ac_includes_default
8160#ifdef F77_DUMMY_MAIN
8161# ifdef __cplusplus
8162 extern "C"
8163# endif
8164 int F77_DUMMY_MAIN() { return 1; }
8165#endif
8166int
8167main ()
8168{
8169static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8170test_array [0] = 0
8171
8172 ;
8173 return 0;
8174}
8175_ACEOF
8176rm -f conftest.$ac_objext
8177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8178 (eval $ac_compile) 2>&5
8179 ac_status=$?
8180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8181 (exit $ac_status); } &&
8182 { ac_try='test -s conftest.$ac_objext'
8183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8184 (eval $ac_try) 2>&5
8185 ac_status=$?
8186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8187 (exit $ac_status); }; }; then
8188 ac_hi=-1 ac_mid=-1
8189 while :; do
8190 cat >conftest.$ac_ext <<_ACEOF
8191#line $LINENO "configure"
8192#include "confdefs.h"
8193$ac_includes_default
8194#ifdef F77_DUMMY_MAIN
8195# ifdef __cplusplus
8196 extern "C"
8197# endif
8198 int F77_DUMMY_MAIN() { return 1; }
8199#endif
8200int
8201main ()
8202{
8203static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8204test_array [0] = 0
8205
8206 ;
8207 return 0;
8208}
8209_ACEOF
8210rm -f conftest.$ac_objext
8211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8212 (eval $ac_compile) 2>&5
8213 ac_status=$?
8214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8215 (exit $ac_status); } &&
8216 { ac_try='test -s conftest.$ac_objext'
8217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8218 (eval $ac_try) 2>&5
8219 ac_status=$?
8220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8221 (exit $ac_status); }; }; then
8222 ac_lo=$ac_mid; break
8223else
8224 echo "$as_me: failed program was:" >&5
8225cat conftest.$ac_ext >&5
8226ac_hi=`expr '(' $ac_mid ')' - 1`
8227 if test $ac_mid -le $ac_hi; then
8228 ac_lo= ac_hi=
8229 break
8230 fi
8231 ac_mid=`expr 2 '*' $ac_mid`
8232fi
8233rm -f conftest.$ac_objext conftest.$ac_ext
8234 done
8235else
8236 echo "$as_me: failed program was:" >&5
8237cat conftest.$ac_ext >&5
8238ac_lo= ac_hi=
8239fi
8240rm -f conftest.$ac_objext conftest.$ac_ext
8241fi
8242rm -f conftest.$ac_objext conftest.$ac_ext
8243# Binary search between lo and hi bounds.
8244while test "x$ac_lo" != "x$ac_hi"; do
8245 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8246 cat >conftest.$ac_ext <<_ACEOF
8247#line $LINENO "configure"
8248#include "confdefs.h"
8249$ac_includes_default
8250#ifdef F77_DUMMY_MAIN
8251# ifdef __cplusplus
8252 extern "C"
8253# endif
8254 int F77_DUMMY_MAIN() { return 1; }
8255#endif
8256int
8257main ()
8258{
8259static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8260test_array [0] = 0
8261
8262 ;
8263 return 0;
8264}
8265_ACEOF
8266rm -f conftest.$ac_objext
8267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8268 (eval $ac_compile) 2>&5
8269 ac_status=$?
8270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8271 (exit $ac_status); } &&
8272 { ac_try='test -s conftest.$ac_objext'
8273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8274 (eval $ac_try) 2>&5
8275 ac_status=$?
8276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8277 (exit $ac_status); }; }; then
8278 ac_hi=$ac_mid
8279else
8280 echo "$as_me: failed program was:" >&5
8281cat conftest.$ac_ext >&5
8282ac_lo=`expr '(' $ac_mid ')' + 1`
8283fi
8284rm -f conftest.$ac_objext conftest.$ac_ext
8285done
8286case $ac_lo in
8287?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8288'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8289echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8290 { (exit 1); exit 1; }; } ;;
8291esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008292else
8293 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008294 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8295echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8296 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008297else
Martin v. Löwis11437992002-04-12 09:54:03 +00008298 cat >conftest.$ac_ext <<_ACEOF
8299#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008300#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008301$ac_includes_default
8302long longval () { return (long) (sizeof (uintptr_t)); }
8303unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008304#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008305#include <stdlib.h>
8306#ifdef F77_DUMMY_MAIN
8307# ifdef __cplusplus
8308 extern "C"
8309# endif
8310 int F77_DUMMY_MAIN() { return 1; }
8311#endif
8312int
8313main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008314{
Martin v. Löwis11437992002-04-12 09:54:03 +00008315
8316 FILE *f = fopen ("conftest.val", "w");
8317 if (! f)
8318 exit (1);
8319 if (((long) (sizeof (uintptr_t))) < 0)
8320 {
8321 long i = longval ();
8322 if (i != ((long) (sizeof (uintptr_t))))
8323 exit (1);
8324 fprintf (f, "%ld\n", i);
8325 }
8326 else
8327 {
8328 unsigned long i = ulongval ();
8329 if (i != ((long) (sizeof (uintptr_t))))
8330 exit (1);
8331 fprintf (f, "%lu\n", i);
8332 }
8333 exit (ferror (f) || fclose (f) != 0);
8334
8335 ;
8336 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008337}
Martin v. Löwis11437992002-04-12 09:54:03 +00008338_ACEOF
8339rm -f conftest$ac_exeext
8340if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8341 (eval $ac_link) 2>&5
8342 ac_status=$?
8343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8344 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8346 (eval $ac_try) 2>&5
8347 ac_status=$?
8348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8349 (exit $ac_status); }; }; then
8350 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008351else
Martin v. Löwis11437992002-04-12 09:54:03 +00008352 echo "$as_me: program exited with status $ac_status" >&5
8353echo "$as_me: failed program was:" >&5
8354cat conftest.$ac_ext >&5
8355( exit $ac_status )
8356{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8357echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8358 { (exit 1); exit 1; }; }
8359fi
8360rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8361fi
8362fi
8363rm -f conftest.val
8364else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008365 ac_cv_sizeof_uintptr_t=0
8366fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008367fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008368echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8369echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8370cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008371#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008372_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008373
Michael W. Hudson54241132001-12-07 15:38:26 +00008374
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008375fi
8376
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008377# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008378echo "$as_me:$LINENO: checking size of off_t" >&5
8379echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8380if test "${ac_cv_sizeof_off_t+set}" = set; then
8381 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008382else
8383 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008384 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008385else
Martin v. Löwis11437992002-04-12 09:54:03 +00008386 cat >conftest.$ac_ext <<_ACEOF
8387#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008388#include "confdefs.h"
8389#include <stdio.h>
8390#include <sys/types.h>
8391main()
8392{
8393 FILE *f=fopen("conftestval", "w");
8394 if (!f) exit(1);
8395 fprintf(f, "%d\n", sizeof(off_t));
8396 exit(0);
8397}
Martin v. Löwis11437992002-04-12 09:54:03 +00008398_ACEOF
8399rm -f conftest$ac_exeext
8400if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8401 (eval $ac_link) 2>&5
8402 ac_status=$?
8403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8404 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8406 (eval $ac_try) 2>&5
8407 ac_status=$?
8408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8409 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008410 ac_cv_sizeof_off_t=`cat conftestval`
8411else
Martin v. Löwis11437992002-04-12 09:54:03 +00008412 echo "$as_me: program exited with status $ac_status" >&5
8413echo "$as_me: failed program was:" >&5
8414cat conftest.$ac_ext >&5
8415( exit $ac_status )
8416ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008417fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008418rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008419fi
8420
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008421fi
8422
Martin v. Löwis11437992002-04-12 09:54:03 +00008423echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8424echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8425
8426cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008427#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008428_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008429
Michael W. Hudson54241132001-12-07 15:38:26 +00008430
Martin v. Löwis11437992002-04-12 09:54:03 +00008431echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8432echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008433if test "$have_long_long" = yes -a \
8434 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8435 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008436
Martin v. Löwis11437992002-04-12 09:54:03 +00008437cat >>confdefs.h <<\_ACEOF
8438#define HAVE_LARGEFILE_SUPPORT 1
8439_ACEOF
8440
8441 echo "$as_me:$LINENO: result: yes" >&5
8442echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008443else
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 echo "$as_me:$LINENO: result: no" >&5
8445echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008446fi
8447
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008448# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008449echo "$as_me:$LINENO: checking size of time_t" >&5
8450echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8451if test "${ac_cv_sizeof_time_t+set}" = set; then
8452 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008453else
8454 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008455 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008456else
Martin v. Löwis11437992002-04-12 09:54:03 +00008457 cat >conftest.$ac_ext <<_ACEOF
8458#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008459#include "confdefs.h"
8460#include <stdio.h>
8461#include <time.h>
8462main()
8463{
8464 FILE *f=fopen("conftestval", "w");
8465 if (!f) exit(1);
8466 fprintf(f, "%d\n", sizeof(time_t));
8467 exit(0);
8468}
Martin v. Löwis11437992002-04-12 09:54:03 +00008469_ACEOF
8470rm -f conftest$ac_exeext
8471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8472 (eval $ac_link) 2>&5
8473 ac_status=$?
8474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8475 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8477 (eval $ac_try) 2>&5
8478 ac_status=$?
8479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8480 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008481 ac_cv_sizeof_time_t=`cat conftestval`
8482else
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 echo "$as_me: program exited with status $ac_status" >&5
8484echo "$as_me: failed program was:" >&5
8485cat conftest.$ac_ext >&5
8486( exit $ac_status )
8487ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008488fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008489rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008490fi
8491
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008492fi
8493
Martin v. Löwis11437992002-04-12 09:54:03 +00008494echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8495echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8496
8497cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008498#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008499_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008500
Michael W. Hudson54241132001-12-07 15:38:26 +00008501
8502
Trent Mick635f6fb2000-08-23 21:33:05 +00008503# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008504ac_save_cc="$CC"
8505if test "$ac_cv_kpthread" = "yes"
8506then CC="$CC -Kpthread"
8507fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008508echo "$as_me:$LINENO: checking for pthread_t" >&5
8509echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008510have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008511cat >conftest.$ac_ext <<_ACEOF
8512#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008513#include "confdefs.h"
8514#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008515#ifdef F77_DUMMY_MAIN
8516# ifdef __cplusplus
8517 extern "C"
8518# endif
8519 int F77_DUMMY_MAIN() { return 1; }
8520#endif
8521int
8522main ()
8523{
Guido van Rossum12580492000-09-24 16:47:19 +00008524pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008525 ;
8526 return 0;
8527}
8528_ACEOF
8529rm -f conftest.$ac_objext
8530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8531 (eval $ac_compile) 2>&5
8532 ac_status=$?
8533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534 (exit $ac_status); } &&
8535 { ac_try='test -s conftest.$ac_objext'
8536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8537 (eval $ac_try) 2>&5
8538 ac_status=$?
8539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8540 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008541 have_pthread_t=yes
8542else
Martin v. Löwis11437992002-04-12 09:54:03 +00008543 echo "$as_me: failed program was:" >&5
8544cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008546rm -f conftest.$ac_objext conftest.$ac_ext
8547echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8548echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008549if test "$have_pthread_t" = yes ; then
8550 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8552echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8553 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8554 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008555else
8556 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008557 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008558else
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 cat >conftest.$ac_ext <<_ACEOF
8560#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008561#include "confdefs.h"
8562#include <stdio.h>
8563 #include <pthread.h>
8564 main()
8565 {
8566 FILE *f=fopen("conftestval", "w");
8567 if (!f) exit(1);
8568 fprintf(f, "%d\n", sizeof(pthread_t));
8569 exit(0);
8570 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008571_ACEOF
8572rm -f conftest$ac_exeext
8573if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8574 (eval $ac_link) 2>&5
8575 ac_status=$?
8576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8577 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8579 (eval $ac_try) 2>&5
8580 ac_status=$?
8581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8582 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008583 ac_cv_sizeof_pthread_t=`cat conftestval`
8584else
Martin v. Löwis11437992002-04-12 09:54:03 +00008585 echo "$as_me: program exited with status $ac_status" >&5
8586echo "$as_me: failed program was:" >&5
8587cat conftest.$ac_ext >&5
8588( exit $ac_status )
8589ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008590fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008591rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008592fi
8593
Trent Mick635f6fb2000-08-23 21:33:05 +00008594fi
8595
Martin v. Löwis11437992002-04-12 09:54:03 +00008596 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8597echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8598
8599cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008600#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008601_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008602
8603fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008604CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008605
Martin v. Löwis11437992002-04-12 09:54:03 +00008606echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8607echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008608# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8609if test "${enable_toolbox_glue+set}" = set; then
8610 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008611
Martin v. Löwis11437992002-04-12 09:54:03 +00008612fi;
Jack Jansene578a632001-08-15 01:27:14 +00008613
8614if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008615then
Jack Jansene578a632001-08-15 01:27:14 +00008616 case $ac_sys_system/$ac_sys_release in
8617 Darwin/*)
8618 enable_toolbox_glue="yes";;
8619 *)
8620 enable_toolbox_glue="no";;
8621 esac
8622fi
8623case "$enable_toolbox_glue" in
8624yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008625 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008626 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008627 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008628
8629cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008630#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008631_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008632
8633 ;;
8634*)
8635 extra_frameworks=""
8636 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008637 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008638 ;;
8639esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008640echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8641echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008642
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008643
8644case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008645 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008646 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008647 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8648 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008649 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8650 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008651 Darwin/*)
8652 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008653 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8654 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008655 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8656 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008657esac
8658
Martin v. Löwis11437992002-04-12 09:54:03 +00008659echo "$as_me:$LINENO: checking for --enable-framework" >&5
8660echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008661if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008662then
Jack Jansenca06bc62001-08-03 15:32:23 +00008663 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008664 # -U __environ is needed since bundles don't have access
8665 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008666 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008667 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008668
Jack Jansena3891ea2001-09-07 14:25:12 +00008669 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008670 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8671 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008672 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008673
Martin v. Löwis11437992002-04-12 09:54:03 +00008674cat >>confdefs.h <<\_ACEOF
8675#define WITH_NEXT_FRAMEWORK 1
8676_ACEOF
8677
8678 echo "$as_me:$LINENO: result: yes" >&5
8679echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008680else
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 echo "$as_me:$LINENO: result: no" >&5
8682echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008683fi
8684
Martin v. Löwis11437992002-04-12 09:54:03 +00008685echo "$as_me:$LINENO: checking for dyld" >&5
8686echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008687case $ac_sys_system/$ac_sys_release in
8688 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008689
Martin v. Löwis11437992002-04-12 09:54:03 +00008690cat >>confdefs.h <<\_ACEOF
8691#define WITH_DYLD 1
8692_ACEOF
8693
8694 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8695echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008696 ;;
8697 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 echo "$as_me:$LINENO: result: no" >&5
8699echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008700 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008701esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008702
Guido van Rossum0a516c91994-09-12 10:58:40 +00008703# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008704
Michael W. Hudson54241132001-12-07 15:38:26 +00008705
8706
8707
8708
Guido van Rossum0a516c91994-09-12 10:58:40 +00008709# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008710# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008711echo "$as_me:$LINENO: checking SO" >&5
8712echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008713if test -z "$SO"
8714then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008715 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008716 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008717 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008718 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008719 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008720fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008721echo "$as_me:$LINENO: result: $SO" >&5
8722echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008723# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008724# -- "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 +00008725# (Shared libraries in this instance are shared modules to be loaded into
8726# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008727echo "$as_me:$LINENO: checking LDSHARED" >&5
8728echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008729if test -z "$LDSHARED"
8730then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008731 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008732 AIX*)
8733 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008734 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008735 ;;
8736 BeOS*)
8737 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008738 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008739 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008740 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008741 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008742 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008743 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00008744 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008745 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008746 else LDSHARED="$(CC) -G";
Greg Ward57c9a662000-05-26 12:22:54 +00008747 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008748 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008749 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8750 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008751 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008752 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8753 if test "$enable_framework" ; then
8754 # Link against the framework. All externals should be defined.
8755 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8756 else
8757 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008758 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008759 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008760 Darwin/*)
8761 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8762 if test "$enable_framework" ; then
8763 # Link against the framework. All externals should be defined.
8764 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8765 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008766 # No framework, use the Python app as bundle-loader
8767 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8768 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008769 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008770 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008771 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008772 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008773 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008774 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008775 then
8776 LDSHARED="cc -shared ${LDFLAGS}"
8777 else
8778 LDSHARED="ld -Bshareable ${LDFLAGS}"
8779 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008780 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008781 if test "$GCC" = "yes"
8782 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008783 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008784 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008785 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008786 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008787 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008788 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008789 *) LDSHARED="ld";;
8790 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008791fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008792echo "$as_me:$LINENO: result: $LDSHARED" >&5
8793echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008794BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008795# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008796# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008797echo "$as_me:$LINENO: checking CCSHARED" >&5
8798echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008799if test -z "$CCSHARED"
8800then
Guido van Rossum07397971997-04-29 21:49:50 +00008801 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008802 SunOS*) if test "$GCC" = yes;
8803 then CCSHARED="-fPIC";
8804 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008805 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008806 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008807 else CCSHARED="+z";
8808 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008809 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008810 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008811 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008812 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008813 if test "$GCC" = "yes"
8814 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008815 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008816 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008817 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008818 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008819 IRIX*/6*) case $CC in
8820 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008821 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008822 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008823 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008824 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008825 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008826fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008827echo "$as_me:$LINENO: result: $CCSHARED" >&5
8828echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008829# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008830# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008831echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8832echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008833if test -z "$LINKFORSHARED"
8834then
Guido van Rossum07397971997-04-29 21:49:50 +00008835 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008836 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008837 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008838 LINKFORSHARED="-Wl,-E -Wl,+s";;
8839# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008840 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008841 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008842 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008843 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008844 # -u __dummy makes the linker aware of the objc runtime
8845 # in System.framework; otherwise, __objcInit (referenced in
8846 # crt1.o) gets erroneously defined as common, which breaks dynamic
8847 # loading of any modules which reference it in System.framework.
8848 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8849 # not used by the core itself but which needs to be in the core so
8850 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008851 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008852 if test "$enable_framework"
8853 then
8854 LINKFORSHARED="$LINKFORSHARED -framework Python"
8855 fi
8856 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008857 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008858 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008859 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008860 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008861 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8862 then
8863 LINKFORSHARED="-Wl,--export-dynamic"
8864 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008865 SunOS/5*) case $CC in
8866 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008867 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008868 then
8869 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008870 fi;;
8871 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008872 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008873fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008874echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8875echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008876
Michael W. Hudson54241132001-12-07 15:38:26 +00008877
Martin v. Löwis11437992002-04-12 09:54:03 +00008878echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8879echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008880if test ! "$LIBRARY" = "$LDLIBRARY"
8881then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008882 case $ac_sys_system in
8883 CYGWIN*)
8884 # Cygwin needs CCSHARED when building extension DLLs
8885 # but not when building the interpreter DLL.
8886 CFLAGSFORSHARED='';;
8887 *)
8888 CFLAGSFORSHARED='$(CCSHARED)'
8889 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008890fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008891echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8892echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008893
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008894# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8895# library (with --enable-shared).
8896# For platforms on which shared libraries are not allowed to have unresolved
8897# symbols, this must be set to $(LIBS) (expanded by make).
8898
8899echo "$as_me:$LINENO: checking SHLIBS" >&5
8900echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
8901case "$ac_sys_system" in
8902 atheos*)
8903 SHLIBS='$(LIBS)';;
8904 *)
8905 SHLIBS='';;
8906esac
8907echo "$as_me:$LINENO: result: $SHLIBS" >&5
8908echo "${ECHO_T}$SHLIBS" >&6
8909
8910
Guido van Rossum627b2d71993-12-24 10:39:16 +00008911# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008912
8913echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8914echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8915if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8916 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008917else
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008919LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008920cat >conftest.$ac_ext <<_ACEOF
8921#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008922#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008923
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008924/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008925#ifdef __cplusplus
8926extern "C"
8927#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008928/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 builtin and then its argument prototype would still apply. */
8930char dlopen ();
8931#ifdef F77_DUMMY_MAIN
8932# ifdef __cplusplus
8933 extern "C"
8934# endif
8935 int F77_DUMMY_MAIN() { return 1; }
8936#endif
8937int
8938main ()
8939{
8940dlopen ();
8941 ;
8942 return 0;
8943}
8944_ACEOF
8945rm -f conftest.$ac_objext conftest$ac_exeext
8946if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8947 (eval $ac_link) 2>&5
8948 ac_status=$?
8949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8950 (exit $ac_status); } &&
8951 { ac_try='test -s conftest$ac_exeext'
8952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8953 (eval $ac_try) 2>&5
8954 ac_status=$?
8955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8956 (exit $ac_status); }; }; then
8957 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008958else
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 echo "$as_me: failed program was:" >&5
8960cat conftest.$ac_ext >&5
8961ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008962fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008963rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8964LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008965fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008966echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8967echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8968if test $ac_cv_lib_dl_dlopen = yes; then
8969 cat >>confdefs.h <<_ACEOF
8970#define HAVE_LIBDL 1
8971_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008972
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008973 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008974
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008975fi
8976 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008977
8978echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8979echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8980if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8981 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008982else
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008984LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008985cat >conftest.$ac_ext <<_ACEOF
8986#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008987#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008988
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008989/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008990#ifdef __cplusplus
8991extern "C"
8992#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008993/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008994 builtin and then its argument prototype would still apply. */
8995char shl_load ();
8996#ifdef F77_DUMMY_MAIN
8997# ifdef __cplusplus
8998 extern "C"
8999# endif
9000 int F77_DUMMY_MAIN() { return 1; }
9001#endif
9002int
9003main ()
9004{
9005shl_load ();
9006 ;
9007 return 0;
9008}
9009_ACEOF
9010rm -f conftest.$ac_objext conftest$ac_exeext
9011if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9012 (eval $ac_link) 2>&5
9013 ac_status=$?
9014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9015 (exit $ac_status); } &&
9016 { ac_try='test -s conftest$ac_exeext'
9017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9018 (eval $ac_try) 2>&5
9019 ac_status=$?
9020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9021 (exit $ac_status); }; }; then
9022 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009023else
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 echo "$as_me: failed program was:" >&5
9025cat conftest.$ac_ext >&5
9026ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009027fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009028rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9029LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009030fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009031echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9032echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9033if test $ac_cv_lib_dld_shl_load = yes; then
9034 cat >>confdefs.h <<_ACEOF
9035#define HAVE_LIBDLD 1
9036_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009037
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009038 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009040fi
9041 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009042
9043echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9044echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9045if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9046 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009047else
Martin v. Löwis11437992002-04-12 09:54:03 +00009048 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009049LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009050cat >conftest.$ac_ext <<_ACEOF
9051#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009052#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009053
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009054/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009055#ifdef __cplusplus
9056extern "C"
9057#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009058/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009059 builtin and then its argument prototype would still apply. */
9060char sem_init ();
9061#ifdef F77_DUMMY_MAIN
9062# ifdef __cplusplus
9063 extern "C"
9064# endif
9065 int F77_DUMMY_MAIN() { return 1; }
9066#endif
9067int
9068main ()
9069{
9070sem_init ();
9071 ;
9072 return 0;
9073}
9074_ACEOF
9075rm -f conftest.$ac_objext conftest$ac_exeext
9076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9077 (eval $ac_link) 2>&5
9078 ac_status=$?
9079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9080 (exit $ac_status); } &&
9081 { ac_try='test -s conftest$ac_exeext'
9082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9083 (eval $ac_try) 2>&5
9084 ac_status=$?
9085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9086 (exit $ac_status); }; }; then
9087 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009088else
Martin v. Löwis11437992002-04-12 09:54:03 +00009089 echo "$as_me: failed program was:" >&5
9090cat conftest.$ac_ext >&5
9091ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009092fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009093rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9094LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009095fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009096echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9097echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9098if test $ac_cv_lib_rt_sem_init = yes; then
9099 cat >>confdefs.h <<_ACEOF
9100#define HAVE_LIBRT 1
9101_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009102
9103 LIBS="-lrt $LIBS"
9104
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009105fi
9106 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009107
9108# checks for system dependent C++ extensions support
9109case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9111echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9112 cat >conftest.$ac_ext <<_ACEOF
9113#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009114#include "confdefs.h"
9115#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009116#ifdef F77_DUMMY_MAIN
9117# ifdef __cplusplus
9118 extern "C"
9119# endif
9120 int F77_DUMMY_MAIN() { return 1; }
9121#endif
9122int
9123main ()
9124{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009125loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009126 ;
9127 return 0;
9128}
9129_ACEOF
9130rm -f conftest.$ac_objext conftest$ac_exeext
9131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9132 (eval $ac_link) 2>&5
9133 ac_status=$?
9134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9135 (exit $ac_status); } &&
9136 { ac_try='test -s conftest$ac_exeext'
9137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9138 (eval $ac_try) 2>&5
9139 ac_status=$?
9140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9141 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009142
Martin v. Löwis11437992002-04-12 09:54:03 +00009143cat >>confdefs.h <<\_ACEOF
9144#define AIX_GENUINE_CPLUSPLUS 1
9145_ACEOF
9146
9147 echo "$as_me:$LINENO: result: yes" >&5
9148echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009149else
Martin v. Löwis11437992002-04-12 09:54:03 +00009150 echo "$as_me: failed program was:" >&5
9151cat conftest.$ac_ext >&5
9152echo "$as_me:$LINENO: result: no" >&5
9153echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009154fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009155rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009156 *) ;;
9157esac
9158
Guido van Rossum70c7f481998-03-26 18:44:10 +00009159# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9160# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009161# BeOS' sockets are stashed in libnet.
9162case "$ac_sys_system" in
9163IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009164*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009165echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9166echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9167if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9168 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009169else
Martin v. Löwis11437992002-04-12 09:54:03 +00009170 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009171LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009172cat >conftest.$ac_ext <<_ACEOF
9173#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009174#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009175
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009176/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009177#ifdef __cplusplus
9178extern "C"
9179#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009180/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009181 builtin and then its argument prototype would still apply. */
9182char t_open ();
9183#ifdef F77_DUMMY_MAIN
9184# ifdef __cplusplus
9185 extern "C"
9186# endif
9187 int F77_DUMMY_MAIN() { return 1; }
9188#endif
9189int
9190main ()
9191{
9192t_open ();
9193 ;
9194 return 0;
9195}
9196_ACEOF
9197rm -f conftest.$ac_objext conftest$ac_exeext
9198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9199 (eval $ac_link) 2>&5
9200 ac_status=$?
9201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9202 (exit $ac_status); } &&
9203 { ac_try='test -s conftest$ac_exeext'
9204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9205 (eval $ac_try) 2>&5
9206 ac_status=$?
9207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9208 (exit $ac_status); }; }; then
9209 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009210else
Martin v. Löwis11437992002-04-12 09:54:03 +00009211 echo "$as_me: failed program was:" >&5
9212cat conftest.$ac_ext >&5
9213ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009215rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9216LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009217fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009218echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9219echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9220if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009221 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009222fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009223 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009224echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9225echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9226if test "${ac_cv_lib_socket_socket+set}" = set; then
9227 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009228else
Martin v. Löwis11437992002-04-12 09:54:03 +00009229 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009230LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009231cat >conftest.$ac_ext <<_ACEOF
9232#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009233#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009234
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009235/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009236#ifdef __cplusplus
9237extern "C"
9238#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009239/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 builtin and then its argument prototype would still apply. */
9241char socket ();
9242#ifdef F77_DUMMY_MAIN
9243# ifdef __cplusplus
9244 extern "C"
9245# endif
9246 int F77_DUMMY_MAIN() { return 1; }
9247#endif
9248int
9249main ()
9250{
9251socket ();
9252 ;
9253 return 0;
9254}
9255_ACEOF
9256rm -f conftest.$ac_objext conftest$ac_exeext
9257if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9258 (eval $ac_link) 2>&5
9259 ac_status=$?
9260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9261 (exit $ac_status); } &&
9262 { ac_try='test -s conftest$ac_exeext'
9263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9264 (eval $ac_try) 2>&5
9265 ac_status=$?
9266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9267 (exit $ac_status); }; }; then
9268 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009269else
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 echo "$as_me: failed program was:" >&5
9271cat conftest.$ac_ext >&5
9272ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009273fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009274rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9275LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009276fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009277echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9278echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9279if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009280 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009281fi
9282 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009283;;
9284esac
9285case "$ac_sys_system" in
9286BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009287echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9288echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9289if test "${ac_cv_lib_net_socket+set}" = set; then
9290 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009291else
Martin v. Löwis11437992002-04-12 09:54:03 +00009292 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009293LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009294cat >conftest.$ac_ext <<_ACEOF
9295#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009296#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009297
Guido van Rossumad678af1998-10-02 14:42:15 +00009298/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009299#ifdef __cplusplus
9300extern "C"
9301#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009302/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 builtin and then its argument prototype would still apply. */
9304char socket ();
9305#ifdef F77_DUMMY_MAIN
9306# ifdef __cplusplus
9307 extern "C"
9308# endif
9309 int F77_DUMMY_MAIN() { return 1; }
9310#endif
9311int
9312main ()
9313{
9314socket ();
9315 ;
9316 return 0;
9317}
9318_ACEOF
9319rm -f conftest.$ac_objext conftest$ac_exeext
9320if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9321 (eval $ac_link) 2>&5
9322 ac_status=$?
9323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9324 (exit $ac_status); } &&
9325 { ac_try='test -s conftest$ac_exeext'
9326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9327 (eval $ac_try) 2>&5
9328 ac_status=$?
9329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9330 (exit $ac_status); }; }; then
9331 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009332else
Martin v. Löwis11437992002-04-12 09:54:03 +00009333 echo "$as_me: failed program was:" >&5
9334cat conftest.$ac_ext >&5
9335ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009336fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009337rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9338LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009339fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009340echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9341echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9342if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009343 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009344fi
9345 # BeOS
9346;;
9347esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009348
Martin v. Löwis11437992002-04-12 09:54:03 +00009349echo "$as_me:$LINENO: checking for --with-libs" >&5
9350echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9351
Guido van Rossuma68acba1996-07-31 17:36:39 +00009352# Check whether --with-libs or --without-libs was given.
9353if test "${with_libs+set}" = set; then
9354 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009355
9356echo "$as_me:$LINENO: result: $withval" >&5
9357echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009358LIBS="$withval $LIBS"
9359
9360else
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 echo "$as_me:$LINENO: result: no" >&5
9362echo "${ECHO_T}no" >&6
9363fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009364
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009365# Determine if signalmodule should be used.
9366
9367
Martin v. Löwis11437992002-04-12 09:54:03 +00009368echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9369echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9370
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009371# Check whether --with-signal-module or --without-signal-module was given.
9372if test "${with_signal_module+set}" = set; then
9373 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009374
Martin v. Löwis11437992002-04-12 09:54:03 +00009375fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009376
9377if test -z "$with_signal_module"
9378then with_signal_module="yes"
9379fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009380echo "$as_me:$LINENO: result: $with_signal_module" >&5
9381echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009382
9383if test "${with_signal_module}" = "yes"; then
9384 USE_SIGNAL_MODULE=""
9385 SIGNAL_OBJS=""
9386else
9387 USE_SIGNAL_MODULE="#"
9388 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9389fi
9390
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009391# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009392
Barry Warsawc0d24d82000-06-29 16:12:00 +00009393USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009394
Martin v. Löwis11437992002-04-12 09:54:03 +00009395echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9396echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9397
Guido van Rossumec2f0731997-01-22 20:54:01 +00009398
9399# Check whether --with-dec-threads or --without-dec-threads was given.
9400if test "${with_dec_threads+set}" = set; then
9401 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009402
9403echo "$as_me:$LINENO: result: $withval" >&5
9404echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009405LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009406if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009407 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009408fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009409else
Martin v. Löwis11437992002-04-12 09:54:03 +00009410 echo "$as_me:$LINENO: result: no" >&5
9411echo "${ECHO_T}no" >&6
9412fi;
9413
9414# Templates for things AC_DEFINEd more than once.
9415# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009416
9417
Martin v. Löwis11437992002-04-12 09:54:03 +00009418
9419
9420
9421
9422
9423echo "$as_me:$LINENO: checking for --with-threads" >&5
9424echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9425
Guido van Rossumec2f0731997-01-22 20:54:01 +00009426# Check whether --with-threads or --without-threads was given.
9427if test "${with_threads+set}" = set; then
9428 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009429
Martin v. Löwis11437992002-04-12 09:54:03 +00009430fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009431
Barry Warsawc0d24d82000-06-29 16:12:00 +00009432# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009433
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009434# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009435if test "${with_thread+set}" = set; then
9436 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009437
Martin v. Löwis11437992002-04-12 09:54:03 +00009438with_threads=$with_thread
9439fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009440
9441if test -z "$with_threads"
9442then with_threads="yes"
9443fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009444echo "$as_me:$LINENO: result: $with_threads" >&5
9445echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009446
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009447
Barry Warsawc0d24d82000-06-29 16:12:00 +00009448if test "$with_threads" = "no"
9449then
9450 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009451elif test "$ac_cv_pthread_is_default" = yes
9452then
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009454#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009455_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009456
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009457 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009459#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009460_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009461
9462 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009464elif test "$ac_cv_kpthread" = "yes"
9465then
9466 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009467 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009468#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009469_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009470
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009471 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009472 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009473else
9474 if test ! -z "$with_threads" -a -d "$with_threads"
9475 then LDFLAGS="$LDFLAGS -L$with_threads"
9476 fi
9477 if test ! -z "$withval" -a -d "$withval"
9478 then LDFLAGS="$LDFLAGS -L$withval"
9479 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009480
9481 # According to the POSIX spec, a pthreads implementation must
9482 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9484echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9485 cat >conftest.$ac_ext <<_ACEOF
9486#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009487#include "confdefs.h"
9488#include <unistd.h>
9489 #ifdef _POSIX_THREADS
9490 yes
9491 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009492
9493_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9495 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009496 unistd_defines_pthreads=yes
9497else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009498 unistd_defines_pthreads=no
9499fi
9500rm -f conftest*
9501
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9503echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009504
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009506#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009507_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009508
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 if test "${ac_cv_header_cthreads_h+set}" = set; then
9510 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9511echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9512if test "${ac_cv_header_cthreads_h+set}" = set; then
9513 echo $ECHO_N "(cached) $ECHO_C" >&6
9514fi
9515echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9516echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009517else
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 # Is the header compilable?
9519echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9520echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9521cat >conftest.$ac_ext <<_ACEOF
9522#line $LINENO "configure"
9523#include "confdefs.h"
9524$ac_includes_default
9525#include <cthreads.h>
9526_ACEOF
9527rm -f conftest.$ac_objext
9528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9529 (eval $ac_compile) 2>&5
9530 ac_status=$?
9531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9532 (exit $ac_status); } &&
9533 { ac_try='test -s conftest.$ac_objext'
9534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9535 (eval $ac_try) 2>&5
9536 ac_status=$?
9537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9538 (exit $ac_status); }; }; then
9539 ac_header_compiler=yes
9540else
9541 echo "$as_me: failed program was:" >&5
9542cat conftest.$ac_ext >&5
9543ac_header_compiler=no
9544fi
9545rm -f conftest.$ac_objext conftest.$ac_ext
9546echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9547echo "${ECHO_T}$ac_header_compiler" >&6
9548
9549# Is the header present?
9550echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9551echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9552cat >conftest.$ac_ext <<_ACEOF
9553#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009554#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009555#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009556_ACEOF
9557if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9558 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9559 ac_status=$?
9560 egrep -v '^ *\+' conftest.er1 >conftest.err
9561 rm -f conftest.er1
9562 cat conftest.err >&5
9563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9564 (exit $ac_status); } >/dev/null; then
9565 if test -s conftest.err; then
9566 ac_cpp_err=$ac_c_preproc_warn_flag
9567 else
9568 ac_cpp_err=
9569 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009570else
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 ac_cpp_err=yes
9572fi
9573if test -z "$ac_cpp_err"; then
9574 ac_header_preproc=yes
9575else
9576 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009577 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009579fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009580rm -f conftest.err conftest.$ac_ext
9581echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9582echo "${ECHO_T}$ac_header_preproc" >&6
9583
9584# So? What about this header?
9585case $ac_header_compiler:$ac_header_preproc in
9586 yes:no )
9587 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9588echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9589 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9590echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9591 no:yes )
9592 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9593echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9594 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9595echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9596 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9597echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9598esac
9599echo "$as_me:$LINENO: checking for cthreads.h" >&5
9600echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9601if test "${ac_cv_header_cthreads_h+set}" = set; then
9602 echo $ECHO_N "(cached) $ECHO_C" >&6
9603else
9604 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009605fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009606echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9607echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9608
9609fi
9610if test $ac_cv_header_cthreads_h = yes; then
9611 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009612#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009613_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009614
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009616#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009617_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009618
Martin v. Löwis11437992002-04-12 09:54:03 +00009619
9620cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009621#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009622_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009623
9624 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009625 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009626else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009627
Martin v. Löwis11437992002-04-12 09:54:03 +00009628 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9629 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9630echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9631if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9632 echo $ECHO_N "(cached) $ECHO_C" >&6
9633fi
9634echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9635echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009636else
Martin v. Löwis11437992002-04-12 09:54:03 +00009637 # Is the header compilable?
9638echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9639echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9640cat >conftest.$ac_ext <<_ACEOF
9641#line $LINENO "configure"
9642#include "confdefs.h"
9643$ac_includes_default
9644#include <mach/cthreads.h>
9645_ACEOF
9646rm -f conftest.$ac_objext
9647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9648 (eval $ac_compile) 2>&5
9649 ac_status=$?
9650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651 (exit $ac_status); } &&
9652 { ac_try='test -s conftest.$ac_objext'
9653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9654 (eval $ac_try) 2>&5
9655 ac_status=$?
9656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9657 (exit $ac_status); }; }; then
9658 ac_header_compiler=yes
9659else
9660 echo "$as_me: failed program was:" >&5
9661cat conftest.$ac_ext >&5
9662ac_header_compiler=no
9663fi
9664rm -f conftest.$ac_objext conftest.$ac_ext
9665echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9666echo "${ECHO_T}$ac_header_compiler" >&6
9667
9668# Is the header present?
9669echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9670echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9671cat >conftest.$ac_ext <<_ACEOF
9672#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009673#include "confdefs.h"
9674#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009675_ACEOF
9676if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9677 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9678 ac_status=$?
9679 egrep -v '^ *\+' conftest.er1 >conftest.err
9680 rm -f conftest.er1
9681 cat conftest.err >&5
9682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9683 (exit $ac_status); } >/dev/null; then
9684 if test -s conftest.err; then
9685 ac_cpp_err=$ac_c_preproc_warn_flag
9686 else
9687 ac_cpp_err=
9688 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009689else
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 ac_cpp_err=yes
9691fi
9692if test -z "$ac_cpp_err"; then
9693 ac_header_preproc=yes
9694else
9695 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009696 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009697 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009698fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009699rm -f conftest.err conftest.$ac_ext
9700echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9701echo "${ECHO_T}$ac_header_preproc" >&6
9702
9703# So? What about this header?
9704case $ac_header_compiler:$ac_header_preproc in
9705 yes:no )
9706 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9707echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9708 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9709echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9710 no:yes )
9711 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9712echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9713 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9714echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9715 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9716echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9717esac
9718echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9719echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9720if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9721 echo $ECHO_N "(cached) $ECHO_C" >&6
9722else
9723 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009724fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009725echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9726echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9727
9728fi
9729if test $ac_cv_header_mach_cthreads_h = yes; then
9730 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009731#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009732_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009733
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009735#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009736_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009737
Martin v. Löwis11437992002-04-12 09:54:03 +00009738
9739cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009740#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009741_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009742
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009743 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009744else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009745
Martin v. Löwis11437992002-04-12 09:54:03 +00009746 echo "$as_me:$LINENO: checking for --with-pth" >&5
9747echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9748
9749# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009750if test "${with_pth+set}" = set; then
9751 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009752
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 echo "$as_me:$LINENO: result: $withval" >&5
9754echo "${ECHO_T}$withval" >&6
9755 cat >>confdefs.h <<\_ACEOF
9756#define WITH_THREAD 1
9757_ACEOF
9758
9759
9760cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009761#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009762_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009763
Martin v. Löwis130fb172001-07-19 11:00:41 +00009764 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009765 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009766else
Martin v. Löwis11437992002-04-12 09:54:03 +00009767
9768 echo "$as_me:$LINENO: result: no" >&5
9769echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009770
9771 # Just looking for pthread_create in libpthread is not enough:
9772 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9773 # So we really have to include pthread.h, and then link.
9774 _libs=$LIBS
9775 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9777echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9778 cat >conftest.$ac_ext <<_ACEOF
9779#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009780#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009781#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009782
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009783void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009784#ifdef F77_DUMMY_MAIN
9785# ifdef __cplusplus
9786 extern "C"
9787# endif
9788 int F77_DUMMY_MAIN() { return 1; }
9789#endif
9790int
9791main ()
9792{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009793
9794pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 ;
9796 return 0;
9797}
9798_ACEOF
9799rm -f conftest.$ac_objext conftest$ac_exeext
9800if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9801 (eval $ac_link) 2>&5
9802 ac_status=$?
9803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9804 (exit $ac_status); } &&
9805 { ac_try='test -s conftest$ac_exeext'
9806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9807 (eval $ac_try) 2>&5
9808 ac_status=$?
9809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9810 (exit $ac_status); }; }; then
9811
9812 echo "$as_me:$LINENO: result: yes" >&5
9813echo "${ECHO_T}yes" >&6
9814 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009815#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009816_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009817
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009818 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009819 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009820else
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 echo "$as_me: failed program was:" >&5
9822cat conftest.$ac_ext >&5
9823
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009824 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9826echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9827if test "${ac_cv_func_pthread_detach+set}" = set; then
9828 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009829else
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 cat >conftest.$ac_ext <<_ACEOF
9831#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009832#include "confdefs.h"
9833/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009835#include <assert.h>
9836/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837#ifdef __cplusplus
9838extern "C"
9839#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009840/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 builtin and then its argument prototype would still apply. */
9842char pthread_detach ();
9843char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009844
Martin v. Löwis11437992002-04-12 09:54:03 +00009845#ifdef F77_DUMMY_MAIN
9846# ifdef __cplusplus
9847 extern "C"
9848# endif
9849 int F77_DUMMY_MAIN() { return 1; }
9850#endif
9851int
9852main ()
9853{
Guido van Rossumad678af1998-10-02 14:42:15 +00009854/* The GNU C library defines this for functions which it implements
9855 to always fail with ENOSYS. Some functions are actually named
9856 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009857#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009858choke me
9859#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009860f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009861#endif
9862
Martin v. Löwis11437992002-04-12 09:54:03 +00009863 ;
9864 return 0;
9865}
9866_ACEOF
9867rm -f conftest.$ac_objext conftest$ac_exeext
9868if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9869 (eval $ac_link) 2>&5
9870 ac_status=$?
9871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9872 (exit $ac_status); } &&
9873 { ac_try='test -s conftest$ac_exeext'
9874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9875 (eval $ac_try) 2>&5
9876 ac_status=$?
9877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9878 (exit $ac_status); }; }; then
9879 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009880else
Martin v. Löwis11437992002-04-12 09:54:03 +00009881 echo "$as_me: failed program was:" >&5
9882cat conftest.$ac_ext >&5
9883ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009884fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009885rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009886fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009887echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9888echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9889if test $ac_cv_func_pthread_detach = yes; then
9890 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009891#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009892_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009893
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009894 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009895 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009896else
Guido van Rossumad678af1998-10-02 14:42:15 +00009897
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009898 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9899 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9900echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9901if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9902 echo $ECHO_N "(cached) $ECHO_C" >&6
9903fi
9904echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9905echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9906else
9907 # Is the header compilable?
9908echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
9909echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
9910cat >conftest.$ac_ext <<_ACEOF
9911#line $LINENO "configure"
9912#include "confdefs.h"
9913$ac_includes_default
9914#include <atheos/threads.h>
9915_ACEOF
9916rm -f conftest.$ac_objext
9917if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9918 (eval $ac_compile) 2>&5
9919 ac_status=$?
9920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9921 (exit $ac_status); } &&
9922 { ac_try='test -s conftest.$ac_objext'
9923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9924 (eval $ac_try) 2>&5
9925 ac_status=$?
9926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9927 (exit $ac_status); }; }; then
9928 ac_header_compiler=yes
9929else
9930 echo "$as_me: failed program was:" >&5
9931cat conftest.$ac_ext >&5
9932ac_header_compiler=no
9933fi
9934rm -f conftest.$ac_objext conftest.$ac_ext
9935echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9936echo "${ECHO_T}$ac_header_compiler" >&6
9937
9938# Is the header present?
9939echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
9940echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
9941cat >conftest.$ac_ext <<_ACEOF
9942#line $LINENO "configure"
9943#include "confdefs.h"
9944#include <atheos/threads.h>
9945_ACEOF
9946if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9947 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9948 ac_status=$?
9949 egrep -v '^ *\+' conftest.er1 >conftest.err
9950 rm -f conftest.er1
9951 cat conftest.err >&5
9952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9953 (exit $ac_status); } >/dev/null; then
9954 if test -s conftest.err; then
9955 ac_cpp_err=$ac_c_preproc_warn_flag
9956 else
9957 ac_cpp_err=
9958 fi
9959else
9960 ac_cpp_err=yes
9961fi
9962if test -z "$ac_cpp_err"; then
9963 ac_header_preproc=yes
9964else
9965 echo "$as_me: failed program was:" >&5
9966 cat conftest.$ac_ext >&5
9967 ac_header_preproc=no
9968fi
9969rm -f conftest.err conftest.$ac_ext
9970echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9971echo "${ECHO_T}$ac_header_preproc" >&6
9972
9973# So? What about this header?
9974case $ac_header_compiler:$ac_header_preproc in
9975 yes:no )
9976 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9977echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9978 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9979echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9980 no:yes )
9981 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
9982echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
9983 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
9984echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
9985 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9986echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9987esac
9988echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9989echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9990if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9991 echo $ECHO_N "(cached) $ECHO_C" >&6
9992else
9993 ac_cv_header_atheos_threads_h=$ac_header_preproc
9994fi
9995echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9996echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9997
9998fi
9999if test $ac_cv_header_atheos_threads_h = yes; then
10000 cat >>confdefs.h <<\_ACEOF
10001#define WITH_THREAD 1
10002_ACEOF
10003
10004
10005cat >>confdefs.h <<\_ACEOF
10006#define ATHEOS_THREADS 1
10007_ACEOF
10008
10009 THREADOBJ="Python/thread.o"
10010else
10011
Martin v. Löwis11437992002-04-12 09:54:03 +000010012 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10013 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10014echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10015if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10016 echo $ECHO_N "(cached) $ECHO_C" >&6
10017fi
10018echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10019echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010020else
Martin v. Löwis11437992002-04-12 09:54:03 +000010021 # Is the header compilable?
10022echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10023echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10024cat >conftest.$ac_ext <<_ACEOF
10025#line $LINENO "configure"
10026#include "confdefs.h"
10027$ac_includes_default
10028#include <kernel/OS.h>
10029_ACEOF
10030rm -f conftest.$ac_objext
10031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10032 (eval $ac_compile) 2>&5
10033 ac_status=$?
10034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10035 (exit $ac_status); } &&
10036 { ac_try='test -s conftest.$ac_objext'
10037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10038 (eval $ac_try) 2>&5
10039 ac_status=$?
10040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10041 (exit $ac_status); }; }; then
10042 ac_header_compiler=yes
10043else
10044 echo "$as_me: failed program was:" >&5
10045cat conftest.$ac_ext >&5
10046ac_header_compiler=no
10047fi
10048rm -f conftest.$ac_objext conftest.$ac_ext
10049echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10050echo "${ECHO_T}$ac_header_compiler" >&6
10051
10052# Is the header present?
10053echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10054echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10055cat >conftest.$ac_ext <<_ACEOF
10056#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010057#include "confdefs.h"
10058#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010059_ACEOF
10060if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10061 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10062 ac_status=$?
10063 egrep -v '^ *\+' conftest.er1 >conftest.err
10064 rm -f conftest.er1
10065 cat conftest.err >&5
10066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10067 (exit $ac_status); } >/dev/null; then
10068 if test -s conftest.err; then
10069 ac_cpp_err=$ac_c_preproc_warn_flag
10070 else
10071 ac_cpp_err=
10072 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010073else
Martin v. Löwis11437992002-04-12 09:54:03 +000010074 ac_cpp_err=yes
10075fi
10076if test -z "$ac_cpp_err"; then
10077 ac_header_preproc=yes
10078else
10079 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010080 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010083rm -f conftest.err conftest.$ac_ext
10084echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10085echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010086
Martin v. Löwis11437992002-04-12 09:54:03 +000010087# So? What about this header?
10088case $ac_header_compiler:$ac_header_preproc in
10089 yes:no )
10090 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10091echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10092 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10093echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10094 no:yes )
10095 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10096echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10097 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10098echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10099 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10100echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10101esac
10102echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10103echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10104if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10105 echo $ECHO_N "(cached) $ECHO_C" >&6
10106else
10107 ac_cv_header_kernel_OS_h=$ac_header_preproc
10108fi
10109echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10110echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10111
10112fi
10113if test $ac_cv_header_kernel_OS_h = yes; then
10114 cat >>confdefs.h <<\_ACEOF
10115#define WITH_THREAD 1
10116_ACEOF
10117
10118
10119cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010120#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010121_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010122
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010123 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010124else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010125
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10127echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10128if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10129 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010130else
Martin v. Löwis11437992002-04-12 09:54:03 +000010131 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010132LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010133cat >conftest.$ac_ext <<_ACEOF
10134#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010135#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010136
Greg Steinadf63d62000-07-05 10:38:09 +000010137/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010138#ifdef __cplusplus
10139extern "C"
10140#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010141/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010142 builtin and then its argument prototype would still apply. */
10143char pthread_create ();
10144#ifdef F77_DUMMY_MAIN
10145# ifdef __cplusplus
10146 extern "C"
10147# endif
10148 int F77_DUMMY_MAIN() { return 1; }
10149#endif
10150int
10151main ()
10152{
10153pthread_create ();
10154 ;
10155 return 0;
10156}
10157_ACEOF
10158rm -f conftest.$ac_objext conftest$ac_exeext
10159if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10160 (eval $ac_link) 2>&5
10161 ac_status=$?
10162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10163 (exit $ac_status); } &&
10164 { ac_try='test -s conftest$ac_exeext'
10165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10166 (eval $ac_try) 2>&5
10167 ac_status=$?
10168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10169 (exit $ac_status); }; }; then
10170 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010171else
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 echo "$as_me: failed program was:" >&5
10173cat conftest.$ac_ext >&5
10174ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010176rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10177LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010178fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010179echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10180echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10181if test $ac_cv_lib_pthreads_pthread_create = yes; then
10182 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010183#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010184_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010185
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010186 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010187 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010188 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010189else
Greg Steinadf63d62000-07-05 10:38:09 +000010190
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10192echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10193if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10194 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010195else
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010197LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010198cat >conftest.$ac_ext <<_ACEOF
10199#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010200#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010201
Guido van Rossum49545951997-12-02 19:28:29 +000010202/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010203#ifdef __cplusplus
10204extern "C"
10205#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010206/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010207 builtin and then its argument prototype would still apply. */
10208char pthread_create ();
10209#ifdef F77_DUMMY_MAIN
10210# ifdef __cplusplus
10211 extern "C"
10212# endif
10213 int F77_DUMMY_MAIN() { return 1; }
10214#endif
10215int
10216main ()
10217{
10218pthread_create ();
10219 ;
10220 return 0;
10221}
10222_ACEOF
10223rm -f conftest.$ac_objext conftest$ac_exeext
10224if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10225 (eval $ac_link) 2>&5
10226 ac_status=$?
10227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10228 (exit $ac_status); } &&
10229 { ac_try='test -s conftest$ac_exeext'
10230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10231 (eval $ac_try) 2>&5
10232 ac_status=$?
10233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10234 (exit $ac_status); }; }; then
10235 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010236else
Martin v. Löwis11437992002-04-12 09:54:03 +000010237 echo "$as_me: failed program was:" >&5
10238cat conftest.$ac_ext >&5
10239ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010240fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010241rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10242LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010243fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010244echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10245echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10246if test $ac_cv_lib_c_r_pthread_create = yes; then
10247 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010248#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010249_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010250
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010251 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010252 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010253 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010254else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010255
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10257echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10258if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10259 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010260else
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010262LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010263cat >conftest.$ac_ext <<_ACEOF
10264#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010265#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010266
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010267/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010268#ifdef __cplusplus
10269extern "C"
10270#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010271/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 builtin and then its argument prototype would still apply. */
10273char __d6_pthread_create ();
10274#ifdef F77_DUMMY_MAIN
10275# ifdef __cplusplus
10276 extern "C"
10277# endif
10278 int F77_DUMMY_MAIN() { return 1; }
10279#endif
10280int
10281main ()
10282{
10283__d6_pthread_create ();
10284 ;
10285 return 0;
10286}
10287_ACEOF
10288rm -f conftest.$ac_objext conftest$ac_exeext
10289if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10290 (eval $ac_link) 2>&5
10291 ac_status=$?
10292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10293 (exit $ac_status); } &&
10294 { ac_try='test -s conftest$ac_exeext'
10295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10296 (eval $ac_try) 2>&5
10297 ac_status=$?
10298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10299 (exit $ac_status); }; }; then
10300 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010301else
Martin v. Löwis11437992002-04-12 09:54:03 +000010302 echo "$as_me: failed program was:" >&5
10303cat conftest.$ac_ext >&5
10304ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010305fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010306rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10307LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010308fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010309echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10310echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10311if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10312 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010313#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010314_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010315
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010316 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010317 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010318 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010319else
Guido van Rossum49545951997-12-02 19:28:29 +000010320
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10322echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10323if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10324 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010325else
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010327LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010328cat >conftest.$ac_ext <<_ACEOF
10329#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010330#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010331
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010332/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010333#ifdef __cplusplus
10334extern "C"
10335#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010336/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010337 builtin and then its argument prototype would still apply. */
10338char __pthread_create_system ();
10339#ifdef F77_DUMMY_MAIN
10340# ifdef __cplusplus
10341 extern "C"
10342# endif
10343 int F77_DUMMY_MAIN() { return 1; }
10344#endif
10345int
10346main ()
10347{
10348__pthread_create_system ();
10349 ;
10350 return 0;
10351}
10352_ACEOF
10353rm -f conftest.$ac_objext conftest$ac_exeext
10354if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10355 (eval $ac_link) 2>&5
10356 ac_status=$?
10357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10358 (exit $ac_status); } &&
10359 { ac_try='test -s conftest$ac_exeext'
10360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10361 (eval $ac_try) 2>&5
10362 ac_status=$?
10363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10364 (exit $ac_status); }; }; then
10365 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010366else
Martin v. Löwis11437992002-04-12 09:54:03 +000010367 echo "$as_me: failed program was:" >&5
10368cat conftest.$ac_ext >&5
10369ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010370fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010371rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10372LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010373fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010374echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10375echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10376if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10377 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010378#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010379_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010380
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010381 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010382 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010383 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010384else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010385
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10387echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10388if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10389 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010390else
Martin v. Löwis11437992002-04-12 09:54:03 +000010391 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010392LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010393cat >conftest.$ac_ext <<_ACEOF
10394#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010395#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010396
Guido van Rossumb93a8621998-05-07 13:27:32 +000010397/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010398#ifdef __cplusplus
10399extern "C"
10400#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010401/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010402 builtin and then its argument prototype would still apply. */
10403char pthread_create ();
10404#ifdef F77_DUMMY_MAIN
10405# ifdef __cplusplus
10406 extern "C"
10407# endif
10408 int F77_DUMMY_MAIN() { return 1; }
10409#endif
10410int
10411main ()
10412{
10413pthread_create ();
10414 ;
10415 return 0;
10416}
10417_ACEOF
10418rm -f conftest.$ac_objext conftest$ac_exeext
10419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10420 (eval $ac_link) 2>&5
10421 ac_status=$?
10422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10423 (exit $ac_status); } &&
10424 { ac_try='test -s conftest$ac_exeext'
10425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10426 (eval $ac_try) 2>&5
10427 ac_status=$?
10428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10429 (exit $ac_status); }; }; then
10430 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010431else
Martin v. Löwis11437992002-04-12 09:54:03 +000010432 echo "$as_me: failed program was:" >&5
10433cat conftest.$ac_ext >&5
10434ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010435fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010436rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10437LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010438fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010439echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10440echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10441if test $ac_cv_lib_cma_pthread_create = yes; then
10442 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010443#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010444_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010445
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010446 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010447 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010448 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010449else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010450
Martin v. Löwis130fb172001-07-19 11:00:41 +000010451 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010452fi
10453
Guido van Rossum627b2d71993-12-24 10:39:16 +000010454
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010455fi
10456
Guido van Rossum0be3e491997-05-22 20:33:33 +000010457fi
10458
Guido van Rossum49545951997-12-02 19:28:29 +000010459fi
10460
Guido van Rossumb93a8621998-05-07 13:27:32 +000010461fi
10462
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010463fi
10464
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010465
Michael W. Hudson54241132001-12-07 15:38:26 +000010466fi
10467
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010468
10469fi
10470
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010472rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10473fi;
10474fi
10475
10476
10477fi
10478
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010479
Michael W. Hudson54241132001-12-07 15:38:26 +000010480
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010481 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010482 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010483
10484cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010485#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010486_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010487
10488 fi
10489
Martin v. Löwis11437992002-04-12 09:54:03 +000010490 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10491echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10492 if test "${ac_cv_pthread_system_supported+set}" = set; then
10493 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010494else
10495 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010496 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010497else
Martin v. Löwis11437992002-04-12 09:54:03 +000010498 cat >conftest.$ac_ext <<_ACEOF
10499#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010500#include "confdefs.h"
10501#include <pthread.h>
10502 void *foo(void *parm) {
10503 return NULL;
10504 }
10505 main() {
10506 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010507 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010508 if (pthread_attr_init(&attr)) exit(-1);
10509 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010510 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010511 exit(0);
10512 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010513_ACEOF
10514rm -f conftest$ac_exeext
10515if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10516 (eval $ac_link) 2>&5
10517 ac_status=$?
10518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10519 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10521 (eval $ac_try) 2>&5
10522 ac_status=$?
10523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10524 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010525 ac_cv_pthread_system_supported=yes
10526else
Martin v. Löwis11437992002-04-12 09:54:03 +000010527 echo "$as_me: program exited with status $ac_status" >&5
10528echo "$as_me: failed program was:" >&5
10529cat conftest.$ac_ext >&5
10530( exit $ac_status )
10531ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010532fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010533rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010534fi
10535
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010536fi
10537
Martin v. Löwis11437992002-04-12 09:54:03 +000010538 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10539echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010540 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010541
10542cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010543#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010544_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010545
10546 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010547
10548for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010549do
Martin v. Löwis11437992002-04-12 09:54:03 +000010550as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10551echo "$as_me:$LINENO: checking for $ac_func" >&5
10552echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10553if eval "test \"\${$as_ac_var+set}\" = set"; then
10554 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010555else
Martin v. Löwis11437992002-04-12 09:54:03 +000010556 cat >conftest.$ac_ext <<_ACEOF
10557#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010558#include "confdefs.h"
10559/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010560 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010561#include <assert.h>
10562/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010563#ifdef __cplusplus
10564extern "C"
10565#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010566/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010567 builtin and then its argument prototype would still apply. */
10568char $ac_func ();
10569char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010570
Martin v. Löwis11437992002-04-12 09:54:03 +000010571#ifdef F77_DUMMY_MAIN
10572# ifdef __cplusplus
10573 extern "C"
10574# endif
10575 int F77_DUMMY_MAIN() { return 1; }
10576#endif
10577int
10578main ()
10579{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010580/* The GNU C library defines this for functions which it implements
10581 to always fail with ENOSYS. Some functions are actually named
10582 something starting with __ and the normal name is an alias. */
10583#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10584choke me
10585#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010586f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010587#endif
10588
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 ;
10590 return 0;
10591}
10592_ACEOF
10593rm -f conftest.$ac_objext conftest$ac_exeext
10594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10595 (eval $ac_link) 2>&5
10596 ac_status=$?
10597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10598 (exit $ac_status); } &&
10599 { ac_try='test -s conftest$ac_exeext'
10600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10601 (eval $ac_try) 2>&5
10602 ac_status=$?
10603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10604 (exit $ac_status); }; }; then
10605 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010606else
Martin v. Löwis11437992002-04-12 09:54:03 +000010607 echo "$as_me: failed program was:" >&5
10608cat conftest.$ac_ext >&5
10609eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010610fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010611rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010612fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010613echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10614echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10615if test `eval echo '${'$as_ac_var'}'` = yes; then
10616 cat >>confdefs.h <<_ACEOF
10617#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10618_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010619
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010620fi
10621done
10622
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010623 fi
10624
Martin v. Löwis11437992002-04-12 09:54:03 +000010625 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10626echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10627if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10628 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010629else
Martin v. Löwis11437992002-04-12 09:54:03 +000010630 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010631LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010632cat >conftest.$ac_ext <<_ACEOF
10633#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010634#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010635
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010636/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010637#ifdef __cplusplus
10638extern "C"
10639#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010640/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 builtin and then its argument prototype would still apply. */
10642char usconfig ();
10643#ifdef F77_DUMMY_MAIN
10644# ifdef __cplusplus
10645 extern "C"
10646# endif
10647 int F77_DUMMY_MAIN() { return 1; }
10648#endif
10649int
10650main ()
10651{
10652usconfig ();
10653 ;
10654 return 0;
10655}
10656_ACEOF
10657rm -f conftest.$ac_objext conftest$ac_exeext
10658if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10659 (eval $ac_link) 2>&5
10660 ac_status=$?
10661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10662 (exit $ac_status); } &&
10663 { ac_try='test -s conftest$ac_exeext'
10664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10665 (eval $ac_try) 2>&5
10666 ac_status=$?
10667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10668 (exit $ac_status); }; }; then
10669 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010670else
Martin v. Löwis11437992002-04-12 09:54:03 +000010671 echo "$as_me: failed program was:" >&5
10672cat conftest.$ac_ext >&5
10673ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010674fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010675rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10676LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010677fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010678echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10679echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10680if test $ac_cv_lib_mpc_usconfig = yes; then
10681 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010682#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010683_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010684
Martin v. Löwis130fb172001-07-19 11:00:41 +000010685 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010686 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010687 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010688fi
10689
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010690
Martin v. Löwis11437992002-04-12 09:54:03 +000010691 if test $posix_threads != "yes"; then
10692 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10693echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10694if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10695 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010696else
Martin v. Löwis11437992002-04-12 09:54:03 +000010697 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010698LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010699cat >conftest.$ac_ext <<_ACEOF
10700#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010701#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010702
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010703/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010704#ifdef __cplusplus
10705extern "C"
10706#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010707/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010708 builtin and then its argument prototype would still apply. */
10709char thr_create ();
10710#ifdef F77_DUMMY_MAIN
10711# ifdef __cplusplus
10712 extern "C"
10713# endif
10714 int F77_DUMMY_MAIN() { return 1; }
10715#endif
10716int
10717main ()
10718{
10719thr_create ();
10720 ;
10721 return 0;
10722}
10723_ACEOF
10724rm -f conftest.$ac_objext conftest$ac_exeext
10725if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10726 (eval $ac_link) 2>&5
10727 ac_status=$?
10728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10729 (exit $ac_status); } &&
10730 { ac_try='test -s conftest$ac_exeext'
10731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10732 (eval $ac_try) 2>&5
10733 ac_status=$?
10734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10735 (exit $ac_status); }; }; then
10736 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010737else
Martin v. Löwis11437992002-04-12 09:54:03 +000010738 echo "$as_me: failed program was:" >&5
10739cat conftest.$ac_ext >&5
10740ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010741fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010742rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10743LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010744fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010745echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10746echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10747if test $ac_cv_lib_thread_thr_create = yes; then
10748 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010749#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010750_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010751
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010752 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010753 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010754 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010755fi
10756
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010757 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010758
Martin v. Löwis130fb172001-07-19 11:00:41 +000010759 if test "$USE_THREAD_MODULE" != "#"
10760 then
10761 # If the above checks didn't disable threads, (at least) OSF1
10762 # needs this '-threads' argument during linking.
10763 case $ac_sys_system in
10764 OSF1) LDLAST=-threads;;
10765 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010766 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010767fi
10768
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010770
10771
10772echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10773echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774# Check whether --enable-ipv6 or --disable-ipv6 was given.
10775if test "${enable_ipv6+set}" = set; then
10776 enableval="$enable_ipv6"
10777 case "$enableval" in
10778 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010779 echo "$as_me:$LINENO: result: no" >&5
10780echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781 ipv6=no
10782 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010783 *) echo "$as_me:$LINENO: result: yes" >&5
10784echo "${ECHO_T}yes" >&6
10785 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010787_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788
10789 ipv6=yes
10790 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010791 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792else
Martin v. Löwis11437992002-04-12 09:54:03 +000010793
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010794 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010795 echo "$as_me:$LINENO: result: no" >&5
10796echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797 ipv6=no
10798
10799else
Martin v. Löwis11437992002-04-12 09:54:03 +000010800 cat >conftest.$ac_ext <<_ACEOF
10801#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802#include "confdefs.h"
10803 /* AF_INET6 available check */
10804#include <sys/types.h>
10805#include <sys/socket.h>
10806main()
10807{
10808 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10809 exit(1);
10810 else
10811 exit(0);
10812}
10813
Martin v. Löwis11437992002-04-12 09:54:03 +000010814_ACEOF
10815rm -f conftest$ac_exeext
10816if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10817 (eval $ac_link) 2>&5
10818 ac_status=$?
10819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10820 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10822 (eval $ac_try) 2>&5
10823 ac_status=$?
10824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10825 (exit $ac_status); }; }; then
10826 echo "$as_me:$LINENO: result: yes" >&5
10827echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828 ipv6=yes
10829else
Martin v. Löwis11437992002-04-12 09:54:03 +000010830 echo "$as_me: program exited with status $ac_status" >&5
10831echo "$as_me: failed program was:" >&5
10832cat conftest.$ac_ext >&5
10833( exit $ac_status )
10834echo "$as_me:$LINENO: result: no" >&5
10835echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836 ipv6=no
10837fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010838rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839fi
10840
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010841if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010842 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10843echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10844 cat >conftest.$ac_ext <<_ACEOF
10845#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010846#include "confdefs.h"
10847#include <sys/types.h>
10848#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010849#ifdef F77_DUMMY_MAIN
10850# ifdef __cplusplus
10851 extern "C"
10852# endif
10853 int F77_DUMMY_MAIN() { return 1; }
10854#endif
10855int
10856main ()
10857{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010858struct sockaddr_in6 x;
10859x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010860 ;
10861 return 0;
10862}
10863_ACEOF
10864rm -f conftest.$ac_objext
10865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10866 (eval $ac_compile) 2>&5
10867 ac_status=$?
10868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10869 (exit $ac_status); } &&
10870 { ac_try='test -s conftest.$ac_objext'
10871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10872 (eval $ac_try) 2>&5
10873 ac_status=$?
10874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10875 (exit $ac_status); }; }; then
10876 echo "$as_me:$LINENO: result: yes" >&5
10877echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010878 ipv6=yes
10879else
Martin v. Löwis11437992002-04-12 09:54:03 +000010880 echo "$as_me: failed program was:" >&5
10881cat conftest.$ac_ext >&5
10882echo "$as_me:$LINENO: result: no" >&5
10883echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010884 ipv6=no
10885fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010886rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010887fi
10888
10889if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010890 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010891#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010892_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010893
10894fi
10895
Martin v. Löwis11437992002-04-12 09:54:03 +000010896fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010897
10898ipv6type=unknown
10899ipv6lib=none
10900ipv6trylibc=no
10901
10902if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010903 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10904echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010905 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10906 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010907 case $i in
10908 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 cat >conftest.$ac_ext <<_ACEOF
10910#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010912
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913#include <netinet/in.h>
10914#ifdef IPV6_INRIA_VERSION
10915yes
10916#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010917_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010918if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10919 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010920 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010921fi
10922rm -f conftest*
10923
10924 ;;
10925 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010926 cat >conftest.$ac_ext <<_ACEOF
10927#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010929
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010930#include <netinet/in.h>
10931#ifdef __KAME__
10932yes
10933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010934_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10936 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010937 ipv6type=$i;
10938 ipv6lib=inet6
10939 ipv6libdir=/usr/local/v6/lib
10940 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010941fi
10942rm -f conftest*
10943
10944 ;;
10945 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010946 cat >conftest.$ac_ext <<_ACEOF
10947#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010948#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010949
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950#include <features.h>
10951#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10952yes
10953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010954_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10956 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010957 ipv6type=$i;
10958 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010959fi
10960rm -f conftest*
10961
10962 ;;
10963 linux-inet6)
10964 if test -d /usr/inet6; then
10965 ipv6type=$i
10966 ipv6lib=inet6
10967 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010968 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010969 fi
10970 ;;
10971 solaris)
10972 if test -f /etc/netconfig; then
10973 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10974 ipv6type=$i
10975 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010976 fi
10977 fi
10978 ;;
10979 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010980 cat >conftest.$ac_ext <<_ACEOF
10981#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010982#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010983
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010984#include <sys/param.h>
10985#ifdef _TOSHIBA_INET6
10986yes
10987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010988_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10990 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010991 ipv6type=$i;
10992 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010993 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010994fi
10995rm -f conftest*
10996
10997 ;;
10998 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010999 cat >conftest.$ac_ext <<_ACEOF
11000#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011001#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011002
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011003#include </usr/local/v6/include/sys/v6config.h>
11004#ifdef __V6D__
11005yes
11006#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011007_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11009 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011010 ipv6type=$i;
11011 ipv6lib=v6;
11012 ipv6libdir=/usr/local/v6/lib;
11013 OPT="-I/usr/local/v6/include $OPT"
11014fi
11015rm -f conftest*
11016
11017 ;;
11018 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011019 cat >conftest.$ac_ext <<_ACEOF
11020#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011021#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011022
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011023#include <sys/param.h>
11024#ifdef _ZETA_MINAMI_INET6
11025yes
11026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011027_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11029 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011030 ipv6type=$i;
11031 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011032 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011033fi
11034rm -f conftest*
11035
11036 ;;
11037 esac
11038 if test "$ipv6type" != "unknown"; then
11039 break
11040 fi
11041 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011042 echo "$as_me:$LINENO: result: $ipv6type" >&5
11043echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011044fi
11045
11046if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11047 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11048 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11049 echo "using lib$ipv6lib"
11050 else
11051 if test $ipv6trylibc = "yes"; then
11052 echo "using libc"
11053 else
11054 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11055 echo "You need to fetch lib$ipv6lib.a from appropriate"
11056 echo 'ipv6 kit and compile beforehand.'
11057 exit 1
11058 fi
11059 fi
11060fi
11061
Jack Jansen7b8c7542002-04-14 20:12:41 +000011062# Check for universal newline support
11063echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
11064echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
11065
11066# Check whether --with-universal-newlines or --without-universal-newlines was given.
11067if test "${with_universal_newlines+set}" = set; then
11068 withval="$with_universal_newlines"
11069
11070fi;
11071
11072if test -z "$with_universal_newlines"
11073then with_universal_newlines="yes"
11074fi
11075if test "$with_universal_newlines" != "no"
11076then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011077
11078cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011079#define WITH_UNIVERSAL_NEWLINES 1
11080_ACEOF
11081
11082fi
11083echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11084echo "${ECHO_T}$with_universal_newlines" >&6
11085
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011086# Check for --with-doc-strings
11087echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11088echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11089
11090# Check whether --with-doc-strings or --without-doc-strings was given.
11091if test "${with_doc_strings+set}" = set; then
11092 withval="$with_doc_strings"
11093
11094fi;
11095
11096if test -z "$with_doc_strings"
11097then with_doc_strings="yes"
11098fi
11099if test "$with_doc_strings" != "no"
11100then
11101
11102cat >>confdefs.h <<\_ACEOF
11103#define WITH_DOC_STRINGS 1
11104_ACEOF
11105
11106fi
11107echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11108echo "${ECHO_T}$with_doc_strings" >&6
11109
Neil Schemenauera35c6882001-02-27 04:45:05 +000011110# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011111echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11112echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11113
Neil Schemenauera35c6882001-02-27 04:45:05 +000011114# Check whether --with-pymalloc or --without-pymalloc was given.
11115if test "${with_pymalloc+set}" = set; then
11116 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011117
Martin v. Löwis11437992002-04-12 09:54:03 +000011118fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011119
Neil Schemenauer16c22972002-03-22 15:34:49 +000011120if test -z "$with_pymalloc"
11121then with_pymalloc="yes"
11122fi
11123if test "$with_pymalloc" != "no"
11124then
Martin v. Löwis11437992002-04-12 09:54:03 +000011125
11126cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011127#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011128_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011129
11130fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011131echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11132echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011133
Barry Warsawef82cd72000-06-30 16:21:01 +000011134# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011135echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11136echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11137
Barry Warsawef82cd72000-06-30 16:21:01 +000011138# Check whether --with-wctype-functions or --without-wctype-functions was given.
11139if test "${with_wctype_functions+set}" = set; then
11140 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011141
Barry Warsawef82cd72000-06-30 16:21:01 +000011142if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011143then
11144
11145cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011146#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011147_ACEOF
11148
11149 echo "$as_me:$LINENO: result: yes" >&5
11150echo "${ECHO_T}yes" >&6
11151else echo "$as_me:$LINENO: result: no" >&5
11152echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011153fi
11154else
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 echo "$as_me:$LINENO: result: no" >&5
11156echo "${ECHO_T}no" >&6
11157fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011158
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011159# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011160
Guido van Rossum98935bf2001-09-05 19:13:16 +000011161DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011162
Martin v. Löwis11437992002-04-12 09:54:03 +000011163echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11164echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11165
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011166# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011167if test "${with_sgi_dl+set}" = set; then
11168 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011169
11170echo "$as_me:$LINENO: result: $withval" >&5
11171echo "${ECHO_T}$withval" >&6
11172
11173cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011174#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011175_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011176
Guido van Rossume97ee181999-12-20 21:27:22 +000011177DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011178dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011179if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011180then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011181else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11182echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11183 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011184fi
11185DLINCLDIR=${dldir}
11186LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011187else
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 echo "$as_me:$LINENO: result: no" >&5
11189echo "${ECHO_T}no" >&6
11190fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011191
Martin v. Löwis11437992002-04-12 09:54:03 +000011192echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11193echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011194
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011195# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011196if test "${with_dl_dld+set}" = set; then
11197 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011198
11199echo "$as_me:$LINENO: result: $withval" >&5
11200echo "${ECHO_T}$withval" >&6
11201
11202cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011203#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011204_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011205
Guido van Rossume97ee181999-12-20 21:27:22 +000011206DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011207dldir=`echo "$withval" | sed 's/,.*//'`
11208dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011209if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011210then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011211else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11212echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11213 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011214fi
11215DLINCLDIR=${dldir}
11216LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011217else
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 echo "$as_me:$LINENO: result: no" >&5
11219echo "${ECHO_T}no" >&6
11220fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011221
Guido van Rossume97ee181999-12-20 21:27:22 +000011222# the dlopen() function means we might want to use dynload_shlib.o. some
11223# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011224
Thomas Wouters3a584202000-08-05 23:28:51 +000011225for ac_func in dlopen
11226do
Martin v. Löwis11437992002-04-12 09:54:03 +000011227as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11228echo "$as_me:$LINENO: checking for $ac_func" >&5
11229echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11230if eval "test \"\${$as_ac_var+set}\" = set"; then
11231 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011232else
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 cat >conftest.$ac_ext <<_ACEOF
11234#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011235#include "confdefs.h"
11236/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011238#include <assert.h>
11239/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011240#ifdef __cplusplus
11241extern "C"
11242#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011243/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011244 builtin and then its argument prototype would still apply. */
11245char $ac_func ();
11246char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011247
Martin v. Löwis11437992002-04-12 09:54:03 +000011248#ifdef F77_DUMMY_MAIN
11249# ifdef __cplusplus
11250 extern "C"
11251# endif
11252 int F77_DUMMY_MAIN() { return 1; }
11253#endif
11254int
11255main ()
11256{
Guido van Rossume97ee181999-12-20 21:27:22 +000011257/* The GNU C library defines this for functions which it implements
11258 to always fail with ENOSYS. Some functions are actually named
11259 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011260#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011261choke me
11262#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011263f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011264#endif
11265
Martin v. Löwis11437992002-04-12 09:54:03 +000011266 ;
11267 return 0;
11268}
11269_ACEOF
11270rm -f conftest.$ac_objext conftest$ac_exeext
11271if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11272 (eval $ac_link) 2>&5
11273 ac_status=$?
11274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11275 (exit $ac_status); } &&
11276 { ac_try='test -s conftest$ac_exeext'
11277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11278 (eval $ac_try) 2>&5
11279 ac_status=$?
11280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11281 (exit $ac_status); }; }; then
11282 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011283else
Martin v. Löwis11437992002-04-12 09:54:03 +000011284 echo "$as_me: failed program was:" >&5
11285cat conftest.$ac_ext >&5
11286eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011287fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011288rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011290echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11291echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11292if test `eval echo '${'$as_ac_var'}'` = yes; then
11293 cat >>confdefs.h <<_ACEOF
11294#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11295_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011296
Guido van Rossume97ee181999-12-20 21:27:22 +000011297fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011298done
Guido van Rossume97ee181999-12-20 21:27:22 +000011299
Michael W. Hudson54241132001-12-07 15:38:26 +000011300
Guido van Rossume97ee181999-12-20 21:27:22 +000011301# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11302# loading of modules.
11303
Martin v. Löwis11437992002-04-12 09:54:03 +000011304echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11305echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011306if test -z "$DYNLOADFILE"
11307then
11308 case $ac_sys_system/$ac_sys_release in
11309 AIX*) DYNLOADFILE="dynload_aix.o";;
11310 BeOS*) DYNLOADFILE="dynload_beos.o";;
11311 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011312 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011313 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011314 *)
11315 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11316 # out any dynamic loading
11317 if test "$ac_cv_func_dlopen" = yes
11318 then DYNLOADFILE="dynload_shlib.o"
11319 else DYNLOADFILE="dynload_stub.o"
11320 fi
11321 ;;
11322 esac
11323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011324echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11325echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011326if test "$DYNLOADFILE" != "dynload_stub.o"
11327then
Martin v. Löwis11437992002-04-12 09:54:03 +000011328
11329cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011330#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011331_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011332
11333fi
11334
Neil Schemenauer4e425612001-06-19 15:44:15 +000011335# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11336
Michael W. Hudson54241132001-12-07 15:38:26 +000011337
Martin v. Löwis11437992002-04-12 09:54:03 +000011338echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11339echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011340if test -z "$MACHDEP_OBJS"
11341then
Jack Jansene578a632001-08-15 01:27:14 +000011342 MACHDEP_OBJS=$extra_machdep_objs
11343else
11344 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011346echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11347echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011348
Guido van Rossum627b2d71993-12-24 10:39:16 +000011349# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011423
Fred Drake6b3cc522002-04-15 19:20:27 +000011424
Jack Jansen0b06be72002-06-21 14:48:38 +000011425
Martin v. Löwis244edc82001-10-04 22:44:26 +000011426for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011427 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011428 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011429 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011430 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011431 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011432 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011433 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011434 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011435 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011436 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011437do
Martin v. Löwis11437992002-04-12 09:54:03 +000011438as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11439echo "$as_me:$LINENO: checking for $ac_func" >&5
11440echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11441if eval "test \"\${$as_ac_var+set}\" = set"; then
11442 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011443else
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 cat >conftest.$ac_ext <<_ACEOF
11445#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011446#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011447/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011448 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011449#include <assert.h>
11450/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011451#ifdef __cplusplus
11452extern "C"
11453#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011454/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 builtin and then its argument prototype would still apply. */
11456char $ac_func ();
11457char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011458
Martin v. Löwis11437992002-04-12 09:54:03 +000011459#ifdef F77_DUMMY_MAIN
11460# ifdef __cplusplus
11461 extern "C"
11462# endif
11463 int F77_DUMMY_MAIN() { return 1; }
11464#endif
11465int
11466main ()
11467{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011468/* The GNU C library defines this for functions which it implements
11469 to always fail with ENOSYS. Some functions are actually named
11470 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011471#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011472choke me
11473#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011474f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011475#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011476
Martin v. Löwis11437992002-04-12 09:54:03 +000011477 ;
11478 return 0;
11479}
11480_ACEOF
11481rm -f conftest.$ac_objext conftest$ac_exeext
11482if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11483 (eval $ac_link) 2>&5
11484 ac_status=$?
11485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11486 (exit $ac_status); } &&
11487 { ac_try='test -s conftest$ac_exeext'
11488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11489 (eval $ac_try) 2>&5
11490 ac_status=$?
11491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11492 (exit $ac_status); }; }; then
11493 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011494else
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 echo "$as_me: failed program was:" >&5
11496cat conftest.$ac_ext >&5
11497eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011498fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011499rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011500fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011501echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11502echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11503if test `eval echo '${'$as_ac_var'}'` = yes; then
11504 cat >>confdefs.h <<_ACEOF
11505#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11506_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011507
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011508fi
11509done
11510
Michael W. Hudson54241132001-12-07 15:38:26 +000011511
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011512# check for openpty and forkpty
11513
Martin v. Löwis11437992002-04-12 09:54:03 +000011514
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011515for ac_func in openpty
11516do
Martin v. Löwis11437992002-04-12 09:54:03 +000011517as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11518echo "$as_me:$LINENO: checking for $ac_func" >&5
11519echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11520if eval "test \"\${$as_ac_var+set}\" = set"; then
11521 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011522else
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 cat >conftest.$ac_ext <<_ACEOF
11524#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011525#include "confdefs.h"
11526/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011527 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011528#include <assert.h>
11529/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011530#ifdef __cplusplus
11531extern "C"
11532#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011533/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011534 builtin and then its argument prototype would still apply. */
11535char $ac_func ();
11536char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011537
Martin v. Löwis11437992002-04-12 09:54:03 +000011538#ifdef F77_DUMMY_MAIN
11539# ifdef __cplusplus
11540 extern "C"
11541# endif
11542 int F77_DUMMY_MAIN() { return 1; }
11543#endif
11544int
11545main ()
11546{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011547/* The GNU C library defines this for functions which it implements
11548 to always fail with ENOSYS. Some functions are actually named
11549 something starting with __ and the normal name is an alias. */
11550#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11551choke me
11552#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011553f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011554#endif
11555
Martin v. Löwis11437992002-04-12 09:54:03 +000011556 ;
11557 return 0;
11558}
11559_ACEOF
11560rm -f conftest.$ac_objext conftest$ac_exeext
11561if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11562 (eval $ac_link) 2>&5
11563 ac_status=$?
11564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11565 (exit $ac_status); } &&
11566 { ac_try='test -s conftest$ac_exeext'
11567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11568 (eval $ac_try) 2>&5
11569 ac_status=$?
11570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11571 (exit $ac_status); }; }; then
11572 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011573else
Martin v. Löwis11437992002-04-12 09:54:03 +000011574 echo "$as_me: failed program was:" >&5
11575cat conftest.$ac_ext >&5
11576eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011577fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011578rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011579fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011580echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11581echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11582if test `eval echo '${'$as_ac_var'}'` = yes; then
11583 cat >>confdefs.h <<_ACEOF
11584#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11585_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011586
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011587else
Martin v. Löwis11437992002-04-12 09:54:03 +000011588 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11589echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11590if test "${ac_cv_lib_util_openpty+set}" = set; then
11591 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011592else
Martin v. Löwis11437992002-04-12 09:54:03 +000011593 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011594LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011595cat >conftest.$ac_ext <<_ACEOF
11596#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011597#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011598
Fred Drake8cef4cf2000-06-28 16:40:38 +000011599/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011600#ifdef __cplusplus
11601extern "C"
11602#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011603/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011604 builtin and then its argument prototype would still apply. */
11605char openpty ();
11606#ifdef F77_DUMMY_MAIN
11607# ifdef __cplusplus
11608 extern "C"
11609# endif
11610 int F77_DUMMY_MAIN() { return 1; }
11611#endif
11612int
11613main ()
11614{
11615openpty ();
11616 ;
11617 return 0;
11618}
11619_ACEOF
11620rm -f conftest.$ac_objext conftest$ac_exeext
11621if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11622 (eval $ac_link) 2>&5
11623 ac_status=$?
11624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11625 (exit $ac_status); } &&
11626 { ac_try='test -s conftest$ac_exeext'
11627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11628 (eval $ac_try) 2>&5
11629 ac_status=$?
11630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11631 (exit $ac_status); }; }; then
11632 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011633else
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 echo "$as_me: failed program was:" >&5
11635cat conftest.$ac_ext >&5
11636ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011637fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011638rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11639LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011640fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011641echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11642echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11643if test $ac_cv_lib_util_openpty = yes; then
11644 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011645#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011646_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011647 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011648fi
11649
11650fi
11651done
11652
Martin v. Löwis11437992002-04-12 09:54:03 +000011653
Fred Drake8cef4cf2000-06-28 16:40:38 +000011654for ac_func in forkpty
11655do
Martin v. Löwis11437992002-04-12 09:54:03 +000011656as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11657echo "$as_me:$LINENO: checking for $ac_func" >&5
11658echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11659if eval "test \"\${$as_ac_var+set}\" = set"; then
11660 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011661else
Martin v. Löwis11437992002-04-12 09:54:03 +000011662 cat >conftest.$ac_ext <<_ACEOF
11663#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011664#include "confdefs.h"
11665/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011666 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011667#include <assert.h>
11668/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011669#ifdef __cplusplus
11670extern "C"
11671#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011672/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011673 builtin and then its argument prototype would still apply. */
11674char $ac_func ();
11675char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011676
Martin v. Löwis11437992002-04-12 09:54:03 +000011677#ifdef F77_DUMMY_MAIN
11678# ifdef __cplusplus
11679 extern "C"
11680# endif
11681 int F77_DUMMY_MAIN() { return 1; }
11682#endif
11683int
11684main ()
11685{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011686/* The GNU C library defines this for functions which it implements
11687 to always fail with ENOSYS. Some functions are actually named
11688 something starting with __ and the normal name is an alias. */
11689#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11690choke me
11691#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011692f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011693#endif
11694
Martin v. Löwis11437992002-04-12 09:54:03 +000011695 ;
11696 return 0;
11697}
11698_ACEOF
11699rm -f conftest.$ac_objext conftest$ac_exeext
11700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11701 (eval $ac_link) 2>&5
11702 ac_status=$?
11703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11704 (exit $ac_status); } &&
11705 { ac_try='test -s conftest$ac_exeext'
11706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11707 (eval $ac_try) 2>&5
11708 ac_status=$?
11709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11710 (exit $ac_status); }; }; then
11711 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011712else
Martin v. Löwis11437992002-04-12 09:54:03 +000011713 echo "$as_me: failed program was:" >&5
11714cat conftest.$ac_ext >&5
11715eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011716fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011717rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011719echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11720echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11721if test `eval echo '${'$as_ac_var'}'` = yes; then
11722 cat >>confdefs.h <<_ACEOF
11723#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11724_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011725
Fred Drake8cef4cf2000-06-28 16:40:38 +000011726else
Martin v. Löwis11437992002-04-12 09:54:03 +000011727 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11728echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11729if test "${ac_cv_lib_util_forkpty+set}" = set; then
11730 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011731else
Martin v. Löwis11437992002-04-12 09:54:03 +000011732 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011733LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011734cat >conftest.$ac_ext <<_ACEOF
11735#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011736#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011737
Fred Drake8cef4cf2000-06-28 16:40:38 +000011738/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011739#ifdef __cplusplus
11740extern "C"
11741#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011742/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011743 builtin and then its argument prototype would still apply. */
11744char forkpty ();
11745#ifdef F77_DUMMY_MAIN
11746# ifdef __cplusplus
11747 extern "C"
11748# endif
11749 int F77_DUMMY_MAIN() { return 1; }
11750#endif
11751int
11752main ()
11753{
11754forkpty ();
11755 ;
11756 return 0;
11757}
11758_ACEOF
11759rm -f conftest.$ac_objext conftest$ac_exeext
11760if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11761 (eval $ac_link) 2>&5
11762 ac_status=$?
11763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11764 (exit $ac_status); } &&
11765 { ac_try='test -s conftest$ac_exeext'
11766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11767 (eval $ac_try) 2>&5
11768 ac_status=$?
11769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11770 (exit $ac_status); }; }; then
11771 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011772else
Martin v. Löwis11437992002-04-12 09:54:03 +000011773 echo "$as_me: failed program was:" >&5
11774cat conftest.$ac_ext >&5
11775ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011776fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011777rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11778LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011779fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011780echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11781echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11782if test $ac_cv_lib_util_forkpty = yes; then
11783 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011784#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011785_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011786 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011787fi
11788
11789fi
11790done
11791
Jack Jansendd19cf82001-12-06 22:36:17 +000011792
Michael W. Hudson54241132001-12-07 15:38:26 +000011793# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011794
11795
11796
11797
11798
11799
Fred Drake8cef4cf2000-06-28 16:40:38 +000011800for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11801do
Martin v. Löwis11437992002-04-12 09:54:03 +000011802as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11803echo "$as_me:$LINENO: checking for $ac_func" >&5
11804echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11805if eval "test \"\${$as_ac_var+set}\" = set"; then
11806 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011807else
Martin v. Löwis11437992002-04-12 09:54:03 +000011808 cat >conftest.$ac_ext <<_ACEOF
11809#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011810#include "confdefs.h"
11811/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011812 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011813#include <assert.h>
11814/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011815#ifdef __cplusplus
11816extern "C"
11817#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011818/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011819 builtin and then its argument prototype would still apply. */
11820char $ac_func ();
11821char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011822
Martin v. Löwis11437992002-04-12 09:54:03 +000011823#ifdef F77_DUMMY_MAIN
11824# ifdef __cplusplus
11825 extern "C"
11826# endif
11827 int F77_DUMMY_MAIN() { return 1; }
11828#endif
11829int
11830main ()
11831{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011832/* The GNU C library defines this for functions which it implements
11833 to always fail with ENOSYS. Some functions are actually named
11834 something starting with __ and the normal name is an alias. */
11835#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11836choke me
11837#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011838f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011839#endif
11840
Martin v. Löwis11437992002-04-12 09:54:03 +000011841 ;
11842 return 0;
11843}
11844_ACEOF
11845rm -f conftest.$ac_objext conftest$ac_exeext
11846if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11847 (eval $ac_link) 2>&5
11848 ac_status=$?
11849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11850 (exit $ac_status); } &&
11851 { ac_try='test -s conftest$ac_exeext'
11852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11853 (eval $ac_try) 2>&5
11854 ac_status=$?
11855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11856 (exit $ac_status); }; }; then
11857 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011858else
Martin v. Löwis11437992002-04-12 09:54:03 +000011859 echo "$as_me: failed program was:" >&5
11860cat conftest.$ac_ext >&5
11861eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011862fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011863rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011864fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011865echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11866echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11867if test `eval echo '${'$as_ac_var'}'` = yes; then
11868 cat >>confdefs.h <<_ACEOF
11869#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11870_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011871
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011872fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011873done
11874
Michael W. Hudson54241132001-12-07 15:38:26 +000011875
Martin v. Löwis11437992002-04-12 09:54:03 +000011876
11877
11878
11879
11880
Martin v. Löwis1142de32002-03-29 16:28:31 +000011881for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011882do
Martin v. Löwis11437992002-04-12 09:54:03 +000011883as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11884echo "$as_me:$LINENO: checking for $ac_func" >&5
11885echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11886if eval "test \"\${$as_ac_var+set}\" = set"; then
11887 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011888else
Martin v. Löwis11437992002-04-12 09:54:03 +000011889 cat >conftest.$ac_ext <<_ACEOF
11890#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011891#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011892/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011893 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011894#include <assert.h>
11895/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011896#ifdef __cplusplus
11897extern "C"
11898#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011899/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011900 builtin and then its argument prototype would still apply. */
11901char $ac_func ();
11902char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011903
Martin v. Löwis11437992002-04-12 09:54:03 +000011904#ifdef F77_DUMMY_MAIN
11905# ifdef __cplusplus
11906 extern "C"
11907# endif
11908 int F77_DUMMY_MAIN() { return 1; }
11909#endif
11910int
11911main ()
11912{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011913/* The GNU C library defines this for functions which it implements
11914 to always fail with ENOSYS. Some functions are actually named
11915 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011916#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011917choke me
11918#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011919f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011920#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011921
Martin v. Löwis11437992002-04-12 09:54:03 +000011922 ;
11923 return 0;
11924}
11925_ACEOF
11926rm -f conftest.$ac_objext conftest$ac_exeext
11927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11928 (eval $ac_link) 2>&5
11929 ac_status=$?
11930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11931 (exit $ac_status); } &&
11932 { ac_try='test -s conftest$ac_exeext'
11933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11934 (eval $ac_try) 2>&5
11935 ac_status=$?
11936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11937 (exit $ac_status); }; }; then
11938 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011939else
Martin v. Löwis11437992002-04-12 09:54:03 +000011940 echo "$as_me: failed program was:" >&5
11941cat conftest.$ac_ext >&5
11942eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011943fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011944rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011945fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011946echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11947echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11948if test `eval echo '${'$as_ac_var'}'` = yes; then
11949 cat >>confdefs.h <<_ACEOF
11950#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11951_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011952
Martin v. Löwis1142de32002-03-29 16:28:31 +000011953else
Martin v. Löwis11437992002-04-12 09:54:03 +000011954 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011955fi
11956done
11957
11958
Martin v. Löwis11437992002-04-12 09:54:03 +000011959
Martin v. Löwis1142de32002-03-29 16:28:31 +000011960for ac_func in getpgrp
11961do
Martin v. Löwis11437992002-04-12 09:54:03 +000011962as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11963echo "$as_me:$LINENO: checking for $ac_func" >&5
11964echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11965if eval "test \"\${$as_ac_var+set}\" = set"; then
11966 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011967else
Martin v. Löwis11437992002-04-12 09:54:03 +000011968 cat >conftest.$ac_ext <<_ACEOF
11969#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011970#include "confdefs.h"
11971/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011972 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011973#include <assert.h>
11974/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011975#ifdef __cplusplus
11976extern "C"
11977#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011978/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011979 builtin and then its argument prototype would still apply. */
11980char $ac_func ();
11981char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011982
Martin v. Löwis11437992002-04-12 09:54:03 +000011983#ifdef F77_DUMMY_MAIN
11984# ifdef __cplusplus
11985 extern "C"
11986# endif
11987 int F77_DUMMY_MAIN() { return 1; }
11988#endif
11989int
11990main ()
11991{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011992/* The GNU C library defines this for functions which it implements
11993 to always fail with ENOSYS. Some functions are actually named
11994 something starting with __ and the normal name is an alias. */
11995#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11996choke me
11997#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011998f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000011999#endif
12000
Martin v. Löwis11437992002-04-12 09:54:03 +000012001 ;
12002 return 0;
12003}
12004_ACEOF
12005rm -f conftest.$ac_objext conftest$ac_exeext
12006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12007 (eval $ac_link) 2>&5
12008 ac_status=$?
12009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12010 (exit $ac_status); } &&
12011 { ac_try='test -s conftest$ac_exeext'
12012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12013 (eval $ac_try) 2>&5
12014 ac_status=$?
12015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12016 (exit $ac_status); }; }; then
12017 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012018else
Martin v. Löwis11437992002-04-12 09:54:03 +000012019 echo "$as_me: failed program was:" >&5
12020cat conftest.$ac_ext >&5
12021eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012022fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012023rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012024fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012025echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12026echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12027if test `eval echo '${'$as_ac_var'}'` = yes; then
12028 cat >>confdefs.h <<_ACEOF
12029#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12030_ACEOF
12031 cat >conftest.$ac_ext <<_ACEOF
12032#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012033#include "confdefs.h"
12034#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012035#ifdef F77_DUMMY_MAIN
12036# ifdef __cplusplus
12037 extern "C"
12038# endif
12039 int F77_DUMMY_MAIN() { return 1; }
12040#endif
12041int
12042main ()
12043{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012044getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012045 ;
12046 return 0;
12047}
12048_ACEOF
12049rm -f conftest.$ac_objext
12050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12051 (eval $ac_compile) 2>&5
12052 ac_status=$?
12053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12054 (exit $ac_status); } &&
12055 { ac_try='test -s conftest.$ac_objext'
12056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12057 (eval $ac_try) 2>&5
12058 ac_status=$?
12059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12060 (exit $ac_status); }; }; then
12061
12062cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012063#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012064_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012065
Martin v. Löwis11437992002-04-12 09:54:03 +000012066
Guido van Rossumf78abae1997-01-21 22:02:36 +000012067else
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 echo "$as_me: failed program was:" >&5
12069cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012070fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012071rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012072
Guido van Rossum627b2d71993-12-24 10:39:16 +000012073fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012074done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012075
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012076echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12077echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12078if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012079 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012080else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012081 if test "$cross_compiling" = yes; then
12082 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12083echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12084 { (exit 1); exit 1; }; }
12085else
Martin v. Löwis11437992002-04-12 09:54:03 +000012086 cat >conftest.$ac_ext <<_ACEOF
12087#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012088#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012089#if HAVE_UNISTD_H
12090# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012091#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012092
Martin v. Löwis11437992002-04-12 09:54:03 +000012093#ifdef F77_DUMMY_MAIN
12094# ifdef __cplusplus
12095 extern "C"
12096# endif
12097 int F77_DUMMY_MAIN() { return 1; }
12098#endif
12099int
12100main ()
12101{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012102/* If this system has a BSD-style setpgrp which takes arguments,
12103 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12104 exit successfully. */
12105 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 ;
12107 return 0;
12108}
12109_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012110rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012111if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12112 (eval $ac_link) 2>&5
12113 ac_status=$?
12114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012115 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12117 (eval $ac_try) 2>&5
12118 ac_status=$?
12119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12120 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012121 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012122else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012123 echo "$as_me: program exited with status $ac_status" >&5
12124echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012125cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012126( exit $ac_status )
12127ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012128fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012129rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012130fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012131fi
12132echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12133echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12134if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012135
12136cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012137#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012138_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012139
12140fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012141
Martin v. Löwis11437992002-04-12 09:54:03 +000012142
Thomas Wouters3a584202000-08-05 23:28:51 +000012143for ac_func in gettimeofday
12144do
Martin v. Löwis11437992002-04-12 09:54:03 +000012145as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12146echo "$as_me:$LINENO: checking for $ac_func" >&5
12147echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12148if eval "test \"\${$as_ac_var+set}\" = set"; then
12149 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012150else
Martin v. Löwis11437992002-04-12 09:54:03 +000012151 cat >conftest.$ac_ext <<_ACEOF
12152#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012153#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012154/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012155 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012156#include <assert.h>
12157/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012158#ifdef __cplusplus
12159extern "C"
12160#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012161/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012162 builtin and then its argument prototype would still apply. */
12163char $ac_func ();
12164char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012165
Martin v. Löwis11437992002-04-12 09:54:03 +000012166#ifdef F77_DUMMY_MAIN
12167# ifdef __cplusplus
12168 extern "C"
12169# endif
12170 int F77_DUMMY_MAIN() { return 1; }
12171#endif
12172int
12173main ()
12174{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012175/* The GNU C library defines this for functions which it implements
12176 to always fail with ENOSYS. Some functions are actually named
12177 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012178#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012179choke me
12180#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012181f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012182#endif
12183
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 ;
12185 return 0;
12186}
12187_ACEOF
12188rm -f conftest.$ac_objext conftest$ac_exeext
12189if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12190 (eval $ac_link) 2>&5
12191 ac_status=$?
12192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12193 (exit $ac_status); } &&
12194 { ac_try='test -s conftest$ac_exeext'
12195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12196 (eval $ac_try) 2>&5
12197 ac_status=$?
12198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12199 (exit $ac_status); }; }; then
12200 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012201else
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 echo "$as_me: failed program was:" >&5
12203cat conftest.$ac_ext >&5
12204eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012206rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012207fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012208echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12209echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12210if test `eval echo '${'$as_ac_var'}'` = yes; then
12211 cat >>confdefs.h <<_ACEOF
12212#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12213_ACEOF
12214 cat >conftest.$ac_ext <<_ACEOF
12215#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012216#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012217#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012218#ifdef F77_DUMMY_MAIN
12219# ifdef __cplusplus
12220 extern "C"
12221# endif
12222 int F77_DUMMY_MAIN() { return 1; }
12223#endif
12224int
12225main ()
12226{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012227gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012228 ;
12229 return 0;
12230}
12231_ACEOF
12232rm -f conftest.$ac_objext
12233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12234 (eval $ac_compile) 2>&5
12235 ac_status=$?
12236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12237 (exit $ac_status); } &&
12238 { ac_try='test -s conftest.$ac_objext'
12239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12240 (eval $ac_try) 2>&5
12241 ac_status=$?
12242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12243 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012244 :
12245else
Martin v. Löwis11437992002-04-12 09:54:03 +000012246 echo "$as_me: failed program was:" >&5
12247cat conftest.$ac_ext >&5
12248
12249cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012250#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012251_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012252
Martin v. Löwis11437992002-04-12 09:54:03 +000012253
Guido van Rossum627b2d71993-12-24 10:39:16 +000012254fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012255rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012256
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012257fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012258done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012259
Michael W. Hudson54241132001-12-07 15:38:26 +000012260
12261
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012262# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012263# for [no]getaddrinfo in netdb.h.
12264echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12265echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12266cat >conftest.$ac_ext <<_ACEOF
12267#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012268#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012269
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012270#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012271#include <sys/socket.h>
12272#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012273#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012274
Martin v. Löwis11437992002-04-12 09:54:03 +000012275#ifdef F77_DUMMY_MAIN
12276# ifdef __cplusplus
12277 extern "C"
12278# endif
12279 int F77_DUMMY_MAIN() { return 1; }
12280#endif
12281int
12282main ()
12283{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012284
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012285getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012286
Martin v. Löwis11437992002-04-12 09:54:03 +000012287 ;
12288 return 0;
12289}
12290_ACEOF
12291rm -f conftest.$ac_objext conftest$ac_exeext
12292if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12293 (eval $ac_link) 2>&5
12294 ac_status=$?
12295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12296 (exit $ac_status); } &&
12297 { ac_try='test -s conftest$ac_exeext'
12298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12299 (eval $ac_try) 2>&5
12300 ac_status=$?
12301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12302 (exit $ac_status); }; }; then
12303
12304echo "$as_me:$LINENO: result: yes" >&5
12305echo "${ECHO_T}yes" >&6
12306echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12307echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012308if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012309 echo "$as_me:$LINENO: result: buggy" >&5
12310echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012311buggygetaddrinfo=yes
12312else
Martin v. Löwis11437992002-04-12 09:54:03 +000012313 cat >conftest.$ac_ext <<_ACEOF
12314#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012315#include "confdefs.h"
12316
12317#include <sys/types.h>
12318#include <netdb.h>
12319#include <string.h>
12320#include <sys/socket.h>
12321#include <netinet/in.h>
12322
12323main()
12324{
12325 int passive, gaierr, inet4 = 0, inet6 = 0;
12326 struct addrinfo hints, *ai, *aitop;
12327 char straddr[INET6_ADDRSTRLEN], strport[16];
12328
12329 for (passive = 0; passive <= 1; passive++) {
12330 memset(&hints, 0, sizeof(hints));
12331 hints.ai_family = AF_UNSPEC;
12332 hints.ai_flags = passive ? AI_PASSIVE : 0;
12333 hints.ai_socktype = SOCK_STREAM;
12334 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12335 (void)gai_strerror(gaierr);
12336 goto bad;
12337 }
12338 for (ai = aitop; ai; ai = ai->ai_next) {
12339 if (ai->ai_addr == NULL ||
12340 ai->ai_addrlen == 0 ||
12341 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12342 straddr, sizeof(straddr), strport, sizeof(strport),
12343 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12344 goto bad;
12345 }
12346 switch (ai->ai_family) {
12347 case AF_INET:
12348 if (strcmp(strport, "54321") != 0) {
12349 goto bad;
12350 }
12351 if (passive) {
12352 if (strcmp(straddr, "0.0.0.0") != 0) {
12353 goto bad;
12354 }
12355 } else {
12356 if (strcmp(straddr, "127.0.0.1") != 0) {
12357 goto bad;
12358 }
12359 }
12360 inet4++;
12361 break;
12362 case AF_INET6:
12363 if (strcmp(strport, "54321") != 0) {
12364 goto bad;
12365 }
12366 if (passive) {
12367 if (strcmp(straddr, "::") != 0) {
12368 goto bad;
12369 }
12370 } else {
12371 if (strcmp(straddr, "::1") != 0) {
12372 goto bad;
12373 }
12374 }
12375 inet6++;
12376 break;
12377 case AF_UNSPEC:
12378 goto bad;
12379 break;
12380 default:
12381 /* another family support? */
12382 break;
12383 }
12384 }
12385 }
12386
12387 if (!(inet4 == 0 || inet4 == 2))
12388 goto bad;
12389 if (!(inet6 == 0 || inet6 == 2))
12390 goto bad;
12391
12392 if (aitop)
12393 freeaddrinfo(aitop);
12394 exit(0);
12395
12396 bad:
12397 if (aitop)
12398 freeaddrinfo(aitop);
12399 exit(1);
12400}
12401
Martin v. Löwis11437992002-04-12 09:54:03 +000012402_ACEOF
12403rm -f conftest$ac_exeext
12404if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12405 (eval $ac_link) 2>&5
12406 ac_status=$?
12407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12408 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12410 (eval $ac_try) 2>&5
12411 ac_status=$?
12412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12413 (exit $ac_status); }; }; then
12414 echo "$as_me:$LINENO: result: good" >&5
12415echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012416buggygetaddrinfo=no
12417else
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 echo "$as_me: program exited with status $ac_status" >&5
12419echo "$as_me: failed program was:" >&5
12420cat conftest.$ac_ext >&5
12421( exit $ac_status )
12422echo "$as_me:$LINENO: result: buggy" >&5
12423echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012424buggygetaddrinfo=yes
12425fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012426rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012427fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012428else
Martin v. Löwis11437992002-04-12 09:54:03 +000012429 echo "$as_me: failed program was:" >&5
12430cat conftest.$ac_ext >&5
12431
12432echo "$as_me:$LINENO: result: no" >&5
12433echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012434buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012435
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012436fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012437rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012438
12439if test "$buggygetaddrinfo" = "yes"; then
12440 if test "$ipv6" = "yes"; then
12441 echo 'Fatal: You must get working getaddrinfo() function.'
12442 echo ' or you can specify "--disable-ipv6"'.
12443 exit 1
12444 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012445else
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
12447cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012448#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012449_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012450
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012451fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012452
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012453for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012454do
Martin v. Löwis11437992002-04-12 09:54:03 +000012455as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12456echo "$as_me:$LINENO: checking for $ac_func" >&5
12457echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12458if eval "test \"\${$as_ac_var+set}\" = set"; then
12459 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012460else
Martin v. Löwis11437992002-04-12 09:54:03 +000012461 cat >conftest.$ac_ext <<_ACEOF
12462#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012463#include "confdefs.h"
12464/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012466#include <assert.h>
12467/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012468#ifdef __cplusplus
12469extern "C"
12470#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012471/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012472 builtin and then its argument prototype would still apply. */
12473char $ac_func ();
12474char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012475
Martin v. Löwis11437992002-04-12 09:54:03 +000012476#ifdef F77_DUMMY_MAIN
12477# ifdef __cplusplus
12478 extern "C"
12479# endif
12480 int F77_DUMMY_MAIN() { return 1; }
12481#endif
12482int
12483main ()
12484{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012485/* The GNU C library defines this for functions which it implements
12486 to always fail with ENOSYS. Some functions are actually named
12487 something starting with __ and the normal name is an alias. */
12488#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12489choke me
12490#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012491f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012492#endif
12493
Martin v. Löwis11437992002-04-12 09:54:03 +000012494 ;
12495 return 0;
12496}
12497_ACEOF
12498rm -f conftest.$ac_objext conftest$ac_exeext
12499if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12500 (eval $ac_link) 2>&5
12501 ac_status=$?
12502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12503 (exit $ac_status); } &&
12504 { ac_try='test -s conftest$ac_exeext'
12505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12506 (eval $ac_try) 2>&5
12507 ac_status=$?
12508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12509 (exit $ac_status); }; }; then
12510 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012511else
Martin v. Löwis11437992002-04-12 09:54:03 +000012512 echo "$as_me: failed program was:" >&5
12513cat conftest.$ac_ext >&5
12514eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012515fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012516rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012517fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012518echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12519echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12520if test `eval echo '${'$as_ac_var'}'` = yes; then
12521 cat >>confdefs.h <<_ACEOF
12522#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12523_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012524
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012525fi
12526done
12527
Michael W. Hudson54241132001-12-07 15:38:26 +000012528
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012529# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012530echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12531echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12532if test "${ac_cv_header_time+set}" = set; then
12533 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012534else
Martin v. Löwis11437992002-04-12 09:54:03 +000012535 cat >conftest.$ac_ext <<_ACEOF
12536#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012537#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012538#include <sys/types.h>
12539#include <sys/time.h>
12540#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012541
12542#ifdef F77_DUMMY_MAIN
12543# ifdef __cplusplus
12544 extern "C"
12545# endif
12546 int F77_DUMMY_MAIN() { return 1; }
12547#endif
12548int
12549main ()
12550{
12551if ((struct tm *) 0)
12552return 0;
12553 ;
12554 return 0;
12555}
12556_ACEOF
12557rm -f conftest.$ac_objext
12558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12559 (eval $ac_compile) 2>&5
12560 ac_status=$?
12561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12562 (exit $ac_status); } &&
12563 { ac_try='test -s conftest.$ac_objext'
12564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12565 (eval $ac_try) 2>&5
12566 ac_status=$?
12567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12568 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012569 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012570else
Martin v. Löwis11437992002-04-12 09:54:03 +000012571 echo "$as_me: failed program was:" >&5
12572cat conftest.$ac_ext >&5
12573ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012574fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012575rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012576fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012577echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12578echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012579if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012580
12581cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012582#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012583_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012584
12585fi
12586
Martin v. Löwis11437992002-04-12 09:54:03 +000012587echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12588echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12589if test "${ac_cv_struct_tm+set}" = set; then
12590 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012591else
Martin v. Löwis11437992002-04-12 09:54:03 +000012592 cat >conftest.$ac_ext <<_ACEOF
12593#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012594#include "confdefs.h"
12595#include <sys/types.h>
12596#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012597
12598#ifdef F77_DUMMY_MAIN
12599# ifdef __cplusplus
12600 extern "C"
12601# endif
12602 int F77_DUMMY_MAIN() { return 1; }
12603#endif
12604int
12605main ()
12606{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 ;
12609 return 0;
12610}
12611_ACEOF
12612rm -f conftest.$ac_objext
12613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12614 (eval $ac_compile) 2>&5
12615 ac_status=$?
12616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12617 (exit $ac_status); } &&
12618 { ac_try='test -s conftest.$ac_objext'
12619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12620 (eval $ac_try) 2>&5
12621 ac_status=$?
12622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12623 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012624 ac_cv_struct_tm=time.h
12625else
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 echo "$as_me: failed program was:" >&5
12627cat conftest.$ac_ext >&5
12628ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012630rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012631fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012632echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12633echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012634if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012635
12636cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012638_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012639
12640fi
12641
Martin v. Löwis11437992002-04-12 09:54:03 +000012642echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12643echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12644if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12645 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012646else
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 cat >conftest.$ac_ext <<_ACEOF
12648#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012649#include "confdefs.h"
12650#include <sys/types.h>
12651#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012652
12653
12654#ifdef F77_DUMMY_MAIN
12655# ifdef __cplusplus
12656 extern "C"
12657# endif
12658 int F77_DUMMY_MAIN() { return 1; }
12659#endif
12660int
12661main ()
12662{
12663static struct tm ac_aggr;
12664if (ac_aggr.tm_zone)
12665return 0;
12666 ;
12667 return 0;
12668}
12669_ACEOF
12670rm -f conftest.$ac_objext
12671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12672 (eval $ac_compile) 2>&5
12673 ac_status=$?
12674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12675 (exit $ac_status); } &&
12676 { ac_try='test -s conftest.$ac_objext'
12677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12678 (eval $ac_try) 2>&5
12679 ac_status=$?
12680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12681 (exit $ac_status); }; }; then
12682 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012683else
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 echo "$as_me: failed program was:" >&5
12685cat conftest.$ac_ext >&5
12686ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012687fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012688rm -f conftest.$ac_objext conftest.$ac_ext
12689fi
12690echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12691echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12692if test $ac_cv_member_struct_tm_tm_zone = yes; then
12693
12694cat >>confdefs.h <<_ACEOF
12695#define HAVE_STRUCT_TM_TM_ZONE 1
12696_ACEOF
12697
12698
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012699fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012700
Martin v. Löwis11437992002-04-12 09:54:03 +000012701if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12702
12703cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012704#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012705_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012706
12707else
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 echo "$as_me:$LINENO: checking for tzname" >&5
12709echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12710if test "${ac_cv_var_tzname+set}" = set; then
12711 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712else
Martin v. Löwis11437992002-04-12 09:54:03 +000012713 cat >conftest.$ac_ext <<_ACEOF
12714#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012715#include "confdefs.h"
12716#include <time.h>
12717#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012718extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012720
12721#ifdef F77_DUMMY_MAIN
12722# ifdef __cplusplus
12723 extern "C"
12724# endif
12725 int F77_DUMMY_MAIN() { return 1; }
12726#endif
12727int
12728main ()
12729{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012730atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012731 ;
12732 return 0;
12733}
12734_ACEOF
12735rm -f conftest.$ac_objext conftest$ac_exeext
12736if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12737 (eval $ac_link) 2>&5
12738 ac_status=$?
12739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12740 (exit $ac_status); } &&
12741 { ac_try='test -s conftest$ac_exeext'
12742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12743 (eval $ac_try) 2>&5
12744 ac_status=$?
12745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12746 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012747 ac_cv_var_tzname=yes
12748else
Martin v. Löwis11437992002-04-12 09:54:03 +000012749 echo "$as_me: failed program was:" >&5
12750cat conftest.$ac_ext >&5
12751ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012752fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012753rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012754fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012755echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12756echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012757 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012758
12759cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012760#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012761_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012762
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012763 fi
12764fi
12765
Jack Jansendd19cf82001-12-06 22:36:17 +000012766
Martin v. Löwis11437992002-04-12 09:54:03 +000012767echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12768echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12769if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12770 echo $ECHO_N "(cached) $ECHO_C" >&6
12771else
12772 cat >conftest.$ac_ext <<_ACEOF
12773#line $LINENO "configure"
12774#include "confdefs.h"
12775$ac_includes_default
12776#ifdef F77_DUMMY_MAIN
12777# ifdef __cplusplus
12778 extern "C"
12779# endif
12780 int F77_DUMMY_MAIN() { return 1; }
12781#endif
12782int
12783main ()
12784{
12785static struct stat ac_aggr;
12786if (ac_aggr.st_rdev)
12787return 0;
12788 ;
12789 return 0;
12790}
12791_ACEOF
12792rm -f conftest.$ac_objext
12793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12794 (eval $ac_compile) 2>&5
12795 ac_status=$?
12796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12797 (exit $ac_status); } &&
12798 { ac_try='test -s conftest.$ac_objext'
12799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12800 (eval $ac_try) 2>&5
12801 ac_status=$?
12802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12803 (exit $ac_status); }; }; then
12804 ac_cv_member_struct_stat_st_rdev=yes
12805else
12806 echo "$as_me: failed program was:" >&5
12807cat conftest.$ac_ext >&5
12808ac_cv_member_struct_stat_st_rdev=no
12809fi
12810rm -f conftest.$ac_objext conftest.$ac_ext
12811fi
12812echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12813echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12814if test $ac_cv_member_struct_stat_st_rdev = yes; then
12815
12816cat >>confdefs.h <<_ACEOF
12817#define HAVE_STRUCT_STAT_ST_RDEV 1
12818_ACEOF
12819
12820
12821cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012822#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012823_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012824
12825fi
12826
Martin v. Löwis11437992002-04-12 09:54:03 +000012827
12828
12829echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12830echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12831if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12832 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012833else
Martin v. Löwis11437992002-04-12 09:54:03 +000012834 cat >conftest.$ac_ext <<_ACEOF
12835#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012836#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012837$ac_includes_default
12838#ifdef F77_DUMMY_MAIN
12839# ifdef __cplusplus
12840 extern "C"
12841# endif
12842 int F77_DUMMY_MAIN() { return 1; }
12843#endif
12844int
12845main ()
12846{
12847static struct stat ac_aggr;
12848if (ac_aggr.st_blksize)
12849return 0;
12850 ;
12851 return 0;
12852}
12853_ACEOF
12854rm -f conftest.$ac_objext
12855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12856 (eval $ac_compile) 2>&5
12857 ac_status=$?
12858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12859 (exit $ac_status); } &&
12860 { ac_try='test -s conftest.$ac_objext'
12861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12862 (eval $ac_try) 2>&5
12863 ac_status=$?
12864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12865 (exit $ac_status); }; }; then
12866 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012867else
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 echo "$as_me: failed program was:" >&5
12869cat conftest.$ac_ext >&5
12870ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012871fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012872rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012873fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012874echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12875echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12876if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012877
Martin v. Löwis11437992002-04-12 09:54:03 +000012878cat >>confdefs.h <<_ACEOF
12879#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12880_ACEOF
12881
12882
12883cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012884#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012885_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012886
12887fi
12888
Martin v. Löwis11437992002-04-12 09:54:03 +000012889
12890echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12891echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12892if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12893 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012894else
Martin v. Löwis11437992002-04-12 09:54:03 +000012895 cat >conftest.$ac_ext <<_ACEOF
12896#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012897#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012898$ac_includes_default
12899#ifdef F77_DUMMY_MAIN
12900# ifdef __cplusplus
12901 extern "C"
12902# endif
12903 int F77_DUMMY_MAIN() { return 1; }
12904#endif
12905int
12906main ()
12907{
12908static struct stat ac_aggr;
12909if (ac_aggr.st_blocks)
12910return 0;
12911 ;
12912 return 0;
12913}
12914_ACEOF
12915rm -f conftest.$ac_objext
12916if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12917 (eval $ac_compile) 2>&5
12918 ac_status=$?
12919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12920 (exit $ac_status); } &&
12921 { ac_try='test -s conftest.$ac_objext'
12922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12923 (eval $ac_try) 2>&5
12924 ac_status=$?
12925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12926 (exit $ac_status); }; }; then
12927 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012928else
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 echo "$as_me: failed program was:" >&5
12930cat conftest.$ac_ext >&5
12931ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012932fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012933rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012934fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012935echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12936echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12937if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012938
Martin v. Löwis11437992002-04-12 09:54:03 +000012939cat >>confdefs.h <<_ACEOF
12940#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12941_ACEOF
12942
12943
12944cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012945#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012946_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012947
12948else
Martin v. Löwis11437992002-04-12 09:54:03 +000012949 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012950fi
12951
Michael W. Hudson54241132001-12-07 15:38:26 +000012952
Martin v. Löwis11437992002-04-12 09:54:03 +000012953
12954echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12955echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12956if test "${ac_cv_header_time_altzone+set}" = set; then
12957 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012958else
Martin v. Löwis11437992002-04-12 09:54:03 +000012959 cat >conftest.$ac_ext <<_ACEOF
12960#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012961#include "confdefs.h"
12962#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012963#ifdef F77_DUMMY_MAIN
12964# ifdef __cplusplus
12965 extern "C"
12966# endif
12967 int F77_DUMMY_MAIN() { return 1; }
12968#endif
12969int
12970main ()
12971{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012972return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012973 ;
12974 return 0;
12975}
12976_ACEOF
12977rm -f conftest.$ac_objext
12978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12979 (eval $ac_compile) 2>&5
12980 ac_status=$?
12981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12982 (exit $ac_status); } &&
12983 { ac_try='test -s conftest.$ac_objext'
12984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12985 (eval $ac_try) 2>&5
12986 ac_status=$?
12987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12988 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012989 ac_cv_header_time_altzone=yes
12990else
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 echo "$as_me: failed program was:" >&5
12992cat conftest.$ac_ext >&5
12993ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012994fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012995rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012996fi
12997
Martin v. Löwis11437992002-04-12 09:54:03 +000012998echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
12999echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013000if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013001
13002cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013003#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013004_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013005
13006fi
13007
Guido van Rossumda88dad1995-01-26 00:46:29 +000013008was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013009echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13010echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13011cat >conftest.$ac_ext <<_ACEOF
13012#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013013#include "confdefs.h"
13014
13015#include <sys/types.h>
13016#include <sys/select.h>
13017#include <sys/time.h>
13018
Martin v. Löwis11437992002-04-12 09:54:03 +000013019#ifdef F77_DUMMY_MAIN
13020# ifdef __cplusplus
13021 extern "C"
13022# endif
13023 int F77_DUMMY_MAIN() { return 1; }
13024#endif
13025int
13026main ()
13027{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013028;
Martin v. Löwis11437992002-04-12 09:54:03 +000013029 ;
13030 return 0;
13031}
13032_ACEOF
13033rm -f conftest.$ac_objext
13034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13035 (eval $ac_compile) 2>&5
13036 ac_status=$?
13037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13038 (exit $ac_status); } &&
13039 { ac_try='test -s conftest.$ac_objext'
13040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13041 (eval $ac_try) 2>&5
13042 ac_status=$?
13043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13044 (exit $ac_status); }; }; then
13045
13046
13047cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013048#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013049_ACEOF
13050
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013051 was_it_defined=yes
13052
Guido van Rossumf78abae1997-01-21 22:02:36 +000013053else
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 echo "$as_me: failed program was:" >&5
13055cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013056fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013057rm -f conftest.$ac_objext conftest.$ac_ext
13058echo "$as_me:$LINENO: result: $was_it_defined" >&5
13059echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013060
Martin v. Löwis11437992002-04-12 09:54:03 +000013061echo "$as_me:$LINENO: checking for addrinfo" >&5
13062echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13063if test "${ac_cv_struct_addrinfo+set}" = set; then
13064 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013065else
Martin v. Löwis11437992002-04-12 09:54:03 +000013066 cat >conftest.$ac_ext <<_ACEOF
13067#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013068#include "confdefs.h"
13069
13070# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013071#ifdef F77_DUMMY_MAIN
13072# ifdef __cplusplus
13073 extern "C"
13074# endif
13075 int F77_DUMMY_MAIN() { return 1; }
13076#endif
13077int
13078main ()
13079{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013080struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 ;
13082 return 0;
13083}
13084_ACEOF
13085rm -f conftest.$ac_objext
13086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13087 (eval $ac_compile) 2>&5
13088 ac_status=$?
13089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13090 (exit $ac_status); } &&
13091 { ac_try='test -s conftest.$ac_objext'
13092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13093 (eval $ac_try) 2>&5
13094 ac_status=$?
13095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13096 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013097 ac_cv_struct_addrinfo=yes
13098else
Martin v. Löwis11437992002-04-12 09:54:03 +000013099 echo "$as_me: failed program was:" >&5
13100cat conftest.$ac_ext >&5
13101ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013103rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013104fi
13105
Martin v. Löwis11437992002-04-12 09:54:03 +000013106echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13107echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013108if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013109
13110cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013111#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013112_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013113
13114fi
13115
Martin v. Löwis11437992002-04-12 09:54:03 +000013116echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13117echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13118if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13119 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013120else
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 cat >conftest.$ac_ext <<_ACEOF
13122#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013123#include "confdefs.h"
13124
13125# include <sys/types.h>
13126# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013127#ifdef F77_DUMMY_MAIN
13128# ifdef __cplusplus
13129 extern "C"
13130# endif
13131 int F77_DUMMY_MAIN() { return 1; }
13132#endif
13133int
13134main ()
13135{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013136struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 ;
13138 return 0;
13139}
13140_ACEOF
13141rm -f conftest.$ac_objext
13142if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13143 (eval $ac_compile) 2>&5
13144 ac_status=$?
13145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13146 (exit $ac_status); } &&
13147 { ac_try='test -s conftest.$ac_objext'
13148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13149 (eval $ac_try) 2>&5
13150 ac_status=$?
13151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13152 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013153 ac_cv_struct_sockaddr_storage=yes
13154else
Martin v. Löwis11437992002-04-12 09:54:03 +000013155 echo "$as_me: failed program was:" >&5
13156cat conftest.$ac_ext >&5
13157ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013158fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013159rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013160fi
13161
Martin v. Löwis11437992002-04-12 09:54:03 +000013162echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13163echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013164if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013165
13166cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013167#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013168_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013169
13170fi
13171
Guido van Rossum627b2d71993-12-24 10:39:16 +000013172# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013173
Michael W. Hudson54241132001-12-07 15:38:26 +000013174
Martin v. Löwis11437992002-04-12 09:54:03 +000013175echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13176echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13177if test "${ac_cv_c_char_unsigned+set}" = set; then
13178 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013179else
Martin v. Löwis11437992002-04-12 09:54:03 +000013180 cat >conftest.$ac_ext <<_ACEOF
13181#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013182#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013183$ac_includes_default
13184#ifdef F77_DUMMY_MAIN
13185# ifdef __cplusplus
13186 extern "C"
13187# endif
13188 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013190int
13191main ()
13192{
13193static int test_array [1 - 2 * !(((char) -1) < 0)];
13194test_array [0] = 0
13195
13196 ;
13197 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013198}
Martin v. Löwis11437992002-04-12 09:54:03 +000013199_ACEOF
13200rm -f conftest.$ac_objext
13201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13202 (eval $ac_compile) 2>&5
13203 ac_status=$?
13204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13205 (exit $ac_status); } &&
13206 { ac_try='test -s conftest.$ac_objext'
13207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13208 (eval $ac_try) 2>&5
13209 ac_status=$?
13210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13211 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013212 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013213else
13214 echo "$as_me: failed program was:" >&5
13215cat conftest.$ac_ext >&5
13216ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013217fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013218rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013220echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13221echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013222if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013223 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013224#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013225_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013226
13227fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013228
Martin v. Löwis11437992002-04-12 09:54:03 +000013229echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13230echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13231if test "${ac_cv_prog_cc_stdc+set}" = set; then
13232 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013233else
Martin v. Löwis11437992002-04-12 09:54:03 +000013234 ac_cv_prog_cc_stdc=no
13235ac_save_CC=$CC
13236cat >conftest.$ac_ext <<_ACEOF
13237#line $LINENO "configure"
13238#include "confdefs.h"
13239#include <stdarg.h>
13240#include <stdio.h>
13241#include <sys/types.h>
13242#include <sys/stat.h>
13243/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13244struct buf { int x; };
13245FILE * (*rcsopen) (struct buf *, struct stat *, int);
13246static char *e (p, i)
13247 char **p;
13248 int i;
13249{
13250 return p[i];
13251}
13252static char *f (char * (*g) (char **, int), char **p, ...)
13253{
13254 char *s;
13255 va_list v;
13256 va_start (v,p);
13257 s = g (p, va_arg (v,int));
13258 va_end (v);
13259 return s;
13260}
13261int test (int i, double x);
13262struct s1 {int (*f) (int a);};
13263struct s2 {int (*f) (double a);};
13264int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13265int argc;
13266char **argv;
13267#ifdef F77_DUMMY_MAIN
13268# ifdef __cplusplus
13269 extern "C"
13270# endif
13271 int F77_DUMMY_MAIN() { return 1; }
13272#endif
13273int
13274main ()
13275{
13276return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13277 ;
13278 return 0;
13279}
13280_ACEOF
13281# Don't try gcc -ansi; that turns off useful extensions and
13282# breaks some systems' header files.
13283# AIX -qlanglvl=ansi
13284# Ultrix and OSF/1 -std1
13285# HP-UX 10.20 and later -Ae
13286# HP-UX older versions -Aa -D_HPUX_SOURCE
13287# SVR4 -Xc -D__EXTENSIONS__
13288for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13289do
13290 CC="$ac_save_CC $ac_arg"
13291 rm -f conftest.$ac_objext
13292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13293 (eval $ac_compile) 2>&5
13294 ac_status=$?
13295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13296 (exit $ac_status); } &&
13297 { ac_try='test -s conftest.$ac_objext'
13298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13299 (eval $ac_try) 2>&5
13300 ac_status=$?
13301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13302 (exit $ac_status); }; }; then
13303 ac_cv_prog_cc_stdc=$ac_arg
13304break
13305else
13306 echo "$as_me: failed program was:" >&5
13307cat conftest.$ac_ext >&5
13308fi
13309rm -f conftest.$ac_objext
13310done
13311rm -f conftest.$ac_ext conftest.$ac_objext
13312CC=$ac_save_CC
13313
13314fi
13315
13316case "x$ac_cv_prog_cc_stdc" in
13317 x|xno)
13318 echo "$as_me:$LINENO: result: none needed" >&5
13319echo "${ECHO_T}none needed" >&6 ;;
13320 *)
13321 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13322echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13323 CC="$CC $ac_cv_prog_cc_stdc" ;;
13324esac
13325
13326echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13327echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13328if test "${ac_cv_c_const+set}" = set; then
13329 echo $ECHO_N "(cached) $ECHO_C" >&6
13330else
13331 cat >conftest.$ac_ext <<_ACEOF
13332#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333#include "confdefs.h"
13334
Martin v. Löwis11437992002-04-12 09:54:03 +000013335#ifdef F77_DUMMY_MAIN
13336# ifdef __cplusplus
13337 extern "C"
13338# endif
13339 int F77_DUMMY_MAIN() { return 1; }
13340#endif
13341int
13342main ()
13343{
13344/* FIXME: Include the comments suggested by Paul. */
13345#ifndef __cplusplus
13346 /* Ultrix mips cc rejects this. */
13347 typedef int charset[2];
13348 const charset x;
13349 /* SunOS 4.1.1 cc rejects this. */
13350 char const *const *ccp;
13351 char **p;
13352 /* NEC SVR4.0.2 mips cc rejects this. */
13353 struct point {int x, y;};
13354 static struct point const zero = {0,0};
13355 /* AIX XL C 1.02.0.0 rejects this.
13356 It does not let you subtract one const X* pointer from another in
13357 an arm of an if-expression whose if-part is not a constant
13358 expression */
13359 const char *g = "string";
13360 ccp = &g + (g ? g-g : 0);
13361 /* HPUX 7.0 cc rejects these. */
13362 ++ccp;
13363 p = (char**) ccp;
13364 ccp = (char const *const *) p;
13365 { /* SCO 3.2v4 cc rejects this. */
13366 char *t;
13367 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013368
Martin v. Löwis11437992002-04-12 09:54:03 +000013369 *t++ = 0;
13370 }
13371 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13372 int x[] = {25, 17};
13373 const int *foo = &x[0];
13374 ++foo;
13375 }
13376 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13377 typedef const int *iptr;
13378 iptr p = 0;
13379 ++p;
13380 }
13381 { /* AIX XL C 1.02.0.0 rejects this saying
13382 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13383 struct s { int j; const int *ap[3]; };
13384 struct s *b; b->j = 5;
13385 }
13386 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13387 const int foo = 10;
13388 }
13389#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013390
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 ;
13392 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013393}
Martin v. Löwis11437992002-04-12 09:54:03 +000013394_ACEOF
13395rm -f conftest.$ac_objext
13396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13397 (eval $ac_compile) 2>&5
13398 ac_status=$?
13399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13400 (exit $ac_status); } &&
13401 { ac_try='test -s conftest.$ac_objext'
13402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13403 (eval $ac_try) 2>&5
13404 ac_status=$?
13405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13406 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013407 ac_cv_c_const=yes
13408else
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 echo "$as_me: failed program was:" >&5
13410cat conftest.$ac_ext >&5
13411ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013413rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013415echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13416echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013417if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013418
13419cat >>confdefs.h <<\_ACEOF
13420#define const
13421_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013422
13423fi
13424
Michael W. Hudson54241132001-12-07 15:38:26 +000013425
Guido van Rossumda88dad1995-01-26 00:46:29 +000013426works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013427echo "$as_me:$LINENO: checking for working volatile" >&5
13428echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13429cat >conftest.$ac_ext <<_ACEOF
13430#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013431#include "confdefs.h"
13432
Martin v. Löwis11437992002-04-12 09:54:03 +000013433#ifdef F77_DUMMY_MAIN
13434# ifdef __cplusplus
13435 extern "C"
13436# endif
13437 int F77_DUMMY_MAIN() { return 1; }
13438#endif
13439int
13440main ()
13441{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013442volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 ;
13444 return 0;
13445}
13446_ACEOF
13447rm -f conftest.$ac_objext
13448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13449 (eval $ac_compile) 2>&5
13450 ac_status=$?
13451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13452 (exit $ac_status); } &&
13453 { ac_try='test -s conftest.$ac_objext'
13454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13455 (eval $ac_try) 2>&5
13456 ac_status=$?
13457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13458 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013459 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013460else
Martin v. Löwis11437992002-04-12 09:54:03 +000013461 echo "$as_me: failed program was:" >&5
13462cat conftest.$ac_ext >&5
13463
13464cat >>confdefs.h <<\_ACEOF
13465#define volatile
13466_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013467
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013468
Guido van Rossum627b2d71993-12-24 10:39:16 +000013469fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013470rm -f conftest.$ac_objext conftest.$ac_ext
13471echo "$as_me:$LINENO: result: $works" >&5
13472echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013473
Guido van Rossumda88dad1995-01-26 00:46:29 +000013474works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013475echo "$as_me:$LINENO: checking for working signed char" >&5
13476echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13477cat >conftest.$ac_ext <<_ACEOF
13478#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013479#include "confdefs.h"
13480
Martin v. Löwis11437992002-04-12 09:54:03 +000013481#ifdef F77_DUMMY_MAIN
13482# ifdef __cplusplus
13483 extern "C"
13484# endif
13485 int F77_DUMMY_MAIN() { return 1; }
13486#endif
13487int
13488main ()
13489{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013490signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013491 ;
13492 return 0;
13493}
13494_ACEOF
13495rm -f conftest.$ac_objext
13496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13497 (eval $ac_compile) 2>&5
13498 ac_status=$?
13499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13500 (exit $ac_status); } &&
13501 { ac_try='test -s conftest.$ac_objext'
13502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13503 (eval $ac_try) 2>&5
13504 ac_status=$?
13505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13506 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013507 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013508else
Martin v. Löwis11437992002-04-12 09:54:03 +000013509 echo "$as_me: failed program was:" >&5
13510cat conftest.$ac_ext >&5
13511
13512cat >>confdefs.h <<\_ACEOF
13513#define signed
13514_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013515
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013516
Guido van Rossum7f43da71994-08-01 12:15:30 +000013517fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013518rm -f conftest.$ac_objext conftest.$ac_ext
13519echo "$as_me:$LINENO: result: $works" >&5
13520echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013521
Guido van Rossumda88dad1995-01-26 00:46:29 +000013522have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013523echo "$as_me:$LINENO: checking for prototypes" >&5
13524echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13525cat >conftest.$ac_ext <<_ACEOF
13526#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013527#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013528int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013529#ifdef F77_DUMMY_MAIN
13530# ifdef __cplusplus
13531 extern "C"
13532# endif
13533 int F77_DUMMY_MAIN() { return 1; }
13534#endif
13535int
13536main ()
13537{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013538return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013539 ;
13540 return 0;
13541}
13542_ACEOF
13543rm -f conftest.$ac_objext
13544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13545 (eval $ac_compile) 2>&5
13546 ac_status=$?
13547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13548 (exit $ac_status); } &&
13549 { ac_try='test -s conftest.$ac_objext'
13550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13551 (eval $ac_try) 2>&5
13552 ac_status=$?
13553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13554 (exit $ac_status); }; }; then
13555
13556
13557cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013558#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013559_ACEOF
13560
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013561 have_prototypes=yes
13562
Guido van Rossumf78abae1997-01-21 22:02:36 +000013563else
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 echo "$as_me: failed program was:" >&5
13565cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013567rm -f conftest.$ac_objext conftest.$ac_ext
13568echo "$as_me:$LINENO: result: $have_prototypes" >&5
13569echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013570
Guido van Rossumda88dad1995-01-26 00:46:29 +000013571works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013572echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13573echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13574cat >conftest.$ac_ext <<_ACEOF
13575#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013576#include "confdefs.h"
13577
13578#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013579int foo(int x, ...) {
13580 va_list va;
13581 va_start(va, x);
13582 va_arg(va, int);
13583 va_arg(va, char *);
13584 va_arg(va, double);
13585 return 0;
13586}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013587
Martin v. Löwis11437992002-04-12 09:54:03 +000013588#ifdef F77_DUMMY_MAIN
13589# ifdef __cplusplus
13590 extern "C"
13591# endif
13592 int F77_DUMMY_MAIN() { return 1; }
13593#endif
13594int
13595main ()
13596{
Guido van Rossum90eea071996-08-30 20:58:57 +000013597return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013598 ;
13599 return 0;
13600}
13601_ACEOF
13602rm -f conftest.$ac_objext
13603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13604 (eval $ac_compile) 2>&5
13605 ac_status=$?
13606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13607 (exit $ac_status); } &&
13608 { ac_try='test -s conftest.$ac_objext'
13609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13610 (eval $ac_try) 2>&5
13611 ac_status=$?
13612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13613 (exit $ac_status); }; }; then
13614
13615
13616cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013617#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013618_ACEOF
13619
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013620 works=yes
13621
Guido van Rossumf78abae1997-01-21 22:02:36 +000013622else
Martin v. Löwis11437992002-04-12 09:54:03 +000013623 echo "$as_me: failed program was:" >&5
13624cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013626rm -f conftest.$ac_objext conftest.$ac_ext
13627echo "$as_me:$LINENO: result: $works" >&5
13628echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013629
Guido van Rossumda88dad1995-01-26 00:46:29 +000013630if test "$have_prototypes" = yes; then
13631bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013632echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13633echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13634cat >conftest.$ac_ext <<_ACEOF
13635#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013636#include "confdefs.h"
13637#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013638#ifdef F77_DUMMY_MAIN
13639# ifdef __cplusplus
13640 extern "C"
13641# endif
13642 int F77_DUMMY_MAIN() { return 1; }
13643#endif
13644int
13645main ()
13646{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013647char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013648 ;
13649 return 0;
13650}
13651_ACEOF
13652rm -f conftest.$ac_objext
13653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13654 (eval $ac_compile) 2>&5
13655 ac_status=$?
13656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13657 (exit $ac_status); } &&
13658 { ac_try='test -s conftest.$ac_objext'
13659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13660 (eval $ac_try) 2>&5
13661 ac_status=$?
13662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13663 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013664 :
13665else
Martin v. Löwis11437992002-04-12 09:54:03 +000013666 echo "$as_me: failed program was:" >&5
13667cat conftest.$ac_ext >&5
13668
13669cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013670#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013671_ACEOF
13672
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013673 bad_prototypes=yes
13674
Guido van Rossum627b2d71993-12-24 10:39:16 +000013675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013676rm -f conftest.$ac_objext conftest.$ac_ext
13677echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13678echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013679fi
13680
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013681# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013682echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13683echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13684cat >conftest.$ac_ext <<_ACEOF
13685#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013686#include "confdefs.h"
13687#include <sys/types.h>
13688#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013689#ifdef F77_DUMMY_MAIN
13690# ifdef __cplusplus
13691 extern "C"
13692# endif
13693 int F77_DUMMY_MAIN() { return 1; }
13694#endif
13695int
13696main ()
13697{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013698struct sockaddr x;
13699x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 ;
13701 return 0;
13702}
13703_ACEOF
13704rm -f conftest.$ac_objext
13705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13706 (eval $ac_compile) 2>&5
13707 ac_status=$?
13708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13709 (exit $ac_status); } &&
13710 { ac_try='test -s conftest.$ac_objext'
13711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13712 (eval $ac_try) 2>&5
13713 ac_status=$?
13714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13715 (exit $ac_status); }; }; then
13716 echo "$as_me:$LINENO: result: yes" >&5
13717echo "${ECHO_T}yes" >&6
13718
13719cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013720#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013721_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013722
13723else
Martin v. Löwis11437992002-04-12 09:54:03 +000013724 echo "$as_me: failed program was:" >&5
13725cat conftest.$ac_ext >&5
13726echo "$as_me:$LINENO: result: no" >&5
13727echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013728fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013729rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013730
Guido van Rossumda88dad1995-01-26 00:46:29 +000013731va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013732echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13733echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13734cat >conftest.$ac_ext <<_ACEOF
13735#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013736#include "confdefs.h"
13737
13738#ifdef HAVE_STDARG_PROTOTYPES
13739#include <stdarg.h>
13740#else
13741#include <varargs.h>
13742#endif
13743
Martin v. Löwis11437992002-04-12 09:54:03 +000013744#ifdef F77_DUMMY_MAIN
13745# ifdef __cplusplus
13746 extern "C"
13747# endif
13748 int F77_DUMMY_MAIN() { return 1; }
13749#endif
13750int
13751main ()
13752{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013753va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013754 ;
13755 return 0;
13756}
13757_ACEOF
13758rm -f conftest.$ac_objext
13759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13760 (eval $ac_compile) 2>&5
13761 ac_status=$?
13762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13763 (exit $ac_status); } &&
13764 { ac_try='test -s conftest.$ac_objext'
13765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13766 (eval $ac_try) 2>&5
13767 ac_status=$?
13768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13769 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013770 :
13771else
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 echo "$as_me: failed program was:" >&5
13773cat conftest.$ac_ext >&5
13774
13775
13776cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013777#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013778_ACEOF
13779
Guido van Rossumda88dad1995-01-26 00:46:29 +000013780 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013781
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013783rm -f conftest.$ac_objext conftest.$ac_ext
13784echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13785echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013787# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013788
13789
13790
13791echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13792echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13793if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13794 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013795else
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 cat >conftest.$ac_ext <<_ACEOF
13797#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013798#include "confdefs.h"
13799/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013801#include <assert.h>
13802/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013803#ifdef __cplusplus
13804extern "C"
13805#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013806/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 builtin and then its argument prototype would still apply. */
13808char gethostbyname_r ();
13809char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013810
Martin v. Löwis11437992002-04-12 09:54:03 +000013811#ifdef F77_DUMMY_MAIN
13812# ifdef __cplusplus
13813 extern "C"
13814# endif
13815 int F77_DUMMY_MAIN() { return 1; }
13816#endif
13817int
13818main ()
13819{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013820/* The GNU C library defines this for functions which it implements
13821 to always fail with ENOSYS. Some functions are actually named
13822 something starting with __ and the normal name is an alias. */
13823#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13824choke me
13825#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013826f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013827#endif
13828
Martin v. Löwis11437992002-04-12 09:54:03 +000013829 ;
13830 return 0;
13831}
13832_ACEOF
13833rm -f conftest.$ac_objext conftest$ac_exeext
13834if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13835 (eval $ac_link) 2>&5
13836 ac_status=$?
13837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13838 (exit $ac_status); } &&
13839 { ac_try='test -s conftest$ac_exeext'
13840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13841 (eval $ac_try) 2>&5
13842 ac_status=$?
13843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13844 (exit $ac_status); }; }; then
13845 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013846else
Martin v. Löwis11437992002-04-12 09:54:03 +000013847 echo "$as_me: failed program was:" >&5
13848cat conftest.$ac_ext >&5
13849ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013850fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013851rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013852fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013853echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13854echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13855if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013856
Martin v. Löwis11437992002-04-12 09:54:03 +000013857 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013858#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013859_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013860
Martin v. Löwis11437992002-04-12 09:54:03 +000013861 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13862echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013863 OLD_CFLAGS=$CFLAGS
13864 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013865 cat >conftest.$ac_ext <<_ACEOF
13866#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013867#include "confdefs.h"
13868
13869# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013870
13871#ifdef F77_DUMMY_MAIN
13872# ifdef __cplusplus
13873 extern "C"
13874# endif
13875 int F77_DUMMY_MAIN() { return 1; }
13876#endif
13877int
13878main ()
13879{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013880
13881 char *name;
13882 struct hostent *he, *res;
13883 char buffer[2048];
13884 int buflen = 2048;
13885 int h_errnop;
13886
13887 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013888
13889 ;
13890 return 0;
13891}
13892_ACEOF
13893rm -f conftest.$ac_objext
13894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13895 (eval $ac_compile) 2>&5
13896 ac_status=$?
13897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13898 (exit $ac_status); } &&
13899 { ac_try='test -s conftest.$ac_objext'
13900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13901 (eval $ac_try) 2>&5
13902 ac_status=$?
13903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13904 (exit $ac_status); }; }; then
13905
13906 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013907#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013908_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013909
Martin v. Löwis11437992002-04-12 09:54:03 +000013910
13911cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013912#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013913_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013914
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 echo "$as_me:$LINENO: result: yes" >&5
13916echo "${ECHO_T}yes" >&6
13917
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013918else
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 echo "$as_me: failed program was:" >&5
13920cat conftest.$ac_ext >&5
13921
13922 echo "$as_me:$LINENO: result: no" >&5
13923echo "${ECHO_T}no" >&6
13924 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13925echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13926 cat >conftest.$ac_ext <<_ACEOF
13927#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013928#include "confdefs.h"
13929
13930# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013931
13932#ifdef F77_DUMMY_MAIN
13933# ifdef __cplusplus
13934 extern "C"
13935# endif
13936 int F77_DUMMY_MAIN() { return 1; }
13937#endif
13938int
13939main ()
13940{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013941
13942 char *name;
13943 struct hostent *he;
13944 char buffer[2048];
13945 int buflen = 2048;
13946 int h_errnop;
13947
13948 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013949
13950 ;
13951 return 0;
13952}
13953_ACEOF
13954rm -f conftest.$ac_objext
13955if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13956 (eval $ac_compile) 2>&5
13957 ac_status=$?
13958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13959 (exit $ac_status); } &&
13960 { ac_try='test -s conftest.$ac_objext'
13961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13962 (eval $ac_try) 2>&5
13963 ac_status=$?
13964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13965 (exit $ac_status); }; }; then
13966
13967 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013968#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013969_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013970
Martin v. Löwis11437992002-04-12 09:54:03 +000013971
13972cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013973#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013974_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013975
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 echo "$as_me:$LINENO: result: yes" >&5
13977echo "${ECHO_T}yes" >&6
13978
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013979else
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 echo "$as_me: failed program was:" >&5
13981cat conftest.$ac_ext >&5
13982
13983 echo "$as_me:$LINENO: result: no" >&5
13984echo "${ECHO_T}no" >&6
13985 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
13986echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
13987 cat >conftest.$ac_ext <<_ACEOF
13988#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013989#include "confdefs.h"
13990
13991# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013992
13993#ifdef F77_DUMMY_MAIN
13994# ifdef __cplusplus
13995 extern "C"
13996# endif
13997 int F77_DUMMY_MAIN() { return 1; }
13998#endif
13999int
14000main ()
14001{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014002
14003 char *name;
14004 struct hostent *he;
14005 struct hostent_data data;
14006
14007 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014008
14009 ;
14010 return 0;
14011}
14012_ACEOF
14013rm -f conftest.$ac_objext
14014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14015 (eval $ac_compile) 2>&5
14016 ac_status=$?
14017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14018 (exit $ac_status); } &&
14019 { ac_try='test -s conftest.$ac_objext'
14020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14021 (eval $ac_try) 2>&5
14022 ac_status=$?
14023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14024 (exit $ac_status); }; }; then
14025
14026 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014027#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014028_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014029
Martin v. Löwis11437992002-04-12 09:54:03 +000014030
14031cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014032#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014033_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014034
Martin v. Löwis11437992002-04-12 09:54:03 +000014035 echo "$as_me:$LINENO: result: yes" >&5
14036echo "${ECHO_T}yes" >&6
14037
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014038else
Martin v. Löwis11437992002-04-12 09:54:03 +000014039 echo "$as_me: failed program was:" >&5
14040cat conftest.$ac_ext >&5
14041
14042 echo "$as_me:$LINENO: result: no" >&5
14043echo "${ECHO_T}no" >&6
14044
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014045fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014046rm -f conftest.$ac_objext conftest.$ac_ext
14047
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014048fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014049rm -f conftest.$ac_objext conftest.$ac_ext
14050
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014051fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014052rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014053 CFLAGS=$OLD_CFLAGS
14054
14055else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014056
Martin v. Löwis11437992002-04-12 09:54:03 +000014057
14058for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014059do
Martin v. Löwis11437992002-04-12 09:54:03 +000014060as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14061echo "$as_me:$LINENO: checking for $ac_func" >&5
14062echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14063if eval "test \"\${$as_ac_var+set}\" = set"; then
14064 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014065else
Martin v. Löwis11437992002-04-12 09:54:03 +000014066 cat >conftest.$ac_ext <<_ACEOF
14067#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014068#include "confdefs.h"
14069/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014070 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014071#include <assert.h>
14072/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014073#ifdef __cplusplus
14074extern "C"
14075#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014076/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014077 builtin and then its argument prototype would still apply. */
14078char $ac_func ();
14079char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014080
Martin v. Löwis11437992002-04-12 09:54:03 +000014081#ifdef F77_DUMMY_MAIN
14082# ifdef __cplusplus
14083 extern "C"
14084# endif
14085 int F77_DUMMY_MAIN() { return 1; }
14086#endif
14087int
14088main ()
14089{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014090/* The GNU C library defines this for functions which it implements
14091 to always fail with ENOSYS. Some functions are actually named
14092 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014093#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014094choke me
14095#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014096f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014097#endif
14098
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 ;
14100 return 0;
14101}
14102_ACEOF
14103rm -f conftest.$ac_objext conftest$ac_exeext
14104if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14105 (eval $ac_link) 2>&5
14106 ac_status=$?
14107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14108 (exit $ac_status); } &&
14109 { ac_try='test -s conftest$ac_exeext'
14110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14111 (eval $ac_try) 2>&5
14112 ac_status=$?
14113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14114 (exit $ac_status); }; }; then
14115 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014116else
Martin v. Löwis11437992002-04-12 09:54:03 +000014117 echo "$as_me: failed program was:" >&5
14118cat conftest.$ac_ext >&5
14119eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014120fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014121rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014122fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014123echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14124echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14125if test `eval echo '${'$as_ac_var'}'` = yes; then
14126 cat >>confdefs.h <<_ACEOF
14127#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14128_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014129
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014130fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014131done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014132
Michael W. Hudson54241132001-12-07 15:38:26 +000014133
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014134fi
14135
Michael W. Hudson54241132001-12-07 15:38:26 +000014136
14137
14138
14139
14140
14141
Guido van Rossum627b2d71993-12-24 10:39:16 +000014142# checks for system services
14143# (none yet)
14144
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014145# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014146echo "$as_me:$LINENO: checking for __fpu_control" >&5
14147echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14148if test "${ac_cv_func___fpu_control+set}" = set; then
14149 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014150else
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 cat >conftest.$ac_ext <<_ACEOF
14152#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014153#include "confdefs.h"
14154/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014155 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014156#include <assert.h>
14157/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014158#ifdef __cplusplus
14159extern "C"
14160#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014161/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014162 builtin and then its argument prototype would still apply. */
14163char __fpu_control ();
14164char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014165
Martin v. Löwis11437992002-04-12 09:54:03 +000014166#ifdef F77_DUMMY_MAIN
14167# ifdef __cplusplus
14168 extern "C"
14169# endif
14170 int F77_DUMMY_MAIN() { return 1; }
14171#endif
14172int
14173main ()
14174{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014175/* The GNU C library defines this for functions which it implements
14176 to always fail with ENOSYS. Some functions are actually named
14177 something starting with __ and the normal name is an alias. */
14178#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14179choke me
14180#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014181f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014182#endif
14183
Martin v. Löwis11437992002-04-12 09:54:03 +000014184 ;
14185 return 0;
14186}
14187_ACEOF
14188rm -f conftest.$ac_objext conftest$ac_exeext
14189if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14190 (eval $ac_link) 2>&5
14191 ac_status=$?
14192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14193 (exit $ac_status); } &&
14194 { ac_try='test -s conftest$ac_exeext'
14195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14196 (eval $ac_try) 2>&5
14197 ac_status=$?
14198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14199 (exit $ac_status); }; }; then
14200 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014201else
Martin v. Löwis11437992002-04-12 09:54:03 +000014202 echo "$as_me: failed program was:" >&5
14203cat conftest.$ac_ext >&5
14204ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014206rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014207fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014208echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14209echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14210if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014211 :
14212else
Martin v. Löwis11437992002-04-12 09:54:03 +000014213
14214echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14215echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14216if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14217 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014218else
Martin v. Löwis11437992002-04-12 09:54:03 +000014219 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014220LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014221cat >conftest.$ac_ext <<_ACEOF
14222#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014223#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014225/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014226#ifdef __cplusplus
14227extern "C"
14228#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014229/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014230 builtin and then its argument prototype would still apply. */
14231char __fpu_control ();
14232#ifdef F77_DUMMY_MAIN
14233# ifdef __cplusplus
14234 extern "C"
14235# endif
14236 int F77_DUMMY_MAIN() { return 1; }
14237#endif
14238int
14239main ()
14240{
14241__fpu_control ();
14242 ;
14243 return 0;
14244}
14245_ACEOF
14246rm -f conftest.$ac_objext conftest$ac_exeext
14247if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14248 (eval $ac_link) 2>&5
14249 ac_status=$?
14250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14251 (exit $ac_status); } &&
14252 { ac_try='test -s conftest$ac_exeext'
14253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14254 (eval $ac_try) 2>&5
14255 ac_status=$?
14256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14257 (exit $ac_status); }; }; then
14258 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014259else
Martin v. Löwis11437992002-04-12 09:54:03 +000014260 echo "$as_me: failed program was:" >&5
14261cat conftest.$ac_ext >&5
14262ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014263fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014264rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14265LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014266fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014267echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14268echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14269if test $ac_cv_lib_ieee___fpu_control = yes; then
14270 cat >>confdefs.h <<_ACEOF
14271#define HAVE_LIBIEEE 1
14272_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014273
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014274 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014275
Guido van Rossum627b2d71993-12-24 10:39:16 +000014276fi
14277
Michael W. Hudson54241132001-12-07 15:38:26 +000014278
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014279fi
14280
Michael W. Hudson54241132001-12-07 15:38:26 +000014281
Guido van Rossum7f253911997-05-09 02:42:48 +000014282# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014283echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14284echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14285
Guido van Rossum7f253911997-05-09 02:42:48 +000014286# Check whether --with-fpectl or --without-fpectl was given.
14287if test "${with_fpectl+set}" = set; then
14288 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014289
Guido van Rossum7f253911997-05-09 02:42:48 +000014290if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014291then
14292
14293cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014294#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014295_ACEOF
14296
14297 echo "$as_me:$LINENO: result: yes" >&5
14298echo "${ECHO_T}yes" >&6
14299else echo "$as_me:$LINENO: result: no" >&5
14300echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014301fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014302else
Martin v. Löwis11437992002-04-12 09:54:03 +000014303 echo "$as_me:$LINENO: result: no" >&5
14304echo "${ECHO_T}no" >&6
14305fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014306
Guido van Rossum7f43da71994-08-01 12:15:30 +000014307# check for --with-libm=...
14308
Guido van Rossum563e7081996-09-10 18:20:48 +000014309case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014310Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014311BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014312*) LIBM=-lm
14313esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014314echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14315echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14316
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014317# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014318if test "${with_libm+set}" = set; then
14319 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014320
Guido van Rossum7f253911997-05-09 02:42:48 +000014321if test "$withval" = no
14322then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014323 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14324echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014325elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014326then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014327 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14328echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14329else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14330echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14331 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014332fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014333else
Martin v. Löwis11437992002-04-12 09:54:03 +000014334 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14335echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14336fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014337
14338# check for --with-libc=...
14339
Martin v. Löwis11437992002-04-12 09:54:03 +000014340echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14341echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14342
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014343# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014344if test "${with_libc+set}" = set; then
14345 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
Guido van Rossum7f253911997-05-09 02:42:48 +000014347if test "$withval" = no
14348then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014349 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14350echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014351elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014352then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014353 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14354echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14355else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14356echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14357 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014358fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014359else
Martin v. Löwis11437992002-04-12 09:54:03 +000014360 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14361echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14362fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014363
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014364# check for hypot() in math library
14365LIBS_SAVE=$LIBS
14366LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014367
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014368for ac_func in hypot
14369do
Martin v. Löwis11437992002-04-12 09:54:03 +000014370as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14371echo "$as_me:$LINENO: checking for $ac_func" >&5
14372echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14373if eval "test \"\${$as_ac_var+set}\" = set"; then
14374 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014375else
Martin v. Löwis11437992002-04-12 09:54:03 +000014376 cat >conftest.$ac_ext <<_ACEOF
14377#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014378#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014379/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014380 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014381#include <assert.h>
14382/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014383#ifdef __cplusplus
14384extern "C"
14385#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014386/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014387 builtin and then its argument prototype would still apply. */
14388char $ac_func ();
14389char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014390
Martin v. Löwis11437992002-04-12 09:54:03 +000014391#ifdef F77_DUMMY_MAIN
14392# ifdef __cplusplus
14393 extern "C"
14394# endif
14395 int F77_DUMMY_MAIN() { return 1; }
14396#endif
14397int
14398main ()
14399{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014400/* The GNU C library defines this for functions which it implements
14401 to always fail with ENOSYS. Some functions are actually named
14402 something starting with __ and the normal name is an alias. */
14403#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14404choke me
14405#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014406f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014407#endif
14408
Martin v. Löwis11437992002-04-12 09:54:03 +000014409 ;
14410 return 0;
14411}
14412_ACEOF
14413rm -f conftest.$ac_objext conftest$ac_exeext
14414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14415 (eval $ac_link) 2>&5
14416 ac_status=$?
14417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14418 (exit $ac_status); } &&
14419 { ac_try='test -s conftest$ac_exeext'
14420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14421 (eval $ac_try) 2>&5
14422 ac_status=$?
14423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14424 (exit $ac_status); }; }; then
14425 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014426else
Martin v. Löwis11437992002-04-12 09:54:03 +000014427 echo "$as_me: failed program was:" >&5
14428cat conftest.$ac_ext >&5
14429eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014431rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014433echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14434echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14435if test `eval echo '${'$as_ac_var'}'` = yes; then
14436 cat >>confdefs.h <<_ACEOF
14437#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14438_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014439
Michael W. Hudson54241132001-12-07 15:38:26 +000014440else
Martin v. Löwis11437992002-04-12 09:54:03 +000014441 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014442fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014443done
14444
Michael W. Hudson54241132001-12-07 15:38:26 +000014445
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014446LIBS=$LIBS_SAVE
14447
Guido van Rossumad713701997-07-10 22:42:38 +000014448# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014449echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14450echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14451if test "${ac_cv_malloc_zero+set}" = set; then
14452 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014453else
14454 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014455 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014456else
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 cat >conftest.$ac_ext <<_ACEOF
14458#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014459#include "confdefs.h"
14460#include <stdio.h>
14461#ifdef HAVE_STDLIB
14462#include <stdlib.h>
14463#else
14464char *malloc(), *realloc();
14465int *free();
14466#endif
14467main() {
14468 char *p;
14469 p = malloc(0);
14470 if (p == NULL) exit(1);
14471 p = realloc(p, 0);
14472 if (p == NULL) exit(1);
14473 free(p);
14474 exit(0);
14475}
Martin v. Löwis11437992002-04-12 09:54:03 +000014476_ACEOF
14477rm -f conftest$ac_exeext
14478if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14479 (eval $ac_link) 2>&5
14480 ac_status=$?
14481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14482 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14484 (eval $ac_try) 2>&5
14485 ac_status=$?
14486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14487 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014488 ac_cv_malloc_zero=nonnull
14489else
Martin v. Löwis11437992002-04-12 09:54:03 +000014490 echo "$as_me: program exited with status $ac_status" >&5
14491echo "$as_me: failed program was:" >&5
14492cat conftest.$ac_ext >&5
14493( exit $ac_status )
14494ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014495fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014496rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014497fi
Guido van Rossumad713701997-07-10 22:42:38 +000014498fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014499 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014500echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14501echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014502if test "$ac_cv_malloc_zero" = null
14503then
Martin v. Löwis11437992002-04-12 09:54:03 +000014504
14505cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014506#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014507_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014508
14509fi
14510
Guido van Rossumef2255b2000-03-10 22:30:29 +000014511# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014512if test "${ac_cv_header_wchar_h+set}" = set; then
14513 echo "$as_me:$LINENO: checking for wchar.h" >&5
14514echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14515if test "${ac_cv_header_wchar_h+set}" = set; then
14516 echo $ECHO_N "(cached) $ECHO_C" >&6
14517fi
14518echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14519echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014520else
Martin v. Löwis11437992002-04-12 09:54:03 +000014521 # Is the header compilable?
14522echo "$as_me:$LINENO: checking wchar.h usability" >&5
14523echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14524cat >conftest.$ac_ext <<_ACEOF
14525#line $LINENO "configure"
14526#include "confdefs.h"
14527$ac_includes_default
14528#include <wchar.h>
14529_ACEOF
14530rm -f conftest.$ac_objext
14531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14532 (eval $ac_compile) 2>&5
14533 ac_status=$?
14534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14535 (exit $ac_status); } &&
14536 { ac_try='test -s conftest.$ac_objext'
14537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14538 (eval $ac_try) 2>&5
14539 ac_status=$?
14540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14541 (exit $ac_status); }; }; then
14542 ac_header_compiler=yes
14543else
14544 echo "$as_me: failed program was:" >&5
14545cat conftest.$ac_ext >&5
14546ac_header_compiler=no
14547fi
14548rm -f conftest.$ac_objext conftest.$ac_ext
14549echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14550echo "${ECHO_T}$ac_header_compiler" >&6
14551
14552# Is the header present?
14553echo "$as_me:$LINENO: checking wchar.h presence" >&5
14554echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14555cat >conftest.$ac_ext <<_ACEOF
14556#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014557#include "confdefs.h"
14558#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014559_ACEOF
14560if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14561 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14562 ac_status=$?
14563 egrep -v '^ *\+' conftest.er1 >conftest.err
14564 rm -f conftest.er1
14565 cat conftest.err >&5
14566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14567 (exit $ac_status); } >/dev/null; then
14568 if test -s conftest.err; then
14569 ac_cpp_err=$ac_c_preproc_warn_flag
14570 else
14571 ac_cpp_err=
14572 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014573else
Martin v. Löwis11437992002-04-12 09:54:03 +000014574 ac_cpp_err=yes
14575fi
14576if test -z "$ac_cpp_err"; then
14577 ac_header_preproc=yes
14578else
14579 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014580 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014581 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014582fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014583rm -f conftest.err conftest.$ac_ext
14584echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14585echo "${ECHO_T}$ac_header_preproc" >&6
14586
14587# So? What about this header?
14588case $ac_header_compiler:$ac_header_preproc in
14589 yes:no )
14590 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14591echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14592 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14593echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14594 no:yes )
14595 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14596echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14597 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14598echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14599 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14600echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14601esac
14602echo "$as_me:$LINENO: checking for wchar.h" >&5
14603echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14604if test "${ac_cv_header_wchar_h+set}" = set; then
14605 echo $ECHO_N "(cached) $ECHO_C" >&6
14606else
14607 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014608fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014609echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14610echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14611
14612fi
14613if test $ac_cv_header_wchar_h = yes; then
14614
14615
14616cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014617#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014618_ACEOF
14619
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014620 wchar_h="yes"
14621
Guido van Rossumef2255b2000-03-10 22:30:29 +000014622else
Martin v. Löwis11437992002-04-12 09:54:03 +000014623 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014624
14625fi
14626
Michael W. Hudson54241132001-12-07 15:38:26 +000014627
Martin v. Löwis11437992002-04-12 09:54:03 +000014628
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014629# determine wchar_t size
14630if test "$wchar_h" = yes
14631then
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 echo "$as_me:$LINENO: checking for wchar_t" >&5
14633echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14634if test "${ac_cv_type_wchar_t+set}" = set; then
14635 echo $ECHO_N "(cached) $ECHO_C" >&6
14636else
14637 cat >conftest.$ac_ext <<_ACEOF
14638#line $LINENO "configure"
14639#include "confdefs.h"
14640#include <wchar.h>
14641
14642#ifdef F77_DUMMY_MAIN
14643# ifdef __cplusplus
14644 extern "C"
14645# endif
14646 int F77_DUMMY_MAIN() { return 1; }
14647#endif
14648int
14649main ()
14650{
14651if ((wchar_t *) 0)
14652 return 0;
14653if (sizeof (wchar_t))
14654 return 0;
14655 ;
14656 return 0;
14657}
14658_ACEOF
14659rm -f conftest.$ac_objext
14660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14661 (eval $ac_compile) 2>&5
14662 ac_status=$?
14663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14664 (exit $ac_status); } &&
14665 { ac_try='test -s conftest.$ac_objext'
14666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14667 (eval $ac_try) 2>&5
14668 ac_status=$?
14669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14670 (exit $ac_status); }; }; then
14671 ac_cv_type_wchar_t=yes
14672else
14673 echo "$as_me: failed program was:" >&5
14674cat conftest.$ac_ext >&5
14675ac_cv_type_wchar_t=no
14676fi
14677rm -f conftest.$ac_objext conftest.$ac_ext
14678fi
14679echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14680echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14681
14682echo "$as_me:$LINENO: checking size of wchar_t" >&5
14683echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14684if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14685 echo $ECHO_N "(cached) $ECHO_C" >&6
14686else
14687 if test "$ac_cv_type_wchar_t" = yes; then
14688 # The cast to unsigned long works around a bug in the HP C Compiler
14689 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14690 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14691 # This bug is HP SR number 8606223364.
14692 if test "$cross_compiling" = yes; then
14693 # Depending upon the size, compute the lo and hi bounds.
14694cat >conftest.$ac_ext <<_ACEOF
14695#line $LINENO "configure"
14696#include "confdefs.h"
14697#include <wchar.h>
14698
14699#ifdef F77_DUMMY_MAIN
14700# ifdef __cplusplus
14701 extern "C"
14702# endif
14703 int F77_DUMMY_MAIN() { return 1; }
14704#endif
14705int
14706main ()
14707{
14708static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14709test_array [0] = 0
14710
14711 ;
14712 return 0;
14713}
14714_ACEOF
14715rm -f conftest.$ac_objext
14716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14717 (eval $ac_compile) 2>&5
14718 ac_status=$?
14719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14720 (exit $ac_status); } &&
14721 { ac_try='test -s conftest.$ac_objext'
14722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14723 (eval $ac_try) 2>&5
14724 ac_status=$?
14725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14726 (exit $ac_status); }; }; then
14727 ac_lo=0 ac_mid=0
14728 while :; do
14729 cat >conftest.$ac_ext <<_ACEOF
14730#line $LINENO "configure"
14731#include "confdefs.h"
14732#include <wchar.h>
14733
14734#ifdef F77_DUMMY_MAIN
14735# ifdef __cplusplus
14736 extern "C"
14737# endif
14738 int F77_DUMMY_MAIN() { return 1; }
14739#endif
14740int
14741main ()
14742{
14743static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14744test_array [0] = 0
14745
14746 ;
14747 return 0;
14748}
14749_ACEOF
14750rm -f conftest.$ac_objext
14751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14752 (eval $ac_compile) 2>&5
14753 ac_status=$?
14754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14755 (exit $ac_status); } &&
14756 { ac_try='test -s conftest.$ac_objext'
14757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14758 (eval $ac_try) 2>&5
14759 ac_status=$?
14760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14761 (exit $ac_status); }; }; then
14762 ac_hi=$ac_mid; break
14763else
14764 echo "$as_me: failed program was:" >&5
14765cat conftest.$ac_ext >&5
14766ac_lo=`expr $ac_mid + 1`
14767 if test $ac_lo -le $ac_mid; then
14768 ac_lo= ac_hi=
14769 break
14770 fi
14771 ac_mid=`expr 2 '*' $ac_mid + 1`
14772fi
14773rm -f conftest.$ac_objext conftest.$ac_ext
14774 done
14775else
14776 echo "$as_me: failed program was:" >&5
14777cat conftest.$ac_ext >&5
14778cat >conftest.$ac_ext <<_ACEOF
14779#line $LINENO "configure"
14780#include "confdefs.h"
14781#include <wchar.h>
14782
14783#ifdef F77_DUMMY_MAIN
14784# ifdef __cplusplus
14785 extern "C"
14786# endif
14787 int F77_DUMMY_MAIN() { return 1; }
14788#endif
14789int
14790main ()
14791{
14792static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14793test_array [0] = 0
14794
14795 ;
14796 return 0;
14797}
14798_ACEOF
14799rm -f conftest.$ac_objext
14800if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14801 (eval $ac_compile) 2>&5
14802 ac_status=$?
14803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14804 (exit $ac_status); } &&
14805 { ac_try='test -s conftest.$ac_objext'
14806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14807 (eval $ac_try) 2>&5
14808 ac_status=$?
14809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14810 (exit $ac_status); }; }; then
14811 ac_hi=-1 ac_mid=-1
14812 while :; do
14813 cat >conftest.$ac_ext <<_ACEOF
14814#line $LINENO "configure"
14815#include "confdefs.h"
14816#include <wchar.h>
14817
14818#ifdef F77_DUMMY_MAIN
14819# ifdef __cplusplus
14820 extern "C"
14821# endif
14822 int F77_DUMMY_MAIN() { return 1; }
14823#endif
14824int
14825main ()
14826{
14827static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14828test_array [0] = 0
14829
14830 ;
14831 return 0;
14832}
14833_ACEOF
14834rm -f conftest.$ac_objext
14835if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14836 (eval $ac_compile) 2>&5
14837 ac_status=$?
14838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14839 (exit $ac_status); } &&
14840 { ac_try='test -s conftest.$ac_objext'
14841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14842 (eval $ac_try) 2>&5
14843 ac_status=$?
14844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14845 (exit $ac_status); }; }; then
14846 ac_lo=$ac_mid; break
14847else
14848 echo "$as_me: failed program was:" >&5
14849cat conftest.$ac_ext >&5
14850ac_hi=`expr '(' $ac_mid ')' - 1`
14851 if test $ac_mid -le $ac_hi; then
14852 ac_lo= ac_hi=
14853 break
14854 fi
14855 ac_mid=`expr 2 '*' $ac_mid`
14856fi
14857rm -f conftest.$ac_objext conftest.$ac_ext
14858 done
14859else
14860 echo "$as_me: failed program was:" >&5
14861cat conftest.$ac_ext >&5
14862ac_lo= ac_hi=
14863fi
14864rm -f conftest.$ac_objext conftest.$ac_ext
14865fi
14866rm -f conftest.$ac_objext conftest.$ac_ext
14867# Binary search between lo and hi bounds.
14868while test "x$ac_lo" != "x$ac_hi"; do
14869 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14870 cat >conftest.$ac_ext <<_ACEOF
14871#line $LINENO "configure"
14872#include "confdefs.h"
14873#include <wchar.h>
14874
14875#ifdef F77_DUMMY_MAIN
14876# ifdef __cplusplus
14877 extern "C"
14878# endif
14879 int F77_DUMMY_MAIN() { return 1; }
14880#endif
14881int
14882main ()
14883{
14884static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14885test_array [0] = 0
14886
14887 ;
14888 return 0;
14889}
14890_ACEOF
14891rm -f conftest.$ac_objext
14892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14893 (eval $ac_compile) 2>&5
14894 ac_status=$?
14895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14896 (exit $ac_status); } &&
14897 { ac_try='test -s conftest.$ac_objext'
14898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14899 (eval $ac_try) 2>&5
14900 ac_status=$?
14901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14902 (exit $ac_status); }; }; then
14903 ac_hi=$ac_mid
14904else
14905 echo "$as_me: failed program was:" >&5
14906cat conftest.$ac_ext >&5
14907ac_lo=`expr '(' $ac_mid ')' + 1`
14908fi
14909rm -f conftest.$ac_objext conftest.$ac_ext
14910done
14911case $ac_lo in
14912?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14913'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14914echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14915 { (exit 1); exit 1; }; } ;;
14916esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014917else
14918 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14920echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14921 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014922else
Martin v. Löwis11437992002-04-12 09:54:03 +000014923 cat >conftest.$ac_ext <<_ACEOF
14924#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014925#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014926#include <wchar.h>
14927
14928long longval () { return (long) (sizeof (wchar_t)); }
14929unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014930#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014931#include <stdlib.h>
14932#ifdef F77_DUMMY_MAIN
14933# ifdef __cplusplus
14934 extern "C"
14935# endif
14936 int F77_DUMMY_MAIN() { return 1; }
14937#endif
14938int
14939main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014940{
Martin v. Löwis11437992002-04-12 09:54:03 +000014941
14942 FILE *f = fopen ("conftest.val", "w");
14943 if (! f)
14944 exit (1);
14945 if (((long) (sizeof (wchar_t))) < 0)
14946 {
14947 long i = longval ();
14948 if (i != ((long) (sizeof (wchar_t))))
14949 exit (1);
14950 fprintf (f, "%ld\n", i);
14951 }
14952 else
14953 {
14954 unsigned long i = ulongval ();
14955 if (i != ((long) (sizeof (wchar_t))))
14956 exit (1);
14957 fprintf (f, "%lu\n", i);
14958 }
14959 exit (ferror (f) || fclose (f) != 0);
14960
14961 ;
14962 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014963}
Martin v. Löwis11437992002-04-12 09:54:03 +000014964_ACEOF
14965rm -f conftest$ac_exeext
14966if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14967 (eval $ac_link) 2>&5
14968 ac_status=$?
14969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14970 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14972 (eval $ac_try) 2>&5
14973 ac_status=$?
14974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14975 (exit $ac_status); }; }; then
14976 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014977else
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 echo "$as_me: program exited with status $ac_status" >&5
14979echo "$as_me: failed program was:" >&5
14980cat conftest.$ac_ext >&5
14981( exit $ac_status )
14982{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14983echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14984 { (exit 1); exit 1; }; }
14985fi
14986rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14987fi
14988fi
14989rm -f conftest.val
14990else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014991 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000014992fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014993fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014994echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
14995echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
14996cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014997#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014998_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014999
Michael W. Hudson54241132001-12-07 15:38:26 +000015000
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015001fi
15002
Martin v. Löwis11437992002-04-12 09:54:03 +000015003echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15004echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015005# Check whether --enable-unicode or --disable-unicode was given.
15006if test "${enable_unicode+set}" = set; then
15007 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015008
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015009else
15010 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015011fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015012
15013if test $enable_unicode = yes
15014then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015015 # Without any arguments, Py_UNICODE defaults to two-byte mode
15016 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015017fi
15018
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015019
15020
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015021case "$enable_unicode" in
15022ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015024#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015025_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015026
15027 ;;
15028ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015030#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015031_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015032
15033 ;;
15034esac
15035
Michael W. Hudson54241132001-12-07 15:38:26 +000015036
Martin v. Löwis11437992002-04-12 09:54:03 +000015037
15038
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015039
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015040if test "$enable_unicode" = "no"
15041then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015042 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 echo "$as_me:$LINENO: result: not used" >&5
15044echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015045else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015046 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015047
15048cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015049#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015050_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015051
15052 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15053 then
15054 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015055
Martin v. Löwis11437992002-04-12 09:54:03 +000015056cat >>confdefs.h <<\_ACEOF
15057#define HAVE_USABLE_WCHAR_T 1
15058_ACEOF
15059
15060 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015061#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015062_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015063
15064 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15065 then
15066 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015068#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015069_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015070
15071 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15072 then
15073 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015074 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015075#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015076_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015077
15078 else
15079 PY_UNICODE_TYPE="no type found"
15080 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015081 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15082echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015083fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015084
15085# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015086echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15087echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15088if test "${ac_cv_c_bigendian+set}" = set; then
15089 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015090else
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 # See if sys/param.h defines the BYTE_ORDER macro.
15092cat >conftest.$ac_ext <<_ACEOF
15093#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015094#include "confdefs.h"
15095#include <sys/types.h>
15096#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015097
Martin v. Löwis11437992002-04-12 09:54:03 +000015098#ifdef F77_DUMMY_MAIN
15099# ifdef __cplusplus
15100 extern "C"
15101# endif
15102 int F77_DUMMY_MAIN() { return 1; }
15103#endif
15104int
15105main ()
15106{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015107#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15108 bogus endian macros
15109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015110
15111 ;
15112 return 0;
15113}
15114_ACEOF
15115rm -f conftest.$ac_objext
15116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15117 (eval $ac_compile) 2>&5
15118 ac_status=$?
15119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120 (exit $ac_status); } &&
15121 { ac_try='test -s conftest.$ac_objext'
15122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15123 (eval $ac_try) 2>&5
15124 ac_status=$?
15125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15126 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015127 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015128cat >conftest.$ac_ext <<_ACEOF
15129#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015130#include "confdefs.h"
15131#include <sys/types.h>
15132#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015133
Martin v. Löwis11437992002-04-12 09:54:03 +000015134#ifdef F77_DUMMY_MAIN
15135# ifdef __cplusplus
15136 extern "C"
15137# endif
15138 int F77_DUMMY_MAIN() { return 1; }
15139#endif
15140int
15141main ()
15142{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015143#if BYTE_ORDER != BIG_ENDIAN
15144 not big endian
15145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015146
15147 ;
15148 return 0;
15149}
15150_ACEOF
15151rm -f conftest.$ac_objext
15152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15153 (eval $ac_compile) 2>&5
15154 ac_status=$?
15155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15156 (exit $ac_status); } &&
15157 { ac_try='test -s conftest.$ac_objext'
15158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15159 (eval $ac_try) 2>&5
15160 ac_status=$?
15161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15162 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015163 ac_cv_c_bigendian=yes
15164else
Martin v. Löwis11437992002-04-12 09:54:03 +000015165 echo "$as_me: failed program was:" >&5
15166cat conftest.$ac_ext >&5
15167ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015168fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015169rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015170else
Martin v. Löwis11437992002-04-12 09:54:03 +000015171 echo "$as_me: failed program was:" >&5
15172cat conftest.$ac_ext >&5
15173# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015174if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 # try to guess the endianess by grep'ing values into an object file
15176 ac_cv_c_bigendian=unknown
15177 cat >conftest.$ac_ext <<_ACEOF
15178#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015179#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015180short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15181short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15182void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15183short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15184short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15185void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15186#ifdef F77_DUMMY_MAIN
15187# ifdef __cplusplus
15188 extern "C"
15189# endif
15190 int F77_DUMMY_MAIN() { return 1; }
15191#endif
15192int
15193main ()
15194{
15195 _ascii (); _ebcdic ();
15196 ;
15197 return 0;
15198}
15199_ACEOF
15200rm -f conftest.$ac_objext
15201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15202 (eval $ac_compile) 2>&5
15203 ac_status=$?
15204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15205 (exit $ac_status); } &&
15206 { ac_try='test -s conftest.$ac_objext'
15207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15208 (eval $ac_try) 2>&5
15209 ac_status=$?
15210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15211 (exit $ac_status); }; }; then
15212 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15213 ac_cv_c_bigendian=yes
15214fi
15215if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15216 if test "$ac_cv_c_bigendian" = unknown; then
15217 ac_cv_c_bigendian=no
15218 else
15219 # finding both strings is unlikely to happen, but who knows?
15220 ac_cv_c_bigendian=unknown
15221 fi
15222fi
15223else
15224 echo "$as_me: failed program was:" >&5
15225cat conftest.$ac_ext >&5
15226fi
15227rm -f conftest.$ac_objext conftest.$ac_ext
15228else
15229 cat >conftest.$ac_ext <<_ACEOF
15230#line $LINENO "configure"
15231#include "confdefs.h"
15232int
15233main ()
15234{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015235 /* Are we little or big endian? From Harbison&Steele. */
15236 union
15237 {
15238 long l;
15239 char c[sizeof (long)];
15240 } u;
15241 u.l = 1;
15242 exit (u.c[sizeof (long) - 1] == 1);
15243}
Martin v. Löwis11437992002-04-12 09:54:03 +000015244_ACEOF
15245rm -f conftest$ac_exeext
15246if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15247 (eval $ac_link) 2>&5
15248 ac_status=$?
15249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15250 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15252 (eval $ac_try) 2>&5
15253 ac_status=$?
15254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15255 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015256 ac_cv_c_bigendian=no
15257else
Martin v. Löwis11437992002-04-12 09:54:03 +000015258 echo "$as_me: program exited with status $ac_status" >&5
15259echo "$as_me: failed program was:" >&5
15260cat conftest.$ac_ext >&5
15261( exit $ac_status )
15262ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015263fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015264rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015266fi
15267rm -f conftest.$ac_objext conftest.$ac_ext
15268fi
15269echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15270echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15271case $ac_cv_c_bigendian in
15272 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015273
Martin v. Löwis11437992002-04-12 09:54:03 +000015274cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015275#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015276_ACEOF
15277 ;;
15278 no)
15279 ;;
15280 *)
15281 { { echo "$as_me:$LINENO: error: unknown endianess
15282presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15283echo "$as_me: error: unknown endianess
15284presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15285 { (exit 1); exit 1; }; } ;;
15286esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015287
Michael W. Hudson54241132001-12-07 15:38:26 +000015288
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015289# Check whether right shifting a negative integer extends the sign bit
15290# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015291echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15292echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15293if test "${ac_cv_rshift_extends_sign+set}" = set; then
15294 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015295else
Martin v. Löwis11437992002-04-12 09:54:03 +000015296
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015297if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015298 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015299else
Martin v. Löwis11437992002-04-12 09:54:03 +000015300 cat >conftest.$ac_ext <<_ACEOF
15301#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015302#include "confdefs.h"
15303
15304int main()
15305{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015306 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015307}
15308
Martin v. Löwis11437992002-04-12 09:54:03 +000015309_ACEOF
15310rm -f conftest$ac_exeext
15311if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15312 (eval $ac_link) 2>&5
15313 ac_status=$?
15314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15315 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15317 (eval $ac_try) 2>&5
15318 ac_status=$?
15319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15320 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015321 ac_cv_rshift_extends_sign=yes
15322else
Martin v. Löwis11437992002-04-12 09:54:03 +000015323 echo "$as_me: program exited with status $ac_status" >&5
15324echo "$as_me: failed program was:" >&5
15325cat conftest.$ac_ext >&5
15326( exit $ac_status )
15327ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015328fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015329rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15330fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015331fi
15332
Martin v. Löwis11437992002-04-12 09:54:03 +000015333echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15334echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015335if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015336then
Martin v. Löwis11437992002-04-12 09:54:03 +000015337
15338cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015339#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015340_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015341
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015342fi
15343
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015344# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015345echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15346echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15347if test "${ac_cv_have_getc_unlocked+set}" = set; then
15348 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015349else
Martin v. Löwis11437992002-04-12 09:54:03 +000015350
15351cat >conftest.$ac_ext <<_ACEOF
15352#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015353#include "confdefs.h"
15354#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015355#ifdef F77_DUMMY_MAIN
15356# ifdef __cplusplus
15357 extern "C"
15358# endif
15359 int F77_DUMMY_MAIN() { return 1; }
15360#endif
15361int
15362main ()
15363{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015364
15365 FILE *f = fopen("/dev/null", "r");
15366 flockfile(f);
15367 getc_unlocked(f);
15368 funlockfile(f);
15369
Martin v. Löwis11437992002-04-12 09:54:03 +000015370 ;
15371 return 0;
15372}
15373_ACEOF
15374rm -f conftest.$ac_objext conftest$ac_exeext
15375if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15376 (eval $ac_link) 2>&5
15377 ac_status=$?
15378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15379 (exit $ac_status); } &&
15380 { ac_try='test -s conftest$ac_exeext'
15381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15382 (eval $ac_try) 2>&5
15383 ac_status=$?
15384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15385 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015386 ac_cv_have_getc_unlocked=yes
15387else
Martin v. Löwis11437992002-04-12 09:54:03 +000015388 echo "$as_me: failed program was:" >&5
15389cat conftest.$ac_ext >&5
15390ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015391fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015392rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015393fi
15394
Martin v. Löwis11437992002-04-12 09:54:03 +000015395echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15396echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015397if test "$ac_cv_have_getc_unlocked" = yes
15398then
Martin v. Löwis11437992002-04-12 09:54:03 +000015399
15400cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015401#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015402_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015403
15404fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015405
Martin v. Löwis0daad592001-09-30 21:09:59 +000015406# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015407echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15408echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15409if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15410 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015411else
Martin v. Löwis11437992002-04-12 09:54:03 +000015412 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015413LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015414cat >conftest.$ac_ext <<_ACEOF
15415#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015416#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015417
Guido van Rossum353ae582001-07-10 16:45:32 +000015418/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015419#ifdef __cplusplus
15420extern "C"
15421#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015422/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015423 builtin and then its argument prototype would still apply. */
15424char rl_pre_input_hook ();
15425#ifdef F77_DUMMY_MAIN
15426# ifdef __cplusplus
15427 extern "C"
15428# endif
15429 int F77_DUMMY_MAIN() { return 1; }
15430#endif
15431int
15432main ()
15433{
15434rl_pre_input_hook ();
15435 ;
15436 return 0;
15437}
15438_ACEOF
15439rm -f conftest.$ac_objext conftest$ac_exeext
15440if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15441 (eval $ac_link) 2>&5
15442 ac_status=$?
15443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15444 (exit $ac_status); } &&
15445 { ac_try='test -s conftest$ac_exeext'
15446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15447 (eval $ac_try) 2>&5
15448 ac_status=$?
15449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15450 (exit $ac_status); }; }; then
15451 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015452else
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 echo "$as_me: failed program was:" >&5
15454cat conftest.$ac_ext >&5
15455ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015456fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015457rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15458LIBS=$ac_check_lib_save_LIBS
15459fi
15460echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15461echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15462if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015463
Martin v. Löwis11437992002-04-12 09:54:03 +000015464cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015465#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015466_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015467
Martin v. Löwis0daad592001-09-30 21:09:59 +000015468fi
15469
Michael W. Hudson54241132001-12-07 15:38:26 +000015470
Martin v. Löwis0daad592001-09-30 21:09:59 +000015471# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015472echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15473echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15474if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15475 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015476else
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015478LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015479cat >conftest.$ac_ext <<_ACEOF
15480#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015481#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015482
Martin v. Löwis0daad592001-09-30 21:09:59 +000015483/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015484#ifdef __cplusplus
15485extern "C"
15486#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015487/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015488 builtin and then its argument prototype would still apply. */
15489char rl_completion_matches ();
15490#ifdef F77_DUMMY_MAIN
15491# ifdef __cplusplus
15492 extern "C"
15493# endif
15494 int F77_DUMMY_MAIN() { return 1; }
15495#endif
15496int
15497main ()
15498{
15499rl_completion_matches ();
15500 ;
15501 return 0;
15502}
15503_ACEOF
15504rm -f conftest.$ac_objext conftest$ac_exeext
15505if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15506 (eval $ac_link) 2>&5
15507 ac_status=$?
15508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15509 (exit $ac_status); } &&
15510 { ac_try='test -s conftest$ac_exeext'
15511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15512 (eval $ac_try) 2>&5
15513 ac_status=$?
15514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15515 (exit $ac_status); }; }; then
15516 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015517else
Martin v. Löwis11437992002-04-12 09:54:03 +000015518 echo "$as_me: failed program was:" >&5
15519cat conftest.$ac_ext >&5
15520ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015522rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15523LIBS=$ac_check_lib_save_LIBS
15524fi
15525echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15526echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15527if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015528
Martin v. Löwis11437992002-04-12 09:54:03 +000015529cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015530#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015531_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015532
Guido van Rossum353ae582001-07-10 16:45:32 +000015533fi
15534
Jack Jansendd19cf82001-12-06 22:36:17 +000015535
Martin v. Löwis11437992002-04-12 09:54:03 +000015536echo "$as_me:$LINENO: checking for broken nice()" >&5
15537echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15538if test "${ac_cv_broken_nice+set}" = set; then
15539 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015540else
Martin v. Löwis11437992002-04-12 09:54:03 +000015541
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015542if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015543 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015544else
Martin v. Löwis11437992002-04-12 09:54:03 +000015545 cat >conftest.$ac_ext <<_ACEOF
15546#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015547#include "confdefs.h"
15548
15549int main()
15550{
15551 int val1 = nice(1);
15552 if (val1 != -1 && val1 == nice(2))
15553 exit(0);
15554 exit(1);
15555}
15556
Martin v. Löwis11437992002-04-12 09:54:03 +000015557_ACEOF
15558rm -f conftest$ac_exeext
15559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15560 (eval $ac_link) 2>&5
15561 ac_status=$?
15562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15563 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15565 (eval $ac_try) 2>&5
15566 ac_status=$?
15567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15568 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015569 ac_cv_broken_nice=yes
15570else
Martin v. Löwis11437992002-04-12 09:54:03 +000015571 echo "$as_me: program exited with status $ac_status" >&5
15572echo "$as_me: failed program was:" >&5
15573cat conftest.$ac_ext >&5
15574( exit $ac_status )
15575ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015576fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015577rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15578fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015579fi
15580
Martin v. Löwis11437992002-04-12 09:54:03 +000015581echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15582echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015583if test "$ac_cv_broken_nice" = yes
15584then
Martin v. Löwis11437992002-04-12 09:54:03 +000015585
15586cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015587#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015588_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015589
15590fi
15591
Jack Jansen666b1e72001-10-31 12:11:48 +000015592# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015593echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15594echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15595if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15596 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015597else
Martin v. Löwis11437992002-04-12 09:54:03 +000015598 cat >conftest.$ac_ext <<_ACEOF
15599#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015600#include "confdefs.h"
15601#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015602#ifdef F77_DUMMY_MAIN
15603# ifdef __cplusplus
15604 extern "C"
15605# endif
15606 int F77_DUMMY_MAIN() { return 1; }
15607#endif
15608int
15609main ()
15610{
Jack Jansen666b1e72001-10-31 12:11:48 +000015611
15612 int rtn;
15613 rtn = mvwdelch(0,0,0);
15614
Martin v. Löwis11437992002-04-12 09:54:03 +000015615 ;
15616 return 0;
15617}
15618_ACEOF
15619rm -f conftest.$ac_objext
15620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15621 (eval $ac_compile) 2>&5
15622 ac_status=$?
15623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15624 (exit $ac_status); } &&
15625 { ac_try='test -s conftest.$ac_objext'
15626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15627 (eval $ac_try) 2>&5
15628 ac_status=$?
15629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15630 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015631 ac_cv_mvwdelch_is_expression=yes
15632else
Martin v. Löwis11437992002-04-12 09:54:03 +000015633 echo "$as_me: failed program was:" >&5
15634cat conftest.$ac_ext >&5
15635ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015636fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015637rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015638fi
15639
Martin v. Löwis11437992002-04-12 09:54:03 +000015640echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15641echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015642
15643if test "$ac_cv_mvwdelch_is_expression" = yes
15644then
Martin v. Löwis11437992002-04-12 09:54:03 +000015645
15646cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015647#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015648_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015649
15650fi
15651
Martin v. Löwis11437992002-04-12 09:54:03 +000015652echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15653echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15654if test "${ac_cv_window_has_flags+set}" = set; then
15655 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015656else
Martin v. Löwis11437992002-04-12 09:54:03 +000015657 cat >conftest.$ac_ext <<_ACEOF
15658#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015659#include "confdefs.h"
15660#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015661#ifdef F77_DUMMY_MAIN
15662# ifdef __cplusplus
15663 extern "C"
15664# endif
15665 int F77_DUMMY_MAIN() { return 1; }
15666#endif
15667int
15668main ()
15669{
Jack Jansen666b1e72001-10-31 12:11:48 +000015670
15671 WINDOW *w;
15672 w->_flags = 0;
15673
Martin v. Löwis11437992002-04-12 09:54:03 +000015674 ;
15675 return 0;
15676}
15677_ACEOF
15678rm -f conftest.$ac_objext
15679if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15680 (eval $ac_compile) 2>&5
15681 ac_status=$?
15682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15683 (exit $ac_status); } &&
15684 { ac_try='test -s conftest.$ac_objext'
15685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15686 (eval $ac_try) 2>&5
15687 ac_status=$?
15688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15689 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015690 ac_cv_window_has_flags=yes
15691else
Martin v. Löwis11437992002-04-12 09:54:03 +000015692 echo "$as_me: failed program was:" >&5
15693cat conftest.$ac_ext >&5
15694ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015695fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015696rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015697fi
15698
Martin v. Löwis11437992002-04-12 09:54:03 +000015699echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15700echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015701
Jack Jansen666b1e72001-10-31 12:11:48 +000015702
15703if test "$ac_cv_window_has_flags" = yes
15704then
Martin v. Löwis11437992002-04-12 09:54:03 +000015705
15706cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015707#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015708_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015709
15710fi
15711
Guido van Rossum95713eb2000-05-18 20:53:31 +000015712# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15713# Add sys/socket.h to confdefs.h
15714cat >> confdefs.h <<\EOF
15715#ifdef HAVE_SYS_SOCKET_H
15716#include <sys/socket.h>
15717#endif
15718EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015719echo "$as_me:$LINENO: checking for socklen_t" >&5
15720echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15721if test "${ac_cv_type_socklen_t+set}" = set; then
15722 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015723else
Martin v. Löwis11437992002-04-12 09:54:03 +000015724 cat >conftest.$ac_ext <<_ACEOF
15725#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015726#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015727$ac_includes_default
15728#ifdef F77_DUMMY_MAIN
15729# ifdef __cplusplus
15730 extern "C"
15731# endif
15732 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015734int
15735main ()
15736{
15737if ((socklen_t *) 0)
15738 return 0;
15739if (sizeof (socklen_t))
15740 return 0;
15741 ;
15742 return 0;
15743}
15744_ACEOF
15745rm -f conftest.$ac_objext
15746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15747 (eval $ac_compile) 2>&5
15748 ac_status=$?
15749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15750 (exit $ac_status); } &&
15751 { ac_try='test -s conftest.$ac_objext'
15752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15753 (eval $ac_try) 2>&5
15754 ac_status=$?
15755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15756 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015757 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015758else
Martin v. Löwis11437992002-04-12 09:54:03 +000015759 echo "$as_me: failed program was:" >&5
15760cat conftest.$ac_ext >&5
15761ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015762fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015763rm -f conftest.$ac_objext conftest.$ac_ext
15764fi
15765echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15766echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15767if test $ac_cv_type_socklen_t = yes; then
15768 :
15769else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015770
Martin v. Löwis11437992002-04-12 09:54:03 +000015771cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015772#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015773_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015774
15775fi
15776
Michael W. Hudson54241132001-12-07 15:38:26 +000015777
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015778#AC_MSG_CHECKING(for Modules/Setup)
15779#if test ! -f Modules/Setup ; then
15780# if test ! -d Modules ; then
15781# mkdir Modules
15782# fi
15783# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15784# AC_MSG_RESULT(creating)
15785#else
15786# AC_MSG_RESULT(already exists)
15787#fi
15788
Michael W. Hudson54241132001-12-07 15:38:26 +000015789
15790
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015791for h in `(cd $srcdir;echo Python/thread_*.h)`
15792do
15793 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15794done
15795
Michael W. Hudson54241132001-12-07 15:38:26 +000015796
Jack Jansen0b06be72002-06-21 14:48:38 +000015797SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000015798echo "$as_me:$LINENO: checking for build directories" >&5
15799echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015800for dir in $SRCDIRS; do
15801 if test ! -d $dir; then
15802 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015803 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015804done
Martin v. Löwis11437992002-04-12 09:54:03 +000015805echo "$as_me:$LINENO: result: done" >&5
15806echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015807
Guido van Rossum627b2d71993-12-24 10:39:16 +000015808# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015809ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15810cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015811# This file is a shell script that caches the results of configure
15812# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015813# scripts and configure runs, see configure's option --config-cache.
15814# It is not useful on other systems. If it contains results you don't
15815# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015816#
Martin v. Löwis11437992002-04-12 09:54:03 +000015817# config.status only pays attention to the cache file if you give it
15818# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015819#
Martin v. Löwis11437992002-04-12 09:54:03 +000015820# `ac_cv_env_foo' variables (set or unset) will be overriden when
15821# loading this file, other *unset* `ac_cv_foo' will be assigned the
15822# following values.
15823
15824_ACEOF
15825
Guido van Rossumf78abae1997-01-21 22:02:36 +000015826# The following way of writing the cache mishandles newlines in values,
15827# but we know of no workaround that is simple, portable, and efficient.
15828# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015829# Ultrix sh set writes to stderr and can't be redirected directly,
15830# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015831{
15832 (set) 2>&1 |
15833 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15834 *ac_space=\ *)
15835 # `set' does not quote correctly, so add quotes (double-quote
15836 # substitution turns \\\\ into \\, and sed turns \\ into \).
15837 sed -n \
15838 "s/'/'\\\\''/g;
15839 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15840 ;;
15841 *)
15842 # `set' quotes correctly as required by POSIX, so do not add quotes.
15843 sed -n \
15844 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15845 ;;
15846 esac;
15847} |
15848 sed '
15849 t clear
15850 : clear
15851 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15852 t end
15853 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15854 : end' >>confcache
15855if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015856 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015857 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15858 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015859 else
15860 echo "not updating unwritable cache $cache_file"
15861 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015862fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015863rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015864
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015865test "x$prefix" = xNONE && prefix=$ac_default_prefix
15866# Let make expand exec_prefix.
15867test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015868
Martin v. Löwis11437992002-04-12 09:54:03 +000015869# VPATH may cause trouble with some makes, so we remove $(srcdir),
15870# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15871# trailing colons and then remove the whole line if VPATH becomes empty
15872# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015873if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015874 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15875s/:*\$(srcdir):*/:/;
15876s/:*\${srcdir}:*/:/;
15877s/:*@srcdir@:*/:/;
15878s/^\([^=]*=[ ]*\):*/\1/;
15879s/:*$//;
15880s/^[^=]*=[ ]*$//;
15881}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015882fi
15883
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015884DEFS=-DHAVE_CONFIG_H
15885
Martin v. Löwis11437992002-04-12 09:54:03 +000015886
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015887: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015888ac_clean_files_save=$ac_clean_files
15889ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15890{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15891echo "$as_me: creating $CONFIG_STATUS" >&6;}
15892cat >$CONFIG_STATUS <<_ACEOF
15893#! $SHELL
15894# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015895# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015896# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015897# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015898
Martin v. Löwis11437992002-04-12 09:54:03 +000015899debug=false
15900SHELL=\${CONFIG_SHELL-$SHELL}
15901_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015902
Martin v. Löwis11437992002-04-12 09:54:03 +000015903cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015904
Martin v. Löwis11437992002-04-12 09:54:03 +000015905## --------------------- ##
15906## M4sh Initialization. ##
15907## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015908
Martin v. Löwis11437992002-04-12 09:54:03 +000015909# Be Bourne compatible
15910if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15911 emulate sh
15912 NULLCMD=:
15913elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15914 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015915fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015916
Martin v. Löwis11437992002-04-12 09:54:03 +000015917# NLS nuisances.
15918# Support unset when possible.
15919if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15920 as_unset=unset
15921else
15922 as_unset=false
15923fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015924
Martin v. Löwis11437992002-04-12 09:54:03 +000015925(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15926 { $as_unset LANG || test "${LANG+set}" != set; } ||
15927 { LANG=C; export LANG; }
15928(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15929 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15930 { LC_ALL=C; export LC_ALL; }
15931(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15932 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15933 { LC_TIME=C; export LC_TIME; }
15934(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15935 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15936 { LC_CTYPE=C; export LC_CTYPE; }
15937(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15938 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15939 { LANGUAGE=C; export LANGUAGE; }
15940(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15941 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15942 { LC_COLLATE=C; export LC_COLLATE; }
15943(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15944 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15945 { LC_NUMERIC=C; export LC_NUMERIC; }
15946(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15947 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15948 { LC_MESSAGES=C; export LC_MESSAGES; }
15949
15950
15951# Name of the executable.
15952as_me=`(basename "$0") 2>/dev/null ||
15953$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15954 X"$0" : 'X\(//\)$' \| \
15955 X"$0" : 'X\(/\)$' \| \
15956 . : '\(.\)' 2>/dev/null ||
15957echo X/"$0" |
15958 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15959 /^X\/\(\/\/\)$/{ s//\1/; q; }
15960 /^X\/\(\/\).*/{ s//\1/; q; }
15961 s/.*/./; q'`
15962
15963# PATH needs CR, and LINENO needs CR and PATH.
15964# Avoid depending upon Character Ranges.
15965as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15966as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15967as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15968as_cr_digits='0123456789'
15969as_cr_alnum=$as_cr_Letters$as_cr_digits
15970
15971# The user is always right.
15972if test "${PATH_SEPARATOR+set}" != set; then
15973 echo "#! /bin/sh" >conftest.sh
15974 echo "exit 0" >>conftest.sh
15975 chmod +x conftest.sh
15976 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15977 PATH_SEPARATOR=';'
15978 else
15979 PATH_SEPARATOR=:
15980 fi
15981 rm -f conftest.sh
15982fi
15983
15984
15985 as_lineno_1=$LINENO
15986 as_lineno_2=$LINENO
15987 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15988 test "x$as_lineno_1" != "x$as_lineno_2" &&
15989 test "x$as_lineno_3" = "x$as_lineno_2" || {
15990 # Find who we are. Look in the path if we contain no path at all
15991 # relative or not.
15992 case $0 in
15993 *[\\/]* ) as_myself=$0 ;;
15994 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15995for as_dir in $PATH
15996do
15997 IFS=$as_save_IFS
15998 test -z "$as_dir" && as_dir=.
15999 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16000done
16001
16002 ;;
16003 esac
16004 # We did not find ourselves, most probably we were run as `sh COMMAND'
16005 # in which case we are not to be found in the path.
16006 if test "x$as_myself" = x; then
16007 as_myself=$0
16008 fi
16009 if test ! -f "$as_myself"; then
16010 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16011echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16012 { (exit 1); exit 1; }; }
16013 fi
16014 case $CONFIG_SHELL in
16015 '')
16016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16017for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16018do
16019 IFS=$as_save_IFS
16020 test -z "$as_dir" && as_dir=.
16021 for as_base in sh bash ksh sh5; do
16022 case $as_dir in
16023 /*)
16024 if ("$as_dir/$as_base" -c '
16025 as_lineno_1=$LINENO
16026 as_lineno_2=$LINENO
16027 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16028 test "x$as_lineno_1" != "x$as_lineno_2" &&
16029 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16030 CONFIG_SHELL=$as_dir/$as_base
16031 export CONFIG_SHELL
16032 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16033 fi;;
16034 esac
16035 done
16036done
16037;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016038 esac
16039
Martin v. Löwis11437992002-04-12 09:54:03 +000016040 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16041 # uniformly replaced by the line number. The first 'sed' inserts a
16042 # line-number line before each line; the second 'sed' does the real
16043 # work. The second script uses 'N' to pair each line-number line
16044 # with the numbered line, and appends trailing '-' during
16045 # substitution so that $LINENO is not a special case at line end.
16046 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16047 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16048 sed '=' <$as_myself |
16049 sed '
16050 N
16051 s,$,-,
16052 : loop
16053 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16054 t loop
16055 s,-$,,
16056 s,^['$as_cr_digits']*\n,,
16057 ' >$as_me.lineno &&
16058 chmod +x $as_me.lineno ||
16059 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16060echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16061 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016062
Martin v. Löwis11437992002-04-12 09:54:03 +000016063 # Don't try to exec as it changes $[0], causing all sort of problems
16064 # (the dirname of $[0] is not the place where we might find the
16065 # original and so on. Autoconf is especially sensible to this).
16066 . ./$as_me.lineno
16067 # Exit status is that of the last command.
16068 exit
16069}
16070
16071
16072case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16073 *c*,-n*) ECHO_N= ECHO_C='
16074' ECHO_T=' ' ;;
16075 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16076 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16077esac
16078
16079if expr a : '\(a\)' >/dev/null 2>&1; then
16080 as_expr=expr
16081else
16082 as_expr=false
16083fi
16084
16085rm -f conf$$ conf$$.exe conf$$.file
16086echo >conf$$.file
16087if ln -s conf$$.file conf$$ 2>/dev/null; then
16088 # We could just check for DJGPP; but this test a) works b) is more generic
16089 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16090 if test -f conf$$.exe; then
16091 # Don't use ln at all; we don't have any links
16092 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016093 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 as_ln_s='ln -s'
16095 fi
16096elif ln conf$$.file conf$$ 2>/dev/null; then
16097 as_ln_s=ln
16098else
16099 as_ln_s='cp -p'
16100fi
16101rm -f conf$$ conf$$.exe conf$$.file
16102
16103as_executable_p="test -f"
16104
16105# Sed expression to map a string onto a valid CPP name.
16106as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16107
16108# Sed expression to map a string onto a valid variable name.
16109as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16110
16111
16112# IFS
16113# We need space, tab and new line, in precisely that order.
16114as_nl='
16115'
16116IFS=" $as_nl"
16117
16118# CDPATH.
16119$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16120
16121exec 6>&1
16122
16123# Open the log real soon, to keep \$[0] and so on meaningful, and to
16124# report actual input values of CONFIG_FILES etc. instead of their
16125# values after options handling. Logging --version etc. is OK.
16126exec 5>>config.log
16127{
16128 echo
16129 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16130## Running $as_me. ##
16131_ASBOX
16132} >&5
16133cat >&5 <<_CSEOF
16134
16135This file was extended by $as_me, which was
16136generated by GNU Autoconf 2.53. Invocation command line was
16137
16138 CONFIG_FILES = $CONFIG_FILES
16139 CONFIG_HEADERS = $CONFIG_HEADERS
16140 CONFIG_LINKS = $CONFIG_LINKS
16141 CONFIG_COMMANDS = $CONFIG_COMMANDS
16142 $ $0 $@
16143
16144_CSEOF
16145echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16146echo >&5
16147_ACEOF
16148
16149# Files that config.status was made for.
16150if test -n "$ac_config_files"; then
16151 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16152fi
16153
16154if test -n "$ac_config_headers"; then
16155 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16156fi
16157
16158if test -n "$ac_config_links"; then
16159 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16160fi
16161
16162if test -n "$ac_config_commands"; then
16163 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16164fi
16165
16166cat >>$CONFIG_STATUS <<\_ACEOF
16167
16168ac_cs_usage="\
16169\`$as_me' instantiates files from templates according to the
16170current configuration.
16171
16172Usage: $0 [OPTIONS] [FILE]...
16173
16174 -h, --help print this help, then exit
16175 -V, --version print version number, then exit
16176 -d, --debug don't remove temporary files
16177 --recheck update $as_me by reconfiguring in the same conditions
16178 --file=FILE[:TEMPLATE]
16179 instantiate the configuration file FILE
16180 --header=FILE[:TEMPLATE]
16181 instantiate the configuration header FILE
16182
16183Configuration files:
16184$config_files
16185
16186Configuration headers:
16187$config_headers
16188
16189Report bugs to <bug-autoconf@gnu.org>."
16190_ACEOF
16191
16192cat >>$CONFIG_STATUS <<_ACEOF
16193ac_cs_version="\\
16194config.status
16195configured by $0, generated by GNU Autoconf 2.53,
16196 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16197
16198Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16199Free Software Foundation, Inc.
16200This config.status script is free software; the Free Software Foundation
16201gives unlimited permission to copy, distribute and modify it."
16202srcdir=$srcdir
16203INSTALL="$INSTALL"
16204_ACEOF
16205
16206cat >>$CONFIG_STATUS <<\_ACEOF
16207# If no file are specified by the user, then we need to provide default
16208# value. By we need to know if files were specified by the user.
16209ac_need_defaults=:
16210while test $# != 0
16211do
16212 case $1 in
16213 --*=*)
16214 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16215 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16216 shift
16217 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16218 shift
16219 ;;
16220 -*);;
16221 *) # This is not an option, so the user has probably given explicit
16222 # arguments.
16223 ac_need_defaults=false;;
16224 esac
16225
16226 case $1 in
16227 # Handling of the options.
16228_ACEOF
16229cat >>$CONFIG_STATUS <<_ACEOF
16230 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16231 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16232 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16233_ACEOF
16234cat >>$CONFIG_STATUS <<\_ACEOF
16235 --version | --vers* | -V )
16236 echo "$ac_cs_version"; exit 0 ;;
16237 --he | --h)
16238 # Conflict between --help and --header
16239 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16240Try \`$0 --help' for more information." >&5
16241echo "$as_me: error: ambiguous option: $1
16242Try \`$0 --help' for more information." >&2;}
16243 { (exit 1); exit 1; }; };;
16244 --help | --hel | -h )
16245 echo "$ac_cs_usage"; exit 0 ;;
16246 --debug | --d* | -d )
16247 debug=: ;;
16248 --file | --fil | --fi | --f )
16249 shift
16250 CONFIG_FILES="$CONFIG_FILES $1"
16251 ac_need_defaults=false;;
16252 --header | --heade | --head | --hea )
16253 shift
16254 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16255 ac_need_defaults=false;;
16256
16257 # This is an error.
16258 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16259Try \`$0 --help' for more information." >&5
16260echo "$as_me: error: unrecognized option: $1
16261Try \`$0 --help' for more information." >&2;}
16262 { (exit 1); exit 1; }; } ;;
16263
16264 *) ac_config_targets="$ac_config_targets $1" ;;
16265
16266 esac
16267 shift
16268done
16269
16270_ACEOF
16271
16272
16273
16274
16275
16276cat >>$CONFIG_STATUS <<\_ACEOF
16277for ac_config_target in $ac_config_targets
16278do
16279 case "$ac_config_target" in
16280 # Handling of arguments.
16281 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16282 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16283 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16284 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16285echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16286 { (exit 1); exit 1; }; };;
16287 esac
16288done
16289
16290# If the user did not use the arguments to specify the items to instantiate,
16291# then the envvar interface is used. Set only those that are not.
16292# We use the long form for the default assignment because of an extremely
16293# bizarre bug on SunOS 4.1.3.
16294if $ac_need_defaults; then
16295 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16296 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16297fi
16298
16299# Create a temporary directory, and hook for its removal unless debugging.
16300$debug ||
16301{
16302 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16303 trap '{ (exit 1); exit 1; }' 1 2 13 15
16304}
16305
16306# Create a (secure) tmp directory for tmp files.
16307: ${TMPDIR=/tmp}
16308{
16309 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16310 test -n "$tmp" && test -d "$tmp"
16311} ||
16312{
16313 tmp=$TMPDIR/cs$$-$RANDOM
16314 (umask 077 && mkdir $tmp)
16315} ||
16316{
16317 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16318 { (exit 1); exit 1; }
16319}
16320
16321_ACEOF
16322
16323cat >>$CONFIG_STATUS <<_ACEOF
16324
16325#
16326# CONFIG_FILES section.
16327#
16328
16329# No need to generate the scripts if there are no CONFIG_FILES.
16330# This happens for instance when ./config.status config.h
16331if test -n "\$CONFIG_FILES"; then
16332 # Protect against being on the right side of a sed subst in config.status.
16333 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16334 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16335s,@SHELL@,$SHELL,;t t
16336s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16337s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16338s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16339s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16340s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16341s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16342s,@exec_prefix@,$exec_prefix,;t t
16343s,@prefix@,$prefix,;t t
16344s,@program_transform_name@,$program_transform_name,;t t
16345s,@bindir@,$bindir,;t t
16346s,@sbindir@,$sbindir,;t t
16347s,@libexecdir@,$libexecdir,;t t
16348s,@datadir@,$datadir,;t t
16349s,@sysconfdir@,$sysconfdir,;t t
16350s,@sharedstatedir@,$sharedstatedir,;t t
16351s,@localstatedir@,$localstatedir,;t t
16352s,@libdir@,$libdir,;t t
16353s,@includedir@,$includedir,;t t
16354s,@oldincludedir@,$oldincludedir,;t t
16355s,@infodir@,$infodir,;t t
16356s,@mandir@,$mandir,;t t
16357s,@build_alias@,$build_alias,;t t
16358s,@host_alias@,$host_alias,;t t
16359s,@target_alias@,$target_alias,;t t
16360s,@DEFS@,$DEFS,;t t
16361s,@ECHO_C@,$ECHO_C,;t t
16362s,@ECHO_N@,$ECHO_N,;t t
16363s,@ECHO_T@,$ECHO_T,;t t
16364s,@LIBS@,$LIBS,;t t
16365s,@VERSION@,$VERSION,;t t
16366s,@SOVERSION@,$SOVERSION,;t t
16367s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16368s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16369s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16370s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16371s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16372s,@MACHDEP@,$MACHDEP,;t t
16373s,@SGI_ABI@,$SGI_ABI,;t t
16374s,@CXX@,$CXX,;t t
16375s,@MAINOBJ@,$MAINOBJ,;t t
16376s,@EXEEXT@,$EXEEXT,;t t
16377s,@CC@,$CC,;t t
16378s,@CFLAGS@,$CFLAGS,;t t
16379s,@LDFLAGS@,$LDFLAGS,;t t
16380s,@CPPFLAGS@,$CPPFLAGS,;t t
16381s,@ac_ct_CC@,$ac_ct_CC,;t t
16382s,@OBJEXT@,$OBJEXT,;t t
16383s,@CPP@,$CPP,;t t
16384s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16385s,@LIBRARY@,$LIBRARY,;t t
16386s,@LDLIBRARY@,$LDLIBRARY,;t t
16387s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16388s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16389s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16390s,@INSTSONAME@,$INSTSONAME,;t t
16391s,@RUNSHARED@,$RUNSHARED,;t t
16392s,@LINKCC@,$LINKCC,;t t
16393s,@RANLIB@,$RANLIB,;t t
16394s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16395s,@AR@,$AR,;t t
16396s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16397s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16398s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16399s,@LN@,$LN,;t t
16400s,@OPT@,$OPT,;t t
16401s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16402s,@SO@,$SO,;t t
16403s,@LDSHARED@,$LDSHARED,;t t
16404s,@BLDSHARED@,$BLDSHARED,;t t
16405s,@CCSHARED@,$CCSHARED,;t t
16406s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16407s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016408s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016409s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16410s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16411s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16412s,@LDLAST@,$LDLAST,;t t
16413s,@THREADOBJ@,$THREADOBJ,;t t
16414s,@DLINCLDIR@,$DLINCLDIR,;t t
16415s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16416s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16417s,@LIBOBJS@,$LIBOBJS,;t t
16418s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16419s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16420s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16421s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16422s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16423s,@LIBM@,$LIBM,;t t
16424s,@LIBC@,$LIBC,;t t
16425s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16426s,@THREADHEADERS@,$THREADHEADERS,;t t
16427s,@SRCDIRS@,$SRCDIRS,;t t
16428CEOF
16429
16430_ACEOF
16431
16432 cat >>$CONFIG_STATUS <<\_ACEOF
16433 # Split the substitutions into bite-sized pieces for seds with
16434 # small command number limits, like on Digital OSF/1 and HP-UX.
16435 ac_max_sed_lines=48
16436 ac_sed_frag=1 # Number of current file.
16437 ac_beg=1 # First line for current file.
16438 ac_end=$ac_max_sed_lines # Line after last line for current file.
16439 ac_more_lines=:
16440 ac_sed_cmds=
16441 while $ac_more_lines; do
16442 if test $ac_beg -gt 1; then
16443 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16444 else
16445 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16446 fi
16447 if test ! -s $tmp/subs.frag; then
16448 ac_more_lines=false
16449 else
16450 # The purpose of the label and of the branching condition is to
16451 # speed up the sed processing (if there are no `@' at all, there
16452 # is no need to browse any of the substitutions).
16453 # These are the two extra sed commands mentioned above.
16454 (echo ':t
16455 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16456 if test -z "$ac_sed_cmds"; then
16457 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16458 else
16459 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16460 fi
16461 ac_sed_frag=`expr $ac_sed_frag + 1`
16462 ac_beg=$ac_end
16463 ac_end=`expr $ac_end + $ac_max_sed_lines`
16464 fi
16465 done
16466 if test -z "$ac_sed_cmds"; then
16467 ac_sed_cmds=cat
16468 fi
16469fi # test -n "$CONFIG_FILES"
16470
16471_ACEOF
16472cat >>$CONFIG_STATUS <<\_ACEOF
16473for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16474 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16475 case $ac_file in
16476 - | *:- | *:-:* ) # input from stdin
16477 cat >$tmp/stdin
16478 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16479 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16480 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16481 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16482 * ) ac_file_in=$ac_file.in ;;
16483 esac
16484
16485 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16486 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16487$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16488 X"$ac_file" : 'X\(//\)[^/]' \| \
16489 X"$ac_file" : 'X\(//\)$' \| \
16490 X"$ac_file" : 'X\(/\)' \| \
16491 . : '\(.\)' 2>/dev/null ||
16492echo X"$ac_file" |
16493 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16494 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16495 /^X\(\/\/\)$/{ s//\1/; q; }
16496 /^X\(\/\).*/{ s//\1/; q; }
16497 s/.*/./; q'`
16498 { case "$ac_dir" in
16499 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16500 *) as_incr_dir=.;;
16501esac
16502as_dummy="$ac_dir"
16503for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16504 case $as_mkdir_dir in
16505 # Skip DOS drivespec
16506 ?:) as_incr_dir=$as_mkdir_dir ;;
16507 *)
16508 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16509 test -d "$as_incr_dir" ||
16510 mkdir "$as_incr_dir" ||
16511 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16512echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16513 { (exit 1); exit 1; }; }
16514 ;;
16515 esac
16516done; }
16517
16518 ac_builddir=.
16519
16520if test "$ac_dir" != .; then
16521 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16522 # A "../" for each directory in $ac_dir_suffix.
16523 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16524else
16525 ac_dir_suffix= ac_top_builddir=
16526fi
16527
16528case $srcdir in
16529 .) # No --srcdir option. We are building in place.
16530 ac_srcdir=.
16531 if test -z "$ac_top_builddir"; then
16532 ac_top_srcdir=.
16533 else
16534 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16535 fi ;;
16536 [\\/]* | ?:[\\/]* ) # Absolute path.
16537 ac_srcdir=$srcdir$ac_dir_suffix;
16538 ac_top_srcdir=$srcdir ;;
16539 *) # Relative path.
16540 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16541 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16542esac
16543# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16544# absolute.
16545ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16546ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16547ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16548ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16549
16550
16551 case $INSTALL in
16552 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16553 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16554 esac
16555
16556 if test x"$ac_file" != x-; then
16557 { echo "$as_me:$LINENO: creating $ac_file" >&5
16558echo "$as_me: creating $ac_file" >&6;}
16559 rm -f "$ac_file"
16560 fi
16561 # Let's still pretend it is `configure' which instantiates (i.e., don't
16562 # use $as_me), people would be surprised to read:
16563 # /* config.h. Generated by config.status. */
16564 if test x"$ac_file" = x-; then
16565 configure_input=
16566 else
16567 configure_input="$ac_file. "
16568 fi
16569 configure_input=$configure_input"Generated from `echo $ac_file_in |
16570 sed 's,.*/,,'` by configure."
16571
16572 # First look for the input files in the build tree, otherwise in the
16573 # src tree.
16574 ac_file_inputs=`IFS=:
16575 for f in $ac_file_in; do
16576 case $f in
16577 -) echo $tmp/stdin ;;
16578 [\\/$]*)
16579 # Absolute (can't be DOS-style, as IFS=:)
16580 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16581echo "$as_me: error: cannot find input file: $f" >&2;}
16582 { (exit 1); exit 1; }; }
16583 echo $f;;
16584 *) # Relative
16585 if test -f "$f"; then
16586 # Build tree
16587 echo $f
16588 elif test -f "$srcdir/$f"; then
16589 # Source tree
16590 echo $srcdir/$f
16591 else
16592 # /dev/null tree
16593 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16594echo "$as_me: error: cannot find input file: $f" >&2;}
16595 { (exit 1); exit 1; }; }
16596 fi;;
16597 esac
16598 done` || { (exit 1); exit 1; }
16599_ACEOF
16600cat >>$CONFIG_STATUS <<_ACEOF
16601 sed "$ac_vpsub
16602$extrasub
16603_ACEOF
16604cat >>$CONFIG_STATUS <<\_ACEOF
16605:t
16606/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16607s,@configure_input@,$configure_input,;t t
16608s,@srcdir@,$ac_srcdir,;t t
16609s,@abs_srcdir@,$ac_abs_srcdir,;t t
16610s,@top_srcdir@,$ac_top_srcdir,;t t
16611s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16612s,@builddir@,$ac_builddir,;t t
16613s,@abs_builddir@,$ac_abs_builddir,;t t
16614s,@top_builddir@,$ac_top_builddir,;t t
16615s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16616s,@INSTALL@,$ac_INSTALL,;t t
16617" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16618 rm -f $tmp/stdin
16619 if test x"$ac_file" != x-; then
16620 mv $tmp/out $ac_file
16621 else
16622 cat $tmp/out
16623 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016624 fi
16625
Martin v. Löwis11437992002-04-12 09:54:03 +000016626done
16627_ACEOF
16628cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016629
Martin v. Löwis11437992002-04-12 09:54:03 +000016630#
16631# CONFIG_HEADER section.
16632#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016633
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016634# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16635# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016636#
16637# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016638ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16639ac_dB='[ ].*$,\1#\2'
16640ac_dC=' '
16641ac_dD=',;t'
16642# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16643ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16644ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016645ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016646ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016647
Martin v. Löwis11437992002-04-12 09:54:03 +000016648for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016649 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016650 case $ac_file in
16651 - | *:- | *:-:* ) # input from stdin
16652 cat >$tmp/stdin
16653 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16654 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16655 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16656 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16657 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016658 esac
16659
Martin v. Löwis11437992002-04-12 09:54:03 +000016660 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16661echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016662
Martin v. Löwis11437992002-04-12 09:54:03 +000016663 # First look for the input files in the build tree, otherwise in the
16664 # src tree.
16665 ac_file_inputs=`IFS=:
16666 for f in $ac_file_in; do
16667 case $f in
16668 -) echo $tmp/stdin ;;
16669 [\\/$]*)
16670 # Absolute (can't be DOS-style, as IFS=:)
16671 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16672echo "$as_me: error: cannot find input file: $f" >&2;}
16673 { (exit 1); exit 1; }; }
16674 echo $f;;
16675 *) # Relative
16676 if test -f "$f"; then
16677 # Build tree
16678 echo $f
16679 elif test -f "$srcdir/$f"; then
16680 # Source tree
16681 echo $srcdir/$f
16682 else
16683 # /dev/null tree
16684 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16685echo "$as_me: error: cannot find input file: $f" >&2;}
16686 { (exit 1); exit 1; }; }
16687 fi;;
16688 esac
16689 done` || { (exit 1); exit 1; }
16690 # Remove the trailing spaces.
16691 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016692
Martin v. Löwis11437992002-04-12 09:54:03 +000016693_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016694
Martin v. Löwis11437992002-04-12 09:54:03 +000016695# Transform confdefs.h into two sed scripts, `conftest.defines' and
16696# `conftest.undefs', that substitutes the proper values into
16697# config.h.in to produce config.h. The first handles `#define'
16698# templates, and the second `#undef' templates.
16699# And first: Protect against being on the right side of a sed subst in
16700# config.status. Protect against being in an unquoted here document
16701# in config.status.
16702rm -f conftest.defines conftest.undefs
16703# Using a here document instead of a string reduces the quoting nightmare.
16704# Putting comments in sed scripts is not portable.
16705#
16706# `end' is used to avoid that the second main sed command (meant for
16707# 0-ary CPP macros) applies to n-ary macro definitions.
16708# See the Autoconf documentation for `clear'.
16709cat >confdef2sed.sed <<\_ACEOF
16710s/[\\&,]/\\&/g
16711s,[\\$`],\\&,g
16712t clear
16713: clear
16714s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16715t end
16716s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16717: end
16718_ACEOF
16719# If some macros were called several times there might be several times
16720# the same #defines, which is useless. Nevertheless, we may not want to
16721# sort them, since we want the *last* AC-DEFINE to be honored.
16722uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16723sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16724rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016725
16726# This sed command replaces #undef with comments. This is necessary, for
16727# example, in the case of _POSIX_SOURCE, which is predefined and required
16728# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016729cat >>conftest.undefs <<\_ACEOF
16730s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16731_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016732
Martin v. Löwis11437992002-04-12 09:54:03 +000016733# Break up conftest.defines because some shells have a limit on the size
16734# of here documents, and old seds have small limits too (100 cmds).
16735echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16736echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16737echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16738echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016739rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016740while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016741do
Martin v. Löwis11437992002-04-12 09:54:03 +000016742 # Write a limited-size here document to $tmp/defines.sed.
16743 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16744 # Speed up: don't consider the non `#define' lines.
16745 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16746 # Work around the forget-to-reset-the-flag bug.
16747 echo 't clr' >>$CONFIG_STATUS
16748 echo ': clr' >>$CONFIG_STATUS
16749 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016750 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016751 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16752 rm -f $tmp/in
16753 mv $tmp/out $tmp/in
16754' >>$CONFIG_STATUS
16755 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16756 rm -f conftest.defines
16757 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016758done
Martin v. Löwis11437992002-04-12 09:54:03 +000016759rm -f conftest.defines
16760echo ' fi # egrep' >>$CONFIG_STATUS
16761echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016762
Martin v. Löwis11437992002-04-12 09:54:03 +000016763# Break up conftest.undefs because some shells have a limit on the size
16764# of here documents, and old seds have small limits too (100 cmds).
16765echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16766rm -f conftest.tail
16767while grep . conftest.undefs >/dev/null
16768do
16769 # Write a limited-size here document to $tmp/undefs.sed.
16770 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16771 # Speed up: don't consider the non `#undef'
16772 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16773 # Work around the forget-to-reset-the-flag bug.
16774 echo 't clr' >>$CONFIG_STATUS
16775 echo ': clr' >>$CONFIG_STATUS
16776 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16777 echo 'CEOF
16778 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16779 rm -f $tmp/in
16780 mv $tmp/out $tmp/in
16781' >>$CONFIG_STATUS
16782 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16783 rm -f conftest.undefs
16784 mv conftest.tail conftest.undefs
16785done
16786rm -f conftest.undefs
16787
16788cat >>$CONFIG_STATUS <<\_ACEOF
16789 # Let's still pretend it is `configure' which instantiates (i.e., don't
16790 # use $as_me), people would be surprised to read:
16791 # /* config.h. Generated by config.status. */
16792 if test x"$ac_file" = x-; then
16793 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016794 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016795 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016797 cat $tmp/in >>$tmp/config.h
16798 rm -f $tmp/in
16799 if test x"$ac_file" != x-; then
16800 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16801 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16802echo "$as_me: $ac_file is unchanged" >&6;}
16803 else
16804 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16805$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16806 X"$ac_file" : 'X\(//\)[^/]' \| \
16807 X"$ac_file" : 'X\(//\)$' \| \
16808 X"$ac_file" : 'X\(/\)' \| \
16809 . : '\(.\)' 2>/dev/null ||
16810echo X"$ac_file" |
16811 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16812 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16813 /^X\(\/\/\)$/{ s//\1/; q; }
16814 /^X\(\/\).*/{ s//\1/; q; }
16815 s/.*/./; q'`
16816 { case "$ac_dir" in
16817 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16818 *) as_incr_dir=.;;
16819esac
16820as_dummy="$ac_dir"
16821for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16822 case $as_mkdir_dir in
16823 # Skip DOS drivespec
16824 ?:) as_incr_dir=$as_mkdir_dir ;;
16825 *)
16826 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16827 test -d "$as_incr_dir" ||
16828 mkdir "$as_incr_dir" ||
16829 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16830echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16831 { (exit 1); exit 1; }; }
16832 ;;
16833 esac
16834done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016835
Martin v. Löwis11437992002-04-12 09:54:03 +000016836 rm -f $ac_file
16837 mv $tmp/config.h $ac_file
16838 fi
16839 else
16840 cat $tmp/config.h
16841 rm -f $tmp/config.h
16842 fi
16843done
16844_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016845
Martin v. Löwis11437992002-04-12 09:54:03 +000016846cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016847
Martin v. Löwis11437992002-04-12 09:54:03 +000016848{ (exit 0); exit 0; }
16849_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016850chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016851ac_clean_files=$ac_clean_files_save
16852
16853
16854# configure is writing to config.log, and then calls config.status.
16855# config.status does its own redirection, appending to config.log.
16856# Unfortunately, on DOS this fails, as config.log is still kept open
16857# by configure, so config.status won't be able to write to it; its
16858# output is simply discarded. So we exec the FD to /dev/null,
16859# effectively closing config.log, so it can be properly (re)opened and
16860# appended to by config.status. When coming back to configure, we
16861# need to make the FD available again.
16862if test "$no_create" != yes; then
16863 ac_cs_success=:
16864 exec 5>/dev/null
16865 $SHELL $CONFIG_STATUS || ac_cs_success=false
16866 exec 5>>config.log
16867 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16868 # would make configure fail if this is the last instruction.
16869 $ac_cs_success || { (exit 1); exit 1; }
16870fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016871
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016872
16873echo "creating Setup"
16874if test ! -f Modules/Setup
16875then
16876 cp $srcdir/Modules/Setup.dist Modules/Setup
16877fi
16878
16879echo "creating Setup.local"
16880if test ! -f Modules/Setup.local
16881then
16882 echo "# Edit this file for local setup changes" >Modules/Setup.local
16883fi
16884
16885echo "creating Makefile"
16886$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16887 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016888 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016889mv config.c Modules