blob: 9024bcb718f1d480240195c815e46a06760c9221 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +00002# From configure.in Revision: 1.335 .
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
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001228# The later defininition of _XOPEN_SOURCE disables certain features
1229# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1230
1231cat >>confdefs.h <<\_ACEOF
1232#define _GNU_SOURCE 1
1233_ACEOF
1234
1235
1236# The definition of _GNU_SOURCE potentially causes a change of the value
1237# of _XOPEN_SOURCE. So define it only conditionally.
1238
1239
1240cat >>confdefs.h <<\_ACEOF
1241#define _XOPEN_SOURCE 500
1242_ACEOF
1243
1244
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001245# Arguments passed to configure.
1246
1247CONFIG_ARGS="$ac_configure_args"
1248
Michael W. Hudson54241132001-12-07 15:38:26 +00001249
Jack Jansene578a632001-08-15 01:27:14 +00001250# Check whether --enable-framework or --disable-framework was given.
1251if test "${enable_framework+set}" = set; then
1252 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
Jack Jansene578a632001-08-15 01:27:14 +00001254 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001256 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001257 esac
1258 case $enableval in
1259 no)
1260 PYTHONFRAMEWORK=
1261 PYTHONFRAMEWORKDIR=no-framework
1262 PYTHONFRAMEWORKPREFIX=
1263 PYTHONFRAMEWORKINSTALLDIR=
1264 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001265 ;;
1266 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001267 PYTHONFRAMEWORK=Python
1268 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001269 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001270 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1271 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001272 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001273
Guido van Rossum563e7081996-09-10 18:20:48 +00001274else
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
Jack Jansene578a632001-08-15 01:27:14 +00001276 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001277 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001278 PYTHONFRAMEWORKPREFIX=
1279 PYTHONFRAMEWORKINSTALLDIR=
1280 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001281
Martin v. Löwis11437992002-04-12 09:54:03 +00001282fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001283
1284
1285
1286
Jack Jansene578a632001-08-15 01:27:14 +00001287
1288##AC_ARG_WITH(dyld,
1289##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1290##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001291# Set name for machine-dependent library files
1292
Martin v. Löwis11437992002-04-12 09:54:03 +00001293echo "$as_me:$LINENO: checking MACHDEP" >&5
1294echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001295if test -z "$MACHDEP"
1296then
Guido van Rossum563e7081996-09-10 18:20:48 +00001297 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001298 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001299 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001300 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001301 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001302 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001303 ac_md_system=`echo $ac_sys_system |
1304 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1305 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001306 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001307 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001308
Guido van Rossum07397971997-04-29 21:49:50 +00001309 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001310 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001311 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001312 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001313 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001314 esac
1315fi
Guido van Rossum91922671997-10-09 20:24:13 +00001316
1317#
1318# SGI compilers allow the specification of the both the ABI and the
1319# ISA on the command line. Depending on the values of these switches,
1320# different and often incompatable code will be generated.
1321#
1322# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1323# thus supply support for various ABI/ISA combinations. The MACHDEP
1324# variable is also adjusted.
1325#
1326
1327if test ! -z "$SGI_ABI"
1328then
1329 CC="cc $SGI_ABI"
1330 LDFLAGS="$SGI_ABI $LDFLAGS"
1331 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1332fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001333echo "$as_me:$LINENO: result: $MACHDEP" >&5
1334echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001337echo "$as_me:$LINENO: checking for --without-gcc" >&5
1338echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1339
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001340# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001341if test "${with_gcc+set}" = set; then
1342 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001343
Guido van Rossum7f43da71994-08-01 12:15:30 +00001344 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001345 no) CC=cc
1346 without_gcc=yes;;
1347 yes) CC=gcc
1348 without_gcc=no;;
1349 *) CC=$withval
1350 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001351 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001352else
Martin v. Löwis11437992002-04-12 09:54:03 +00001353
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001354 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001355 AIX*) CC=cc_r
1356 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001357 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001358 case $BE_HOST_CPU in
1359 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001360 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001361 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001362 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001363 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001364 ;;
1365 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001366 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001367 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001368 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001369 ;;
1370 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001371 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1372echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1373 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001374 ;;
1375 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001376 AR="\$(srcdir)/Modules/ar_beos"
1377 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001378 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001379 Monterey*)
1380 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001381 without_gcc=;;
1382 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001383 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001384fi;
1385echo "$as_me:$LINENO: result: $without_gcc" >&5
1386echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001387
1388
Guido van Rossum95012191999-12-16 17:50:52 +00001389
Fred Drakea1a84e72001-03-06 05:52:16 +00001390MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001391echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1392echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1393
Guido van Rossum95012191999-12-16 17:50:52 +00001394# Check whether --with-cxx or --without-cxx was given.
1395if test "${with_cxx+set}" = set; then
1396 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
Martin v. Löwis22352952000-12-13 17:37:02 +00001398 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001399 case $withval in
1400 no) CXX=
1401 with_cxx=no;;
1402 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001403 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001404 with_cxx=$withval;;
1405 esac
1406else
Martin v. Löwis11437992002-04-12 09:54:03 +00001407
Guido van Rossum95012191999-12-16 17:50:52 +00001408 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001409 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001410
Martin v. Löwis11437992002-04-12 09:54:03 +00001411fi;
1412echo "$as_me:$LINENO: result: $with_cxx" >&5
1413echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001414
1415if test "$with_cxx" = "yes"
1416then
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1418echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1419 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001420fi
1421
1422
1423
1424
Martin v. Löwis11437992002-04-12 09:54:03 +00001425if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001426then
1427 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1428do
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 # 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 +00001430set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001431echo "$as_me:$LINENO: checking for $ac_word" >&5
1432echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1433if test "${ac_cv_prog_CXX+set}" = set; then
1434 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001435else
1436 if test -n "$CXX"; then
1437 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1438else
Martin v. Löwis11437992002-04-12 09:54:03 +00001439as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1440for as_dir in $PATH
1441do
1442 IFS=$as_save_IFS
1443 test -z "$as_dir" && as_dir=.
1444 for ac_exec_ext in '' $ac_executable_extensions; do
1445 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1446 ac_cv_prog_CXX="$ac_prog"
1447 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1448 break 2
1449 fi
1450done
1451done
1452
Martin v. Löwis22352952000-12-13 17:37:02 +00001453fi
1454fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001455CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001456if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 echo "$as_me:$LINENO: result: $CXX" >&5
1458echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001459else
Martin v. Löwis11437992002-04-12 09:54:03 +00001460 echo "$as_me:$LINENO: result: no" >&5
1461echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001462fi
1463
Martin v. Löwis11437992002-04-12 09:54:03 +00001464 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001465done
1466test -n "$CXX" || CXX="notfound"
1467
1468 if test "$CXX" = "notfound"
1469 then
1470 CXX=
1471 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001473ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001474ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1475ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1476ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1477 cat >conftest.$ac_ext <<_ACEOF
1478#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001479#include "confdefs.h"
1480
Martin v. Löwis11437992002-04-12 09:54:03 +00001481#ifdef F77_DUMMY_MAIN
1482# ifdef __cplusplus
1483 extern "C"
1484# endif
1485 int F77_DUMMY_MAIN() { return 1; }
1486#endif
1487int
1488main ()
1489{
Michael W. Hudson54241132001-12-07 15:38:26 +00001490
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 ;
1492 return 0;
1493}
1494_ACEOF
1495ac_clean_files_save=$ac_clean_files
1496ac_clean_files="$ac_clean_files a.out a.exe"
1497# Try to create an executable without -o first, disregard a.out.
1498# It will help us diagnose broken compilers, and finding out an intuition
1499# of exeext.
1500echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1501echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1502ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1503if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1504 (eval $ac_link_default) 2>&5
1505 ac_status=$?
1506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1507 (exit $ac_status); }; then
1508 # Find the output, starting from the most likely. This scheme is
1509# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1510# resort.
1511
1512# Be careful to initialize this variable, since it used to be cached.
1513# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1514ac_cv_exeext=
1515for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1516 ls a.out conftest 2>/dev/null;
1517 ls a.* conftest.* 2>/dev/null`; do
1518 case $ac_file in
1519 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1520 a.out ) # We found the default executable, but exeext='' is most
1521 # certainly right.
1522 break;;
1523 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1524 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1525 export ac_cv_exeext
1526 break;;
1527 * ) break;;
1528 esac
1529done
1530else
1531 echo "$as_me: failed program was:" >&5
1532cat conftest.$ac_ext >&5
1533{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1534echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1535 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001536fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001537
1538ac_exeext=$ac_cv_exeext
1539echo "$as_me:$LINENO: result: $ac_file" >&5
1540echo "${ECHO_T}$ac_file" >&6
1541
1542# Check the compiler produces executables we can run. If not, either
1543# the compiler is broken, or we cross compile.
1544echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1545echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1546# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1547# If not cross compiling, check that we can run a simple program.
1548if test "$cross_compiling" != yes; then
1549 if { ac_try='./$ac_file'
1550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1551 (eval $ac_try) 2>&5
1552 ac_status=$?
1553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1554 (exit $ac_status); }; }; then
1555 cross_compiling=no
1556 else
1557 if test "$cross_compiling" = maybe; then
1558 cross_compiling=yes
1559 else
1560 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1561If you meant to cross compile, use \`--host'." >&5
1562echo "$as_me: error: cannot run C++ compiled programs.
1563If you meant to cross compile, use \`--host'." >&2;}
1564 { (exit 1); exit 1; }; }
1565 fi
1566 fi
1567fi
1568echo "$as_me:$LINENO: result: yes" >&5
1569echo "${ECHO_T}yes" >&6
1570
1571rm -f a.out a.exe conftest$ac_cv_exeext
1572ac_clean_files=$ac_clean_files_save
1573# Check the compiler produces executables we can run. If not, either
1574# the compiler is broken, or we cross compile.
1575echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1576echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1577echo "$as_me:$LINENO: result: $cross_compiling" >&5
1578echo "${ECHO_T}$cross_compiling" >&6
1579
1580echo "$as_me:$LINENO: checking for suffix of executables" >&5
1581echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1582if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1583 (eval $ac_link) 2>&5
1584 ac_status=$?
1585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1586 (exit $ac_status); }; then
1587 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1588# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1589# work properly (i.e., refer to `conftest.exe'), while it won't with
1590# `rm'.
1591for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1592 case $ac_file in
1593 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1594 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1595 export ac_cv_exeext
1596 break;;
1597 * ) break;;
1598 esac
1599done
1600else
1601 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1602echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1603 { (exit 1); exit 1; }; }
1604fi
1605
1606rm -f conftest$ac_cv_exeext
1607echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1608echo "${ECHO_T}$ac_cv_exeext" >&6
1609
1610rm -f conftest.$ac_ext
1611EXEEXT=$ac_cv_exeext
1612ac_exeext=$EXEEXT
1613
1614 ac_ext=c
1615ac_cpp='$CPP $CPPFLAGS'
1616ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1617ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1618ac_compiler_gnu=$ac_cv_c_compiler_gnu
1619
1620
Martin v. Löwis22352952000-12-13 17:37:02 +00001621
1622 fi
1623fi
1624
Guido van Rossum8b131c51995-03-09 14:10:13 +00001625# If the user switches compilers, we can't believe the cache
1626if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1627then
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1629(it is also a good idea to do 'make clean' before compiling)" >&5
1630echo "$as_me: error: cached CC is different -- throw away $cache_file
1631(it is also a good idea to do 'make clean' before compiling)" >&2;}
1632 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001633fi
1634
Martin v. Löwis11437992002-04-12 09:54:03 +00001635ac_ext=c
1636ac_cpp='$CPP $CPPFLAGS'
1637ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1638ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1639ac_compiler_gnu=$ac_cv_c_compiler_gnu
1640if test -n "$ac_tool_prefix"; then
1641 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1642set dummy ${ac_tool_prefix}gcc; ac_word=$2
1643echo "$as_me:$LINENO: checking for $ac_word" >&5
1644echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1645if test "${ac_cv_prog_CC+set}" = set; then
1646 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001647else
1648 if test -n "$CC"; then
1649 ac_cv_prog_CC="$CC" # Let the user override the test.
1650else
Martin v. Löwis11437992002-04-12 09:54:03 +00001651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1652for as_dir in $PATH
1653do
1654 IFS=$as_save_IFS
1655 test -z "$as_dir" && as_dir=.
1656 for ac_exec_ext in '' $ac_executable_extensions; do
1657 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1658 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1659 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1660 break 2
1661 fi
1662done
1663done
1664
Jack Jansendd19cf82001-12-06 22:36:17 +00001665fi
1666fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001667CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001668if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001669 echo "$as_me:$LINENO: result: $CC" >&5
1670echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001671else
Martin v. Löwis11437992002-04-12 09:54:03 +00001672 echo "$as_me:$LINENO: result: no" >&5
1673echo "${ECHO_T}no" >&6
1674fi
1675
1676fi
1677if test -z "$ac_cv_prog_CC"; then
1678 ac_ct_CC=$CC
1679 # Extract the first word of "gcc", so it can be a program name with args.
1680set dummy gcc; ac_word=$2
1681echo "$as_me:$LINENO: checking for $ac_word" >&5
1682echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1683if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1684 echo $ECHO_N "(cached) $ECHO_C" >&6
1685else
1686 if test -n "$ac_ct_CC"; then
1687 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1688else
1689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1690for as_dir in $PATH
1691do
1692 IFS=$as_save_IFS
1693 test -z "$as_dir" && as_dir=.
1694 for ac_exec_ext in '' $ac_executable_extensions; do
1695 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1696 ac_cv_prog_ac_ct_CC="gcc"
1697 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1698 break 2
1699 fi
1700done
1701done
1702
1703fi
1704fi
1705ac_ct_CC=$ac_cv_prog_ac_ct_CC
1706if test -n "$ac_ct_CC"; then
1707 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1708echo "${ECHO_T}$ac_ct_CC" >&6
1709else
1710 echo "$as_me:$LINENO: result: no" >&5
1711echo "${ECHO_T}no" >&6
1712fi
1713
1714 CC=$ac_ct_CC
1715else
1716 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001717fi
1718
Jack Jansendd19cf82001-12-06 22:36:17 +00001719if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 if test -n "$ac_tool_prefix"; then
1721 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1722set dummy ${ac_tool_prefix}cc; ac_word=$2
1723echo "$as_me:$LINENO: checking for $ac_word" >&5
1724echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1725if test "${ac_cv_prog_CC+set}" = set; then
1726 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001727else
1728 if test -n "$CC"; then
1729 ac_cv_prog_CC="$CC" # Let the user override the test.
1730else
Martin v. Löwis11437992002-04-12 09:54:03 +00001731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1732for as_dir in $PATH
1733do
1734 IFS=$as_save_IFS
1735 test -z "$as_dir" && as_dir=.
1736 for ac_exec_ext in '' $ac_executable_extensions; do
1737 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1738 ac_cv_prog_CC="${ac_tool_prefix}cc"
1739 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1740 break 2
1741 fi
1742done
1743done
1744
1745fi
1746fi
1747CC=$ac_cv_prog_CC
1748if test -n "$CC"; then
1749 echo "$as_me:$LINENO: result: $CC" >&5
1750echo "${ECHO_T}$CC" >&6
1751else
1752 echo "$as_me:$LINENO: result: no" >&5
1753echo "${ECHO_T}no" >&6
1754fi
1755
1756fi
1757if test -z "$ac_cv_prog_CC"; then
1758 ac_ct_CC=$CC
1759 # Extract the first word of "cc", so it can be a program name with args.
1760set dummy cc; ac_word=$2
1761echo "$as_me:$LINENO: checking for $ac_word" >&5
1762echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1763if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1764 echo $ECHO_N "(cached) $ECHO_C" >&6
1765else
1766 if test -n "$ac_ct_CC"; then
1767 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1768else
1769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1770for as_dir in $PATH
1771do
1772 IFS=$as_save_IFS
1773 test -z "$as_dir" && as_dir=.
1774 for ac_exec_ext in '' $ac_executable_extensions; do
1775 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1776 ac_cv_prog_ac_ct_CC="cc"
1777 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1778 break 2
1779 fi
1780done
1781done
1782
1783fi
1784fi
1785ac_ct_CC=$ac_cv_prog_ac_ct_CC
1786if test -n "$ac_ct_CC"; then
1787 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1788echo "${ECHO_T}$ac_ct_CC" >&6
1789else
1790 echo "$as_me:$LINENO: result: no" >&5
1791echo "${ECHO_T}no" >&6
1792fi
1793
1794 CC=$ac_ct_CC
1795else
1796 CC="$ac_cv_prog_CC"
1797fi
1798
1799fi
1800if test -z "$CC"; then
1801 # Extract the first word of "cc", so it can be a program name with args.
1802set dummy cc; ac_word=$2
1803echo "$as_me:$LINENO: checking for $ac_word" >&5
1804echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1805if test "${ac_cv_prog_CC+set}" = set; then
1806 echo $ECHO_N "(cached) $ECHO_C" >&6
1807else
1808 if test -n "$CC"; then
1809 ac_cv_prog_CC="$CC" # Let the user override the test.
1810else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001811 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1813for as_dir in $PATH
1814do
1815 IFS=$as_save_IFS
1816 test -z "$as_dir" && as_dir=.
1817 for ac_exec_ext in '' $ac_executable_extensions; do
1818 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1819 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1820 ac_prog_rejected=yes
1821 continue
1822 fi
1823 ac_cv_prog_CC="cc"
1824 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1825 break 2
1826 fi
1827done
1828done
1829
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001830if test $ac_prog_rejected = yes; then
1831 # We found a bogon in the path, so make sure we never use it.
1832 set dummy $ac_cv_prog_CC
1833 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001834 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001835 # We chose a different compiler from the bogus one.
1836 # However, it has the same basename, so the bogon will be chosen
1837 # first if we set CC to just the basename; use the full file name.
1838 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001839 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001840 shift
1841 ac_cv_prog_CC="$@"
1842 fi
1843fi
1844fi
1845fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001846CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001847if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001848 echo "$as_me:$LINENO: result: $CC" >&5
1849echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001850else
Martin v. Löwis11437992002-04-12 09:54:03 +00001851 echo "$as_me:$LINENO: result: no" >&5
1852echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001853fi
1854
Martin v. Löwis11437992002-04-12 09:54:03 +00001855fi
1856if test -z "$CC"; then
1857 if test -n "$ac_tool_prefix"; then
1858 for ac_prog in cl
1859 do
1860 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1861set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1862echo "$as_me:$LINENO: checking for $ac_word" >&5
1863echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1864if test "${ac_cv_prog_CC+set}" = set; then
1865 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001866else
1867 if test -n "$CC"; then
1868 ac_cv_prog_CC="$CC" # Let the user override the test.
1869else
Martin v. Löwis11437992002-04-12 09:54:03 +00001870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1871for as_dir in $PATH
1872do
1873 IFS=$as_save_IFS
1874 test -z "$as_dir" && as_dir=.
1875 for ac_exec_ext in '' $ac_executable_extensions; do
1876 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1877 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1878 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1879 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001880 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001881done
1882done
1883
1884fi
1885fi
1886CC=$ac_cv_prog_CC
1887if test -n "$CC"; then
1888 echo "$as_me:$LINENO: result: $CC" >&5
1889echo "${ECHO_T}$CC" >&6
1890else
1891 echo "$as_me:$LINENO: result: no" >&5
1892echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001893fi
1894
Martin v. Löwis11437992002-04-12 09:54:03 +00001895 test -n "$CC" && break
1896 done
1897fi
1898if test -z "$CC"; then
1899 ac_ct_CC=$CC
1900 for ac_prog in cl
1901do
1902 # Extract the first word of "$ac_prog", so it can be a program name with args.
1903set dummy $ac_prog; ac_word=$2
1904echo "$as_me:$LINENO: checking for $ac_word" >&5
1905echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1906if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1907 echo $ECHO_N "(cached) $ECHO_C" >&6
1908else
1909 if test -n "$ac_ct_CC"; then
1910 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1911else
1912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1913for as_dir in $PATH
1914do
1915 IFS=$as_save_IFS
1916 test -z "$as_dir" && as_dir=.
1917 for ac_exec_ext in '' $ac_executable_extensions; do
1918 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1919 ac_cv_prog_ac_ct_CC="$ac_prog"
1920 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1921 break 2
1922 fi
1923done
1924done
Jack Jansendd19cf82001-12-06 22:36:17 +00001925
Martin v. Löwis11437992002-04-12 09:54:03 +00001926fi
1927fi
1928ac_ct_CC=$ac_cv_prog_ac_ct_CC
1929if test -n "$ac_ct_CC"; then
1930 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1931echo "${ECHO_T}$ac_ct_CC" >&6
1932else
1933 echo "$as_me:$LINENO: result: no" >&5
1934echo "${ECHO_T}no" >&6
1935fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001936
Martin v. Löwis11437992002-04-12 09:54:03 +00001937 test -n "$ac_ct_CC" && break
1938done
Michael W. Hudson54241132001-12-07 15:38:26 +00001939
Martin v. Löwis11437992002-04-12 09:54:03 +00001940 CC=$ac_ct_CC
1941fi
1942
1943fi
1944
1945
1946test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1947echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1948 { (exit 1); exit 1; }; }
1949
1950# Provide some information about the compiler.
1951echo "$as_me:$LINENO:" \
1952 "checking for C compiler version" >&5
1953ac_compiler=`set X $ac_compile; echo $2`
1954{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1955 (eval $ac_compiler --version </dev/null >&5) 2>&5
1956 ac_status=$?
1957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1958 (exit $ac_status); }
1959{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1960 (eval $ac_compiler -v </dev/null >&5) 2>&5
1961 ac_status=$?
1962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1963 (exit $ac_status); }
1964{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1965 (eval $ac_compiler -V </dev/null >&5) 2>&5
1966 ac_status=$?
1967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1968 (exit $ac_status); }
1969
1970cat >conftest.$ac_ext <<_ACEOF
1971#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001972#include "confdefs.h"
1973
Martin v. Löwis11437992002-04-12 09:54:03 +00001974#ifdef F77_DUMMY_MAIN
1975# ifdef __cplusplus
1976 extern "C"
1977# endif
1978 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001980int
1981main ()
1982{
1983
1984 ;
1985 return 0;
1986}
1987_ACEOF
1988ac_clean_files_save=$ac_clean_files
1989ac_clean_files="$ac_clean_files a.out a.exe"
1990# Try to create an executable without -o first, disregard a.out.
1991# It will help us diagnose broken compilers, and finding out an intuition
1992# of exeext.
1993echo "$as_me:$LINENO: checking for C compiler default output" >&5
1994echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1995ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1996if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1997 (eval $ac_link_default) 2>&5
1998 ac_status=$?
1999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2000 (exit $ac_status); }; then
2001 # Find the output, starting from the most likely. This scheme is
2002# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2003# resort.
2004
2005# Be careful to initialize this variable, since it used to be cached.
2006# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2007ac_cv_exeext=
2008for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2009 ls a.out conftest 2>/dev/null;
2010 ls a.* conftest.* 2>/dev/null`; do
2011 case $ac_file in
2012 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2013 a.out ) # We found the default executable, but exeext='' is most
2014 # certainly right.
2015 break;;
2016 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2017 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2018 export ac_cv_exeext
2019 break;;
2020 * ) break;;
2021 esac
2022done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002023else
Martin v. Löwis11437992002-04-12 09:54:03 +00002024 echo "$as_me: failed program was:" >&5
2025cat conftest.$ac_ext >&5
2026{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2027echo "$as_me: error: C compiler cannot create executables" >&2;}
2028 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002029fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002030
Martin v. Löwis11437992002-04-12 09:54:03 +00002031ac_exeext=$ac_cv_exeext
2032echo "$as_me:$LINENO: result: $ac_file" >&5
2033echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002034
Martin v. Löwis11437992002-04-12 09:54:03 +00002035# Check the compiler produces executables we can run. If not, either
2036# the compiler is broken, or we cross compile.
2037echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2038echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2039# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2040# If not cross compiling, check that we can run a simple program.
2041if test "$cross_compiling" != yes; then
2042 if { ac_try='./$ac_file'
2043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2044 (eval $ac_try) 2>&5
2045 ac_status=$?
2046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2047 (exit $ac_status); }; }; then
2048 cross_compiling=no
2049 else
2050 if test "$cross_compiling" = maybe; then
2051 cross_compiling=yes
2052 else
2053 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2054If you meant to cross compile, use \`--host'." >&5
2055echo "$as_me: error: cannot run C compiled programs.
2056If you meant to cross compile, use \`--host'." >&2;}
2057 { (exit 1); exit 1; }; }
2058 fi
2059 fi
2060fi
2061echo "$as_me:$LINENO: result: yes" >&5
2062echo "${ECHO_T}yes" >&6
2063
2064rm -f a.out a.exe conftest$ac_cv_exeext
2065ac_clean_files=$ac_clean_files_save
2066# Check the compiler produces executables we can run. If not, either
2067# the compiler is broken, or we cross compile.
2068echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2069echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2070echo "$as_me:$LINENO: result: $cross_compiling" >&5
2071echo "${ECHO_T}$cross_compiling" >&6
2072
2073echo "$as_me:$LINENO: checking for suffix of executables" >&5
2074echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2075if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2076 (eval $ac_link) 2>&5
2077 ac_status=$?
2078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2079 (exit $ac_status); }; then
2080 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2081# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2082# work properly (i.e., refer to `conftest.exe'), while it won't with
2083# `rm'.
2084for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2085 case $ac_file in
2086 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2087 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2088 export ac_cv_exeext
2089 break;;
2090 * ) break;;
2091 esac
2092done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002093else
Martin v. Löwis11437992002-04-12 09:54:03 +00002094 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2095echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2096 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002097fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002098
Martin v. Löwis11437992002-04-12 09:54:03 +00002099rm -f conftest$ac_cv_exeext
2100echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2101echo "${ECHO_T}$ac_cv_exeext" >&6
2102
2103rm -f conftest.$ac_ext
2104EXEEXT=$ac_cv_exeext
2105ac_exeext=$EXEEXT
2106echo "$as_me:$LINENO: checking for suffix of object files" >&5
2107echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2108if test "${ac_cv_objext+set}" = set; then
2109 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002110else
Martin v. Löwis11437992002-04-12 09:54:03 +00002111 cat >conftest.$ac_ext <<_ACEOF
2112#line $LINENO "configure"
2113#include "confdefs.h"
2114
2115#ifdef F77_DUMMY_MAIN
2116# ifdef __cplusplus
2117 extern "C"
2118# endif
2119 int F77_DUMMY_MAIN() { return 1; }
2120#endif
2121int
2122main ()
2123{
2124
2125 ;
2126 return 0;
2127}
2128_ACEOF
2129rm -f conftest.o conftest.obj
2130if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2131 (eval $ac_compile) 2>&5
2132 ac_status=$?
2133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2134 (exit $ac_status); }; then
2135 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2136 case $ac_file in
2137 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2138 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2139 break;;
2140 esac
2141done
2142else
2143 echo "$as_me: failed program was:" >&5
2144cat conftest.$ac_ext >&5
2145{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2146echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2147 { (exit 1); exit 1; }; }
2148fi
2149
2150rm -f conftest.$ac_cv_objext conftest.$ac_ext
2151fi
2152echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2153echo "${ECHO_T}$ac_cv_objext" >&6
2154OBJEXT=$ac_cv_objext
2155ac_objext=$OBJEXT
2156echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2157echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2158if test "${ac_cv_c_compiler_gnu+set}" = set; then
2159 echo $ECHO_N "(cached) $ECHO_C" >&6
2160else
2161 cat >conftest.$ac_ext <<_ACEOF
2162#line $LINENO "configure"
2163#include "confdefs.h"
2164
2165#ifdef F77_DUMMY_MAIN
2166# ifdef __cplusplus
2167 extern "C"
2168# endif
2169 int F77_DUMMY_MAIN() { return 1; }
2170#endif
2171int
2172main ()
2173{
2174#ifndef __GNUC__
2175 choke me
2176#endif
2177
2178 ;
2179 return 0;
2180}
2181_ACEOF
2182rm -f conftest.$ac_objext
2183if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2184 (eval $ac_compile) 2>&5
2185 ac_status=$?
2186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2187 (exit $ac_status); } &&
2188 { ac_try='test -s conftest.$ac_objext'
2189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2190 (eval $ac_try) 2>&5
2191 ac_status=$?
2192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2193 (exit $ac_status); }; }; then
2194 ac_compiler_gnu=yes
2195else
2196 echo "$as_me: failed program was:" >&5
2197cat conftest.$ac_ext >&5
2198ac_compiler_gnu=no
2199fi
2200rm -f conftest.$ac_objext conftest.$ac_ext
2201ac_cv_c_compiler_gnu=$ac_compiler_gnu
2202
2203fi
2204echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2205echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2206GCC=`test $ac_compiler_gnu = yes && echo yes`
2207ac_test_CFLAGS=${CFLAGS+set}
2208ac_save_CFLAGS=$CFLAGS
2209CFLAGS="-g"
2210echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2211echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2212if test "${ac_cv_prog_cc_g+set}" = set; then
2213 echo $ECHO_N "(cached) $ECHO_C" >&6
2214else
2215 cat >conftest.$ac_ext <<_ACEOF
2216#line $LINENO "configure"
2217#include "confdefs.h"
2218
2219#ifdef F77_DUMMY_MAIN
2220# ifdef __cplusplus
2221 extern "C"
2222# endif
2223 int F77_DUMMY_MAIN() { return 1; }
2224#endif
2225int
2226main ()
2227{
2228
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233rm -f conftest.$ac_objext
2234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2235 (eval $ac_compile) 2>&5
2236 ac_status=$?
2237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2238 (exit $ac_status); } &&
2239 { ac_try='test -s conftest.$ac_objext'
2240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2241 (eval $ac_try) 2>&5
2242 ac_status=$?
2243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2244 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002245 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002246else
Martin v. Löwis11437992002-04-12 09:54:03 +00002247 echo "$as_me: failed program was:" >&5
2248cat conftest.$ac_ext >&5
2249ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002250fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002251rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002252fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002253echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2254echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002255if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002256 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002257elif test $ac_cv_prog_cc_g = yes; then
2258 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002259 CFLAGS="-g -O2"
2260 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002261 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002262 fi
2263else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002264 if test "$GCC" = yes; then
2265 CFLAGS="-O2"
2266 else
2267 CFLAGS=
2268 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002269fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002270# Some people use a C++ compiler to compile C. Since we use `exit',
2271# in C++ we need to declare it. In case someone uses the same compiler
2272# for both compiling C and C++ we need to have the C++ compiler decide
2273# the declaration of exit, since it's the most demanding environment.
2274cat >conftest.$ac_ext <<_ACEOF
2275#ifndef __cplusplus
2276 choke me
2277#endif
2278_ACEOF
2279rm -f conftest.$ac_objext
2280if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2281 (eval $ac_compile) 2>&5
2282 ac_status=$?
2283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2284 (exit $ac_status); } &&
2285 { ac_try='test -s conftest.$ac_objext'
2286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2287 (eval $ac_try) 2>&5
2288 ac_status=$?
2289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2290 (exit $ac_status); }; }; then
2291 for ac_declaration in \
2292 ''\
2293 '#include <stdlib.h>' \
2294 'extern "C" void std::exit (int) throw (); using std::exit;' \
2295 'extern "C" void std::exit (int); using std::exit;' \
2296 'extern "C" void exit (int) throw ();' \
2297 'extern "C" void exit (int);' \
2298 'void exit (int);'
2299do
2300 cat >conftest.$ac_ext <<_ACEOF
2301#line $LINENO "configure"
2302#include "confdefs.h"
2303#include <stdlib.h>
2304$ac_declaration
2305#ifdef F77_DUMMY_MAIN
2306# ifdef __cplusplus
2307 extern "C"
2308# endif
2309 int F77_DUMMY_MAIN() { return 1; }
2310#endif
2311int
2312main ()
2313{
2314exit (42);
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319rm -f conftest.$ac_objext
2320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2321 (eval $ac_compile) 2>&5
2322 ac_status=$?
2323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2324 (exit $ac_status); } &&
2325 { ac_try='test -s conftest.$ac_objext'
2326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2327 (eval $ac_try) 2>&5
2328 ac_status=$?
2329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2330 (exit $ac_status); }; }; then
2331 :
2332else
2333 echo "$as_me: failed program was:" >&5
2334cat conftest.$ac_ext >&5
2335continue
2336fi
2337rm -f conftest.$ac_objext conftest.$ac_ext
2338 cat >conftest.$ac_ext <<_ACEOF
2339#line $LINENO "configure"
2340#include "confdefs.h"
2341$ac_declaration
2342#ifdef F77_DUMMY_MAIN
2343# ifdef __cplusplus
2344 extern "C"
2345# endif
2346 int F77_DUMMY_MAIN() { return 1; }
2347#endif
2348int
2349main ()
2350{
2351exit (42);
2352 ;
2353 return 0;
2354}
2355_ACEOF
2356rm -f conftest.$ac_objext
2357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2358 (eval $ac_compile) 2>&5
2359 ac_status=$?
2360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2361 (exit $ac_status); } &&
2362 { ac_try='test -s conftest.$ac_objext'
2363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2364 (eval $ac_try) 2>&5
2365 ac_status=$?
2366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2367 (exit $ac_status); }; }; then
2368 break
2369else
2370 echo "$as_me: failed program was:" >&5
2371cat conftest.$ac_ext >&5
2372fi
2373rm -f conftest.$ac_objext conftest.$ac_ext
2374done
2375rm -f conftest*
2376if test -n "$ac_declaration"; then
2377 echo '#ifdef __cplusplus' >>confdefs.h
2378 echo $ac_declaration >>confdefs.h
2379 echo '#endif' >>confdefs.h
2380fi
2381
2382else
2383 echo "$as_me: failed program was:" >&5
2384cat conftest.$ac_ext >&5
2385fi
2386rm -f conftest.$ac_objext conftest.$ac_ext
2387ac_ext=c
2388ac_cpp='$CPP $CPPFLAGS'
2389ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2390ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2391ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002392
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002393
2394# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002395
2396ac_ext=c
2397ac_cpp='$CPP $CPPFLAGS'
2398ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2399ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2400ac_compiler_gnu=$ac_cv_c_compiler_gnu
2401echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2402echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002403# On Suns, sometimes $CPP names a directory.
2404if test -n "$CPP" && test -d "$CPP"; then
2405 CPP=
2406fi
2407if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002408 if test "${ac_cv_prog_CPP+set}" = set; then
2409 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002410else
Martin v. Löwis11437992002-04-12 09:54:03 +00002411 # Double quotes because CPP needs to be expanded
2412 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2413 do
2414 ac_preproc_ok=false
2415for ac_c_preproc_warn_flag in '' yes
2416do
2417 # Use a header file that comes with gcc, so configuring glibc
2418 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002419 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002420 # not just through cpp. "Syntax error" is here to catch this case.
2421 cat >conftest.$ac_ext <<_ACEOF
2422#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002423#include "confdefs.h"
2424#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002425 Syntax error
2426_ACEOF
2427if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2428 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2429 ac_status=$?
2430 egrep -v '^ *\+' conftest.er1 >conftest.err
2431 rm -f conftest.er1
2432 cat conftest.err >&5
2433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2434 (exit $ac_status); } >/dev/null; then
2435 if test -s conftest.err; then
2436 ac_cpp_err=$ac_c_preproc_warn_flag
2437 else
2438 ac_cpp_err=
2439 fi
2440else
2441 ac_cpp_err=yes
2442fi
2443if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002444 :
2445else
Martin v. Löwis11437992002-04-12 09:54:03 +00002446 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002447 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002448 # Broken: fails on valid input.
2449continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002450fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002451rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002452
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 # OK, works on sane cases. Now check whether non-existent headers
2454 # can be detected and how.
2455 cat >conftest.$ac_ext <<_ACEOF
2456#line $LINENO "configure"
2457#include "confdefs.h"
2458#include <ac_nonexistent.h>
2459_ACEOF
2460if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2461 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2462 ac_status=$?
2463 egrep -v '^ *\+' conftest.er1 >conftest.err
2464 rm -f conftest.er1
2465 cat conftest.err >&5
2466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2467 (exit $ac_status); } >/dev/null; then
2468 if test -s conftest.err; then
2469 ac_cpp_err=$ac_c_preproc_warn_flag
2470 else
2471 ac_cpp_err=
2472 fi
2473else
2474 ac_cpp_err=yes
2475fi
2476if test -z "$ac_cpp_err"; then
2477 # Broken: success on invalid input.
2478continue
2479else
2480 echo "$as_me: failed program was:" >&5
2481 cat conftest.$ac_ext >&5
2482 # Passes both tests.
2483ac_preproc_ok=:
2484break
2485fi
2486rm -f conftest.err conftest.$ac_ext
2487
2488done
2489# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2490rm -f conftest.err conftest.$ac_ext
2491if $ac_preproc_ok; then
2492 break
2493fi
2494
2495 done
2496 ac_cv_prog_CPP=$CPP
2497
2498fi
2499 CPP=$ac_cv_prog_CPP
2500else
2501 ac_cv_prog_CPP=$CPP
2502fi
2503echo "$as_me:$LINENO: result: $CPP" >&5
2504echo "${ECHO_T}$CPP" >&6
2505ac_preproc_ok=false
2506for ac_c_preproc_warn_flag in '' yes
2507do
2508 # Use a header file that comes with gcc, so configuring glibc
2509 # with a fresh cross-compiler works.
2510 # On the NeXT, cc -E runs the code through the compiler's parser,
2511 # not just through cpp. "Syntax error" is here to catch this case.
2512 cat >conftest.$ac_ext <<_ACEOF
2513#line $LINENO "configure"
2514#include "confdefs.h"
2515#include <assert.h>
2516 Syntax error
2517_ACEOF
2518if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2519 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2520 ac_status=$?
2521 egrep -v '^ *\+' conftest.er1 >conftest.err
2522 rm -f conftest.er1
2523 cat conftest.err >&5
2524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2525 (exit $ac_status); } >/dev/null; then
2526 if test -s conftest.err; then
2527 ac_cpp_err=$ac_c_preproc_warn_flag
2528 else
2529 ac_cpp_err=
2530 fi
2531else
2532 ac_cpp_err=yes
2533fi
2534if test -z "$ac_cpp_err"; then
2535 :
2536else
2537 echo "$as_me: failed program was:" >&5
2538 cat conftest.$ac_ext >&5
2539 # Broken: fails on valid input.
2540continue
2541fi
2542rm -f conftest.err conftest.$ac_ext
2543
2544 # OK, works on sane cases. Now check whether non-existent headers
2545 # can be detected and how.
2546 cat >conftest.$ac_ext <<_ACEOF
2547#line $LINENO "configure"
2548#include "confdefs.h"
2549#include <ac_nonexistent.h>
2550_ACEOF
2551if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2552 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2553 ac_status=$?
2554 egrep -v '^ *\+' conftest.er1 >conftest.err
2555 rm -f conftest.er1
2556 cat conftest.err >&5
2557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2558 (exit $ac_status); } >/dev/null; then
2559 if test -s conftest.err; then
2560 ac_cpp_err=$ac_c_preproc_warn_flag
2561 else
2562 ac_cpp_err=
2563 fi
2564else
2565 ac_cpp_err=yes
2566fi
2567if test -z "$ac_cpp_err"; then
2568 # Broken: success on invalid input.
2569continue
2570else
2571 echo "$as_me: failed program was:" >&5
2572 cat conftest.$ac_ext >&5
2573 # Passes both tests.
2574ac_preproc_ok=:
2575break
2576fi
2577rm -f conftest.err conftest.$ac_ext
2578
2579done
2580# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2581rm -f conftest.err conftest.$ac_ext
2582if $ac_preproc_ok; then
2583 :
2584else
2585 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2586echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2587 { (exit 1); exit 1; }; }
2588fi
2589
2590ac_ext=c
2591ac_cpp='$CPP $CPPFLAGS'
2592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2594ac_compiler_gnu=$ac_cv_c_compiler_gnu
2595
2596
2597
2598echo "$as_me:$LINENO: checking for AIX" >&5
2599echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2600cat >conftest.$ac_ext <<_ACEOF
2601#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002602#include "confdefs.h"
2603#ifdef _AIX
2604 yes
2605#endif
2606
Martin v. Löwis11437992002-04-12 09:54:03 +00002607_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002608if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2609 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 echo "$as_me:$LINENO: result: yes" >&5
2611echo "${ECHO_T}yes" >&6
2612cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002613#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002614_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002615
2616else
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 echo "$as_me:$LINENO: result: no" >&5
2618echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002619fi
2620rm -f conftest*
2621
Michael W. Hudson54241132001-12-07 15:38:26 +00002622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2624echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2625if test "${ac_cv_header_stdc+set}" = set; then
2626 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002627else
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 cat >conftest.$ac_ext <<_ACEOF
2629#line $LINENO "configure"
2630#include "confdefs.h"
2631#include <stdlib.h>
2632#include <stdarg.h>
2633#include <string.h>
2634#include <float.h>
2635
2636_ACEOF
2637if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2638 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2639 ac_status=$?
2640 egrep -v '^ *\+' conftest.er1 >conftest.err
2641 rm -f conftest.er1
2642 cat conftest.err >&5
2643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2644 (exit $ac_status); } >/dev/null; then
2645 if test -s conftest.err; then
2646 ac_cpp_err=$ac_c_preproc_warn_flag
2647 else
2648 ac_cpp_err=
2649 fi
2650else
2651 ac_cpp_err=yes
2652fi
2653if test -z "$ac_cpp_err"; then
2654 ac_cv_header_stdc=yes
2655else
2656 echo "$as_me: failed program was:" >&5
2657 cat conftest.$ac_ext >&5
2658 ac_cv_header_stdc=no
2659fi
2660rm -f conftest.err conftest.$ac_ext
2661
2662if test $ac_cv_header_stdc = yes; then
2663 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2664 cat >conftest.$ac_ext <<_ACEOF
2665#line $LINENO "configure"
2666#include "confdefs.h"
2667#include <string.h>
2668
2669_ACEOF
2670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2671 egrep "memchr" >/dev/null 2>&1; then
2672 :
2673else
2674 ac_cv_header_stdc=no
2675fi
2676rm -f conftest*
2677
2678fi
2679
2680if test $ac_cv_header_stdc = yes; then
2681 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2682 cat >conftest.$ac_ext <<_ACEOF
2683#line $LINENO "configure"
2684#include "confdefs.h"
2685#include <stdlib.h>
2686
2687_ACEOF
2688if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2689 egrep "free" >/dev/null 2>&1; then
2690 :
2691else
2692 ac_cv_header_stdc=no
2693fi
2694rm -f conftest*
2695
2696fi
2697
2698if test $ac_cv_header_stdc = yes; then
2699 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2700 if test "$cross_compiling" = yes; then
2701 :
2702else
2703 cat >conftest.$ac_ext <<_ACEOF
2704#line $LINENO "configure"
2705#include "confdefs.h"
2706#include <ctype.h>
2707#if ((' ' & 0x0FF) == 0x020)
2708# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2709# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2710#else
2711# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2712 || ('j' <= (c) && (c) <= 'r') \
2713 || ('s' <= (c) && (c) <= 'z'))
2714# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2715#endif
2716
2717#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2718int
2719main ()
2720{
2721 int i;
2722 for (i = 0; i < 256; i++)
2723 if (XOR (islower (i), ISLOWER (i))
2724 || toupper (i) != TOUPPER (i))
2725 exit(2);
2726 exit (0);
2727}
2728_ACEOF
2729rm -f conftest$ac_exeext
2730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2731 (eval $ac_link) 2>&5
2732 ac_status=$?
2733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2736 (eval $ac_try) 2>&5
2737 ac_status=$?
2738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739 (exit $ac_status); }; }; then
2740 :
2741else
2742 echo "$as_me: program exited with status $ac_status" >&5
2743echo "$as_me: failed program was:" >&5
2744cat conftest.$ac_ext >&5
2745( exit $ac_status )
2746ac_cv_header_stdc=no
2747fi
2748rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2749fi
2750fi
2751fi
2752echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2753echo "${ECHO_T}$ac_cv_header_stdc" >&6
2754if test $ac_cv_header_stdc = yes; then
2755
2756cat >>confdefs.h <<\_ACEOF
2757#define STDC_HEADERS 1
2758_ACEOF
2759
2760fi
2761
2762# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2773 inttypes.h stdint.h unistd.h
2774do
2775as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2776echo "$as_me:$LINENO: checking for $ac_header" >&5
2777echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2778if eval "test \"\${$as_ac_Header+set}\" = set"; then
2779 echo $ECHO_N "(cached) $ECHO_C" >&6
2780else
2781 cat >conftest.$ac_ext <<_ACEOF
2782#line $LINENO "configure"
2783#include "confdefs.h"
2784$ac_includes_default
2785
2786#include <$ac_header>
2787_ACEOF
2788rm -f conftest.$ac_objext
2789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2790 (eval $ac_compile) 2>&5
2791 ac_status=$?
2792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2793 (exit $ac_status); } &&
2794 { ac_try='test -s conftest.$ac_objext'
2795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2796 (eval $ac_try) 2>&5
2797 ac_status=$?
2798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2799 (exit $ac_status); }; }; then
2800 eval "$as_ac_Header=yes"
2801else
2802 echo "$as_me: failed program was:" >&5
2803cat conftest.$ac_ext >&5
2804eval "$as_ac_Header=no"
2805fi
2806rm -f conftest.$ac_objext conftest.$ac_ext
2807fi
2808echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2809echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2810if test `eval echo '${'$as_ac_Header'}'` = yes; then
2811 cat >>confdefs.h <<_ACEOF
2812#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2813_ACEOF
2814
2815fi
2816
2817done
2818
2819
2820if test "${ac_cv_header_minix_config_h+set}" = set; then
2821 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2822echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2823if test "${ac_cv_header_minix_config_h+set}" = set; then
2824 echo $ECHO_N "(cached) $ECHO_C" >&6
2825fi
2826echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2827echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2828else
2829 # Is the header compilable?
2830echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2831echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2832cat >conftest.$ac_ext <<_ACEOF
2833#line $LINENO "configure"
2834#include "confdefs.h"
2835$ac_includes_default
2836#include <minix/config.h>
2837_ACEOF
2838rm -f conftest.$ac_objext
2839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2840 (eval $ac_compile) 2>&5
2841 ac_status=$?
2842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2843 (exit $ac_status); } &&
2844 { ac_try='test -s conftest.$ac_objext'
2845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2846 (eval $ac_try) 2>&5
2847 ac_status=$?
2848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2849 (exit $ac_status); }; }; then
2850 ac_header_compiler=yes
2851else
2852 echo "$as_me: failed program was:" >&5
2853cat conftest.$ac_ext >&5
2854ac_header_compiler=no
2855fi
2856rm -f conftest.$ac_objext conftest.$ac_ext
2857echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2858echo "${ECHO_T}$ac_header_compiler" >&6
2859
2860# Is the header present?
2861echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2862echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2863cat >conftest.$ac_ext <<_ACEOF
2864#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002865#include "confdefs.h"
2866#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002867_ACEOF
2868if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2869 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2870 ac_status=$?
2871 egrep -v '^ *\+' conftest.er1 >conftest.err
2872 rm -f conftest.er1
2873 cat conftest.err >&5
2874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2875 (exit $ac_status); } >/dev/null; then
2876 if test -s conftest.err; then
2877 ac_cpp_err=$ac_c_preproc_warn_flag
2878 else
2879 ac_cpp_err=
2880 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002881else
Martin v. Löwis11437992002-04-12 09:54:03 +00002882 ac_cpp_err=yes
2883fi
2884if test -z "$ac_cpp_err"; then
2885 ac_header_preproc=yes
2886else
2887 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002888 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002890fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002891rm -f conftest.err conftest.$ac_ext
2892echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2893echo "${ECHO_T}$ac_header_preproc" >&6
2894
2895# So? What about this header?
2896case $ac_header_compiler:$ac_header_preproc in
2897 yes:no )
2898 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2899echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2900 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2901echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2902 no:yes )
2903 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2904echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2905 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2906echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2907 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2908echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2909esac
2910echo "$as_me:$LINENO: checking for minix/config.h" >&5
2911echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2912if test "${ac_cv_header_minix_config_h+set}" = set; then
2913 echo $ECHO_N "(cached) $ECHO_C" >&6
2914else
2915 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002916fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002917echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2918echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2919
2920fi
2921if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002922 MINIX=yes
2923else
Martin v. Löwis11437992002-04-12 09:54:03 +00002924 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002925fi
2926
Martin v. Löwis11437992002-04-12 09:54:03 +00002927
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002928if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002929
2930cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002931#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002932_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002933
Martin v. Löwis11437992002-04-12 09:54:03 +00002934
2935cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002936#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002937_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002938
Martin v. Löwis11437992002-04-12 09:54:03 +00002939
2940cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002941#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002942_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002943
2944fi
2945
2946
Michael W. Hudson54241132001-12-07 15:38:26 +00002947
Martin v. Löwis11437992002-04-12 09:54:03 +00002948echo "$as_me:$LINENO: checking for --with-suffix" >&5
2949echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002950
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002951# Check whether --with-suffix or --without-suffix was given.
2952if test "${with_suffix+set}" = set; then
2953 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002955 case $withval in
2956 no) EXEEXT=;;
2957 yes) EXEEXT=.exe;;
2958 *) EXEEXT=$withval;;
2959 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002960fi;
2961echo "$as_me:$LINENO: result: $EXEEXT" >&5
2962echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002963
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002964# Test whether we're running on a non-case-sensitive system, in which
2965# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002966
Martin v. Löwis11437992002-04-12 09:54:03 +00002967echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2968echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00002969if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002970then
Martin v. Löwis11437992002-04-12 09:54:03 +00002971 echo "$as_me:$LINENO: result: yes" >&5
2972echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002973 BUILDEXEEXT=.exe
2974else
Martin v. Löwis11437992002-04-12 09:54:03 +00002975 echo "$as_me:$LINENO: result: no" >&5
2976echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002977 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002978fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002979
Guido van Rossumdd997f71998-10-07 19:58:26 +00002980case $MACHDEP in
2981bsdos*)
2982 case $CC in
2983 gcc) CC="$CC -D_HAVE_BSDI";;
2984 esac;;
2985esac
2986
Guido van Rossum24b1e751997-08-21 02:29:16 +00002987case $ac_sys_system in
2988hp*|HP*)
2989 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002990 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002991 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002992Monterey*)
2993 case $CC in
2994 cc) CC="$CC -Wl,-Bexport";;
2995 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002996SunOS*)
2997 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002998
2999cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003000#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003001_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003002
3003 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003004esac
3005
Michael W. Hudson54241132001-12-07 15:38:26 +00003006
3007
Martin v. Löwis11437992002-04-12 09:54:03 +00003008echo "$as_me:$LINENO: checking LIBRARY" >&5
3009echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003010if test -z "$LIBRARY"
3011then
3012 LIBRARY='libpython$(VERSION).a'
3013fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003014echo "$as_me:$LINENO: result: $LIBRARY" >&5
3015echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003016
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003017# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003018# name of the library into which to insert object files). BLDLIBRARY is also
3019# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3020# is blank as the main program is not linked directly against LDLIBRARY.
3021# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3022# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3023# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3024# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003025#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003026# RUNSHARED is used to run shared python without installed libraries
3027#
3028# INSTSONAME is the name of the shared library that will be use to install
3029# on the system - some systems like version suffix, others don't
3030
3031
Michael W. Hudson54241132001-12-07 15:38:26 +00003032
3033
3034
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003035
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003036LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003037BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003038INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003039DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003040LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003041RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003042
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003043# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003044# If CXX is set, and if it is needed to link a main function that was
3045# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3046# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003047# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003048# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003049
Martin v. Löwis11437992002-04-12 09:54:03 +00003050echo "$as_me:$LINENO: checking LINKCC" >&5
3051echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003052if test -z "$LINKCC"
3053then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003054 if test -z "$CXX"; then
3055 LINKCC="\$(PURIFY) \$(CC)"
3056 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003057 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003058 $CXX -c conftest.$ac_ext 2>&5
3059 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3060 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3061 then
3062 LINKCC="\$(PURIFY) \$(CC)"
3063 else
3064 LINKCC="\$(PURIFY) \$(CXX)"
3065 fi
3066 rm -fr conftest*
3067 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003068 case $ac_sys_system in
3069 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003070 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003071 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003072 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003073 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003074 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003075 esac
3076fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003077echo "$as_me:$LINENO: result: $LINKCC" >&5
3078echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003079
Martin v. Löwis11437992002-04-12 09:54:03 +00003080echo "$as_me:$LINENO: checking for --enable-shared" >&5
3081echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003082# Check whether --enable-shared or --disable-shared was given.
3083if test "${enable_shared+set}" = set; then
3084 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003085
Martin v. Löwis11437992002-04-12 09:54:03 +00003086fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003087
3088if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003089then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003090 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003091 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003092 enable_shared="yes";;
3093 *)
3094 enable_shared="no";;
3095 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003096fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003097echo "$as_me:$LINENO: result: $enable_shared" >&5
3098echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003099
3100
Martin v. Löwis11437992002-04-12 09:54:03 +00003101echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3102echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003103
Guido van Rossumb8552162001-09-05 14:58:11 +00003104# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3105# library that we build, but we do not want to link against it (we
3106# will find it with a -framework option). For this reason there is an
3107# extra variable BLDLIBRARY against which Python and the extension
3108# modules are linked, BLDLIBRARY. This is normally the same as
3109# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003110if test "$enable_framework"
3111then
3112 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3113 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3114 BLDLIBRARY=''
3115else
3116 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003117fi
Jack Jansene578a632001-08-15 01:27:14 +00003118
Martin v. Löwis1142de32002-03-29 16:28:31 +00003119# Other platforms follow
3120if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003121
3122cat >>confdefs.h <<\_ACEOF
3123#define Py_ENABLE_SHARED 1
3124_ACEOF
3125
Martin v. Löwis1142de32002-03-29 16:28:31 +00003126 case $ac_sys_system in
3127 BeOS*)
3128 LDLIBRARY='libpython$(VERSION).so'
3129 ;;
3130 CYGWIN*)
3131 LDLIBRARY='libpython$(VERSION).dll.a'
3132 DLLLIBRARY='libpython$(VERSION).dll'
3133 ;;
3134 SunOS*)
3135 LDLIBRARY='libpython$(VERSION).so'
3136 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3137 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3138 ;;
3139 Linux*)
3140 LDLIBRARY='libpython$(VERSION).so'
3141 BLDLIBRARY='-L. -lpython$(VERSION)'
3142 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3143 INSTSONAME="$LDLIBRARY".$SOVERSION
3144 ;;
3145 hp*|HP*)
3146 LDLIBRARY='libpython$(VERSION).sl'
3147 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3148 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3149 ;;
3150 OSF*)
3151 LDLIBRARY='libpython$(VERSION).so'
3152 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3153 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3154 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003155 atheos*)
3156 LDLIBRARY='libpython$(VERSION).so'
3157 BLDLIBRARY='-L. -lpython$(VERSION)'
3158 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3159 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003160 esac
3161 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3162 case $MACHDEP in
3163 dguxR4)
3164 LDLIBRARY='libpython$(VERSION).so'
3165 OPT="$OPT -pic"
3166 ;;
3167 esac
3168fi
3169
Martin v. Löwis11437992002-04-12 09:54:03 +00003170echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3171echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003172
Martin v. Löwis11437992002-04-12 09:54:03 +00003173if test -n "$ac_tool_prefix"; then
3174 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3175set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3176echo "$as_me:$LINENO: checking for $ac_word" >&5
3177echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3178if test "${ac_cv_prog_RANLIB+set}" = set; then
3179 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003180else
3181 if test -n "$RANLIB"; then
3182 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3183else
Martin v. Löwis11437992002-04-12 09:54:03 +00003184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3185for as_dir in $PATH
3186do
3187 IFS=$as_save_IFS
3188 test -z "$as_dir" && as_dir=.
3189 for ac_exec_ext in '' $ac_executable_extensions; do
3190 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3191 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3192 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3193 break 2
3194 fi
3195done
3196done
3197
Guido van Rossum627b2d71993-12-24 10:39:16 +00003198fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003199fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003200RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003201if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003202 echo "$as_me:$LINENO: result: $RANLIB" >&5
3203echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003204else
Martin v. Löwis11437992002-04-12 09:54:03 +00003205 echo "$as_me:$LINENO: result: no" >&5
3206echo "${ECHO_T}no" >&6
3207fi
3208
3209fi
3210if test -z "$ac_cv_prog_RANLIB"; then
3211 ac_ct_RANLIB=$RANLIB
3212 # Extract the first word of "ranlib", so it can be a program name with args.
3213set dummy ranlib; ac_word=$2
3214echo "$as_me:$LINENO: checking for $ac_word" >&5
3215echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3216if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3217 echo $ECHO_N "(cached) $ECHO_C" >&6
3218else
3219 if test -n "$ac_ct_RANLIB"; then
3220 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3221else
3222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3223for as_dir in $PATH
3224do
3225 IFS=$as_save_IFS
3226 test -z "$as_dir" && as_dir=.
3227 for ac_exec_ext in '' $ac_executable_extensions; do
3228 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3229 ac_cv_prog_ac_ct_RANLIB="ranlib"
3230 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3231 break 2
3232 fi
3233done
3234done
3235
3236 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3237fi
3238fi
3239ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3240if test -n "$ac_ct_RANLIB"; then
3241 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3242echo "${ECHO_T}$ac_ct_RANLIB" >&6
3243else
3244 echo "$as_me:$LINENO: result: no" >&5
3245echo "${ECHO_T}no" >&6
3246fi
3247
3248 RANLIB=$ac_ct_RANLIB
3249else
3250 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003251fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003252
3253
Guido van Rossum7f43da71994-08-01 12:15:30 +00003254for ac_prog in ar aal
3255do
Martin v. Löwis11437992002-04-12 09:54:03 +00003256 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003258echo "$as_me:$LINENO: checking for $ac_word" >&5
3259echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3260if test "${ac_cv_prog_AR+set}" = set; then
3261 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003262else
3263 if test -n "$AR"; then
3264 ac_cv_prog_AR="$AR" # Let the user override the test.
3265else
Martin v. Löwis11437992002-04-12 09:54:03 +00003266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3267for as_dir in $PATH
3268do
3269 IFS=$as_save_IFS
3270 test -z "$as_dir" && as_dir=.
3271 for ac_exec_ext in '' $ac_executable_extensions; do
3272 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3273 ac_cv_prog_AR="$ac_prog"
3274 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3275 break 2
3276 fi
3277done
3278done
3279
Guido van Rossum7f43da71994-08-01 12:15:30 +00003280fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003281fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003282AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003283if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003284 echo "$as_me:$LINENO: result: $AR" >&5
3285echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003286else
Martin v. Löwis11437992002-04-12 09:54:03 +00003287 echo "$as_me:$LINENO: result: no" >&5
3288echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003289fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003290
Martin v. Löwis11437992002-04-12 09:54:03 +00003291 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003292done
3293test -n "$AR" || AR="ar"
3294
Michael W. Hudson54241132001-12-07 15:38:26 +00003295
Neil Schemenauera42c8272001-03-31 00:01:55 +00003296case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003297bsdos*|hp*|HP*)
3298 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003299 if test -z "$INSTALL"
3300 then
3301 INSTALL="${srcdir}/install-sh -c"
3302 fi
3303esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003304ac_aux_dir=
3305for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3306 if test -f $ac_dir/install-sh; then
3307 ac_aux_dir=$ac_dir
3308 ac_install_sh="$ac_aux_dir/install-sh -c"
3309 break
3310 elif test -f $ac_dir/install.sh; then
3311 ac_aux_dir=$ac_dir
3312 ac_install_sh="$ac_aux_dir/install.sh -c"
3313 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003314 elif test -f $ac_dir/shtool; then
3315 ac_aux_dir=$ac_dir
3316 ac_install_sh="$ac_aux_dir/shtool install -c"
3317 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003318 fi
3319done
3320if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003321 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3322echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3323 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003324fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003325ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3326ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3327ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003328
3329# Find a good install program. We prefer a C program (faster),
3330# so one script is as good as another. But avoid the broken or
3331# incompatible versions:
3332# SysV /etc/install, /usr/sbin/install
3333# SunOS /usr/etc/install
3334# IRIX /sbin/install
3335# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003336# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003337# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3338# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3339# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3340# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003341echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3342echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003343if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003344if test "${ac_cv_path_install+set}" = set; then
3345 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003346else
Martin v. Löwis11437992002-04-12 09:54:03 +00003347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3348for as_dir in $PATH
3349do
3350 IFS=$as_save_IFS
3351 test -z "$as_dir" && as_dir=.
3352 # Account for people who put trailing slashes in PATH elements.
3353case $as_dir/ in
3354 ./ | .// | /cC/* | \
3355 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3356 /usr/ucb/* ) ;;
3357 *)
3358 # OSF1 and SCO ODT 3.0 have their own names for install.
3359 # Don't use installbsd from OSF since it installs stuff as root
3360 # by default.
3361 for ac_prog in ginstall scoinst install; do
3362 for ac_exec_ext in '' $ac_executable_extensions; do
3363 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3364 if test $ac_prog = install &&
3365 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3366 # AIX install. It has an incompatible calling convention.
3367 :
3368 elif test $ac_prog = install &&
3369 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3370 # program-specific install script used by HP pwplus--don't use.
3371 :
3372 else
3373 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3374 break 3
3375 fi
3376 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003377 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003378 done
3379 ;;
3380esac
3381done
3382
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003383
3384fi
3385 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003386 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003387 else
3388 # As a last resort, use the slow shell script. We don't cache a
3389 # path for INSTALL within a source directory, because that will
3390 # break other packages using the cache if that directory is
3391 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003392 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003393 fi
3394fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003395echo "$as_me:$LINENO: result: $INSTALL" >&5
3396echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003397
3398# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3399# It thinks the first close brace ends the variable substitution.
3400test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3401
Martin v. Löwis11437992002-04-12 09:54:03 +00003402test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003403
3404test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3405
Michael W. Hudson54241132001-12-07 15:38:26 +00003406
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003407# Not every filesystem supports hard links
3408
3409if test -z "$LN" ; then
3410 case $ac_sys_system in
3411 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003412 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003413 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003414 *) LN=ln;;
3415 esac
3416fi
3417
Fred Drake109d9862001-07-11 06:27:56 +00003418# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003419echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3420echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3421
Fred Drake109d9862001-07-11 06:27:56 +00003422# Check whether --with-pydebug or --without-pydebug was given.
3423if test "${with_pydebug+set}" = set; then
3424 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003425
Fred Drake109d9862001-07-11 06:27:56 +00003426if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003427then
3428
3429cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003430#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003431_ACEOF
3432
3433 echo "$as_me:$LINENO: result: yes" >&5
3434echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003435 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003436else echo "$as_me:$LINENO: result: no" >&5
3437echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003438fi
3439else
Martin v. Löwis11437992002-04-12 09:54:03 +00003440 echo "$as_me:$LINENO: result: no" >&5
3441echo "${ECHO_T}no" >&6
3442fi;
Fred Drake109d9862001-07-11 06:27:56 +00003443
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003444# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003445
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003446if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003447then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003448 case $GCC in
3449 yes)
3450 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003451 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003452 if test "$Py_DEBUG" = 'true' ; then
3453 # Optimization messes up debuggers, so turn it off for
3454 # debug builds.
3455 OPT="-g -Wall -Wstrict-prototypes"
3456 else
3457 OPT="-g -O3 -Wall -Wstrict-prototypes"
3458 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003459 *)
Fred Drake109d9862001-07-11 06:27:56 +00003460 OPT="-O3 -Wall -Wstrict-prototypes";;
3461 esac
3462 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003463 *)
3464 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003465 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003466 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3467 *)
3468 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003469 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003470 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003471 case $ac_sys_system in
3472 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003473 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003474 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003475fi
3476
Fred Drakee1ceaa02001-12-04 20:55:47 +00003477if test "$Py_DEBUG" = 'true'; then
3478 :
3479else
3480 OPT="-DNDEBUG $OPT"
3481fi
3482
Trent Mick635f6fb2000-08-23 21:33:05 +00003483# The current (beta) Monterey compiler dies with optimizations
3484case $ac_sys_system in
3485Monterey*) OPT="";;
3486esac
3487
Guido van Rossum563e7081996-09-10 18:20:48 +00003488if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003489then
3490 OPT="$OPT $ac_arch_flags"
3491fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003492
Martin v. Löwis11437992002-04-12 09:54:03 +00003493echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3494echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3495if test "${ac_cv_opt_olimit_ok+set}" = set; then
3496 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003497else
3498 ac_save_cc="$CC"
3499CC="$CC -OPT:Olimit=0"
3500if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003501 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003502else
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 cat >conftest.$ac_ext <<_ACEOF
3504#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003505#include "confdefs.h"
3506int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003507_ACEOF
3508rm -f conftest$ac_exeext
3509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3510 (eval $ac_link) 2>&5
3511 ac_status=$?
3512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3513 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3515 (eval $ac_try) 2>&5
3516 ac_status=$?
3517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3518 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003519 ac_cv_opt_olimit_ok=yes
3520else
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 echo "$as_me: program exited with status $ac_status" >&5
3522echo "$as_me: failed program was:" >&5
3523cat conftest.$ac_ext >&5
3524( exit $ac_status )
3525ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003526fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003527rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003528fi
Guido van Rossum91922671997-10-09 20:24:13 +00003529CC="$ac_save_cc"
3530fi
3531
Martin v. Löwis11437992002-04-12 09:54:03 +00003532echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3533echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003534if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003535 case $ac_sys_system in
3536 Darwin*) OPT="$OPT" ;;
3537 *) OPT="$OPT -OPT:Olimit=0";;
3538 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003539else
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3541echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3542 if test "${ac_cv_olimit_ok+set}" = set; then
3543 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003544else
3545 ac_save_cc="$CC"
3546 CC="$CC -Olimit 1500"
3547 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003548 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003549else
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 cat >conftest.$ac_ext <<_ACEOF
3551#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003552#include "confdefs.h"
3553int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003554_ACEOF
3555rm -f conftest$ac_exeext
3556if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3557 (eval $ac_link) 2>&5
3558 ac_status=$?
3559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3560 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3562 (eval $ac_try) 2>&5
3563 ac_status=$?
3564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3565 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003566 ac_cv_olimit_ok=yes
3567else
Martin v. Löwis11437992002-04-12 09:54:03 +00003568 echo "$as_me: program exited with status $ac_status" >&5
3569echo "$as_me: failed program was:" >&5
3570cat conftest.$ac_ext >&5
3571( exit $ac_status )
3572ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003573fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003574rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003575fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003576 CC="$ac_save_cc"
3577fi
3578
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3580echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003581 if test $ac_cv_olimit_ok = yes; then
3582 OPT="$OPT -Olimit 1500"
3583 fi
3584fi
3585
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003586# On some compilers, pthreads are available without further options
3587# (e.g. MacOS X). On some of these systems, the compiler will not
3588# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3589# So we have to see first whether pthreads are available without
3590# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003591echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3592echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3593if test "${ac_cv_pthread_is_default+set}" = set; then
3594 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003595else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003596 if test "$cross_compiling" = yes; then
3597 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003598else
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 cat >conftest.$ac_ext <<_ACEOF
3600#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003601#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003602
Martin v. Löwis130fb172001-07-19 11:00:41 +00003603#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003604
3605void* routine(void* p){return NULL;}
3606
3607int main(){
3608 pthread_t p;
3609 if(pthread_create(&p,NULL,routine,NULL)!=0)
3610 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003611 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003612 return 0;
3613}
3614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615_ACEOF
3616rm -f conftest$ac_exeext
3617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3618 (eval $ac_link) 2>&5
3619 ac_status=$?
3620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3621 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3623 (eval $ac_try) 2>&5
3624 ac_status=$?
3625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3626 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003627 ac_cv_pthread_is_default=yes
3628else
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 echo "$as_me: program exited with status $ac_status" >&5
3630echo "$as_me: failed program was:" >&5
3631cat conftest.$ac_ext >&5
3632( exit $ac_status )
3633ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003634fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003635rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003636fi
3637
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003638fi
3639
Martin v. Löwis11437992002-04-12 09:54:03 +00003640echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3641echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003642
Michael W. Hudson54241132001-12-07 15:38:26 +00003643
Martin v. Löwis11437992002-04-12 09:54:03 +00003644if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003645then
3646 ac_cv_kpthread=no
3647else
3648# -Kpthread, if available, provides the right #defines
3649# and linker options to make pthread_create available
3650# Some compilers won't report that they do not support -Kpthread,
3651# so we need to run a program to see whether it really made the
3652# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003653echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3654echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3655if test "${ac_cv_kpthread+set}" = set; then
3656 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003657else
3658 ac_save_cc="$CC"
3659CC="$CC -Kpthread"
3660if test "$cross_compiling" = yes; then
3661 ac_cv_kpthread=no
3662else
Martin v. Löwis11437992002-04-12 09:54:03 +00003663 cat >conftest.$ac_ext <<_ACEOF
3664#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003665#include "confdefs.h"
3666
3667#include <pthread.h>
3668
3669void* routine(void* p){return NULL;}
3670
3671int main(){
3672 pthread_t p;
3673 if(pthread_create(&p,NULL,routine,NULL)!=0)
3674 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003675 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003676 return 0;
3677}
3678
Martin v. Löwis11437992002-04-12 09:54:03 +00003679_ACEOF
3680rm -f conftest$ac_exeext
3681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3682 (eval $ac_link) 2>&5
3683 ac_status=$?
3684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3685 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3687 (eval $ac_try) 2>&5
3688 ac_status=$?
3689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3690 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003691 ac_cv_kpthread=yes
3692else
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 echo "$as_me: program exited with status $ac_status" >&5
3694echo "$as_me: failed program was:" >&5
3695cat conftest.$ac_ext >&5
3696( exit $ac_status )
3697ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003698fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003699rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003700fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003701CC="$ac_save_cc"
3702fi
3703
Martin v. Löwis11437992002-04-12 09:54:03 +00003704echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3705echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003706fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003707
Michael W. Hudson54241132001-12-07 15:38:26 +00003708
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003709# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003710echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3711echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3712if test "${ac_cv_header_stdc+set}" = set; then
3713 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003714else
Martin v. Löwis11437992002-04-12 09:54:03 +00003715 cat >conftest.$ac_ext <<_ACEOF
3716#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003717#include "confdefs.h"
3718#include <stdlib.h>
3719#include <stdarg.h>
3720#include <string.h>
3721#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003722
3723_ACEOF
3724if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3725 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3726 ac_status=$?
3727 egrep -v '^ *\+' conftest.er1 >conftest.err
3728 rm -f conftest.er1
3729 cat conftest.err >&5
3730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3731 (exit $ac_status); } >/dev/null; then
3732 if test -s conftest.err; then
3733 ac_cpp_err=$ac_c_preproc_warn_flag
3734 else
3735 ac_cpp_err=
3736 fi
3737else
3738 ac_cpp_err=yes
3739fi
3740if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003741 ac_cv_header_stdc=yes
3742else
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003744 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003745 ac_cv_header_stdc=no
3746fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003747rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003748
3749if test $ac_cv_header_stdc = yes; then
3750 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 cat >conftest.$ac_ext <<_ACEOF
3752#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003753#include "confdefs.h"
3754#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003755
3756_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3758 egrep "memchr" >/dev/null 2>&1; then
3759 :
3760else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003761 ac_cv_header_stdc=no
3762fi
3763rm -f conftest*
3764
3765fi
3766
3767if test $ac_cv_header_stdc = yes; then
3768 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 cat >conftest.$ac_ext <<_ACEOF
3770#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003771#include "confdefs.h"
3772#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003773
3774_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003775if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3776 egrep "free" >/dev/null 2>&1; then
3777 :
3778else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003779 ac_cv_header_stdc=no
3780fi
3781rm -f conftest*
3782
3783fi
3784
3785if test $ac_cv_header_stdc = yes; then
3786 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003788 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003789else
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 cat >conftest.$ac_ext <<_ACEOF
3791#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003792#include "confdefs.h"
3793#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003794#if ((' ' & 0x0FF) == 0x020)
3795# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3796# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3797#else
3798# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3799 || ('j' <= (c) && (c) <= 'r') \
3800 || ('s' <= (c) && (c) <= 'z'))
3801# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3802#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003803
Martin v. Löwis11437992002-04-12 09:54:03 +00003804#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3805int
3806main ()
3807{
3808 int i;
3809 for (i = 0; i < 256; i++)
3810 if (XOR (islower (i), ISLOWER (i))
3811 || toupper (i) != TOUPPER (i))
3812 exit(2);
3813 exit (0);
3814}
3815_ACEOF
3816rm -f conftest$ac_exeext
3817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3818 (eval $ac_link) 2>&5
3819 ac_status=$?
3820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3821 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3823 (eval $ac_try) 2>&5
3824 ac_status=$?
3825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3826 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003827 :
3828else
Martin v. Löwis11437992002-04-12 09:54:03 +00003829 echo "$as_me: program exited with status $ac_status" >&5
3830echo "$as_me: failed program was:" >&5
3831cat conftest.$ac_ext >&5
3832( exit $ac_status )
3833ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003834fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003835rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003836fi
3837fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003838fi
3839echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3840echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003841if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003842
3843cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003844#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003845_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003846
3847fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003848
Martin v. Löwis11437992002-04-12 09:54:03 +00003849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
Martin v. Löwis11437992002-04-12 09:54:03 +00003886for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003887libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003888signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003889sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003890sys/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 +00003891sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003892sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003893do
Martin v. Löwis11437992002-04-12 09:54:03 +00003894as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3895if eval "test \"\${$as_ac_Header+set}\" = set"; then
3896 echo "$as_me:$LINENO: checking for $ac_header" >&5
3897echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3898if eval "test \"\${$as_ac_Header+set}\" = set"; then
3899 echo $ECHO_N "(cached) $ECHO_C" >&6
3900fi
3901echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3902echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003903else
Martin v. Löwis11437992002-04-12 09:54:03 +00003904 # Is the header compilable?
3905echo "$as_me:$LINENO: checking $ac_header usability" >&5
3906echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3907cat >conftest.$ac_ext <<_ACEOF
3908#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003909#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003910$ac_includes_default
3911#include <$ac_header>
3912_ACEOF
3913rm -f conftest.$ac_objext
3914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3915 (eval $ac_compile) 2>&5
3916 ac_status=$?
3917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3918 (exit $ac_status); } &&
3919 { ac_try='test -s conftest.$ac_objext'
3920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3921 (eval $ac_try) 2>&5
3922 ac_status=$?
3923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3924 (exit $ac_status); }; }; then
3925 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003926else
Martin v. Löwis11437992002-04-12 09:54:03 +00003927 echo "$as_me: failed program was:" >&5
3928cat conftest.$ac_ext >&5
3929ac_header_compiler=no
3930fi
3931rm -f conftest.$ac_objext conftest.$ac_ext
3932echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3933echo "${ECHO_T}$ac_header_compiler" >&6
3934
3935# Is the header present?
3936echo "$as_me:$LINENO: checking $ac_header presence" >&5
3937echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3938cat >conftest.$ac_ext <<_ACEOF
3939#line $LINENO "configure"
3940#include "confdefs.h"
3941#include <$ac_header>
3942_ACEOF
3943if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3944 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3945 ac_status=$?
3946 egrep -v '^ *\+' conftest.er1 >conftest.err
3947 rm -f conftest.er1
3948 cat conftest.err >&5
3949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3950 (exit $ac_status); } >/dev/null; then
3951 if test -s conftest.err; then
3952 ac_cpp_err=$ac_c_preproc_warn_flag
3953 else
3954 ac_cpp_err=
3955 fi
3956else
3957 ac_cpp_err=yes
3958fi
3959if test -z "$ac_cpp_err"; then
3960 ac_header_preproc=yes
3961else
3962 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003963 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003964 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003965fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003966rm -f conftest.err conftest.$ac_ext
3967echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3968echo "${ECHO_T}$ac_header_preproc" >&6
3969
3970# So? What about this header?
3971case $ac_header_compiler:$ac_header_preproc in
3972 yes:no )
3973 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3974echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3975 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3976echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3977 no:yes )
3978 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3979echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3980 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3981echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3982 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3983echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3984esac
3985echo "$as_me:$LINENO: checking for $ac_header" >&5
3986echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3987if eval "test \"\${$as_ac_Header+set}\" = set"; then
3988 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003989else
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003991fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003992echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3993echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3994
3995fi
3996if test `eval echo '${'$as_ac_Header'}'` = yes; then
3997 cat >>confdefs.h <<_ACEOF
3998#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3999_ACEOF
4000
4001fi
4002
Guido van Rossum627b2d71993-12-24 10:39:16 +00004003done
4004
Martin v. Löwis11437992002-04-12 09:54:03 +00004005
4006
4007
4008
4009
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004010ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004011for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4012 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4013echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4014echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4015if eval "test \"\${$as_ac_Header+set}\" = set"; then
4016 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004017else
Martin v. Löwis11437992002-04-12 09:54:03 +00004018 cat >conftest.$ac_ext <<_ACEOF
4019#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004020#include "confdefs.h"
4021#include <sys/types.h>
4022#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004023
4024#ifdef F77_DUMMY_MAIN
4025# ifdef __cplusplus
4026 extern "C"
4027# endif
4028 int F77_DUMMY_MAIN() { return 1; }
4029#endif
4030int
4031main ()
4032{
4033if ((DIR *) 0)
4034return 0;
4035 ;
4036 return 0;
4037}
4038_ACEOF
4039rm -f conftest.$ac_objext
4040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4041 (eval $ac_compile) 2>&5
4042 ac_status=$?
4043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4044 (exit $ac_status); } &&
4045 { ac_try='test -s conftest.$ac_objext'
4046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4047 (eval $ac_try) 2>&5
4048 ac_status=$?
4049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4050 (exit $ac_status); }; }; then
4051 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004052else
Martin v. Löwis11437992002-04-12 09:54:03 +00004053 echo "$as_me: failed program was:" >&5
4054cat conftest.$ac_ext >&5
4055eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004056fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004057rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004058fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004059echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4060echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4061if test `eval echo '${'$as_ac_Header'}'` = yes; then
4062 cat >>confdefs.h <<_ACEOF
4063#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4064_ACEOF
4065
4066ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004067fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004068
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004069done
4070# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4071if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004072 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4073echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4074if test "${ac_cv_search_opendir+set}" = set; then
4075 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004076else
Martin v. Löwis11437992002-04-12 09:54:03 +00004077 ac_func_search_save_LIBS=$LIBS
4078ac_cv_search_opendir=no
4079cat >conftest.$ac_ext <<_ACEOF
4080#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004081#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004083/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004084#ifdef __cplusplus
4085extern "C"
4086#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004087/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 builtin and then its argument prototype would still apply. */
4089char opendir ();
4090#ifdef F77_DUMMY_MAIN
4091# ifdef __cplusplus
4092 extern "C"
4093# endif
4094 int F77_DUMMY_MAIN() { return 1; }
4095#endif
4096int
4097main ()
4098{
4099opendir ();
4100 ;
4101 return 0;
4102}
4103_ACEOF
4104rm -f conftest.$ac_objext conftest$ac_exeext
4105if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4106 (eval $ac_link) 2>&5
4107 ac_status=$?
4108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4109 (exit $ac_status); } &&
4110 { ac_try='test -s conftest$ac_exeext'
4111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4112 (eval $ac_try) 2>&5
4113 ac_status=$?
4114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4115 (exit $ac_status); }; }; then
4116 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004117else
Martin v. Löwis11437992002-04-12 09:54:03 +00004118 echo "$as_me: failed program was:" >&5
4119cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004120fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004121rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4122if test "$ac_cv_search_opendir" = no; then
4123 for ac_lib in dir; do
4124 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4125 cat >conftest.$ac_ext <<_ACEOF
4126#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004127#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004128
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004129/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004130#ifdef __cplusplus
4131extern "C"
4132#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004133/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004134 builtin and then its argument prototype would still apply. */
4135char opendir ();
4136#ifdef F77_DUMMY_MAIN
4137# ifdef __cplusplus
4138 extern "C"
4139# endif
4140 int F77_DUMMY_MAIN() { return 1; }
4141#endif
4142int
4143main ()
4144{
4145opendir ();
4146 ;
4147 return 0;
4148}
4149_ACEOF
4150rm -f conftest.$ac_objext conftest$ac_exeext
4151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4152 (eval $ac_link) 2>&5
4153 ac_status=$?
4154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4155 (exit $ac_status); } &&
4156 { ac_try='test -s conftest$ac_exeext'
4157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4158 (eval $ac_try) 2>&5
4159 ac_status=$?
4160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4161 (exit $ac_status); }; }; then
4162 ac_cv_search_opendir="-l$ac_lib"
4163break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004164else
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 echo "$as_me: failed program was:" >&5
4166cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004168rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4169 done
4170fi
4171LIBS=$ac_func_search_save_LIBS
4172fi
4173echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4174echo "${ECHO_T}$ac_cv_search_opendir" >&6
4175if test "$ac_cv_search_opendir" != no; then
4176 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004179
Michael W. Hudson54241132001-12-07 15:38:26 +00004180else
Martin v. Löwis11437992002-04-12 09:54:03 +00004181 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4182echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4183if test "${ac_cv_search_opendir+set}" = set; then
4184 echo $ECHO_N "(cached) $ECHO_C" >&6
4185else
4186 ac_func_search_save_LIBS=$LIBS
4187ac_cv_search_opendir=no
4188cat >conftest.$ac_ext <<_ACEOF
4189#line $LINENO "configure"
4190#include "confdefs.h"
4191
4192/* Override any gcc2 internal prototype to avoid an error. */
4193#ifdef __cplusplus
4194extern "C"
4195#endif
4196/* We use char because int might match the return type of a gcc2
4197 builtin and then its argument prototype would still apply. */
4198char opendir ();
4199#ifdef F77_DUMMY_MAIN
4200# ifdef __cplusplus
4201 extern "C"
4202# endif
4203 int F77_DUMMY_MAIN() { return 1; }
4204#endif
4205int
4206main ()
4207{
4208opendir ();
4209 ;
4210 return 0;
4211}
4212_ACEOF
4213rm -f conftest.$ac_objext conftest$ac_exeext
4214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4215 (eval $ac_link) 2>&5
4216 ac_status=$?
4217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4218 (exit $ac_status); } &&
4219 { ac_try='test -s conftest$ac_exeext'
4220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4221 (eval $ac_try) 2>&5
4222 ac_status=$?
4223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4224 (exit $ac_status); }; }; then
4225 ac_cv_search_opendir="none required"
4226else
4227 echo "$as_me: failed program was:" >&5
4228cat conftest.$ac_ext >&5
4229fi
4230rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4231if test "$ac_cv_search_opendir" = no; then
4232 for ac_lib in x; do
4233 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4234 cat >conftest.$ac_ext <<_ACEOF
4235#line $LINENO "configure"
4236#include "confdefs.h"
4237
4238/* Override any gcc2 internal prototype to avoid an error. */
4239#ifdef __cplusplus
4240extern "C"
4241#endif
4242/* We use char because int might match the return type of a gcc2
4243 builtin and then its argument prototype would still apply. */
4244char opendir ();
4245#ifdef F77_DUMMY_MAIN
4246# ifdef __cplusplus
4247 extern "C"
4248# endif
4249 int F77_DUMMY_MAIN() { return 1; }
4250#endif
4251int
4252main ()
4253{
4254opendir ();
4255 ;
4256 return 0;
4257}
4258_ACEOF
4259rm -f conftest.$ac_objext conftest$ac_exeext
4260if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4261 (eval $ac_link) 2>&5
4262 ac_status=$?
4263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4264 (exit $ac_status); } &&
4265 { ac_try='test -s conftest$ac_exeext'
4266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4267 (eval $ac_try) 2>&5
4268 ac_status=$?
4269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4270 (exit $ac_status); }; }; then
4271 ac_cv_search_opendir="-l$ac_lib"
4272break
4273else
4274 echo "$as_me: failed program was:" >&5
4275cat conftest.$ac_ext >&5
4276fi
4277rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4278 done
4279fi
4280LIBS=$ac_func_search_save_LIBS
4281fi
4282echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4283echo "${ECHO_T}$ac_cv_search_opendir" >&6
4284if test "$ac_cv_search_opendir" != no; then
4285 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4286
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287fi
4288
4289fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004290
Michael W. Hudson54241132001-12-07 15:38:26 +00004291
Guido van Rossum627b2d71993-12-24 10:39:16 +00004292# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004293was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004294echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4295echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4296cat >conftest.$ac_ext <<_ACEOF
4297#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004298#include "confdefs.h"
4299#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004300
4301_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4303 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004304 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004305else
Martin v. Löwis11437992002-04-12 09:54:03 +00004306
4307
4308cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004309#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004310_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004311
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004312
Guido van Rossum627b2d71993-12-24 10:39:16 +00004313fi
4314rm -f conftest*
4315
Martin v. Löwis11437992002-04-12 09:54:03 +00004316echo "$as_me:$LINENO: result: $was_it_defined" >&5
4317echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004318
Guido van Rossum810cc512001-09-09 23:51:39 +00004319# Two defines needed to enable largefile support on various platforms
4320# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004321
Martin v. Löwis11437992002-04-12 09:54:03 +00004322cat >>confdefs.h <<\_ACEOF
4323#define _LARGEFILE_SOURCE 1
4324_ACEOF
4325
4326
4327cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004328#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004329_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004330
Michael W. Hudson54241132001-12-07 15:38:26 +00004331
Guido van Rossum84e7b241996-08-19 21:59:00 +00004332# Add some code to confdefs.h so that the test for off_t works on SCO
4333cat >> confdefs.h <<\EOF
4334#if defined(SCO_DS)
4335#undef _OFF_T
4336#endif
4337EOF
4338
Guido van Rossumef2255b2000-03-10 22:30:29 +00004339# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004340echo "$as_me:$LINENO: checking for mode_t" >&5
4341echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4342if test "${ac_cv_type_mode_t+set}" = set; then
4343 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004344else
Martin v. Löwis11437992002-04-12 09:54:03 +00004345 cat >conftest.$ac_ext <<_ACEOF
4346#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004347#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004348$ac_includes_default
4349#ifdef F77_DUMMY_MAIN
4350# ifdef __cplusplus
4351 extern "C"
4352# endif
4353 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004355int
4356main ()
4357{
4358if ((mode_t *) 0)
4359 return 0;
4360if (sizeof (mode_t))
4361 return 0;
4362 ;
4363 return 0;
4364}
4365_ACEOF
4366rm -f conftest.$ac_objext
4367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4368 (eval $ac_compile) 2>&5
4369 ac_status=$?
4370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4371 (exit $ac_status); } &&
4372 { ac_try='test -s conftest.$ac_objext'
4373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4374 (eval $ac_try) 2>&5
4375 ac_status=$?
4376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4377 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004378 ac_cv_type_mode_t=yes
4379else
Martin v. Löwis11437992002-04-12 09:54:03 +00004380 echo "$as_me: failed program was:" >&5
4381cat conftest.$ac_ext >&5
4382ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004383fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004384rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004385fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004386echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4387echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4388if test $ac_cv_type_mode_t = yes; then
4389 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390else
Martin v. Löwis11437992002-04-12 09:54:03 +00004391
4392cat >>confdefs.h <<_ACEOF
4393#define mode_t int
4394_ACEOF
4395
4396fi
4397
4398echo "$as_me:$LINENO: checking for off_t" >&5
4399echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4400if test "${ac_cv_type_off_t+set}" = set; then
4401 echo $ECHO_N "(cached) $ECHO_C" >&6
4402else
4403 cat >conftest.$ac_ext <<_ACEOF
4404#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004406$ac_includes_default
4407#ifdef F77_DUMMY_MAIN
4408# ifdef __cplusplus
4409 extern "C"
4410# endif
4411 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004412#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004413int
4414main ()
4415{
4416if ((off_t *) 0)
4417 return 0;
4418if (sizeof (off_t))
4419 return 0;
4420 ;
4421 return 0;
4422}
4423_ACEOF
4424rm -f conftest.$ac_objext
4425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4426 (eval $ac_compile) 2>&5
4427 ac_status=$?
4428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4429 (exit $ac_status); } &&
4430 { ac_try='test -s conftest.$ac_objext'
4431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4432 (eval $ac_try) 2>&5
4433 ac_status=$?
4434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4435 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004436 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004437else
Martin v. Löwis11437992002-04-12 09:54:03 +00004438 echo "$as_me: failed program was:" >&5
4439cat conftest.$ac_ext >&5
4440ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004441fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004442rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004443fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004444echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4445echo "${ECHO_T}$ac_cv_type_off_t" >&6
4446if test $ac_cv_type_off_t = yes; then
4447 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004448else
Martin v. Löwis11437992002-04-12 09:54:03 +00004449
4450cat >>confdefs.h <<_ACEOF
4451#define off_t long
4452_ACEOF
4453
4454fi
4455
4456echo "$as_me:$LINENO: checking for pid_t" >&5
4457echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4458if test "${ac_cv_type_pid_t+set}" = set; then
4459 echo $ECHO_N "(cached) $ECHO_C" >&6
4460else
4461 cat >conftest.$ac_ext <<_ACEOF
4462#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004463#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004464$ac_includes_default
4465#ifdef F77_DUMMY_MAIN
4466# ifdef __cplusplus
4467 extern "C"
4468# endif
4469 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004470#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004471int
4472main ()
4473{
4474if ((pid_t *) 0)
4475 return 0;
4476if (sizeof (pid_t))
4477 return 0;
4478 ;
4479 return 0;
4480}
4481_ACEOF
4482rm -f conftest.$ac_objext
4483if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4484 (eval $ac_compile) 2>&5
4485 ac_status=$?
4486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4487 (exit $ac_status); } &&
4488 { ac_try='test -s conftest.$ac_objext'
4489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4490 (eval $ac_try) 2>&5
4491 ac_status=$?
4492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4493 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004494 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004495else
Martin v. Löwis11437992002-04-12 09:54:03 +00004496 echo "$as_me: failed program was:" >&5
4497cat conftest.$ac_ext >&5
4498ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004499fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004500rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004501fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004502echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4503echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4504if test $ac_cv_type_pid_t = yes; then
4505 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004506else
Martin v. Löwis11437992002-04-12 09:54:03 +00004507
4508cat >>confdefs.h <<_ACEOF
4509#define pid_t int
4510_ACEOF
4511
4512fi
4513
4514echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4515echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4516if test "${ac_cv_type_signal+set}" = set; then
4517 echo $ECHO_N "(cached) $ECHO_C" >&6
4518else
4519 cat >conftest.$ac_ext <<_ACEOF
4520#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004521#include "confdefs.h"
4522#include <sys/types.h>
4523#include <signal.h>
4524#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004525# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004526#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004527#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004528extern "C" void (*signal (int, void (*)(int)))(int);
4529#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004530void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004531#endif
4532
Martin v. Löwis11437992002-04-12 09:54:03 +00004533#ifdef F77_DUMMY_MAIN
4534# ifdef __cplusplus
4535 extern "C"
4536# endif
4537 int F77_DUMMY_MAIN() { return 1; }
4538#endif
4539int
4540main ()
4541{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004542int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004543 ;
4544 return 0;
4545}
4546_ACEOF
4547rm -f conftest.$ac_objext
4548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4549 (eval $ac_compile) 2>&5
4550 ac_status=$?
4551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4552 (exit $ac_status); } &&
4553 { ac_try='test -s conftest.$ac_objext'
4554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4555 (eval $ac_try) 2>&5
4556 ac_status=$?
4557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4558 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004559 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004560else
Martin v. Löwis11437992002-04-12 09:54:03 +00004561 echo "$as_me: failed program was:" >&5
4562cat conftest.$ac_ext >&5
4563ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004565rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004566fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004567echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4568echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004569
Martin v. Löwis11437992002-04-12 09:54:03 +00004570cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004571#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004572_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004573
Michael W. Hudson54241132001-12-07 15:38:26 +00004574
Martin v. Löwis11437992002-04-12 09:54:03 +00004575echo "$as_me:$LINENO: checking for size_t" >&5
4576echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4577if test "${ac_cv_type_size_t+set}" = set; then
4578 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004579else
Martin v. Löwis11437992002-04-12 09:54:03 +00004580 cat >conftest.$ac_ext <<_ACEOF
4581#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004582#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004583$ac_includes_default
4584#ifdef F77_DUMMY_MAIN
4585# ifdef __cplusplus
4586 extern "C"
4587# endif
4588 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004590int
4591main ()
4592{
4593if ((size_t *) 0)
4594 return 0;
4595if (sizeof (size_t))
4596 return 0;
4597 ;
4598 return 0;
4599}
4600_ACEOF
4601rm -f conftest.$ac_objext
4602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4603 (eval $ac_compile) 2>&5
4604 ac_status=$?
4605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4606 (exit $ac_status); } &&
4607 { ac_try='test -s conftest.$ac_objext'
4608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4609 (eval $ac_try) 2>&5
4610 ac_status=$?
4611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4612 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004613 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004614else
Martin v. Löwis11437992002-04-12 09:54:03 +00004615 echo "$as_me: failed program was:" >&5
4616cat conftest.$ac_ext >&5
4617ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004618fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004619rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004620fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004621echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4622echo "${ECHO_T}$ac_cv_type_size_t" >&6
4623if test $ac_cv_type_size_t = yes; then
4624 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004625else
Martin v. Löwis11437992002-04-12 09:54:03 +00004626
4627cat >>confdefs.h <<_ACEOF
4628#define size_t unsigned
4629_ACEOF
4630
4631fi
4632
4633echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4634echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4635if test "${ac_cv_type_uid_t+set}" = set; then
4636 echo $ECHO_N "(cached) $ECHO_C" >&6
4637else
4638 cat >conftest.$ac_ext <<_ACEOF
4639#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004640#include "confdefs.h"
4641#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004642
4643_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004644if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4645 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004646 ac_cv_type_uid_t=yes
4647else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004648 ac_cv_type_uid_t=no
4649fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004650rm -f conftest*
4651
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004652fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004653echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4654echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004655if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004656
Martin v. Löwis11437992002-04-12 09:54:03 +00004657cat >>confdefs.h <<\_ACEOF
4658#define uid_t int
4659_ACEOF
4660
4661
4662cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004663#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004664_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004665
4666fi
4667
Jack Jansendd19cf82001-12-06 22:36:17 +00004668
Michael W. Hudson54241132001-12-07 15:38:26 +00004669# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004670echo "$as_me:$LINENO: checking for int" >&5
4671echo $ECHO_N "checking for int... $ECHO_C" >&6
4672if test "${ac_cv_type_int+set}" = set; then
4673 echo $ECHO_N "(cached) $ECHO_C" >&6
4674else
4675 cat >conftest.$ac_ext <<_ACEOF
4676#line $LINENO "configure"
4677#include "confdefs.h"
4678$ac_includes_default
4679#ifdef F77_DUMMY_MAIN
4680# ifdef __cplusplus
4681 extern "C"
4682# endif
4683 int F77_DUMMY_MAIN() { return 1; }
4684#endif
4685int
4686main ()
4687{
4688if ((int *) 0)
4689 return 0;
4690if (sizeof (int))
4691 return 0;
4692 ;
4693 return 0;
4694}
4695_ACEOF
4696rm -f conftest.$ac_objext
4697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4698 (eval $ac_compile) 2>&5
4699 ac_status=$?
4700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4701 (exit $ac_status); } &&
4702 { ac_try='test -s conftest.$ac_objext'
4703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4704 (eval $ac_try) 2>&5
4705 ac_status=$?
4706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4707 (exit $ac_status); }; }; then
4708 ac_cv_type_int=yes
4709else
4710 echo "$as_me: failed program was:" >&5
4711cat conftest.$ac_ext >&5
4712ac_cv_type_int=no
4713fi
4714rm -f conftest.$ac_objext conftest.$ac_ext
4715fi
4716echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4717echo "${ECHO_T}$ac_cv_type_int" >&6
4718
4719echo "$as_me:$LINENO: checking size of int" >&5
4720echo $ECHO_N "checking size of int... $ECHO_C" >&6
4721if test "${ac_cv_sizeof_int+set}" = set; then
4722 echo $ECHO_N "(cached) $ECHO_C" >&6
4723else
4724 if test "$ac_cv_type_int" = yes; then
4725 # The cast to unsigned long works around a bug in the HP C Compiler
4726 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4727 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4728 # This bug is HP SR number 8606223364.
4729 if test "$cross_compiling" = yes; then
4730 # Depending upon the size, compute the lo and hi bounds.
4731cat >conftest.$ac_ext <<_ACEOF
4732#line $LINENO "configure"
4733#include "confdefs.h"
4734$ac_includes_default
4735#ifdef F77_DUMMY_MAIN
4736# ifdef __cplusplus
4737 extern "C"
4738# endif
4739 int F77_DUMMY_MAIN() { return 1; }
4740#endif
4741int
4742main ()
4743{
4744static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4745test_array [0] = 0
4746
4747 ;
4748 return 0;
4749}
4750_ACEOF
4751rm -f conftest.$ac_objext
4752if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4753 (eval $ac_compile) 2>&5
4754 ac_status=$?
4755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756 (exit $ac_status); } &&
4757 { ac_try='test -s conftest.$ac_objext'
4758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4759 (eval $ac_try) 2>&5
4760 ac_status=$?
4761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4762 (exit $ac_status); }; }; then
4763 ac_lo=0 ac_mid=0
4764 while :; do
4765 cat >conftest.$ac_ext <<_ACEOF
4766#line $LINENO "configure"
4767#include "confdefs.h"
4768$ac_includes_default
4769#ifdef F77_DUMMY_MAIN
4770# ifdef __cplusplus
4771 extern "C"
4772# endif
4773 int F77_DUMMY_MAIN() { return 1; }
4774#endif
4775int
4776main ()
4777{
4778static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4779test_array [0] = 0
4780
4781 ;
4782 return 0;
4783}
4784_ACEOF
4785rm -f conftest.$ac_objext
4786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4787 (eval $ac_compile) 2>&5
4788 ac_status=$?
4789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4790 (exit $ac_status); } &&
4791 { ac_try='test -s conftest.$ac_objext'
4792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4793 (eval $ac_try) 2>&5
4794 ac_status=$?
4795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4796 (exit $ac_status); }; }; then
4797 ac_hi=$ac_mid; break
4798else
4799 echo "$as_me: failed program was:" >&5
4800cat conftest.$ac_ext >&5
4801ac_lo=`expr $ac_mid + 1`
4802 if test $ac_lo -le $ac_mid; then
4803 ac_lo= ac_hi=
4804 break
4805 fi
4806 ac_mid=`expr 2 '*' $ac_mid + 1`
4807fi
4808rm -f conftest.$ac_objext conftest.$ac_ext
4809 done
4810else
4811 echo "$as_me: failed program was:" >&5
4812cat conftest.$ac_ext >&5
4813cat >conftest.$ac_ext <<_ACEOF
4814#line $LINENO "configure"
4815#include "confdefs.h"
4816$ac_includes_default
4817#ifdef F77_DUMMY_MAIN
4818# ifdef __cplusplus
4819 extern "C"
4820# endif
4821 int F77_DUMMY_MAIN() { return 1; }
4822#endif
4823int
4824main ()
4825{
4826static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4827test_array [0] = 0
4828
4829 ;
4830 return 0;
4831}
4832_ACEOF
4833rm -f conftest.$ac_objext
4834if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4835 (eval $ac_compile) 2>&5
4836 ac_status=$?
4837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4838 (exit $ac_status); } &&
4839 { ac_try='test -s conftest.$ac_objext'
4840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4841 (eval $ac_try) 2>&5
4842 ac_status=$?
4843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4844 (exit $ac_status); }; }; then
4845 ac_hi=-1 ac_mid=-1
4846 while :; do
4847 cat >conftest.$ac_ext <<_ACEOF
4848#line $LINENO "configure"
4849#include "confdefs.h"
4850$ac_includes_default
4851#ifdef F77_DUMMY_MAIN
4852# ifdef __cplusplus
4853 extern "C"
4854# endif
4855 int F77_DUMMY_MAIN() { return 1; }
4856#endif
4857int
4858main ()
4859{
4860static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4861test_array [0] = 0
4862
4863 ;
4864 return 0;
4865}
4866_ACEOF
4867rm -f conftest.$ac_objext
4868if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4869 (eval $ac_compile) 2>&5
4870 ac_status=$?
4871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4872 (exit $ac_status); } &&
4873 { ac_try='test -s conftest.$ac_objext'
4874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4875 (eval $ac_try) 2>&5
4876 ac_status=$?
4877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4878 (exit $ac_status); }; }; then
4879 ac_lo=$ac_mid; break
4880else
4881 echo "$as_me: failed program was:" >&5
4882cat conftest.$ac_ext >&5
4883ac_hi=`expr '(' $ac_mid ')' - 1`
4884 if test $ac_mid -le $ac_hi; then
4885 ac_lo= ac_hi=
4886 break
4887 fi
4888 ac_mid=`expr 2 '*' $ac_mid`
4889fi
4890rm -f conftest.$ac_objext conftest.$ac_ext
4891 done
4892else
4893 echo "$as_me: failed program was:" >&5
4894cat conftest.$ac_ext >&5
4895ac_lo= ac_hi=
4896fi
4897rm -f conftest.$ac_objext conftest.$ac_ext
4898fi
4899rm -f conftest.$ac_objext conftest.$ac_ext
4900# Binary search between lo and hi bounds.
4901while test "x$ac_lo" != "x$ac_hi"; do
4902 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4903 cat >conftest.$ac_ext <<_ACEOF
4904#line $LINENO "configure"
4905#include "confdefs.h"
4906$ac_includes_default
4907#ifdef F77_DUMMY_MAIN
4908# ifdef __cplusplus
4909 extern "C"
4910# endif
4911 int F77_DUMMY_MAIN() { return 1; }
4912#endif
4913int
4914main ()
4915{
4916static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4917test_array [0] = 0
4918
4919 ;
4920 return 0;
4921}
4922_ACEOF
4923rm -f conftest.$ac_objext
4924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4925 (eval $ac_compile) 2>&5
4926 ac_status=$?
4927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4928 (exit $ac_status); } &&
4929 { ac_try='test -s conftest.$ac_objext'
4930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4931 (eval $ac_try) 2>&5
4932 ac_status=$?
4933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4934 (exit $ac_status); }; }; then
4935 ac_hi=$ac_mid
4936else
4937 echo "$as_me: failed program was:" >&5
4938cat conftest.$ac_ext >&5
4939ac_lo=`expr '(' $ac_mid ')' + 1`
4940fi
4941rm -f conftest.$ac_objext conftest.$ac_ext
4942done
4943case $ac_lo in
4944?*) ac_cv_sizeof_int=$ac_lo;;
4945'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4946echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4947 { (exit 1); exit 1; }; } ;;
4948esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004949else
4950 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004951 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4952echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4953 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004954else
Martin v. Löwis11437992002-04-12 09:54:03 +00004955 cat >conftest.$ac_ext <<_ACEOF
4956#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004957#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004958$ac_includes_default
4959long longval () { return (long) (sizeof (int)); }
4960unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004961#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004962#include <stdlib.h>
4963#ifdef F77_DUMMY_MAIN
4964# ifdef __cplusplus
4965 extern "C"
4966# endif
4967 int F77_DUMMY_MAIN() { return 1; }
4968#endif
4969int
4970main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004971{
Martin v. Löwis11437992002-04-12 09:54:03 +00004972
4973 FILE *f = fopen ("conftest.val", "w");
4974 if (! f)
4975 exit (1);
4976 if (((long) (sizeof (int))) < 0)
4977 {
4978 long i = longval ();
4979 if (i != ((long) (sizeof (int))))
4980 exit (1);
4981 fprintf (f, "%ld\n", i);
4982 }
4983 else
4984 {
4985 unsigned long i = ulongval ();
4986 if (i != ((long) (sizeof (int))))
4987 exit (1);
4988 fprintf (f, "%lu\n", i);
4989 }
4990 exit (ferror (f) || fclose (f) != 0);
4991
4992 ;
4993 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004994}
Martin v. Löwis11437992002-04-12 09:54:03 +00004995_ACEOF
4996rm -f conftest$ac_exeext
4997if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4998 (eval $ac_link) 2>&5
4999 ac_status=$?
5000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5001 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5003 (eval $ac_try) 2>&5
5004 ac_status=$?
5005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5006 (exit $ac_status); }; }; then
5007 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005008else
Martin v. Löwis11437992002-04-12 09:54:03 +00005009 echo "$as_me: program exited with status $ac_status" >&5
5010echo "$as_me: failed program was:" >&5
5011cat conftest.$ac_ext >&5
5012( exit $ac_status )
5013{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5014echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5015 { (exit 1); exit 1; }; }
5016fi
5017rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5018fi
5019fi
5020rm -f conftest.val
5021else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005022 ac_cv_sizeof_int=0
5023fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005024fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005025echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5026echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5027cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005028#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005029_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005030
5031
Martin v. Löwis11437992002-04-12 09:54:03 +00005032echo "$as_me:$LINENO: checking for long" >&5
5033echo $ECHO_N "checking for long... $ECHO_C" >&6
5034if test "${ac_cv_type_long+set}" = set; then
5035 echo $ECHO_N "(cached) $ECHO_C" >&6
5036else
5037 cat >conftest.$ac_ext <<_ACEOF
5038#line $LINENO "configure"
5039#include "confdefs.h"
5040$ac_includes_default
5041#ifdef F77_DUMMY_MAIN
5042# ifdef __cplusplus
5043 extern "C"
5044# endif
5045 int F77_DUMMY_MAIN() { return 1; }
5046#endif
5047int
5048main ()
5049{
5050if ((long *) 0)
5051 return 0;
5052if (sizeof (long))
5053 return 0;
5054 ;
5055 return 0;
5056}
5057_ACEOF
5058rm -f conftest.$ac_objext
5059if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5060 (eval $ac_compile) 2>&5
5061 ac_status=$?
5062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5063 (exit $ac_status); } &&
5064 { ac_try='test -s conftest.$ac_objext'
5065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5066 (eval $ac_try) 2>&5
5067 ac_status=$?
5068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5069 (exit $ac_status); }; }; then
5070 ac_cv_type_long=yes
5071else
5072 echo "$as_me: failed program was:" >&5
5073cat conftest.$ac_ext >&5
5074ac_cv_type_long=no
5075fi
5076rm -f conftest.$ac_objext conftest.$ac_ext
5077fi
5078echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5079echo "${ECHO_T}$ac_cv_type_long" >&6
5080
5081echo "$as_me:$LINENO: checking size of long" >&5
5082echo $ECHO_N "checking size of long... $ECHO_C" >&6
5083if test "${ac_cv_sizeof_long+set}" = set; then
5084 echo $ECHO_N "(cached) $ECHO_C" >&6
5085else
5086 if test "$ac_cv_type_long" = yes; then
5087 # The cast to unsigned long works around a bug in the HP C Compiler
5088 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5089 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5090 # This bug is HP SR number 8606223364.
5091 if test "$cross_compiling" = yes; then
5092 # Depending upon the size, compute the lo and hi bounds.
5093cat >conftest.$ac_ext <<_ACEOF
5094#line $LINENO "configure"
5095#include "confdefs.h"
5096$ac_includes_default
5097#ifdef F77_DUMMY_MAIN
5098# ifdef __cplusplus
5099 extern "C"
5100# endif
5101 int F77_DUMMY_MAIN() { return 1; }
5102#endif
5103int
5104main ()
5105{
5106static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5107test_array [0] = 0
5108
5109 ;
5110 return 0;
5111}
5112_ACEOF
5113rm -f conftest.$ac_objext
5114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5115 (eval $ac_compile) 2>&5
5116 ac_status=$?
5117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5118 (exit $ac_status); } &&
5119 { ac_try='test -s conftest.$ac_objext'
5120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5121 (eval $ac_try) 2>&5
5122 ac_status=$?
5123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5124 (exit $ac_status); }; }; then
5125 ac_lo=0 ac_mid=0
5126 while :; do
5127 cat >conftest.$ac_ext <<_ACEOF
5128#line $LINENO "configure"
5129#include "confdefs.h"
5130$ac_includes_default
5131#ifdef F77_DUMMY_MAIN
5132# ifdef __cplusplus
5133 extern "C"
5134# endif
5135 int F77_DUMMY_MAIN() { return 1; }
5136#endif
5137int
5138main ()
5139{
5140static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5141test_array [0] = 0
5142
5143 ;
5144 return 0;
5145}
5146_ACEOF
5147rm -f conftest.$ac_objext
5148if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5149 (eval $ac_compile) 2>&5
5150 ac_status=$?
5151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5152 (exit $ac_status); } &&
5153 { ac_try='test -s conftest.$ac_objext'
5154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5155 (eval $ac_try) 2>&5
5156 ac_status=$?
5157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5158 (exit $ac_status); }; }; then
5159 ac_hi=$ac_mid; break
5160else
5161 echo "$as_me: failed program was:" >&5
5162cat conftest.$ac_ext >&5
5163ac_lo=`expr $ac_mid + 1`
5164 if test $ac_lo -le $ac_mid; then
5165 ac_lo= ac_hi=
5166 break
5167 fi
5168 ac_mid=`expr 2 '*' $ac_mid + 1`
5169fi
5170rm -f conftest.$ac_objext conftest.$ac_ext
5171 done
5172else
5173 echo "$as_me: failed program was:" >&5
5174cat conftest.$ac_ext >&5
5175cat >conftest.$ac_ext <<_ACEOF
5176#line $LINENO "configure"
5177#include "confdefs.h"
5178$ac_includes_default
5179#ifdef F77_DUMMY_MAIN
5180# ifdef __cplusplus
5181 extern "C"
5182# endif
5183 int F77_DUMMY_MAIN() { return 1; }
5184#endif
5185int
5186main ()
5187{
5188static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5189test_array [0] = 0
5190
5191 ;
5192 return 0;
5193}
5194_ACEOF
5195rm -f conftest.$ac_objext
5196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5197 (eval $ac_compile) 2>&5
5198 ac_status=$?
5199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5200 (exit $ac_status); } &&
5201 { ac_try='test -s conftest.$ac_objext'
5202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5203 (eval $ac_try) 2>&5
5204 ac_status=$?
5205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5206 (exit $ac_status); }; }; then
5207 ac_hi=-1 ac_mid=-1
5208 while :; do
5209 cat >conftest.$ac_ext <<_ACEOF
5210#line $LINENO "configure"
5211#include "confdefs.h"
5212$ac_includes_default
5213#ifdef F77_DUMMY_MAIN
5214# ifdef __cplusplus
5215 extern "C"
5216# endif
5217 int F77_DUMMY_MAIN() { return 1; }
5218#endif
5219int
5220main ()
5221{
5222static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5223test_array [0] = 0
5224
5225 ;
5226 return 0;
5227}
5228_ACEOF
5229rm -f conftest.$ac_objext
5230if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5231 (eval $ac_compile) 2>&5
5232 ac_status=$?
5233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5234 (exit $ac_status); } &&
5235 { ac_try='test -s conftest.$ac_objext'
5236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5237 (eval $ac_try) 2>&5
5238 ac_status=$?
5239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5240 (exit $ac_status); }; }; then
5241 ac_lo=$ac_mid; break
5242else
5243 echo "$as_me: failed program was:" >&5
5244cat conftest.$ac_ext >&5
5245ac_hi=`expr '(' $ac_mid ')' - 1`
5246 if test $ac_mid -le $ac_hi; then
5247 ac_lo= ac_hi=
5248 break
5249 fi
5250 ac_mid=`expr 2 '*' $ac_mid`
5251fi
5252rm -f conftest.$ac_objext conftest.$ac_ext
5253 done
5254else
5255 echo "$as_me: failed program was:" >&5
5256cat conftest.$ac_ext >&5
5257ac_lo= ac_hi=
5258fi
5259rm -f conftest.$ac_objext conftest.$ac_ext
5260fi
5261rm -f conftest.$ac_objext conftest.$ac_ext
5262# Binary search between lo and hi bounds.
5263while test "x$ac_lo" != "x$ac_hi"; do
5264 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5265 cat >conftest.$ac_ext <<_ACEOF
5266#line $LINENO "configure"
5267#include "confdefs.h"
5268$ac_includes_default
5269#ifdef F77_DUMMY_MAIN
5270# ifdef __cplusplus
5271 extern "C"
5272# endif
5273 int F77_DUMMY_MAIN() { return 1; }
5274#endif
5275int
5276main ()
5277{
5278static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5279test_array [0] = 0
5280
5281 ;
5282 return 0;
5283}
5284_ACEOF
5285rm -f conftest.$ac_objext
5286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5287 (eval $ac_compile) 2>&5
5288 ac_status=$?
5289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5290 (exit $ac_status); } &&
5291 { ac_try='test -s conftest.$ac_objext'
5292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5293 (eval $ac_try) 2>&5
5294 ac_status=$?
5295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5296 (exit $ac_status); }; }; then
5297 ac_hi=$ac_mid
5298else
5299 echo "$as_me: failed program was:" >&5
5300cat conftest.$ac_ext >&5
5301ac_lo=`expr '(' $ac_mid ')' + 1`
5302fi
5303rm -f conftest.$ac_objext conftest.$ac_ext
5304done
5305case $ac_lo in
5306?*) ac_cv_sizeof_long=$ac_lo;;
5307'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5308echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5309 { (exit 1); exit 1; }; } ;;
5310esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005311else
5312 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005313 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5314echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5315 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005316else
Martin v. Löwis11437992002-04-12 09:54:03 +00005317 cat >conftest.$ac_ext <<_ACEOF
5318#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005319#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005320$ac_includes_default
5321long longval () { return (long) (sizeof (long)); }
5322unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005323#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005324#include <stdlib.h>
5325#ifdef F77_DUMMY_MAIN
5326# ifdef __cplusplus
5327 extern "C"
5328# endif
5329 int F77_DUMMY_MAIN() { return 1; }
5330#endif
5331int
5332main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005333{
Martin v. Löwis11437992002-04-12 09:54:03 +00005334
5335 FILE *f = fopen ("conftest.val", "w");
5336 if (! f)
5337 exit (1);
5338 if (((long) (sizeof (long))) < 0)
5339 {
5340 long i = longval ();
5341 if (i != ((long) (sizeof (long))))
5342 exit (1);
5343 fprintf (f, "%ld\n", i);
5344 }
5345 else
5346 {
5347 unsigned long i = ulongval ();
5348 if (i != ((long) (sizeof (long))))
5349 exit (1);
5350 fprintf (f, "%lu\n", i);
5351 }
5352 exit (ferror (f) || fclose (f) != 0);
5353
5354 ;
5355 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005356}
Martin v. Löwis11437992002-04-12 09:54:03 +00005357_ACEOF
5358rm -f conftest$ac_exeext
5359if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5360 (eval $ac_link) 2>&5
5361 ac_status=$?
5362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5363 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5365 (eval $ac_try) 2>&5
5366 ac_status=$?
5367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5368 (exit $ac_status); }; }; then
5369 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005370else
Martin v. Löwis11437992002-04-12 09:54:03 +00005371 echo "$as_me: program exited with status $ac_status" >&5
5372echo "$as_me: failed program was:" >&5
5373cat conftest.$ac_ext >&5
5374( exit $ac_status )
5375{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5376echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5377 { (exit 1); exit 1; }; }
5378fi
5379rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5380fi
5381fi
5382rm -f conftest.val
5383else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005384 ac_cv_sizeof_long=0
5385fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005386fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005387echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5388echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5389cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005390#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005391_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005392
5393
Martin v. Löwis11437992002-04-12 09:54:03 +00005394echo "$as_me:$LINENO: checking for void *" >&5
5395echo $ECHO_N "checking for void *... $ECHO_C" >&6
5396if test "${ac_cv_type_void_p+set}" = set; then
5397 echo $ECHO_N "(cached) $ECHO_C" >&6
5398else
5399 cat >conftest.$ac_ext <<_ACEOF
5400#line $LINENO "configure"
5401#include "confdefs.h"
5402$ac_includes_default
5403#ifdef F77_DUMMY_MAIN
5404# ifdef __cplusplus
5405 extern "C"
5406# endif
5407 int F77_DUMMY_MAIN() { return 1; }
5408#endif
5409int
5410main ()
5411{
5412if ((void * *) 0)
5413 return 0;
5414if (sizeof (void *))
5415 return 0;
5416 ;
5417 return 0;
5418}
5419_ACEOF
5420rm -f conftest.$ac_objext
5421if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5422 (eval $ac_compile) 2>&5
5423 ac_status=$?
5424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5425 (exit $ac_status); } &&
5426 { ac_try='test -s conftest.$ac_objext'
5427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5428 (eval $ac_try) 2>&5
5429 ac_status=$?
5430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5431 (exit $ac_status); }; }; then
5432 ac_cv_type_void_p=yes
5433else
5434 echo "$as_me: failed program was:" >&5
5435cat conftest.$ac_ext >&5
5436ac_cv_type_void_p=no
5437fi
5438rm -f conftest.$ac_objext conftest.$ac_ext
5439fi
5440echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5441echo "${ECHO_T}$ac_cv_type_void_p" >&6
5442
5443echo "$as_me:$LINENO: checking size of void *" >&5
5444echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5445if test "${ac_cv_sizeof_void_p+set}" = set; then
5446 echo $ECHO_N "(cached) $ECHO_C" >&6
5447else
5448 if test "$ac_cv_type_void_p" = yes; then
5449 # The cast to unsigned long works around a bug in the HP C Compiler
5450 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5451 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5452 # This bug is HP SR number 8606223364.
5453 if test "$cross_compiling" = yes; then
5454 # Depending upon the size, compute the lo and hi bounds.
5455cat >conftest.$ac_ext <<_ACEOF
5456#line $LINENO "configure"
5457#include "confdefs.h"
5458$ac_includes_default
5459#ifdef F77_DUMMY_MAIN
5460# ifdef __cplusplus
5461 extern "C"
5462# endif
5463 int F77_DUMMY_MAIN() { return 1; }
5464#endif
5465int
5466main ()
5467{
5468static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5469test_array [0] = 0
5470
5471 ;
5472 return 0;
5473}
5474_ACEOF
5475rm -f conftest.$ac_objext
5476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5477 (eval $ac_compile) 2>&5
5478 ac_status=$?
5479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5480 (exit $ac_status); } &&
5481 { ac_try='test -s conftest.$ac_objext'
5482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5483 (eval $ac_try) 2>&5
5484 ac_status=$?
5485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5486 (exit $ac_status); }; }; then
5487 ac_lo=0 ac_mid=0
5488 while :; do
5489 cat >conftest.$ac_ext <<_ACEOF
5490#line $LINENO "configure"
5491#include "confdefs.h"
5492$ac_includes_default
5493#ifdef F77_DUMMY_MAIN
5494# ifdef __cplusplus
5495 extern "C"
5496# endif
5497 int F77_DUMMY_MAIN() { return 1; }
5498#endif
5499int
5500main ()
5501{
5502static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5503test_array [0] = 0
5504
5505 ;
5506 return 0;
5507}
5508_ACEOF
5509rm -f conftest.$ac_objext
5510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5511 (eval $ac_compile) 2>&5
5512 ac_status=$?
5513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5514 (exit $ac_status); } &&
5515 { ac_try='test -s conftest.$ac_objext'
5516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5517 (eval $ac_try) 2>&5
5518 ac_status=$?
5519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5520 (exit $ac_status); }; }; then
5521 ac_hi=$ac_mid; break
5522else
5523 echo "$as_me: failed program was:" >&5
5524cat conftest.$ac_ext >&5
5525ac_lo=`expr $ac_mid + 1`
5526 if test $ac_lo -le $ac_mid; then
5527 ac_lo= ac_hi=
5528 break
5529 fi
5530 ac_mid=`expr 2 '*' $ac_mid + 1`
5531fi
5532rm -f conftest.$ac_objext conftest.$ac_ext
5533 done
5534else
5535 echo "$as_me: failed program was:" >&5
5536cat conftest.$ac_ext >&5
5537cat >conftest.$ac_ext <<_ACEOF
5538#line $LINENO "configure"
5539#include "confdefs.h"
5540$ac_includes_default
5541#ifdef F77_DUMMY_MAIN
5542# ifdef __cplusplus
5543 extern "C"
5544# endif
5545 int F77_DUMMY_MAIN() { return 1; }
5546#endif
5547int
5548main ()
5549{
5550static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5551test_array [0] = 0
5552
5553 ;
5554 return 0;
5555}
5556_ACEOF
5557rm -f conftest.$ac_objext
5558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5559 (eval $ac_compile) 2>&5
5560 ac_status=$?
5561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5562 (exit $ac_status); } &&
5563 { ac_try='test -s conftest.$ac_objext'
5564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5565 (eval $ac_try) 2>&5
5566 ac_status=$?
5567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5568 (exit $ac_status); }; }; then
5569 ac_hi=-1 ac_mid=-1
5570 while :; do
5571 cat >conftest.$ac_ext <<_ACEOF
5572#line $LINENO "configure"
5573#include "confdefs.h"
5574$ac_includes_default
5575#ifdef F77_DUMMY_MAIN
5576# ifdef __cplusplus
5577 extern "C"
5578# endif
5579 int F77_DUMMY_MAIN() { return 1; }
5580#endif
5581int
5582main ()
5583{
5584static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5585test_array [0] = 0
5586
5587 ;
5588 return 0;
5589}
5590_ACEOF
5591rm -f conftest.$ac_objext
5592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5593 (eval $ac_compile) 2>&5
5594 ac_status=$?
5595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5596 (exit $ac_status); } &&
5597 { ac_try='test -s conftest.$ac_objext'
5598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5599 (eval $ac_try) 2>&5
5600 ac_status=$?
5601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5602 (exit $ac_status); }; }; then
5603 ac_lo=$ac_mid; break
5604else
5605 echo "$as_me: failed program was:" >&5
5606cat conftest.$ac_ext >&5
5607ac_hi=`expr '(' $ac_mid ')' - 1`
5608 if test $ac_mid -le $ac_hi; then
5609 ac_lo= ac_hi=
5610 break
5611 fi
5612 ac_mid=`expr 2 '*' $ac_mid`
5613fi
5614rm -f conftest.$ac_objext conftest.$ac_ext
5615 done
5616else
5617 echo "$as_me: failed program was:" >&5
5618cat conftest.$ac_ext >&5
5619ac_lo= ac_hi=
5620fi
5621rm -f conftest.$ac_objext conftest.$ac_ext
5622fi
5623rm -f conftest.$ac_objext conftest.$ac_ext
5624# Binary search between lo and hi bounds.
5625while test "x$ac_lo" != "x$ac_hi"; do
5626 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5627 cat >conftest.$ac_ext <<_ACEOF
5628#line $LINENO "configure"
5629#include "confdefs.h"
5630$ac_includes_default
5631#ifdef F77_DUMMY_MAIN
5632# ifdef __cplusplus
5633 extern "C"
5634# endif
5635 int F77_DUMMY_MAIN() { return 1; }
5636#endif
5637int
5638main ()
5639{
5640static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5641test_array [0] = 0
5642
5643 ;
5644 return 0;
5645}
5646_ACEOF
5647rm -f conftest.$ac_objext
5648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5649 (eval $ac_compile) 2>&5
5650 ac_status=$?
5651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5652 (exit $ac_status); } &&
5653 { ac_try='test -s conftest.$ac_objext'
5654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5655 (eval $ac_try) 2>&5
5656 ac_status=$?
5657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5658 (exit $ac_status); }; }; then
5659 ac_hi=$ac_mid
5660else
5661 echo "$as_me: failed program was:" >&5
5662cat conftest.$ac_ext >&5
5663ac_lo=`expr '(' $ac_mid ')' + 1`
5664fi
5665rm -f conftest.$ac_objext conftest.$ac_ext
5666done
5667case $ac_lo in
5668?*) ac_cv_sizeof_void_p=$ac_lo;;
5669'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5670echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5671 { (exit 1); exit 1; }; } ;;
5672esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005673else
5674 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005675 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5676echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5677 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005678else
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 cat >conftest.$ac_ext <<_ACEOF
5680#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005681#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005682$ac_includes_default
5683long longval () { return (long) (sizeof (void *)); }
5684unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005685#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005686#include <stdlib.h>
5687#ifdef F77_DUMMY_MAIN
5688# ifdef __cplusplus
5689 extern "C"
5690# endif
5691 int F77_DUMMY_MAIN() { return 1; }
5692#endif
5693int
5694main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005695{
Martin v. Löwis11437992002-04-12 09:54:03 +00005696
5697 FILE *f = fopen ("conftest.val", "w");
5698 if (! f)
5699 exit (1);
5700 if (((long) (sizeof (void *))) < 0)
5701 {
5702 long i = longval ();
5703 if (i != ((long) (sizeof (void *))))
5704 exit (1);
5705 fprintf (f, "%ld\n", i);
5706 }
5707 else
5708 {
5709 unsigned long i = ulongval ();
5710 if (i != ((long) (sizeof (void *))))
5711 exit (1);
5712 fprintf (f, "%lu\n", i);
5713 }
5714 exit (ferror (f) || fclose (f) != 0);
5715
5716 ;
5717 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005718}
Martin v. Löwis11437992002-04-12 09:54:03 +00005719_ACEOF
5720rm -f conftest$ac_exeext
5721if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5722 (eval $ac_link) 2>&5
5723 ac_status=$?
5724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5725 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5727 (eval $ac_try) 2>&5
5728 ac_status=$?
5729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5730 (exit $ac_status); }; }; then
5731 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005732else
Martin v. Löwis11437992002-04-12 09:54:03 +00005733 echo "$as_me: program exited with status $ac_status" >&5
5734echo "$as_me: failed program was:" >&5
5735cat conftest.$ac_ext >&5
5736( exit $ac_status )
5737{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5738echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5739 { (exit 1); exit 1; }; }
5740fi
5741rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5742fi
5743fi
5744rm -f conftest.val
5745else
Guido van Rossumad678af1998-10-02 14:42:15 +00005746 ac_cv_sizeof_void_p=0
5747fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005748fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005749echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5750echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5751cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005752#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005753_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005754
5755
Martin v. Löwis11437992002-04-12 09:54:03 +00005756echo "$as_me:$LINENO: checking for char" >&5
5757echo $ECHO_N "checking for char... $ECHO_C" >&6
5758if test "${ac_cv_type_char+set}" = set; then
5759 echo $ECHO_N "(cached) $ECHO_C" >&6
5760else
5761 cat >conftest.$ac_ext <<_ACEOF
5762#line $LINENO "configure"
5763#include "confdefs.h"
5764$ac_includes_default
5765#ifdef F77_DUMMY_MAIN
5766# ifdef __cplusplus
5767 extern "C"
5768# endif
5769 int F77_DUMMY_MAIN() { return 1; }
5770#endif
5771int
5772main ()
5773{
5774if ((char *) 0)
5775 return 0;
5776if (sizeof (char))
5777 return 0;
5778 ;
5779 return 0;
5780}
5781_ACEOF
5782rm -f conftest.$ac_objext
5783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5784 (eval $ac_compile) 2>&5
5785 ac_status=$?
5786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5787 (exit $ac_status); } &&
5788 { ac_try='test -s conftest.$ac_objext'
5789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5790 (eval $ac_try) 2>&5
5791 ac_status=$?
5792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5793 (exit $ac_status); }; }; then
5794 ac_cv_type_char=yes
5795else
5796 echo "$as_me: failed program was:" >&5
5797cat conftest.$ac_ext >&5
5798ac_cv_type_char=no
5799fi
5800rm -f conftest.$ac_objext conftest.$ac_ext
5801fi
5802echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5803echo "${ECHO_T}$ac_cv_type_char" >&6
5804
5805echo "$as_me:$LINENO: checking size of char" >&5
5806echo $ECHO_N "checking size of char... $ECHO_C" >&6
5807if test "${ac_cv_sizeof_char+set}" = set; then
5808 echo $ECHO_N "(cached) $ECHO_C" >&6
5809else
5810 if test "$ac_cv_type_char" = yes; then
5811 # The cast to unsigned long works around a bug in the HP C Compiler
5812 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5813 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5814 # This bug is HP SR number 8606223364.
5815 if test "$cross_compiling" = yes; then
5816 # Depending upon the size, compute the lo and hi bounds.
5817cat >conftest.$ac_ext <<_ACEOF
5818#line $LINENO "configure"
5819#include "confdefs.h"
5820$ac_includes_default
5821#ifdef F77_DUMMY_MAIN
5822# ifdef __cplusplus
5823 extern "C"
5824# endif
5825 int F77_DUMMY_MAIN() { return 1; }
5826#endif
5827int
5828main ()
5829{
5830static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5831test_array [0] = 0
5832
5833 ;
5834 return 0;
5835}
5836_ACEOF
5837rm -f conftest.$ac_objext
5838if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5839 (eval $ac_compile) 2>&5
5840 ac_status=$?
5841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5842 (exit $ac_status); } &&
5843 { ac_try='test -s conftest.$ac_objext'
5844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5845 (eval $ac_try) 2>&5
5846 ac_status=$?
5847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5848 (exit $ac_status); }; }; then
5849 ac_lo=0 ac_mid=0
5850 while :; do
5851 cat >conftest.$ac_ext <<_ACEOF
5852#line $LINENO "configure"
5853#include "confdefs.h"
5854$ac_includes_default
5855#ifdef F77_DUMMY_MAIN
5856# ifdef __cplusplus
5857 extern "C"
5858# endif
5859 int F77_DUMMY_MAIN() { return 1; }
5860#endif
5861int
5862main ()
5863{
5864static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5865test_array [0] = 0
5866
5867 ;
5868 return 0;
5869}
5870_ACEOF
5871rm -f conftest.$ac_objext
5872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5873 (eval $ac_compile) 2>&5
5874 ac_status=$?
5875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5876 (exit $ac_status); } &&
5877 { ac_try='test -s conftest.$ac_objext'
5878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5879 (eval $ac_try) 2>&5
5880 ac_status=$?
5881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5882 (exit $ac_status); }; }; then
5883 ac_hi=$ac_mid; break
5884else
5885 echo "$as_me: failed program was:" >&5
5886cat conftest.$ac_ext >&5
5887ac_lo=`expr $ac_mid + 1`
5888 if test $ac_lo -le $ac_mid; then
5889 ac_lo= ac_hi=
5890 break
5891 fi
5892 ac_mid=`expr 2 '*' $ac_mid + 1`
5893fi
5894rm -f conftest.$ac_objext conftest.$ac_ext
5895 done
5896else
5897 echo "$as_me: failed program was:" >&5
5898cat conftest.$ac_ext >&5
5899cat >conftest.$ac_ext <<_ACEOF
5900#line $LINENO "configure"
5901#include "confdefs.h"
5902$ac_includes_default
5903#ifdef F77_DUMMY_MAIN
5904# ifdef __cplusplus
5905 extern "C"
5906# endif
5907 int F77_DUMMY_MAIN() { return 1; }
5908#endif
5909int
5910main ()
5911{
5912static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5913test_array [0] = 0
5914
5915 ;
5916 return 0;
5917}
5918_ACEOF
5919rm -f conftest.$ac_objext
5920if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5921 (eval $ac_compile) 2>&5
5922 ac_status=$?
5923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5924 (exit $ac_status); } &&
5925 { ac_try='test -s conftest.$ac_objext'
5926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5927 (eval $ac_try) 2>&5
5928 ac_status=$?
5929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5930 (exit $ac_status); }; }; then
5931 ac_hi=-1 ac_mid=-1
5932 while :; do
5933 cat >conftest.$ac_ext <<_ACEOF
5934#line $LINENO "configure"
5935#include "confdefs.h"
5936$ac_includes_default
5937#ifdef F77_DUMMY_MAIN
5938# ifdef __cplusplus
5939 extern "C"
5940# endif
5941 int F77_DUMMY_MAIN() { return 1; }
5942#endif
5943int
5944main ()
5945{
5946static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5947test_array [0] = 0
5948
5949 ;
5950 return 0;
5951}
5952_ACEOF
5953rm -f conftest.$ac_objext
5954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5955 (eval $ac_compile) 2>&5
5956 ac_status=$?
5957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5958 (exit $ac_status); } &&
5959 { ac_try='test -s conftest.$ac_objext'
5960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5961 (eval $ac_try) 2>&5
5962 ac_status=$?
5963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5964 (exit $ac_status); }; }; then
5965 ac_lo=$ac_mid; break
5966else
5967 echo "$as_me: failed program was:" >&5
5968cat conftest.$ac_ext >&5
5969ac_hi=`expr '(' $ac_mid ')' - 1`
5970 if test $ac_mid -le $ac_hi; then
5971 ac_lo= ac_hi=
5972 break
5973 fi
5974 ac_mid=`expr 2 '*' $ac_mid`
5975fi
5976rm -f conftest.$ac_objext conftest.$ac_ext
5977 done
5978else
5979 echo "$as_me: failed program was:" >&5
5980cat conftest.$ac_ext >&5
5981ac_lo= ac_hi=
5982fi
5983rm -f conftest.$ac_objext conftest.$ac_ext
5984fi
5985rm -f conftest.$ac_objext conftest.$ac_ext
5986# Binary search between lo and hi bounds.
5987while test "x$ac_lo" != "x$ac_hi"; do
5988 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5989 cat >conftest.$ac_ext <<_ACEOF
5990#line $LINENO "configure"
5991#include "confdefs.h"
5992$ac_includes_default
5993#ifdef F77_DUMMY_MAIN
5994# ifdef __cplusplus
5995 extern "C"
5996# endif
5997 int F77_DUMMY_MAIN() { return 1; }
5998#endif
5999int
6000main ()
6001{
6002static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6003test_array [0] = 0
6004
6005 ;
6006 return 0;
6007}
6008_ACEOF
6009rm -f conftest.$ac_objext
6010if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6011 (eval $ac_compile) 2>&5
6012 ac_status=$?
6013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6014 (exit $ac_status); } &&
6015 { ac_try='test -s conftest.$ac_objext'
6016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6017 (eval $ac_try) 2>&5
6018 ac_status=$?
6019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6020 (exit $ac_status); }; }; then
6021 ac_hi=$ac_mid
6022else
6023 echo "$as_me: failed program was:" >&5
6024cat conftest.$ac_ext >&5
6025ac_lo=`expr '(' $ac_mid ')' + 1`
6026fi
6027rm -f conftest.$ac_objext conftest.$ac_ext
6028done
6029case $ac_lo in
6030?*) ac_cv_sizeof_char=$ac_lo;;
6031'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6032echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6033 { (exit 1); exit 1; }; } ;;
6034esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006035else
6036 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006037 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6038echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6039 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006040else
Martin v. Löwis11437992002-04-12 09:54:03 +00006041 cat >conftest.$ac_ext <<_ACEOF
6042#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006043#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006044$ac_includes_default
6045long longval () { return (long) (sizeof (char)); }
6046unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006047#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006048#include <stdlib.h>
6049#ifdef F77_DUMMY_MAIN
6050# ifdef __cplusplus
6051 extern "C"
6052# endif
6053 int F77_DUMMY_MAIN() { return 1; }
6054#endif
6055int
6056main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006057{
Martin v. Löwis11437992002-04-12 09:54:03 +00006058
6059 FILE *f = fopen ("conftest.val", "w");
6060 if (! f)
6061 exit (1);
6062 if (((long) (sizeof (char))) < 0)
6063 {
6064 long i = longval ();
6065 if (i != ((long) (sizeof (char))))
6066 exit (1);
6067 fprintf (f, "%ld\n", i);
6068 }
6069 else
6070 {
6071 unsigned long i = ulongval ();
6072 if (i != ((long) (sizeof (char))))
6073 exit (1);
6074 fprintf (f, "%lu\n", i);
6075 }
6076 exit (ferror (f) || fclose (f) != 0);
6077
6078 ;
6079 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006080}
Martin v. Löwis11437992002-04-12 09:54:03 +00006081_ACEOF
6082rm -f conftest$ac_exeext
6083if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6084 (eval $ac_link) 2>&5
6085 ac_status=$?
6086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6087 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6089 (eval $ac_try) 2>&5
6090 ac_status=$?
6091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6092 (exit $ac_status); }; }; then
6093 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006094else
Martin v. Löwis11437992002-04-12 09:54:03 +00006095 echo "$as_me: program exited with status $ac_status" >&5
6096echo "$as_me: failed program was:" >&5
6097cat conftest.$ac_ext >&5
6098( exit $ac_status )
6099{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6100echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6101 { (exit 1); exit 1; }; }
6102fi
6103rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6104fi
6105fi
6106rm -f conftest.val
6107else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006108 ac_cv_sizeof_char=0
6109fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006110fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006111echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6112echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6113cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006114#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006115_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006116
6117
Martin v. Löwis11437992002-04-12 09:54:03 +00006118echo "$as_me:$LINENO: checking for short" >&5
6119echo $ECHO_N "checking for short... $ECHO_C" >&6
6120if test "${ac_cv_type_short+set}" = set; then
6121 echo $ECHO_N "(cached) $ECHO_C" >&6
6122else
6123 cat >conftest.$ac_ext <<_ACEOF
6124#line $LINENO "configure"
6125#include "confdefs.h"
6126$ac_includes_default
6127#ifdef F77_DUMMY_MAIN
6128# ifdef __cplusplus
6129 extern "C"
6130# endif
6131 int F77_DUMMY_MAIN() { return 1; }
6132#endif
6133int
6134main ()
6135{
6136if ((short *) 0)
6137 return 0;
6138if (sizeof (short))
6139 return 0;
6140 ;
6141 return 0;
6142}
6143_ACEOF
6144rm -f conftest.$ac_objext
6145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6146 (eval $ac_compile) 2>&5
6147 ac_status=$?
6148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6149 (exit $ac_status); } &&
6150 { ac_try='test -s conftest.$ac_objext'
6151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6152 (eval $ac_try) 2>&5
6153 ac_status=$?
6154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6155 (exit $ac_status); }; }; then
6156 ac_cv_type_short=yes
6157else
6158 echo "$as_me: failed program was:" >&5
6159cat conftest.$ac_ext >&5
6160ac_cv_type_short=no
6161fi
6162rm -f conftest.$ac_objext conftest.$ac_ext
6163fi
6164echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6165echo "${ECHO_T}$ac_cv_type_short" >&6
6166
6167echo "$as_me:$LINENO: checking size of short" >&5
6168echo $ECHO_N "checking size of short... $ECHO_C" >&6
6169if test "${ac_cv_sizeof_short+set}" = set; then
6170 echo $ECHO_N "(cached) $ECHO_C" >&6
6171else
6172 if test "$ac_cv_type_short" = yes; then
6173 # The cast to unsigned long works around a bug in the HP C Compiler
6174 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6175 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6176 # This bug is HP SR number 8606223364.
6177 if test "$cross_compiling" = yes; then
6178 # Depending upon the size, compute the lo and hi bounds.
6179cat >conftest.$ac_ext <<_ACEOF
6180#line $LINENO "configure"
6181#include "confdefs.h"
6182$ac_includes_default
6183#ifdef F77_DUMMY_MAIN
6184# ifdef __cplusplus
6185 extern "C"
6186# endif
6187 int F77_DUMMY_MAIN() { return 1; }
6188#endif
6189int
6190main ()
6191{
6192static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6193test_array [0] = 0
6194
6195 ;
6196 return 0;
6197}
6198_ACEOF
6199rm -f conftest.$ac_objext
6200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6201 (eval $ac_compile) 2>&5
6202 ac_status=$?
6203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6204 (exit $ac_status); } &&
6205 { ac_try='test -s conftest.$ac_objext'
6206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6207 (eval $ac_try) 2>&5
6208 ac_status=$?
6209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6210 (exit $ac_status); }; }; then
6211 ac_lo=0 ac_mid=0
6212 while :; do
6213 cat >conftest.$ac_ext <<_ACEOF
6214#line $LINENO "configure"
6215#include "confdefs.h"
6216$ac_includes_default
6217#ifdef F77_DUMMY_MAIN
6218# ifdef __cplusplus
6219 extern "C"
6220# endif
6221 int F77_DUMMY_MAIN() { return 1; }
6222#endif
6223int
6224main ()
6225{
6226static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6227test_array [0] = 0
6228
6229 ;
6230 return 0;
6231}
6232_ACEOF
6233rm -f conftest.$ac_objext
6234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6235 (eval $ac_compile) 2>&5
6236 ac_status=$?
6237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6238 (exit $ac_status); } &&
6239 { ac_try='test -s conftest.$ac_objext'
6240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6241 (eval $ac_try) 2>&5
6242 ac_status=$?
6243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6244 (exit $ac_status); }; }; then
6245 ac_hi=$ac_mid; break
6246else
6247 echo "$as_me: failed program was:" >&5
6248cat conftest.$ac_ext >&5
6249ac_lo=`expr $ac_mid + 1`
6250 if test $ac_lo -le $ac_mid; then
6251 ac_lo= ac_hi=
6252 break
6253 fi
6254 ac_mid=`expr 2 '*' $ac_mid + 1`
6255fi
6256rm -f conftest.$ac_objext conftest.$ac_ext
6257 done
6258else
6259 echo "$as_me: failed program was:" >&5
6260cat conftest.$ac_ext >&5
6261cat >conftest.$ac_ext <<_ACEOF
6262#line $LINENO "configure"
6263#include "confdefs.h"
6264$ac_includes_default
6265#ifdef F77_DUMMY_MAIN
6266# ifdef __cplusplus
6267 extern "C"
6268# endif
6269 int F77_DUMMY_MAIN() { return 1; }
6270#endif
6271int
6272main ()
6273{
6274static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6275test_array [0] = 0
6276
6277 ;
6278 return 0;
6279}
6280_ACEOF
6281rm -f conftest.$ac_objext
6282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6283 (eval $ac_compile) 2>&5
6284 ac_status=$?
6285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6286 (exit $ac_status); } &&
6287 { ac_try='test -s conftest.$ac_objext'
6288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6289 (eval $ac_try) 2>&5
6290 ac_status=$?
6291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6292 (exit $ac_status); }; }; then
6293 ac_hi=-1 ac_mid=-1
6294 while :; do
6295 cat >conftest.$ac_ext <<_ACEOF
6296#line $LINENO "configure"
6297#include "confdefs.h"
6298$ac_includes_default
6299#ifdef F77_DUMMY_MAIN
6300# ifdef __cplusplus
6301 extern "C"
6302# endif
6303 int F77_DUMMY_MAIN() { return 1; }
6304#endif
6305int
6306main ()
6307{
6308static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6309test_array [0] = 0
6310
6311 ;
6312 return 0;
6313}
6314_ACEOF
6315rm -f conftest.$ac_objext
6316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6317 (eval $ac_compile) 2>&5
6318 ac_status=$?
6319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6320 (exit $ac_status); } &&
6321 { ac_try='test -s conftest.$ac_objext'
6322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6323 (eval $ac_try) 2>&5
6324 ac_status=$?
6325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6326 (exit $ac_status); }; }; then
6327 ac_lo=$ac_mid; break
6328else
6329 echo "$as_me: failed program was:" >&5
6330cat conftest.$ac_ext >&5
6331ac_hi=`expr '(' $ac_mid ')' - 1`
6332 if test $ac_mid -le $ac_hi; then
6333 ac_lo= ac_hi=
6334 break
6335 fi
6336 ac_mid=`expr 2 '*' $ac_mid`
6337fi
6338rm -f conftest.$ac_objext conftest.$ac_ext
6339 done
6340else
6341 echo "$as_me: failed program was:" >&5
6342cat conftest.$ac_ext >&5
6343ac_lo= ac_hi=
6344fi
6345rm -f conftest.$ac_objext conftest.$ac_ext
6346fi
6347rm -f conftest.$ac_objext conftest.$ac_ext
6348# Binary search between lo and hi bounds.
6349while test "x$ac_lo" != "x$ac_hi"; do
6350 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6351 cat >conftest.$ac_ext <<_ACEOF
6352#line $LINENO "configure"
6353#include "confdefs.h"
6354$ac_includes_default
6355#ifdef F77_DUMMY_MAIN
6356# ifdef __cplusplus
6357 extern "C"
6358# endif
6359 int F77_DUMMY_MAIN() { return 1; }
6360#endif
6361int
6362main ()
6363{
6364static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6365test_array [0] = 0
6366
6367 ;
6368 return 0;
6369}
6370_ACEOF
6371rm -f conftest.$ac_objext
6372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6373 (eval $ac_compile) 2>&5
6374 ac_status=$?
6375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6376 (exit $ac_status); } &&
6377 { ac_try='test -s conftest.$ac_objext'
6378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6379 (eval $ac_try) 2>&5
6380 ac_status=$?
6381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6382 (exit $ac_status); }; }; then
6383 ac_hi=$ac_mid
6384else
6385 echo "$as_me: failed program was:" >&5
6386cat conftest.$ac_ext >&5
6387ac_lo=`expr '(' $ac_mid ')' + 1`
6388fi
6389rm -f conftest.$ac_objext conftest.$ac_ext
6390done
6391case $ac_lo in
6392?*) ac_cv_sizeof_short=$ac_lo;;
6393'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6394echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6395 { (exit 1); exit 1; }; } ;;
6396esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006397else
6398 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006399 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6400echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6401 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006402else
Martin v. Löwis11437992002-04-12 09:54:03 +00006403 cat >conftest.$ac_ext <<_ACEOF
6404#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006405#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006406$ac_includes_default
6407long longval () { return (long) (sizeof (short)); }
6408unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006409#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006410#include <stdlib.h>
6411#ifdef F77_DUMMY_MAIN
6412# ifdef __cplusplus
6413 extern "C"
6414# endif
6415 int F77_DUMMY_MAIN() { return 1; }
6416#endif
6417int
6418main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006419{
Martin v. Löwis11437992002-04-12 09:54:03 +00006420
6421 FILE *f = fopen ("conftest.val", "w");
6422 if (! f)
6423 exit (1);
6424 if (((long) (sizeof (short))) < 0)
6425 {
6426 long i = longval ();
6427 if (i != ((long) (sizeof (short))))
6428 exit (1);
6429 fprintf (f, "%ld\n", i);
6430 }
6431 else
6432 {
6433 unsigned long i = ulongval ();
6434 if (i != ((long) (sizeof (short))))
6435 exit (1);
6436 fprintf (f, "%lu\n", i);
6437 }
6438 exit (ferror (f) || fclose (f) != 0);
6439
6440 ;
6441 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006442}
Martin v. Löwis11437992002-04-12 09:54:03 +00006443_ACEOF
6444rm -f conftest$ac_exeext
6445if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6446 (eval $ac_link) 2>&5
6447 ac_status=$?
6448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6449 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6451 (eval $ac_try) 2>&5
6452 ac_status=$?
6453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6454 (exit $ac_status); }; }; then
6455 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006456else
Martin v. Löwis11437992002-04-12 09:54:03 +00006457 echo "$as_me: program exited with status $ac_status" >&5
6458echo "$as_me: failed program was:" >&5
6459cat conftest.$ac_ext >&5
6460( exit $ac_status )
6461{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6462echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6463 { (exit 1); exit 1; }; }
6464fi
6465rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6466fi
6467fi
6468rm -f conftest.val
6469else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006470 ac_cv_sizeof_short=0
6471fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006472fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006473echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6474echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6475cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006476#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006477_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006478
6479
Martin v. Löwis11437992002-04-12 09:54:03 +00006480echo "$as_me:$LINENO: checking for float" >&5
6481echo $ECHO_N "checking for float... $ECHO_C" >&6
6482if test "${ac_cv_type_float+set}" = set; then
6483 echo $ECHO_N "(cached) $ECHO_C" >&6
6484else
6485 cat >conftest.$ac_ext <<_ACEOF
6486#line $LINENO "configure"
6487#include "confdefs.h"
6488$ac_includes_default
6489#ifdef F77_DUMMY_MAIN
6490# ifdef __cplusplus
6491 extern "C"
6492# endif
6493 int F77_DUMMY_MAIN() { return 1; }
6494#endif
6495int
6496main ()
6497{
6498if ((float *) 0)
6499 return 0;
6500if (sizeof (float))
6501 return 0;
6502 ;
6503 return 0;
6504}
6505_ACEOF
6506rm -f conftest.$ac_objext
6507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6508 (eval $ac_compile) 2>&5
6509 ac_status=$?
6510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6511 (exit $ac_status); } &&
6512 { ac_try='test -s conftest.$ac_objext'
6513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6514 (eval $ac_try) 2>&5
6515 ac_status=$?
6516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6517 (exit $ac_status); }; }; then
6518 ac_cv_type_float=yes
6519else
6520 echo "$as_me: failed program was:" >&5
6521cat conftest.$ac_ext >&5
6522ac_cv_type_float=no
6523fi
6524rm -f conftest.$ac_objext conftest.$ac_ext
6525fi
6526echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6527echo "${ECHO_T}$ac_cv_type_float" >&6
6528
6529echo "$as_me:$LINENO: checking size of float" >&5
6530echo $ECHO_N "checking size of float... $ECHO_C" >&6
6531if test "${ac_cv_sizeof_float+set}" = set; then
6532 echo $ECHO_N "(cached) $ECHO_C" >&6
6533else
6534 if test "$ac_cv_type_float" = yes; then
6535 # The cast to unsigned long works around a bug in the HP C Compiler
6536 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6537 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6538 # This bug is HP SR number 8606223364.
6539 if test "$cross_compiling" = yes; then
6540 # Depending upon the size, compute the lo and hi bounds.
6541cat >conftest.$ac_ext <<_ACEOF
6542#line $LINENO "configure"
6543#include "confdefs.h"
6544$ac_includes_default
6545#ifdef F77_DUMMY_MAIN
6546# ifdef __cplusplus
6547 extern "C"
6548# endif
6549 int F77_DUMMY_MAIN() { return 1; }
6550#endif
6551int
6552main ()
6553{
6554static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6555test_array [0] = 0
6556
6557 ;
6558 return 0;
6559}
6560_ACEOF
6561rm -f conftest.$ac_objext
6562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6563 (eval $ac_compile) 2>&5
6564 ac_status=$?
6565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6566 (exit $ac_status); } &&
6567 { ac_try='test -s conftest.$ac_objext'
6568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6569 (eval $ac_try) 2>&5
6570 ac_status=$?
6571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6572 (exit $ac_status); }; }; then
6573 ac_lo=0 ac_mid=0
6574 while :; do
6575 cat >conftest.$ac_ext <<_ACEOF
6576#line $LINENO "configure"
6577#include "confdefs.h"
6578$ac_includes_default
6579#ifdef F77_DUMMY_MAIN
6580# ifdef __cplusplus
6581 extern "C"
6582# endif
6583 int F77_DUMMY_MAIN() { return 1; }
6584#endif
6585int
6586main ()
6587{
6588static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6589test_array [0] = 0
6590
6591 ;
6592 return 0;
6593}
6594_ACEOF
6595rm -f conftest.$ac_objext
6596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6597 (eval $ac_compile) 2>&5
6598 ac_status=$?
6599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6600 (exit $ac_status); } &&
6601 { ac_try='test -s conftest.$ac_objext'
6602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6603 (eval $ac_try) 2>&5
6604 ac_status=$?
6605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6606 (exit $ac_status); }; }; then
6607 ac_hi=$ac_mid; break
6608else
6609 echo "$as_me: failed program was:" >&5
6610cat conftest.$ac_ext >&5
6611ac_lo=`expr $ac_mid + 1`
6612 if test $ac_lo -le $ac_mid; then
6613 ac_lo= ac_hi=
6614 break
6615 fi
6616 ac_mid=`expr 2 '*' $ac_mid + 1`
6617fi
6618rm -f conftest.$ac_objext conftest.$ac_ext
6619 done
6620else
6621 echo "$as_me: failed program was:" >&5
6622cat conftest.$ac_ext >&5
6623cat >conftest.$ac_ext <<_ACEOF
6624#line $LINENO "configure"
6625#include "confdefs.h"
6626$ac_includes_default
6627#ifdef F77_DUMMY_MAIN
6628# ifdef __cplusplus
6629 extern "C"
6630# endif
6631 int F77_DUMMY_MAIN() { return 1; }
6632#endif
6633int
6634main ()
6635{
6636static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6637test_array [0] = 0
6638
6639 ;
6640 return 0;
6641}
6642_ACEOF
6643rm -f conftest.$ac_objext
6644if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6645 (eval $ac_compile) 2>&5
6646 ac_status=$?
6647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6648 (exit $ac_status); } &&
6649 { ac_try='test -s conftest.$ac_objext'
6650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6651 (eval $ac_try) 2>&5
6652 ac_status=$?
6653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6654 (exit $ac_status); }; }; then
6655 ac_hi=-1 ac_mid=-1
6656 while :; do
6657 cat >conftest.$ac_ext <<_ACEOF
6658#line $LINENO "configure"
6659#include "confdefs.h"
6660$ac_includes_default
6661#ifdef F77_DUMMY_MAIN
6662# ifdef __cplusplus
6663 extern "C"
6664# endif
6665 int F77_DUMMY_MAIN() { return 1; }
6666#endif
6667int
6668main ()
6669{
6670static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6671test_array [0] = 0
6672
6673 ;
6674 return 0;
6675}
6676_ACEOF
6677rm -f conftest.$ac_objext
6678if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6679 (eval $ac_compile) 2>&5
6680 ac_status=$?
6681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6682 (exit $ac_status); } &&
6683 { ac_try='test -s conftest.$ac_objext'
6684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6685 (eval $ac_try) 2>&5
6686 ac_status=$?
6687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6688 (exit $ac_status); }; }; then
6689 ac_lo=$ac_mid; break
6690else
6691 echo "$as_me: failed program was:" >&5
6692cat conftest.$ac_ext >&5
6693ac_hi=`expr '(' $ac_mid ')' - 1`
6694 if test $ac_mid -le $ac_hi; then
6695 ac_lo= ac_hi=
6696 break
6697 fi
6698 ac_mid=`expr 2 '*' $ac_mid`
6699fi
6700rm -f conftest.$ac_objext conftest.$ac_ext
6701 done
6702else
6703 echo "$as_me: failed program was:" >&5
6704cat conftest.$ac_ext >&5
6705ac_lo= ac_hi=
6706fi
6707rm -f conftest.$ac_objext conftest.$ac_ext
6708fi
6709rm -f conftest.$ac_objext conftest.$ac_ext
6710# Binary search between lo and hi bounds.
6711while test "x$ac_lo" != "x$ac_hi"; do
6712 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6713 cat >conftest.$ac_ext <<_ACEOF
6714#line $LINENO "configure"
6715#include "confdefs.h"
6716$ac_includes_default
6717#ifdef F77_DUMMY_MAIN
6718# ifdef __cplusplus
6719 extern "C"
6720# endif
6721 int F77_DUMMY_MAIN() { return 1; }
6722#endif
6723int
6724main ()
6725{
6726static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6727test_array [0] = 0
6728
6729 ;
6730 return 0;
6731}
6732_ACEOF
6733rm -f conftest.$ac_objext
6734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6735 (eval $ac_compile) 2>&5
6736 ac_status=$?
6737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6738 (exit $ac_status); } &&
6739 { ac_try='test -s conftest.$ac_objext'
6740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6741 (eval $ac_try) 2>&5
6742 ac_status=$?
6743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6744 (exit $ac_status); }; }; then
6745 ac_hi=$ac_mid
6746else
6747 echo "$as_me: failed program was:" >&5
6748cat conftest.$ac_ext >&5
6749ac_lo=`expr '(' $ac_mid ')' + 1`
6750fi
6751rm -f conftest.$ac_objext conftest.$ac_ext
6752done
6753case $ac_lo in
6754?*) ac_cv_sizeof_float=$ac_lo;;
6755'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6756echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6757 { (exit 1); exit 1; }; } ;;
6758esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006759else
6760 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006761 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6762echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6763 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006764else
Martin v. Löwis11437992002-04-12 09:54:03 +00006765 cat >conftest.$ac_ext <<_ACEOF
6766#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006767#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006768$ac_includes_default
6769long longval () { return (long) (sizeof (float)); }
6770unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006771#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006772#include <stdlib.h>
6773#ifdef F77_DUMMY_MAIN
6774# ifdef __cplusplus
6775 extern "C"
6776# endif
6777 int F77_DUMMY_MAIN() { return 1; }
6778#endif
6779int
6780main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006781{
Martin v. Löwis11437992002-04-12 09:54:03 +00006782
6783 FILE *f = fopen ("conftest.val", "w");
6784 if (! f)
6785 exit (1);
6786 if (((long) (sizeof (float))) < 0)
6787 {
6788 long i = longval ();
6789 if (i != ((long) (sizeof (float))))
6790 exit (1);
6791 fprintf (f, "%ld\n", i);
6792 }
6793 else
6794 {
6795 unsigned long i = ulongval ();
6796 if (i != ((long) (sizeof (float))))
6797 exit (1);
6798 fprintf (f, "%lu\n", i);
6799 }
6800 exit (ferror (f) || fclose (f) != 0);
6801
6802 ;
6803 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006804}
Martin v. Löwis11437992002-04-12 09:54:03 +00006805_ACEOF
6806rm -f conftest$ac_exeext
6807if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6808 (eval $ac_link) 2>&5
6809 ac_status=$?
6810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6811 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6813 (eval $ac_try) 2>&5
6814 ac_status=$?
6815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6816 (exit $ac_status); }; }; then
6817 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006818else
Martin v. Löwis11437992002-04-12 09:54:03 +00006819 echo "$as_me: program exited with status $ac_status" >&5
6820echo "$as_me: failed program was:" >&5
6821cat conftest.$ac_ext >&5
6822( exit $ac_status )
6823{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6824echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6825 { (exit 1); exit 1; }; }
6826fi
6827rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6828fi
6829fi
6830rm -f conftest.val
6831else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006832 ac_cv_sizeof_float=0
6833fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006834fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006835echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6836echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6837cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006838#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006839_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006840
6841
Martin v. Löwis11437992002-04-12 09:54:03 +00006842echo "$as_me:$LINENO: checking for double" >&5
6843echo $ECHO_N "checking for double... $ECHO_C" >&6
6844if test "${ac_cv_type_double+set}" = set; then
6845 echo $ECHO_N "(cached) $ECHO_C" >&6
6846else
6847 cat >conftest.$ac_ext <<_ACEOF
6848#line $LINENO "configure"
6849#include "confdefs.h"
6850$ac_includes_default
6851#ifdef F77_DUMMY_MAIN
6852# ifdef __cplusplus
6853 extern "C"
6854# endif
6855 int F77_DUMMY_MAIN() { return 1; }
6856#endif
6857int
6858main ()
6859{
6860if ((double *) 0)
6861 return 0;
6862if (sizeof (double))
6863 return 0;
6864 ;
6865 return 0;
6866}
6867_ACEOF
6868rm -f conftest.$ac_objext
6869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6870 (eval $ac_compile) 2>&5
6871 ac_status=$?
6872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6873 (exit $ac_status); } &&
6874 { ac_try='test -s conftest.$ac_objext'
6875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6876 (eval $ac_try) 2>&5
6877 ac_status=$?
6878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6879 (exit $ac_status); }; }; then
6880 ac_cv_type_double=yes
6881else
6882 echo "$as_me: failed program was:" >&5
6883cat conftest.$ac_ext >&5
6884ac_cv_type_double=no
6885fi
6886rm -f conftest.$ac_objext conftest.$ac_ext
6887fi
6888echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6889echo "${ECHO_T}$ac_cv_type_double" >&6
6890
6891echo "$as_me:$LINENO: checking size of double" >&5
6892echo $ECHO_N "checking size of double... $ECHO_C" >&6
6893if test "${ac_cv_sizeof_double+set}" = set; then
6894 echo $ECHO_N "(cached) $ECHO_C" >&6
6895else
6896 if test "$ac_cv_type_double" = yes; then
6897 # The cast to unsigned long works around a bug in the HP C Compiler
6898 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6899 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6900 # This bug is HP SR number 8606223364.
6901 if test "$cross_compiling" = yes; then
6902 # Depending upon the size, compute the lo and hi bounds.
6903cat >conftest.$ac_ext <<_ACEOF
6904#line $LINENO "configure"
6905#include "confdefs.h"
6906$ac_includes_default
6907#ifdef F77_DUMMY_MAIN
6908# ifdef __cplusplus
6909 extern "C"
6910# endif
6911 int F77_DUMMY_MAIN() { return 1; }
6912#endif
6913int
6914main ()
6915{
6916static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6917test_array [0] = 0
6918
6919 ;
6920 return 0;
6921}
6922_ACEOF
6923rm -f conftest.$ac_objext
6924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6925 (eval $ac_compile) 2>&5
6926 ac_status=$?
6927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6928 (exit $ac_status); } &&
6929 { ac_try='test -s conftest.$ac_objext'
6930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6931 (eval $ac_try) 2>&5
6932 ac_status=$?
6933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6934 (exit $ac_status); }; }; then
6935 ac_lo=0 ac_mid=0
6936 while :; do
6937 cat >conftest.$ac_ext <<_ACEOF
6938#line $LINENO "configure"
6939#include "confdefs.h"
6940$ac_includes_default
6941#ifdef F77_DUMMY_MAIN
6942# ifdef __cplusplus
6943 extern "C"
6944# endif
6945 int F77_DUMMY_MAIN() { return 1; }
6946#endif
6947int
6948main ()
6949{
6950static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6951test_array [0] = 0
6952
6953 ;
6954 return 0;
6955}
6956_ACEOF
6957rm -f conftest.$ac_objext
6958if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6959 (eval $ac_compile) 2>&5
6960 ac_status=$?
6961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6962 (exit $ac_status); } &&
6963 { ac_try='test -s conftest.$ac_objext'
6964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6965 (eval $ac_try) 2>&5
6966 ac_status=$?
6967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6968 (exit $ac_status); }; }; then
6969 ac_hi=$ac_mid; break
6970else
6971 echo "$as_me: failed program was:" >&5
6972cat conftest.$ac_ext >&5
6973ac_lo=`expr $ac_mid + 1`
6974 if test $ac_lo -le $ac_mid; then
6975 ac_lo= ac_hi=
6976 break
6977 fi
6978 ac_mid=`expr 2 '*' $ac_mid + 1`
6979fi
6980rm -f conftest.$ac_objext conftest.$ac_ext
6981 done
6982else
6983 echo "$as_me: failed program was:" >&5
6984cat conftest.$ac_ext >&5
6985cat >conftest.$ac_ext <<_ACEOF
6986#line $LINENO "configure"
6987#include "confdefs.h"
6988$ac_includes_default
6989#ifdef F77_DUMMY_MAIN
6990# ifdef __cplusplus
6991 extern "C"
6992# endif
6993 int F77_DUMMY_MAIN() { return 1; }
6994#endif
6995int
6996main ()
6997{
6998static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6999test_array [0] = 0
7000
7001 ;
7002 return 0;
7003}
7004_ACEOF
7005rm -f conftest.$ac_objext
7006if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7007 (eval $ac_compile) 2>&5
7008 ac_status=$?
7009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7010 (exit $ac_status); } &&
7011 { ac_try='test -s conftest.$ac_objext'
7012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7013 (eval $ac_try) 2>&5
7014 ac_status=$?
7015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7016 (exit $ac_status); }; }; then
7017 ac_hi=-1 ac_mid=-1
7018 while :; do
7019 cat >conftest.$ac_ext <<_ACEOF
7020#line $LINENO "configure"
7021#include "confdefs.h"
7022$ac_includes_default
7023#ifdef F77_DUMMY_MAIN
7024# ifdef __cplusplus
7025 extern "C"
7026# endif
7027 int F77_DUMMY_MAIN() { return 1; }
7028#endif
7029int
7030main ()
7031{
7032static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7033test_array [0] = 0
7034
7035 ;
7036 return 0;
7037}
7038_ACEOF
7039rm -f conftest.$ac_objext
7040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7041 (eval $ac_compile) 2>&5
7042 ac_status=$?
7043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7044 (exit $ac_status); } &&
7045 { ac_try='test -s conftest.$ac_objext'
7046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7047 (eval $ac_try) 2>&5
7048 ac_status=$?
7049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7050 (exit $ac_status); }; }; then
7051 ac_lo=$ac_mid; break
7052else
7053 echo "$as_me: failed program was:" >&5
7054cat conftest.$ac_ext >&5
7055ac_hi=`expr '(' $ac_mid ')' - 1`
7056 if test $ac_mid -le $ac_hi; then
7057 ac_lo= ac_hi=
7058 break
7059 fi
7060 ac_mid=`expr 2 '*' $ac_mid`
7061fi
7062rm -f conftest.$ac_objext conftest.$ac_ext
7063 done
7064else
7065 echo "$as_me: failed program was:" >&5
7066cat conftest.$ac_ext >&5
7067ac_lo= ac_hi=
7068fi
7069rm -f conftest.$ac_objext conftest.$ac_ext
7070fi
7071rm -f conftest.$ac_objext conftest.$ac_ext
7072# Binary search between lo and hi bounds.
7073while test "x$ac_lo" != "x$ac_hi"; do
7074 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7075 cat >conftest.$ac_ext <<_ACEOF
7076#line $LINENO "configure"
7077#include "confdefs.h"
7078$ac_includes_default
7079#ifdef F77_DUMMY_MAIN
7080# ifdef __cplusplus
7081 extern "C"
7082# endif
7083 int F77_DUMMY_MAIN() { return 1; }
7084#endif
7085int
7086main ()
7087{
7088static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7089test_array [0] = 0
7090
7091 ;
7092 return 0;
7093}
7094_ACEOF
7095rm -f conftest.$ac_objext
7096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7097 (eval $ac_compile) 2>&5
7098 ac_status=$?
7099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7100 (exit $ac_status); } &&
7101 { ac_try='test -s conftest.$ac_objext'
7102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7103 (eval $ac_try) 2>&5
7104 ac_status=$?
7105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7106 (exit $ac_status); }; }; then
7107 ac_hi=$ac_mid
7108else
7109 echo "$as_me: failed program was:" >&5
7110cat conftest.$ac_ext >&5
7111ac_lo=`expr '(' $ac_mid ')' + 1`
7112fi
7113rm -f conftest.$ac_objext conftest.$ac_ext
7114done
7115case $ac_lo in
7116?*) ac_cv_sizeof_double=$ac_lo;;
7117'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7118echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7119 { (exit 1); exit 1; }; } ;;
7120esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007121else
7122 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007123 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7124echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7125 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007126else
Martin v. Löwis11437992002-04-12 09:54:03 +00007127 cat >conftest.$ac_ext <<_ACEOF
7128#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007129#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007130$ac_includes_default
7131long longval () { return (long) (sizeof (double)); }
7132unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007133#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007134#include <stdlib.h>
7135#ifdef F77_DUMMY_MAIN
7136# ifdef __cplusplus
7137 extern "C"
7138# endif
7139 int F77_DUMMY_MAIN() { return 1; }
7140#endif
7141int
7142main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007143{
Martin v. Löwis11437992002-04-12 09:54:03 +00007144
7145 FILE *f = fopen ("conftest.val", "w");
7146 if (! f)
7147 exit (1);
7148 if (((long) (sizeof (double))) < 0)
7149 {
7150 long i = longval ();
7151 if (i != ((long) (sizeof (double))))
7152 exit (1);
7153 fprintf (f, "%ld\n", i);
7154 }
7155 else
7156 {
7157 unsigned long i = ulongval ();
7158 if (i != ((long) (sizeof (double))))
7159 exit (1);
7160 fprintf (f, "%lu\n", i);
7161 }
7162 exit (ferror (f) || fclose (f) != 0);
7163
7164 ;
7165 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007166}
Martin v. Löwis11437992002-04-12 09:54:03 +00007167_ACEOF
7168rm -f conftest$ac_exeext
7169if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7170 (eval $ac_link) 2>&5
7171 ac_status=$?
7172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7173 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7175 (eval $ac_try) 2>&5
7176 ac_status=$?
7177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7178 (exit $ac_status); }; }; then
7179 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007180else
Martin v. Löwis11437992002-04-12 09:54:03 +00007181 echo "$as_me: program exited with status $ac_status" >&5
7182echo "$as_me: failed program was:" >&5
7183cat conftest.$ac_ext >&5
7184( exit $ac_status )
7185{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7186echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7187 { (exit 1); exit 1; }; }
7188fi
7189rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7190fi
7191fi
7192rm -f conftest.val
7193else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007194 ac_cv_sizeof_double=0
7195fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007196fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007197echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7198echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7199cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007200#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007201_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007202
7203
Martin v. Löwis11437992002-04-12 09:54:03 +00007204echo "$as_me:$LINENO: checking for fpos_t" >&5
7205echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7206if test "${ac_cv_type_fpos_t+set}" = set; then
7207 echo $ECHO_N "(cached) $ECHO_C" >&6
7208else
7209 cat >conftest.$ac_ext <<_ACEOF
7210#line $LINENO "configure"
7211#include "confdefs.h"
7212$ac_includes_default
7213#ifdef F77_DUMMY_MAIN
7214# ifdef __cplusplus
7215 extern "C"
7216# endif
7217 int F77_DUMMY_MAIN() { return 1; }
7218#endif
7219int
7220main ()
7221{
7222if ((fpos_t *) 0)
7223 return 0;
7224if (sizeof (fpos_t))
7225 return 0;
7226 ;
7227 return 0;
7228}
7229_ACEOF
7230rm -f conftest.$ac_objext
7231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7232 (eval $ac_compile) 2>&5
7233 ac_status=$?
7234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7235 (exit $ac_status); } &&
7236 { ac_try='test -s conftest.$ac_objext'
7237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7238 (eval $ac_try) 2>&5
7239 ac_status=$?
7240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7241 (exit $ac_status); }; }; then
7242 ac_cv_type_fpos_t=yes
7243else
7244 echo "$as_me: failed program was:" >&5
7245cat conftest.$ac_ext >&5
7246ac_cv_type_fpos_t=no
7247fi
7248rm -f conftest.$ac_objext conftest.$ac_ext
7249fi
7250echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7251echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7252
7253echo "$as_me:$LINENO: checking size of fpos_t" >&5
7254echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7255if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7256 echo $ECHO_N "(cached) $ECHO_C" >&6
7257else
7258 if test "$ac_cv_type_fpos_t" = yes; then
7259 # The cast to unsigned long works around a bug in the HP C Compiler
7260 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7261 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7262 # This bug is HP SR number 8606223364.
7263 if test "$cross_compiling" = yes; then
7264 # Depending upon the size, compute the lo and hi bounds.
7265cat >conftest.$ac_ext <<_ACEOF
7266#line $LINENO "configure"
7267#include "confdefs.h"
7268$ac_includes_default
7269#ifdef F77_DUMMY_MAIN
7270# ifdef __cplusplus
7271 extern "C"
7272# endif
7273 int F77_DUMMY_MAIN() { return 1; }
7274#endif
7275int
7276main ()
7277{
7278static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7279test_array [0] = 0
7280
7281 ;
7282 return 0;
7283}
7284_ACEOF
7285rm -f conftest.$ac_objext
7286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7287 (eval $ac_compile) 2>&5
7288 ac_status=$?
7289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7290 (exit $ac_status); } &&
7291 { ac_try='test -s conftest.$ac_objext'
7292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7293 (eval $ac_try) 2>&5
7294 ac_status=$?
7295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7296 (exit $ac_status); }; }; then
7297 ac_lo=0 ac_mid=0
7298 while :; do
7299 cat >conftest.$ac_ext <<_ACEOF
7300#line $LINENO "configure"
7301#include "confdefs.h"
7302$ac_includes_default
7303#ifdef F77_DUMMY_MAIN
7304# ifdef __cplusplus
7305 extern "C"
7306# endif
7307 int F77_DUMMY_MAIN() { return 1; }
7308#endif
7309int
7310main ()
7311{
7312static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7313test_array [0] = 0
7314
7315 ;
7316 return 0;
7317}
7318_ACEOF
7319rm -f conftest.$ac_objext
7320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7321 (eval $ac_compile) 2>&5
7322 ac_status=$?
7323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7324 (exit $ac_status); } &&
7325 { ac_try='test -s conftest.$ac_objext'
7326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7327 (eval $ac_try) 2>&5
7328 ac_status=$?
7329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7330 (exit $ac_status); }; }; then
7331 ac_hi=$ac_mid; break
7332else
7333 echo "$as_me: failed program was:" >&5
7334cat conftest.$ac_ext >&5
7335ac_lo=`expr $ac_mid + 1`
7336 if test $ac_lo -le $ac_mid; then
7337 ac_lo= ac_hi=
7338 break
7339 fi
7340 ac_mid=`expr 2 '*' $ac_mid + 1`
7341fi
7342rm -f conftest.$ac_objext conftest.$ac_ext
7343 done
7344else
7345 echo "$as_me: failed program was:" >&5
7346cat conftest.$ac_ext >&5
7347cat >conftest.$ac_ext <<_ACEOF
7348#line $LINENO "configure"
7349#include "confdefs.h"
7350$ac_includes_default
7351#ifdef F77_DUMMY_MAIN
7352# ifdef __cplusplus
7353 extern "C"
7354# endif
7355 int F77_DUMMY_MAIN() { return 1; }
7356#endif
7357int
7358main ()
7359{
7360static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7361test_array [0] = 0
7362
7363 ;
7364 return 0;
7365}
7366_ACEOF
7367rm -f conftest.$ac_objext
7368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7369 (eval $ac_compile) 2>&5
7370 ac_status=$?
7371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7372 (exit $ac_status); } &&
7373 { ac_try='test -s conftest.$ac_objext'
7374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7375 (eval $ac_try) 2>&5
7376 ac_status=$?
7377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7378 (exit $ac_status); }; }; then
7379 ac_hi=-1 ac_mid=-1
7380 while :; do
7381 cat >conftest.$ac_ext <<_ACEOF
7382#line $LINENO "configure"
7383#include "confdefs.h"
7384$ac_includes_default
7385#ifdef F77_DUMMY_MAIN
7386# ifdef __cplusplus
7387 extern "C"
7388# endif
7389 int F77_DUMMY_MAIN() { return 1; }
7390#endif
7391int
7392main ()
7393{
7394static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7395test_array [0] = 0
7396
7397 ;
7398 return 0;
7399}
7400_ACEOF
7401rm -f conftest.$ac_objext
7402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7403 (eval $ac_compile) 2>&5
7404 ac_status=$?
7405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7406 (exit $ac_status); } &&
7407 { ac_try='test -s conftest.$ac_objext'
7408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7409 (eval $ac_try) 2>&5
7410 ac_status=$?
7411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7412 (exit $ac_status); }; }; then
7413 ac_lo=$ac_mid; break
7414else
7415 echo "$as_me: failed program was:" >&5
7416cat conftest.$ac_ext >&5
7417ac_hi=`expr '(' $ac_mid ')' - 1`
7418 if test $ac_mid -le $ac_hi; then
7419 ac_lo= ac_hi=
7420 break
7421 fi
7422 ac_mid=`expr 2 '*' $ac_mid`
7423fi
7424rm -f conftest.$ac_objext conftest.$ac_ext
7425 done
7426else
7427 echo "$as_me: failed program was:" >&5
7428cat conftest.$ac_ext >&5
7429ac_lo= ac_hi=
7430fi
7431rm -f conftest.$ac_objext conftest.$ac_ext
7432fi
7433rm -f conftest.$ac_objext conftest.$ac_ext
7434# Binary search between lo and hi bounds.
7435while test "x$ac_lo" != "x$ac_hi"; do
7436 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7437 cat >conftest.$ac_ext <<_ACEOF
7438#line $LINENO "configure"
7439#include "confdefs.h"
7440$ac_includes_default
7441#ifdef F77_DUMMY_MAIN
7442# ifdef __cplusplus
7443 extern "C"
7444# endif
7445 int F77_DUMMY_MAIN() { return 1; }
7446#endif
7447int
7448main ()
7449{
7450static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7451test_array [0] = 0
7452
7453 ;
7454 return 0;
7455}
7456_ACEOF
7457rm -f conftest.$ac_objext
7458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7459 (eval $ac_compile) 2>&5
7460 ac_status=$?
7461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7462 (exit $ac_status); } &&
7463 { ac_try='test -s conftest.$ac_objext'
7464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7465 (eval $ac_try) 2>&5
7466 ac_status=$?
7467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7468 (exit $ac_status); }; }; then
7469 ac_hi=$ac_mid
7470else
7471 echo "$as_me: failed program was:" >&5
7472cat conftest.$ac_ext >&5
7473ac_lo=`expr '(' $ac_mid ')' + 1`
7474fi
7475rm -f conftest.$ac_objext conftest.$ac_ext
7476done
7477case $ac_lo in
7478?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7479'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7480echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7481 { (exit 1); exit 1; }; } ;;
7482esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007483else
7484 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007485 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7486echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7487 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007488else
Martin v. Löwis11437992002-04-12 09:54:03 +00007489 cat >conftest.$ac_ext <<_ACEOF
7490#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007491#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007492$ac_includes_default
7493long longval () { return (long) (sizeof (fpos_t)); }
7494unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007495#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007496#include <stdlib.h>
7497#ifdef F77_DUMMY_MAIN
7498# ifdef __cplusplus
7499 extern "C"
7500# endif
7501 int F77_DUMMY_MAIN() { return 1; }
7502#endif
7503int
7504main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007505{
Martin v. Löwis11437992002-04-12 09:54:03 +00007506
7507 FILE *f = fopen ("conftest.val", "w");
7508 if (! f)
7509 exit (1);
7510 if (((long) (sizeof (fpos_t))) < 0)
7511 {
7512 long i = longval ();
7513 if (i != ((long) (sizeof (fpos_t))))
7514 exit (1);
7515 fprintf (f, "%ld\n", i);
7516 }
7517 else
7518 {
7519 unsigned long i = ulongval ();
7520 if (i != ((long) (sizeof (fpos_t))))
7521 exit (1);
7522 fprintf (f, "%lu\n", i);
7523 }
7524 exit (ferror (f) || fclose (f) != 0);
7525
7526 ;
7527 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007528}
Martin v. Löwis11437992002-04-12 09:54:03 +00007529_ACEOF
7530rm -f conftest$ac_exeext
7531if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7532 (eval $ac_link) 2>&5
7533 ac_status=$?
7534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7535 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7537 (eval $ac_try) 2>&5
7538 ac_status=$?
7539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7540 (exit $ac_status); }; }; then
7541 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007542else
Martin v. Löwis11437992002-04-12 09:54:03 +00007543 echo "$as_me: program exited with status $ac_status" >&5
7544echo "$as_me: failed program was:" >&5
7545cat conftest.$ac_ext >&5
7546( exit $ac_status )
7547{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7548echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7549 { (exit 1); exit 1; }; }
7550fi
7551rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7552fi
7553fi
7554rm -f conftest.val
7555else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007556 ac_cv_sizeof_fpos_t=0
7557fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007558fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007559echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7560echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7561cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007562#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007563_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007564
Michael W. Hudson54241132001-12-07 15:38:26 +00007565
7566
Martin v. Löwis11437992002-04-12 09:54:03 +00007567echo "$as_me:$LINENO: checking for long long support" >&5
7568echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007569have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007570cat >conftest.$ac_ext <<_ACEOF
7571#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007572#include "confdefs.h"
7573
Martin v. Löwis11437992002-04-12 09:54:03 +00007574#ifdef F77_DUMMY_MAIN
7575# ifdef __cplusplus
7576 extern "C"
7577# endif
7578 int F77_DUMMY_MAIN() { return 1; }
7579#endif
7580int
7581main ()
7582{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007583long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007584 ;
7585 return 0;
7586}
7587_ACEOF
7588rm -f conftest.$ac_objext
7589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7590 (eval $ac_compile) 2>&5
7591 ac_status=$?
7592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7593 (exit $ac_status); } &&
7594 { ac_try='test -s conftest.$ac_objext'
7595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7596 (eval $ac_try) 2>&5
7597 ac_status=$?
7598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7599 (exit $ac_status); }; }; then
7600
7601
7602cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007603#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007604_ACEOF
7605
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007606 have_long_long=yes
7607
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007608else
Martin v. Löwis11437992002-04-12 09:54:03 +00007609 echo "$as_me: failed program was:" >&5
7610cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007611fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007612rm -f conftest.$ac_objext conftest.$ac_ext
7613echo "$as_me:$LINENO: result: $have_long_long" >&5
7614echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007615if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007616echo "$as_me:$LINENO: checking for long long" >&5
7617echo $ECHO_N "checking for long long... $ECHO_C" >&6
7618if test "${ac_cv_type_long_long+set}" = set; then
7619 echo $ECHO_N "(cached) $ECHO_C" >&6
7620else
7621 cat >conftest.$ac_ext <<_ACEOF
7622#line $LINENO "configure"
7623#include "confdefs.h"
7624$ac_includes_default
7625#ifdef F77_DUMMY_MAIN
7626# ifdef __cplusplus
7627 extern "C"
7628# endif
7629 int F77_DUMMY_MAIN() { return 1; }
7630#endif
7631int
7632main ()
7633{
7634if ((long long *) 0)
7635 return 0;
7636if (sizeof (long long))
7637 return 0;
7638 ;
7639 return 0;
7640}
7641_ACEOF
7642rm -f conftest.$ac_objext
7643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7644 (eval $ac_compile) 2>&5
7645 ac_status=$?
7646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7647 (exit $ac_status); } &&
7648 { ac_try='test -s conftest.$ac_objext'
7649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7650 (eval $ac_try) 2>&5
7651 ac_status=$?
7652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7653 (exit $ac_status); }; }; then
7654 ac_cv_type_long_long=yes
7655else
7656 echo "$as_me: failed program was:" >&5
7657cat conftest.$ac_ext >&5
7658ac_cv_type_long_long=no
7659fi
7660rm -f conftest.$ac_objext conftest.$ac_ext
7661fi
7662echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7663echo "${ECHO_T}$ac_cv_type_long_long" >&6
7664
7665echo "$as_me:$LINENO: checking size of long long" >&5
7666echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7667if test "${ac_cv_sizeof_long_long+set}" = set; then
7668 echo $ECHO_N "(cached) $ECHO_C" >&6
7669else
7670 if test "$ac_cv_type_long_long" = yes; then
7671 # The cast to unsigned long works around a bug in the HP C Compiler
7672 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7673 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7674 # This bug is HP SR number 8606223364.
7675 if test "$cross_compiling" = yes; then
7676 # Depending upon the size, compute the lo and hi bounds.
7677cat >conftest.$ac_ext <<_ACEOF
7678#line $LINENO "configure"
7679#include "confdefs.h"
7680$ac_includes_default
7681#ifdef F77_DUMMY_MAIN
7682# ifdef __cplusplus
7683 extern "C"
7684# endif
7685 int F77_DUMMY_MAIN() { return 1; }
7686#endif
7687int
7688main ()
7689{
7690static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7691test_array [0] = 0
7692
7693 ;
7694 return 0;
7695}
7696_ACEOF
7697rm -f conftest.$ac_objext
7698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7699 (eval $ac_compile) 2>&5
7700 ac_status=$?
7701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7702 (exit $ac_status); } &&
7703 { ac_try='test -s conftest.$ac_objext'
7704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7705 (eval $ac_try) 2>&5
7706 ac_status=$?
7707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7708 (exit $ac_status); }; }; then
7709 ac_lo=0 ac_mid=0
7710 while :; do
7711 cat >conftest.$ac_ext <<_ACEOF
7712#line $LINENO "configure"
7713#include "confdefs.h"
7714$ac_includes_default
7715#ifdef F77_DUMMY_MAIN
7716# ifdef __cplusplus
7717 extern "C"
7718# endif
7719 int F77_DUMMY_MAIN() { return 1; }
7720#endif
7721int
7722main ()
7723{
7724static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7725test_array [0] = 0
7726
7727 ;
7728 return 0;
7729}
7730_ACEOF
7731rm -f conftest.$ac_objext
7732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7733 (eval $ac_compile) 2>&5
7734 ac_status=$?
7735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7736 (exit $ac_status); } &&
7737 { ac_try='test -s conftest.$ac_objext'
7738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7739 (eval $ac_try) 2>&5
7740 ac_status=$?
7741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7742 (exit $ac_status); }; }; then
7743 ac_hi=$ac_mid; break
7744else
7745 echo "$as_me: failed program was:" >&5
7746cat conftest.$ac_ext >&5
7747ac_lo=`expr $ac_mid + 1`
7748 if test $ac_lo -le $ac_mid; then
7749 ac_lo= ac_hi=
7750 break
7751 fi
7752 ac_mid=`expr 2 '*' $ac_mid + 1`
7753fi
7754rm -f conftest.$ac_objext conftest.$ac_ext
7755 done
7756else
7757 echo "$as_me: failed program was:" >&5
7758cat conftest.$ac_ext >&5
7759cat >conftest.$ac_ext <<_ACEOF
7760#line $LINENO "configure"
7761#include "confdefs.h"
7762$ac_includes_default
7763#ifdef F77_DUMMY_MAIN
7764# ifdef __cplusplus
7765 extern "C"
7766# endif
7767 int F77_DUMMY_MAIN() { return 1; }
7768#endif
7769int
7770main ()
7771{
7772static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7773test_array [0] = 0
7774
7775 ;
7776 return 0;
7777}
7778_ACEOF
7779rm -f conftest.$ac_objext
7780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7781 (eval $ac_compile) 2>&5
7782 ac_status=$?
7783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7784 (exit $ac_status); } &&
7785 { ac_try='test -s conftest.$ac_objext'
7786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7787 (eval $ac_try) 2>&5
7788 ac_status=$?
7789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7790 (exit $ac_status); }; }; then
7791 ac_hi=-1 ac_mid=-1
7792 while :; do
7793 cat >conftest.$ac_ext <<_ACEOF
7794#line $LINENO "configure"
7795#include "confdefs.h"
7796$ac_includes_default
7797#ifdef F77_DUMMY_MAIN
7798# ifdef __cplusplus
7799 extern "C"
7800# endif
7801 int F77_DUMMY_MAIN() { return 1; }
7802#endif
7803int
7804main ()
7805{
7806static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7807test_array [0] = 0
7808
7809 ;
7810 return 0;
7811}
7812_ACEOF
7813rm -f conftest.$ac_objext
7814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7815 (eval $ac_compile) 2>&5
7816 ac_status=$?
7817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7818 (exit $ac_status); } &&
7819 { ac_try='test -s conftest.$ac_objext'
7820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7821 (eval $ac_try) 2>&5
7822 ac_status=$?
7823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7824 (exit $ac_status); }; }; then
7825 ac_lo=$ac_mid; break
7826else
7827 echo "$as_me: failed program was:" >&5
7828cat conftest.$ac_ext >&5
7829ac_hi=`expr '(' $ac_mid ')' - 1`
7830 if test $ac_mid -le $ac_hi; then
7831 ac_lo= ac_hi=
7832 break
7833 fi
7834 ac_mid=`expr 2 '*' $ac_mid`
7835fi
7836rm -f conftest.$ac_objext conftest.$ac_ext
7837 done
7838else
7839 echo "$as_me: failed program was:" >&5
7840cat conftest.$ac_ext >&5
7841ac_lo= ac_hi=
7842fi
7843rm -f conftest.$ac_objext conftest.$ac_ext
7844fi
7845rm -f conftest.$ac_objext conftest.$ac_ext
7846# Binary search between lo and hi bounds.
7847while test "x$ac_lo" != "x$ac_hi"; do
7848 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7849 cat >conftest.$ac_ext <<_ACEOF
7850#line $LINENO "configure"
7851#include "confdefs.h"
7852$ac_includes_default
7853#ifdef F77_DUMMY_MAIN
7854# ifdef __cplusplus
7855 extern "C"
7856# endif
7857 int F77_DUMMY_MAIN() { return 1; }
7858#endif
7859int
7860main ()
7861{
7862static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7863test_array [0] = 0
7864
7865 ;
7866 return 0;
7867}
7868_ACEOF
7869rm -f conftest.$ac_objext
7870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7871 (eval $ac_compile) 2>&5
7872 ac_status=$?
7873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7874 (exit $ac_status); } &&
7875 { ac_try='test -s conftest.$ac_objext'
7876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7877 (eval $ac_try) 2>&5
7878 ac_status=$?
7879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7880 (exit $ac_status); }; }; then
7881 ac_hi=$ac_mid
7882else
7883 echo "$as_me: failed program was:" >&5
7884cat conftest.$ac_ext >&5
7885ac_lo=`expr '(' $ac_mid ')' + 1`
7886fi
7887rm -f conftest.$ac_objext conftest.$ac_ext
7888done
7889case $ac_lo in
7890?*) ac_cv_sizeof_long_long=$ac_lo;;
7891'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7892echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7893 { (exit 1); exit 1; }; } ;;
7894esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007895else
7896 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7898echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7899 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007900else
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 cat >conftest.$ac_ext <<_ACEOF
7902#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007903#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007904$ac_includes_default
7905long longval () { return (long) (sizeof (long long)); }
7906unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007907#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007908#include <stdlib.h>
7909#ifdef F77_DUMMY_MAIN
7910# ifdef __cplusplus
7911 extern "C"
7912# endif
7913 int F77_DUMMY_MAIN() { return 1; }
7914#endif
7915int
7916main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007917{
Martin v. Löwis11437992002-04-12 09:54:03 +00007918
7919 FILE *f = fopen ("conftest.val", "w");
7920 if (! f)
7921 exit (1);
7922 if (((long) (sizeof (long long))) < 0)
7923 {
7924 long i = longval ();
7925 if (i != ((long) (sizeof (long long))))
7926 exit (1);
7927 fprintf (f, "%ld\n", i);
7928 }
7929 else
7930 {
7931 unsigned long i = ulongval ();
7932 if (i != ((long) (sizeof (long long))))
7933 exit (1);
7934 fprintf (f, "%lu\n", i);
7935 }
7936 exit (ferror (f) || fclose (f) != 0);
7937
7938 ;
7939 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007940}
Martin v. Löwis11437992002-04-12 09:54:03 +00007941_ACEOF
7942rm -f conftest$ac_exeext
7943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7944 (eval $ac_link) 2>&5
7945 ac_status=$?
7946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7947 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7949 (eval $ac_try) 2>&5
7950 ac_status=$?
7951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7952 (exit $ac_status); }; }; then
7953 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007954else
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 echo "$as_me: program exited with status $ac_status" >&5
7956echo "$as_me: failed program was:" >&5
7957cat conftest.$ac_ext >&5
7958( exit $ac_status )
7959{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7960echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7961 { (exit 1); exit 1; }; }
7962fi
7963rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7964fi
7965fi
7966rm -f conftest.val
7967else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007968 ac_cv_sizeof_long_long=0
7969fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007970fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007971echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7972echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7973cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007974#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007975_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007976
Michael W. Hudson54241132001-12-07 15:38:26 +00007977
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007978fi
7979
Martin v. Löwis11437992002-04-12 09:54:03 +00007980echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7981echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007982have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007983cat >conftest.$ac_ext <<_ACEOF
7984#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007985#include "confdefs.h"
7986
Martin v. Löwis11437992002-04-12 09:54:03 +00007987#ifdef F77_DUMMY_MAIN
7988# ifdef __cplusplus
7989 extern "C"
7990# endif
7991 int F77_DUMMY_MAIN() { return 1; }
7992#endif
7993int
7994main ()
7995{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007996uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ;
7998 return 0;
7999}
8000_ACEOF
8001rm -f conftest.$ac_objext
8002if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8003 (eval $ac_compile) 2>&5
8004 ac_status=$?
8005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8006 (exit $ac_status); } &&
8007 { ac_try='test -s conftest.$ac_objext'
8008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8009 (eval $ac_try) 2>&5
8010 ac_status=$?
8011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8012 (exit $ac_status); }; }; then
8013
8014
8015cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008016#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008017_ACEOF
8018
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008019 have_uintptr_t=yes
8020
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008021else
Martin v. Löwis11437992002-04-12 09:54:03 +00008022 echo "$as_me: failed program was:" >&5
8023cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008024fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008025rm -f conftest.$ac_objext conftest.$ac_ext
8026echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8027echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008028if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008029echo "$as_me:$LINENO: checking for uintptr_t" >&5
8030echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8031if test "${ac_cv_type_uintptr_t+set}" = set; then
8032 echo $ECHO_N "(cached) $ECHO_C" >&6
8033else
8034 cat >conftest.$ac_ext <<_ACEOF
8035#line $LINENO "configure"
8036#include "confdefs.h"
8037$ac_includes_default
8038#ifdef F77_DUMMY_MAIN
8039# ifdef __cplusplus
8040 extern "C"
8041# endif
8042 int F77_DUMMY_MAIN() { return 1; }
8043#endif
8044int
8045main ()
8046{
8047if ((uintptr_t *) 0)
8048 return 0;
8049if (sizeof (uintptr_t))
8050 return 0;
8051 ;
8052 return 0;
8053}
8054_ACEOF
8055rm -f conftest.$ac_objext
8056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8057 (eval $ac_compile) 2>&5
8058 ac_status=$?
8059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8060 (exit $ac_status); } &&
8061 { ac_try='test -s conftest.$ac_objext'
8062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8063 (eval $ac_try) 2>&5
8064 ac_status=$?
8065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8066 (exit $ac_status); }; }; then
8067 ac_cv_type_uintptr_t=yes
8068else
8069 echo "$as_me: failed program was:" >&5
8070cat conftest.$ac_ext >&5
8071ac_cv_type_uintptr_t=no
8072fi
8073rm -f conftest.$ac_objext conftest.$ac_ext
8074fi
8075echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8076echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8077
8078echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8079echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8080if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8081 echo $ECHO_N "(cached) $ECHO_C" >&6
8082else
8083 if test "$ac_cv_type_uintptr_t" = yes; then
8084 # The cast to unsigned long works around a bug in the HP C Compiler
8085 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8086 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8087 # This bug is HP SR number 8606223364.
8088 if test "$cross_compiling" = yes; then
8089 # Depending upon the size, compute the lo and hi bounds.
8090cat >conftest.$ac_ext <<_ACEOF
8091#line $LINENO "configure"
8092#include "confdefs.h"
8093$ac_includes_default
8094#ifdef F77_DUMMY_MAIN
8095# ifdef __cplusplus
8096 extern "C"
8097# endif
8098 int F77_DUMMY_MAIN() { return 1; }
8099#endif
8100int
8101main ()
8102{
8103static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8104test_array [0] = 0
8105
8106 ;
8107 return 0;
8108}
8109_ACEOF
8110rm -f conftest.$ac_objext
8111if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8112 (eval $ac_compile) 2>&5
8113 ac_status=$?
8114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8115 (exit $ac_status); } &&
8116 { ac_try='test -s conftest.$ac_objext'
8117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8118 (eval $ac_try) 2>&5
8119 ac_status=$?
8120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8121 (exit $ac_status); }; }; then
8122 ac_lo=0 ac_mid=0
8123 while :; do
8124 cat >conftest.$ac_ext <<_ACEOF
8125#line $LINENO "configure"
8126#include "confdefs.h"
8127$ac_includes_default
8128#ifdef F77_DUMMY_MAIN
8129# ifdef __cplusplus
8130 extern "C"
8131# endif
8132 int F77_DUMMY_MAIN() { return 1; }
8133#endif
8134int
8135main ()
8136{
8137static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8138test_array [0] = 0
8139
8140 ;
8141 return 0;
8142}
8143_ACEOF
8144rm -f conftest.$ac_objext
8145if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8146 (eval $ac_compile) 2>&5
8147 ac_status=$?
8148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149 (exit $ac_status); } &&
8150 { ac_try='test -s conftest.$ac_objext'
8151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8152 (eval $ac_try) 2>&5
8153 ac_status=$?
8154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8155 (exit $ac_status); }; }; then
8156 ac_hi=$ac_mid; break
8157else
8158 echo "$as_me: failed program was:" >&5
8159cat conftest.$ac_ext >&5
8160ac_lo=`expr $ac_mid + 1`
8161 if test $ac_lo -le $ac_mid; then
8162 ac_lo= ac_hi=
8163 break
8164 fi
8165 ac_mid=`expr 2 '*' $ac_mid + 1`
8166fi
8167rm -f conftest.$ac_objext conftest.$ac_ext
8168 done
8169else
8170 echo "$as_me: failed program was:" >&5
8171cat conftest.$ac_ext >&5
8172cat >conftest.$ac_ext <<_ACEOF
8173#line $LINENO "configure"
8174#include "confdefs.h"
8175$ac_includes_default
8176#ifdef F77_DUMMY_MAIN
8177# ifdef __cplusplus
8178 extern "C"
8179# endif
8180 int F77_DUMMY_MAIN() { return 1; }
8181#endif
8182int
8183main ()
8184{
8185static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8186test_array [0] = 0
8187
8188 ;
8189 return 0;
8190}
8191_ACEOF
8192rm -f conftest.$ac_objext
8193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8194 (eval $ac_compile) 2>&5
8195 ac_status=$?
8196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8197 (exit $ac_status); } &&
8198 { ac_try='test -s conftest.$ac_objext'
8199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8200 (eval $ac_try) 2>&5
8201 ac_status=$?
8202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8203 (exit $ac_status); }; }; then
8204 ac_hi=-1 ac_mid=-1
8205 while :; do
8206 cat >conftest.$ac_ext <<_ACEOF
8207#line $LINENO "configure"
8208#include "confdefs.h"
8209$ac_includes_default
8210#ifdef F77_DUMMY_MAIN
8211# ifdef __cplusplus
8212 extern "C"
8213# endif
8214 int F77_DUMMY_MAIN() { return 1; }
8215#endif
8216int
8217main ()
8218{
8219static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8220test_array [0] = 0
8221
8222 ;
8223 return 0;
8224}
8225_ACEOF
8226rm -f conftest.$ac_objext
8227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8228 (eval $ac_compile) 2>&5
8229 ac_status=$?
8230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8231 (exit $ac_status); } &&
8232 { ac_try='test -s conftest.$ac_objext'
8233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8234 (eval $ac_try) 2>&5
8235 ac_status=$?
8236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8237 (exit $ac_status); }; }; then
8238 ac_lo=$ac_mid; break
8239else
8240 echo "$as_me: failed program was:" >&5
8241cat conftest.$ac_ext >&5
8242ac_hi=`expr '(' $ac_mid ')' - 1`
8243 if test $ac_mid -le $ac_hi; then
8244 ac_lo= ac_hi=
8245 break
8246 fi
8247 ac_mid=`expr 2 '*' $ac_mid`
8248fi
8249rm -f conftest.$ac_objext conftest.$ac_ext
8250 done
8251else
8252 echo "$as_me: failed program was:" >&5
8253cat conftest.$ac_ext >&5
8254ac_lo= ac_hi=
8255fi
8256rm -f conftest.$ac_objext conftest.$ac_ext
8257fi
8258rm -f conftest.$ac_objext conftest.$ac_ext
8259# Binary search between lo and hi bounds.
8260while test "x$ac_lo" != "x$ac_hi"; do
8261 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8262 cat >conftest.$ac_ext <<_ACEOF
8263#line $LINENO "configure"
8264#include "confdefs.h"
8265$ac_includes_default
8266#ifdef F77_DUMMY_MAIN
8267# ifdef __cplusplus
8268 extern "C"
8269# endif
8270 int F77_DUMMY_MAIN() { return 1; }
8271#endif
8272int
8273main ()
8274{
8275static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8276test_array [0] = 0
8277
8278 ;
8279 return 0;
8280}
8281_ACEOF
8282rm -f conftest.$ac_objext
8283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8284 (eval $ac_compile) 2>&5
8285 ac_status=$?
8286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8287 (exit $ac_status); } &&
8288 { ac_try='test -s conftest.$ac_objext'
8289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8290 (eval $ac_try) 2>&5
8291 ac_status=$?
8292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8293 (exit $ac_status); }; }; then
8294 ac_hi=$ac_mid
8295else
8296 echo "$as_me: failed program was:" >&5
8297cat conftest.$ac_ext >&5
8298ac_lo=`expr '(' $ac_mid ')' + 1`
8299fi
8300rm -f conftest.$ac_objext conftest.$ac_ext
8301done
8302case $ac_lo in
8303?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8304'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8305echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8306 { (exit 1); exit 1; }; } ;;
8307esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008308else
8309 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008310 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8311echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8312 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008313else
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 cat >conftest.$ac_ext <<_ACEOF
8315#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008316#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008317$ac_includes_default
8318long longval () { return (long) (sizeof (uintptr_t)); }
8319unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008320#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008321#include <stdlib.h>
8322#ifdef F77_DUMMY_MAIN
8323# ifdef __cplusplus
8324 extern "C"
8325# endif
8326 int F77_DUMMY_MAIN() { return 1; }
8327#endif
8328int
8329main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008330{
Martin v. Löwis11437992002-04-12 09:54:03 +00008331
8332 FILE *f = fopen ("conftest.val", "w");
8333 if (! f)
8334 exit (1);
8335 if (((long) (sizeof (uintptr_t))) < 0)
8336 {
8337 long i = longval ();
8338 if (i != ((long) (sizeof (uintptr_t))))
8339 exit (1);
8340 fprintf (f, "%ld\n", i);
8341 }
8342 else
8343 {
8344 unsigned long i = ulongval ();
8345 if (i != ((long) (sizeof (uintptr_t))))
8346 exit (1);
8347 fprintf (f, "%lu\n", i);
8348 }
8349 exit (ferror (f) || fclose (f) != 0);
8350
8351 ;
8352 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008353}
Martin v. Löwis11437992002-04-12 09:54:03 +00008354_ACEOF
8355rm -f conftest$ac_exeext
8356if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8357 (eval $ac_link) 2>&5
8358 ac_status=$?
8359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8360 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8362 (eval $ac_try) 2>&5
8363 ac_status=$?
8364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8365 (exit $ac_status); }; }; then
8366 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008367else
Martin v. Löwis11437992002-04-12 09:54:03 +00008368 echo "$as_me: program exited with status $ac_status" >&5
8369echo "$as_me: failed program was:" >&5
8370cat conftest.$ac_ext >&5
8371( exit $ac_status )
8372{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8373echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8374 { (exit 1); exit 1; }; }
8375fi
8376rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8377fi
8378fi
8379rm -f conftest.val
8380else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008381 ac_cv_sizeof_uintptr_t=0
8382fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008383fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008384echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8385echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8386cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008387#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008388_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008389
Michael W. Hudson54241132001-12-07 15:38:26 +00008390
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008391fi
8392
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008393# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008394echo "$as_me:$LINENO: checking size of off_t" >&5
8395echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8396if test "${ac_cv_sizeof_off_t+set}" = set; then
8397 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008398else
8399 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008400 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008401else
Martin v. Löwis11437992002-04-12 09:54:03 +00008402 cat >conftest.$ac_ext <<_ACEOF
8403#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008404#include "confdefs.h"
8405#include <stdio.h>
8406#include <sys/types.h>
8407main()
8408{
8409 FILE *f=fopen("conftestval", "w");
8410 if (!f) exit(1);
8411 fprintf(f, "%d\n", sizeof(off_t));
8412 exit(0);
8413}
Martin v. Löwis11437992002-04-12 09:54:03 +00008414_ACEOF
8415rm -f conftest$ac_exeext
8416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8417 (eval $ac_link) 2>&5
8418 ac_status=$?
8419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8420 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8422 (eval $ac_try) 2>&5
8423 ac_status=$?
8424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8425 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008426 ac_cv_sizeof_off_t=`cat conftestval`
8427else
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 echo "$as_me: program exited with status $ac_status" >&5
8429echo "$as_me: failed program was:" >&5
8430cat conftest.$ac_ext >&5
8431( exit $ac_status )
8432ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008434rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008435fi
8436
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008437fi
8438
Martin v. Löwis11437992002-04-12 09:54:03 +00008439echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8440echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8441
8442cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008443#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008444_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008445
Michael W. Hudson54241132001-12-07 15:38:26 +00008446
Martin v. Löwis11437992002-04-12 09:54:03 +00008447echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8448echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008449if test "$have_long_long" = yes -a \
8450 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8451 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008452
Martin v. Löwis11437992002-04-12 09:54:03 +00008453cat >>confdefs.h <<\_ACEOF
8454#define HAVE_LARGEFILE_SUPPORT 1
8455_ACEOF
8456
8457 echo "$as_me:$LINENO: result: yes" >&5
8458echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008459else
Martin v. Löwis11437992002-04-12 09:54:03 +00008460 echo "$as_me:$LINENO: result: no" >&5
8461echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008462fi
8463
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008464# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008465echo "$as_me:$LINENO: checking size of time_t" >&5
8466echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8467if test "${ac_cv_sizeof_time_t+set}" = set; then
8468 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008469else
8470 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008471 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008472else
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 cat >conftest.$ac_ext <<_ACEOF
8474#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008475#include "confdefs.h"
8476#include <stdio.h>
8477#include <time.h>
8478main()
8479{
8480 FILE *f=fopen("conftestval", "w");
8481 if (!f) exit(1);
8482 fprintf(f, "%d\n", sizeof(time_t));
8483 exit(0);
8484}
Martin v. Löwis11437992002-04-12 09:54:03 +00008485_ACEOF
8486rm -f conftest$ac_exeext
8487if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8488 (eval $ac_link) 2>&5
8489 ac_status=$?
8490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8493 (eval $ac_try) 2>&5
8494 ac_status=$?
8495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008497 ac_cv_sizeof_time_t=`cat conftestval`
8498else
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 echo "$as_me: program exited with status $ac_status" >&5
8500echo "$as_me: failed program was:" >&5
8501cat conftest.$ac_ext >&5
8502( exit $ac_status )
8503ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008504fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008505rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008506fi
8507
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008508fi
8509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8511echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8512
8513cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008514#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008515_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008516
Michael W. Hudson54241132001-12-07 15:38:26 +00008517
8518
Trent Mick635f6fb2000-08-23 21:33:05 +00008519# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008520ac_save_cc="$CC"
8521if test "$ac_cv_kpthread" = "yes"
8522then CC="$CC -Kpthread"
8523fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008524echo "$as_me:$LINENO: checking for pthread_t" >&5
8525echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008526have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008527cat >conftest.$ac_ext <<_ACEOF
8528#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008529#include "confdefs.h"
8530#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008531#ifdef F77_DUMMY_MAIN
8532# ifdef __cplusplus
8533 extern "C"
8534# endif
8535 int F77_DUMMY_MAIN() { return 1; }
8536#endif
8537int
8538main ()
8539{
Guido van Rossum12580492000-09-24 16:47:19 +00008540pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 ;
8542 return 0;
8543}
8544_ACEOF
8545rm -f conftest.$ac_objext
8546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8547 (eval $ac_compile) 2>&5
8548 ac_status=$?
8549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8550 (exit $ac_status); } &&
8551 { ac_try='test -s conftest.$ac_objext'
8552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8553 (eval $ac_try) 2>&5
8554 ac_status=$?
8555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8556 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008557 have_pthread_t=yes
8558else
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 echo "$as_me: failed program was:" >&5
8560cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008562rm -f conftest.$ac_objext conftest.$ac_ext
8563echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8564echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008565if test "$have_pthread_t" = yes ; then
8566 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8568echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8569 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8570 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008571else
8572 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008573 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008574else
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 cat >conftest.$ac_ext <<_ACEOF
8576#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008577#include "confdefs.h"
8578#include <stdio.h>
8579 #include <pthread.h>
8580 main()
8581 {
8582 FILE *f=fopen("conftestval", "w");
8583 if (!f) exit(1);
8584 fprintf(f, "%d\n", sizeof(pthread_t));
8585 exit(0);
8586 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008587_ACEOF
8588rm -f conftest$ac_exeext
8589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8590 (eval $ac_link) 2>&5
8591 ac_status=$?
8592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8595 (eval $ac_try) 2>&5
8596 ac_status=$?
8597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8598 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008599 ac_cv_sizeof_pthread_t=`cat conftestval`
8600else
Martin v. Löwis11437992002-04-12 09:54:03 +00008601 echo "$as_me: program exited with status $ac_status" >&5
8602echo "$as_me: failed program was:" >&5
8603cat conftest.$ac_ext >&5
8604( exit $ac_status )
8605ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008607rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008608fi
8609
Trent Mick635f6fb2000-08-23 21:33:05 +00008610fi
8611
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8613echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8614
8615cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008616#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008617_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008618
8619fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008620CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008621
Martin v. Löwis11437992002-04-12 09:54:03 +00008622echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8623echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008624# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8625if test "${enable_toolbox_glue+set}" = set; then
8626 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008627
Martin v. Löwis11437992002-04-12 09:54:03 +00008628fi;
Jack Jansene578a632001-08-15 01:27:14 +00008629
8630if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008631then
Jack Jansene578a632001-08-15 01:27:14 +00008632 case $ac_sys_system/$ac_sys_release in
8633 Darwin/*)
8634 enable_toolbox_glue="yes";;
8635 *)
8636 enable_toolbox_glue="no";;
8637 esac
8638fi
8639case "$enable_toolbox_glue" in
8640yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008641 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008642 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008643 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008644
8645cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008646#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008647_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008648
8649 ;;
8650*)
8651 extra_frameworks=""
8652 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008653 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008654 ;;
8655esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008656echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8657echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008658
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008659
8660case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008661 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008662 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008663 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8664 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008665 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8666 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008667 Darwin/*)
8668 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008669 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8670 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008671 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8672 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008673esac
8674
Martin v. Löwis11437992002-04-12 09:54:03 +00008675echo "$as_me:$LINENO: checking for --enable-framework" >&5
8676echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008677if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008678then
Jack Jansenca06bc62001-08-03 15:32:23 +00008679 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008680 # -U __environ is needed since bundles don't have access
8681 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008683 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008684
Jack Jansena3891ea2001-09-07 14:25:12 +00008685 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008686 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8687 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008688 esac
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_NEXT_FRAMEWORK 1
8692_ACEOF
8693
8694 echo "$as_me:$LINENO: result: yes" >&5
8695echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008696else
Martin v. Löwis11437992002-04-12 09:54:03 +00008697 echo "$as_me:$LINENO: result: no" >&5
8698echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008699fi
8700
Martin v. Löwis11437992002-04-12 09:54:03 +00008701echo "$as_me:$LINENO: checking for dyld" >&5
8702echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008703case $ac_sys_system/$ac_sys_release in
8704 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008705
Martin v. Löwis11437992002-04-12 09:54:03 +00008706cat >>confdefs.h <<\_ACEOF
8707#define WITH_DYLD 1
8708_ACEOF
8709
8710 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8711echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008712 ;;
8713 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 echo "$as_me:$LINENO: result: no" >&5
8715echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008716 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008717esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008718
Guido van Rossum0a516c91994-09-12 10:58:40 +00008719# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008720
Michael W. Hudson54241132001-12-07 15:38:26 +00008721
8722
8723
8724
Guido van Rossum0a516c91994-09-12 10:58:40 +00008725# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008726# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008727echo "$as_me:$LINENO: checking SO" >&5
8728echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008729if test -z "$SO"
8730then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008731 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008732 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008733 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008734 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008735 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008736fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008737echo "$as_me:$LINENO: result: $SO" >&5
8738echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008739# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008740# -- "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 +00008741# (Shared libraries in this instance are shared modules to be loaded into
8742# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008743echo "$as_me:$LINENO: checking LDSHARED" >&5
8744echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008745if test -z "$LDSHARED"
8746then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008747 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008748 AIX*)
8749 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008750 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008751 ;;
8752 BeOS*)
8753 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008754 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008755 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008756 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008757 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008758 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008759 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00008760 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008761 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008762 else LDSHARED="$(CC) -G";
Greg Ward57c9a662000-05-26 12:22:54 +00008763 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008764 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008765 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8766 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008767 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008768 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8769 if test "$enable_framework" ; then
8770 # Link against the framework. All externals should be defined.
8771 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8772 else
8773 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008774 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008775 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008776 Darwin/*)
8777 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8778 if test "$enable_framework" ; then
8779 # Link against the framework. All externals should be defined.
8780 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8781 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008782 # No framework, use the Python app as bundle-loader
8783 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8784 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008785 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008786 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008787 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008788 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008789 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008790 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008791 then
8792 LDSHARED="cc -shared ${LDFLAGS}"
8793 else
8794 LDSHARED="ld -Bshareable ${LDFLAGS}"
8795 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008796 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008797 if test "$GCC" = "yes"
8798 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008799 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008800 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008801 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008802 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008803 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008804 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008805 *) LDSHARED="ld";;
8806 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008808echo "$as_me:$LINENO: result: $LDSHARED" >&5
8809echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008810BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008811# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008812# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008813echo "$as_me:$LINENO: checking CCSHARED" >&5
8814echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008815if test -z "$CCSHARED"
8816then
Guido van Rossum07397971997-04-29 21:49:50 +00008817 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008818 SunOS*) if test "$GCC" = yes;
8819 then CCSHARED="-fPIC";
8820 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008821 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008822 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008823 else CCSHARED="+z";
8824 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008825 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008826 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008827 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008828 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008829 if test "$GCC" = "yes"
8830 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008831 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008832 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008833 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008834 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008835 IRIX*/6*) case $CC in
8836 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008837 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008838 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008839 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008840 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008841fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008842echo "$as_me:$LINENO: result: $CCSHARED" >&5
8843echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008844# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008845# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008846echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8847echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008848if test -z "$LINKFORSHARED"
8849then
Guido van Rossum07397971997-04-29 21:49:50 +00008850 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008851 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008852 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008853 LINKFORSHARED="-Wl,-E -Wl,+s";;
8854# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008855 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008856 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008857 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008859 # -u __dummy makes the linker aware of the objc runtime
8860 # in System.framework; otherwise, __objcInit (referenced in
8861 # crt1.o) gets erroneously defined as common, which breaks dynamic
8862 # loading of any modules which reference it in System.framework.
8863 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8864 # not used by the core itself but which needs to be in the core so
8865 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008866 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008867 if test "$enable_framework"
8868 then
8869 LINKFORSHARED="$LINKFORSHARED -framework Python"
8870 fi
8871 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008872 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008873 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008874 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008875 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008876 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8877 then
8878 LINKFORSHARED="-Wl,--export-dynamic"
8879 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008880 SunOS/5*) case $CC in
8881 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008882 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008883 then
8884 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008885 fi;;
8886 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008887 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008888fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008889echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8890echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008891
Michael W. Hudson54241132001-12-07 15:38:26 +00008892
Martin v. Löwis11437992002-04-12 09:54:03 +00008893echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8894echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008895if test ! "$LIBRARY" = "$LDLIBRARY"
8896then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008897 case $ac_sys_system in
8898 CYGWIN*)
8899 # Cygwin needs CCSHARED when building extension DLLs
8900 # but not when building the interpreter DLL.
8901 CFLAGSFORSHARED='';;
8902 *)
8903 CFLAGSFORSHARED='$(CCSHARED)'
8904 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008905fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008906echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8907echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008908
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008909# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8910# library (with --enable-shared).
8911# For platforms on which shared libraries are not allowed to have unresolved
8912# symbols, this must be set to $(LIBS) (expanded by make).
8913
8914echo "$as_me:$LINENO: checking SHLIBS" >&5
8915echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
8916case "$ac_sys_system" in
8917 atheos*)
8918 SHLIBS='$(LIBS)';;
8919 *)
8920 SHLIBS='';;
8921esac
8922echo "$as_me:$LINENO: result: $SHLIBS" >&5
8923echo "${ECHO_T}$SHLIBS" >&6
8924
8925
Guido van Rossum627b2d71993-12-24 10:39:16 +00008926# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008927
8928echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8929echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8930if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8931 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008932else
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008934LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008935cat >conftest.$ac_ext <<_ACEOF
8936#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008937#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008938
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008939/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008940#ifdef __cplusplus
8941extern "C"
8942#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008943/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008944 builtin and then its argument prototype would still apply. */
8945char dlopen ();
8946#ifdef F77_DUMMY_MAIN
8947# ifdef __cplusplus
8948 extern "C"
8949# endif
8950 int F77_DUMMY_MAIN() { return 1; }
8951#endif
8952int
8953main ()
8954{
8955dlopen ();
8956 ;
8957 return 0;
8958}
8959_ACEOF
8960rm -f conftest.$ac_objext conftest$ac_exeext
8961if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8962 (eval $ac_link) 2>&5
8963 ac_status=$?
8964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8965 (exit $ac_status); } &&
8966 { ac_try='test -s conftest$ac_exeext'
8967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8968 (eval $ac_try) 2>&5
8969 ac_status=$?
8970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8971 (exit $ac_status); }; }; then
8972 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008973else
Martin v. Löwis11437992002-04-12 09:54:03 +00008974 echo "$as_me: failed program was:" >&5
8975cat conftest.$ac_ext >&5
8976ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008977fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008978rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8979LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008980fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008981echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8982echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8983if test $ac_cv_lib_dl_dlopen = yes; then
8984 cat >>confdefs.h <<_ACEOF
8985#define HAVE_LIBDL 1
8986_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008987
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008988 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008989
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008990fi
8991 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008992
8993echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8994echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8995if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8996 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008997else
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008999LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009000cat >conftest.$ac_ext <<_ACEOF
9001#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009002#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009003
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009004/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009005#ifdef __cplusplus
9006extern "C"
9007#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009008/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 builtin and then its argument prototype would still apply. */
9010char shl_load ();
9011#ifdef F77_DUMMY_MAIN
9012# ifdef __cplusplus
9013 extern "C"
9014# endif
9015 int F77_DUMMY_MAIN() { return 1; }
9016#endif
9017int
9018main ()
9019{
9020shl_load ();
9021 ;
9022 return 0;
9023}
9024_ACEOF
9025rm -f conftest.$ac_objext conftest$ac_exeext
9026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9027 (eval $ac_link) 2>&5
9028 ac_status=$?
9029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9030 (exit $ac_status); } &&
9031 { ac_try='test -s conftest$ac_exeext'
9032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9033 (eval $ac_try) 2>&5
9034 ac_status=$?
9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9036 (exit $ac_status); }; }; then
9037 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009038else
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 echo "$as_me: failed program was:" >&5
9040cat conftest.$ac_ext >&5
9041ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009042fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009043rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9044LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009045fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009046echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9047echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9048if test $ac_cv_lib_dld_shl_load = yes; then
9049 cat >>confdefs.h <<_ACEOF
9050#define HAVE_LIBDLD 1
9051_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009052
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009053 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009054
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009055fi
9056 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009057
9058echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9059echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9060if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9061 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009062else
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009064LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009065cat >conftest.$ac_ext <<_ACEOF
9066#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009067#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009068
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009069/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009070#ifdef __cplusplus
9071extern "C"
9072#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009073/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009074 builtin and then its argument prototype would still apply. */
9075char sem_init ();
9076#ifdef F77_DUMMY_MAIN
9077# ifdef __cplusplus
9078 extern "C"
9079# endif
9080 int F77_DUMMY_MAIN() { return 1; }
9081#endif
9082int
9083main ()
9084{
9085sem_init ();
9086 ;
9087 return 0;
9088}
9089_ACEOF
9090rm -f conftest.$ac_objext conftest$ac_exeext
9091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9092 (eval $ac_link) 2>&5
9093 ac_status=$?
9094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9095 (exit $ac_status); } &&
9096 { ac_try='test -s conftest$ac_exeext'
9097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9098 (eval $ac_try) 2>&5
9099 ac_status=$?
9100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9101 (exit $ac_status); }; }; then
9102 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009103else
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 echo "$as_me: failed program was:" >&5
9105cat conftest.$ac_ext >&5
9106ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009107fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009108rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9109LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009110fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009111echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9112echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9113if test $ac_cv_lib_rt_sem_init = yes; then
9114 cat >>confdefs.h <<_ACEOF
9115#define HAVE_LIBRT 1
9116_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009117
9118 LIBS="-lrt $LIBS"
9119
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009120fi
9121 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009122
9123# checks for system dependent C++ extensions support
9124case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9126echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9127 cat >conftest.$ac_ext <<_ACEOF
9128#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009129#include "confdefs.h"
9130#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009131#ifdef F77_DUMMY_MAIN
9132# ifdef __cplusplus
9133 extern "C"
9134# endif
9135 int F77_DUMMY_MAIN() { return 1; }
9136#endif
9137int
9138main ()
9139{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009140loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009141 ;
9142 return 0;
9143}
9144_ACEOF
9145rm -f conftest.$ac_objext conftest$ac_exeext
9146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9147 (eval $ac_link) 2>&5
9148 ac_status=$?
9149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9150 (exit $ac_status); } &&
9151 { ac_try='test -s conftest$ac_exeext'
9152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9153 (eval $ac_try) 2>&5
9154 ac_status=$?
9155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9156 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009157
Martin v. Löwis11437992002-04-12 09:54:03 +00009158cat >>confdefs.h <<\_ACEOF
9159#define AIX_GENUINE_CPLUSPLUS 1
9160_ACEOF
9161
9162 echo "$as_me:$LINENO: result: yes" >&5
9163echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009164else
Martin v. Löwis11437992002-04-12 09:54:03 +00009165 echo "$as_me: failed program was:" >&5
9166cat conftest.$ac_ext >&5
9167echo "$as_me:$LINENO: result: no" >&5
9168echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009169fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009170rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009171 *) ;;
9172esac
9173
Guido van Rossum70c7f481998-03-26 18:44:10 +00009174# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9175# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009176# BeOS' sockets are stashed in libnet.
9177case "$ac_sys_system" in
9178IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009179*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009180echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9181echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9182if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9183 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009184else
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009186LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009187cat >conftest.$ac_ext <<_ACEOF
9188#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009189#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009190
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009191/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009192#ifdef __cplusplus
9193extern "C"
9194#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009195/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 builtin and then its argument prototype would still apply. */
9197char t_open ();
9198#ifdef F77_DUMMY_MAIN
9199# ifdef __cplusplus
9200 extern "C"
9201# endif
9202 int F77_DUMMY_MAIN() { return 1; }
9203#endif
9204int
9205main ()
9206{
9207t_open ();
9208 ;
9209 return 0;
9210}
9211_ACEOF
9212rm -f conftest.$ac_objext conftest$ac_exeext
9213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9214 (eval $ac_link) 2>&5
9215 ac_status=$?
9216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9217 (exit $ac_status); } &&
9218 { ac_try='test -s conftest$ac_exeext'
9219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9220 (eval $ac_try) 2>&5
9221 ac_status=$?
9222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9223 (exit $ac_status); }; }; then
9224 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009225else
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 echo "$as_me: failed program was:" >&5
9227cat conftest.$ac_ext >&5
9228ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009229fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009230rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9231LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009233echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9234echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9235if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009236 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009237fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009238 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009239echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9240echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9241if test "${ac_cv_lib_socket_socket+set}" = set; then
9242 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009243else
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009245LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009246cat >conftest.$ac_ext <<_ACEOF
9247#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009248#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009249
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009250/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009251#ifdef __cplusplus
9252extern "C"
9253#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009254/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009255 builtin and then its argument prototype would still apply. */
9256char socket ();
9257#ifdef F77_DUMMY_MAIN
9258# ifdef __cplusplus
9259 extern "C"
9260# endif
9261 int F77_DUMMY_MAIN() { return 1; }
9262#endif
9263int
9264main ()
9265{
9266socket ();
9267 ;
9268 return 0;
9269}
9270_ACEOF
9271rm -f conftest.$ac_objext conftest$ac_exeext
9272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9273 (eval $ac_link) 2>&5
9274 ac_status=$?
9275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9276 (exit $ac_status); } &&
9277 { ac_try='test -s conftest$ac_exeext'
9278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9279 (eval $ac_try) 2>&5
9280 ac_status=$?
9281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9282 (exit $ac_status); }; }; then
9283 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009284else
Martin v. Löwis11437992002-04-12 09:54:03 +00009285 echo "$as_me: failed program was:" >&5
9286cat conftest.$ac_ext >&5
9287ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009288fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009289rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9290LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009291fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009292echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9293echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9294if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009295 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009296fi
9297 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009298;;
9299esac
9300case "$ac_sys_system" in
9301BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009302echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9303echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9304if test "${ac_cv_lib_net_socket+set}" = set; then
9305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009306else
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009308LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009309cat >conftest.$ac_ext <<_ACEOF
9310#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009311#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009312
Guido van Rossumad678af1998-10-02 14:42:15 +00009313/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009314#ifdef __cplusplus
9315extern "C"
9316#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009317/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009318 builtin and then its argument prototype would still apply. */
9319char socket ();
9320#ifdef F77_DUMMY_MAIN
9321# ifdef __cplusplus
9322 extern "C"
9323# endif
9324 int F77_DUMMY_MAIN() { return 1; }
9325#endif
9326int
9327main ()
9328{
9329socket ();
9330 ;
9331 return 0;
9332}
9333_ACEOF
9334rm -f conftest.$ac_objext conftest$ac_exeext
9335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9336 (eval $ac_link) 2>&5
9337 ac_status=$?
9338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9339 (exit $ac_status); } &&
9340 { ac_try='test -s conftest$ac_exeext'
9341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9342 (eval $ac_try) 2>&5
9343 ac_status=$?
9344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9345 (exit $ac_status); }; }; then
9346 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009347else
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 echo "$as_me: failed program was:" >&5
9349cat conftest.$ac_ext >&5
9350ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009351fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009352rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9353LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009354fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009355echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9356echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9357if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009358 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009359fi
9360 # BeOS
9361;;
9362esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009363
Martin v. Löwis11437992002-04-12 09:54:03 +00009364echo "$as_me:$LINENO: checking for --with-libs" >&5
9365echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9366
Guido van Rossuma68acba1996-07-31 17:36:39 +00009367# Check whether --with-libs or --without-libs was given.
9368if test "${with_libs+set}" = set; then
9369 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009370
9371echo "$as_me:$LINENO: result: $withval" >&5
9372echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009373LIBS="$withval $LIBS"
9374
9375else
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 echo "$as_me:$LINENO: result: no" >&5
9377echo "${ECHO_T}no" >&6
9378fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009379
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009380# Determine if signalmodule should be used.
9381
9382
Martin v. Löwis11437992002-04-12 09:54:03 +00009383echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9384echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9385
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009386# Check whether --with-signal-module or --without-signal-module was given.
9387if test "${with_signal_module+set}" = set; then
9388 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009389
Martin v. Löwis11437992002-04-12 09:54:03 +00009390fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009391
9392if test -z "$with_signal_module"
9393then with_signal_module="yes"
9394fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009395echo "$as_me:$LINENO: result: $with_signal_module" >&5
9396echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009397
9398if test "${with_signal_module}" = "yes"; then
9399 USE_SIGNAL_MODULE=""
9400 SIGNAL_OBJS=""
9401else
9402 USE_SIGNAL_MODULE="#"
9403 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9404fi
9405
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009406# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009407
Barry Warsawc0d24d82000-06-29 16:12:00 +00009408USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009409
Martin v. Löwis11437992002-04-12 09:54:03 +00009410echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9411echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9412
Guido van Rossumec2f0731997-01-22 20:54:01 +00009413
9414# Check whether --with-dec-threads or --without-dec-threads was given.
9415if test "${with_dec_threads+set}" = set; then
9416 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009417
9418echo "$as_me:$LINENO: result: $withval" >&5
9419echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009420LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009421if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009422 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009423fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009424else
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 echo "$as_me:$LINENO: result: no" >&5
9426echo "${ECHO_T}no" >&6
9427fi;
9428
9429# Templates for things AC_DEFINEd more than once.
9430# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009431
9432
Martin v. Löwis11437992002-04-12 09:54:03 +00009433
9434
9435
9436
9437
9438echo "$as_me:$LINENO: checking for --with-threads" >&5
9439echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9440
Guido van Rossumec2f0731997-01-22 20:54:01 +00009441# Check whether --with-threads or --without-threads was given.
9442if test "${with_threads+set}" = set; then
9443 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009444
Martin v. Löwis11437992002-04-12 09:54:03 +00009445fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009446
Barry Warsawc0d24d82000-06-29 16:12:00 +00009447# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009448
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009449# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009450if test "${with_thread+set}" = set; then
9451 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009452
Martin v. Löwis11437992002-04-12 09:54:03 +00009453with_threads=$with_thread
9454fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009455
9456if test -z "$with_threads"
9457then with_threads="yes"
9458fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009459echo "$as_me:$LINENO: result: $with_threads" >&5
9460echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009461
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009462
Barry Warsawc0d24d82000-06-29 16:12:00 +00009463if test "$with_threads" = "no"
9464then
9465 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009466elif test "$ac_cv_pthread_is_default" = yes
9467then
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009469#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009470_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009471
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009472 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009474#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009475_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009476
9477 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009479elif test "$ac_cv_kpthread" = "yes"
9480then
9481 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009483#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009484_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009485
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009486 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009487 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009488else
9489 if test ! -z "$with_threads" -a -d "$with_threads"
9490 then LDFLAGS="$LDFLAGS -L$with_threads"
9491 fi
9492 if test ! -z "$withval" -a -d "$withval"
9493 then LDFLAGS="$LDFLAGS -L$withval"
9494 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009495
9496 # According to the POSIX spec, a pthreads implementation must
9497 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9499echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9500 cat >conftest.$ac_ext <<_ACEOF
9501#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009502#include "confdefs.h"
9503#include <unistd.h>
9504 #ifdef _POSIX_THREADS
9505 yes
9506 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009507
9508_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9510 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009511 unistd_defines_pthreads=yes
9512else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009513 unistd_defines_pthreads=no
9514fi
9515rm -f conftest*
9516
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9518echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009519
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009521#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009522_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009523
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 if test "${ac_cv_header_cthreads_h+set}" = set; then
9525 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9526echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9527if test "${ac_cv_header_cthreads_h+set}" = set; then
9528 echo $ECHO_N "(cached) $ECHO_C" >&6
9529fi
9530echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9531echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009532else
Martin v. Löwis11437992002-04-12 09:54:03 +00009533 # Is the header compilable?
9534echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9535echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9536cat >conftest.$ac_ext <<_ACEOF
9537#line $LINENO "configure"
9538#include "confdefs.h"
9539$ac_includes_default
9540#include <cthreads.h>
9541_ACEOF
9542rm -f conftest.$ac_objext
9543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9544 (eval $ac_compile) 2>&5
9545 ac_status=$?
9546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9547 (exit $ac_status); } &&
9548 { ac_try='test -s conftest.$ac_objext'
9549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9550 (eval $ac_try) 2>&5
9551 ac_status=$?
9552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9553 (exit $ac_status); }; }; then
9554 ac_header_compiler=yes
9555else
9556 echo "$as_me: failed program was:" >&5
9557cat conftest.$ac_ext >&5
9558ac_header_compiler=no
9559fi
9560rm -f conftest.$ac_objext conftest.$ac_ext
9561echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9562echo "${ECHO_T}$ac_header_compiler" >&6
9563
9564# Is the header present?
9565echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9566echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9567cat >conftest.$ac_ext <<_ACEOF
9568#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009569#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009570#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009571_ACEOF
9572if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9573 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9574 ac_status=$?
9575 egrep -v '^ *\+' conftest.er1 >conftest.err
9576 rm -f conftest.er1
9577 cat conftest.err >&5
9578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9579 (exit $ac_status); } >/dev/null; then
9580 if test -s conftest.err; then
9581 ac_cpp_err=$ac_c_preproc_warn_flag
9582 else
9583 ac_cpp_err=
9584 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009585else
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 ac_cpp_err=yes
9587fi
9588if test -z "$ac_cpp_err"; then
9589 ac_header_preproc=yes
9590else
9591 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009592 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009593 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009595rm -f conftest.err conftest.$ac_ext
9596echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9597echo "${ECHO_T}$ac_header_preproc" >&6
9598
9599# So? What about this header?
9600case $ac_header_compiler:$ac_header_preproc in
9601 yes:no )
9602 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9603echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9604 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9605echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9606 no:yes )
9607 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9608echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9609 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9610echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9611 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9612echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9613esac
9614echo "$as_me:$LINENO: checking for cthreads.h" >&5
9615echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9616if test "${ac_cv_header_cthreads_h+set}" = set; then
9617 echo $ECHO_N "(cached) $ECHO_C" >&6
9618else
9619 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009620fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009621echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9622echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9623
9624fi
9625if test $ac_cv_header_cthreads_h = yes; then
9626 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009627#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009628_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009629
Martin v. Löwis11437992002-04-12 09:54:03 +00009630 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009631#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009632_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009633
Martin v. Löwis11437992002-04-12 09:54:03 +00009634
9635cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009636#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009637_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009638
9639 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009640 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009641else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009642
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9644 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9645echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9646if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9647 echo $ECHO_N "(cached) $ECHO_C" >&6
9648fi
9649echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9650echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009651else
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 # Is the header compilable?
9653echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9654echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9655cat >conftest.$ac_ext <<_ACEOF
9656#line $LINENO "configure"
9657#include "confdefs.h"
9658$ac_includes_default
9659#include <mach/cthreads.h>
9660_ACEOF
9661rm -f conftest.$ac_objext
9662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9663 (eval $ac_compile) 2>&5
9664 ac_status=$?
9665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9666 (exit $ac_status); } &&
9667 { ac_try='test -s conftest.$ac_objext'
9668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9669 (eval $ac_try) 2>&5
9670 ac_status=$?
9671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9672 (exit $ac_status); }; }; then
9673 ac_header_compiler=yes
9674else
9675 echo "$as_me: failed program was:" >&5
9676cat conftest.$ac_ext >&5
9677ac_header_compiler=no
9678fi
9679rm -f conftest.$ac_objext conftest.$ac_ext
9680echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9681echo "${ECHO_T}$ac_header_compiler" >&6
9682
9683# Is the header present?
9684echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9685echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9686cat >conftest.$ac_ext <<_ACEOF
9687#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009688#include "confdefs.h"
9689#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009690_ACEOF
9691if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9692 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9693 ac_status=$?
9694 egrep -v '^ *\+' conftest.er1 >conftest.err
9695 rm -f conftest.er1
9696 cat conftest.err >&5
9697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9698 (exit $ac_status); } >/dev/null; then
9699 if test -s conftest.err; then
9700 ac_cpp_err=$ac_c_preproc_warn_flag
9701 else
9702 ac_cpp_err=
9703 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009704else
Martin v. Löwis11437992002-04-12 09:54:03 +00009705 ac_cpp_err=yes
9706fi
9707if test -z "$ac_cpp_err"; then
9708 ac_header_preproc=yes
9709else
9710 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009711 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009713fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009714rm -f conftest.err conftest.$ac_ext
9715echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9716echo "${ECHO_T}$ac_header_preproc" >&6
9717
9718# So? What about this header?
9719case $ac_header_compiler:$ac_header_preproc in
9720 yes:no )
9721 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9722echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9723 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9724echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9725 no:yes )
9726 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9727echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9728 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9729echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9730 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9731echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9732esac
9733echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9734echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9735if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9736 echo $ECHO_N "(cached) $ECHO_C" >&6
9737else
9738 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009739fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009740echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9741echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9742
9743fi
9744if test $ac_cv_header_mach_cthreads_h = yes; then
9745 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009746#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009747_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009748
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009750#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009751_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009752
Martin v. Löwis11437992002-04-12 09:54:03 +00009753
9754cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009755#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009756_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009757
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009758 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009759else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009760
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 echo "$as_me:$LINENO: checking for --with-pth" >&5
9762echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9763
9764# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009765if test "${with_pth+set}" = set; then
9766 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009767
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 echo "$as_me:$LINENO: result: $withval" >&5
9769echo "${ECHO_T}$withval" >&6
9770 cat >>confdefs.h <<\_ACEOF
9771#define WITH_THREAD 1
9772_ACEOF
9773
9774
9775cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009776#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009777_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009778
Martin v. Löwis130fb172001-07-19 11:00:41 +00009779 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009780 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009781else
Martin v. Löwis11437992002-04-12 09:54:03 +00009782
9783 echo "$as_me:$LINENO: result: no" >&5
9784echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009785
9786 # Just looking for pthread_create in libpthread is not enough:
9787 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9788 # So we really have to include pthread.h, and then link.
9789 _libs=$LIBS
9790 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9792echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9793 cat >conftest.$ac_ext <<_ACEOF
9794#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009795#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009796#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009797
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009798void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009799#ifdef F77_DUMMY_MAIN
9800# ifdef __cplusplus
9801 extern "C"
9802# endif
9803 int F77_DUMMY_MAIN() { return 1; }
9804#endif
9805int
9806main ()
9807{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009808
9809pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 ;
9811 return 0;
9812}
9813_ACEOF
9814rm -f conftest.$ac_objext conftest$ac_exeext
9815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9816 (eval $ac_link) 2>&5
9817 ac_status=$?
9818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9819 (exit $ac_status); } &&
9820 { ac_try='test -s conftest$ac_exeext'
9821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9822 (eval $ac_try) 2>&5
9823 ac_status=$?
9824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9825 (exit $ac_status); }; }; then
9826
9827 echo "$as_me:$LINENO: result: yes" >&5
9828echo "${ECHO_T}yes" >&6
9829 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009830#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009831_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009832
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009833 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009834 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009835else
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 echo "$as_me: failed program was:" >&5
9837cat conftest.$ac_ext >&5
9838
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009839 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9841echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9842if test "${ac_cv_func_pthread_detach+set}" = set; then
9843 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009844else
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 cat >conftest.$ac_ext <<_ACEOF
9846#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009847#include "confdefs.h"
9848/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009850#include <assert.h>
9851/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009852#ifdef __cplusplus
9853extern "C"
9854#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009855/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 builtin and then its argument prototype would still apply. */
9857char pthread_detach ();
9858char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009859
Martin v. Löwis11437992002-04-12 09:54:03 +00009860#ifdef F77_DUMMY_MAIN
9861# ifdef __cplusplus
9862 extern "C"
9863# endif
9864 int F77_DUMMY_MAIN() { return 1; }
9865#endif
9866int
9867main ()
9868{
Guido van Rossumad678af1998-10-02 14:42:15 +00009869/* The GNU C library defines this for functions which it implements
9870 to always fail with ENOSYS. Some functions are actually named
9871 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009872#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009873choke me
9874#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009875f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009876#endif
9877
Martin v. Löwis11437992002-04-12 09:54:03 +00009878 ;
9879 return 0;
9880}
9881_ACEOF
9882rm -f conftest.$ac_objext conftest$ac_exeext
9883if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9884 (eval $ac_link) 2>&5
9885 ac_status=$?
9886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9887 (exit $ac_status); } &&
9888 { ac_try='test -s conftest$ac_exeext'
9889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9890 (eval $ac_try) 2>&5
9891 ac_status=$?
9892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9893 (exit $ac_status); }; }; then
9894 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009895else
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 echo "$as_me: failed program was:" >&5
9897cat conftest.$ac_ext >&5
9898ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009899fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009900rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009901fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009902echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9903echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9904if test $ac_cv_func_pthread_detach = yes; then
9905 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009906#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009907_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009908
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009909 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009910 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009911else
Guido van Rossumad678af1998-10-02 14:42:15 +00009912
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009913 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9914 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9915echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9916if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9917 echo $ECHO_N "(cached) $ECHO_C" >&6
9918fi
9919echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9920echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9921else
9922 # Is the header compilable?
9923echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
9924echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
9925cat >conftest.$ac_ext <<_ACEOF
9926#line $LINENO "configure"
9927#include "confdefs.h"
9928$ac_includes_default
9929#include <atheos/threads.h>
9930_ACEOF
9931rm -f conftest.$ac_objext
9932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9933 (eval $ac_compile) 2>&5
9934 ac_status=$?
9935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9936 (exit $ac_status); } &&
9937 { ac_try='test -s conftest.$ac_objext'
9938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9939 (eval $ac_try) 2>&5
9940 ac_status=$?
9941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9942 (exit $ac_status); }; }; then
9943 ac_header_compiler=yes
9944else
9945 echo "$as_me: failed program was:" >&5
9946cat conftest.$ac_ext >&5
9947ac_header_compiler=no
9948fi
9949rm -f conftest.$ac_objext conftest.$ac_ext
9950echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9951echo "${ECHO_T}$ac_header_compiler" >&6
9952
9953# Is the header present?
9954echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
9955echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
9956cat >conftest.$ac_ext <<_ACEOF
9957#line $LINENO "configure"
9958#include "confdefs.h"
9959#include <atheos/threads.h>
9960_ACEOF
9961if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9962 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9963 ac_status=$?
9964 egrep -v '^ *\+' conftest.er1 >conftest.err
9965 rm -f conftest.er1
9966 cat conftest.err >&5
9967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9968 (exit $ac_status); } >/dev/null; then
9969 if test -s conftest.err; then
9970 ac_cpp_err=$ac_c_preproc_warn_flag
9971 else
9972 ac_cpp_err=
9973 fi
9974else
9975 ac_cpp_err=yes
9976fi
9977if test -z "$ac_cpp_err"; then
9978 ac_header_preproc=yes
9979else
9980 echo "$as_me: failed program was:" >&5
9981 cat conftest.$ac_ext >&5
9982 ac_header_preproc=no
9983fi
9984rm -f conftest.err conftest.$ac_ext
9985echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9986echo "${ECHO_T}$ac_header_preproc" >&6
9987
9988# So? What about this header?
9989case $ac_header_compiler:$ac_header_preproc in
9990 yes:no )
9991 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9992echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9993 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9994echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9995 no:yes )
9996 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
9997echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
9998 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
9999echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10000 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10001echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10002esac
10003echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10004echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10005if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10006 echo $ECHO_N "(cached) $ECHO_C" >&6
10007else
10008 ac_cv_header_atheos_threads_h=$ac_header_preproc
10009fi
10010echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10011echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10012
10013fi
10014if test $ac_cv_header_atheos_threads_h = yes; then
10015 cat >>confdefs.h <<\_ACEOF
10016#define WITH_THREAD 1
10017_ACEOF
10018
10019
10020cat >>confdefs.h <<\_ACEOF
10021#define ATHEOS_THREADS 1
10022_ACEOF
10023
10024 THREADOBJ="Python/thread.o"
10025else
10026
Martin v. Löwis11437992002-04-12 09:54:03 +000010027 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10028 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10029echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10030if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10031 echo $ECHO_N "(cached) $ECHO_C" >&6
10032fi
10033echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10034echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010035else
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 # Is the header compilable?
10037echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10038echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10039cat >conftest.$ac_ext <<_ACEOF
10040#line $LINENO "configure"
10041#include "confdefs.h"
10042$ac_includes_default
10043#include <kernel/OS.h>
10044_ACEOF
10045rm -f conftest.$ac_objext
10046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10047 (eval $ac_compile) 2>&5
10048 ac_status=$?
10049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10050 (exit $ac_status); } &&
10051 { ac_try='test -s conftest.$ac_objext'
10052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10053 (eval $ac_try) 2>&5
10054 ac_status=$?
10055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10056 (exit $ac_status); }; }; then
10057 ac_header_compiler=yes
10058else
10059 echo "$as_me: failed program was:" >&5
10060cat conftest.$ac_ext >&5
10061ac_header_compiler=no
10062fi
10063rm -f conftest.$ac_objext conftest.$ac_ext
10064echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10065echo "${ECHO_T}$ac_header_compiler" >&6
10066
10067# Is the header present?
10068echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10069echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10070cat >conftest.$ac_ext <<_ACEOF
10071#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010072#include "confdefs.h"
10073#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010074_ACEOF
10075if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10076 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10077 ac_status=$?
10078 egrep -v '^ *\+' conftest.er1 >conftest.err
10079 rm -f conftest.er1
10080 cat conftest.err >&5
10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); } >/dev/null; then
10083 if test -s conftest.err; then
10084 ac_cpp_err=$ac_c_preproc_warn_flag
10085 else
10086 ac_cpp_err=
10087 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010088else
Martin v. Löwis11437992002-04-12 09:54:03 +000010089 ac_cpp_err=yes
10090fi
10091if test -z "$ac_cpp_err"; then
10092 ac_header_preproc=yes
10093else
10094 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010095 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010096 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010097fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010098rm -f conftest.err conftest.$ac_ext
10099echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10100echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010101
Martin v. Löwis11437992002-04-12 09:54:03 +000010102# So? What about this header?
10103case $ac_header_compiler:$ac_header_preproc in
10104 yes:no )
10105 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10106echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10107 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10108echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10109 no:yes )
10110 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10111echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10112 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10113echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10114 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10115echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10116esac
10117echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10118echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10119if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10120 echo $ECHO_N "(cached) $ECHO_C" >&6
10121else
10122 ac_cv_header_kernel_OS_h=$ac_header_preproc
10123fi
10124echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10125echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10126
10127fi
10128if test $ac_cv_header_kernel_OS_h = yes; then
10129 cat >>confdefs.h <<\_ACEOF
10130#define WITH_THREAD 1
10131_ACEOF
10132
10133
10134cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010135#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010136_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010137
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010138 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010139else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010140
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10142echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10143if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10144 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010145else
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010147LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010148cat >conftest.$ac_ext <<_ACEOF
10149#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010150#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010151
Greg Steinadf63d62000-07-05 10:38:09 +000010152/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010153#ifdef __cplusplus
10154extern "C"
10155#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010156/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 builtin and then its argument prototype would still apply. */
10158char pthread_create ();
10159#ifdef F77_DUMMY_MAIN
10160# ifdef __cplusplus
10161 extern "C"
10162# endif
10163 int F77_DUMMY_MAIN() { return 1; }
10164#endif
10165int
10166main ()
10167{
10168pthread_create ();
10169 ;
10170 return 0;
10171}
10172_ACEOF
10173rm -f conftest.$ac_objext conftest$ac_exeext
10174if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10175 (eval $ac_link) 2>&5
10176 ac_status=$?
10177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10178 (exit $ac_status); } &&
10179 { ac_try='test -s conftest$ac_exeext'
10180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10181 (eval $ac_try) 2>&5
10182 ac_status=$?
10183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10184 (exit $ac_status); }; }; then
10185 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010186else
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 echo "$as_me: failed program was:" >&5
10188cat conftest.$ac_ext >&5
10189ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010190fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010191rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10192LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010194echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10195echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10196if test $ac_cv_lib_pthreads_pthread_create = yes; then
10197 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010198#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010199_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010200
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010201 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010202 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010203 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010204else
Greg Steinadf63d62000-07-05 10:38:09 +000010205
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10207echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10208if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10209 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010210else
Martin v. Löwis11437992002-04-12 09:54:03 +000010211 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010212LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010213cat >conftest.$ac_ext <<_ACEOF
10214#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010215#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010216
Guido van Rossum49545951997-12-02 19:28:29 +000010217/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010218#ifdef __cplusplus
10219extern "C"
10220#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010221/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 builtin and then its argument prototype would still apply. */
10223char pthread_create ();
10224#ifdef F77_DUMMY_MAIN
10225# ifdef __cplusplus
10226 extern "C"
10227# endif
10228 int F77_DUMMY_MAIN() { return 1; }
10229#endif
10230int
10231main ()
10232{
10233pthread_create ();
10234 ;
10235 return 0;
10236}
10237_ACEOF
10238rm -f conftest.$ac_objext conftest$ac_exeext
10239if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10240 (eval $ac_link) 2>&5
10241 ac_status=$?
10242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10243 (exit $ac_status); } &&
10244 { ac_try='test -s conftest$ac_exeext'
10245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10246 (eval $ac_try) 2>&5
10247 ac_status=$?
10248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10249 (exit $ac_status); }; }; then
10250 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010251else
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 echo "$as_me: failed program was:" >&5
10253cat conftest.$ac_ext >&5
10254ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010255fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010256rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10257LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010259echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10260echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10261if test $ac_cv_lib_c_r_pthread_create = yes; then
10262 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010263#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010264_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010265
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010266 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010267 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010268 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010269else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010270
Martin v. Löwis11437992002-04-12 09:54:03 +000010271 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10272echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10273if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10274 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010275else
Martin v. Löwis11437992002-04-12 09:54:03 +000010276 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010277LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010278cat >conftest.$ac_ext <<_ACEOF
10279#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010280#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010281
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010282/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010283#ifdef __cplusplus
10284extern "C"
10285#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010286/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 builtin and then its argument prototype would still apply. */
10288char __d6_pthread_create ();
10289#ifdef F77_DUMMY_MAIN
10290# ifdef __cplusplus
10291 extern "C"
10292# endif
10293 int F77_DUMMY_MAIN() { return 1; }
10294#endif
10295int
10296main ()
10297{
10298__d6_pthread_create ();
10299 ;
10300 return 0;
10301}
10302_ACEOF
10303rm -f conftest.$ac_objext conftest$ac_exeext
10304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10305 (eval $ac_link) 2>&5
10306 ac_status=$?
10307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10308 (exit $ac_status); } &&
10309 { ac_try='test -s conftest$ac_exeext'
10310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10311 (eval $ac_try) 2>&5
10312 ac_status=$?
10313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10314 (exit $ac_status); }; }; then
10315 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010316else
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 echo "$as_me: failed program was:" >&5
10318cat conftest.$ac_ext >&5
10319ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010320fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10322LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010324echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10325echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10326if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10327 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010328#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010329_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010330
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010331 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010332 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010333 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010334else
Guido van Rossum49545951997-12-02 19:28:29 +000010335
Martin v. Löwis11437992002-04-12 09:54:03 +000010336 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10337echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10338if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10339 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010340else
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010342LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010343cat >conftest.$ac_ext <<_ACEOF
10344#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010345#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010346
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010347/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010348#ifdef __cplusplus
10349extern "C"
10350#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010351/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 builtin and then its argument prototype would still apply. */
10353char __pthread_create_system ();
10354#ifdef F77_DUMMY_MAIN
10355# ifdef __cplusplus
10356 extern "C"
10357# endif
10358 int F77_DUMMY_MAIN() { return 1; }
10359#endif
10360int
10361main ()
10362{
10363__pthread_create_system ();
10364 ;
10365 return 0;
10366}
10367_ACEOF
10368rm -f conftest.$ac_objext conftest$ac_exeext
10369if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10370 (eval $ac_link) 2>&5
10371 ac_status=$?
10372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10373 (exit $ac_status); } &&
10374 { ac_try='test -s conftest$ac_exeext'
10375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10376 (eval $ac_try) 2>&5
10377 ac_status=$?
10378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10379 (exit $ac_status); }; }; then
10380 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010381else
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 echo "$as_me: failed program was:" >&5
10383cat conftest.$ac_ext >&5
10384ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010385fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010386rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10387LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010388fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010389echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10390echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10391if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10392 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010393#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010394_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010395
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010396 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010397 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010398 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010399else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010400
Martin v. Löwis11437992002-04-12 09:54:03 +000010401 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10402echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10403if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10404 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010405else
Martin v. Löwis11437992002-04-12 09:54:03 +000010406 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010407LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010408cat >conftest.$ac_ext <<_ACEOF
10409#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010410#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010411
Guido van Rossumb93a8621998-05-07 13:27:32 +000010412/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010413#ifdef __cplusplus
10414extern "C"
10415#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010416/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 builtin and then its argument prototype would still apply. */
10418char pthread_create ();
10419#ifdef F77_DUMMY_MAIN
10420# ifdef __cplusplus
10421 extern "C"
10422# endif
10423 int F77_DUMMY_MAIN() { return 1; }
10424#endif
10425int
10426main ()
10427{
10428pthread_create ();
10429 ;
10430 return 0;
10431}
10432_ACEOF
10433rm -f conftest.$ac_objext conftest$ac_exeext
10434if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10435 (eval $ac_link) 2>&5
10436 ac_status=$?
10437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10438 (exit $ac_status); } &&
10439 { ac_try='test -s conftest$ac_exeext'
10440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10441 (eval $ac_try) 2>&5
10442 ac_status=$?
10443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10444 (exit $ac_status); }; }; then
10445 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010446else
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 echo "$as_me: failed program was:" >&5
10448cat conftest.$ac_ext >&5
10449ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010450fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010451rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10452LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010454echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10455echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10456if test $ac_cv_lib_cma_pthread_create = yes; then
10457 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010458#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010459_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010460
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010461 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010462 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010463 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010464else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010465
Martin v. Löwis130fb172001-07-19 11:00:41 +000010466 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010467fi
10468
Guido van Rossum627b2d71993-12-24 10:39:16 +000010469
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010470fi
10471
Guido van Rossum0be3e491997-05-22 20:33:33 +000010472fi
10473
Guido van Rossum49545951997-12-02 19:28:29 +000010474fi
10475
Guido van Rossumb93a8621998-05-07 13:27:32 +000010476fi
10477
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010478fi
10479
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010480
Michael W. Hudson54241132001-12-07 15:38:26 +000010481fi
10482
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010483
10484fi
10485
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010486fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010487rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10488fi;
10489fi
10490
10491
10492fi
10493
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010494
Michael W. Hudson54241132001-12-07 15:38:26 +000010495
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010496 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010497 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010498
10499cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010500#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010501_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010502
10503 fi
10504
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10506echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10507 if test "${ac_cv_pthread_system_supported+set}" = set; then
10508 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010509else
10510 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010511 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010512else
Martin v. Löwis11437992002-04-12 09:54:03 +000010513 cat >conftest.$ac_ext <<_ACEOF
10514#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010515#include "confdefs.h"
10516#include <pthread.h>
10517 void *foo(void *parm) {
10518 return NULL;
10519 }
10520 main() {
10521 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010522 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010523 if (pthread_attr_init(&attr)) exit(-1);
10524 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010525 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010526 exit(0);
10527 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010528_ACEOF
10529rm -f conftest$ac_exeext
10530if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10531 (eval $ac_link) 2>&5
10532 ac_status=$?
10533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10534 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10536 (eval $ac_try) 2>&5
10537 ac_status=$?
10538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10539 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010540 ac_cv_pthread_system_supported=yes
10541else
Martin v. Löwis11437992002-04-12 09:54:03 +000010542 echo "$as_me: program exited with status $ac_status" >&5
10543echo "$as_me: failed program was:" >&5
10544cat conftest.$ac_ext >&5
10545( exit $ac_status )
10546ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010547fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010548rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010549fi
10550
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010551fi
10552
Martin v. Löwis11437992002-04-12 09:54:03 +000010553 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10554echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010555 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010556
10557cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010558#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010559_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010560
10561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010562
10563for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010564do
Martin v. Löwis11437992002-04-12 09:54:03 +000010565as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10566echo "$as_me:$LINENO: checking for $ac_func" >&5
10567echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10568if eval "test \"\${$as_ac_var+set}\" = set"; then
10569 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010570else
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 cat >conftest.$ac_ext <<_ACEOF
10572#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010573#include "confdefs.h"
10574/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010576#include <assert.h>
10577/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010578#ifdef __cplusplus
10579extern "C"
10580#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010581/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010582 builtin and then its argument prototype would still apply. */
10583char $ac_func ();
10584char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010585
Martin v. Löwis11437992002-04-12 09:54:03 +000010586#ifdef F77_DUMMY_MAIN
10587# ifdef __cplusplus
10588 extern "C"
10589# endif
10590 int F77_DUMMY_MAIN() { return 1; }
10591#endif
10592int
10593main ()
10594{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010595/* The GNU C library defines this for functions which it implements
10596 to always fail with ENOSYS. Some functions are actually named
10597 something starting with __ and the normal name is an alias. */
10598#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10599choke me
10600#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010601f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010602#endif
10603
Martin v. Löwis11437992002-04-12 09:54:03 +000010604 ;
10605 return 0;
10606}
10607_ACEOF
10608rm -f conftest.$ac_objext conftest$ac_exeext
10609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10610 (eval $ac_link) 2>&5
10611 ac_status=$?
10612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10613 (exit $ac_status); } &&
10614 { ac_try='test -s conftest$ac_exeext'
10615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10616 (eval $ac_try) 2>&5
10617 ac_status=$?
10618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10619 (exit $ac_status); }; }; then
10620 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010621else
Martin v. Löwis11437992002-04-12 09:54:03 +000010622 echo "$as_me: failed program was:" >&5
10623cat conftest.$ac_ext >&5
10624eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010626rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010628echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10629echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10630if test `eval echo '${'$as_ac_var'}'` = yes; then
10631 cat >>confdefs.h <<_ACEOF
10632#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10633_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010634
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010635fi
10636done
10637
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010638 fi
10639
Martin v. Löwis11437992002-04-12 09:54:03 +000010640 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10641echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10642if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10643 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010644else
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010646LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010647cat >conftest.$ac_ext <<_ACEOF
10648#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010649#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010650
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010651/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010652#ifdef __cplusplus
10653extern "C"
10654#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010655/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010656 builtin and then its argument prototype would still apply. */
10657char usconfig ();
10658#ifdef F77_DUMMY_MAIN
10659# ifdef __cplusplus
10660 extern "C"
10661# endif
10662 int F77_DUMMY_MAIN() { return 1; }
10663#endif
10664int
10665main ()
10666{
10667usconfig ();
10668 ;
10669 return 0;
10670}
10671_ACEOF
10672rm -f conftest.$ac_objext conftest$ac_exeext
10673if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10674 (eval $ac_link) 2>&5
10675 ac_status=$?
10676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10677 (exit $ac_status); } &&
10678 { ac_try='test -s conftest$ac_exeext'
10679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10680 (eval $ac_try) 2>&5
10681 ac_status=$?
10682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10683 (exit $ac_status); }; }; then
10684 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010685else
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 echo "$as_me: failed program was:" >&5
10687cat conftest.$ac_ext >&5
10688ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010689fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010690rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10691LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010692fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010693echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10694echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10695if test $ac_cv_lib_mpc_usconfig = yes; then
10696 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010697#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010698_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010699
Martin v. Löwis130fb172001-07-19 11:00:41 +000010700 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010701 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010702 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010703fi
10704
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010705
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 if test $posix_threads != "yes"; then
10707 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10708echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10709if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10710 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010711else
Martin v. Löwis11437992002-04-12 09:54:03 +000010712 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010713LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010714cat >conftest.$ac_ext <<_ACEOF
10715#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010716#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010717
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010718/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010719#ifdef __cplusplus
10720extern "C"
10721#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010722/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 builtin and then its argument prototype would still apply. */
10724char thr_create ();
10725#ifdef F77_DUMMY_MAIN
10726# ifdef __cplusplus
10727 extern "C"
10728# endif
10729 int F77_DUMMY_MAIN() { return 1; }
10730#endif
10731int
10732main ()
10733{
10734thr_create ();
10735 ;
10736 return 0;
10737}
10738_ACEOF
10739rm -f conftest.$ac_objext conftest$ac_exeext
10740if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10741 (eval $ac_link) 2>&5
10742 ac_status=$?
10743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10744 (exit $ac_status); } &&
10745 { ac_try='test -s conftest$ac_exeext'
10746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10747 (eval $ac_try) 2>&5
10748 ac_status=$?
10749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10750 (exit $ac_status); }; }; then
10751 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010752else
Martin v. Löwis11437992002-04-12 09:54:03 +000010753 echo "$as_me: failed program was:" >&5
10754cat conftest.$ac_ext >&5
10755ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010756fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010757rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10758LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010759fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010760echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10761echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10762if test $ac_cv_lib_thread_thr_create = yes; then
10763 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010764#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010765_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010766
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010767 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010768 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010769 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010770fi
10771
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010772 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010773
Martin v. Löwis130fb172001-07-19 11:00:41 +000010774 if test "$USE_THREAD_MODULE" != "#"
10775 then
10776 # If the above checks didn't disable threads, (at least) OSF1
10777 # needs this '-threads' argument during linking.
10778 case $ac_sys_system in
10779 OSF1) LDLAST=-threads;;
10780 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010781 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010782fi
10783
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010784# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010785
10786
10787echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10788echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789# Check whether --enable-ipv6 or --disable-ipv6 was given.
10790if test "${enable_ipv6+set}" = set; then
10791 enableval="$enable_ipv6"
10792 case "$enableval" in
10793 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010794 echo "$as_me:$LINENO: result: no" >&5
10795echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796 ipv6=no
10797 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 *) echo "$as_me:$LINENO: result: yes" >&5
10799echo "${ECHO_T}yes" >&6
10800 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010802_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010803
10804 ipv6=yes
10805 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010806 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807else
Martin v. Löwis11437992002-04-12 09:54:03 +000010808
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010810 echo "$as_me:$LINENO: result: no" >&5
10811echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812 ipv6=no
10813
10814else
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 cat >conftest.$ac_ext <<_ACEOF
10816#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817#include "confdefs.h"
10818 /* AF_INET6 available check */
10819#include <sys/types.h>
10820#include <sys/socket.h>
10821main()
10822{
10823 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10824 exit(1);
10825 else
10826 exit(0);
10827}
10828
Martin v. Löwis11437992002-04-12 09:54:03 +000010829_ACEOF
10830rm -f conftest$ac_exeext
10831if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10832 (eval $ac_link) 2>&5
10833 ac_status=$?
10834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10837 (eval $ac_try) 2>&5
10838 ac_status=$?
10839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10840 (exit $ac_status); }; }; then
10841 echo "$as_me:$LINENO: result: yes" >&5
10842echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843 ipv6=yes
10844else
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 echo "$as_me: program exited with status $ac_status" >&5
10846echo "$as_me: failed program was:" >&5
10847cat conftest.$ac_ext >&5
10848( exit $ac_status )
10849echo "$as_me:$LINENO: result: no" >&5
10850echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851 ipv6=no
10852fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010853rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854fi
10855
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010856if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10858echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10859 cat >conftest.$ac_ext <<_ACEOF
10860#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010861#include "confdefs.h"
10862#include <sys/types.h>
10863#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010864#ifdef F77_DUMMY_MAIN
10865# ifdef __cplusplus
10866 extern "C"
10867# endif
10868 int F77_DUMMY_MAIN() { return 1; }
10869#endif
10870int
10871main ()
10872{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010873struct sockaddr_in6 x;
10874x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010875 ;
10876 return 0;
10877}
10878_ACEOF
10879rm -f conftest.$ac_objext
10880if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10881 (eval $ac_compile) 2>&5
10882 ac_status=$?
10883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10884 (exit $ac_status); } &&
10885 { ac_try='test -s conftest.$ac_objext'
10886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10887 (eval $ac_try) 2>&5
10888 ac_status=$?
10889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10890 (exit $ac_status); }; }; then
10891 echo "$as_me:$LINENO: result: yes" >&5
10892echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010893 ipv6=yes
10894else
Martin v. Löwis11437992002-04-12 09:54:03 +000010895 echo "$as_me: failed program was:" >&5
10896cat conftest.$ac_ext >&5
10897echo "$as_me:$LINENO: result: no" >&5
10898echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010899 ipv6=no
10900fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010901rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010902fi
10903
10904if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010906#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010907_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010908
10909fi
10910
Martin v. Löwis11437992002-04-12 09:54:03 +000010911fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912
10913ipv6type=unknown
10914ipv6lib=none
10915ipv6trylibc=no
10916
10917if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10919echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010920 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10921 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010922 case $i in
10923 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010924 cat >conftest.$ac_ext <<_ACEOF
10925#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010927
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928#include <netinet/in.h>
10929#ifdef IPV6_INRIA_VERSION
10930yes
10931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010932_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10934 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010935 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010936fi
10937rm -f conftest*
10938
10939 ;;
10940 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 cat >conftest.$ac_ext <<_ACEOF
10942#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010943#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945#include <netinet/in.h>
10946#ifdef __KAME__
10947yes
10948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010949_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10951 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010952 ipv6type=$i;
10953 ipv6lib=inet6
10954 ipv6libdir=/usr/local/v6/lib
10955 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010956fi
10957rm -f conftest*
10958
10959 ;;
10960 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 cat >conftest.$ac_ext <<_ACEOF
10962#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010963#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010964
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010965#include <features.h>
10966#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10967yes
10968#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010969_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010970if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10971 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010972 ipv6type=$i;
10973 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010974fi
10975rm -f conftest*
10976
10977 ;;
10978 linux-inet6)
10979 if test -d /usr/inet6; then
10980 ipv6type=$i
10981 ipv6lib=inet6
10982 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010983 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010984 fi
10985 ;;
10986 solaris)
10987 if test -f /etc/netconfig; then
10988 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10989 ipv6type=$i
10990 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010991 fi
10992 fi
10993 ;;
10994 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010995 cat >conftest.$ac_ext <<_ACEOF
10996#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010997#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010998
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010999#include <sys/param.h>
11000#ifdef _TOSHIBA_INET6
11001yes
11002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011003_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11005 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011006 ipv6type=$i;
11007 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011008 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011009fi
11010rm -f conftest*
11011
11012 ;;
11013 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 cat >conftest.$ac_ext <<_ACEOF
11015#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011016#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011017
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011018#include </usr/local/v6/include/sys/v6config.h>
11019#ifdef __V6D__
11020yes
11021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011022_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11024 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011025 ipv6type=$i;
11026 ipv6lib=v6;
11027 ipv6libdir=/usr/local/v6/lib;
11028 OPT="-I/usr/local/v6/include $OPT"
11029fi
11030rm -f conftest*
11031
11032 ;;
11033 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011034 cat >conftest.$ac_ext <<_ACEOF
11035#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011036#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011037
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011038#include <sys/param.h>
11039#ifdef _ZETA_MINAMI_INET6
11040yes
11041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011042_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11044 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011045 ipv6type=$i;
11046 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011047 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011048fi
11049rm -f conftest*
11050
11051 ;;
11052 esac
11053 if test "$ipv6type" != "unknown"; then
11054 break
11055 fi
11056 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 echo "$as_me:$LINENO: result: $ipv6type" >&5
11058echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011059fi
11060
11061if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11062 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11063 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11064 echo "using lib$ipv6lib"
11065 else
11066 if test $ipv6trylibc = "yes"; then
11067 echo "using libc"
11068 else
11069 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11070 echo "You need to fetch lib$ipv6lib.a from appropriate"
11071 echo 'ipv6 kit and compile beforehand.'
11072 exit 1
11073 fi
11074 fi
11075fi
11076
Jack Jansen7b8c7542002-04-14 20:12:41 +000011077# Check for universal newline support
11078echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
11079echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
11080
11081# Check whether --with-universal-newlines or --without-universal-newlines was given.
11082if test "${with_universal_newlines+set}" = set; then
11083 withval="$with_universal_newlines"
11084
11085fi;
11086
11087if test -z "$with_universal_newlines"
11088then with_universal_newlines="yes"
11089fi
11090if test "$with_universal_newlines" != "no"
11091then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011092
11093cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011094#define WITH_UNIVERSAL_NEWLINES 1
11095_ACEOF
11096
11097fi
11098echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11099echo "${ECHO_T}$with_universal_newlines" >&6
11100
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011101# Check for --with-doc-strings
11102echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11103echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11104
11105# Check whether --with-doc-strings or --without-doc-strings was given.
11106if test "${with_doc_strings+set}" = set; then
11107 withval="$with_doc_strings"
11108
11109fi;
11110
11111if test -z "$with_doc_strings"
11112then with_doc_strings="yes"
11113fi
11114if test "$with_doc_strings" != "no"
11115then
11116
11117cat >>confdefs.h <<\_ACEOF
11118#define WITH_DOC_STRINGS 1
11119_ACEOF
11120
11121fi
11122echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11123echo "${ECHO_T}$with_doc_strings" >&6
11124
Neil Schemenauera35c6882001-02-27 04:45:05 +000011125# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011126echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11127echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11128
Neil Schemenauera35c6882001-02-27 04:45:05 +000011129# Check whether --with-pymalloc or --without-pymalloc was given.
11130if test "${with_pymalloc+set}" = set; then
11131 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011132
Martin v. Löwis11437992002-04-12 09:54:03 +000011133fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011134
Neil Schemenauer16c22972002-03-22 15:34:49 +000011135if test -z "$with_pymalloc"
11136then with_pymalloc="yes"
11137fi
11138if test "$with_pymalloc" != "no"
11139then
Martin v. Löwis11437992002-04-12 09:54:03 +000011140
11141cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011142#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011143_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011144
11145fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011146echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11147echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011148
Barry Warsawef82cd72000-06-30 16:21:01 +000011149# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011150echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11151echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11152
Barry Warsawef82cd72000-06-30 16:21:01 +000011153# Check whether --with-wctype-functions or --without-wctype-functions was given.
11154if test "${with_wctype_functions+set}" = set; then
11155 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011156
Barry Warsawef82cd72000-06-30 16:21:01 +000011157if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011158then
11159
11160cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011161#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011162_ACEOF
11163
11164 echo "$as_me:$LINENO: result: yes" >&5
11165echo "${ECHO_T}yes" >&6
11166else echo "$as_me:$LINENO: result: no" >&5
11167echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011168fi
11169else
Martin v. Löwis11437992002-04-12 09:54:03 +000011170 echo "$as_me:$LINENO: result: no" >&5
11171echo "${ECHO_T}no" >&6
11172fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011173
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011174# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011175
Guido van Rossum98935bf2001-09-05 19:13:16 +000011176DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011177
Martin v. Löwis11437992002-04-12 09:54:03 +000011178echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11179echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11180
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011181# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011182if test "${with_sgi_dl+set}" = set; then
11183 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011184
11185echo "$as_me:$LINENO: result: $withval" >&5
11186echo "${ECHO_T}$withval" >&6
11187
11188cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011189#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011190_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011191
Guido van Rossume97ee181999-12-20 21:27:22 +000011192DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011193dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011194if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011195then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011196else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11197echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11198 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011199fi
11200DLINCLDIR=${dldir}
11201LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011202else
Martin v. Löwis11437992002-04-12 09:54:03 +000011203 echo "$as_me:$LINENO: result: no" >&5
11204echo "${ECHO_T}no" >&6
11205fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011206
Martin v. Löwis11437992002-04-12 09:54:03 +000011207echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11208echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011209
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011210# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011211if test "${with_dl_dld+set}" = set; then
11212 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011213
11214echo "$as_me:$LINENO: result: $withval" >&5
11215echo "${ECHO_T}$withval" >&6
11216
11217cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011218#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011219_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011220
Guido van Rossume97ee181999-12-20 21:27:22 +000011221DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011222dldir=`echo "$withval" | sed 's/,.*//'`
11223dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011224if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011225then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011226else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11227echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11228 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011229fi
11230DLINCLDIR=${dldir}
11231LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011232else
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 echo "$as_me:$LINENO: result: no" >&5
11234echo "${ECHO_T}no" >&6
11235fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011236
Guido van Rossume97ee181999-12-20 21:27:22 +000011237# the dlopen() function means we might want to use dynload_shlib.o. some
11238# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011239
Thomas Wouters3a584202000-08-05 23:28:51 +000011240for ac_func in dlopen
11241do
Martin v. Löwis11437992002-04-12 09:54:03 +000011242as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11243echo "$as_me:$LINENO: checking for $ac_func" >&5
11244echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11245if eval "test \"\${$as_ac_var+set}\" = set"; then
11246 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011247else
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 cat >conftest.$ac_ext <<_ACEOF
11249#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011250#include "confdefs.h"
11251/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011253#include <assert.h>
11254/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011255#ifdef __cplusplus
11256extern "C"
11257#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011258/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 builtin and then its argument prototype would still apply. */
11260char $ac_func ();
11261char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011262
Martin v. Löwis11437992002-04-12 09:54:03 +000011263#ifdef F77_DUMMY_MAIN
11264# ifdef __cplusplus
11265 extern "C"
11266# endif
11267 int F77_DUMMY_MAIN() { return 1; }
11268#endif
11269int
11270main ()
11271{
Guido van Rossume97ee181999-12-20 21:27:22 +000011272/* The GNU C library defines this for functions which it implements
11273 to always fail with ENOSYS. Some functions are actually named
11274 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011275#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011276choke me
11277#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011278f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011279#endif
11280
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 ;
11282 return 0;
11283}
11284_ACEOF
11285rm -f conftest.$ac_objext conftest$ac_exeext
11286if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11287 (eval $ac_link) 2>&5
11288 ac_status=$?
11289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11290 (exit $ac_status); } &&
11291 { ac_try='test -s conftest$ac_exeext'
11292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11293 (eval $ac_try) 2>&5
11294 ac_status=$?
11295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11296 (exit $ac_status); }; }; then
11297 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011298else
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 echo "$as_me: failed program was:" >&5
11300cat conftest.$ac_ext >&5
11301eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011302fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011303rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011304fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011305echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11306echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11307if test `eval echo '${'$as_ac_var'}'` = yes; then
11308 cat >>confdefs.h <<_ACEOF
11309#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11310_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011311
Guido van Rossume97ee181999-12-20 21:27:22 +000011312fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011313done
Guido van Rossume97ee181999-12-20 21:27:22 +000011314
Michael W. Hudson54241132001-12-07 15:38:26 +000011315
Guido van Rossume97ee181999-12-20 21:27:22 +000011316# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11317# loading of modules.
11318
Martin v. Löwis11437992002-04-12 09:54:03 +000011319echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11320echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011321if test -z "$DYNLOADFILE"
11322then
11323 case $ac_sys_system/$ac_sys_release in
11324 AIX*) DYNLOADFILE="dynload_aix.o";;
11325 BeOS*) DYNLOADFILE="dynload_beos.o";;
11326 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011327 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011328 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011329 *)
11330 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11331 # out any dynamic loading
11332 if test "$ac_cv_func_dlopen" = yes
11333 then DYNLOADFILE="dynload_shlib.o"
11334 else DYNLOADFILE="dynload_stub.o"
11335 fi
11336 ;;
11337 esac
11338fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011339echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11340echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011341if test "$DYNLOADFILE" != "dynload_stub.o"
11342then
Martin v. Löwis11437992002-04-12 09:54:03 +000011343
11344cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011345#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011346_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011347
11348fi
11349
Neil Schemenauer4e425612001-06-19 15:44:15 +000011350# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11351
Michael W. Hudson54241132001-12-07 15:38:26 +000011352
Martin v. Löwis11437992002-04-12 09:54:03 +000011353echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11354echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011355if test -z "$MACHDEP_OBJS"
11356then
Jack Jansene578a632001-08-15 01:27:14 +000011357 MACHDEP_OBJS=$extra_machdep_objs
11358else
11359 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011361echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11362echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011363
Guido van Rossum627b2d71993-12-24 10:39:16 +000011364# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011365
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
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011438
Fred Drake6b3cc522002-04-15 19:20:27 +000011439
Jack Jansen0b06be72002-06-21 14:48:38 +000011440
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011441
Martin v. Löwis244edc82001-10-04 22:44:26 +000011442for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011443 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011444 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011445 hstrerror inet_pton kill killpg lchown link lstat mkfifo mknod mktime \
11446 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011447 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011448 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011449 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011450 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011451 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011452 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011453do
Martin v. Löwis11437992002-04-12 09:54:03 +000011454as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11455echo "$as_me:$LINENO: checking for $ac_func" >&5
11456echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11457if eval "test \"\${$as_ac_var+set}\" = set"; then
11458 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011459else
Martin v. Löwis11437992002-04-12 09:54:03 +000011460 cat >conftest.$ac_ext <<_ACEOF
11461#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011462#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011463/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011465#include <assert.h>
11466/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011467#ifdef __cplusplus
11468extern "C"
11469#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011470/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011471 builtin and then its argument prototype would still apply. */
11472char $ac_func ();
11473char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011474
Martin v. Löwis11437992002-04-12 09:54:03 +000011475#ifdef F77_DUMMY_MAIN
11476# ifdef __cplusplus
11477 extern "C"
11478# endif
11479 int F77_DUMMY_MAIN() { return 1; }
11480#endif
11481int
11482main ()
11483{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011484/* The GNU C library defines this for functions which it implements
11485 to always fail with ENOSYS. Some functions are actually named
11486 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011487#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011488choke me
11489#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011490f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011491#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011492
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 ;
11494 return 0;
11495}
11496_ACEOF
11497rm -f conftest.$ac_objext conftest$ac_exeext
11498if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11499 (eval $ac_link) 2>&5
11500 ac_status=$?
11501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11502 (exit $ac_status); } &&
11503 { ac_try='test -s conftest$ac_exeext'
11504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11505 (eval $ac_try) 2>&5
11506 ac_status=$?
11507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11508 (exit $ac_status); }; }; then
11509 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011510else
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 echo "$as_me: failed program was:" >&5
11512cat conftest.$ac_ext >&5
11513eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011514fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011515rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011516fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011517echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11518echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11519if test `eval echo '${'$as_ac_var'}'` = yes; then
11520 cat >>confdefs.h <<_ACEOF
11521#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11522_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011523
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011524fi
11525done
11526
Michael W. Hudson54241132001-12-07 15:38:26 +000011527
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011528# check for openpty and forkpty
11529
Martin v. Löwis11437992002-04-12 09:54:03 +000011530
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011531for ac_func in openpty
11532do
Martin v. Löwis11437992002-04-12 09:54:03 +000011533as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11534echo "$as_me:$LINENO: checking for $ac_func" >&5
11535echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11536if eval "test \"\${$as_ac_var+set}\" = set"; then
11537 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011538else
Martin v. Löwis11437992002-04-12 09:54:03 +000011539 cat >conftest.$ac_ext <<_ACEOF
11540#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011541#include "confdefs.h"
11542/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011544#include <assert.h>
11545/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011546#ifdef __cplusplus
11547extern "C"
11548#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011549/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011550 builtin and then its argument prototype would still apply. */
11551char $ac_func ();
11552char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011553
Martin v. Löwis11437992002-04-12 09:54:03 +000011554#ifdef F77_DUMMY_MAIN
11555# ifdef __cplusplus
11556 extern "C"
11557# endif
11558 int F77_DUMMY_MAIN() { return 1; }
11559#endif
11560int
11561main ()
11562{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011563/* The GNU C library defines this for functions which it implements
11564 to always fail with ENOSYS. Some functions are actually named
11565 something starting with __ and the normal name is an alias. */
11566#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11567choke me
11568#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011569f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011570#endif
11571
Martin v. Löwis11437992002-04-12 09:54:03 +000011572 ;
11573 return 0;
11574}
11575_ACEOF
11576rm -f conftest.$ac_objext conftest$ac_exeext
11577if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11578 (eval $ac_link) 2>&5
11579 ac_status=$?
11580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11581 (exit $ac_status); } &&
11582 { ac_try='test -s conftest$ac_exeext'
11583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11584 (eval $ac_try) 2>&5
11585 ac_status=$?
11586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11587 (exit $ac_status); }; }; then
11588 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011589else
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 echo "$as_me: failed program was:" >&5
11591cat conftest.$ac_ext >&5
11592eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011593fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011594rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011595fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011596echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11597echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11598if test `eval echo '${'$as_ac_var'}'` = yes; then
11599 cat >>confdefs.h <<_ACEOF
11600#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11601_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011602
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011603else
Martin v. Löwis11437992002-04-12 09:54:03 +000011604 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11605echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11606if test "${ac_cv_lib_util_openpty+set}" = set; then
11607 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011608else
Martin v. Löwis11437992002-04-12 09:54:03 +000011609 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011610LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011611cat >conftest.$ac_ext <<_ACEOF
11612#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011613#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011614
Fred Drake8cef4cf2000-06-28 16:40:38 +000011615/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011616#ifdef __cplusplus
11617extern "C"
11618#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011619/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011620 builtin and then its argument prototype would still apply. */
11621char openpty ();
11622#ifdef F77_DUMMY_MAIN
11623# ifdef __cplusplus
11624 extern "C"
11625# endif
11626 int F77_DUMMY_MAIN() { return 1; }
11627#endif
11628int
11629main ()
11630{
11631openpty ();
11632 ;
11633 return 0;
11634}
11635_ACEOF
11636rm -f conftest.$ac_objext conftest$ac_exeext
11637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11638 (eval $ac_link) 2>&5
11639 ac_status=$?
11640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11641 (exit $ac_status); } &&
11642 { ac_try='test -s conftest$ac_exeext'
11643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11644 (eval $ac_try) 2>&5
11645 ac_status=$?
11646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11647 (exit $ac_status); }; }; then
11648 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011649else
Martin v. Löwis11437992002-04-12 09:54:03 +000011650 echo "$as_me: failed program was:" >&5
11651cat conftest.$ac_ext >&5
11652ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011653fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011654rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11655LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011656fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011657echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11658echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11659if test $ac_cv_lib_util_openpty = yes; then
11660 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011661#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011662_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011663 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011664fi
11665
11666fi
11667done
11668
Martin v. Löwis11437992002-04-12 09:54:03 +000011669
Fred Drake8cef4cf2000-06-28 16:40:38 +000011670for ac_func in forkpty
11671do
Martin v. Löwis11437992002-04-12 09:54:03 +000011672as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11673echo "$as_me:$LINENO: checking for $ac_func" >&5
11674echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11675if eval "test \"\${$as_ac_var+set}\" = set"; then
11676 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011677else
Martin v. Löwis11437992002-04-12 09:54:03 +000011678 cat >conftest.$ac_ext <<_ACEOF
11679#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011680#include "confdefs.h"
11681/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011682 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011683#include <assert.h>
11684/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011685#ifdef __cplusplus
11686extern "C"
11687#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011688/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 builtin and then its argument prototype would still apply. */
11690char $ac_func ();
11691char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011692
Martin v. Löwis11437992002-04-12 09:54:03 +000011693#ifdef F77_DUMMY_MAIN
11694# ifdef __cplusplus
11695 extern "C"
11696# endif
11697 int F77_DUMMY_MAIN() { return 1; }
11698#endif
11699int
11700main ()
11701{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011702/* The GNU C library defines this for functions which it implements
11703 to always fail with ENOSYS. Some functions are actually named
11704 something starting with __ and the normal name is an alias. */
11705#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11706choke me
11707#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011708f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011709#endif
11710
Martin v. Löwis11437992002-04-12 09:54:03 +000011711 ;
11712 return 0;
11713}
11714_ACEOF
11715rm -f conftest.$ac_objext conftest$ac_exeext
11716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11717 (eval $ac_link) 2>&5
11718 ac_status=$?
11719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11720 (exit $ac_status); } &&
11721 { ac_try='test -s conftest$ac_exeext'
11722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11723 (eval $ac_try) 2>&5
11724 ac_status=$?
11725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11726 (exit $ac_status); }; }; then
11727 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011728else
Martin v. Löwis11437992002-04-12 09:54:03 +000011729 echo "$as_me: failed program was:" >&5
11730cat conftest.$ac_ext >&5
11731eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011732fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011733rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011734fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011735echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11736echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11737if test `eval echo '${'$as_ac_var'}'` = yes; then
11738 cat >>confdefs.h <<_ACEOF
11739#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11740_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011741
Fred Drake8cef4cf2000-06-28 16:40:38 +000011742else
Martin v. Löwis11437992002-04-12 09:54:03 +000011743 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11744echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11745if test "${ac_cv_lib_util_forkpty+set}" = set; then
11746 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011747else
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011749LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011750cat >conftest.$ac_ext <<_ACEOF
11751#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011752#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011753
Fred Drake8cef4cf2000-06-28 16:40:38 +000011754/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011755#ifdef __cplusplus
11756extern "C"
11757#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011758/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011759 builtin and then its argument prototype would still apply. */
11760char forkpty ();
11761#ifdef F77_DUMMY_MAIN
11762# ifdef __cplusplus
11763 extern "C"
11764# endif
11765 int F77_DUMMY_MAIN() { return 1; }
11766#endif
11767int
11768main ()
11769{
11770forkpty ();
11771 ;
11772 return 0;
11773}
11774_ACEOF
11775rm -f conftest.$ac_objext conftest$ac_exeext
11776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11777 (eval $ac_link) 2>&5
11778 ac_status=$?
11779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11780 (exit $ac_status); } &&
11781 { ac_try='test -s conftest$ac_exeext'
11782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11783 (eval $ac_try) 2>&5
11784 ac_status=$?
11785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11786 (exit $ac_status); }; }; then
11787 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011788else
Martin v. Löwis11437992002-04-12 09:54:03 +000011789 echo "$as_me: failed program was:" >&5
11790cat conftest.$ac_ext >&5
11791ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011792fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011793rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11794LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011795fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011796echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11797echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11798if test $ac_cv_lib_util_forkpty = yes; then
11799 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011800#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011801_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011802 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011803fi
11804
11805fi
11806done
11807
Jack Jansendd19cf82001-12-06 22:36:17 +000011808
Michael W. Hudson54241132001-12-07 15:38:26 +000011809# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011810
11811
11812
11813
11814
11815
Fred Drake8cef4cf2000-06-28 16:40:38 +000011816for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11817do
Martin v. Löwis11437992002-04-12 09:54:03 +000011818as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11819echo "$as_me:$LINENO: checking for $ac_func" >&5
11820echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11821if eval "test \"\${$as_ac_var+set}\" = set"; then
11822 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011823else
Martin v. Löwis11437992002-04-12 09:54:03 +000011824 cat >conftest.$ac_ext <<_ACEOF
11825#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011826#include "confdefs.h"
11827/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011828 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011829#include <assert.h>
11830/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011831#ifdef __cplusplus
11832extern "C"
11833#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011834/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011835 builtin and then its argument prototype would still apply. */
11836char $ac_func ();
11837char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011838
Martin v. Löwis11437992002-04-12 09:54:03 +000011839#ifdef F77_DUMMY_MAIN
11840# ifdef __cplusplus
11841 extern "C"
11842# endif
11843 int F77_DUMMY_MAIN() { return 1; }
11844#endif
11845int
11846main ()
11847{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011848/* The GNU C library defines this for functions which it implements
11849 to always fail with ENOSYS. Some functions are actually named
11850 something starting with __ and the normal name is an alias. */
11851#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11852choke me
11853#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011854f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011855#endif
11856
Martin v. Löwis11437992002-04-12 09:54:03 +000011857 ;
11858 return 0;
11859}
11860_ACEOF
11861rm -f conftest.$ac_objext conftest$ac_exeext
11862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11863 (eval $ac_link) 2>&5
11864 ac_status=$?
11865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11866 (exit $ac_status); } &&
11867 { ac_try='test -s conftest$ac_exeext'
11868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11869 (eval $ac_try) 2>&5
11870 ac_status=$?
11871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11872 (exit $ac_status); }; }; then
11873 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011874else
Martin v. Löwis11437992002-04-12 09:54:03 +000011875 echo "$as_me: failed program was:" >&5
11876cat conftest.$ac_ext >&5
11877eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011878fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011879rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011880fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011881echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11882echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11883if test `eval echo '${'$as_ac_var'}'` = yes; then
11884 cat >>confdefs.h <<_ACEOF
11885#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11886_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011887
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011888fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011889done
11890
Michael W. Hudson54241132001-12-07 15:38:26 +000011891
Martin v. Löwis11437992002-04-12 09:54:03 +000011892
11893
11894
11895
11896
Martin v. Löwis1142de32002-03-29 16:28:31 +000011897for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011898do
Martin v. Löwis11437992002-04-12 09:54:03 +000011899as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11900echo "$as_me:$LINENO: checking for $ac_func" >&5
11901echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11902if eval "test \"\${$as_ac_var+set}\" = set"; then
11903 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011904else
Martin v. Löwis11437992002-04-12 09:54:03 +000011905 cat >conftest.$ac_ext <<_ACEOF
11906#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011907#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011908/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011909 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011910#include <assert.h>
11911/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011912#ifdef __cplusplus
11913extern "C"
11914#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011915/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011916 builtin and then its argument prototype would still apply. */
11917char $ac_func ();
11918char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011919
Martin v. Löwis11437992002-04-12 09:54:03 +000011920#ifdef F77_DUMMY_MAIN
11921# ifdef __cplusplus
11922 extern "C"
11923# endif
11924 int F77_DUMMY_MAIN() { return 1; }
11925#endif
11926int
11927main ()
11928{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011929/* The GNU C library defines this for functions which it implements
11930 to always fail with ENOSYS. Some functions are actually named
11931 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011932#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011933choke me
11934#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011935f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011936#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011937
Martin v. Löwis11437992002-04-12 09:54:03 +000011938 ;
11939 return 0;
11940}
11941_ACEOF
11942rm -f conftest.$ac_objext conftest$ac_exeext
11943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11944 (eval $ac_link) 2>&5
11945 ac_status=$?
11946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11947 (exit $ac_status); } &&
11948 { ac_try='test -s conftest$ac_exeext'
11949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11950 (eval $ac_try) 2>&5
11951 ac_status=$?
11952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11953 (exit $ac_status); }; }; then
11954 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011955else
Martin v. Löwis11437992002-04-12 09:54:03 +000011956 echo "$as_me: failed program was:" >&5
11957cat conftest.$ac_ext >&5
11958eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011959fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011960rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011961fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011962echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11963echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11964if test `eval echo '${'$as_ac_var'}'` = yes; then
11965 cat >>confdefs.h <<_ACEOF
11966#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11967_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011968
Martin v. Löwis1142de32002-03-29 16:28:31 +000011969else
Martin v. Löwis11437992002-04-12 09:54:03 +000011970 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011971fi
11972done
11973
11974
Martin v. Löwis11437992002-04-12 09:54:03 +000011975
Martin v. Löwis1142de32002-03-29 16:28:31 +000011976for ac_func in getpgrp
11977do
Martin v. Löwis11437992002-04-12 09:54:03 +000011978as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11979echo "$as_me:$LINENO: checking for $ac_func" >&5
11980echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11981if eval "test \"\${$as_ac_var+set}\" = set"; then
11982 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011983else
Martin v. Löwis11437992002-04-12 09:54:03 +000011984 cat >conftest.$ac_ext <<_ACEOF
11985#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011986#include "confdefs.h"
11987/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011988 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011989#include <assert.h>
11990/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011991#ifdef __cplusplus
11992extern "C"
11993#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011994/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011995 builtin and then its argument prototype would still apply. */
11996char $ac_func ();
11997char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011998
Martin v. Löwis11437992002-04-12 09:54:03 +000011999#ifdef F77_DUMMY_MAIN
12000# ifdef __cplusplus
12001 extern "C"
12002# endif
12003 int F77_DUMMY_MAIN() { return 1; }
12004#endif
12005int
12006main ()
12007{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012008/* The GNU C library defines this for functions which it implements
12009 to always fail with ENOSYS. Some functions are actually named
12010 something starting with __ and the normal name is an alias. */
12011#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12012choke me
12013#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012014f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012015#endif
12016
Martin v. Löwis11437992002-04-12 09:54:03 +000012017 ;
12018 return 0;
12019}
12020_ACEOF
12021rm -f conftest.$ac_objext conftest$ac_exeext
12022if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12023 (eval $ac_link) 2>&5
12024 ac_status=$?
12025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12026 (exit $ac_status); } &&
12027 { ac_try='test -s conftest$ac_exeext'
12028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12029 (eval $ac_try) 2>&5
12030 ac_status=$?
12031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12032 (exit $ac_status); }; }; then
12033 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012034else
Martin v. Löwis11437992002-04-12 09:54:03 +000012035 echo "$as_me: failed program was:" >&5
12036cat conftest.$ac_ext >&5
12037eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012038fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012039rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012041echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12042echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12043if test `eval echo '${'$as_ac_var'}'` = yes; then
12044 cat >>confdefs.h <<_ACEOF
12045#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12046_ACEOF
12047 cat >conftest.$ac_ext <<_ACEOF
12048#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012049#include "confdefs.h"
12050#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012051#ifdef F77_DUMMY_MAIN
12052# ifdef __cplusplus
12053 extern "C"
12054# endif
12055 int F77_DUMMY_MAIN() { return 1; }
12056#endif
12057int
12058main ()
12059{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012060getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012061 ;
12062 return 0;
12063}
12064_ACEOF
12065rm -f conftest.$ac_objext
12066if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12067 (eval $ac_compile) 2>&5
12068 ac_status=$?
12069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12070 (exit $ac_status); } &&
12071 { ac_try='test -s conftest.$ac_objext'
12072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12073 (eval $ac_try) 2>&5
12074 ac_status=$?
12075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12076 (exit $ac_status); }; }; then
12077
12078cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012079#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012080_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012081
Martin v. Löwis11437992002-04-12 09:54:03 +000012082
Guido van Rossumf78abae1997-01-21 22:02:36 +000012083else
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 echo "$as_me: failed program was:" >&5
12085cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012086fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012087rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012088
Guido van Rossum627b2d71993-12-24 10:39:16 +000012089fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012090done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012091
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012092echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12093echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12094if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012095 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012096else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012097 if test "$cross_compiling" = yes; then
12098 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12099echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12100 { (exit 1); exit 1; }; }
12101else
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 cat >conftest.$ac_ext <<_ACEOF
12103#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012104#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012105#if HAVE_UNISTD_H
12106# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012107#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012108
Martin v. Löwis11437992002-04-12 09:54:03 +000012109#ifdef F77_DUMMY_MAIN
12110# ifdef __cplusplus
12111 extern "C"
12112# endif
12113 int F77_DUMMY_MAIN() { return 1; }
12114#endif
12115int
12116main ()
12117{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012118/* If this system has a BSD-style setpgrp which takes arguments,
12119 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12120 exit successfully. */
12121 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012122 ;
12123 return 0;
12124}
12125_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012126rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012127if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12128 (eval $ac_link) 2>&5
12129 ac_status=$?
12130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012131 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12133 (eval $ac_try) 2>&5
12134 ac_status=$?
12135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12136 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012137 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012138else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012139 echo "$as_me: program exited with status $ac_status" >&5
12140echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012141cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012142( exit $ac_status )
12143ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012144fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012145rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012146fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012147fi
12148echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12149echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12150if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012151
12152cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012153#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012154_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012155
12156fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012157
Martin v. Löwis11437992002-04-12 09:54:03 +000012158
Thomas Wouters3a584202000-08-05 23:28:51 +000012159for ac_func in gettimeofday
12160do
Martin v. Löwis11437992002-04-12 09:54:03 +000012161as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12162echo "$as_me:$LINENO: checking for $ac_func" >&5
12163echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12164if eval "test \"\${$as_ac_var+set}\" = set"; then
12165 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166else
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 cat >conftest.$ac_ext <<_ACEOF
12168#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012169#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012170/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012172#include <assert.h>
12173/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012174#ifdef __cplusplus
12175extern "C"
12176#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012177/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012178 builtin and then its argument prototype would still apply. */
12179char $ac_func ();
12180char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012181
Martin v. Löwis11437992002-04-12 09:54:03 +000012182#ifdef F77_DUMMY_MAIN
12183# ifdef __cplusplus
12184 extern "C"
12185# endif
12186 int F77_DUMMY_MAIN() { return 1; }
12187#endif
12188int
12189main ()
12190{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012191/* The GNU C library defines this for functions which it implements
12192 to always fail with ENOSYS. Some functions are actually named
12193 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012194#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012195choke me
12196#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012197f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012198#endif
12199
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 ;
12201 return 0;
12202}
12203_ACEOF
12204rm -f conftest.$ac_objext conftest$ac_exeext
12205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12206 (eval $ac_link) 2>&5
12207 ac_status=$?
12208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12209 (exit $ac_status); } &&
12210 { ac_try='test -s conftest$ac_exeext'
12211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12212 (eval $ac_try) 2>&5
12213 ac_status=$?
12214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12215 (exit $ac_status); }; }; then
12216 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012217else
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 echo "$as_me: failed program was:" >&5
12219cat conftest.$ac_ext >&5
12220eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012222rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012223fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012224echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12225echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12226if test `eval echo '${'$as_ac_var'}'` = yes; then
12227 cat >>confdefs.h <<_ACEOF
12228#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12229_ACEOF
12230 cat >conftest.$ac_ext <<_ACEOF
12231#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012232#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012233#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012234#ifdef F77_DUMMY_MAIN
12235# ifdef __cplusplus
12236 extern "C"
12237# endif
12238 int F77_DUMMY_MAIN() { return 1; }
12239#endif
12240int
12241main ()
12242{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012243gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012244 ;
12245 return 0;
12246}
12247_ACEOF
12248rm -f conftest.$ac_objext
12249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12250 (eval $ac_compile) 2>&5
12251 ac_status=$?
12252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12253 (exit $ac_status); } &&
12254 { ac_try='test -s conftest.$ac_objext'
12255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12256 (eval $ac_try) 2>&5
12257 ac_status=$?
12258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12259 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012260 :
12261else
Martin v. Löwis11437992002-04-12 09:54:03 +000012262 echo "$as_me: failed program was:" >&5
12263cat conftest.$ac_ext >&5
12264
12265cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012266#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012267_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012268
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
Guido van Rossum627b2d71993-12-24 10:39:16 +000012270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012271rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012272
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012273fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012274done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012275
Michael W. Hudson54241132001-12-07 15:38:26 +000012276
12277
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012278# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012279# for [no]getaddrinfo in netdb.h.
12280echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12281echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12282cat >conftest.$ac_ext <<_ACEOF
12283#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012284#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012285
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012286#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012287#include <sys/socket.h>
12288#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012289#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012290
Martin v. Löwis11437992002-04-12 09:54:03 +000012291#ifdef F77_DUMMY_MAIN
12292# ifdef __cplusplus
12293 extern "C"
12294# endif
12295 int F77_DUMMY_MAIN() { return 1; }
12296#endif
12297int
12298main ()
12299{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012300
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012301getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012302
Martin v. Löwis11437992002-04-12 09:54:03 +000012303 ;
12304 return 0;
12305}
12306_ACEOF
12307rm -f conftest.$ac_objext conftest$ac_exeext
12308if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12309 (eval $ac_link) 2>&5
12310 ac_status=$?
12311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12312 (exit $ac_status); } &&
12313 { ac_try='test -s conftest$ac_exeext'
12314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12315 (eval $ac_try) 2>&5
12316 ac_status=$?
12317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12318 (exit $ac_status); }; }; then
12319
12320echo "$as_me:$LINENO: result: yes" >&5
12321echo "${ECHO_T}yes" >&6
12322echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12323echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012324if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 echo "$as_me:$LINENO: result: buggy" >&5
12326echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012327buggygetaddrinfo=yes
12328else
Martin v. Löwis11437992002-04-12 09:54:03 +000012329 cat >conftest.$ac_ext <<_ACEOF
12330#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012331#include "confdefs.h"
12332
12333#include <sys/types.h>
12334#include <netdb.h>
12335#include <string.h>
12336#include <sys/socket.h>
12337#include <netinet/in.h>
12338
12339main()
12340{
12341 int passive, gaierr, inet4 = 0, inet6 = 0;
12342 struct addrinfo hints, *ai, *aitop;
12343 char straddr[INET6_ADDRSTRLEN], strport[16];
12344
12345 for (passive = 0; passive <= 1; passive++) {
12346 memset(&hints, 0, sizeof(hints));
12347 hints.ai_family = AF_UNSPEC;
12348 hints.ai_flags = passive ? AI_PASSIVE : 0;
12349 hints.ai_socktype = SOCK_STREAM;
12350 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12351 (void)gai_strerror(gaierr);
12352 goto bad;
12353 }
12354 for (ai = aitop; ai; ai = ai->ai_next) {
12355 if (ai->ai_addr == NULL ||
12356 ai->ai_addrlen == 0 ||
12357 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12358 straddr, sizeof(straddr), strport, sizeof(strport),
12359 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12360 goto bad;
12361 }
12362 switch (ai->ai_family) {
12363 case AF_INET:
12364 if (strcmp(strport, "54321") != 0) {
12365 goto bad;
12366 }
12367 if (passive) {
12368 if (strcmp(straddr, "0.0.0.0") != 0) {
12369 goto bad;
12370 }
12371 } else {
12372 if (strcmp(straddr, "127.0.0.1") != 0) {
12373 goto bad;
12374 }
12375 }
12376 inet4++;
12377 break;
12378 case AF_INET6:
12379 if (strcmp(strport, "54321") != 0) {
12380 goto bad;
12381 }
12382 if (passive) {
12383 if (strcmp(straddr, "::") != 0) {
12384 goto bad;
12385 }
12386 } else {
12387 if (strcmp(straddr, "::1") != 0) {
12388 goto bad;
12389 }
12390 }
12391 inet6++;
12392 break;
12393 case AF_UNSPEC:
12394 goto bad;
12395 break;
12396 default:
12397 /* another family support? */
12398 break;
12399 }
12400 }
12401 }
12402
12403 if (!(inet4 == 0 || inet4 == 2))
12404 goto bad;
12405 if (!(inet6 == 0 || inet6 == 2))
12406 goto bad;
12407
12408 if (aitop)
12409 freeaddrinfo(aitop);
12410 exit(0);
12411
12412 bad:
12413 if (aitop)
12414 freeaddrinfo(aitop);
12415 exit(1);
12416}
12417
Martin v. Löwis11437992002-04-12 09:54:03 +000012418_ACEOF
12419rm -f conftest$ac_exeext
12420if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12421 (eval $ac_link) 2>&5
12422 ac_status=$?
12423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12424 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12426 (eval $ac_try) 2>&5
12427 ac_status=$?
12428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12429 (exit $ac_status); }; }; then
12430 echo "$as_me:$LINENO: result: good" >&5
12431echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012432buggygetaddrinfo=no
12433else
Martin v. Löwis11437992002-04-12 09:54:03 +000012434 echo "$as_me: program exited with status $ac_status" >&5
12435echo "$as_me: failed program was:" >&5
12436cat conftest.$ac_ext >&5
12437( exit $ac_status )
12438echo "$as_me:$LINENO: result: buggy" >&5
12439echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012440buggygetaddrinfo=yes
12441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012442rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012443fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012444else
Martin v. Löwis11437992002-04-12 09:54:03 +000012445 echo "$as_me: failed program was:" >&5
12446cat conftest.$ac_ext >&5
12447
12448echo "$as_me:$LINENO: result: no" >&5
12449echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012450buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012451
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012452fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012453rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012454
12455if test "$buggygetaddrinfo" = "yes"; then
12456 if test "$ipv6" = "yes"; then
12457 echo 'Fatal: You must get working getaddrinfo() function.'
12458 echo ' or you can specify "--disable-ipv6"'.
12459 exit 1
12460 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012461else
Martin v. Löwis11437992002-04-12 09:54:03 +000012462
12463cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012464#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012465_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012466
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012468
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012469for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012470do
Martin v. Löwis11437992002-04-12 09:54:03 +000012471as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12472echo "$as_me:$LINENO: checking for $ac_func" >&5
12473echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12474if eval "test \"\${$as_ac_var+set}\" = set"; then
12475 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012476else
Martin v. Löwis11437992002-04-12 09:54:03 +000012477 cat >conftest.$ac_ext <<_ACEOF
12478#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012479#include "confdefs.h"
12480/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012481 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012482#include <assert.h>
12483/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012484#ifdef __cplusplus
12485extern "C"
12486#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012487/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012488 builtin and then its argument prototype would still apply. */
12489char $ac_func ();
12490char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012491
Martin v. Löwis11437992002-04-12 09:54:03 +000012492#ifdef F77_DUMMY_MAIN
12493# ifdef __cplusplus
12494 extern "C"
12495# endif
12496 int F77_DUMMY_MAIN() { return 1; }
12497#endif
12498int
12499main ()
12500{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012501/* The GNU C library defines this for functions which it implements
12502 to always fail with ENOSYS. Some functions are actually named
12503 something starting with __ and the normal name is an alias. */
12504#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12505choke me
12506#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012507f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012508#endif
12509
Martin v. Löwis11437992002-04-12 09:54:03 +000012510 ;
12511 return 0;
12512}
12513_ACEOF
12514rm -f conftest.$ac_objext conftest$ac_exeext
12515if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12516 (eval $ac_link) 2>&5
12517 ac_status=$?
12518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12519 (exit $ac_status); } &&
12520 { ac_try='test -s conftest$ac_exeext'
12521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12522 (eval $ac_try) 2>&5
12523 ac_status=$?
12524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12525 (exit $ac_status); }; }; then
12526 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012527else
Martin v. Löwis11437992002-04-12 09:54:03 +000012528 echo "$as_me: failed program was:" >&5
12529cat conftest.$ac_ext >&5
12530eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012531fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012532rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012533fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012534echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12535echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12536if test `eval echo '${'$as_ac_var'}'` = yes; then
12537 cat >>confdefs.h <<_ACEOF
12538#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12539_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012540
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012541fi
12542done
12543
Michael W. Hudson54241132001-12-07 15:38:26 +000012544
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012545# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012546echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12547echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12548if test "${ac_cv_header_time+set}" = set; then
12549 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012550else
Martin v. Löwis11437992002-04-12 09:54:03 +000012551 cat >conftest.$ac_ext <<_ACEOF
12552#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012553#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012554#include <sys/types.h>
12555#include <sys/time.h>
12556#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012557
12558#ifdef F77_DUMMY_MAIN
12559# ifdef __cplusplus
12560 extern "C"
12561# endif
12562 int F77_DUMMY_MAIN() { return 1; }
12563#endif
12564int
12565main ()
12566{
12567if ((struct tm *) 0)
12568return 0;
12569 ;
12570 return 0;
12571}
12572_ACEOF
12573rm -f conftest.$ac_objext
12574if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12575 (eval $ac_compile) 2>&5
12576 ac_status=$?
12577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12578 (exit $ac_status); } &&
12579 { ac_try='test -s conftest.$ac_objext'
12580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12581 (eval $ac_try) 2>&5
12582 ac_status=$?
12583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12584 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012585 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012586else
Martin v. Löwis11437992002-04-12 09:54:03 +000012587 echo "$as_me: failed program was:" >&5
12588cat conftest.$ac_ext >&5
12589ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012590fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012591rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012593echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12594echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012595if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012596
12597cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012598#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012599_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012600
12601fi
12602
Martin v. Löwis11437992002-04-12 09:54:03 +000012603echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12604echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12605if test "${ac_cv_struct_tm+set}" = set; then
12606 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607else
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 cat >conftest.$ac_ext <<_ACEOF
12609#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012610#include "confdefs.h"
12611#include <sys/types.h>
12612#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012613
12614#ifdef F77_DUMMY_MAIN
12615# ifdef __cplusplus
12616 extern "C"
12617# endif
12618 int F77_DUMMY_MAIN() { return 1; }
12619#endif
12620int
12621main ()
12622{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012623struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012624 ;
12625 return 0;
12626}
12627_ACEOF
12628rm -f conftest.$ac_objext
12629if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12630 (eval $ac_compile) 2>&5
12631 ac_status=$?
12632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633 (exit $ac_status); } &&
12634 { ac_try='test -s conftest.$ac_objext'
12635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12636 (eval $ac_try) 2>&5
12637 ac_status=$?
12638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12639 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012640 ac_cv_struct_tm=time.h
12641else
Martin v. Löwis11437992002-04-12 09:54:03 +000012642 echo "$as_me: failed program was:" >&5
12643cat conftest.$ac_ext >&5
12644ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012645fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012646rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012647fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012648echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12649echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012650if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012651
12652cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012653#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012654_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012655
12656fi
12657
Martin v. Löwis11437992002-04-12 09:54:03 +000012658echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12659echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12660if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12661 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012662else
Martin v. Löwis11437992002-04-12 09:54:03 +000012663 cat >conftest.$ac_ext <<_ACEOF
12664#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012665#include "confdefs.h"
12666#include <sys/types.h>
12667#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012668
12669
12670#ifdef F77_DUMMY_MAIN
12671# ifdef __cplusplus
12672 extern "C"
12673# endif
12674 int F77_DUMMY_MAIN() { return 1; }
12675#endif
12676int
12677main ()
12678{
12679static struct tm ac_aggr;
12680if (ac_aggr.tm_zone)
12681return 0;
12682 ;
12683 return 0;
12684}
12685_ACEOF
12686rm -f conftest.$ac_objext
12687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12688 (eval $ac_compile) 2>&5
12689 ac_status=$?
12690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12691 (exit $ac_status); } &&
12692 { ac_try='test -s conftest.$ac_objext'
12693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12694 (eval $ac_try) 2>&5
12695 ac_status=$?
12696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12697 (exit $ac_status); }; }; then
12698 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012699else
Martin v. Löwis11437992002-04-12 09:54:03 +000012700 echo "$as_me: failed program was:" >&5
12701cat conftest.$ac_ext >&5
12702ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012703fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012704rm -f conftest.$ac_objext conftest.$ac_ext
12705fi
12706echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12707echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12708if test $ac_cv_member_struct_tm_tm_zone = yes; then
12709
12710cat >>confdefs.h <<_ACEOF
12711#define HAVE_STRUCT_TM_TM_ZONE 1
12712_ACEOF
12713
12714
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012715fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012716
Martin v. Löwis11437992002-04-12 09:54:03 +000012717if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12718
12719cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012720#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012721_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012722
12723else
Martin v. Löwis11437992002-04-12 09:54:03 +000012724 echo "$as_me:$LINENO: checking for tzname" >&5
12725echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12726if test "${ac_cv_var_tzname+set}" = set; then
12727 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012728else
Martin v. Löwis11437992002-04-12 09:54:03 +000012729 cat >conftest.$ac_ext <<_ACEOF
12730#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012731#include "confdefs.h"
12732#include <time.h>
12733#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012734extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012735#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012736
12737#ifdef F77_DUMMY_MAIN
12738# ifdef __cplusplus
12739 extern "C"
12740# endif
12741 int F77_DUMMY_MAIN() { return 1; }
12742#endif
12743int
12744main ()
12745{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012746atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ;
12748 return 0;
12749}
12750_ACEOF
12751rm -f conftest.$ac_objext conftest$ac_exeext
12752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12753 (eval $ac_link) 2>&5
12754 ac_status=$?
12755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12756 (exit $ac_status); } &&
12757 { ac_try='test -s conftest$ac_exeext'
12758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12759 (eval $ac_try) 2>&5
12760 ac_status=$?
12761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12762 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012763 ac_cv_var_tzname=yes
12764else
Martin v. Löwis11437992002-04-12 09:54:03 +000012765 echo "$as_me: failed program was:" >&5
12766cat conftest.$ac_ext >&5
12767ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012768fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012769rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012770fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012771echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12772echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012773 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012774
12775cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012776#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012777_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012778
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012779 fi
12780fi
12781
Jack Jansendd19cf82001-12-06 22:36:17 +000012782
Martin v. Löwis11437992002-04-12 09:54:03 +000012783echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12784echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12785if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12786 echo $ECHO_N "(cached) $ECHO_C" >&6
12787else
12788 cat >conftest.$ac_ext <<_ACEOF
12789#line $LINENO "configure"
12790#include "confdefs.h"
12791$ac_includes_default
12792#ifdef F77_DUMMY_MAIN
12793# ifdef __cplusplus
12794 extern "C"
12795# endif
12796 int F77_DUMMY_MAIN() { return 1; }
12797#endif
12798int
12799main ()
12800{
12801static struct stat ac_aggr;
12802if (ac_aggr.st_rdev)
12803return 0;
12804 ;
12805 return 0;
12806}
12807_ACEOF
12808rm -f conftest.$ac_objext
12809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12810 (eval $ac_compile) 2>&5
12811 ac_status=$?
12812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12813 (exit $ac_status); } &&
12814 { ac_try='test -s conftest.$ac_objext'
12815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12816 (eval $ac_try) 2>&5
12817 ac_status=$?
12818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12819 (exit $ac_status); }; }; then
12820 ac_cv_member_struct_stat_st_rdev=yes
12821else
12822 echo "$as_me: failed program was:" >&5
12823cat conftest.$ac_ext >&5
12824ac_cv_member_struct_stat_st_rdev=no
12825fi
12826rm -f conftest.$ac_objext conftest.$ac_ext
12827fi
12828echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12829echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12830if test $ac_cv_member_struct_stat_st_rdev = yes; then
12831
12832cat >>confdefs.h <<_ACEOF
12833#define HAVE_STRUCT_STAT_ST_RDEV 1
12834_ACEOF
12835
12836
12837cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012838#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012839_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012840
12841fi
12842
Martin v. Löwis11437992002-04-12 09:54:03 +000012843
12844
12845echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12846echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12847if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012849else
Martin v. Löwis11437992002-04-12 09:54:03 +000012850 cat >conftest.$ac_ext <<_ACEOF
12851#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012852#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012853$ac_includes_default
12854#ifdef F77_DUMMY_MAIN
12855# ifdef __cplusplus
12856 extern "C"
12857# endif
12858 int F77_DUMMY_MAIN() { return 1; }
12859#endif
12860int
12861main ()
12862{
12863static struct stat ac_aggr;
12864if (ac_aggr.st_blksize)
12865return 0;
12866 ;
12867 return 0;
12868}
12869_ACEOF
12870rm -f conftest.$ac_objext
12871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12872 (eval $ac_compile) 2>&5
12873 ac_status=$?
12874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12875 (exit $ac_status); } &&
12876 { ac_try='test -s conftest.$ac_objext'
12877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12878 (eval $ac_try) 2>&5
12879 ac_status=$?
12880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12881 (exit $ac_status); }; }; then
12882 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012883else
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 echo "$as_me: failed program was:" >&5
12885cat conftest.$ac_ext >&5
12886ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012887fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012888rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012889fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012890echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12891echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12892if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012893
Martin v. Löwis11437992002-04-12 09:54:03 +000012894cat >>confdefs.h <<_ACEOF
12895#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12896_ACEOF
12897
12898
12899cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012900#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012901_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012902
12903fi
12904
Martin v. Löwis11437992002-04-12 09:54:03 +000012905
12906echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12907echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12908if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12909 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012910else
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 cat >conftest.$ac_ext <<_ACEOF
12912#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012913#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012914$ac_includes_default
12915#ifdef F77_DUMMY_MAIN
12916# ifdef __cplusplus
12917 extern "C"
12918# endif
12919 int F77_DUMMY_MAIN() { return 1; }
12920#endif
12921int
12922main ()
12923{
12924static struct stat ac_aggr;
12925if (ac_aggr.st_blocks)
12926return 0;
12927 ;
12928 return 0;
12929}
12930_ACEOF
12931rm -f conftest.$ac_objext
12932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12933 (eval $ac_compile) 2>&5
12934 ac_status=$?
12935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12936 (exit $ac_status); } &&
12937 { ac_try='test -s conftest.$ac_objext'
12938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12939 (eval $ac_try) 2>&5
12940 ac_status=$?
12941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12942 (exit $ac_status); }; }; then
12943 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012944else
Martin v. Löwis11437992002-04-12 09:54:03 +000012945 echo "$as_me: failed program was:" >&5
12946cat conftest.$ac_ext >&5
12947ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012948fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012949rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012950fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012951echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12952echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12953if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012954
Martin v. Löwis11437992002-04-12 09:54:03 +000012955cat >>confdefs.h <<_ACEOF
12956#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12957_ACEOF
12958
12959
12960cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012961#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012962_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012963
12964else
Martin v. Löwis11437992002-04-12 09:54:03 +000012965 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012966fi
12967
Michael W. Hudson54241132001-12-07 15:38:26 +000012968
Martin v. Löwis11437992002-04-12 09:54:03 +000012969
12970echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12971echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12972if test "${ac_cv_header_time_altzone+set}" = set; then
12973 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012974else
Martin v. Löwis11437992002-04-12 09:54:03 +000012975 cat >conftest.$ac_ext <<_ACEOF
12976#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012977#include "confdefs.h"
12978#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012979#ifdef F77_DUMMY_MAIN
12980# ifdef __cplusplus
12981 extern "C"
12982# endif
12983 int F77_DUMMY_MAIN() { return 1; }
12984#endif
12985int
12986main ()
12987{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012988return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 ;
12990 return 0;
12991}
12992_ACEOF
12993rm -f conftest.$ac_objext
12994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12995 (eval $ac_compile) 2>&5
12996 ac_status=$?
12997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12998 (exit $ac_status); } &&
12999 { ac_try='test -s conftest.$ac_objext'
13000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13001 (eval $ac_try) 2>&5
13002 ac_status=$?
13003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13004 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013005 ac_cv_header_time_altzone=yes
13006else
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 echo "$as_me: failed program was:" >&5
13008cat conftest.$ac_ext >&5
13009ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013010fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013011rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013012fi
13013
Martin v. Löwis11437992002-04-12 09:54:03 +000013014echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13015echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013016if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013017
13018cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013019#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013020_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013021
13022fi
13023
Guido van Rossumda88dad1995-01-26 00:46:29 +000013024was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013025echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13026echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13027cat >conftest.$ac_ext <<_ACEOF
13028#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013029#include "confdefs.h"
13030
13031#include <sys/types.h>
13032#include <sys/select.h>
13033#include <sys/time.h>
13034
Martin v. Löwis11437992002-04-12 09:54:03 +000013035#ifdef F77_DUMMY_MAIN
13036# ifdef __cplusplus
13037 extern "C"
13038# endif
13039 int F77_DUMMY_MAIN() { return 1; }
13040#endif
13041int
13042main ()
13043{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013044;
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 ;
13046 return 0;
13047}
13048_ACEOF
13049rm -f conftest.$ac_objext
13050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13051 (eval $ac_compile) 2>&5
13052 ac_status=$?
13053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13054 (exit $ac_status); } &&
13055 { ac_try='test -s conftest.$ac_objext'
13056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13057 (eval $ac_try) 2>&5
13058 ac_status=$?
13059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13060 (exit $ac_status); }; }; then
13061
13062
13063cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013064#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013065_ACEOF
13066
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013067 was_it_defined=yes
13068
Guido van Rossumf78abae1997-01-21 22:02:36 +000013069else
Martin v. Löwis11437992002-04-12 09:54:03 +000013070 echo "$as_me: failed program was:" >&5
13071cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013072fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013073rm -f conftest.$ac_objext conftest.$ac_ext
13074echo "$as_me:$LINENO: result: $was_it_defined" >&5
13075echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013076
Martin v. Löwis11437992002-04-12 09:54:03 +000013077echo "$as_me:$LINENO: checking for addrinfo" >&5
13078echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13079if test "${ac_cv_struct_addrinfo+set}" = set; then
13080 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013081else
Martin v. Löwis11437992002-04-12 09:54:03 +000013082 cat >conftest.$ac_ext <<_ACEOF
13083#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013084#include "confdefs.h"
13085
13086# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013087#ifdef F77_DUMMY_MAIN
13088# ifdef __cplusplus
13089 extern "C"
13090# endif
13091 int F77_DUMMY_MAIN() { return 1; }
13092#endif
13093int
13094main ()
13095{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013096struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013097 ;
13098 return 0;
13099}
13100_ACEOF
13101rm -f conftest.$ac_objext
13102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13103 (eval $ac_compile) 2>&5
13104 ac_status=$?
13105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13106 (exit $ac_status); } &&
13107 { ac_try='test -s conftest.$ac_objext'
13108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13109 (eval $ac_try) 2>&5
13110 ac_status=$?
13111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13112 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013113 ac_cv_struct_addrinfo=yes
13114else
Martin v. Löwis11437992002-04-12 09:54:03 +000013115 echo "$as_me: failed program was:" >&5
13116cat conftest.$ac_ext >&5
13117ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013119rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013120fi
13121
Martin v. Löwis11437992002-04-12 09:54:03 +000013122echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13123echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013124if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013125
13126cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013127#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013128_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013129
13130fi
13131
Martin v. Löwis11437992002-04-12 09:54:03 +000013132echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13133echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13134if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13135 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013136else
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 cat >conftest.$ac_ext <<_ACEOF
13138#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013139#include "confdefs.h"
13140
13141# include <sys/types.h>
13142# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013143#ifdef F77_DUMMY_MAIN
13144# ifdef __cplusplus
13145 extern "C"
13146# endif
13147 int F77_DUMMY_MAIN() { return 1; }
13148#endif
13149int
13150main ()
13151{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013152struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 ;
13154 return 0;
13155}
13156_ACEOF
13157rm -f conftest.$ac_objext
13158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13159 (eval $ac_compile) 2>&5
13160 ac_status=$?
13161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13162 (exit $ac_status); } &&
13163 { ac_try='test -s conftest.$ac_objext'
13164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13165 (eval $ac_try) 2>&5
13166 ac_status=$?
13167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13168 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013169 ac_cv_struct_sockaddr_storage=yes
13170else
Martin v. Löwis11437992002-04-12 09:54:03 +000013171 echo "$as_me: failed program was:" >&5
13172cat conftest.$ac_ext >&5
13173ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013175rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013176fi
13177
Martin v. Löwis11437992002-04-12 09:54:03 +000013178echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13179echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013180if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013181
13182cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013183#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013184_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013185
13186fi
13187
Guido van Rossum627b2d71993-12-24 10:39:16 +000013188# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013189
Michael W. Hudson54241132001-12-07 15:38:26 +000013190
Martin v. Löwis11437992002-04-12 09:54:03 +000013191echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13192echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13193if test "${ac_cv_c_char_unsigned+set}" = set; then
13194 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013195else
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 cat >conftest.$ac_ext <<_ACEOF
13197#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013198#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013199$ac_includes_default
13200#ifdef F77_DUMMY_MAIN
13201# ifdef __cplusplus
13202 extern "C"
13203# endif
13204 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013206int
13207main ()
13208{
13209static int test_array [1 - 2 * !(((char) -1) < 0)];
13210test_array [0] = 0
13211
13212 ;
13213 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013214}
Martin v. Löwis11437992002-04-12 09:54:03 +000013215_ACEOF
13216rm -f conftest.$ac_objext
13217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13218 (eval $ac_compile) 2>&5
13219 ac_status=$?
13220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13221 (exit $ac_status); } &&
13222 { ac_try='test -s conftest.$ac_objext'
13223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13224 (eval $ac_try) 2>&5
13225 ac_status=$?
13226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13227 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013228 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013229else
13230 echo "$as_me: failed program was:" >&5
13231cat conftest.$ac_ext >&5
13232ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013233fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013234rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013235fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013236echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13237echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013238if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013239 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013240#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013241_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013242
13243fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013244
Martin v. Löwis11437992002-04-12 09:54:03 +000013245echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13246echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13247if test "${ac_cv_prog_cc_stdc+set}" = set; then
13248 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013249else
Martin v. Löwis11437992002-04-12 09:54:03 +000013250 ac_cv_prog_cc_stdc=no
13251ac_save_CC=$CC
13252cat >conftest.$ac_ext <<_ACEOF
13253#line $LINENO "configure"
13254#include "confdefs.h"
13255#include <stdarg.h>
13256#include <stdio.h>
13257#include <sys/types.h>
13258#include <sys/stat.h>
13259/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13260struct buf { int x; };
13261FILE * (*rcsopen) (struct buf *, struct stat *, int);
13262static char *e (p, i)
13263 char **p;
13264 int i;
13265{
13266 return p[i];
13267}
13268static char *f (char * (*g) (char **, int), char **p, ...)
13269{
13270 char *s;
13271 va_list v;
13272 va_start (v,p);
13273 s = g (p, va_arg (v,int));
13274 va_end (v);
13275 return s;
13276}
13277int test (int i, double x);
13278struct s1 {int (*f) (int a);};
13279struct s2 {int (*f) (double a);};
13280int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13281int argc;
13282char **argv;
13283#ifdef F77_DUMMY_MAIN
13284# ifdef __cplusplus
13285 extern "C"
13286# endif
13287 int F77_DUMMY_MAIN() { return 1; }
13288#endif
13289int
13290main ()
13291{
13292return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13293 ;
13294 return 0;
13295}
13296_ACEOF
13297# Don't try gcc -ansi; that turns off useful extensions and
13298# breaks some systems' header files.
13299# AIX -qlanglvl=ansi
13300# Ultrix and OSF/1 -std1
13301# HP-UX 10.20 and later -Ae
13302# HP-UX older versions -Aa -D_HPUX_SOURCE
13303# SVR4 -Xc -D__EXTENSIONS__
13304for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13305do
13306 CC="$ac_save_CC $ac_arg"
13307 rm -f conftest.$ac_objext
13308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13309 (eval $ac_compile) 2>&5
13310 ac_status=$?
13311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13312 (exit $ac_status); } &&
13313 { ac_try='test -s conftest.$ac_objext'
13314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13315 (eval $ac_try) 2>&5
13316 ac_status=$?
13317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13318 (exit $ac_status); }; }; then
13319 ac_cv_prog_cc_stdc=$ac_arg
13320break
13321else
13322 echo "$as_me: failed program was:" >&5
13323cat conftest.$ac_ext >&5
13324fi
13325rm -f conftest.$ac_objext
13326done
13327rm -f conftest.$ac_ext conftest.$ac_objext
13328CC=$ac_save_CC
13329
13330fi
13331
13332case "x$ac_cv_prog_cc_stdc" in
13333 x|xno)
13334 echo "$as_me:$LINENO: result: none needed" >&5
13335echo "${ECHO_T}none needed" >&6 ;;
13336 *)
13337 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13338echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13339 CC="$CC $ac_cv_prog_cc_stdc" ;;
13340esac
13341
13342echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13343echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13344if test "${ac_cv_c_const+set}" = set; then
13345 echo $ECHO_N "(cached) $ECHO_C" >&6
13346else
13347 cat >conftest.$ac_ext <<_ACEOF
13348#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349#include "confdefs.h"
13350
Martin v. Löwis11437992002-04-12 09:54:03 +000013351#ifdef F77_DUMMY_MAIN
13352# ifdef __cplusplus
13353 extern "C"
13354# endif
13355 int F77_DUMMY_MAIN() { return 1; }
13356#endif
13357int
13358main ()
13359{
13360/* FIXME: Include the comments suggested by Paul. */
13361#ifndef __cplusplus
13362 /* Ultrix mips cc rejects this. */
13363 typedef int charset[2];
13364 const charset x;
13365 /* SunOS 4.1.1 cc rejects this. */
13366 char const *const *ccp;
13367 char **p;
13368 /* NEC SVR4.0.2 mips cc rejects this. */
13369 struct point {int x, y;};
13370 static struct point const zero = {0,0};
13371 /* AIX XL C 1.02.0.0 rejects this.
13372 It does not let you subtract one const X* pointer from another in
13373 an arm of an if-expression whose if-part is not a constant
13374 expression */
13375 const char *g = "string";
13376 ccp = &g + (g ? g-g : 0);
13377 /* HPUX 7.0 cc rejects these. */
13378 ++ccp;
13379 p = (char**) ccp;
13380 ccp = (char const *const *) p;
13381 { /* SCO 3.2v4 cc rejects this. */
13382 char *t;
13383 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013384
Martin v. Löwis11437992002-04-12 09:54:03 +000013385 *t++ = 0;
13386 }
13387 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13388 int x[] = {25, 17};
13389 const int *foo = &x[0];
13390 ++foo;
13391 }
13392 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13393 typedef const int *iptr;
13394 iptr p = 0;
13395 ++p;
13396 }
13397 { /* AIX XL C 1.02.0.0 rejects this saying
13398 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13399 struct s { int j; const int *ap[3]; };
13400 struct s *b; b->j = 5;
13401 }
13402 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13403 const int foo = 10;
13404 }
13405#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407 ;
13408 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013409}
Martin v. Löwis11437992002-04-12 09:54:03 +000013410_ACEOF
13411rm -f conftest.$ac_objext
13412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13413 (eval $ac_compile) 2>&5
13414 ac_status=$?
13415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13416 (exit $ac_status); } &&
13417 { ac_try='test -s conftest.$ac_objext'
13418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13419 (eval $ac_try) 2>&5
13420 ac_status=$?
13421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13422 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013423 ac_cv_c_const=yes
13424else
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 echo "$as_me: failed program was:" >&5
13426cat conftest.$ac_ext >&5
13427ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013428fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013429rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013431echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13432echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013433if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013434
13435cat >>confdefs.h <<\_ACEOF
13436#define const
13437_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013438
13439fi
13440
Michael W. Hudson54241132001-12-07 15:38:26 +000013441
Guido van Rossumda88dad1995-01-26 00:46:29 +000013442works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013443echo "$as_me:$LINENO: checking for working volatile" >&5
13444echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13445cat >conftest.$ac_ext <<_ACEOF
13446#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013447#include "confdefs.h"
13448
Martin v. Löwis11437992002-04-12 09:54:03 +000013449#ifdef F77_DUMMY_MAIN
13450# ifdef __cplusplus
13451 extern "C"
13452# endif
13453 int F77_DUMMY_MAIN() { return 1; }
13454#endif
13455int
13456main ()
13457{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013458volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013459 ;
13460 return 0;
13461}
13462_ACEOF
13463rm -f conftest.$ac_objext
13464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13465 (eval $ac_compile) 2>&5
13466 ac_status=$?
13467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13468 (exit $ac_status); } &&
13469 { ac_try='test -s conftest.$ac_objext'
13470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13471 (eval $ac_try) 2>&5
13472 ac_status=$?
13473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13474 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013475 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013476else
Martin v. Löwis11437992002-04-12 09:54:03 +000013477 echo "$as_me: failed program was:" >&5
13478cat conftest.$ac_ext >&5
13479
13480cat >>confdefs.h <<\_ACEOF
13481#define volatile
13482_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013483
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013484
Guido van Rossum627b2d71993-12-24 10:39:16 +000013485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013486rm -f conftest.$ac_objext conftest.$ac_ext
13487echo "$as_me:$LINENO: result: $works" >&5
13488echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013489
Guido van Rossumda88dad1995-01-26 00:46:29 +000013490works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013491echo "$as_me:$LINENO: checking for working signed char" >&5
13492echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13493cat >conftest.$ac_ext <<_ACEOF
13494#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013495#include "confdefs.h"
13496
Martin v. Löwis11437992002-04-12 09:54:03 +000013497#ifdef F77_DUMMY_MAIN
13498# ifdef __cplusplus
13499 extern "C"
13500# endif
13501 int F77_DUMMY_MAIN() { return 1; }
13502#endif
13503int
13504main ()
13505{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013506signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013507 ;
13508 return 0;
13509}
13510_ACEOF
13511rm -f conftest.$ac_objext
13512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13513 (eval $ac_compile) 2>&5
13514 ac_status=$?
13515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13516 (exit $ac_status); } &&
13517 { ac_try='test -s conftest.$ac_objext'
13518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13519 (eval $ac_try) 2>&5
13520 ac_status=$?
13521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13522 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013523 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013524else
Martin v. Löwis11437992002-04-12 09:54:03 +000013525 echo "$as_me: failed program was:" >&5
13526cat conftest.$ac_ext >&5
13527
13528cat >>confdefs.h <<\_ACEOF
13529#define signed
13530_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013531
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013532
Guido van Rossum7f43da71994-08-01 12:15:30 +000013533fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013534rm -f conftest.$ac_objext conftest.$ac_ext
13535echo "$as_me:$LINENO: result: $works" >&5
13536echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013537
Guido van Rossumda88dad1995-01-26 00:46:29 +000013538have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013539echo "$as_me:$LINENO: checking for prototypes" >&5
13540echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13541cat >conftest.$ac_ext <<_ACEOF
13542#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013543#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013544int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013545#ifdef F77_DUMMY_MAIN
13546# ifdef __cplusplus
13547 extern "C"
13548# endif
13549 int F77_DUMMY_MAIN() { return 1; }
13550#endif
13551int
13552main ()
13553{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013554return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013555 ;
13556 return 0;
13557}
13558_ACEOF
13559rm -f conftest.$ac_objext
13560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13561 (eval $ac_compile) 2>&5
13562 ac_status=$?
13563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13564 (exit $ac_status); } &&
13565 { ac_try='test -s conftest.$ac_objext'
13566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13567 (eval $ac_try) 2>&5
13568 ac_status=$?
13569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13570 (exit $ac_status); }; }; then
13571
13572
13573cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013574#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013575_ACEOF
13576
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013577 have_prototypes=yes
13578
Guido van Rossumf78abae1997-01-21 22:02:36 +000013579else
Martin v. Löwis11437992002-04-12 09:54:03 +000013580 echo "$as_me: failed program was:" >&5
13581cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013582fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013583rm -f conftest.$ac_objext conftest.$ac_ext
13584echo "$as_me:$LINENO: result: $have_prototypes" >&5
13585echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013586
Guido van Rossumda88dad1995-01-26 00:46:29 +000013587works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013588echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13589echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13590cat >conftest.$ac_ext <<_ACEOF
13591#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013592#include "confdefs.h"
13593
13594#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013595int foo(int x, ...) {
13596 va_list va;
13597 va_start(va, x);
13598 va_arg(va, int);
13599 va_arg(va, char *);
13600 va_arg(va, double);
13601 return 0;
13602}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013603
Martin v. Löwis11437992002-04-12 09:54:03 +000013604#ifdef F77_DUMMY_MAIN
13605# ifdef __cplusplus
13606 extern "C"
13607# endif
13608 int F77_DUMMY_MAIN() { return 1; }
13609#endif
13610int
13611main ()
13612{
Guido van Rossum90eea071996-08-30 20:58:57 +000013613return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 ;
13615 return 0;
13616}
13617_ACEOF
13618rm -f conftest.$ac_objext
13619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13620 (eval $ac_compile) 2>&5
13621 ac_status=$?
13622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13623 (exit $ac_status); } &&
13624 { ac_try='test -s conftest.$ac_objext'
13625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13626 (eval $ac_try) 2>&5
13627 ac_status=$?
13628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13629 (exit $ac_status); }; }; then
13630
13631
13632cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013633#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013634_ACEOF
13635
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013636 works=yes
13637
Guido van Rossumf78abae1997-01-21 22:02:36 +000013638else
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 echo "$as_me: failed program was:" >&5
13640cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013641fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013642rm -f conftest.$ac_objext conftest.$ac_ext
13643echo "$as_me:$LINENO: result: $works" >&5
13644echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013645
Guido van Rossumda88dad1995-01-26 00:46:29 +000013646if test "$have_prototypes" = yes; then
13647bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013648echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13649echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13650cat >conftest.$ac_ext <<_ACEOF
13651#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013652#include "confdefs.h"
13653#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013654#ifdef F77_DUMMY_MAIN
13655# ifdef __cplusplus
13656 extern "C"
13657# endif
13658 int F77_DUMMY_MAIN() { return 1; }
13659#endif
13660int
13661main ()
13662{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013663char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013664 ;
13665 return 0;
13666}
13667_ACEOF
13668rm -f conftest.$ac_objext
13669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13670 (eval $ac_compile) 2>&5
13671 ac_status=$?
13672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13673 (exit $ac_status); } &&
13674 { ac_try='test -s conftest.$ac_objext'
13675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13676 (eval $ac_try) 2>&5
13677 ac_status=$?
13678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13679 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013680 :
13681else
Martin v. Löwis11437992002-04-12 09:54:03 +000013682 echo "$as_me: failed program was:" >&5
13683cat conftest.$ac_ext >&5
13684
13685cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013686#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013687_ACEOF
13688
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013689 bad_prototypes=yes
13690
Guido van Rossum627b2d71993-12-24 10:39:16 +000013691fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013692rm -f conftest.$ac_objext conftest.$ac_ext
13693echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13694echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013695fi
13696
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013697# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013698echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13699echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13700cat >conftest.$ac_ext <<_ACEOF
13701#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013702#include "confdefs.h"
13703#include <sys/types.h>
13704#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013705#ifdef F77_DUMMY_MAIN
13706# ifdef __cplusplus
13707 extern "C"
13708# endif
13709 int F77_DUMMY_MAIN() { return 1; }
13710#endif
13711int
13712main ()
13713{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013714struct sockaddr x;
13715x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 ;
13717 return 0;
13718}
13719_ACEOF
13720rm -f conftest.$ac_objext
13721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13722 (eval $ac_compile) 2>&5
13723 ac_status=$?
13724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13725 (exit $ac_status); } &&
13726 { ac_try='test -s conftest.$ac_objext'
13727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13728 (eval $ac_try) 2>&5
13729 ac_status=$?
13730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13731 (exit $ac_status); }; }; then
13732 echo "$as_me:$LINENO: result: yes" >&5
13733echo "${ECHO_T}yes" >&6
13734
13735cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013736#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013737_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013738
13739else
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 echo "$as_me: failed program was:" >&5
13741cat conftest.$ac_ext >&5
13742echo "$as_me:$LINENO: result: no" >&5
13743echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013744fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013745rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013746
Guido van Rossumda88dad1995-01-26 00:46:29 +000013747va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013748echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13749echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13750cat >conftest.$ac_ext <<_ACEOF
13751#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013752#include "confdefs.h"
13753
13754#ifdef HAVE_STDARG_PROTOTYPES
13755#include <stdarg.h>
13756#else
13757#include <varargs.h>
13758#endif
13759
Martin v. Löwis11437992002-04-12 09:54:03 +000013760#ifdef F77_DUMMY_MAIN
13761# ifdef __cplusplus
13762 extern "C"
13763# endif
13764 int F77_DUMMY_MAIN() { return 1; }
13765#endif
13766int
13767main ()
13768{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013769va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013770 ;
13771 return 0;
13772}
13773_ACEOF
13774rm -f conftest.$ac_objext
13775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13776 (eval $ac_compile) 2>&5
13777 ac_status=$?
13778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13779 (exit $ac_status); } &&
13780 { ac_try='test -s conftest.$ac_objext'
13781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13782 (eval $ac_try) 2>&5
13783 ac_status=$?
13784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13785 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786 :
13787else
Martin v. Löwis11437992002-04-12 09:54:03 +000013788 echo "$as_me: failed program was:" >&5
13789cat conftest.$ac_ext >&5
13790
13791
13792cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013793#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013794_ACEOF
13795
Guido van Rossumda88dad1995-01-26 00:46:29 +000013796 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013797
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013798fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013799rm -f conftest.$ac_objext conftest.$ac_ext
13800echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13801echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013803# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013804
13805
13806
13807echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13808echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13809if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13810 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013811else
Martin v. Löwis11437992002-04-12 09:54:03 +000013812 cat >conftest.$ac_ext <<_ACEOF
13813#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013814#include "confdefs.h"
13815/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013817#include <assert.h>
13818/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013819#ifdef __cplusplus
13820extern "C"
13821#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013822/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013823 builtin and then its argument prototype would still apply. */
13824char gethostbyname_r ();
13825char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013826
Martin v. Löwis11437992002-04-12 09:54:03 +000013827#ifdef F77_DUMMY_MAIN
13828# ifdef __cplusplus
13829 extern "C"
13830# endif
13831 int F77_DUMMY_MAIN() { return 1; }
13832#endif
13833int
13834main ()
13835{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013836/* The GNU C library defines this for functions which it implements
13837 to always fail with ENOSYS. Some functions are actually named
13838 something starting with __ and the normal name is an alias. */
13839#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13840choke me
13841#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013842f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013843#endif
13844
Martin v. Löwis11437992002-04-12 09:54:03 +000013845 ;
13846 return 0;
13847}
13848_ACEOF
13849rm -f conftest.$ac_objext conftest$ac_exeext
13850if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13851 (eval $ac_link) 2>&5
13852 ac_status=$?
13853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13854 (exit $ac_status); } &&
13855 { ac_try='test -s conftest$ac_exeext'
13856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13857 (eval $ac_try) 2>&5
13858 ac_status=$?
13859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13860 (exit $ac_status); }; }; then
13861 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013862else
Martin v. Löwis11437992002-04-12 09:54:03 +000013863 echo "$as_me: failed program was:" >&5
13864cat conftest.$ac_ext >&5
13865ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013867rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013868fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013869echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13870echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13871if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013872
Martin v. Löwis11437992002-04-12 09:54:03 +000013873 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013874#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013875_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013876
Martin v. Löwis11437992002-04-12 09:54:03 +000013877 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13878echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013879 OLD_CFLAGS=$CFLAGS
13880 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013881 cat >conftest.$ac_ext <<_ACEOF
13882#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013883#include "confdefs.h"
13884
13885# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013886
13887#ifdef F77_DUMMY_MAIN
13888# ifdef __cplusplus
13889 extern "C"
13890# endif
13891 int F77_DUMMY_MAIN() { return 1; }
13892#endif
13893int
13894main ()
13895{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013896
13897 char *name;
13898 struct hostent *he, *res;
13899 char buffer[2048];
13900 int buflen = 2048;
13901 int h_errnop;
13902
13903 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013904
13905 ;
13906 return 0;
13907}
13908_ACEOF
13909rm -f conftest.$ac_objext
13910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13911 (eval $ac_compile) 2>&5
13912 ac_status=$?
13913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13914 (exit $ac_status); } &&
13915 { ac_try='test -s conftest.$ac_objext'
13916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13917 (eval $ac_try) 2>&5
13918 ac_status=$?
13919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13920 (exit $ac_status); }; }; then
13921
13922 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013923#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013924_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013925
Martin v. Löwis11437992002-04-12 09:54:03 +000013926
13927cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013928#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013929_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013930
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 echo "$as_me:$LINENO: result: yes" >&5
13932echo "${ECHO_T}yes" >&6
13933
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013934else
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 echo "$as_me: failed program was:" >&5
13936cat conftest.$ac_ext >&5
13937
13938 echo "$as_me:$LINENO: result: no" >&5
13939echo "${ECHO_T}no" >&6
13940 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13941echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13942 cat >conftest.$ac_ext <<_ACEOF
13943#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013944#include "confdefs.h"
13945
13946# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013947
13948#ifdef F77_DUMMY_MAIN
13949# ifdef __cplusplus
13950 extern "C"
13951# endif
13952 int F77_DUMMY_MAIN() { return 1; }
13953#endif
13954int
13955main ()
13956{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013957
13958 char *name;
13959 struct hostent *he;
13960 char buffer[2048];
13961 int buflen = 2048;
13962 int h_errnop;
13963
13964 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013965
13966 ;
13967 return 0;
13968}
13969_ACEOF
13970rm -f conftest.$ac_objext
13971if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13972 (eval $ac_compile) 2>&5
13973 ac_status=$?
13974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13975 (exit $ac_status); } &&
13976 { ac_try='test -s conftest.$ac_objext'
13977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13978 (eval $ac_try) 2>&5
13979 ac_status=$?
13980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13981 (exit $ac_status); }; }; then
13982
13983 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013984#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013985_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013986
Martin v. Löwis11437992002-04-12 09:54:03 +000013987
13988cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013989#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013990_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013991
Martin v. Löwis11437992002-04-12 09:54:03 +000013992 echo "$as_me:$LINENO: result: yes" >&5
13993echo "${ECHO_T}yes" >&6
13994
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013995else
Martin v. Löwis11437992002-04-12 09:54:03 +000013996 echo "$as_me: failed program was:" >&5
13997cat conftest.$ac_ext >&5
13998
13999 echo "$as_me:$LINENO: result: no" >&5
14000echo "${ECHO_T}no" >&6
14001 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14002echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14003 cat >conftest.$ac_ext <<_ACEOF
14004#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014005#include "confdefs.h"
14006
14007# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014008
14009#ifdef F77_DUMMY_MAIN
14010# ifdef __cplusplus
14011 extern "C"
14012# endif
14013 int F77_DUMMY_MAIN() { return 1; }
14014#endif
14015int
14016main ()
14017{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014018
14019 char *name;
14020 struct hostent *he;
14021 struct hostent_data data;
14022
14023 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014024
14025 ;
14026 return 0;
14027}
14028_ACEOF
14029rm -f conftest.$ac_objext
14030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14031 (eval $ac_compile) 2>&5
14032 ac_status=$?
14033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14034 (exit $ac_status); } &&
14035 { ac_try='test -s conftest.$ac_objext'
14036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14037 (eval $ac_try) 2>&5
14038 ac_status=$?
14039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14040 (exit $ac_status); }; }; then
14041
14042 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014043#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014044_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014045
Martin v. Löwis11437992002-04-12 09:54:03 +000014046
14047cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014048#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014049_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014050
Martin v. Löwis11437992002-04-12 09:54:03 +000014051 echo "$as_me:$LINENO: result: yes" >&5
14052echo "${ECHO_T}yes" >&6
14053
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014054else
Martin v. Löwis11437992002-04-12 09:54:03 +000014055 echo "$as_me: failed program was:" >&5
14056cat conftest.$ac_ext >&5
14057
14058 echo "$as_me:$LINENO: result: no" >&5
14059echo "${ECHO_T}no" >&6
14060
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014061fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014062rm -f conftest.$ac_objext conftest.$ac_ext
14063
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014064fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014065rm -f conftest.$ac_objext conftest.$ac_ext
14066
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014068rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014069 CFLAGS=$OLD_CFLAGS
14070
14071else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014072
Martin v. Löwis11437992002-04-12 09:54:03 +000014073
14074for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014075do
Martin v. Löwis11437992002-04-12 09:54:03 +000014076as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14077echo "$as_me:$LINENO: checking for $ac_func" >&5
14078echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14079if eval "test \"\${$as_ac_var+set}\" = set"; then
14080 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014081else
Martin v. Löwis11437992002-04-12 09:54:03 +000014082 cat >conftest.$ac_ext <<_ACEOF
14083#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014084#include "confdefs.h"
14085/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014086 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014087#include <assert.h>
14088/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014089#ifdef __cplusplus
14090extern "C"
14091#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014092/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014093 builtin and then its argument prototype would still apply. */
14094char $ac_func ();
14095char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014096
Martin v. Löwis11437992002-04-12 09:54:03 +000014097#ifdef F77_DUMMY_MAIN
14098# ifdef __cplusplus
14099 extern "C"
14100# endif
14101 int F77_DUMMY_MAIN() { return 1; }
14102#endif
14103int
14104main ()
14105{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014106/* The GNU C library defines this for functions which it implements
14107 to always fail with ENOSYS. Some functions are actually named
14108 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014109#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014110choke me
14111#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014112f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014113#endif
14114
Martin v. Löwis11437992002-04-12 09:54:03 +000014115 ;
14116 return 0;
14117}
14118_ACEOF
14119rm -f conftest.$ac_objext conftest$ac_exeext
14120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14121 (eval $ac_link) 2>&5
14122 ac_status=$?
14123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14124 (exit $ac_status); } &&
14125 { ac_try='test -s conftest$ac_exeext'
14126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14127 (eval $ac_try) 2>&5
14128 ac_status=$?
14129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14130 (exit $ac_status); }; }; then
14131 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014132else
Martin v. Löwis11437992002-04-12 09:54:03 +000014133 echo "$as_me: failed program was:" >&5
14134cat conftest.$ac_ext >&5
14135eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014137rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014138fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014139echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14140echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14141if test `eval echo '${'$as_ac_var'}'` = yes; then
14142 cat >>confdefs.h <<_ACEOF
14143#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14144_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014145
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014146fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014147done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014148
Michael W. Hudson54241132001-12-07 15:38:26 +000014149
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014150fi
14151
Michael W. Hudson54241132001-12-07 15:38:26 +000014152
14153
14154
14155
14156
14157
Guido van Rossum627b2d71993-12-24 10:39:16 +000014158# checks for system services
14159# (none yet)
14160
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014161# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014162echo "$as_me:$LINENO: checking for __fpu_control" >&5
14163echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14164if test "${ac_cv_func___fpu_control+set}" = set; then
14165 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014166else
Martin v. Löwis11437992002-04-12 09:54:03 +000014167 cat >conftest.$ac_ext <<_ACEOF
14168#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014169#include "confdefs.h"
14170/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014171 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014172#include <assert.h>
14173/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014174#ifdef __cplusplus
14175extern "C"
14176#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014177/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014178 builtin and then its argument prototype would still apply. */
14179char __fpu_control ();
14180char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014181
Martin v. Löwis11437992002-04-12 09:54:03 +000014182#ifdef F77_DUMMY_MAIN
14183# ifdef __cplusplus
14184 extern "C"
14185# endif
14186 int F77_DUMMY_MAIN() { return 1; }
14187#endif
14188int
14189main ()
14190{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014191/* The GNU C library defines this for functions which it implements
14192 to always fail with ENOSYS. Some functions are actually named
14193 something starting with __ and the normal name is an alias. */
14194#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14195choke me
14196#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014197f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014198#endif
14199
Martin v. Löwis11437992002-04-12 09:54:03 +000014200 ;
14201 return 0;
14202}
14203_ACEOF
14204rm -f conftest.$ac_objext conftest$ac_exeext
14205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14206 (eval $ac_link) 2>&5
14207 ac_status=$?
14208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209 (exit $ac_status); } &&
14210 { ac_try='test -s conftest$ac_exeext'
14211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14212 (eval $ac_try) 2>&5
14213 ac_status=$?
14214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14215 (exit $ac_status); }; }; then
14216 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014217else
Martin v. Löwis11437992002-04-12 09:54:03 +000014218 echo "$as_me: failed program was:" >&5
14219cat conftest.$ac_ext >&5
14220ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014222rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014223fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014224echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14225echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14226if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014227 :
14228else
Martin v. Löwis11437992002-04-12 09:54:03 +000014229
14230echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14231echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14232if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14233 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014234else
Martin v. Löwis11437992002-04-12 09:54:03 +000014235 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014236LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014237cat >conftest.$ac_ext <<_ACEOF
14238#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014239#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014240
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014241/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014242#ifdef __cplusplus
14243extern "C"
14244#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014245/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014246 builtin and then its argument prototype would still apply. */
14247char __fpu_control ();
14248#ifdef F77_DUMMY_MAIN
14249# ifdef __cplusplus
14250 extern "C"
14251# endif
14252 int F77_DUMMY_MAIN() { return 1; }
14253#endif
14254int
14255main ()
14256{
14257__fpu_control ();
14258 ;
14259 return 0;
14260}
14261_ACEOF
14262rm -f conftest.$ac_objext conftest$ac_exeext
14263if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14264 (eval $ac_link) 2>&5
14265 ac_status=$?
14266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14267 (exit $ac_status); } &&
14268 { ac_try='test -s conftest$ac_exeext'
14269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14270 (eval $ac_try) 2>&5
14271 ac_status=$?
14272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14273 (exit $ac_status); }; }; then
14274 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014275else
Martin v. Löwis11437992002-04-12 09:54:03 +000014276 echo "$as_me: failed program was:" >&5
14277cat conftest.$ac_ext >&5
14278ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014279fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014280rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14281LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014283echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14284echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14285if test $ac_cv_lib_ieee___fpu_control = yes; then
14286 cat >>confdefs.h <<_ACEOF
14287#define HAVE_LIBIEEE 1
14288_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014289
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014290 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014291
Guido van Rossum627b2d71993-12-24 10:39:16 +000014292fi
14293
Michael W. Hudson54241132001-12-07 15:38:26 +000014294
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014295fi
14296
Michael W. Hudson54241132001-12-07 15:38:26 +000014297
Guido van Rossum7f253911997-05-09 02:42:48 +000014298# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014299echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14300echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14301
Guido van Rossum7f253911997-05-09 02:42:48 +000014302# Check whether --with-fpectl or --without-fpectl was given.
14303if test "${with_fpectl+set}" = set; then
14304 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014305
Guido van Rossum7f253911997-05-09 02:42:48 +000014306if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014307then
14308
14309cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014310#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014311_ACEOF
14312
14313 echo "$as_me:$LINENO: result: yes" >&5
14314echo "${ECHO_T}yes" >&6
14315else echo "$as_me:$LINENO: result: no" >&5
14316echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014317fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014318else
Martin v. Löwis11437992002-04-12 09:54:03 +000014319 echo "$as_me:$LINENO: result: no" >&5
14320echo "${ECHO_T}no" >&6
14321fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014322
Guido van Rossum7f43da71994-08-01 12:15:30 +000014323# check for --with-libm=...
14324
Guido van Rossum563e7081996-09-10 18:20:48 +000014325case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014326Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014327BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014328*) LIBM=-lm
14329esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014330echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14331echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14332
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014333# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014334if test "${with_libm+set}" = set; then
14335 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014336
Guido van Rossum7f253911997-05-09 02:42:48 +000014337if test "$withval" = no
14338then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014339 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14340echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014341elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014342then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14344echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14345else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14346echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14347 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014348fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014349else
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14351echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14352fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014353
14354# check for --with-libc=...
14355
Martin v. Löwis11437992002-04-12 09:54:03 +000014356echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14357echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14358
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014359# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014360if test "${with_libc+set}" = set; then
14361 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
Guido van Rossum7f253911997-05-09 02:42:48 +000014363if test "$withval" = no
14364then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014365 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14366echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014367elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014368then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14370echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14371else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14372echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14373 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014374fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014375else
Martin v. Löwis11437992002-04-12 09:54:03 +000014376 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14377echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14378fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014379
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014380# check for hypot() in math library
14381LIBS_SAVE=$LIBS
14382LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014384for ac_func in hypot
14385do
Martin v. Löwis11437992002-04-12 09:54:03 +000014386as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14387echo "$as_me:$LINENO: checking for $ac_func" >&5
14388echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14389if eval "test \"\${$as_ac_var+set}\" = set"; then
14390 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014391else
Martin v. Löwis11437992002-04-12 09:54:03 +000014392 cat >conftest.$ac_ext <<_ACEOF
14393#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014394#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014395/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014396 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014397#include <assert.h>
14398/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014399#ifdef __cplusplus
14400extern "C"
14401#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014402/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 builtin and then its argument prototype would still apply. */
14404char $ac_func ();
14405char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014406
Martin v. Löwis11437992002-04-12 09:54:03 +000014407#ifdef F77_DUMMY_MAIN
14408# ifdef __cplusplus
14409 extern "C"
14410# endif
14411 int F77_DUMMY_MAIN() { return 1; }
14412#endif
14413int
14414main ()
14415{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014416/* The GNU C library defines this for functions which it implements
14417 to always fail with ENOSYS. Some functions are actually named
14418 something starting with __ and the normal name is an alias. */
14419#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14420choke me
14421#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014422f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014423#endif
14424
Martin v. Löwis11437992002-04-12 09:54:03 +000014425 ;
14426 return 0;
14427}
14428_ACEOF
14429rm -f conftest.$ac_objext conftest$ac_exeext
14430if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14431 (eval $ac_link) 2>&5
14432 ac_status=$?
14433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14434 (exit $ac_status); } &&
14435 { ac_try='test -s conftest$ac_exeext'
14436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14437 (eval $ac_try) 2>&5
14438 ac_status=$?
14439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14440 (exit $ac_status); }; }; then
14441 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014442else
Martin v. Löwis11437992002-04-12 09:54:03 +000014443 echo "$as_me: failed program was:" >&5
14444cat conftest.$ac_ext >&5
14445eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014446fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014447rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014448fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014449echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14450echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14451if test `eval echo '${'$as_ac_var'}'` = yes; then
14452 cat >>confdefs.h <<_ACEOF
14453#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14454_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014455
Michael W. Hudson54241132001-12-07 15:38:26 +000014456else
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014458fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014459done
14460
Michael W. Hudson54241132001-12-07 15:38:26 +000014461
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014462LIBS=$LIBS_SAVE
14463
Guido van Rossumad713701997-07-10 22:42:38 +000014464# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014465echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14466echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14467if test "${ac_cv_malloc_zero+set}" = set; then
14468 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014469else
14470 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014471 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014472else
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 cat >conftest.$ac_ext <<_ACEOF
14474#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014475#include "confdefs.h"
14476#include <stdio.h>
14477#ifdef HAVE_STDLIB
14478#include <stdlib.h>
14479#else
14480char *malloc(), *realloc();
14481int *free();
14482#endif
14483main() {
14484 char *p;
14485 p = malloc(0);
14486 if (p == NULL) exit(1);
14487 p = realloc(p, 0);
14488 if (p == NULL) exit(1);
14489 free(p);
14490 exit(0);
14491}
Martin v. Löwis11437992002-04-12 09:54:03 +000014492_ACEOF
14493rm -f conftest$ac_exeext
14494if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14495 (eval $ac_link) 2>&5
14496 ac_status=$?
14497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14498 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14500 (eval $ac_try) 2>&5
14501 ac_status=$?
14502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14503 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014504 ac_cv_malloc_zero=nonnull
14505else
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 echo "$as_me: program exited with status $ac_status" >&5
14507echo "$as_me: failed program was:" >&5
14508cat conftest.$ac_ext >&5
14509( exit $ac_status )
14510ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014511fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014512rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014513fi
Guido van Rossumad713701997-07-10 22:42:38 +000014514fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014515 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014516echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14517echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014518if test "$ac_cv_malloc_zero" = null
14519then
Martin v. Löwis11437992002-04-12 09:54:03 +000014520
14521cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014522#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014523_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014524
14525fi
14526
Guido van Rossumef2255b2000-03-10 22:30:29 +000014527# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014528if test "${ac_cv_header_wchar_h+set}" = set; then
14529 echo "$as_me:$LINENO: checking for wchar.h" >&5
14530echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14531if test "${ac_cv_header_wchar_h+set}" = set; then
14532 echo $ECHO_N "(cached) $ECHO_C" >&6
14533fi
14534echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14535echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014536else
Martin v. Löwis11437992002-04-12 09:54:03 +000014537 # Is the header compilable?
14538echo "$as_me:$LINENO: checking wchar.h usability" >&5
14539echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14540cat >conftest.$ac_ext <<_ACEOF
14541#line $LINENO "configure"
14542#include "confdefs.h"
14543$ac_includes_default
14544#include <wchar.h>
14545_ACEOF
14546rm -f conftest.$ac_objext
14547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14548 (eval $ac_compile) 2>&5
14549 ac_status=$?
14550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551 (exit $ac_status); } &&
14552 { ac_try='test -s conftest.$ac_objext'
14553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14554 (eval $ac_try) 2>&5
14555 ac_status=$?
14556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14557 (exit $ac_status); }; }; then
14558 ac_header_compiler=yes
14559else
14560 echo "$as_me: failed program was:" >&5
14561cat conftest.$ac_ext >&5
14562ac_header_compiler=no
14563fi
14564rm -f conftest.$ac_objext conftest.$ac_ext
14565echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14566echo "${ECHO_T}$ac_header_compiler" >&6
14567
14568# Is the header present?
14569echo "$as_me:$LINENO: checking wchar.h presence" >&5
14570echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14571cat >conftest.$ac_ext <<_ACEOF
14572#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014573#include "confdefs.h"
14574#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014575_ACEOF
14576if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14577 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14578 ac_status=$?
14579 egrep -v '^ *\+' conftest.er1 >conftest.err
14580 rm -f conftest.er1
14581 cat conftest.err >&5
14582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14583 (exit $ac_status); } >/dev/null; then
14584 if test -s conftest.err; then
14585 ac_cpp_err=$ac_c_preproc_warn_flag
14586 else
14587 ac_cpp_err=
14588 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014589else
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 ac_cpp_err=yes
14591fi
14592if test -z "$ac_cpp_err"; then
14593 ac_header_preproc=yes
14594else
14595 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014596 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014598fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014599rm -f conftest.err conftest.$ac_ext
14600echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14601echo "${ECHO_T}$ac_header_preproc" >&6
14602
14603# So? What about this header?
14604case $ac_header_compiler:$ac_header_preproc in
14605 yes:no )
14606 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14607echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14608 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14609echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14610 no:yes )
14611 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14612echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14613 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14614echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14615 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14616echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14617esac
14618echo "$as_me:$LINENO: checking for wchar.h" >&5
14619echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14620if test "${ac_cv_header_wchar_h+set}" = set; then
14621 echo $ECHO_N "(cached) $ECHO_C" >&6
14622else
14623 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014625echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14626echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14627
14628fi
14629if test $ac_cv_header_wchar_h = yes; then
14630
14631
14632cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014633#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014634_ACEOF
14635
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014636 wchar_h="yes"
14637
Guido van Rossumef2255b2000-03-10 22:30:29 +000014638else
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014640
14641fi
14642
Michael W. Hudson54241132001-12-07 15:38:26 +000014643
Martin v. Löwis11437992002-04-12 09:54:03 +000014644
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014645# determine wchar_t size
14646if test "$wchar_h" = yes
14647then
Martin v. Löwis11437992002-04-12 09:54:03 +000014648 echo "$as_me:$LINENO: checking for wchar_t" >&5
14649echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14650if test "${ac_cv_type_wchar_t+set}" = set; then
14651 echo $ECHO_N "(cached) $ECHO_C" >&6
14652else
14653 cat >conftest.$ac_ext <<_ACEOF
14654#line $LINENO "configure"
14655#include "confdefs.h"
14656#include <wchar.h>
14657
14658#ifdef F77_DUMMY_MAIN
14659# ifdef __cplusplus
14660 extern "C"
14661# endif
14662 int F77_DUMMY_MAIN() { return 1; }
14663#endif
14664int
14665main ()
14666{
14667if ((wchar_t *) 0)
14668 return 0;
14669if (sizeof (wchar_t))
14670 return 0;
14671 ;
14672 return 0;
14673}
14674_ACEOF
14675rm -f conftest.$ac_objext
14676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14677 (eval $ac_compile) 2>&5
14678 ac_status=$?
14679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14680 (exit $ac_status); } &&
14681 { ac_try='test -s conftest.$ac_objext'
14682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14683 (eval $ac_try) 2>&5
14684 ac_status=$?
14685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14686 (exit $ac_status); }; }; then
14687 ac_cv_type_wchar_t=yes
14688else
14689 echo "$as_me: failed program was:" >&5
14690cat conftest.$ac_ext >&5
14691ac_cv_type_wchar_t=no
14692fi
14693rm -f conftest.$ac_objext conftest.$ac_ext
14694fi
14695echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14696echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14697
14698echo "$as_me:$LINENO: checking size of wchar_t" >&5
14699echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14700if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14701 echo $ECHO_N "(cached) $ECHO_C" >&6
14702else
14703 if test "$ac_cv_type_wchar_t" = yes; then
14704 # The cast to unsigned long works around a bug in the HP C Compiler
14705 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14706 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14707 # This bug is HP SR number 8606223364.
14708 if test "$cross_compiling" = yes; then
14709 # Depending upon the size, compute the lo and hi bounds.
14710cat >conftest.$ac_ext <<_ACEOF
14711#line $LINENO "configure"
14712#include "confdefs.h"
14713#include <wchar.h>
14714
14715#ifdef F77_DUMMY_MAIN
14716# ifdef __cplusplus
14717 extern "C"
14718# endif
14719 int F77_DUMMY_MAIN() { return 1; }
14720#endif
14721int
14722main ()
14723{
14724static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14725test_array [0] = 0
14726
14727 ;
14728 return 0;
14729}
14730_ACEOF
14731rm -f conftest.$ac_objext
14732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14733 (eval $ac_compile) 2>&5
14734 ac_status=$?
14735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14736 (exit $ac_status); } &&
14737 { ac_try='test -s conftest.$ac_objext'
14738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14739 (eval $ac_try) 2>&5
14740 ac_status=$?
14741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14742 (exit $ac_status); }; }; then
14743 ac_lo=0 ac_mid=0
14744 while :; do
14745 cat >conftest.$ac_ext <<_ACEOF
14746#line $LINENO "configure"
14747#include "confdefs.h"
14748#include <wchar.h>
14749
14750#ifdef F77_DUMMY_MAIN
14751# ifdef __cplusplus
14752 extern "C"
14753# endif
14754 int F77_DUMMY_MAIN() { return 1; }
14755#endif
14756int
14757main ()
14758{
14759static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14760test_array [0] = 0
14761
14762 ;
14763 return 0;
14764}
14765_ACEOF
14766rm -f conftest.$ac_objext
14767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14768 (eval $ac_compile) 2>&5
14769 ac_status=$?
14770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14771 (exit $ac_status); } &&
14772 { ac_try='test -s conftest.$ac_objext'
14773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14774 (eval $ac_try) 2>&5
14775 ac_status=$?
14776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14777 (exit $ac_status); }; }; then
14778 ac_hi=$ac_mid; break
14779else
14780 echo "$as_me: failed program was:" >&5
14781cat conftest.$ac_ext >&5
14782ac_lo=`expr $ac_mid + 1`
14783 if test $ac_lo -le $ac_mid; then
14784 ac_lo= ac_hi=
14785 break
14786 fi
14787 ac_mid=`expr 2 '*' $ac_mid + 1`
14788fi
14789rm -f conftest.$ac_objext conftest.$ac_ext
14790 done
14791else
14792 echo "$as_me: failed program was:" >&5
14793cat conftest.$ac_ext >&5
14794cat >conftest.$ac_ext <<_ACEOF
14795#line $LINENO "configure"
14796#include "confdefs.h"
14797#include <wchar.h>
14798
14799#ifdef F77_DUMMY_MAIN
14800# ifdef __cplusplus
14801 extern "C"
14802# endif
14803 int F77_DUMMY_MAIN() { return 1; }
14804#endif
14805int
14806main ()
14807{
14808static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14809test_array [0] = 0
14810
14811 ;
14812 return 0;
14813}
14814_ACEOF
14815rm -f conftest.$ac_objext
14816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14817 (eval $ac_compile) 2>&5
14818 ac_status=$?
14819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14820 (exit $ac_status); } &&
14821 { ac_try='test -s conftest.$ac_objext'
14822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14823 (eval $ac_try) 2>&5
14824 ac_status=$?
14825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14826 (exit $ac_status); }; }; then
14827 ac_hi=-1 ac_mid=-1
14828 while :; do
14829 cat >conftest.$ac_ext <<_ACEOF
14830#line $LINENO "configure"
14831#include "confdefs.h"
14832#include <wchar.h>
14833
14834#ifdef F77_DUMMY_MAIN
14835# ifdef __cplusplus
14836 extern "C"
14837# endif
14838 int F77_DUMMY_MAIN() { return 1; }
14839#endif
14840int
14841main ()
14842{
14843static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14844test_array [0] = 0
14845
14846 ;
14847 return 0;
14848}
14849_ACEOF
14850rm -f conftest.$ac_objext
14851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14852 (eval $ac_compile) 2>&5
14853 ac_status=$?
14854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14855 (exit $ac_status); } &&
14856 { ac_try='test -s conftest.$ac_objext'
14857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14858 (eval $ac_try) 2>&5
14859 ac_status=$?
14860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14861 (exit $ac_status); }; }; then
14862 ac_lo=$ac_mid; break
14863else
14864 echo "$as_me: failed program was:" >&5
14865cat conftest.$ac_ext >&5
14866ac_hi=`expr '(' $ac_mid ')' - 1`
14867 if test $ac_mid -le $ac_hi; then
14868 ac_lo= ac_hi=
14869 break
14870 fi
14871 ac_mid=`expr 2 '*' $ac_mid`
14872fi
14873rm -f conftest.$ac_objext conftest.$ac_ext
14874 done
14875else
14876 echo "$as_me: failed program was:" >&5
14877cat conftest.$ac_ext >&5
14878ac_lo= ac_hi=
14879fi
14880rm -f conftest.$ac_objext conftest.$ac_ext
14881fi
14882rm -f conftest.$ac_objext conftest.$ac_ext
14883# Binary search between lo and hi bounds.
14884while test "x$ac_lo" != "x$ac_hi"; do
14885 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14886 cat >conftest.$ac_ext <<_ACEOF
14887#line $LINENO "configure"
14888#include "confdefs.h"
14889#include <wchar.h>
14890
14891#ifdef F77_DUMMY_MAIN
14892# ifdef __cplusplus
14893 extern "C"
14894# endif
14895 int F77_DUMMY_MAIN() { return 1; }
14896#endif
14897int
14898main ()
14899{
14900static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14901test_array [0] = 0
14902
14903 ;
14904 return 0;
14905}
14906_ACEOF
14907rm -f conftest.$ac_objext
14908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14909 (eval $ac_compile) 2>&5
14910 ac_status=$?
14911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14912 (exit $ac_status); } &&
14913 { ac_try='test -s conftest.$ac_objext'
14914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14915 (eval $ac_try) 2>&5
14916 ac_status=$?
14917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14918 (exit $ac_status); }; }; then
14919 ac_hi=$ac_mid
14920else
14921 echo "$as_me: failed program was:" >&5
14922cat conftest.$ac_ext >&5
14923ac_lo=`expr '(' $ac_mid ')' + 1`
14924fi
14925rm -f conftest.$ac_objext conftest.$ac_ext
14926done
14927case $ac_lo in
14928?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14929'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14930echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14931 { (exit 1); exit 1; }; } ;;
14932esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014933else
14934 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014935 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14936echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14937 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014938else
Martin v. Löwis11437992002-04-12 09:54:03 +000014939 cat >conftest.$ac_ext <<_ACEOF
14940#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014941#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014942#include <wchar.h>
14943
14944long longval () { return (long) (sizeof (wchar_t)); }
14945unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014946#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014947#include <stdlib.h>
14948#ifdef F77_DUMMY_MAIN
14949# ifdef __cplusplus
14950 extern "C"
14951# endif
14952 int F77_DUMMY_MAIN() { return 1; }
14953#endif
14954int
14955main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014956{
Martin v. Löwis11437992002-04-12 09:54:03 +000014957
14958 FILE *f = fopen ("conftest.val", "w");
14959 if (! f)
14960 exit (1);
14961 if (((long) (sizeof (wchar_t))) < 0)
14962 {
14963 long i = longval ();
14964 if (i != ((long) (sizeof (wchar_t))))
14965 exit (1);
14966 fprintf (f, "%ld\n", i);
14967 }
14968 else
14969 {
14970 unsigned long i = ulongval ();
14971 if (i != ((long) (sizeof (wchar_t))))
14972 exit (1);
14973 fprintf (f, "%lu\n", i);
14974 }
14975 exit (ferror (f) || fclose (f) != 0);
14976
14977 ;
14978 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014979}
Martin v. Löwis11437992002-04-12 09:54:03 +000014980_ACEOF
14981rm -f conftest$ac_exeext
14982if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14983 (eval $ac_link) 2>&5
14984 ac_status=$?
14985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14986 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14988 (eval $ac_try) 2>&5
14989 ac_status=$?
14990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14991 (exit $ac_status); }; }; then
14992 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014993else
Martin v. Löwis11437992002-04-12 09:54:03 +000014994 echo "$as_me: program exited with status $ac_status" >&5
14995echo "$as_me: failed program was:" >&5
14996cat conftest.$ac_ext >&5
14997( exit $ac_status )
14998{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14999echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15000 { (exit 1); exit 1; }; }
15001fi
15002rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15003fi
15004fi
15005rm -f conftest.val
15006else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015007 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015008fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015010echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15011echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15012cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015013#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015014_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015015
Michael W. Hudson54241132001-12-07 15:38:26 +000015016
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015017fi
15018
Martin v. Löwis11437992002-04-12 09:54:03 +000015019echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15020echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015021# Check whether --enable-unicode or --disable-unicode was given.
15022if test "${enable_unicode+set}" = set; then
15023 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015024
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015025else
15026 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015027fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015028
15029if test $enable_unicode = yes
15030then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015031 # Without any arguments, Py_UNICODE defaults to two-byte mode
15032 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015033fi
15034
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015035
15036
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015037case "$enable_unicode" in
15038ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015040#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015041_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015042
15043 ;;
15044ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015046#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015047_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015048
15049 ;;
15050esac
15051
Michael W. Hudson54241132001-12-07 15:38:26 +000015052
Martin v. Löwis11437992002-04-12 09:54:03 +000015053
15054
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015055
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015056if test "$enable_unicode" = "no"
15057then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015058 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 echo "$as_me:$LINENO: result: not used" >&5
15060echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015061else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015062 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015063
15064cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015065#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015066_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015067
15068 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15069 then
15070 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015071
Martin v. Löwis11437992002-04-12 09:54:03 +000015072cat >>confdefs.h <<\_ACEOF
15073#define HAVE_USABLE_WCHAR_T 1
15074_ACEOF
15075
15076 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015077#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015078_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015079
15080 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15081 then
15082 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015083 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015084#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015085_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015086
15087 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15088 then
15089 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015090 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015091#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015092_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015093
15094 else
15095 PY_UNICODE_TYPE="no type found"
15096 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15098echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015099fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015100
15101# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015102echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15103echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15104if test "${ac_cv_c_bigendian+set}" = set; then
15105 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015106else
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 # See if sys/param.h defines the BYTE_ORDER macro.
15108cat >conftest.$ac_ext <<_ACEOF
15109#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015110#include "confdefs.h"
15111#include <sys/types.h>
15112#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015113
Martin v. Löwis11437992002-04-12 09:54:03 +000015114#ifdef F77_DUMMY_MAIN
15115# ifdef __cplusplus
15116 extern "C"
15117# endif
15118 int F77_DUMMY_MAIN() { return 1; }
15119#endif
15120int
15121main ()
15122{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015123#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15124 bogus endian macros
15125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015126
15127 ;
15128 return 0;
15129}
15130_ACEOF
15131rm -f conftest.$ac_objext
15132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15133 (eval $ac_compile) 2>&5
15134 ac_status=$?
15135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15136 (exit $ac_status); } &&
15137 { ac_try='test -s conftest.$ac_objext'
15138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15139 (eval $ac_try) 2>&5
15140 ac_status=$?
15141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15142 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015143 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015144cat >conftest.$ac_ext <<_ACEOF
15145#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015146#include "confdefs.h"
15147#include <sys/types.h>
15148#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015149
Martin v. Löwis11437992002-04-12 09:54:03 +000015150#ifdef F77_DUMMY_MAIN
15151# ifdef __cplusplus
15152 extern "C"
15153# endif
15154 int F77_DUMMY_MAIN() { return 1; }
15155#endif
15156int
15157main ()
15158{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015159#if BYTE_ORDER != BIG_ENDIAN
15160 not big endian
15161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015162
15163 ;
15164 return 0;
15165}
15166_ACEOF
15167rm -f conftest.$ac_objext
15168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15169 (eval $ac_compile) 2>&5
15170 ac_status=$?
15171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15172 (exit $ac_status); } &&
15173 { ac_try='test -s conftest.$ac_objext'
15174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15175 (eval $ac_try) 2>&5
15176 ac_status=$?
15177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15178 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015179 ac_cv_c_bigendian=yes
15180else
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 echo "$as_me: failed program was:" >&5
15182cat conftest.$ac_ext >&5
15183ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015184fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015185rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015186else
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 echo "$as_me: failed program was:" >&5
15188cat conftest.$ac_ext >&5
15189# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015190if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015191 # try to guess the endianess by grep'ing values into an object file
15192 ac_cv_c_bigendian=unknown
15193 cat >conftest.$ac_ext <<_ACEOF
15194#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015195#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015196short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15197short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15198void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15199short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15200short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15201void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15202#ifdef F77_DUMMY_MAIN
15203# ifdef __cplusplus
15204 extern "C"
15205# endif
15206 int F77_DUMMY_MAIN() { return 1; }
15207#endif
15208int
15209main ()
15210{
15211 _ascii (); _ebcdic ();
15212 ;
15213 return 0;
15214}
15215_ACEOF
15216rm -f conftest.$ac_objext
15217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15218 (eval $ac_compile) 2>&5
15219 ac_status=$?
15220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15221 (exit $ac_status); } &&
15222 { ac_try='test -s conftest.$ac_objext'
15223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15224 (eval $ac_try) 2>&5
15225 ac_status=$?
15226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15227 (exit $ac_status); }; }; then
15228 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15229 ac_cv_c_bigendian=yes
15230fi
15231if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15232 if test "$ac_cv_c_bigendian" = unknown; then
15233 ac_cv_c_bigendian=no
15234 else
15235 # finding both strings is unlikely to happen, but who knows?
15236 ac_cv_c_bigendian=unknown
15237 fi
15238fi
15239else
15240 echo "$as_me: failed program was:" >&5
15241cat conftest.$ac_ext >&5
15242fi
15243rm -f conftest.$ac_objext conftest.$ac_ext
15244else
15245 cat >conftest.$ac_ext <<_ACEOF
15246#line $LINENO "configure"
15247#include "confdefs.h"
15248int
15249main ()
15250{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015251 /* Are we little or big endian? From Harbison&Steele. */
15252 union
15253 {
15254 long l;
15255 char c[sizeof (long)];
15256 } u;
15257 u.l = 1;
15258 exit (u.c[sizeof (long) - 1] == 1);
15259}
Martin v. Löwis11437992002-04-12 09:54:03 +000015260_ACEOF
15261rm -f conftest$ac_exeext
15262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15263 (eval $ac_link) 2>&5
15264 ac_status=$?
15265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15266 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15268 (eval $ac_try) 2>&5
15269 ac_status=$?
15270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15271 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015272 ac_cv_c_bigendian=no
15273else
Martin v. Löwis11437992002-04-12 09:54:03 +000015274 echo "$as_me: program exited with status $ac_status" >&5
15275echo "$as_me: failed program was:" >&5
15276cat conftest.$ac_ext >&5
15277( exit $ac_status )
15278ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015279fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015280rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015282fi
15283rm -f conftest.$ac_objext conftest.$ac_ext
15284fi
15285echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15286echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15287case $ac_cv_c_bigendian in
15288 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015289
Martin v. Löwis11437992002-04-12 09:54:03 +000015290cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015291#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015292_ACEOF
15293 ;;
15294 no)
15295 ;;
15296 *)
15297 { { echo "$as_me:$LINENO: error: unknown endianess
15298presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15299echo "$as_me: error: unknown endianess
15300presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15301 { (exit 1); exit 1; }; } ;;
15302esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015303
Michael W. Hudson54241132001-12-07 15:38:26 +000015304
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015305# Check whether right shifting a negative integer extends the sign bit
15306# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015307echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15308echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15309if test "${ac_cv_rshift_extends_sign+set}" = set; then
15310 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015311else
Martin v. Löwis11437992002-04-12 09:54:03 +000015312
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015313if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015314 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015315else
Martin v. Löwis11437992002-04-12 09:54:03 +000015316 cat >conftest.$ac_ext <<_ACEOF
15317#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015318#include "confdefs.h"
15319
15320int main()
15321{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015322 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015323}
15324
Martin v. Löwis11437992002-04-12 09:54:03 +000015325_ACEOF
15326rm -f conftest$ac_exeext
15327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15328 (eval $ac_link) 2>&5
15329 ac_status=$?
15330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15331 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15333 (eval $ac_try) 2>&5
15334 ac_status=$?
15335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15336 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015337 ac_cv_rshift_extends_sign=yes
15338else
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 echo "$as_me: program exited with status $ac_status" >&5
15340echo "$as_me: failed program was:" >&5
15341cat conftest.$ac_ext >&5
15342( exit $ac_status )
15343ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015344fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015345rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15346fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015347fi
15348
Martin v. Löwis11437992002-04-12 09:54:03 +000015349echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15350echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015351if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015352then
Martin v. Löwis11437992002-04-12 09:54:03 +000015353
15354cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015355#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015356_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015357
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015358fi
15359
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015360# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015361echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15362echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15363if test "${ac_cv_have_getc_unlocked+set}" = set; then
15364 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015365else
Martin v. Löwis11437992002-04-12 09:54:03 +000015366
15367cat >conftest.$ac_ext <<_ACEOF
15368#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015369#include "confdefs.h"
15370#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015371#ifdef F77_DUMMY_MAIN
15372# ifdef __cplusplus
15373 extern "C"
15374# endif
15375 int F77_DUMMY_MAIN() { return 1; }
15376#endif
15377int
15378main ()
15379{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015380
15381 FILE *f = fopen("/dev/null", "r");
15382 flockfile(f);
15383 getc_unlocked(f);
15384 funlockfile(f);
15385
Martin v. Löwis11437992002-04-12 09:54:03 +000015386 ;
15387 return 0;
15388}
15389_ACEOF
15390rm -f conftest.$ac_objext conftest$ac_exeext
15391if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15392 (eval $ac_link) 2>&5
15393 ac_status=$?
15394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15395 (exit $ac_status); } &&
15396 { ac_try='test -s conftest$ac_exeext'
15397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15398 (eval $ac_try) 2>&5
15399 ac_status=$?
15400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15401 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015402 ac_cv_have_getc_unlocked=yes
15403else
Martin v. Löwis11437992002-04-12 09:54:03 +000015404 echo "$as_me: failed program was:" >&5
15405cat conftest.$ac_ext >&5
15406ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015407fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015408rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015409fi
15410
Martin v. Löwis11437992002-04-12 09:54:03 +000015411echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15412echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015413if test "$ac_cv_have_getc_unlocked" = yes
15414then
Martin v. Löwis11437992002-04-12 09:54:03 +000015415
15416cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015417#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015418_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015419
15420fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015421
Martin v. Löwis0daad592001-09-30 21:09:59 +000015422# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015423echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15424echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15425if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15426 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015427else
Martin v. Löwis11437992002-04-12 09:54:03 +000015428 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015429LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015430cat >conftest.$ac_ext <<_ACEOF
15431#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015432#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015433
Guido van Rossum353ae582001-07-10 16:45:32 +000015434/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015435#ifdef __cplusplus
15436extern "C"
15437#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015438/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015439 builtin and then its argument prototype would still apply. */
15440char rl_pre_input_hook ();
15441#ifdef F77_DUMMY_MAIN
15442# ifdef __cplusplus
15443 extern "C"
15444# endif
15445 int F77_DUMMY_MAIN() { return 1; }
15446#endif
15447int
15448main ()
15449{
15450rl_pre_input_hook ();
15451 ;
15452 return 0;
15453}
15454_ACEOF
15455rm -f conftest.$ac_objext conftest$ac_exeext
15456if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15457 (eval $ac_link) 2>&5
15458 ac_status=$?
15459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15460 (exit $ac_status); } &&
15461 { ac_try='test -s conftest$ac_exeext'
15462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15463 (eval $ac_try) 2>&5
15464 ac_status=$?
15465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15466 (exit $ac_status); }; }; then
15467 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015468else
Martin v. Löwis11437992002-04-12 09:54:03 +000015469 echo "$as_me: failed program was:" >&5
15470cat conftest.$ac_ext >&5
15471ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015472fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015473rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15474LIBS=$ac_check_lib_save_LIBS
15475fi
15476echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15477echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15478if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015479
Martin v. Löwis11437992002-04-12 09:54:03 +000015480cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015481#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015482_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015483
Martin v. Löwis0daad592001-09-30 21:09:59 +000015484fi
15485
Michael W. Hudson54241132001-12-07 15:38:26 +000015486
Martin v. Löwis0daad592001-09-30 21:09:59 +000015487# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015488echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15489echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15490if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15491 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015492else
Martin v. Löwis11437992002-04-12 09:54:03 +000015493 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015494LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015495cat >conftest.$ac_ext <<_ACEOF
15496#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015497#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015498
Martin v. Löwis0daad592001-09-30 21:09:59 +000015499/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015500#ifdef __cplusplus
15501extern "C"
15502#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015503/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015504 builtin and then its argument prototype would still apply. */
15505char rl_completion_matches ();
15506#ifdef F77_DUMMY_MAIN
15507# ifdef __cplusplus
15508 extern "C"
15509# endif
15510 int F77_DUMMY_MAIN() { return 1; }
15511#endif
15512int
15513main ()
15514{
15515rl_completion_matches ();
15516 ;
15517 return 0;
15518}
15519_ACEOF
15520rm -f conftest.$ac_objext conftest$ac_exeext
15521if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15522 (eval $ac_link) 2>&5
15523 ac_status=$?
15524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15525 (exit $ac_status); } &&
15526 { ac_try='test -s conftest$ac_exeext'
15527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15528 (eval $ac_try) 2>&5
15529 ac_status=$?
15530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15531 (exit $ac_status); }; }; then
15532 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015533else
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 echo "$as_me: failed program was:" >&5
15535cat conftest.$ac_ext >&5
15536ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015537fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015538rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15539LIBS=$ac_check_lib_save_LIBS
15540fi
15541echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15542echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15543if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015544
Martin v. Löwis11437992002-04-12 09:54:03 +000015545cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015546#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015547_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015548
Guido van Rossum353ae582001-07-10 16:45:32 +000015549fi
15550
Jack Jansendd19cf82001-12-06 22:36:17 +000015551
Martin v. Löwis11437992002-04-12 09:54:03 +000015552echo "$as_me:$LINENO: checking for broken nice()" >&5
15553echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15554if test "${ac_cv_broken_nice+set}" = set; then
15555 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015556else
Martin v. Löwis11437992002-04-12 09:54:03 +000015557
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015558if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015559 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015560else
Martin v. Löwis11437992002-04-12 09:54:03 +000015561 cat >conftest.$ac_ext <<_ACEOF
15562#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015563#include "confdefs.h"
15564
15565int main()
15566{
15567 int val1 = nice(1);
15568 if (val1 != -1 && val1 == nice(2))
15569 exit(0);
15570 exit(1);
15571}
15572
Martin v. Löwis11437992002-04-12 09:54:03 +000015573_ACEOF
15574rm -f conftest$ac_exeext
15575if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15576 (eval $ac_link) 2>&5
15577 ac_status=$?
15578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15579 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15581 (eval $ac_try) 2>&5
15582 ac_status=$?
15583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15584 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015585 ac_cv_broken_nice=yes
15586else
Martin v. Löwis11437992002-04-12 09:54:03 +000015587 echo "$as_me: program exited with status $ac_status" >&5
15588echo "$as_me: failed program was:" >&5
15589cat conftest.$ac_ext >&5
15590( exit $ac_status )
15591ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015593rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15594fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015595fi
15596
Martin v. Löwis11437992002-04-12 09:54:03 +000015597echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15598echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015599if test "$ac_cv_broken_nice" = yes
15600then
Martin v. Löwis11437992002-04-12 09:54:03 +000015601
15602cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015603#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015604_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015605
15606fi
15607
Jack Jansen666b1e72001-10-31 12:11:48 +000015608# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015609echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15610echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15611if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15612 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015613else
Martin v. Löwis11437992002-04-12 09:54:03 +000015614 cat >conftest.$ac_ext <<_ACEOF
15615#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015616#include "confdefs.h"
15617#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015618#ifdef F77_DUMMY_MAIN
15619# ifdef __cplusplus
15620 extern "C"
15621# endif
15622 int F77_DUMMY_MAIN() { return 1; }
15623#endif
15624int
15625main ()
15626{
Jack Jansen666b1e72001-10-31 12:11:48 +000015627
15628 int rtn;
15629 rtn = mvwdelch(0,0,0);
15630
Martin v. Löwis11437992002-04-12 09:54:03 +000015631 ;
15632 return 0;
15633}
15634_ACEOF
15635rm -f conftest.$ac_objext
15636if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15637 (eval $ac_compile) 2>&5
15638 ac_status=$?
15639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15640 (exit $ac_status); } &&
15641 { ac_try='test -s conftest.$ac_objext'
15642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15643 (eval $ac_try) 2>&5
15644 ac_status=$?
15645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15646 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015647 ac_cv_mvwdelch_is_expression=yes
15648else
Martin v. Löwis11437992002-04-12 09:54:03 +000015649 echo "$as_me: failed program was:" >&5
15650cat conftest.$ac_ext >&5
15651ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015652fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015653rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015654fi
15655
Martin v. Löwis11437992002-04-12 09:54:03 +000015656echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15657echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015658
15659if test "$ac_cv_mvwdelch_is_expression" = yes
15660then
Martin v. Löwis11437992002-04-12 09:54:03 +000015661
15662cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015663#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015664_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015665
15666fi
15667
Martin v. Löwis11437992002-04-12 09:54:03 +000015668echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15669echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15670if test "${ac_cv_window_has_flags+set}" = set; then
15671 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015672else
Martin v. Löwis11437992002-04-12 09:54:03 +000015673 cat >conftest.$ac_ext <<_ACEOF
15674#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015675#include "confdefs.h"
15676#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015677#ifdef F77_DUMMY_MAIN
15678# ifdef __cplusplus
15679 extern "C"
15680# endif
15681 int F77_DUMMY_MAIN() { return 1; }
15682#endif
15683int
15684main ()
15685{
Jack Jansen666b1e72001-10-31 12:11:48 +000015686
15687 WINDOW *w;
15688 w->_flags = 0;
15689
Martin v. Löwis11437992002-04-12 09:54:03 +000015690 ;
15691 return 0;
15692}
15693_ACEOF
15694rm -f conftest.$ac_objext
15695if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15696 (eval $ac_compile) 2>&5
15697 ac_status=$?
15698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15699 (exit $ac_status); } &&
15700 { ac_try='test -s conftest.$ac_objext'
15701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15702 (eval $ac_try) 2>&5
15703 ac_status=$?
15704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15705 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015706 ac_cv_window_has_flags=yes
15707else
Martin v. Löwis11437992002-04-12 09:54:03 +000015708 echo "$as_me: failed program was:" >&5
15709cat conftest.$ac_ext >&5
15710ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015711fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015712rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015713fi
15714
Martin v. Löwis11437992002-04-12 09:54:03 +000015715echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15716echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015717
Jack Jansen666b1e72001-10-31 12:11:48 +000015718
15719if test "$ac_cv_window_has_flags" = yes
15720then
Martin v. Löwis11437992002-04-12 09:54:03 +000015721
15722cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015723#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015724_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015725
15726fi
15727
Guido van Rossum95713eb2000-05-18 20:53:31 +000015728# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15729# Add sys/socket.h to confdefs.h
15730cat >> confdefs.h <<\EOF
15731#ifdef HAVE_SYS_SOCKET_H
15732#include <sys/socket.h>
15733#endif
15734EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015735echo "$as_me:$LINENO: checking for socklen_t" >&5
15736echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15737if test "${ac_cv_type_socklen_t+set}" = set; then
15738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015739else
Martin v. Löwis11437992002-04-12 09:54:03 +000015740 cat >conftest.$ac_ext <<_ACEOF
15741#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015742#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015743$ac_includes_default
15744#ifdef F77_DUMMY_MAIN
15745# ifdef __cplusplus
15746 extern "C"
15747# endif
15748 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015749#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015750int
15751main ()
15752{
15753if ((socklen_t *) 0)
15754 return 0;
15755if (sizeof (socklen_t))
15756 return 0;
15757 ;
15758 return 0;
15759}
15760_ACEOF
15761rm -f conftest.$ac_objext
15762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15763 (eval $ac_compile) 2>&5
15764 ac_status=$?
15765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15766 (exit $ac_status); } &&
15767 { ac_try='test -s conftest.$ac_objext'
15768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15769 (eval $ac_try) 2>&5
15770 ac_status=$?
15771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15772 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015773 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015774else
Martin v. Löwis11437992002-04-12 09:54:03 +000015775 echo "$as_me: failed program was:" >&5
15776cat conftest.$ac_ext >&5
15777ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015778fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015779rm -f conftest.$ac_objext conftest.$ac_ext
15780fi
15781echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15782echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15783if test $ac_cv_type_socklen_t = yes; then
15784 :
15785else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015786
Martin v. Löwis11437992002-04-12 09:54:03 +000015787cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015788#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015789_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015790
15791fi
15792
Michael W. Hudson54241132001-12-07 15:38:26 +000015793
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015794#AC_MSG_CHECKING(for Modules/Setup)
15795#if test ! -f Modules/Setup ; then
15796# if test ! -d Modules ; then
15797# mkdir Modules
15798# fi
15799# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15800# AC_MSG_RESULT(creating)
15801#else
15802# AC_MSG_RESULT(already exists)
15803#fi
15804
Michael W. Hudson54241132001-12-07 15:38:26 +000015805
15806
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015807for h in `(cd $srcdir;echo Python/thread_*.h)`
15808do
15809 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15810done
15811
Michael W. Hudson54241132001-12-07 15:38:26 +000015812
Jack Jansen0b06be72002-06-21 14:48:38 +000015813SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000015814echo "$as_me:$LINENO: checking for build directories" >&5
15815echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015816for dir in $SRCDIRS; do
15817 if test ! -d $dir; then
15818 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015819 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015820done
Martin v. Löwis11437992002-04-12 09:54:03 +000015821echo "$as_me:$LINENO: result: done" >&5
15822echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015823
Guido van Rossum627b2d71993-12-24 10:39:16 +000015824# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015825ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15826cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015827# This file is a shell script that caches the results of configure
15828# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015829# scripts and configure runs, see configure's option --config-cache.
15830# It is not useful on other systems. If it contains results you don't
15831# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015832#
Martin v. Löwis11437992002-04-12 09:54:03 +000015833# config.status only pays attention to the cache file if you give it
15834# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015835#
Martin v. Löwis11437992002-04-12 09:54:03 +000015836# `ac_cv_env_foo' variables (set or unset) will be overriden when
15837# loading this file, other *unset* `ac_cv_foo' will be assigned the
15838# following values.
15839
15840_ACEOF
15841
Guido van Rossumf78abae1997-01-21 22:02:36 +000015842# The following way of writing the cache mishandles newlines in values,
15843# but we know of no workaround that is simple, portable, and efficient.
15844# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015845# Ultrix sh set writes to stderr and can't be redirected directly,
15846# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015847{
15848 (set) 2>&1 |
15849 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15850 *ac_space=\ *)
15851 # `set' does not quote correctly, so add quotes (double-quote
15852 # substitution turns \\\\ into \\, and sed turns \\ into \).
15853 sed -n \
15854 "s/'/'\\\\''/g;
15855 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15856 ;;
15857 *)
15858 # `set' quotes correctly as required by POSIX, so do not add quotes.
15859 sed -n \
15860 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15861 ;;
15862 esac;
15863} |
15864 sed '
15865 t clear
15866 : clear
15867 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15868 t end
15869 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15870 : end' >>confcache
15871if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015872 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015873 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15874 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015875 else
15876 echo "not updating unwritable cache $cache_file"
15877 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015878fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015879rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015880
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015881test "x$prefix" = xNONE && prefix=$ac_default_prefix
15882# Let make expand exec_prefix.
15883test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015884
Martin v. Löwis11437992002-04-12 09:54:03 +000015885# VPATH may cause trouble with some makes, so we remove $(srcdir),
15886# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15887# trailing colons and then remove the whole line if VPATH becomes empty
15888# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015889if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015890 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15891s/:*\$(srcdir):*/:/;
15892s/:*\${srcdir}:*/:/;
15893s/:*@srcdir@:*/:/;
15894s/^\([^=]*=[ ]*\):*/\1/;
15895s/:*$//;
15896s/^[^=]*=[ ]*$//;
15897}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015898fi
15899
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015900DEFS=-DHAVE_CONFIG_H
15901
Martin v. Löwis11437992002-04-12 09:54:03 +000015902
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015903: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015904ac_clean_files_save=$ac_clean_files
15905ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15906{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15907echo "$as_me: creating $CONFIG_STATUS" >&6;}
15908cat >$CONFIG_STATUS <<_ACEOF
15909#! $SHELL
15910# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015911# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015912# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015913# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015914
Martin v. Löwis11437992002-04-12 09:54:03 +000015915debug=false
15916SHELL=\${CONFIG_SHELL-$SHELL}
15917_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015918
Martin v. Löwis11437992002-04-12 09:54:03 +000015919cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015920
Martin v. Löwis11437992002-04-12 09:54:03 +000015921## --------------------- ##
15922## M4sh Initialization. ##
15923## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015924
Martin v. Löwis11437992002-04-12 09:54:03 +000015925# Be Bourne compatible
15926if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15927 emulate sh
15928 NULLCMD=:
15929elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15930 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015931fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015932
Martin v. Löwis11437992002-04-12 09:54:03 +000015933# NLS nuisances.
15934# Support unset when possible.
15935if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15936 as_unset=unset
15937else
15938 as_unset=false
15939fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015940
Martin v. Löwis11437992002-04-12 09:54:03 +000015941(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15942 { $as_unset LANG || test "${LANG+set}" != set; } ||
15943 { LANG=C; export LANG; }
15944(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15945 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15946 { LC_ALL=C; export LC_ALL; }
15947(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15948 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15949 { LC_TIME=C; export LC_TIME; }
15950(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15951 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15952 { LC_CTYPE=C; export LC_CTYPE; }
15953(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15954 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15955 { LANGUAGE=C; export LANGUAGE; }
15956(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15957 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15958 { LC_COLLATE=C; export LC_COLLATE; }
15959(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15960 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15961 { LC_NUMERIC=C; export LC_NUMERIC; }
15962(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15963 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15964 { LC_MESSAGES=C; export LC_MESSAGES; }
15965
15966
15967# Name of the executable.
15968as_me=`(basename "$0") 2>/dev/null ||
15969$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15970 X"$0" : 'X\(//\)$' \| \
15971 X"$0" : 'X\(/\)$' \| \
15972 . : '\(.\)' 2>/dev/null ||
15973echo X/"$0" |
15974 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15975 /^X\/\(\/\/\)$/{ s//\1/; q; }
15976 /^X\/\(\/\).*/{ s//\1/; q; }
15977 s/.*/./; q'`
15978
15979# PATH needs CR, and LINENO needs CR and PATH.
15980# Avoid depending upon Character Ranges.
15981as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15982as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15983as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15984as_cr_digits='0123456789'
15985as_cr_alnum=$as_cr_Letters$as_cr_digits
15986
15987# The user is always right.
15988if test "${PATH_SEPARATOR+set}" != set; then
15989 echo "#! /bin/sh" >conftest.sh
15990 echo "exit 0" >>conftest.sh
15991 chmod +x conftest.sh
15992 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15993 PATH_SEPARATOR=';'
15994 else
15995 PATH_SEPARATOR=:
15996 fi
15997 rm -f conftest.sh
15998fi
15999
16000
16001 as_lineno_1=$LINENO
16002 as_lineno_2=$LINENO
16003 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16004 test "x$as_lineno_1" != "x$as_lineno_2" &&
16005 test "x$as_lineno_3" = "x$as_lineno_2" || {
16006 # Find who we are. Look in the path if we contain no path at all
16007 # relative or not.
16008 case $0 in
16009 *[\\/]* ) as_myself=$0 ;;
16010 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16011for as_dir in $PATH
16012do
16013 IFS=$as_save_IFS
16014 test -z "$as_dir" && as_dir=.
16015 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16016done
16017
16018 ;;
16019 esac
16020 # We did not find ourselves, most probably we were run as `sh COMMAND'
16021 # in which case we are not to be found in the path.
16022 if test "x$as_myself" = x; then
16023 as_myself=$0
16024 fi
16025 if test ! -f "$as_myself"; then
16026 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16027echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16028 { (exit 1); exit 1; }; }
16029 fi
16030 case $CONFIG_SHELL in
16031 '')
16032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16033for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16034do
16035 IFS=$as_save_IFS
16036 test -z "$as_dir" && as_dir=.
16037 for as_base in sh bash ksh sh5; do
16038 case $as_dir in
16039 /*)
16040 if ("$as_dir/$as_base" -c '
16041 as_lineno_1=$LINENO
16042 as_lineno_2=$LINENO
16043 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16044 test "x$as_lineno_1" != "x$as_lineno_2" &&
16045 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16046 CONFIG_SHELL=$as_dir/$as_base
16047 export CONFIG_SHELL
16048 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16049 fi;;
16050 esac
16051 done
16052done
16053;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016054 esac
16055
Martin v. Löwis11437992002-04-12 09:54:03 +000016056 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16057 # uniformly replaced by the line number. The first 'sed' inserts a
16058 # line-number line before each line; the second 'sed' does the real
16059 # work. The second script uses 'N' to pair each line-number line
16060 # with the numbered line, and appends trailing '-' during
16061 # substitution so that $LINENO is not a special case at line end.
16062 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16063 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16064 sed '=' <$as_myself |
16065 sed '
16066 N
16067 s,$,-,
16068 : loop
16069 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16070 t loop
16071 s,-$,,
16072 s,^['$as_cr_digits']*\n,,
16073 ' >$as_me.lineno &&
16074 chmod +x $as_me.lineno ||
16075 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16076echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16077 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016078
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 # Don't try to exec as it changes $[0], causing all sort of problems
16080 # (the dirname of $[0] is not the place where we might find the
16081 # original and so on. Autoconf is especially sensible to this).
16082 . ./$as_me.lineno
16083 # Exit status is that of the last command.
16084 exit
16085}
16086
16087
16088case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16089 *c*,-n*) ECHO_N= ECHO_C='
16090' ECHO_T=' ' ;;
16091 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16092 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16093esac
16094
16095if expr a : '\(a\)' >/dev/null 2>&1; then
16096 as_expr=expr
16097else
16098 as_expr=false
16099fi
16100
16101rm -f conf$$ conf$$.exe conf$$.file
16102echo >conf$$.file
16103if ln -s conf$$.file conf$$ 2>/dev/null; then
16104 # We could just check for DJGPP; but this test a) works b) is more generic
16105 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16106 if test -f conf$$.exe; then
16107 # Don't use ln at all; we don't have any links
16108 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016109 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016110 as_ln_s='ln -s'
16111 fi
16112elif ln conf$$.file conf$$ 2>/dev/null; then
16113 as_ln_s=ln
16114else
16115 as_ln_s='cp -p'
16116fi
16117rm -f conf$$ conf$$.exe conf$$.file
16118
16119as_executable_p="test -f"
16120
16121# Sed expression to map a string onto a valid CPP name.
16122as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16123
16124# Sed expression to map a string onto a valid variable name.
16125as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16126
16127
16128# IFS
16129# We need space, tab and new line, in precisely that order.
16130as_nl='
16131'
16132IFS=" $as_nl"
16133
16134# CDPATH.
16135$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16136
16137exec 6>&1
16138
16139# Open the log real soon, to keep \$[0] and so on meaningful, and to
16140# report actual input values of CONFIG_FILES etc. instead of their
16141# values after options handling. Logging --version etc. is OK.
16142exec 5>>config.log
16143{
16144 echo
16145 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16146## Running $as_me. ##
16147_ASBOX
16148} >&5
16149cat >&5 <<_CSEOF
16150
16151This file was extended by $as_me, which was
16152generated by GNU Autoconf 2.53. Invocation command line was
16153
16154 CONFIG_FILES = $CONFIG_FILES
16155 CONFIG_HEADERS = $CONFIG_HEADERS
16156 CONFIG_LINKS = $CONFIG_LINKS
16157 CONFIG_COMMANDS = $CONFIG_COMMANDS
16158 $ $0 $@
16159
16160_CSEOF
16161echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16162echo >&5
16163_ACEOF
16164
16165# Files that config.status was made for.
16166if test -n "$ac_config_files"; then
16167 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16168fi
16169
16170if test -n "$ac_config_headers"; then
16171 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16172fi
16173
16174if test -n "$ac_config_links"; then
16175 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16176fi
16177
16178if test -n "$ac_config_commands"; then
16179 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16180fi
16181
16182cat >>$CONFIG_STATUS <<\_ACEOF
16183
16184ac_cs_usage="\
16185\`$as_me' instantiates files from templates according to the
16186current configuration.
16187
16188Usage: $0 [OPTIONS] [FILE]...
16189
16190 -h, --help print this help, then exit
16191 -V, --version print version number, then exit
16192 -d, --debug don't remove temporary files
16193 --recheck update $as_me by reconfiguring in the same conditions
16194 --file=FILE[:TEMPLATE]
16195 instantiate the configuration file FILE
16196 --header=FILE[:TEMPLATE]
16197 instantiate the configuration header FILE
16198
16199Configuration files:
16200$config_files
16201
16202Configuration headers:
16203$config_headers
16204
16205Report bugs to <bug-autoconf@gnu.org>."
16206_ACEOF
16207
16208cat >>$CONFIG_STATUS <<_ACEOF
16209ac_cs_version="\\
16210config.status
16211configured by $0, generated by GNU Autoconf 2.53,
16212 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16213
16214Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16215Free Software Foundation, Inc.
16216This config.status script is free software; the Free Software Foundation
16217gives unlimited permission to copy, distribute and modify it."
16218srcdir=$srcdir
16219INSTALL="$INSTALL"
16220_ACEOF
16221
16222cat >>$CONFIG_STATUS <<\_ACEOF
16223# If no file are specified by the user, then we need to provide default
16224# value. By we need to know if files were specified by the user.
16225ac_need_defaults=:
16226while test $# != 0
16227do
16228 case $1 in
16229 --*=*)
16230 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16231 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16232 shift
16233 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16234 shift
16235 ;;
16236 -*);;
16237 *) # This is not an option, so the user has probably given explicit
16238 # arguments.
16239 ac_need_defaults=false;;
16240 esac
16241
16242 case $1 in
16243 # Handling of the options.
16244_ACEOF
16245cat >>$CONFIG_STATUS <<_ACEOF
16246 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16247 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16248 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16249_ACEOF
16250cat >>$CONFIG_STATUS <<\_ACEOF
16251 --version | --vers* | -V )
16252 echo "$ac_cs_version"; exit 0 ;;
16253 --he | --h)
16254 # Conflict between --help and --header
16255 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16256Try \`$0 --help' for more information." >&5
16257echo "$as_me: error: ambiguous option: $1
16258Try \`$0 --help' for more information." >&2;}
16259 { (exit 1); exit 1; }; };;
16260 --help | --hel | -h )
16261 echo "$ac_cs_usage"; exit 0 ;;
16262 --debug | --d* | -d )
16263 debug=: ;;
16264 --file | --fil | --fi | --f )
16265 shift
16266 CONFIG_FILES="$CONFIG_FILES $1"
16267 ac_need_defaults=false;;
16268 --header | --heade | --head | --hea )
16269 shift
16270 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16271 ac_need_defaults=false;;
16272
16273 # This is an error.
16274 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16275Try \`$0 --help' for more information." >&5
16276echo "$as_me: error: unrecognized option: $1
16277Try \`$0 --help' for more information." >&2;}
16278 { (exit 1); exit 1; }; } ;;
16279
16280 *) ac_config_targets="$ac_config_targets $1" ;;
16281
16282 esac
16283 shift
16284done
16285
16286_ACEOF
16287
16288
16289
16290
16291
16292cat >>$CONFIG_STATUS <<\_ACEOF
16293for ac_config_target in $ac_config_targets
16294do
16295 case "$ac_config_target" in
16296 # Handling of arguments.
16297 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16298 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16299 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16300 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16301echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16302 { (exit 1); exit 1; }; };;
16303 esac
16304done
16305
16306# If the user did not use the arguments to specify the items to instantiate,
16307# then the envvar interface is used. Set only those that are not.
16308# We use the long form for the default assignment because of an extremely
16309# bizarre bug on SunOS 4.1.3.
16310if $ac_need_defaults; then
16311 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16312 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16313fi
16314
16315# Create a temporary directory, and hook for its removal unless debugging.
16316$debug ||
16317{
16318 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16319 trap '{ (exit 1); exit 1; }' 1 2 13 15
16320}
16321
16322# Create a (secure) tmp directory for tmp files.
16323: ${TMPDIR=/tmp}
16324{
16325 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16326 test -n "$tmp" && test -d "$tmp"
16327} ||
16328{
16329 tmp=$TMPDIR/cs$$-$RANDOM
16330 (umask 077 && mkdir $tmp)
16331} ||
16332{
16333 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16334 { (exit 1); exit 1; }
16335}
16336
16337_ACEOF
16338
16339cat >>$CONFIG_STATUS <<_ACEOF
16340
16341#
16342# CONFIG_FILES section.
16343#
16344
16345# No need to generate the scripts if there are no CONFIG_FILES.
16346# This happens for instance when ./config.status config.h
16347if test -n "\$CONFIG_FILES"; then
16348 # Protect against being on the right side of a sed subst in config.status.
16349 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16350 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16351s,@SHELL@,$SHELL,;t t
16352s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16353s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16354s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16355s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16356s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16357s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16358s,@exec_prefix@,$exec_prefix,;t t
16359s,@prefix@,$prefix,;t t
16360s,@program_transform_name@,$program_transform_name,;t t
16361s,@bindir@,$bindir,;t t
16362s,@sbindir@,$sbindir,;t t
16363s,@libexecdir@,$libexecdir,;t t
16364s,@datadir@,$datadir,;t t
16365s,@sysconfdir@,$sysconfdir,;t t
16366s,@sharedstatedir@,$sharedstatedir,;t t
16367s,@localstatedir@,$localstatedir,;t t
16368s,@libdir@,$libdir,;t t
16369s,@includedir@,$includedir,;t t
16370s,@oldincludedir@,$oldincludedir,;t t
16371s,@infodir@,$infodir,;t t
16372s,@mandir@,$mandir,;t t
16373s,@build_alias@,$build_alias,;t t
16374s,@host_alias@,$host_alias,;t t
16375s,@target_alias@,$target_alias,;t t
16376s,@DEFS@,$DEFS,;t t
16377s,@ECHO_C@,$ECHO_C,;t t
16378s,@ECHO_N@,$ECHO_N,;t t
16379s,@ECHO_T@,$ECHO_T,;t t
16380s,@LIBS@,$LIBS,;t t
16381s,@VERSION@,$VERSION,;t t
16382s,@SOVERSION@,$SOVERSION,;t t
16383s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16384s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16385s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16386s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16387s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16388s,@MACHDEP@,$MACHDEP,;t t
16389s,@SGI_ABI@,$SGI_ABI,;t t
16390s,@CXX@,$CXX,;t t
16391s,@MAINOBJ@,$MAINOBJ,;t t
16392s,@EXEEXT@,$EXEEXT,;t t
16393s,@CC@,$CC,;t t
16394s,@CFLAGS@,$CFLAGS,;t t
16395s,@LDFLAGS@,$LDFLAGS,;t t
16396s,@CPPFLAGS@,$CPPFLAGS,;t t
16397s,@ac_ct_CC@,$ac_ct_CC,;t t
16398s,@OBJEXT@,$OBJEXT,;t t
16399s,@CPP@,$CPP,;t t
16400s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16401s,@LIBRARY@,$LIBRARY,;t t
16402s,@LDLIBRARY@,$LDLIBRARY,;t t
16403s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16404s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16405s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16406s,@INSTSONAME@,$INSTSONAME,;t t
16407s,@RUNSHARED@,$RUNSHARED,;t t
16408s,@LINKCC@,$LINKCC,;t t
16409s,@RANLIB@,$RANLIB,;t t
16410s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16411s,@AR@,$AR,;t t
16412s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16413s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16414s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16415s,@LN@,$LN,;t t
16416s,@OPT@,$OPT,;t t
16417s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16418s,@SO@,$SO,;t t
16419s,@LDSHARED@,$LDSHARED,;t t
16420s,@BLDSHARED@,$BLDSHARED,;t t
16421s,@CCSHARED@,$CCSHARED,;t t
16422s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16423s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016424s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016425s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16426s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16427s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16428s,@LDLAST@,$LDLAST,;t t
16429s,@THREADOBJ@,$THREADOBJ,;t t
16430s,@DLINCLDIR@,$DLINCLDIR,;t t
16431s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16432s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16433s,@LIBOBJS@,$LIBOBJS,;t t
16434s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16435s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16436s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16437s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16438s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16439s,@LIBM@,$LIBM,;t t
16440s,@LIBC@,$LIBC,;t t
16441s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16442s,@THREADHEADERS@,$THREADHEADERS,;t t
16443s,@SRCDIRS@,$SRCDIRS,;t t
16444CEOF
16445
16446_ACEOF
16447
16448 cat >>$CONFIG_STATUS <<\_ACEOF
16449 # Split the substitutions into bite-sized pieces for seds with
16450 # small command number limits, like on Digital OSF/1 and HP-UX.
16451 ac_max_sed_lines=48
16452 ac_sed_frag=1 # Number of current file.
16453 ac_beg=1 # First line for current file.
16454 ac_end=$ac_max_sed_lines # Line after last line for current file.
16455 ac_more_lines=:
16456 ac_sed_cmds=
16457 while $ac_more_lines; do
16458 if test $ac_beg -gt 1; then
16459 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16460 else
16461 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16462 fi
16463 if test ! -s $tmp/subs.frag; then
16464 ac_more_lines=false
16465 else
16466 # The purpose of the label and of the branching condition is to
16467 # speed up the sed processing (if there are no `@' at all, there
16468 # is no need to browse any of the substitutions).
16469 # These are the two extra sed commands mentioned above.
16470 (echo ':t
16471 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16472 if test -z "$ac_sed_cmds"; then
16473 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16474 else
16475 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16476 fi
16477 ac_sed_frag=`expr $ac_sed_frag + 1`
16478 ac_beg=$ac_end
16479 ac_end=`expr $ac_end + $ac_max_sed_lines`
16480 fi
16481 done
16482 if test -z "$ac_sed_cmds"; then
16483 ac_sed_cmds=cat
16484 fi
16485fi # test -n "$CONFIG_FILES"
16486
16487_ACEOF
16488cat >>$CONFIG_STATUS <<\_ACEOF
16489for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16490 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16491 case $ac_file in
16492 - | *:- | *:-:* ) # input from stdin
16493 cat >$tmp/stdin
16494 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16495 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16496 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16497 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16498 * ) ac_file_in=$ac_file.in ;;
16499 esac
16500
16501 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16502 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16503$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16504 X"$ac_file" : 'X\(//\)[^/]' \| \
16505 X"$ac_file" : 'X\(//\)$' \| \
16506 X"$ac_file" : 'X\(/\)' \| \
16507 . : '\(.\)' 2>/dev/null ||
16508echo X"$ac_file" |
16509 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16510 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16511 /^X\(\/\/\)$/{ s//\1/; q; }
16512 /^X\(\/\).*/{ s//\1/; q; }
16513 s/.*/./; q'`
16514 { case "$ac_dir" in
16515 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16516 *) as_incr_dir=.;;
16517esac
16518as_dummy="$ac_dir"
16519for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16520 case $as_mkdir_dir in
16521 # Skip DOS drivespec
16522 ?:) as_incr_dir=$as_mkdir_dir ;;
16523 *)
16524 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16525 test -d "$as_incr_dir" ||
16526 mkdir "$as_incr_dir" ||
16527 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16528echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16529 { (exit 1); exit 1; }; }
16530 ;;
16531 esac
16532done; }
16533
16534 ac_builddir=.
16535
16536if test "$ac_dir" != .; then
16537 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16538 # A "../" for each directory in $ac_dir_suffix.
16539 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16540else
16541 ac_dir_suffix= ac_top_builddir=
16542fi
16543
16544case $srcdir in
16545 .) # No --srcdir option. We are building in place.
16546 ac_srcdir=.
16547 if test -z "$ac_top_builddir"; then
16548 ac_top_srcdir=.
16549 else
16550 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16551 fi ;;
16552 [\\/]* | ?:[\\/]* ) # Absolute path.
16553 ac_srcdir=$srcdir$ac_dir_suffix;
16554 ac_top_srcdir=$srcdir ;;
16555 *) # Relative path.
16556 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16557 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16558esac
16559# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16560# absolute.
16561ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16562ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16563ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16564ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16565
16566
16567 case $INSTALL in
16568 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16569 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16570 esac
16571
16572 if test x"$ac_file" != x-; then
16573 { echo "$as_me:$LINENO: creating $ac_file" >&5
16574echo "$as_me: creating $ac_file" >&6;}
16575 rm -f "$ac_file"
16576 fi
16577 # Let's still pretend it is `configure' which instantiates (i.e., don't
16578 # use $as_me), people would be surprised to read:
16579 # /* config.h. Generated by config.status. */
16580 if test x"$ac_file" = x-; then
16581 configure_input=
16582 else
16583 configure_input="$ac_file. "
16584 fi
16585 configure_input=$configure_input"Generated from `echo $ac_file_in |
16586 sed 's,.*/,,'` by configure."
16587
16588 # First look for the input files in the build tree, otherwise in the
16589 # src tree.
16590 ac_file_inputs=`IFS=:
16591 for f in $ac_file_in; do
16592 case $f in
16593 -) echo $tmp/stdin ;;
16594 [\\/$]*)
16595 # Absolute (can't be DOS-style, as IFS=:)
16596 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16597echo "$as_me: error: cannot find input file: $f" >&2;}
16598 { (exit 1); exit 1; }; }
16599 echo $f;;
16600 *) # Relative
16601 if test -f "$f"; then
16602 # Build tree
16603 echo $f
16604 elif test -f "$srcdir/$f"; then
16605 # Source tree
16606 echo $srcdir/$f
16607 else
16608 # /dev/null tree
16609 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16610echo "$as_me: error: cannot find input file: $f" >&2;}
16611 { (exit 1); exit 1; }; }
16612 fi;;
16613 esac
16614 done` || { (exit 1); exit 1; }
16615_ACEOF
16616cat >>$CONFIG_STATUS <<_ACEOF
16617 sed "$ac_vpsub
16618$extrasub
16619_ACEOF
16620cat >>$CONFIG_STATUS <<\_ACEOF
16621:t
16622/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16623s,@configure_input@,$configure_input,;t t
16624s,@srcdir@,$ac_srcdir,;t t
16625s,@abs_srcdir@,$ac_abs_srcdir,;t t
16626s,@top_srcdir@,$ac_top_srcdir,;t t
16627s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16628s,@builddir@,$ac_builddir,;t t
16629s,@abs_builddir@,$ac_abs_builddir,;t t
16630s,@top_builddir@,$ac_top_builddir,;t t
16631s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16632s,@INSTALL@,$ac_INSTALL,;t t
16633" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16634 rm -f $tmp/stdin
16635 if test x"$ac_file" != x-; then
16636 mv $tmp/out $ac_file
16637 else
16638 cat $tmp/out
16639 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016640 fi
16641
Martin v. Löwis11437992002-04-12 09:54:03 +000016642done
16643_ACEOF
16644cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016645
Martin v. Löwis11437992002-04-12 09:54:03 +000016646#
16647# CONFIG_HEADER section.
16648#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016649
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016650# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16651# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016652#
16653# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016654ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16655ac_dB='[ ].*$,\1#\2'
16656ac_dC=' '
16657ac_dD=',;t'
16658# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16659ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16660ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016661ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016662ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016663
Martin v. Löwis11437992002-04-12 09:54:03 +000016664for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016665 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016666 case $ac_file in
16667 - | *:- | *:-:* ) # input from stdin
16668 cat >$tmp/stdin
16669 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16670 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16671 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16672 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16673 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016674 esac
16675
Martin v. Löwis11437992002-04-12 09:54:03 +000016676 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16677echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016678
Martin v. Löwis11437992002-04-12 09:54:03 +000016679 # First look for the input files in the build tree, otherwise in the
16680 # src tree.
16681 ac_file_inputs=`IFS=:
16682 for f in $ac_file_in; do
16683 case $f in
16684 -) echo $tmp/stdin ;;
16685 [\\/$]*)
16686 # Absolute (can't be DOS-style, as IFS=:)
16687 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16688echo "$as_me: error: cannot find input file: $f" >&2;}
16689 { (exit 1); exit 1; }; }
16690 echo $f;;
16691 *) # Relative
16692 if test -f "$f"; then
16693 # Build tree
16694 echo $f
16695 elif test -f "$srcdir/$f"; then
16696 # Source tree
16697 echo $srcdir/$f
16698 else
16699 # /dev/null tree
16700 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16701echo "$as_me: error: cannot find input file: $f" >&2;}
16702 { (exit 1); exit 1; }; }
16703 fi;;
16704 esac
16705 done` || { (exit 1); exit 1; }
16706 # Remove the trailing spaces.
16707 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016708
Martin v. Löwis11437992002-04-12 09:54:03 +000016709_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016710
Martin v. Löwis11437992002-04-12 09:54:03 +000016711# Transform confdefs.h into two sed scripts, `conftest.defines' and
16712# `conftest.undefs', that substitutes the proper values into
16713# config.h.in to produce config.h. The first handles `#define'
16714# templates, and the second `#undef' templates.
16715# And first: Protect against being on the right side of a sed subst in
16716# config.status. Protect against being in an unquoted here document
16717# in config.status.
16718rm -f conftest.defines conftest.undefs
16719# Using a here document instead of a string reduces the quoting nightmare.
16720# Putting comments in sed scripts is not portable.
16721#
16722# `end' is used to avoid that the second main sed command (meant for
16723# 0-ary CPP macros) applies to n-ary macro definitions.
16724# See the Autoconf documentation for `clear'.
16725cat >confdef2sed.sed <<\_ACEOF
16726s/[\\&,]/\\&/g
16727s,[\\$`],\\&,g
16728t clear
16729: clear
16730s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16731t end
16732s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16733: end
16734_ACEOF
16735# If some macros were called several times there might be several times
16736# the same #defines, which is useless. Nevertheless, we may not want to
16737# sort them, since we want the *last* AC-DEFINE to be honored.
16738uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16739sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16740rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016741
16742# This sed command replaces #undef with comments. This is necessary, for
16743# example, in the case of _POSIX_SOURCE, which is predefined and required
16744# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016745cat >>conftest.undefs <<\_ACEOF
16746s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16747_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016748
Martin v. Löwis11437992002-04-12 09:54:03 +000016749# Break up conftest.defines because some shells have a limit on the size
16750# of here documents, and old seds have small limits too (100 cmds).
16751echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16752echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16753echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16754echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016755rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016756while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016757do
Martin v. Löwis11437992002-04-12 09:54:03 +000016758 # Write a limited-size here document to $tmp/defines.sed.
16759 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16760 # Speed up: don't consider the non `#define' lines.
16761 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16762 # Work around the forget-to-reset-the-flag bug.
16763 echo 't clr' >>$CONFIG_STATUS
16764 echo ': clr' >>$CONFIG_STATUS
16765 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016766 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016767 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16768 rm -f $tmp/in
16769 mv $tmp/out $tmp/in
16770' >>$CONFIG_STATUS
16771 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16772 rm -f conftest.defines
16773 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016774done
Martin v. Löwis11437992002-04-12 09:54:03 +000016775rm -f conftest.defines
16776echo ' fi # egrep' >>$CONFIG_STATUS
16777echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016778
Martin v. Löwis11437992002-04-12 09:54:03 +000016779# Break up conftest.undefs because some shells have a limit on the size
16780# of here documents, and old seds have small limits too (100 cmds).
16781echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16782rm -f conftest.tail
16783while grep . conftest.undefs >/dev/null
16784do
16785 # Write a limited-size here document to $tmp/undefs.sed.
16786 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16787 # Speed up: don't consider the non `#undef'
16788 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16789 # Work around the forget-to-reset-the-flag bug.
16790 echo 't clr' >>$CONFIG_STATUS
16791 echo ': clr' >>$CONFIG_STATUS
16792 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16793 echo 'CEOF
16794 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16795 rm -f $tmp/in
16796 mv $tmp/out $tmp/in
16797' >>$CONFIG_STATUS
16798 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16799 rm -f conftest.undefs
16800 mv conftest.tail conftest.undefs
16801done
16802rm -f conftest.undefs
16803
16804cat >>$CONFIG_STATUS <<\_ACEOF
16805 # Let's still pretend it is `configure' which instantiates (i.e., don't
16806 # use $as_me), people would be surprised to read:
16807 # /* config.h. Generated by config.status. */
16808 if test x"$ac_file" = x-; then
16809 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016810 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016811 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016813 cat $tmp/in >>$tmp/config.h
16814 rm -f $tmp/in
16815 if test x"$ac_file" != x-; then
16816 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16817 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16818echo "$as_me: $ac_file is unchanged" >&6;}
16819 else
16820 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16821$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16822 X"$ac_file" : 'X\(//\)[^/]' \| \
16823 X"$ac_file" : 'X\(//\)$' \| \
16824 X"$ac_file" : 'X\(/\)' \| \
16825 . : '\(.\)' 2>/dev/null ||
16826echo X"$ac_file" |
16827 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16828 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16829 /^X\(\/\/\)$/{ s//\1/; q; }
16830 /^X\(\/\).*/{ s//\1/; q; }
16831 s/.*/./; q'`
16832 { case "$ac_dir" in
16833 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16834 *) as_incr_dir=.;;
16835esac
16836as_dummy="$ac_dir"
16837for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16838 case $as_mkdir_dir in
16839 # Skip DOS drivespec
16840 ?:) as_incr_dir=$as_mkdir_dir ;;
16841 *)
16842 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16843 test -d "$as_incr_dir" ||
16844 mkdir "$as_incr_dir" ||
16845 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16846echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16847 { (exit 1); exit 1; }; }
16848 ;;
16849 esac
16850done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016851
Martin v. Löwis11437992002-04-12 09:54:03 +000016852 rm -f $ac_file
16853 mv $tmp/config.h $ac_file
16854 fi
16855 else
16856 cat $tmp/config.h
16857 rm -f $tmp/config.h
16858 fi
16859done
16860_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016861
Martin v. Löwis11437992002-04-12 09:54:03 +000016862cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016863
Martin v. Löwis11437992002-04-12 09:54:03 +000016864{ (exit 0); exit 0; }
16865_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016866chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016867ac_clean_files=$ac_clean_files_save
16868
16869
16870# configure is writing to config.log, and then calls config.status.
16871# config.status does its own redirection, appending to config.log.
16872# Unfortunately, on DOS this fails, as config.log is still kept open
16873# by configure, so config.status won't be able to write to it; its
16874# output is simply discarded. So we exec the FD to /dev/null,
16875# effectively closing config.log, so it can be properly (re)opened and
16876# appended to by config.status. When coming back to configure, we
16877# need to make the FD available again.
16878if test "$no_create" != yes; then
16879 ac_cs_success=:
16880 exec 5>/dev/null
16881 $SHELL $CONFIG_STATUS || ac_cs_success=false
16882 exec 5>>config.log
16883 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16884 # would make configure fail if this is the last instruction.
16885 $ac_cs_success || { (exit 1); exit 1; }
16886fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016887
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016888
16889echo "creating Setup"
16890if test ! -f Modules/Setup
16891then
16892 cp $srcdir/Modules/Setup.dist Modules/Setup
16893fi
16894
16895echo "creating Setup.local"
16896if test ! -f Modules/Setup.local
16897then
16898 echo "# Edit this file for local setup changes" >Modules/Setup.local
16899fi
16900
16901echo "creating Makefile"
16902$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16903 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016904 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016905mv config.c Modules