blob: 62d66a1399b39680e16084d96bad2bbd06770aad [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisd61888b2002-09-30 11:17:27 +00002# From configure.in Revision: 1.347 .
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 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003139 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003140 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
Neal Norwitzd957f392002-09-25 21:26:19 +00003448 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003449 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
Neal Norwitz11690112002-07-30 01:08:28 +00004319# Check whether using makedev requires defining _OSF_SOURCE
4320echo "$as_me:$LINENO: checking for makedev" >&5
4321echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4322cat >conftest.$ac_ext <<_ACEOF
4323#line $LINENO "configure"
4324#include "confdefs.h"
4325 #include <sys/types.h>
4326#ifdef F77_DUMMY_MAIN
4327# ifdef __cplusplus
4328 extern "C"
4329# endif
4330 int F77_DUMMY_MAIN() { return 1; }
4331#endif
4332int
4333main ()
4334{
4335 makedev(0, 0)
4336 ;
4337 return 0;
4338}
4339_ACEOF
4340rm -f conftest.$ac_objext conftest$ac_exeext
4341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4342 (eval $ac_link) 2>&5
4343 ac_status=$?
4344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4345 (exit $ac_status); } &&
4346 { ac_try='test -s conftest$ac_exeext'
4347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4348 (eval $ac_try) 2>&5
4349 ac_status=$?
4350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4351 (exit $ac_status); }; }; then
4352 ac_cv_has_makedev=yes
4353else
4354 echo "$as_me: failed program was:" >&5
4355cat conftest.$ac_ext >&5
4356ac_cv_has_makedev=no
4357fi
4358rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4359if test "$ac_cv_has_makedev" = "no"; then
4360 # we didn't link, try if _OSF_SOURCE will allow us to link
4361 cat >conftest.$ac_ext <<_ACEOF
4362#line $LINENO "configure"
4363#include "confdefs.h"
4364
4365 #define _OSF_SOURCE 1
4366 #include <sys/types.h>
4367
4368#ifdef F77_DUMMY_MAIN
4369# ifdef __cplusplus
4370 extern "C"
4371# endif
4372 int F77_DUMMY_MAIN() { return 1; }
4373#endif
4374int
4375main ()
4376{
4377 makedev(0, 0)
4378 ;
4379 return 0;
4380}
4381_ACEOF
4382rm -f conftest.$ac_objext conftest$ac_exeext
4383if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4384 (eval $ac_link) 2>&5
4385 ac_status=$?
4386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4387 (exit $ac_status); } &&
4388 { ac_try='test -s conftest$ac_exeext'
4389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4390 (eval $ac_try) 2>&5
4391 ac_status=$?
4392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4393 (exit $ac_status); }; }; then
4394 ac_cv_has_makedev=yes
4395else
4396 echo "$as_me: failed program was:" >&5
4397cat conftest.$ac_ext >&5
4398ac_cv_has_makedev=no
4399fi
4400rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4401 if test "$ac_cv_has_makedev" = "yes"; then
4402
4403cat >>confdefs.h <<\_ACEOF
4404#define _OSF_SOURCE 1
4405_ACEOF
4406
4407 fi
4408fi
4409echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4410echo "${ECHO_T}$ac_cv_has_makedev" >&6
4411if test "$ac_cv_has_makedev" = "yes"; then
4412
4413cat >>confdefs.h <<\_ACEOF
4414#define HAVE_MAKEDEV 1
4415_ACEOF
4416
4417fi
4418
Guido van Rossum810cc512001-09-09 23:51:39 +00004419# Two defines needed to enable largefile support on various platforms
4420# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004421
Martin v. Löwis11437992002-04-12 09:54:03 +00004422cat >>confdefs.h <<\_ACEOF
4423#define _LARGEFILE_SOURCE 1
4424_ACEOF
4425
4426
4427cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004428#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004429_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004430
Michael W. Hudson54241132001-12-07 15:38:26 +00004431
Guido van Rossum84e7b241996-08-19 21:59:00 +00004432# Add some code to confdefs.h so that the test for off_t works on SCO
4433cat >> confdefs.h <<\EOF
4434#if defined(SCO_DS)
4435#undef _OFF_T
4436#endif
4437EOF
4438
Guido van Rossumef2255b2000-03-10 22:30:29 +00004439# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004440echo "$as_me:$LINENO: checking for mode_t" >&5
4441echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4442if test "${ac_cv_type_mode_t+set}" = set; then
4443 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004444else
Martin v. Löwis11437992002-04-12 09:54:03 +00004445 cat >conftest.$ac_ext <<_ACEOF
4446#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004447#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004448$ac_includes_default
4449#ifdef F77_DUMMY_MAIN
4450# ifdef __cplusplus
4451 extern "C"
4452# endif
4453 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004455int
4456main ()
4457{
4458if ((mode_t *) 0)
4459 return 0;
4460if (sizeof (mode_t))
4461 return 0;
4462 ;
4463 return 0;
4464}
4465_ACEOF
4466rm -f conftest.$ac_objext
4467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4468 (eval $ac_compile) 2>&5
4469 ac_status=$?
4470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4471 (exit $ac_status); } &&
4472 { ac_try='test -s conftest.$ac_objext'
4473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4474 (eval $ac_try) 2>&5
4475 ac_status=$?
4476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4477 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004478 ac_cv_type_mode_t=yes
4479else
Martin v. Löwis11437992002-04-12 09:54:03 +00004480 echo "$as_me: failed program was:" >&5
4481cat conftest.$ac_ext >&5
4482ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004483fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004484rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004485fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004486echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4487echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4488if test $ac_cv_type_mode_t = yes; then
4489 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004490else
Martin v. Löwis11437992002-04-12 09:54:03 +00004491
4492cat >>confdefs.h <<_ACEOF
4493#define mode_t int
4494_ACEOF
4495
4496fi
4497
4498echo "$as_me:$LINENO: checking for off_t" >&5
4499echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4500if test "${ac_cv_type_off_t+set}" = set; then
4501 echo $ECHO_N "(cached) $ECHO_C" >&6
4502else
4503 cat >conftest.$ac_ext <<_ACEOF
4504#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004505#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004506$ac_includes_default
4507#ifdef F77_DUMMY_MAIN
4508# ifdef __cplusplus
4509 extern "C"
4510# endif
4511 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004513int
4514main ()
4515{
4516if ((off_t *) 0)
4517 return 0;
4518if (sizeof (off_t))
4519 return 0;
4520 ;
4521 return 0;
4522}
4523_ACEOF
4524rm -f conftest.$ac_objext
4525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4526 (eval $ac_compile) 2>&5
4527 ac_status=$?
4528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4529 (exit $ac_status); } &&
4530 { ac_try='test -s conftest.$ac_objext'
4531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4532 (eval $ac_try) 2>&5
4533 ac_status=$?
4534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4535 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004536 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004537else
Martin v. Löwis11437992002-04-12 09:54:03 +00004538 echo "$as_me: failed program was:" >&5
4539cat conftest.$ac_ext >&5
4540ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004541fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004542rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004544echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4545echo "${ECHO_T}$ac_cv_type_off_t" >&6
4546if test $ac_cv_type_off_t = yes; then
4547 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004548else
Martin v. Löwis11437992002-04-12 09:54:03 +00004549
4550cat >>confdefs.h <<_ACEOF
4551#define off_t long
4552_ACEOF
4553
4554fi
4555
4556echo "$as_me:$LINENO: checking for pid_t" >&5
4557echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4558if test "${ac_cv_type_pid_t+set}" = set; then
4559 echo $ECHO_N "(cached) $ECHO_C" >&6
4560else
4561 cat >conftest.$ac_ext <<_ACEOF
4562#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004563#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004564$ac_includes_default
4565#ifdef F77_DUMMY_MAIN
4566# ifdef __cplusplus
4567 extern "C"
4568# endif
4569 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004571int
4572main ()
4573{
4574if ((pid_t *) 0)
4575 return 0;
4576if (sizeof (pid_t))
4577 return 0;
4578 ;
4579 return 0;
4580}
4581_ACEOF
4582rm -f conftest.$ac_objext
4583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4584 (eval $ac_compile) 2>&5
4585 ac_status=$?
4586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4587 (exit $ac_status); } &&
4588 { ac_try='test -s conftest.$ac_objext'
4589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4590 (eval $ac_try) 2>&5
4591 ac_status=$?
4592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4593 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004594 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004595else
Martin v. Löwis11437992002-04-12 09:54:03 +00004596 echo "$as_me: failed program was:" >&5
4597cat conftest.$ac_ext >&5
4598ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004599fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004600rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004601fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004602echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4603echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4604if test $ac_cv_type_pid_t = yes; then
4605 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004606else
Martin v. Löwis11437992002-04-12 09:54:03 +00004607
4608cat >>confdefs.h <<_ACEOF
4609#define pid_t int
4610_ACEOF
4611
4612fi
4613
4614echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4615echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4616if test "${ac_cv_type_signal+set}" = set; then
4617 echo $ECHO_N "(cached) $ECHO_C" >&6
4618else
4619 cat >conftest.$ac_ext <<_ACEOF
4620#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004621#include "confdefs.h"
4622#include <sys/types.h>
4623#include <signal.h>
4624#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004625# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004626#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004627#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004628extern "C" void (*signal (int, void (*)(int)))(int);
4629#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004630void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004631#endif
4632
Martin v. Löwis11437992002-04-12 09:54:03 +00004633#ifdef F77_DUMMY_MAIN
4634# ifdef __cplusplus
4635 extern "C"
4636# endif
4637 int F77_DUMMY_MAIN() { return 1; }
4638#endif
4639int
4640main ()
4641{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004642int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004643 ;
4644 return 0;
4645}
4646_ACEOF
4647rm -f conftest.$ac_objext
4648if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4649 (eval $ac_compile) 2>&5
4650 ac_status=$?
4651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4652 (exit $ac_status); } &&
4653 { ac_try='test -s conftest.$ac_objext'
4654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4655 (eval $ac_try) 2>&5
4656 ac_status=$?
4657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4658 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004659 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004660else
Martin v. Löwis11437992002-04-12 09:54:03 +00004661 echo "$as_me: failed program was:" >&5
4662cat conftest.$ac_ext >&5
4663ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004664fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004665rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004666fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004667echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4668echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004669
Martin v. Löwis11437992002-04-12 09:54:03 +00004670cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004671#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004672_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004673
Michael W. Hudson54241132001-12-07 15:38:26 +00004674
Martin v. Löwis11437992002-04-12 09:54:03 +00004675echo "$as_me:$LINENO: checking for size_t" >&5
4676echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4677if test "${ac_cv_type_size_t+set}" = set; then
4678 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004679else
Martin v. Löwis11437992002-04-12 09:54:03 +00004680 cat >conftest.$ac_ext <<_ACEOF
4681#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004682#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004683$ac_includes_default
4684#ifdef F77_DUMMY_MAIN
4685# ifdef __cplusplus
4686 extern "C"
4687# endif
4688 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004689#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004690int
4691main ()
4692{
4693if ((size_t *) 0)
4694 return 0;
4695if (sizeof (size_t))
4696 return 0;
4697 ;
4698 return 0;
4699}
4700_ACEOF
4701rm -f conftest.$ac_objext
4702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4703 (eval $ac_compile) 2>&5
4704 ac_status=$?
4705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4706 (exit $ac_status); } &&
4707 { ac_try='test -s conftest.$ac_objext'
4708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4709 (eval $ac_try) 2>&5
4710 ac_status=$?
4711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4712 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004713 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004714else
Martin v. Löwis11437992002-04-12 09:54:03 +00004715 echo "$as_me: failed program was:" >&5
4716cat conftest.$ac_ext >&5
4717ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004718fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004719rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004720fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004721echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4722echo "${ECHO_T}$ac_cv_type_size_t" >&6
4723if test $ac_cv_type_size_t = yes; then
4724 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004725else
Martin v. Löwis11437992002-04-12 09:54:03 +00004726
4727cat >>confdefs.h <<_ACEOF
4728#define size_t unsigned
4729_ACEOF
4730
4731fi
4732
4733echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4734echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4735if test "${ac_cv_type_uid_t+set}" = set; then
4736 echo $ECHO_N "(cached) $ECHO_C" >&6
4737else
4738 cat >conftest.$ac_ext <<_ACEOF
4739#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004740#include "confdefs.h"
4741#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004742
4743_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004744if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4745 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004746 ac_cv_type_uid_t=yes
4747else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004748 ac_cv_type_uid_t=no
4749fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004750rm -f conftest*
4751
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004752fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004753echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4754echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004755if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004756
Martin v. Löwis11437992002-04-12 09:54:03 +00004757cat >>confdefs.h <<\_ACEOF
4758#define uid_t int
4759_ACEOF
4760
4761
4762cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004763#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004764_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004765
4766fi
4767
Jack Jansendd19cf82001-12-06 22:36:17 +00004768
Michael W. Hudson54241132001-12-07 15:38:26 +00004769# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004770echo "$as_me:$LINENO: checking for int" >&5
4771echo $ECHO_N "checking for int... $ECHO_C" >&6
4772if test "${ac_cv_type_int+set}" = set; then
4773 echo $ECHO_N "(cached) $ECHO_C" >&6
4774else
4775 cat >conftest.$ac_ext <<_ACEOF
4776#line $LINENO "configure"
4777#include "confdefs.h"
4778$ac_includes_default
4779#ifdef F77_DUMMY_MAIN
4780# ifdef __cplusplus
4781 extern "C"
4782# endif
4783 int F77_DUMMY_MAIN() { return 1; }
4784#endif
4785int
4786main ()
4787{
4788if ((int *) 0)
4789 return 0;
4790if (sizeof (int))
4791 return 0;
4792 ;
4793 return 0;
4794}
4795_ACEOF
4796rm -f conftest.$ac_objext
4797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4798 (eval $ac_compile) 2>&5
4799 ac_status=$?
4800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4801 (exit $ac_status); } &&
4802 { ac_try='test -s conftest.$ac_objext'
4803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4804 (eval $ac_try) 2>&5
4805 ac_status=$?
4806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4807 (exit $ac_status); }; }; then
4808 ac_cv_type_int=yes
4809else
4810 echo "$as_me: failed program was:" >&5
4811cat conftest.$ac_ext >&5
4812ac_cv_type_int=no
4813fi
4814rm -f conftest.$ac_objext conftest.$ac_ext
4815fi
4816echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4817echo "${ECHO_T}$ac_cv_type_int" >&6
4818
4819echo "$as_me:$LINENO: checking size of int" >&5
4820echo $ECHO_N "checking size of int... $ECHO_C" >&6
4821if test "${ac_cv_sizeof_int+set}" = set; then
4822 echo $ECHO_N "(cached) $ECHO_C" >&6
4823else
4824 if test "$ac_cv_type_int" = yes; then
4825 # The cast to unsigned long works around a bug in the HP C Compiler
4826 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4827 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4828 # This bug is HP SR number 8606223364.
4829 if test "$cross_compiling" = yes; then
4830 # Depending upon the size, compute the lo and hi bounds.
4831cat >conftest.$ac_ext <<_ACEOF
4832#line $LINENO "configure"
4833#include "confdefs.h"
4834$ac_includes_default
4835#ifdef F77_DUMMY_MAIN
4836# ifdef __cplusplus
4837 extern "C"
4838# endif
4839 int F77_DUMMY_MAIN() { return 1; }
4840#endif
4841int
4842main ()
4843{
4844static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4845test_array [0] = 0
4846
4847 ;
4848 return 0;
4849}
4850_ACEOF
4851rm -f conftest.$ac_objext
4852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4853 (eval $ac_compile) 2>&5
4854 ac_status=$?
4855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4856 (exit $ac_status); } &&
4857 { ac_try='test -s conftest.$ac_objext'
4858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4859 (eval $ac_try) 2>&5
4860 ac_status=$?
4861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862 (exit $ac_status); }; }; then
4863 ac_lo=0 ac_mid=0
4864 while :; do
4865 cat >conftest.$ac_ext <<_ACEOF
4866#line $LINENO "configure"
4867#include "confdefs.h"
4868$ac_includes_default
4869#ifdef F77_DUMMY_MAIN
4870# ifdef __cplusplus
4871 extern "C"
4872# endif
4873 int F77_DUMMY_MAIN() { return 1; }
4874#endif
4875int
4876main ()
4877{
4878static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4879test_array [0] = 0
4880
4881 ;
4882 return 0;
4883}
4884_ACEOF
4885rm -f conftest.$ac_objext
4886if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4887 (eval $ac_compile) 2>&5
4888 ac_status=$?
4889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4890 (exit $ac_status); } &&
4891 { ac_try='test -s conftest.$ac_objext'
4892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4893 (eval $ac_try) 2>&5
4894 ac_status=$?
4895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4896 (exit $ac_status); }; }; then
4897 ac_hi=$ac_mid; break
4898else
4899 echo "$as_me: failed program was:" >&5
4900cat conftest.$ac_ext >&5
4901ac_lo=`expr $ac_mid + 1`
4902 if test $ac_lo -le $ac_mid; then
4903 ac_lo= ac_hi=
4904 break
4905 fi
4906 ac_mid=`expr 2 '*' $ac_mid + 1`
4907fi
4908rm -f conftest.$ac_objext conftest.$ac_ext
4909 done
4910else
4911 echo "$as_me: failed program was:" >&5
4912cat conftest.$ac_ext >&5
4913cat >conftest.$ac_ext <<_ACEOF
4914#line $LINENO "configure"
4915#include "confdefs.h"
4916$ac_includes_default
4917#ifdef F77_DUMMY_MAIN
4918# ifdef __cplusplus
4919 extern "C"
4920# endif
4921 int F77_DUMMY_MAIN() { return 1; }
4922#endif
4923int
4924main ()
4925{
4926static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4927test_array [0] = 0
4928
4929 ;
4930 return 0;
4931}
4932_ACEOF
4933rm -f conftest.$ac_objext
4934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4935 (eval $ac_compile) 2>&5
4936 ac_status=$?
4937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4938 (exit $ac_status); } &&
4939 { ac_try='test -s conftest.$ac_objext'
4940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4941 (eval $ac_try) 2>&5
4942 ac_status=$?
4943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4944 (exit $ac_status); }; }; then
4945 ac_hi=-1 ac_mid=-1
4946 while :; do
4947 cat >conftest.$ac_ext <<_ACEOF
4948#line $LINENO "configure"
4949#include "confdefs.h"
4950$ac_includes_default
4951#ifdef F77_DUMMY_MAIN
4952# ifdef __cplusplus
4953 extern "C"
4954# endif
4955 int F77_DUMMY_MAIN() { return 1; }
4956#endif
4957int
4958main ()
4959{
4960static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4961test_array [0] = 0
4962
4963 ;
4964 return 0;
4965}
4966_ACEOF
4967rm -f conftest.$ac_objext
4968if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4969 (eval $ac_compile) 2>&5
4970 ac_status=$?
4971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4972 (exit $ac_status); } &&
4973 { ac_try='test -s conftest.$ac_objext'
4974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4975 (eval $ac_try) 2>&5
4976 ac_status=$?
4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4978 (exit $ac_status); }; }; then
4979 ac_lo=$ac_mid; break
4980else
4981 echo "$as_me: failed program was:" >&5
4982cat conftest.$ac_ext >&5
4983ac_hi=`expr '(' $ac_mid ')' - 1`
4984 if test $ac_mid -le $ac_hi; then
4985 ac_lo= ac_hi=
4986 break
4987 fi
4988 ac_mid=`expr 2 '*' $ac_mid`
4989fi
4990rm -f conftest.$ac_objext conftest.$ac_ext
4991 done
4992else
4993 echo "$as_me: failed program was:" >&5
4994cat conftest.$ac_ext >&5
4995ac_lo= ac_hi=
4996fi
4997rm -f conftest.$ac_objext conftest.$ac_ext
4998fi
4999rm -f conftest.$ac_objext conftest.$ac_ext
5000# Binary search between lo and hi bounds.
5001while test "x$ac_lo" != "x$ac_hi"; do
5002 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5003 cat >conftest.$ac_ext <<_ACEOF
5004#line $LINENO "configure"
5005#include "confdefs.h"
5006$ac_includes_default
5007#ifdef F77_DUMMY_MAIN
5008# ifdef __cplusplus
5009 extern "C"
5010# endif
5011 int F77_DUMMY_MAIN() { return 1; }
5012#endif
5013int
5014main ()
5015{
5016static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5017test_array [0] = 0
5018
5019 ;
5020 return 0;
5021}
5022_ACEOF
5023rm -f conftest.$ac_objext
5024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5025 (eval $ac_compile) 2>&5
5026 ac_status=$?
5027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5028 (exit $ac_status); } &&
5029 { ac_try='test -s conftest.$ac_objext'
5030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5031 (eval $ac_try) 2>&5
5032 ac_status=$?
5033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5034 (exit $ac_status); }; }; then
5035 ac_hi=$ac_mid
5036else
5037 echo "$as_me: failed program was:" >&5
5038cat conftest.$ac_ext >&5
5039ac_lo=`expr '(' $ac_mid ')' + 1`
5040fi
5041rm -f conftest.$ac_objext conftest.$ac_ext
5042done
5043case $ac_lo in
5044?*) ac_cv_sizeof_int=$ac_lo;;
5045'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5046echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5047 { (exit 1); exit 1; }; } ;;
5048esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005049else
5050 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005051 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5052echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5053 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005054else
Martin v. Löwis11437992002-04-12 09:54:03 +00005055 cat >conftest.$ac_ext <<_ACEOF
5056#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005057#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005058$ac_includes_default
5059long longval () { return (long) (sizeof (int)); }
5060unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005061#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005062#include <stdlib.h>
5063#ifdef F77_DUMMY_MAIN
5064# ifdef __cplusplus
5065 extern "C"
5066# endif
5067 int F77_DUMMY_MAIN() { return 1; }
5068#endif
5069int
5070main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005071{
Martin v. Löwis11437992002-04-12 09:54:03 +00005072
5073 FILE *f = fopen ("conftest.val", "w");
5074 if (! f)
5075 exit (1);
5076 if (((long) (sizeof (int))) < 0)
5077 {
5078 long i = longval ();
5079 if (i != ((long) (sizeof (int))))
5080 exit (1);
5081 fprintf (f, "%ld\n", i);
5082 }
5083 else
5084 {
5085 unsigned long i = ulongval ();
5086 if (i != ((long) (sizeof (int))))
5087 exit (1);
5088 fprintf (f, "%lu\n", i);
5089 }
5090 exit (ferror (f) || fclose (f) != 0);
5091
5092 ;
5093 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005094}
Martin v. Löwis11437992002-04-12 09:54:03 +00005095_ACEOF
5096rm -f conftest$ac_exeext
5097if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5098 (eval $ac_link) 2>&5
5099 ac_status=$?
5100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5103 (eval $ac_try) 2>&5
5104 ac_status=$?
5105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5106 (exit $ac_status); }; }; then
5107 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005108else
Martin v. Löwis11437992002-04-12 09:54:03 +00005109 echo "$as_me: program exited with status $ac_status" >&5
5110echo "$as_me: failed program was:" >&5
5111cat conftest.$ac_ext >&5
5112( exit $ac_status )
5113{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5114echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5115 { (exit 1); exit 1; }; }
5116fi
5117rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5118fi
5119fi
5120rm -f conftest.val
5121else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005122 ac_cv_sizeof_int=0
5123fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005124fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005125echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5126echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5127cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005128#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005129_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005130
5131
Martin v. Löwis11437992002-04-12 09:54:03 +00005132echo "$as_me:$LINENO: checking for long" >&5
5133echo $ECHO_N "checking for long... $ECHO_C" >&6
5134if test "${ac_cv_type_long+set}" = set; then
5135 echo $ECHO_N "(cached) $ECHO_C" >&6
5136else
5137 cat >conftest.$ac_ext <<_ACEOF
5138#line $LINENO "configure"
5139#include "confdefs.h"
5140$ac_includes_default
5141#ifdef F77_DUMMY_MAIN
5142# ifdef __cplusplus
5143 extern "C"
5144# endif
5145 int F77_DUMMY_MAIN() { return 1; }
5146#endif
5147int
5148main ()
5149{
5150if ((long *) 0)
5151 return 0;
5152if (sizeof (long))
5153 return 0;
5154 ;
5155 return 0;
5156}
5157_ACEOF
5158rm -f conftest.$ac_objext
5159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5160 (eval $ac_compile) 2>&5
5161 ac_status=$?
5162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5163 (exit $ac_status); } &&
5164 { ac_try='test -s conftest.$ac_objext'
5165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5166 (eval $ac_try) 2>&5
5167 ac_status=$?
5168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5169 (exit $ac_status); }; }; then
5170 ac_cv_type_long=yes
5171else
5172 echo "$as_me: failed program was:" >&5
5173cat conftest.$ac_ext >&5
5174ac_cv_type_long=no
5175fi
5176rm -f conftest.$ac_objext conftest.$ac_ext
5177fi
5178echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5179echo "${ECHO_T}$ac_cv_type_long" >&6
5180
5181echo "$as_me:$LINENO: checking size of long" >&5
5182echo $ECHO_N "checking size of long... $ECHO_C" >&6
5183if test "${ac_cv_sizeof_long+set}" = set; then
5184 echo $ECHO_N "(cached) $ECHO_C" >&6
5185else
5186 if test "$ac_cv_type_long" = yes; then
5187 # The cast to unsigned long works around a bug in the HP C Compiler
5188 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5189 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5190 # This bug is HP SR number 8606223364.
5191 if test "$cross_compiling" = yes; then
5192 # Depending upon the size, compute the lo and hi bounds.
5193cat >conftest.$ac_ext <<_ACEOF
5194#line $LINENO "configure"
5195#include "confdefs.h"
5196$ac_includes_default
5197#ifdef F77_DUMMY_MAIN
5198# ifdef __cplusplus
5199 extern "C"
5200# endif
5201 int F77_DUMMY_MAIN() { return 1; }
5202#endif
5203int
5204main ()
5205{
5206static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5207test_array [0] = 0
5208
5209 ;
5210 return 0;
5211}
5212_ACEOF
5213rm -f conftest.$ac_objext
5214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5215 (eval $ac_compile) 2>&5
5216 ac_status=$?
5217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5218 (exit $ac_status); } &&
5219 { ac_try='test -s conftest.$ac_objext'
5220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5221 (eval $ac_try) 2>&5
5222 ac_status=$?
5223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5224 (exit $ac_status); }; }; then
5225 ac_lo=0 ac_mid=0
5226 while :; do
5227 cat >conftest.$ac_ext <<_ACEOF
5228#line $LINENO "configure"
5229#include "confdefs.h"
5230$ac_includes_default
5231#ifdef F77_DUMMY_MAIN
5232# ifdef __cplusplus
5233 extern "C"
5234# endif
5235 int F77_DUMMY_MAIN() { return 1; }
5236#endif
5237int
5238main ()
5239{
5240static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5241test_array [0] = 0
5242
5243 ;
5244 return 0;
5245}
5246_ACEOF
5247rm -f conftest.$ac_objext
5248if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5249 (eval $ac_compile) 2>&5
5250 ac_status=$?
5251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5252 (exit $ac_status); } &&
5253 { ac_try='test -s conftest.$ac_objext'
5254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5255 (eval $ac_try) 2>&5
5256 ac_status=$?
5257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5258 (exit $ac_status); }; }; then
5259 ac_hi=$ac_mid; break
5260else
5261 echo "$as_me: failed program was:" >&5
5262cat conftest.$ac_ext >&5
5263ac_lo=`expr $ac_mid + 1`
5264 if test $ac_lo -le $ac_mid; then
5265 ac_lo= ac_hi=
5266 break
5267 fi
5268 ac_mid=`expr 2 '*' $ac_mid + 1`
5269fi
5270rm -f conftest.$ac_objext conftest.$ac_ext
5271 done
5272else
5273 echo "$as_me: failed program was:" >&5
5274cat conftest.$ac_ext >&5
5275cat >conftest.$ac_ext <<_ACEOF
5276#line $LINENO "configure"
5277#include "confdefs.h"
5278$ac_includes_default
5279#ifdef F77_DUMMY_MAIN
5280# ifdef __cplusplus
5281 extern "C"
5282# endif
5283 int F77_DUMMY_MAIN() { return 1; }
5284#endif
5285int
5286main ()
5287{
5288static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5289test_array [0] = 0
5290
5291 ;
5292 return 0;
5293}
5294_ACEOF
5295rm -f conftest.$ac_objext
5296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5297 (eval $ac_compile) 2>&5
5298 ac_status=$?
5299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5300 (exit $ac_status); } &&
5301 { ac_try='test -s conftest.$ac_objext'
5302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5303 (eval $ac_try) 2>&5
5304 ac_status=$?
5305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5306 (exit $ac_status); }; }; then
5307 ac_hi=-1 ac_mid=-1
5308 while :; do
5309 cat >conftest.$ac_ext <<_ACEOF
5310#line $LINENO "configure"
5311#include "confdefs.h"
5312$ac_includes_default
5313#ifdef F77_DUMMY_MAIN
5314# ifdef __cplusplus
5315 extern "C"
5316# endif
5317 int F77_DUMMY_MAIN() { return 1; }
5318#endif
5319int
5320main ()
5321{
5322static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5323test_array [0] = 0
5324
5325 ;
5326 return 0;
5327}
5328_ACEOF
5329rm -f conftest.$ac_objext
5330if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5331 (eval $ac_compile) 2>&5
5332 ac_status=$?
5333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5334 (exit $ac_status); } &&
5335 { ac_try='test -s conftest.$ac_objext'
5336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5337 (eval $ac_try) 2>&5
5338 ac_status=$?
5339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5340 (exit $ac_status); }; }; then
5341 ac_lo=$ac_mid; break
5342else
5343 echo "$as_me: failed program was:" >&5
5344cat conftest.$ac_ext >&5
5345ac_hi=`expr '(' $ac_mid ')' - 1`
5346 if test $ac_mid -le $ac_hi; then
5347 ac_lo= ac_hi=
5348 break
5349 fi
5350 ac_mid=`expr 2 '*' $ac_mid`
5351fi
5352rm -f conftest.$ac_objext conftest.$ac_ext
5353 done
5354else
5355 echo "$as_me: failed program was:" >&5
5356cat conftest.$ac_ext >&5
5357ac_lo= ac_hi=
5358fi
5359rm -f conftest.$ac_objext conftest.$ac_ext
5360fi
5361rm -f conftest.$ac_objext conftest.$ac_ext
5362# Binary search between lo and hi bounds.
5363while test "x$ac_lo" != "x$ac_hi"; do
5364 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5365 cat >conftest.$ac_ext <<_ACEOF
5366#line $LINENO "configure"
5367#include "confdefs.h"
5368$ac_includes_default
5369#ifdef F77_DUMMY_MAIN
5370# ifdef __cplusplus
5371 extern "C"
5372# endif
5373 int F77_DUMMY_MAIN() { return 1; }
5374#endif
5375int
5376main ()
5377{
5378static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5379test_array [0] = 0
5380
5381 ;
5382 return 0;
5383}
5384_ACEOF
5385rm -f conftest.$ac_objext
5386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5387 (eval $ac_compile) 2>&5
5388 ac_status=$?
5389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5390 (exit $ac_status); } &&
5391 { ac_try='test -s conftest.$ac_objext'
5392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5393 (eval $ac_try) 2>&5
5394 ac_status=$?
5395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5396 (exit $ac_status); }; }; then
5397 ac_hi=$ac_mid
5398else
5399 echo "$as_me: failed program was:" >&5
5400cat conftest.$ac_ext >&5
5401ac_lo=`expr '(' $ac_mid ')' + 1`
5402fi
5403rm -f conftest.$ac_objext conftest.$ac_ext
5404done
5405case $ac_lo in
5406?*) ac_cv_sizeof_long=$ac_lo;;
5407'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5408echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5409 { (exit 1); exit 1; }; } ;;
5410esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005411else
5412 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005413 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5414echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5415 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005416else
Martin v. Löwis11437992002-04-12 09:54:03 +00005417 cat >conftest.$ac_ext <<_ACEOF
5418#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005419#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005420$ac_includes_default
5421long longval () { return (long) (sizeof (long)); }
5422unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005423#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005424#include <stdlib.h>
5425#ifdef F77_DUMMY_MAIN
5426# ifdef __cplusplus
5427 extern "C"
5428# endif
5429 int F77_DUMMY_MAIN() { return 1; }
5430#endif
5431int
5432main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005433{
Martin v. Löwis11437992002-04-12 09:54:03 +00005434
5435 FILE *f = fopen ("conftest.val", "w");
5436 if (! f)
5437 exit (1);
5438 if (((long) (sizeof (long))) < 0)
5439 {
5440 long i = longval ();
5441 if (i != ((long) (sizeof (long))))
5442 exit (1);
5443 fprintf (f, "%ld\n", i);
5444 }
5445 else
5446 {
5447 unsigned long i = ulongval ();
5448 if (i != ((long) (sizeof (long))))
5449 exit (1);
5450 fprintf (f, "%lu\n", i);
5451 }
5452 exit (ferror (f) || fclose (f) != 0);
5453
5454 ;
5455 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005456}
Martin v. Löwis11437992002-04-12 09:54:03 +00005457_ACEOF
5458rm -f conftest$ac_exeext
5459if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5460 (eval $ac_link) 2>&5
5461 ac_status=$?
5462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5463 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5465 (eval $ac_try) 2>&5
5466 ac_status=$?
5467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5468 (exit $ac_status); }; }; then
5469 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005470else
Martin v. Löwis11437992002-04-12 09:54:03 +00005471 echo "$as_me: program exited with status $ac_status" >&5
5472echo "$as_me: failed program was:" >&5
5473cat conftest.$ac_ext >&5
5474( exit $ac_status )
5475{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5476echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5477 { (exit 1); exit 1; }; }
5478fi
5479rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5480fi
5481fi
5482rm -f conftest.val
5483else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005484 ac_cv_sizeof_long=0
5485fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005486fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005487echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5488echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5489cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005490#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005491_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005492
5493
Martin v. Löwis11437992002-04-12 09:54:03 +00005494echo "$as_me:$LINENO: checking for void *" >&5
5495echo $ECHO_N "checking for void *... $ECHO_C" >&6
5496if test "${ac_cv_type_void_p+set}" = set; then
5497 echo $ECHO_N "(cached) $ECHO_C" >&6
5498else
5499 cat >conftest.$ac_ext <<_ACEOF
5500#line $LINENO "configure"
5501#include "confdefs.h"
5502$ac_includes_default
5503#ifdef F77_DUMMY_MAIN
5504# ifdef __cplusplus
5505 extern "C"
5506# endif
5507 int F77_DUMMY_MAIN() { return 1; }
5508#endif
5509int
5510main ()
5511{
5512if ((void * *) 0)
5513 return 0;
5514if (sizeof (void *))
5515 return 0;
5516 ;
5517 return 0;
5518}
5519_ACEOF
5520rm -f conftest.$ac_objext
5521if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5522 (eval $ac_compile) 2>&5
5523 ac_status=$?
5524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525 (exit $ac_status); } &&
5526 { ac_try='test -s conftest.$ac_objext'
5527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5528 (eval $ac_try) 2>&5
5529 ac_status=$?
5530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5531 (exit $ac_status); }; }; then
5532 ac_cv_type_void_p=yes
5533else
5534 echo "$as_me: failed program was:" >&5
5535cat conftest.$ac_ext >&5
5536ac_cv_type_void_p=no
5537fi
5538rm -f conftest.$ac_objext conftest.$ac_ext
5539fi
5540echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5541echo "${ECHO_T}$ac_cv_type_void_p" >&6
5542
5543echo "$as_me:$LINENO: checking size of void *" >&5
5544echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5545if test "${ac_cv_sizeof_void_p+set}" = set; then
5546 echo $ECHO_N "(cached) $ECHO_C" >&6
5547else
5548 if test "$ac_cv_type_void_p" = yes; then
5549 # The cast to unsigned long works around a bug in the HP C Compiler
5550 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5551 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5552 # This bug is HP SR number 8606223364.
5553 if test "$cross_compiling" = yes; then
5554 # Depending upon the size, compute the lo and hi bounds.
5555cat >conftest.$ac_ext <<_ACEOF
5556#line $LINENO "configure"
5557#include "confdefs.h"
5558$ac_includes_default
5559#ifdef F77_DUMMY_MAIN
5560# ifdef __cplusplus
5561 extern "C"
5562# endif
5563 int F77_DUMMY_MAIN() { return 1; }
5564#endif
5565int
5566main ()
5567{
5568static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5569test_array [0] = 0
5570
5571 ;
5572 return 0;
5573}
5574_ACEOF
5575rm -f conftest.$ac_objext
5576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5577 (eval $ac_compile) 2>&5
5578 ac_status=$?
5579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5580 (exit $ac_status); } &&
5581 { ac_try='test -s conftest.$ac_objext'
5582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5583 (eval $ac_try) 2>&5
5584 ac_status=$?
5585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5586 (exit $ac_status); }; }; then
5587 ac_lo=0 ac_mid=0
5588 while :; do
5589 cat >conftest.$ac_ext <<_ACEOF
5590#line $LINENO "configure"
5591#include "confdefs.h"
5592$ac_includes_default
5593#ifdef F77_DUMMY_MAIN
5594# ifdef __cplusplus
5595 extern "C"
5596# endif
5597 int F77_DUMMY_MAIN() { return 1; }
5598#endif
5599int
5600main ()
5601{
5602static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5603test_array [0] = 0
5604
5605 ;
5606 return 0;
5607}
5608_ACEOF
5609rm -f conftest.$ac_objext
5610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5611 (eval $ac_compile) 2>&5
5612 ac_status=$?
5613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5614 (exit $ac_status); } &&
5615 { ac_try='test -s conftest.$ac_objext'
5616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5617 (eval $ac_try) 2>&5
5618 ac_status=$?
5619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5620 (exit $ac_status); }; }; then
5621 ac_hi=$ac_mid; break
5622else
5623 echo "$as_me: failed program was:" >&5
5624cat conftest.$ac_ext >&5
5625ac_lo=`expr $ac_mid + 1`
5626 if test $ac_lo -le $ac_mid; then
5627 ac_lo= ac_hi=
5628 break
5629 fi
5630 ac_mid=`expr 2 '*' $ac_mid + 1`
5631fi
5632rm -f conftest.$ac_objext conftest.$ac_ext
5633 done
5634else
5635 echo "$as_me: failed program was:" >&5
5636cat conftest.$ac_ext >&5
5637cat >conftest.$ac_ext <<_ACEOF
5638#line $LINENO "configure"
5639#include "confdefs.h"
5640$ac_includes_default
5641#ifdef F77_DUMMY_MAIN
5642# ifdef __cplusplus
5643 extern "C"
5644# endif
5645 int F77_DUMMY_MAIN() { return 1; }
5646#endif
5647int
5648main ()
5649{
5650static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5651test_array [0] = 0
5652
5653 ;
5654 return 0;
5655}
5656_ACEOF
5657rm -f conftest.$ac_objext
5658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5659 (eval $ac_compile) 2>&5
5660 ac_status=$?
5661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5662 (exit $ac_status); } &&
5663 { ac_try='test -s conftest.$ac_objext'
5664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5665 (eval $ac_try) 2>&5
5666 ac_status=$?
5667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5668 (exit $ac_status); }; }; then
5669 ac_hi=-1 ac_mid=-1
5670 while :; do
5671 cat >conftest.$ac_ext <<_ACEOF
5672#line $LINENO "configure"
5673#include "confdefs.h"
5674$ac_includes_default
5675#ifdef F77_DUMMY_MAIN
5676# ifdef __cplusplus
5677 extern "C"
5678# endif
5679 int F77_DUMMY_MAIN() { return 1; }
5680#endif
5681int
5682main ()
5683{
5684static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5685test_array [0] = 0
5686
5687 ;
5688 return 0;
5689}
5690_ACEOF
5691rm -f conftest.$ac_objext
5692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5693 (eval $ac_compile) 2>&5
5694 ac_status=$?
5695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5696 (exit $ac_status); } &&
5697 { ac_try='test -s conftest.$ac_objext'
5698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5699 (eval $ac_try) 2>&5
5700 ac_status=$?
5701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5702 (exit $ac_status); }; }; then
5703 ac_lo=$ac_mid; break
5704else
5705 echo "$as_me: failed program was:" >&5
5706cat conftest.$ac_ext >&5
5707ac_hi=`expr '(' $ac_mid ')' - 1`
5708 if test $ac_mid -le $ac_hi; then
5709 ac_lo= ac_hi=
5710 break
5711 fi
5712 ac_mid=`expr 2 '*' $ac_mid`
5713fi
5714rm -f conftest.$ac_objext conftest.$ac_ext
5715 done
5716else
5717 echo "$as_me: failed program was:" >&5
5718cat conftest.$ac_ext >&5
5719ac_lo= ac_hi=
5720fi
5721rm -f conftest.$ac_objext conftest.$ac_ext
5722fi
5723rm -f conftest.$ac_objext conftest.$ac_ext
5724# Binary search between lo and hi bounds.
5725while test "x$ac_lo" != "x$ac_hi"; do
5726 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5727 cat >conftest.$ac_ext <<_ACEOF
5728#line $LINENO "configure"
5729#include "confdefs.h"
5730$ac_includes_default
5731#ifdef F77_DUMMY_MAIN
5732# ifdef __cplusplus
5733 extern "C"
5734# endif
5735 int F77_DUMMY_MAIN() { return 1; }
5736#endif
5737int
5738main ()
5739{
5740static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5741test_array [0] = 0
5742
5743 ;
5744 return 0;
5745}
5746_ACEOF
5747rm -f conftest.$ac_objext
5748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5749 (eval $ac_compile) 2>&5
5750 ac_status=$?
5751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5752 (exit $ac_status); } &&
5753 { ac_try='test -s conftest.$ac_objext'
5754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5755 (eval $ac_try) 2>&5
5756 ac_status=$?
5757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5758 (exit $ac_status); }; }; then
5759 ac_hi=$ac_mid
5760else
5761 echo "$as_me: failed program was:" >&5
5762cat conftest.$ac_ext >&5
5763ac_lo=`expr '(' $ac_mid ')' + 1`
5764fi
5765rm -f conftest.$ac_objext conftest.$ac_ext
5766done
5767case $ac_lo in
5768?*) ac_cv_sizeof_void_p=$ac_lo;;
5769'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5770echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5771 { (exit 1); exit 1; }; } ;;
5772esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005773else
5774 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005775 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5776echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5777 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005778else
Martin v. Löwis11437992002-04-12 09:54:03 +00005779 cat >conftest.$ac_ext <<_ACEOF
5780#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005781#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005782$ac_includes_default
5783long longval () { return (long) (sizeof (void *)); }
5784unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005785#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005786#include <stdlib.h>
5787#ifdef F77_DUMMY_MAIN
5788# ifdef __cplusplus
5789 extern "C"
5790# endif
5791 int F77_DUMMY_MAIN() { return 1; }
5792#endif
5793int
5794main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005795{
Martin v. Löwis11437992002-04-12 09:54:03 +00005796
5797 FILE *f = fopen ("conftest.val", "w");
5798 if (! f)
5799 exit (1);
5800 if (((long) (sizeof (void *))) < 0)
5801 {
5802 long i = longval ();
5803 if (i != ((long) (sizeof (void *))))
5804 exit (1);
5805 fprintf (f, "%ld\n", i);
5806 }
5807 else
5808 {
5809 unsigned long i = ulongval ();
5810 if (i != ((long) (sizeof (void *))))
5811 exit (1);
5812 fprintf (f, "%lu\n", i);
5813 }
5814 exit (ferror (f) || fclose (f) != 0);
5815
5816 ;
5817 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005818}
Martin v. Löwis11437992002-04-12 09:54:03 +00005819_ACEOF
5820rm -f conftest$ac_exeext
5821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5822 (eval $ac_link) 2>&5
5823 ac_status=$?
5824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5825 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5827 (eval $ac_try) 2>&5
5828 ac_status=$?
5829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5830 (exit $ac_status); }; }; then
5831 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005832else
Martin v. Löwis11437992002-04-12 09:54:03 +00005833 echo "$as_me: program exited with status $ac_status" >&5
5834echo "$as_me: failed program was:" >&5
5835cat conftest.$ac_ext >&5
5836( exit $ac_status )
5837{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5838echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5839 { (exit 1); exit 1; }; }
5840fi
5841rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5842fi
5843fi
5844rm -f conftest.val
5845else
Guido van Rossumad678af1998-10-02 14:42:15 +00005846 ac_cv_sizeof_void_p=0
5847fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005848fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005849echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5850echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5851cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005852#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005853_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005854
5855
Martin v. Löwis11437992002-04-12 09:54:03 +00005856echo "$as_me:$LINENO: checking for char" >&5
5857echo $ECHO_N "checking for char... $ECHO_C" >&6
5858if test "${ac_cv_type_char+set}" = set; then
5859 echo $ECHO_N "(cached) $ECHO_C" >&6
5860else
5861 cat >conftest.$ac_ext <<_ACEOF
5862#line $LINENO "configure"
5863#include "confdefs.h"
5864$ac_includes_default
5865#ifdef F77_DUMMY_MAIN
5866# ifdef __cplusplus
5867 extern "C"
5868# endif
5869 int F77_DUMMY_MAIN() { return 1; }
5870#endif
5871int
5872main ()
5873{
5874if ((char *) 0)
5875 return 0;
5876if (sizeof (char))
5877 return 0;
5878 ;
5879 return 0;
5880}
5881_ACEOF
5882rm -f conftest.$ac_objext
5883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5884 (eval $ac_compile) 2>&5
5885 ac_status=$?
5886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5887 (exit $ac_status); } &&
5888 { ac_try='test -s conftest.$ac_objext'
5889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5890 (eval $ac_try) 2>&5
5891 ac_status=$?
5892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5893 (exit $ac_status); }; }; then
5894 ac_cv_type_char=yes
5895else
5896 echo "$as_me: failed program was:" >&5
5897cat conftest.$ac_ext >&5
5898ac_cv_type_char=no
5899fi
5900rm -f conftest.$ac_objext conftest.$ac_ext
5901fi
5902echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5903echo "${ECHO_T}$ac_cv_type_char" >&6
5904
5905echo "$as_me:$LINENO: checking size of char" >&5
5906echo $ECHO_N "checking size of char... $ECHO_C" >&6
5907if test "${ac_cv_sizeof_char+set}" = set; then
5908 echo $ECHO_N "(cached) $ECHO_C" >&6
5909else
5910 if test "$ac_cv_type_char" = yes; then
5911 # The cast to unsigned long works around a bug in the HP C Compiler
5912 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5913 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5914 # This bug is HP SR number 8606223364.
5915 if test "$cross_compiling" = yes; then
5916 # Depending upon the size, compute the lo and hi bounds.
5917cat >conftest.$ac_ext <<_ACEOF
5918#line $LINENO "configure"
5919#include "confdefs.h"
5920$ac_includes_default
5921#ifdef F77_DUMMY_MAIN
5922# ifdef __cplusplus
5923 extern "C"
5924# endif
5925 int F77_DUMMY_MAIN() { return 1; }
5926#endif
5927int
5928main ()
5929{
5930static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5931test_array [0] = 0
5932
5933 ;
5934 return 0;
5935}
5936_ACEOF
5937rm -f conftest.$ac_objext
5938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5939 (eval $ac_compile) 2>&5
5940 ac_status=$?
5941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5942 (exit $ac_status); } &&
5943 { ac_try='test -s conftest.$ac_objext'
5944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5945 (eval $ac_try) 2>&5
5946 ac_status=$?
5947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5948 (exit $ac_status); }; }; then
5949 ac_lo=0 ac_mid=0
5950 while :; do
5951 cat >conftest.$ac_ext <<_ACEOF
5952#line $LINENO "configure"
5953#include "confdefs.h"
5954$ac_includes_default
5955#ifdef F77_DUMMY_MAIN
5956# ifdef __cplusplus
5957 extern "C"
5958# endif
5959 int F77_DUMMY_MAIN() { return 1; }
5960#endif
5961int
5962main ()
5963{
5964static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5965test_array [0] = 0
5966
5967 ;
5968 return 0;
5969}
5970_ACEOF
5971rm -f conftest.$ac_objext
5972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5973 (eval $ac_compile) 2>&5
5974 ac_status=$?
5975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5976 (exit $ac_status); } &&
5977 { ac_try='test -s conftest.$ac_objext'
5978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5979 (eval $ac_try) 2>&5
5980 ac_status=$?
5981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5982 (exit $ac_status); }; }; then
5983 ac_hi=$ac_mid; break
5984else
5985 echo "$as_me: failed program was:" >&5
5986cat conftest.$ac_ext >&5
5987ac_lo=`expr $ac_mid + 1`
5988 if test $ac_lo -le $ac_mid; then
5989 ac_lo= ac_hi=
5990 break
5991 fi
5992 ac_mid=`expr 2 '*' $ac_mid + 1`
5993fi
5994rm -f conftest.$ac_objext conftest.$ac_ext
5995 done
5996else
5997 echo "$as_me: failed program was:" >&5
5998cat conftest.$ac_ext >&5
5999cat >conftest.$ac_ext <<_ACEOF
6000#line $LINENO "configure"
6001#include "confdefs.h"
6002$ac_includes_default
6003#ifdef F77_DUMMY_MAIN
6004# ifdef __cplusplus
6005 extern "C"
6006# endif
6007 int F77_DUMMY_MAIN() { return 1; }
6008#endif
6009int
6010main ()
6011{
6012static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6013test_array [0] = 0
6014
6015 ;
6016 return 0;
6017}
6018_ACEOF
6019rm -f conftest.$ac_objext
6020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6021 (eval $ac_compile) 2>&5
6022 ac_status=$?
6023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6024 (exit $ac_status); } &&
6025 { ac_try='test -s conftest.$ac_objext'
6026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6027 (eval $ac_try) 2>&5
6028 ac_status=$?
6029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6030 (exit $ac_status); }; }; then
6031 ac_hi=-1 ac_mid=-1
6032 while :; do
6033 cat >conftest.$ac_ext <<_ACEOF
6034#line $LINENO "configure"
6035#include "confdefs.h"
6036$ac_includes_default
6037#ifdef F77_DUMMY_MAIN
6038# ifdef __cplusplus
6039 extern "C"
6040# endif
6041 int F77_DUMMY_MAIN() { return 1; }
6042#endif
6043int
6044main ()
6045{
6046static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6047test_array [0] = 0
6048
6049 ;
6050 return 0;
6051}
6052_ACEOF
6053rm -f conftest.$ac_objext
6054if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6055 (eval $ac_compile) 2>&5
6056 ac_status=$?
6057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6058 (exit $ac_status); } &&
6059 { ac_try='test -s conftest.$ac_objext'
6060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6061 (eval $ac_try) 2>&5
6062 ac_status=$?
6063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6064 (exit $ac_status); }; }; then
6065 ac_lo=$ac_mid; break
6066else
6067 echo "$as_me: failed program was:" >&5
6068cat conftest.$ac_ext >&5
6069ac_hi=`expr '(' $ac_mid ')' - 1`
6070 if test $ac_mid -le $ac_hi; then
6071 ac_lo= ac_hi=
6072 break
6073 fi
6074 ac_mid=`expr 2 '*' $ac_mid`
6075fi
6076rm -f conftest.$ac_objext conftest.$ac_ext
6077 done
6078else
6079 echo "$as_me: failed program was:" >&5
6080cat conftest.$ac_ext >&5
6081ac_lo= ac_hi=
6082fi
6083rm -f conftest.$ac_objext conftest.$ac_ext
6084fi
6085rm -f conftest.$ac_objext conftest.$ac_ext
6086# Binary search between lo and hi bounds.
6087while test "x$ac_lo" != "x$ac_hi"; do
6088 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6089 cat >conftest.$ac_ext <<_ACEOF
6090#line $LINENO "configure"
6091#include "confdefs.h"
6092$ac_includes_default
6093#ifdef F77_DUMMY_MAIN
6094# ifdef __cplusplus
6095 extern "C"
6096# endif
6097 int F77_DUMMY_MAIN() { return 1; }
6098#endif
6099int
6100main ()
6101{
6102static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6103test_array [0] = 0
6104
6105 ;
6106 return 0;
6107}
6108_ACEOF
6109rm -f conftest.$ac_objext
6110if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6111 (eval $ac_compile) 2>&5
6112 ac_status=$?
6113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6114 (exit $ac_status); } &&
6115 { ac_try='test -s conftest.$ac_objext'
6116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6117 (eval $ac_try) 2>&5
6118 ac_status=$?
6119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6120 (exit $ac_status); }; }; then
6121 ac_hi=$ac_mid
6122else
6123 echo "$as_me: failed program was:" >&5
6124cat conftest.$ac_ext >&5
6125ac_lo=`expr '(' $ac_mid ')' + 1`
6126fi
6127rm -f conftest.$ac_objext conftest.$ac_ext
6128done
6129case $ac_lo in
6130?*) ac_cv_sizeof_char=$ac_lo;;
6131'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6132echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6133 { (exit 1); exit 1; }; } ;;
6134esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006135else
6136 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006137 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6138echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6139 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006140else
Martin v. Löwis11437992002-04-12 09:54:03 +00006141 cat >conftest.$ac_ext <<_ACEOF
6142#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006143#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006144$ac_includes_default
6145long longval () { return (long) (sizeof (char)); }
6146unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006147#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006148#include <stdlib.h>
6149#ifdef F77_DUMMY_MAIN
6150# ifdef __cplusplus
6151 extern "C"
6152# endif
6153 int F77_DUMMY_MAIN() { return 1; }
6154#endif
6155int
6156main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006157{
Martin v. Löwis11437992002-04-12 09:54:03 +00006158
6159 FILE *f = fopen ("conftest.val", "w");
6160 if (! f)
6161 exit (1);
6162 if (((long) (sizeof (char))) < 0)
6163 {
6164 long i = longval ();
6165 if (i != ((long) (sizeof (char))))
6166 exit (1);
6167 fprintf (f, "%ld\n", i);
6168 }
6169 else
6170 {
6171 unsigned long i = ulongval ();
6172 if (i != ((long) (sizeof (char))))
6173 exit (1);
6174 fprintf (f, "%lu\n", i);
6175 }
6176 exit (ferror (f) || fclose (f) != 0);
6177
6178 ;
6179 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006180}
Martin v. Löwis11437992002-04-12 09:54:03 +00006181_ACEOF
6182rm -f conftest$ac_exeext
6183if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6184 (eval $ac_link) 2>&5
6185 ac_status=$?
6186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6189 (eval $ac_try) 2>&5
6190 ac_status=$?
6191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6192 (exit $ac_status); }; }; then
6193 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006194else
Martin v. Löwis11437992002-04-12 09:54:03 +00006195 echo "$as_me: program exited with status $ac_status" >&5
6196echo "$as_me: failed program was:" >&5
6197cat conftest.$ac_ext >&5
6198( exit $ac_status )
6199{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6200echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6201 { (exit 1); exit 1; }; }
6202fi
6203rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6204fi
6205fi
6206rm -f conftest.val
6207else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006208 ac_cv_sizeof_char=0
6209fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006210fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006211echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6212echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6213cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006214#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006215_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006216
6217
Martin v. Löwis11437992002-04-12 09:54:03 +00006218echo "$as_me:$LINENO: checking for short" >&5
6219echo $ECHO_N "checking for short... $ECHO_C" >&6
6220if test "${ac_cv_type_short+set}" = set; then
6221 echo $ECHO_N "(cached) $ECHO_C" >&6
6222else
6223 cat >conftest.$ac_ext <<_ACEOF
6224#line $LINENO "configure"
6225#include "confdefs.h"
6226$ac_includes_default
6227#ifdef F77_DUMMY_MAIN
6228# ifdef __cplusplus
6229 extern "C"
6230# endif
6231 int F77_DUMMY_MAIN() { return 1; }
6232#endif
6233int
6234main ()
6235{
6236if ((short *) 0)
6237 return 0;
6238if (sizeof (short))
6239 return 0;
6240 ;
6241 return 0;
6242}
6243_ACEOF
6244rm -f conftest.$ac_objext
6245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6246 (eval $ac_compile) 2>&5
6247 ac_status=$?
6248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6249 (exit $ac_status); } &&
6250 { ac_try='test -s conftest.$ac_objext'
6251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6252 (eval $ac_try) 2>&5
6253 ac_status=$?
6254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6255 (exit $ac_status); }; }; then
6256 ac_cv_type_short=yes
6257else
6258 echo "$as_me: failed program was:" >&5
6259cat conftest.$ac_ext >&5
6260ac_cv_type_short=no
6261fi
6262rm -f conftest.$ac_objext conftest.$ac_ext
6263fi
6264echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6265echo "${ECHO_T}$ac_cv_type_short" >&6
6266
6267echo "$as_me:$LINENO: checking size of short" >&5
6268echo $ECHO_N "checking size of short... $ECHO_C" >&6
6269if test "${ac_cv_sizeof_short+set}" = set; then
6270 echo $ECHO_N "(cached) $ECHO_C" >&6
6271else
6272 if test "$ac_cv_type_short" = yes; then
6273 # The cast to unsigned long works around a bug in the HP C Compiler
6274 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6275 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6276 # This bug is HP SR number 8606223364.
6277 if test "$cross_compiling" = yes; then
6278 # Depending upon the size, compute the lo and hi bounds.
6279cat >conftest.$ac_ext <<_ACEOF
6280#line $LINENO "configure"
6281#include "confdefs.h"
6282$ac_includes_default
6283#ifdef F77_DUMMY_MAIN
6284# ifdef __cplusplus
6285 extern "C"
6286# endif
6287 int F77_DUMMY_MAIN() { return 1; }
6288#endif
6289int
6290main ()
6291{
6292static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6293test_array [0] = 0
6294
6295 ;
6296 return 0;
6297}
6298_ACEOF
6299rm -f conftest.$ac_objext
6300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6301 (eval $ac_compile) 2>&5
6302 ac_status=$?
6303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6304 (exit $ac_status); } &&
6305 { ac_try='test -s conftest.$ac_objext'
6306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6307 (eval $ac_try) 2>&5
6308 ac_status=$?
6309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6310 (exit $ac_status); }; }; then
6311 ac_lo=0 ac_mid=0
6312 while :; do
6313 cat >conftest.$ac_ext <<_ACEOF
6314#line $LINENO "configure"
6315#include "confdefs.h"
6316$ac_includes_default
6317#ifdef F77_DUMMY_MAIN
6318# ifdef __cplusplus
6319 extern "C"
6320# endif
6321 int F77_DUMMY_MAIN() { return 1; }
6322#endif
6323int
6324main ()
6325{
6326static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6327test_array [0] = 0
6328
6329 ;
6330 return 0;
6331}
6332_ACEOF
6333rm -f conftest.$ac_objext
6334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6335 (eval $ac_compile) 2>&5
6336 ac_status=$?
6337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6338 (exit $ac_status); } &&
6339 { ac_try='test -s conftest.$ac_objext'
6340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6341 (eval $ac_try) 2>&5
6342 ac_status=$?
6343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6344 (exit $ac_status); }; }; then
6345 ac_hi=$ac_mid; break
6346else
6347 echo "$as_me: failed program was:" >&5
6348cat conftest.$ac_ext >&5
6349ac_lo=`expr $ac_mid + 1`
6350 if test $ac_lo -le $ac_mid; then
6351 ac_lo= ac_hi=
6352 break
6353 fi
6354 ac_mid=`expr 2 '*' $ac_mid + 1`
6355fi
6356rm -f conftest.$ac_objext conftest.$ac_ext
6357 done
6358else
6359 echo "$as_me: failed program was:" >&5
6360cat conftest.$ac_ext >&5
6361cat >conftest.$ac_ext <<_ACEOF
6362#line $LINENO "configure"
6363#include "confdefs.h"
6364$ac_includes_default
6365#ifdef F77_DUMMY_MAIN
6366# ifdef __cplusplus
6367 extern "C"
6368# endif
6369 int F77_DUMMY_MAIN() { return 1; }
6370#endif
6371int
6372main ()
6373{
6374static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6375test_array [0] = 0
6376
6377 ;
6378 return 0;
6379}
6380_ACEOF
6381rm -f conftest.$ac_objext
6382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6383 (eval $ac_compile) 2>&5
6384 ac_status=$?
6385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6386 (exit $ac_status); } &&
6387 { ac_try='test -s conftest.$ac_objext'
6388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6389 (eval $ac_try) 2>&5
6390 ac_status=$?
6391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6392 (exit $ac_status); }; }; then
6393 ac_hi=-1 ac_mid=-1
6394 while :; do
6395 cat >conftest.$ac_ext <<_ACEOF
6396#line $LINENO "configure"
6397#include "confdefs.h"
6398$ac_includes_default
6399#ifdef F77_DUMMY_MAIN
6400# ifdef __cplusplus
6401 extern "C"
6402# endif
6403 int F77_DUMMY_MAIN() { return 1; }
6404#endif
6405int
6406main ()
6407{
6408static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6409test_array [0] = 0
6410
6411 ;
6412 return 0;
6413}
6414_ACEOF
6415rm -f conftest.$ac_objext
6416if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6417 (eval $ac_compile) 2>&5
6418 ac_status=$?
6419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6420 (exit $ac_status); } &&
6421 { ac_try='test -s conftest.$ac_objext'
6422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6423 (eval $ac_try) 2>&5
6424 ac_status=$?
6425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6426 (exit $ac_status); }; }; then
6427 ac_lo=$ac_mid; break
6428else
6429 echo "$as_me: failed program was:" >&5
6430cat conftest.$ac_ext >&5
6431ac_hi=`expr '(' $ac_mid ')' - 1`
6432 if test $ac_mid -le $ac_hi; then
6433 ac_lo= ac_hi=
6434 break
6435 fi
6436 ac_mid=`expr 2 '*' $ac_mid`
6437fi
6438rm -f conftest.$ac_objext conftest.$ac_ext
6439 done
6440else
6441 echo "$as_me: failed program was:" >&5
6442cat conftest.$ac_ext >&5
6443ac_lo= ac_hi=
6444fi
6445rm -f conftest.$ac_objext conftest.$ac_ext
6446fi
6447rm -f conftest.$ac_objext conftest.$ac_ext
6448# Binary search between lo and hi bounds.
6449while test "x$ac_lo" != "x$ac_hi"; do
6450 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6451 cat >conftest.$ac_ext <<_ACEOF
6452#line $LINENO "configure"
6453#include "confdefs.h"
6454$ac_includes_default
6455#ifdef F77_DUMMY_MAIN
6456# ifdef __cplusplus
6457 extern "C"
6458# endif
6459 int F77_DUMMY_MAIN() { return 1; }
6460#endif
6461int
6462main ()
6463{
6464static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6465test_array [0] = 0
6466
6467 ;
6468 return 0;
6469}
6470_ACEOF
6471rm -f conftest.$ac_objext
6472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6473 (eval $ac_compile) 2>&5
6474 ac_status=$?
6475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6476 (exit $ac_status); } &&
6477 { ac_try='test -s conftest.$ac_objext'
6478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6479 (eval $ac_try) 2>&5
6480 ac_status=$?
6481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6482 (exit $ac_status); }; }; then
6483 ac_hi=$ac_mid
6484else
6485 echo "$as_me: failed program was:" >&5
6486cat conftest.$ac_ext >&5
6487ac_lo=`expr '(' $ac_mid ')' + 1`
6488fi
6489rm -f conftest.$ac_objext conftest.$ac_ext
6490done
6491case $ac_lo in
6492?*) ac_cv_sizeof_short=$ac_lo;;
6493'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6494echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6495 { (exit 1); exit 1; }; } ;;
6496esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006497else
6498 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006499 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6500echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6501 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006502else
Martin v. Löwis11437992002-04-12 09:54:03 +00006503 cat >conftest.$ac_ext <<_ACEOF
6504#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006505#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006506$ac_includes_default
6507long longval () { return (long) (sizeof (short)); }
6508unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006509#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006510#include <stdlib.h>
6511#ifdef F77_DUMMY_MAIN
6512# ifdef __cplusplus
6513 extern "C"
6514# endif
6515 int F77_DUMMY_MAIN() { return 1; }
6516#endif
6517int
6518main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006519{
Martin v. Löwis11437992002-04-12 09:54:03 +00006520
6521 FILE *f = fopen ("conftest.val", "w");
6522 if (! f)
6523 exit (1);
6524 if (((long) (sizeof (short))) < 0)
6525 {
6526 long i = longval ();
6527 if (i != ((long) (sizeof (short))))
6528 exit (1);
6529 fprintf (f, "%ld\n", i);
6530 }
6531 else
6532 {
6533 unsigned long i = ulongval ();
6534 if (i != ((long) (sizeof (short))))
6535 exit (1);
6536 fprintf (f, "%lu\n", i);
6537 }
6538 exit (ferror (f) || fclose (f) != 0);
6539
6540 ;
6541 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006542}
Martin v. Löwis11437992002-04-12 09:54:03 +00006543_ACEOF
6544rm -f conftest$ac_exeext
6545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6546 (eval $ac_link) 2>&5
6547 ac_status=$?
6548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6549 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6551 (eval $ac_try) 2>&5
6552 ac_status=$?
6553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6554 (exit $ac_status); }; }; then
6555 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006556else
Martin v. Löwis11437992002-04-12 09:54:03 +00006557 echo "$as_me: program exited with status $ac_status" >&5
6558echo "$as_me: failed program was:" >&5
6559cat conftest.$ac_ext >&5
6560( exit $ac_status )
6561{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6562echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6563 { (exit 1); exit 1; }; }
6564fi
6565rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6566fi
6567fi
6568rm -f conftest.val
6569else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006570 ac_cv_sizeof_short=0
6571fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006572fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006573echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6574echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6575cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006576#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006577_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006578
6579
Martin v. Löwis11437992002-04-12 09:54:03 +00006580echo "$as_me:$LINENO: checking for float" >&5
6581echo $ECHO_N "checking for float... $ECHO_C" >&6
6582if test "${ac_cv_type_float+set}" = set; then
6583 echo $ECHO_N "(cached) $ECHO_C" >&6
6584else
6585 cat >conftest.$ac_ext <<_ACEOF
6586#line $LINENO "configure"
6587#include "confdefs.h"
6588$ac_includes_default
6589#ifdef F77_DUMMY_MAIN
6590# ifdef __cplusplus
6591 extern "C"
6592# endif
6593 int F77_DUMMY_MAIN() { return 1; }
6594#endif
6595int
6596main ()
6597{
6598if ((float *) 0)
6599 return 0;
6600if (sizeof (float))
6601 return 0;
6602 ;
6603 return 0;
6604}
6605_ACEOF
6606rm -f conftest.$ac_objext
6607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6608 (eval $ac_compile) 2>&5
6609 ac_status=$?
6610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6611 (exit $ac_status); } &&
6612 { ac_try='test -s conftest.$ac_objext'
6613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6614 (eval $ac_try) 2>&5
6615 ac_status=$?
6616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6617 (exit $ac_status); }; }; then
6618 ac_cv_type_float=yes
6619else
6620 echo "$as_me: failed program was:" >&5
6621cat conftest.$ac_ext >&5
6622ac_cv_type_float=no
6623fi
6624rm -f conftest.$ac_objext conftest.$ac_ext
6625fi
6626echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6627echo "${ECHO_T}$ac_cv_type_float" >&6
6628
6629echo "$as_me:$LINENO: checking size of float" >&5
6630echo $ECHO_N "checking size of float... $ECHO_C" >&6
6631if test "${ac_cv_sizeof_float+set}" = set; then
6632 echo $ECHO_N "(cached) $ECHO_C" >&6
6633else
6634 if test "$ac_cv_type_float" = yes; then
6635 # The cast to unsigned long works around a bug in the HP C Compiler
6636 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6637 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6638 # This bug is HP SR number 8606223364.
6639 if test "$cross_compiling" = yes; then
6640 # Depending upon the size, compute the lo and hi bounds.
6641cat >conftest.$ac_ext <<_ACEOF
6642#line $LINENO "configure"
6643#include "confdefs.h"
6644$ac_includes_default
6645#ifdef F77_DUMMY_MAIN
6646# ifdef __cplusplus
6647 extern "C"
6648# endif
6649 int F77_DUMMY_MAIN() { return 1; }
6650#endif
6651int
6652main ()
6653{
6654static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6655test_array [0] = 0
6656
6657 ;
6658 return 0;
6659}
6660_ACEOF
6661rm -f conftest.$ac_objext
6662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6663 (eval $ac_compile) 2>&5
6664 ac_status=$?
6665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6666 (exit $ac_status); } &&
6667 { ac_try='test -s conftest.$ac_objext'
6668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6669 (eval $ac_try) 2>&5
6670 ac_status=$?
6671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6672 (exit $ac_status); }; }; then
6673 ac_lo=0 ac_mid=0
6674 while :; do
6675 cat >conftest.$ac_ext <<_ACEOF
6676#line $LINENO "configure"
6677#include "confdefs.h"
6678$ac_includes_default
6679#ifdef F77_DUMMY_MAIN
6680# ifdef __cplusplus
6681 extern "C"
6682# endif
6683 int F77_DUMMY_MAIN() { return 1; }
6684#endif
6685int
6686main ()
6687{
6688static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6689test_array [0] = 0
6690
6691 ;
6692 return 0;
6693}
6694_ACEOF
6695rm -f conftest.$ac_objext
6696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6697 (eval $ac_compile) 2>&5
6698 ac_status=$?
6699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6700 (exit $ac_status); } &&
6701 { ac_try='test -s conftest.$ac_objext'
6702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6703 (eval $ac_try) 2>&5
6704 ac_status=$?
6705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6706 (exit $ac_status); }; }; then
6707 ac_hi=$ac_mid; break
6708else
6709 echo "$as_me: failed program was:" >&5
6710cat conftest.$ac_ext >&5
6711ac_lo=`expr $ac_mid + 1`
6712 if test $ac_lo -le $ac_mid; then
6713 ac_lo= ac_hi=
6714 break
6715 fi
6716 ac_mid=`expr 2 '*' $ac_mid + 1`
6717fi
6718rm -f conftest.$ac_objext conftest.$ac_ext
6719 done
6720else
6721 echo "$as_me: failed program was:" >&5
6722cat conftest.$ac_ext >&5
6723cat >conftest.$ac_ext <<_ACEOF
6724#line $LINENO "configure"
6725#include "confdefs.h"
6726$ac_includes_default
6727#ifdef F77_DUMMY_MAIN
6728# ifdef __cplusplus
6729 extern "C"
6730# endif
6731 int F77_DUMMY_MAIN() { return 1; }
6732#endif
6733int
6734main ()
6735{
6736static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6737test_array [0] = 0
6738
6739 ;
6740 return 0;
6741}
6742_ACEOF
6743rm -f conftest.$ac_objext
6744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6745 (eval $ac_compile) 2>&5
6746 ac_status=$?
6747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6748 (exit $ac_status); } &&
6749 { ac_try='test -s conftest.$ac_objext'
6750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6751 (eval $ac_try) 2>&5
6752 ac_status=$?
6753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6754 (exit $ac_status); }; }; then
6755 ac_hi=-1 ac_mid=-1
6756 while :; do
6757 cat >conftest.$ac_ext <<_ACEOF
6758#line $LINENO "configure"
6759#include "confdefs.h"
6760$ac_includes_default
6761#ifdef F77_DUMMY_MAIN
6762# ifdef __cplusplus
6763 extern "C"
6764# endif
6765 int F77_DUMMY_MAIN() { return 1; }
6766#endif
6767int
6768main ()
6769{
6770static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6771test_array [0] = 0
6772
6773 ;
6774 return 0;
6775}
6776_ACEOF
6777rm -f conftest.$ac_objext
6778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6779 (eval $ac_compile) 2>&5
6780 ac_status=$?
6781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6782 (exit $ac_status); } &&
6783 { ac_try='test -s conftest.$ac_objext'
6784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6785 (eval $ac_try) 2>&5
6786 ac_status=$?
6787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6788 (exit $ac_status); }; }; then
6789 ac_lo=$ac_mid; break
6790else
6791 echo "$as_me: failed program was:" >&5
6792cat conftest.$ac_ext >&5
6793ac_hi=`expr '(' $ac_mid ')' - 1`
6794 if test $ac_mid -le $ac_hi; then
6795 ac_lo= ac_hi=
6796 break
6797 fi
6798 ac_mid=`expr 2 '*' $ac_mid`
6799fi
6800rm -f conftest.$ac_objext conftest.$ac_ext
6801 done
6802else
6803 echo "$as_me: failed program was:" >&5
6804cat conftest.$ac_ext >&5
6805ac_lo= ac_hi=
6806fi
6807rm -f conftest.$ac_objext conftest.$ac_ext
6808fi
6809rm -f conftest.$ac_objext conftest.$ac_ext
6810# Binary search between lo and hi bounds.
6811while test "x$ac_lo" != "x$ac_hi"; do
6812 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6813 cat >conftest.$ac_ext <<_ACEOF
6814#line $LINENO "configure"
6815#include "confdefs.h"
6816$ac_includes_default
6817#ifdef F77_DUMMY_MAIN
6818# ifdef __cplusplus
6819 extern "C"
6820# endif
6821 int F77_DUMMY_MAIN() { return 1; }
6822#endif
6823int
6824main ()
6825{
6826static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6827test_array [0] = 0
6828
6829 ;
6830 return 0;
6831}
6832_ACEOF
6833rm -f conftest.$ac_objext
6834if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6835 (eval $ac_compile) 2>&5
6836 ac_status=$?
6837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6838 (exit $ac_status); } &&
6839 { ac_try='test -s conftest.$ac_objext'
6840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6841 (eval $ac_try) 2>&5
6842 ac_status=$?
6843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6844 (exit $ac_status); }; }; then
6845 ac_hi=$ac_mid
6846else
6847 echo "$as_me: failed program was:" >&5
6848cat conftest.$ac_ext >&5
6849ac_lo=`expr '(' $ac_mid ')' + 1`
6850fi
6851rm -f conftest.$ac_objext conftest.$ac_ext
6852done
6853case $ac_lo in
6854?*) ac_cv_sizeof_float=$ac_lo;;
6855'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6856echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6857 { (exit 1); exit 1; }; } ;;
6858esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006859else
6860 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006861 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6862echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6863 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006864else
Martin v. Löwis11437992002-04-12 09:54:03 +00006865 cat >conftest.$ac_ext <<_ACEOF
6866#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006867#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006868$ac_includes_default
6869long longval () { return (long) (sizeof (float)); }
6870unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006871#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006872#include <stdlib.h>
6873#ifdef F77_DUMMY_MAIN
6874# ifdef __cplusplus
6875 extern "C"
6876# endif
6877 int F77_DUMMY_MAIN() { return 1; }
6878#endif
6879int
6880main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006881{
Martin v. Löwis11437992002-04-12 09:54:03 +00006882
6883 FILE *f = fopen ("conftest.val", "w");
6884 if (! f)
6885 exit (1);
6886 if (((long) (sizeof (float))) < 0)
6887 {
6888 long i = longval ();
6889 if (i != ((long) (sizeof (float))))
6890 exit (1);
6891 fprintf (f, "%ld\n", i);
6892 }
6893 else
6894 {
6895 unsigned long i = ulongval ();
6896 if (i != ((long) (sizeof (float))))
6897 exit (1);
6898 fprintf (f, "%lu\n", i);
6899 }
6900 exit (ferror (f) || fclose (f) != 0);
6901
6902 ;
6903 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006904}
Martin v. Löwis11437992002-04-12 09:54:03 +00006905_ACEOF
6906rm -f conftest$ac_exeext
6907if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6908 (eval $ac_link) 2>&5
6909 ac_status=$?
6910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6913 (eval $ac_try) 2>&5
6914 ac_status=$?
6915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6916 (exit $ac_status); }; }; then
6917 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006918else
Martin v. Löwis11437992002-04-12 09:54:03 +00006919 echo "$as_me: program exited with status $ac_status" >&5
6920echo "$as_me: failed program was:" >&5
6921cat conftest.$ac_ext >&5
6922( exit $ac_status )
6923{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6924echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6925 { (exit 1); exit 1; }; }
6926fi
6927rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6928fi
6929fi
6930rm -f conftest.val
6931else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006932 ac_cv_sizeof_float=0
6933fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006934fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006935echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6936echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6937cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006938#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006939_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006940
6941
Martin v. Löwis11437992002-04-12 09:54:03 +00006942echo "$as_me:$LINENO: checking for double" >&5
6943echo $ECHO_N "checking for double... $ECHO_C" >&6
6944if test "${ac_cv_type_double+set}" = set; then
6945 echo $ECHO_N "(cached) $ECHO_C" >&6
6946else
6947 cat >conftest.$ac_ext <<_ACEOF
6948#line $LINENO "configure"
6949#include "confdefs.h"
6950$ac_includes_default
6951#ifdef F77_DUMMY_MAIN
6952# ifdef __cplusplus
6953 extern "C"
6954# endif
6955 int F77_DUMMY_MAIN() { return 1; }
6956#endif
6957int
6958main ()
6959{
6960if ((double *) 0)
6961 return 0;
6962if (sizeof (double))
6963 return 0;
6964 ;
6965 return 0;
6966}
6967_ACEOF
6968rm -f conftest.$ac_objext
6969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6970 (eval $ac_compile) 2>&5
6971 ac_status=$?
6972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6973 (exit $ac_status); } &&
6974 { ac_try='test -s conftest.$ac_objext'
6975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6976 (eval $ac_try) 2>&5
6977 ac_status=$?
6978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6979 (exit $ac_status); }; }; then
6980 ac_cv_type_double=yes
6981else
6982 echo "$as_me: failed program was:" >&5
6983cat conftest.$ac_ext >&5
6984ac_cv_type_double=no
6985fi
6986rm -f conftest.$ac_objext conftest.$ac_ext
6987fi
6988echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6989echo "${ECHO_T}$ac_cv_type_double" >&6
6990
6991echo "$as_me:$LINENO: checking size of double" >&5
6992echo $ECHO_N "checking size of double... $ECHO_C" >&6
6993if test "${ac_cv_sizeof_double+set}" = set; then
6994 echo $ECHO_N "(cached) $ECHO_C" >&6
6995else
6996 if test "$ac_cv_type_double" = yes; then
6997 # The cast to unsigned long works around a bug in the HP C Compiler
6998 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6999 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7000 # This bug is HP SR number 8606223364.
7001 if test "$cross_compiling" = yes; then
7002 # Depending upon the size, compute the lo and hi bounds.
7003cat >conftest.$ac_ext <<_ACEOF
7004#line $LINENO "configure"
7005#include "confdefs.h"
7006$ac_includes_default
7007#ifdef F77_DUMMY_MAIN
7008# ifdef __cplusplus
7009 extern "C"
7010# endif
7011 int F77_DUMMY_MAIN() { return 1; }
7012#endif
7013int
7014main ()
7015{
7016static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7017test_array [0] = 0
7018
7019 ;
7020 return 0;
7021}
7022_ACEOF
7023rm -f conftest.$ac_objext
7024if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7025 (eval $ac_compile) 2>&5
7026 ac_status=$?
7027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7028 (exit $ac_status); } &&
7029 { ac_try='test -s conftest.$ac_objext'
7030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7031 (eval $ac_try) 2>&5
7032 ac_status=$?
7033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7034 (exit $ac_status); }; }; then
7035 ac_lo=0 ac_mid=0
7036 while :; do
7037 cat >conftest.$ac_ext <<_ACEOF
7038#line $LINENO "configure"
7039#include "confdefs.h"
7040$ac_includes_default
7041#ifdef F77_DUMMY_MAIN
7042# ifdef __cplusplus
7043 extern "C"
7044# endif
7045 int F77_DUMMY_MAIN() { return 1; }
7046#endif
7047int
7048main ()
7049{
7050static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7051test_array [0] = 0
7052
7053 ;
7054 return 0;
7055}
7056_ACEOF
7057rm -f conftest.$ac_objext
7058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7059 (eval $ac_compile) 2>&5
7060 ac_status=$?
7061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7062 (exit $ac_status); } &&
7063 { ac_try='test -s conftest.$ac_objext'
7064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7065 (eval $ac_try) 2>&5
7066 ac_status=$?
7067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7068 (exit $ac_status); }; }; then
7069 ac_hi=$ac_mid; break
7070else
7071 echo "$as_me: failed program was:" >&5
7072cat conftest.$ac_ext >&5
7073ac_lo=`expr $ac_mid + 1`
7074 if test $ac_lo -le $ac_mid; then
7075 ac_lo= ac_hi=
7076 break
7077 fi
7078 ac_mid=`expr 2 '*' $ac_mid + 1`
7079fi
7080rm -f conftest.$ac_objext conftest.$ac_ext
7081 done
7082else
7083 echo "$as_me: failed program was:" >&5
7084cat conftest.$ac_ext >&5
7085cat >conftest.$ac_ext <<_ACEOF
7086#line $LINENO "configure"
7087#include "confdefs.h"
7088$ac_includes_default
7089#ifdef F77_DUMMY_MAIN
7090# ifdef __cplusplus
7091 extern "C"
7092# endif
7093 int F77_DUMMY_MAIN() { return 1; }
7094#endif
7095int
7096main ()
7097{
7098static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7099test_array [0] = 0
7100
7101 ;
7102 return 0;
7103}
7104_ACEOF
7105rm -f conftest.$ac_objext
7106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7107 (eval $ac_compile) 2>&5
7108 ac_status=$?
7109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7110 (exit $ac_status); } &&
7111 { ac_try='test -s conftest.$ac_objext'
7112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7113 (eval $ac_try) 2>&5
7114 ac_status=$?
7115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7116 (exit $ac_status); }; }; then
7117 ac_hi=-1 ac_mid=-1
7118 while :; do
7119 cat >conftest.$ac_ext <<_ACEOF
7120#line $LINENO "configure"
7121#include "confdefs.h"
7122$ac_includes_default
7123#ifdef F77_DUMMY_MAIN
7124# ifdef __cplusplus
7125 extern "C"
7126# endif
7127 int F77_DUMMY_MAIN() { return 1; }
7128#endif
7129int
7130main ()
7131{
7132static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7133test_array [0] = 0
7134
7135 ;
7136 return 0;
7137}
7138_ACEOF
7139rm -f conftest.$ac_objext
7140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7141 (eval $ac_compile) 2>&5
7142 ac_status=$?
7143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7144 (exit $ac_status); } &&
7145 { ac_try='test -s conftest.$ac_objext'
7146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7147 (eval $ac_try) 2>&5
7148 ac_status=$?
7149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7150 (exit $ac_status); }; }; then
7151 ac_lo=$ac_mid; break
7152else
7153 echo "$as_me: failed program was:" >&5
7154cat conftest.$ac_ext >&5
7155ac_hi=`expr '(' $ac_mid ')' - 1`
7156 if test $ac_mid -le $ac_hi; then
7157 ac_lo= ac_hi=
7158 break
7159 fi
7160 ac_mid=`expr 2 '*' $ac_mid`
7161fi
7162rm -f conftest.$ac_objext conftest.$ac_ext
7163 done
7164else
7165 echo "$as_me: failed program was:" >&5
7166cat conftest.$ac_ext >&5
7167ac_lo= ac_hi=
7168fi
7169rm -f conftest.$ac_objext conftest.$ac_ext
7170fi
7171rm -f conftest.$ac_objext conftest.$ac_ext
7172# Binary search between lo and hi bounds.
7173while test "x$ac_lo" != "x$ac_hi"; do
7174 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7175 cat >conftest.$ac_ext <<_ACEOF
7176#line $LINENO "configure"
7177#include "confdefs.h"
7178$ac_includes_default
7179#ifdef F77_DUMMY_MAIN
7180# ifdef __cplusplus
7181 extern "C"
7182# endif
7183 int F77_DUMMY_MAIN() { return 1; }
7184#endif
7185int
7186main ()
7187{
7188static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7189test_array [0] = 0
7190
7191 ;
7192 return 0;
7193}
7194_ACEOF
7195rm -f conftest.$ac_objext
7196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7197 (eval $ac_compile) 2>&5
7198 ac_status=$?
7199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7200 (exit $ac_status); } &&
7201 { ac_try='test -s conftest.$ac_objext'
7202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7203 (eval $ac_try) 2>&5
7204 ac_status=$?
7205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7206 (exit $ac_status); }; }; then
7207 ac_hi=$ac_mid
7208else
7209 echo "$as_me: failed program was:" >&5
7210cat conftest.$ac_ext >&5
7211ac_lo=`expr '(' $ac_mid ')' + 1`
7212fi
7213rm -f conftest.$ac_objext conftest.$ac_ext
7214done
7215case $ac_lo in
7216?*) ac_cv_sizeof_double=$ac_lo;;
7217'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7218echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7219 { (exit 1); exit 1; }; } ;;
7220esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007221else
7222 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007223 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7224echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7225 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007226else
Martin v. Löwis11437992002-04-12 09:54:03 +00007227 cat >conftest.$ac_ext <<_ACEOF
7228#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007229#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007230$ac_includes_default
7231long longval () { return (long) (sizeof (double)); }
7232unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007233#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007234#include <stdlib.h>
7235#ifdef F77_DUMMY_MAIN
7236# ifdef __cplusplus
7237 extern "C"
7238# endif
7239 int F77_DUMMY_MAIN() { return 1; }
7240#endif
7241int
7242main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007243{
Martin v. Löwis11437992002-04-12 09:54:03 +00007244
7245 FILE *f = fopen ("conftest.val", "w");
7246 if (! f)
7247 exit (1);
7248 if (((long) (sizeof (double))) < 0)
7249 {
7250 long i = longval ();
7251 if (i != ((long) (sizeof (double))))
7252 exit (1);
7253 fprintf (f, "%ld\n", i);
7254 }
7255 else
7256 {
7257 unsigned long i = ulongval ();
7258 if (i != ((long) (sizeof (double))))
7259 exit (1);
7260 fprintf (f, "%lu\n", i);
7261 }
7262 exit (ferror (f) || fclose (f) != 0);
7263
7264 ;
7265 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007266}
Martin v. Löwis11437992002-04-12 09:54:03 +00007267_ACEOF
7268rm -f conftest$ac_exeext
7269if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7270 (eval $ac_link) 2>&5
7271 ac_status=$?
7272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7273 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7275 (eval $ac_try) 2>&5
7276 ac_status=$?
7277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7278 (exit $ac_status); }; }; then
7279 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007280else
Martin v. Löwis11437992002-04-12 09:54:03 +00007281 echo "$as_me: program exited with status $ac_status" >&5
7282echo "$as_me: failed program was:" >&5
7283cat conftest.$ac_ext >&5
7284( exit $ac_status )
7285{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7286echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7287 { (exit 1); exit 1; }; }
7288fi
7289rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7290fi
7291fi
7292rm -f conftest.val
7293else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007294 ac_cv_sizeof_double=0
7295fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007296fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007297echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7298echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7299cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007300#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007301_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007302
7303
Martin v. Löwis11437992002-04-12 09:54:03 +00007304echo "$as_me:$LINENO: checking for fpos_t" >&5
7305echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7306if test "${ac_cv_type_fpos_t+set}" = set; then
7307 echo $ECHO_N "(cached) $ECHO_C" >&6
7308else
7309 cat >conftest.$ac_ext <<_ACEOF
7310#line $LINENO "configure"
7311#include "confdefs.h"
7312$ac_includes_default
7313#ifdef F77_DUMMY_MAIN
7314# ifdef __cplusplus
7315 extern "C"
7316# endif
7317 int F77_DUMMY_MAIN() { return 1; }
7318#endif
7319int
7320main ()
7321{
7322if ((fpos_t *) 0)
7323 return 0;
7324if (sizeof (fpos_t))
7325 return 0;
7326 ;
7327 return 0;
7328}
7329_ACEOF
7330rm -f conftest.$ac_objext
7331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7332 (eval $ac_compile) 2>&5
7333 ac_status=$?
7334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7335 (exit $ac_status); } &&
7336 { ac_try='test -s conftest.$ac_objext'
7337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7338 (eval $ac_try) 2>&5
7339 ac_status=$?
7340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7341 (exit $ac_status); }; }; then
7342 ac_cv_type_fpos_t=yes
7343else
7344 echo "$as_me: failed program was:" >&5
7345cat conftest.$ac_ext >&5
7346ac_cv_type_fpos_t=no
7347fi
7348rm -f conftest.$ac_objext conftest.$ac_ext
7349fi
7350echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7351echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7352
7353echo "$as_me:$LINENO: checking size of fpos_t" >&5
7354echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7355if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7356 echo $ECHO_N "(cached) $ECHO_C" >&6
7357else
7358 if test "$ac_cv_type_fpos_t" = yes; then
7359 # The cast to unsigned long works around a bug in the HP C Compiler
7360 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7361 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7362 # This bug is HP SR number 8606223364.
7363 if test "$cross_compiling" = yes; then
7364 # Depending upon the size, compute the lo and hi bounds.
7365cat >conftest.$ac_ext <<_ACEOF
7366#line $LINENO "configure"
7367#include "confdefs.h"
7368$ac_includes_default
7369#ifdef F77_DUMMY_MAIN
7370# ifdef __cplusplus
7371 extern "C"
7372# endif
7373 int F77_DUMMY_MAIN() { return 1; }
7374#endif
7375int
7376main ()
7377{
7378static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7379test_array [0] = 0
7380
7381 ;
7382 return 0;
7383}
7384_ACEOF
7385rm -f conftest.$ac_objext
7386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7387 (eval $ac_compile) 2>&5
7388 ac_status=$?
7389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7390 (exit $ac_status); } &&
7391 { ac_try='test -s conftest.$ac_objext'
7392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7393 (eval $ac_try) 2>&5
7394 ac_status=$?
7395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7396 (exit $ac_status); }; }; then
7397 ac_lo=0 ac_mid=0
7398 while :; do
7399 cat >conftest.$ac_ext <<_ACEOF
7400#line $LINENO "configure"
7401#include "confdefs.h"
7402$ac_includes_default
7403#ifdef F77_DUMMY_MAIN
7404# ifdef __cplusplus
7405 extern "C"
7406# endif
7407 int F77_DUMMY_MAIN() { return 1; }
7408#endif
7409int
7410main ()
7411{
7412static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7413test_array [0] = 0
7414
7415 ;
7416 return 0;
7417}
7418_ACEOF
7419rm -f conftest.$ac_objext
7420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7421 (eval $ac_compile) 2>&5
7422 ac_status=$?
7423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7424 (exit $ac_status); } &&
7425 { ac_try='test -s conftest.$ac_objext'
7426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7427 (eval $ac_try) 2>&5
7428 ac_status=$?
7429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7430 (exit $ac_status); }; }; then
7431 ac_hi=$ac_mid; break
7432else
7433 echo "$as_me: failed program was:" >&5
7434cat conftest.$ac_ext >&5
7435ac_lo=`expr $ac_mid + 1`
7436 if test $ac_lo -le $ac_mid; then
7437 ac_lo= ac_hi=
7438 break
7439 fi
7440 ac_mid=`expr 2 '*' $ac_mid + 1`
7441fi
7442rm -f conftest.$ac_objext conftest.$ac_ext
7443 done
7444else
7445 echo "$as_me: failed program was:" >&5
7446cat conftest.$ac_ext >&5
7447cat >conftest.$ac_ext <<_ACEOF
7448#line $LINENO "configure"
7449#include "confdefs.h"
7450$ac_includes_default
7451#ifdef F77_DUMMY_MAIN
7452# ifdef __cplusplus
7453 extern "C"
7454# endif
7455 int F77_DUMMY_MAIN() { return 1; }
7456#endif
7457int
7458main ()
7459{
7460static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7461test_array [0] = 0
7462
7463 ;
7464 return 0;
7465}
7466_ACEOF
7467rm -f conftest.$ac_objext
7468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7469 (eval $ac_compile) 2>&5
7470 ac_status=$?
7471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7472 (exit $ac_status); } &&
7473 { ac_try='test -s conftest.$ac_objext'
7474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7475 (eval $ac_try) 2>&5
7476 ac_status=$?
7477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7478 (exit $ac_status); }; }; then
7479 ac_hi=-1 ac_mid=-1
7480 while :; do
7481 cat >conftest.$ac_ext <<_ACEOF
7482#line $LINENO "configure"
7483#include "confdefs.h"
7484$ac_includes_default
7485#ifdef F77_DUMMY_MAIN
7486# ifdef __cplusplus
7487 extern "C"
7488# endif
7489 int F77_DUMMY_MAIN() { return 1; }
7490#endif
7491int
7492main ()
7493{
7494static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7495test_array [0] = 0
7496
7497 ;
7498 return 0;
7499}
7500_ACEOF
7501rm -f conftest.$ac_objext
7502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7503 (eval $ac_compile) 2>&5
7504 ac_status=$?
7505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7506 (exit $ac_status); } &&
7507 { ac_try='test -s conftest.$ac_objext'
7508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7509 (eval $ac_try) 2>&5
7510 ac_status=$?
7511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7512 (exit $ac_status); }; }; then
7513 ac_lo=$ac_mid; break
7514else
7515 echo "$as_me: failed program was:" >&5
7516cat conftest.$ac_ext >&5
7517ac_hi=`expr '(' $ac_mid ')' - 1`
7518 if test $ac_mid -le $ac_hi; then
7519 ac_lo= ac_hi=
7520 break
7521 fi
7522 ac_mid=`expr 2 '*' $ac_mid`
7523fi
7524rm -f conftest.$ac_objext conftest.$ac_ext
7525 done
7526else
7527 echo "$as_me: failed program was:" >&5
7528cat conftest.$ac_ext >&5
7529ac_lo= ac_hi=
7530fi
7531rm -f conftest.$ac_objext conftest.$ac_ext
7532fi
7533rm -f conftest.$ac_objext conftest.$ac_ext
7534# Binary search between lo and hi bounds.
7535while test "x$ac_lo" != "x$ac_hi"; do
7536 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7537 cat >conftest.$ac_ext <<_ACEOF
7538#line $LINENO "configure"
7539#include "confdefs.h"
7540$ac_includes_default
7541#ifdef F77_DUMMY_MAIN
7542# ifdef __cplusplus
7543 extern "C"
7544# endif
7545 int F77_DUMMY_MAIN() { return 1; }
7546#endif
7547int
7548main ()
7549{
7550static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7551test_array [0] = 0
7552
7553 ;
7554 return 0;
7555}
7556_ACEOF
7557rm -f conftest.$ac_objext
7558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7559 (eval $ac_compile) 2>&5
7560 ac_status=$?
7561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7562 (exit $ac_status); } &&
7563 { ac_try='test -s conftest.$ac_objext'
7564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7565 (eval $ac_try) 2>&5
7566 ac_status=$?
7567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7568 (exit $ac_status); }; }; then
7569 ac_hi=$ac_mid
7570else
7571 echo "$as_me: failed program was:" >&5
7572cat conftest.$ac_ext >&5
7573ac_lo=`expr '(' $ac_mid ')' + 1`
7574fi
7575rm -f conftest.$ac_objext conftest.$ac_ext
7576done
7577case $ac_lo in
7578?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7579'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7580echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7581 { (exit 1); exit 1; }; } ;;
7582esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007583else
7584 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007585 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7586echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7587 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007588else
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 cat >conftest.$ac_ext <<_ACEOF
7590#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007591#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007592$ac_includes_default
7593long longval () { return (long) (sizeof (fpos_t)); }
7594unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007595#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007596#include <stdlib.h>
7597#ifdef F77_DUMMY_MAIN
7598# ifdef __cplusplus
7599 extern "C"
7600# endif
7601 int F77_DUMMY_MAIN() { return 1; }
7602#endif
7603int
7604main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007605{
Martin v. Löwis11437992002-04-12 09:54:03 +00007606
7607 FILE *f = fopen ("conftest.val", "w");
7608 if (! f)
7609 exit (1);
7610 if (((long) (sizeof (fpos_t))) < 0)
7611 {
7612 long i = longval ();
7613 if (i != ((long) (sizeof (fpos_t))))
7614 exit (1);
7615 fprintf (f, "%ld\n", i);
7616 }
7617 else
7618 {
7619 unsigned long i = ulongval ();
7620 if (i != ((long) (sizeof (fpos_t))))
7621 exit (1);
7622 fprintf (f, "%lu\n", i);
7623 }
7624 exit (ferror (f) || fclose (f) != 0);
7625
7626 ;
7627 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007628}
Martin v. Löwis11437992002-04-12 09:54:03 +00007629_ACEOF
7630rm -f conftest$ac_exeext
7631if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7632 (eval $ac_link) 2>&5
7633 ac_status=$?
7634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7635 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7637 (eval $ac_try) 2>&5
7638 ac_status=$?
7639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7640 (exit $ac_status); }; }; then
7641 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007642else
Martin v. Löwis11437992002-04-12 09:54:03 +00007643 echo "$as_me: program exited with status $ac_status" >&5
7644echo "$as_me: failed program was:" >&5
7645cat conftest.$ac_ext >&5
7646( exit $ac_status )
7647{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7648echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7649 { (exit 1); exit 1; }; }
7650fi
7651rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7652fi
7653fi
7654rm -f conftest.val
7655else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007656 ac_cv_sizeof_fpos_t=0
7657fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007658fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007659echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7660echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7661cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007662#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007663_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007664
Michael W. Hudson54241132001-12-07 15:38:26 +00007665
7666
Martin v. Löwis11437992002-04-12 09:54:03 +00007667echo "$as_me:$LINENO: checking for long long support" >&5
7668echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007669have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007670cat >conftest.$ac_ext <<_ACEOF
7671#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007672#include "confdefs.h"
7673
Martin v. Löwis11437992002-04-12 09:54:03 +00007674#ifdef F77_DUMMY_MAIN
7675# ifdef __cplusplus
7676 extern "C"
7677# endif
7678 int F77_DUMMY_MAIN() { return 1; }
7679#endif
7680int
7681main ()
7682{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007683long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007684 ;
7685 return 0;
7686}
7687_ACEOF
7688rm -f conftest.$ac_objext
7689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7690 (eval $ac_compile) 2>&5
7691 ac_status=$?
7692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7693 (exit $ac_status); } &&
7694 { ac_try='test -s conftest.$ac_objext'
7695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7696 (eval $ac_try) 2>&5
7697 ac_status=$?
7698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7699 (exit $ac_status); }; }; then
7700
7701
7702cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007703#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007704_ACEOF
7705
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007706 have_long_long=yes
7707
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007708else
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 echo "$as_me: failed program was:" >&5
7710cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007711fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007712rm -f conftest.$ac_objext conftest.$ac_ext
7713echo "$as_me:$LINENO: result: $have_long_long" >&5
7714echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007715if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007716echo "$as_me:$LINENO: checking for long long" >&5
7717echo $ECHO_N "checking for long long... $ECHO_C" >&6
7718if test "${ac_cv_type_long_long+set}" = set; then
7719 echo $ECHO_N "(cached) $ECHO_C" >&6
7720else
7721 cat >conftest.$ac_ext <<_ACEOF
7722#line $LINENO "configure"
7723#include "confdefs.h"
7724$ac_includes_default
7725#ifdef F77_DUMMY_MAIN
7726# ifdef __cplusplus
7727 extern "C"
7728# endif
7729 int F77_DUMMY_MAIN() { return 1; }
7730#endif
7731int
7732main ()
7733{
7734if ((long long *) 0)
7735 return 0;
7736if (sizeof (long long))
7737 return 0;
7738 ;
7739 return 0;
7740}
7741_ACEOF
7742rm -f conftest.$ac_objext
7743if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7744 (eval $ac_compile) 2>&5
7745 ac_status=$?
7746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7747 (exit $ac_status); } &&
7748 { ac_try='test -s conftest.$ac_objext'
7749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7750 (eval $ac_try) 2>&5
7751 ac_status=$?
7752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7753 (exit $ac_status); }; }; then
7754 ac_cv_type_long_long=yes
7755else
7756 echo "$as_me: failed program was:" >&5
7757cat conftest.$ac_ext >&5
7758ac_cv_type_long_long=no
7759fi
7760rm -f conftest.$ac_objext conftest.$ac_ext
7761fi
7762echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7763echo "${ECHO_T}$ac_cv_type_long_long" >&6
7764
7765echo "$as_me:$LINENO: checking size of long long" >&5
7766echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7767if test "${ac_cv_sizeof_long_long+set}" = set; then
7768 echo $ECHO_N "(cached) $ECHO_C" >&6
7769else
7770 if test "$ac_cv_type_long_long" = yes; then
7771 # The cast to unsigned long works around a bug in the HP C Compiler
7772 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7773 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7774 # This bug is HP SR number 8606223364.
7775 if test "$cross_compiling" = yes; then
7776 # Depending upon the size, compute the lo and hi bounds.
7777cat >conftest.$ac_ext <<_ACEOF
7778#line $LINENO "configure"
7779#include "confdefs.h"
7780$ac_includes_default
7781#ifdef F77_DUMMY_MAIN
7782# ifdef __cplusplus
7783 extern "C"
7784# endif
7785 int F77_DUMMY_MAIN() { return 1; }
7786#endif
7787int
7788main ()
7789{
7790static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7791test_array [0] = 0
7792
7793 ;
7794 return 0;
7795}
7796_ACEOF
7797rm -f conftest.$ac_objext
7798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7799 (eval $ac_compile) 2>&5
7800 ac_status=$?
7801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7802 (exit $ac_status); } &&
7803 { ac_try='test -s conftest.$ac_objext'
7804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7805 (eval $ac_try) 2>&5
7806 ac_status=$?
7807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7808 (exit $ac_status); }; }; then
7809 ac_lo=0 ac_mid=0
7810 while :; do
7811 cat >conftest.$ac_ext <<_ACEOF
7812#line $LINENO "configure"
7813#include "confdefs.h"
7814$ac_includes_default
7815#ifdef F77_DUMMY_MAIN
7816# ifdef __cplusplus
7817 extern "C"
7818# endif
7819 int F77_DUMMY_MAIN() { return 1; }
7820#endif
7821int
7822main ()
7823{
7824static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7825test_array [0] = 0
7826
7827 ;
7828 return 0;
7829}
7830_ACEOF
7831rm -f conftest.$ac_objext
7832if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7833 (eval $ac_compile) 2>&5
7834 ac_status=$?
7835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7836 (exit $ac_status); } &&
7837 { ac_try='test -s conftest.$ac_objext'
7838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7839 (eval $ac_try) 2>&5
7840 ac_status=$?
7841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7842 (exit $ac_status); }; }; then
7843 ac_hi=$ac_mid; break
7844else
7845 echo "$as_me: failed program was:" >&5
7846cat conftest.$ac_ext >&5
7847ac_lo=`expr $ac_mid + 1`
7848 if test $ac_lo -le $ac_mid; then
7849 ac_lo= ac_hi=
7850 break
7851 fi
7852 ac_mid=`expr 2 '*' $ac_mid + 1`
7853fi
7854rm -f conftest.$ac_objext conftest.$ac_ext
7855 done
7856else
7857 echo "$as_me: failed program was:" >&5
7858cat conftest.$ac_ext >&5
7859cat >conftest.$ac_ext <<_ACEOF
7860#line $LINENO "configure"
7861#include "confdefs.h"
7862$ac_includes_default
7863#ifdef F77_DUMMY_MAIN
7864# ifdef __cplusplus
7865 extern "C"
7866# endif
7867 int F77_DUMMY_MAIN() { return 1; }
7868#endif
7869int
7870main ()
7871{
7872static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7873test_array [0] = 0
7874
7875 ;
7876 return 0;
7877}
7878_ACEOF
7879rm -f conftest.$ac_objext
7880if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7881 (eval $ac_compile) 2>&5
7882 ac_status=$?
7883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7884 (exit $ac_status); } &&
7885 { ac_try='test -s conftest.$ac_objext'
7886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7887 (eval $ac_try) 2>&5
7888 ac_status=$?
7889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7890 (exit $ac_status); }; }; then
7891 ac_hi=-1 ac_mid=-1
7892 while :; do
7893 cat >conftest.$ac_ext <<_ACEOF
7894#line $LINENO "configure"
7895#include "confdefs.h"
7896$ac_includes_default
7897#ifdef F77_DUMMY_MAIN
7898# ifdef __cplusplus
7899 extern "C"
7900# endif
7901 int F77_DUMMY_MAIN() { return 1; }
7902#endif
7903int
7904main ()
7905{
7906static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7907test_array [0] = 0
7908
7909 ;
7910 return 0;
7911}
7912_ACEOF
7913rm -f conftest.$ac_objext
7914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7915 (eval $ac_compile) 2>&5
7916 ac_status=$?
7917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7918 (exit $ac_status); } &&
7919 { ac_try='test -s conftest.$ac_objext'
7920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7921 (eval $ac_try) 2>&5
7922 ac_status=$?
7923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7924 (exit $ac_status); }; }; then
7925 ac_lo=$ac_mid; break
7926else
7927 echo "$as_me: failed program was:" >&5
7928cat conftest.$ac_ext >&5
7929ac_hi=`expr '(' $ac_mid ')' - 1`
7930 if test $ac_mid -le $ac_hi; then
7931 ac_lo= ac_hi=
7932 break
7933 fi
7934 ac_mid=`expr 2 '*' $ac_mid`
7935fi
7936rm -f conftest.$ac_objext conftest.$ac_ext
7937 done
7938else
7939 echo "$as_me: failed program was:" >&5
7940cat conftest.$ac_ext >&5
7941ac_lo= ac_hi=
7942fi
7943rm -f conftest.$ac_objext conftest.$ac_ext
7944fi
7945rm -f conftest.$ac_objext conftest.$ac_ext
7946# Binary search between lo and hi bounds.
7947while test "x$ac_lo" != "x$ac_hi"; do
7948 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7949 cat >conftest.$ac_ext <<_ACEOF
7950#line $LINENO "configure"
7951#include "confdefs.h"
7952$ac_includes_default
7953#ifdef F77_DUMMY_MAIN
7954# ifdef __cplusplus
7955 extern "C"
7956# endif
7957 int F77_DUMMY_MAIN() { return 1; }
7958#endif
7959int
7960main ()
7961{
7962static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7963test_array [0] = 0
7964
7965 ;
7966 return 0;
7967}
7968_ACEOF
7969rm -f conftest.$ac_objext
7970if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7971 (eval $ac_compile) 2>&5
7972 ac_status=$?
7973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974 (exit $ac_status); } &&
7975 { ac_try='test -s conftest.$ac_objext'
7976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7977 (eval $ac_try) 2>&5
7978 ac_status=$?
7979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980 (exit $ac_status); }; }; then
7981 ac_hi=$ac_mid
7982else
7983 echo "$as_me: failed program was:" >&5
7984cat conftest.$ac_ext >&5
7985ac_lo=`expr '(' $ac_mid ')' + 1`
7986fi
7987rm -f conftest.$ac_objext conftest.$ac_ext
7988done
7989case $ac_lo in
7990?*) ac_cv_sizeof_long_long=$ac_lo;;
7991'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7992echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7993 { (exit 1); exit 1; }; } ;;
7994esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007995else
7996 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7998echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7999 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008000else
Martin v. Löwis11437992002-04-12 09:54:03 +00008001 cat >conftest.$ac_ext <<_ACEOF
8002#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008003#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008004$ac_includes_default
8005long longval () { return (long) (sizeof (long long)); }
8006unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008007#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008008#include <stdlib.h>
8009#ifdef F77_DUMMY_MAIN
8010# ifdef __cplusplus
8011 extern "C"
8012# endif
8013 int F77_DUMMY_MAIN() { return 1; }
8014#endif
8015int
8016main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008017{
Martin v. Löwis11437992002-04-12 09:54:03 +00008018
8019 FILE *f = fopen ("conftest.val", "w");
8020 if (! f)
8021 exit (1);
8022 if (((long) (sizeof (long long))) < 0)
8023 {
8024 long i = longval ();
8025 if (i != ((long) (sizeof (long long))))
8026 exit (1);
8027 fprintf (f, "%ld\n", i);
8028 }
8029 else
8030 {
8031 unsigned long i = ulongval ();
8032 if (i != ((long) (sizeof (long long))))
8033 exit (1);
8034 fprintf (f, "%lu\n", i);
8035 }
8036 exit (ferror (f) || fclose (f) != 0);
8037
8038 ;
8039 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008040}
Martin v. Löwis11437992002-04-12 09:54:03 +00008041_ACEOF
8042rm -f conftest$ac_exeext
8043if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8044 (eval $ac_link) 2>&5
8045 ac_status=$?
8046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8049 (eval $ac_try) 2>&5
8050 ac_status=$?
8051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8052 (exit $ac_status); }; }; then
8053 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008054else
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 echo "$as_me: program exited with status $ac_status" >&5
8056echo "$as_me: failed program was:" >&5
8057cat conftest.$ac_ext >&5
8058( exit $ac_status )
8059{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8060echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8061 { (exit 1); exit 1; }; }
8062fi
8063rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8064fi
8065fi
8066rm -f conftest.val
8067else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008068 ac_cv_sizeof_long_long=0
8069fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008070fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008071echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8072echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8073cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008074#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008075_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008076
Michael W. Hudson54241132001-12-07 15:38:26 +00008077
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008078fi
8079
Martin v. Löwis11437992002-04-12 09:54:03 +00008080echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8081echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008082have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008083cat >conftest.$ac_ext <<_ACEOF
8084#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008085#include "confdefs.h"
8086
Martin v. Löwis11437992002-04-12 09:54:03 +00008087#ifdef F77_DUMMY_MAIN
8088# ifdef __cplusplus
8089 extern "C"
8090# endif
8091 int F77_DUMMY_MAIN() { return 1; }
8092#endif
8093int
8094main ()
8095{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008096uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 ;
8098 return 0;
8099}
8100_ACEOF
8101rm -f conftest.$ac_objext
8102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8103 (eval $ac_compile) 2>&5
8104 ac_status=$?
8105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8106 (exit $ac_status); } &&
8107 { ac_try='test -s conftest.$ac_objext'
8108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8109 (eval $ac_try) 2>&5
8110 ac_status=$?
8111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8112 (exit $ac_status); }; }; then
8113
8114
8115cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008116#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008117_ACEOF
8118
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008119 have_uintptr_t=yes
8120
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008121else
Martin v. Löwis11437992002-04-12 09:54:03 +00008122 echo "$as_me: failed program was:" >&5
8123cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008124fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008125rm -f conftest.$ac_objext conftest.$ac_ext
8126echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8127echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008128if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008129echo "$as_me:$LINENO: checking for uintptr_t" >&5
8130echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8131if test "${ac_cv_type_uintptr_t+set}" = set; then
8132 echo $ECHO_N "(cached) $ECHO_C" >&6
8133else
8134 cat >conftest.$ac_ext <<_ACEOF
8135#line $LINENO "configure"
8136#include "confdefs.h"
8137$ac_includes_default
8138#ifdef F77_DUMMY_MAIN
8139# ifdef __cplusplus
8140 extern "C"
8141# endif
8142 int F77_DUMMY_MAIN() { return 1; }
8143#endif
8144int
8145main ()
8146{
8147if ((uintptr_t *) 0)
8148 return 0;
8149if (sizeof (uintptr_t))
8150 return 0;
8151 ;
8152 return 0;
8153}
8154_ACEOF
8155rm -f conftest.$ac_objext
8156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8157 (eval $ac_compile) 2>&5
8158 ac_status=$?
8159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8160 (exit $ac_status); } &&
8161 { ac_try='test -s conftest.$ac_objext'
8162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8163 (eval $ac_try) 2>&5
8164 ac_status=$?
8165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8166 (exit $ac_status); }; }; then
8167 ac_cv_type_uintptr_t=yes
8168else
8169 echo "$as_me: failed program was:" >&5
8170cat conftest.$ac_ext >&5
8171ac_cv_type_uintptr_t=no
8172fi
8173rm -f conftest.$ac_objext conftest.$ac_ext
8174fi
8175echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8176echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8177
8178echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8179echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8180if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8181 echo $ECHO_N "(cached) $ECHO_C" >&6
8182else
8183 if test "$ac_cv_type_uintptr_t" = yes; then
8184 # The cast to unsigned long works around a bug in the HP C Compiler
8185 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8186 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8187 # This bug is HP SR number 8606223364.
8188 if test "$cross_compiling" = yes; then
8189 # Depending upon the size, compute the lo and hi bounds.
8190cat >conftest.$ac_ext <<_ACEOF
8191#line $LINENO "configure"
8192#include "confdefs.h"
8193$ac_includes_default
8194#ifdef F77_DUMMY_MAIN
8195# ifdef __cplusplus
8196 extern "C"
8197# endif
8198 int F77_DUMMY_MAIN() { return 1; }
8199#endif
8200int
8201main ()
8202{
8203static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8204test_array [0] = 0
8205
8206 ;
8207 return 0;
8208}
8209_ACEOF
8210rm -f conftest.$ac_objext
8211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8212 (eval $ac_compile) 2>&5
8213 ac_status=$?
8214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8215 (exit $ac_status); } &&
8216 { ac_try='test -s conftest.$ac_objext'
8217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8218 (eval $ac_try) 2>&5
8219 ac_status=$?
8220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8221 (exit $ac_status); }; }; then
8222 ac_lo=0 ac_mid=0
8223 while :; do
8224 cat >conftest.$ac_ext <<_ACEOF
8225#line $LINENO "configure"
8226#include "confdefs.h"
8227$ac_includes_default
8228#ifdef F77_DUMMY_MAIN
8229# ifdef __cplusplus
8230 extern "C"
8231# endif
8232 int F77_DUMMY_MAIN() { return 1; }
8233#endif
8234int
8235main ()
8236{
8237static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8238test_array [0] = 0
8239
8240 ;
8241 return 0;
8242}
8243_ACEOF
8244rm -f conftest.$ac_objext
8245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8246 (eval $ac_compile) 2>&5
8247 ac_status=$?
8248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8249 (exit $ac_status); } &&
8250 { ac_try='test -s conftest.$ac_objext'
8251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8252 (eval $ac_try) 2>&5
8253 ac_status=$?
8254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8255 (exit $ac_status); }; }; then
8256 ac_hi=$ac_mid; break
8257else
8258 echo "$as_me: failed program was:" >&5
8259cat conftest.$ac_ext >&5
8260ac_lo=`expr $ac_mid + 1`
8261 if test $ac_lo -le $ac_mid; then
8262 ac_lo= ac_hi=
8263 break
8264 fi
8265 ac_mid=`expr 2 '*' $ac_mid + 1`
8266fi
8267rm -f conftest.$ac_objext conftest.$ac_ext
8268 done
8269else
8270 echo "$as_me: failed program was:" >&5
8271cat conftest.$ac_ext >&5
8272cat >conftest.$ac_ext <<_ACEOF
8273#line $LINENO "configure"
8274#include "confdefs.h"
8275$ac_includes_default
8276#ifdef F77_DUMMY_MAIN
8277# ifdef __cplusplus
8278 extern "C"
8279# endif
8280 int F77_DUMMY_MAIN() { return 1; }
8281#endif
8282int
8283main ()
8284{
8285static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8286test_array [0] = 0
8287
8288 ;
8289 return 0;
8290}
8291_ACEOF
8292rm -f conftest.$ac_objext
8293if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8294 (eval $ac_compile) 2>&5
8295 ac_status=$?
8296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8297 (exit $ac_status); } &&
8298 { ac_try='test -s conftest.$ac_objext'
8299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8300 (eval $ac_try) 2>&5
8301 ac_status=$?
8302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8303 (exit $ac_status); }; }; then
8304 ac_hi=-1 ac_mid=-1
8305 while :; do
8306 cat >conftest.$ac_ext <<_ACEOF
8307#line $LINENO "configure"
8308#include "confdefs.h"
8309$ac_includes_default
8310#ifdef F77_DUMMY_MAIN
8311# ifdef __cplusplus
8312 extern "C"
8313# endif
8314 int F77_DUMMY_MAIN() { return 1; }
8315#endif
8316int
8317main ()
8318{
8319static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8320test_array [0] = 0
8321
8322 ;
8323 return 0;
8324}
8325_ACEOF
8326rm -f conftest.$ac_objext
8327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8328 (eval $ac_compile) 2>&5
8329 ac_status=$?
8330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8331 (exit $ac_status); } &&
8332 { ac_try='test -s conftest.$ac_objext'
8333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8334 (eval $ac_try) 2>&5
8335 ac_status=$?
8336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337 (exit $ac_status); }; }; then
8338 ac_lo=$ac_mid; break
8339else
8340 echo "$as_me: failed program was:" >&5
8341cat conftest.$ac_ext >&5
8342ac_hi=`expr '(' $ac_mid ')' - 1`
8343 if test $ac_mid -le $ac_hi; then
8344 ac_lo= ac_hi=
8345 break
8346 fi
8347 ac_mid=`expr 2 '*' $ac_mid`
8348fi
8349rm -f conftest.$ac_objext conftest.$ac_ext
8350 done
8351else
8352 echo "$as_me: failed program was:" >&5
8353cat conftest.$ac_ext >&5
8354ac_lo= ac_hi=
8355fi
8356rm -f conftest.$ac_objext conftest.$ac_ext
8357fi
8358rm -f conftest.$ac_objext conftest.$ac_ext
8359# Binary search between lo and hi bounds.
8360while test "x$ac_lo" != "x$ac_hi"; do
8361 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8362 cat >conftest.$ac_ext <<_ACEOF
8363#line $LINENO "configure"
8364#include "confdefs.h"
8365$ac_includes_default
8366#ifdef F77_DUMMY_MAIN
8367# ifdef __cplusplus
8368 extern "C"
8369# endif
8370 int F77_DUMMY_MAIN() { return 1; }
8371#endif
8372int
8373main ()
8374{
8375static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8376test_array [0] = 0
8377
8378 ;
8379 return 0;
8380}
8381_ACEOF
8382rm -f conftest.$ac_objext
8383if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8384 (eval $ac_compile) 2>&5
8385 ac_status=$?
8386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8387 (exit $ac_status); } &&
8388 { ac_try='test -s conftest.$ac_objext'
8389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8390 (eval $ac_try) 2>&5
8391 ac_status=$?
8392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8393 (exit $ac_status); }; }; then
8394 ac_hi=$ac_mid
8395else
8396 echo "$as_me: failed program was:" >&5
8397cat conftest.$ac_ext >&5
8398ac_lo=`expr '(' $ac_mid ')' + 1`
8399fi
8400rm -f conftest.$ac_objext conftest.$ac_ext
8401done
8402case $ac_lo in
8403?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8404'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8405echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8406 { (exit 1); exit 1; }; } ;;
8407esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008408else
8409 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008410 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8411echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8412 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008413else
Martin v. Löwis11437992002-04-12 09:54:03 +00008414 cat >conftest.$ac_ext <<_ACEOF
8415#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008416#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008417$ac_includes_default
8418long longval () { return (long) (sizeof (uintptr_t)); }
8419unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008420#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008421#include <stdlib.h>
8422#ifdef F77_DUMMY_MAIN
8423# ifdef __cplusplus
8424 extern "C"
8425# endif
8426 int F77_DUMMY_MAIN() { return 1; }
8427#endif
8428int
8429main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008430{
Martin v. Löwis11437992002-04-12 09:54:03 +00008431
8432 FILE *f = fopen ("conftest.val", "w");
8433 if (! f)
8434 exit (1);
8435 if (((long) (sizeof (uintptr_t))) < 0)
8436 {
8437 long i = longval ();
8438 if (i != ((long) (sizeof (uintptr_t))))
8439 exit (1);
8440 fprintf (f, "%ld\n", i);
8441 }
8442 else
8443 {
8444 unsigned long i = ulongval ();
8445 if (i != ((long) (sizeof (uintptr_t))))
8446 exit (1);
8447 fprintf (f, "%lu\n", i);
8448 }
8449 exit (ferror (f) || fclose (f) != 0);
8450
8451 ;
8452 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008453}
Martin v. Löwis11437992002-04-12 09:54:03 +00008454_ACEOF
8455rm -f conftest$ac_exeext
8456if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8457 (eval $ac_link) 2>&5
8458 ac_status=$?
8459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8460 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8462 (eval $ac_try) 2>&5
8463 ac_status=$?
8464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8465 (exit $ac_status); }; }; then
8466 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008467else
Martin v. Löwis11437992002-04-12 09:54:03 +00008468 echo "$as_me: program exited with status $ac_status" >&5
8469echo "$as_me: failed program was:" >&5
8470cat conftest.$ac_ext >&5
8471( exit $ac_status )
8472{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8473echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8474 { (exit 1); exit 1; }; }
8475fi
8476rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8477fi
8478fi
8479rm -f conftest.val
8480else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008481 ac_cv_sizeof_uintptr_t=0
8482fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008483fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008484echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8485echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8486cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008487#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008488_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008489
Michael W. Hudson54241132001-12-07 15:38:26 +00008490
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008491fi
8492
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008493# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008494echo "$as_me:$LINENO: checking size of off_t" >&5
8495echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8496if test "${ac_cv_sizeof_off_t+set}" = set; then
8497 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008498else
8499 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008500 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008501else
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 cat >conftest.$ac_ext <<_ACEOF
8503#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008504#include "confdefs.h"
8505#include <stdio.h>
8506#include <sys/types.h>
8507main()
8508{
8509 FILE *f=fopen("conftestval", "w");
8510 if (!f) exit(1);
8511 fprintf(f, "%d\n", sizeof(off_t));
8512 exit(0);
8513}
Martin v. Löwis11437992002-04-12 09:54:03 +00008514_ACEOF
8515rm -f conftest$ac_exeext
8516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8517 (eval $ac_link) 2>&5
8518 ac_status=$?
8519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8522 (eval $ac_try) 2>&5
8523 ac_status=$?
8524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8525 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008526 ac_cv_sizeof_off_t=`cat conftestval`
8527else
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 echo "$as_me: program exited with status $ac_status" >&5
8529echo "$as_me: failed program was:" >&5
8530cat conftest.$ac_ext >&5
8531( exit $ac_status )
8532ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008533fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008534rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008535fi
8536
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008537fi
8538
Martin v. Löwis11437992002-04-12 09:54:03 +00008539echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8540echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8541
8542cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008543#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008544_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008545
Michael W. Hudson54241132001-12-07 15:38:26 +00008546
Martin v. Löwis11437992002-04-12 09:54:03 +00008547echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8548echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008549if test "$have_long_long" = yes -a \
8550 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8551 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008552
Martin v. Löwis11437992002-04-12 09:54:03 +00008553cat >>confdefs.h <<\_ACEOF
8554#define HAVE_LARGEFILE_SUPPORT 1
8555_ACEOF
8556
8557 echo "$as_me:$LINENO: result: yes" >&5
8558echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008559else
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 echo "$as_me:$LINENO: result: no" >&5
8561echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008562fi
8563
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008564# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008565echo "$as_me:$LINENO: checking size of time_t" >&5
8566echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8567if test "${ac_cv_sizeof_time_t+set}" = set; then
8568 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008569else
8570 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008571 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008572else
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 cat >conftest.$ac_ext <<_ACEOF
8574#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008575#include "confdefs.h"
8576#include <stdio.h>
8577#include <time.h>
8578main()
8579{
8580 FILE *f=fopen("conftestval", "w");
8581 if (!f) exit(1);
8582 fprintf(f, "%d\n", sizeof(time_t));
8583 exit(0);
8584}
Martin v. Löwis11437992002-04-12 09:54:03 +00008585_ACEOF
8586rm -f conftest$ac_exeext
8587if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8588 (eval $ac_link) 2>&5
8589 ac_status=$?
8590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8591 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8593 (eval $ac_try) 2>&5
8594 ac_status=$?
8595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8596 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008597 ac_cv_sizeof_time_t=`cat conftestval`
8598else
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 echo "$as_me: program exited with status $ac_status" >&5
8600echo "$as_me: failed program was:" >&5
8601cat conftest.$ac_ext >&5
8602( exit $ac_status )
8603ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008604fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008605rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008606fi
8607
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008608fi
8609
Martin v. Löwis11437992002-04-12 09:54:03 +00008610echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8611echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8612
8613cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008614#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008615_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008616
Michael W. Hudson54241132001-12-07 15:38:26 +00008617
8618
Trent Mick635f6fb2000-08-23 21:33:05 +00008619# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008620ac_save_cc="$CC"
8621if test "$ac_cv_kpthread" = "yes"
8622then CC="$CC -Kpthread"
8623fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008624echo "$as_me:$LINENO: checking for pthread_t" >&5
8625echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008626have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008627cat >conftest.$ac_ext <<_ACEOF
8628#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008629#include "confdefs.h"
8630#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008631#ifdef F77_DUMMY_MAIN
8632# ifdef __cplusplus
8633 extern "C"
8634# endif
8635 int F77_DUMMY_MAIN() { return 1; }
8636#endif
8637int
8638main ()
8639{
Guido van Rossum12580492000-09-24 16:47:19 +00008640pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008641 ;
8642 return 0;
8643}
8644_ACEOF
8645rm -f conftest.$ac_objext
8646if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8647 (eval $ac_compile) 2>&5
8648 ac_status=$?
8649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8650 (exit $ac_status); } &&
8651 { ac_try='test -s conftest.$ac_objext'
8652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8653 (eval $ac_try) 2>&5
8654 ac_status=$?
8655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8656 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008657 have_pthread_t=yes
8658else
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 echo "$as_me: failed program was:" >&5
8660cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008661fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008662rm -f conftest.$ac_objext conftest.$ac_ext
8663echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8664echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008665if test "$have_pthread_t" = yes ; then
8666 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8668echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8669 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8670 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008671else
8672 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008673 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008674else
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 cat >conftest.$ac_ext <<_ACEOF
8676#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008677#include "confdefs.h"
8678#include <stdio.h>
8679 #include <pthread.h>
8680 main()
8681 {
8682 FILE *f=fopen("conftestval", "w");
8683 if (!f) exit(1);
8684 fprintf(f, "%d\n", sizeof(pthread_t));
8685 exit(0);
8686 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008687_ACEOF
8688rm -f conftest$ac_exeext
8689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8690 (eval $ac_link) 2>&5
8691 ac_status=$?
8692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8695 (eval $ac_try) 2>&5
8696 ac_status=$?
8697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8698 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008699 ac_cv_sizeof_pthread_t=`cat conftestval`
8700else
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 echo "$as_me: program exited with status $ac_status" >&5
8702echo "$as_me: failed program was:" >&5
8703cat conftest.$ac_ext >&5
8704( exit $ac_status )
8705ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008706fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008707rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008708fi
8709
Trent Mick635f6fb2000-08-23 21:33:05 +00008710fi
8711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8713echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8714
8715cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008716#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008717_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008718
8719fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008720CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008721
Martin v. Löwis11437992002-04-12 09:54:03 +00008722echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8723echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008724# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8725if test "${enable_toolbox_glue+set}" = set; then
8726 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008727
Martin v. Löwis11437992002-04-12 09:54:03 +00008728fi;
Jack Jansene578a632001-08-15 01:27:14 +00008729
8730if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008731then
Jack Jansene578a632001-08-15 01:27:14 +00008732 case $ac_sys_system/$ac_sys_release in
8733 Darwin/*)
8734 enable_toolbox_glue="yes";;
8735 *)
8736 enable_toolbox_glue="no";;
8737 esac
8738fi
8739case "$enable_toolbox_glue" in
8740yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008741 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008742 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008743 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008744
8745cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008746#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008747_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008748
8749 ;;
8750*)
8751 extra_frameworks=""
8752 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008753 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008754 ;;
8755esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008756echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8757echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008758
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008759
8760case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008761 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00008762 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00008763 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008764 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8765 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008766 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00008767 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00008768 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008769 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8770 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008771esac
8772
Martin v. Löwis11437992002-04-12 09:54:03 +00008773echo "$as_me:$LINENO: checking for --enable-framework" >&5
8774echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008775if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008776then
Jack Jansenca06bc62001-08-03 15:32:23 +00008777 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008779 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00008780 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008781
Martin v. Löwis11437992002-04-12 09:54:03 +00008782cat >>confdefs.h <<\_ACEOF
8783#define WITH_NEXT_FRAMEWORK 1
8784_ACEOF
8785
8786 echo "$as_me:$LINENO: result: yes" >&5
8787echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008788else
Martin v. Löwis11437992002-04-12 09:54:03 +00008789 echo "$as_me:$LINENO: result: no" >&5
8790echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008791fi
8792
Martin v. Löwis11437992002-04-12 09:54:03 +00008793echo "$as_me:$LINENO: checking for dyld" >&5
8794echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008795case $ac_sys_system/$ac_sys_release in
8796 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008797
Martin v. Löwis11437992002-04-12 09:54:03 +00008798cat >>confdefs.h <<\_ACEOF
8799#define WITH_DYLD 1
8800_ACEOF
8801
8802 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8803echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008804 ;;
8805 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008806 echo "$as_me:$LINENO: result: no" >&5
8807echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008808 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008809esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008810
Guido van Rossum0a516c91994-09-12 10:58:40 +00008811# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008812
Michael W. Hudson54241132001-12-07 15:38:26 +00008813
8814
8815
8816
Guido van Rossum0a516c91994-09-12 10:58:40 +00008817# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008818# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008819echo "$as_me:$LINENO: checking SO" >&5
8820echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008821if test -z "$SO"
8822then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008823 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008824 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008825 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008826 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008827 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008828fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008829echo "$as_me:$LINENO: result: $SO" >&5
8830echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008831# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008832# -- "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 +00008833# (Shared libraries in this instance are shared modules to be loaded into
8834# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008835echo "$as_me:$LINENO: checking LDSHARED" >&5
8836echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008837if test -z "$LDSHARED"
8838then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008839 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008840 AIX*)
8841 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008842 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008843 ;;
8844 BeOS*)
8845 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008846 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008847 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008848 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008849 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008850 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00008852 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008853 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008854 else LDSHARED="$(CC) -G";
Greg Ward57c9a662000-05-26 12:22:54 +00008855 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008856 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008857 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8858 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008859 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008860 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8861 if test "$enable_framework" ; then
8862 # Link against the framework. All externals should be defined.
8863 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8864 else
8865 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008866 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008867 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008868 Darwin/*)
8869 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8870 if test "$enable_framework" ; then
8871 # Link against the framework. All externals should be defined.
8872 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8873 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008874 # No framework, use the Python app as bundle-loader
8875 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8876 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008877 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00008878 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008879 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008880 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00008881 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008882 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008883 then
8884 LDSHARED="cc -shared ${LDFLAGS}"
8885 else
8886 LDSHARED="ld -Bshareable ${LDFLAGS}"
8887 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00008888 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008889 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008890 if test "$GCC" = "yes"
8891 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008892 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008893 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008894 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008895 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008896 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008897 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008898 *) LDSHARED="ld";;
8899 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008900fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008901echo "$as_me:$LINENO: result: $LDSHARED" >&5
8902echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008903BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008904# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008905# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008906echo "$as_me:$LINENO: checking CCSHARED" >&5
8907echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008908if test -z "$CCSHARED"
8909then
Guido van Rossum07397971997-04-29 21:49:50 +00008910 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008911 SunOS*) if test "$GCC" = yes;
8912 then CCSHARED="-fPIC";
8913 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008914 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008915 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008916 else CCSHARED="+z";
8917 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008918 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008919 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008920 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008921 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008922 if test "$GCC" = "yes"
8923 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008924 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008925 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008926 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008927 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008928 IRIX*/6*) case $CC in
8929 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008930 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008931 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008932 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008933 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008934fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008935echo "$as_me:$LINENO: result: $CCSHARED" >&5
8936echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008937# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008938# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008939echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8940echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008941if test -z "$LINKFORSHARED"
8942then
Guido van Rossum07397971997-04-29 21:49:50 +00008943 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008944 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008945 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008946 LINKFORSHARED="-Wl,-E -Wl,+s";;
8947# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008948 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008949 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008950 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008952 # -u __dummy makes the linker aware of the objc runtime
8953 # in System.framework; otherwise, __objcInit (referenced in
8954 # crt1.o) gets erroneously defined as common, which breaks dynamic
8955 # loading of any modules which reference it in System.framework.
8956 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8957 # not used by the core itself but which needs to be in the core so
8958 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008959 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008960 if test "$enable_framework"
8961 then
8962 LINKFORSHARED="$LINKFORSHARED -framework Python"
8963 fi
8964 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008965 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008966 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008967 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008969 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8970 then
8971 LINKFORSHARED="-Wl,--export-dynamic"
8972 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008973 SunOS/5*) case $CC in
8974 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008975 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008976 then
8977 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008978 fi;;
8979 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008980 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008981fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008982echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8983echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008984
Michael W. Hudson54241132001-12-07 15:38:26 +00008985
Martin v. Löwis11437992002-04-12 09:54:03 +00008986echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8987echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008988if test ! "$LIBRARY" = "$LDLIBRARY"
8989then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008990 case $ac_sys_system in
8991 CYGWIN*)
8992 # Cygwin needs CCSHARED when building extension DLLs
8993 # but not when building the interpreter DLL.
8994 CFLAGSFORSHARED='';;
8995 *)
8996 CFLAGSFORSHARED='$(CCSHARED)'
8997 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008999echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9000echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009001
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009002# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9003# library (with --enable-shared).
9004# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009005# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9006# if it is not required, since it creates a dependency of the shared library
9007# to LIBS. This, in turn, means that applications linking the shared libpython
9008# don't need to link LIBS explicitly. The default should be only changed
9009# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009010
9011echo "$as_me:$LINENO: checking SHLIBS" >&5
9012echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9013case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009014 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009015 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009016esac
9017echo "$as_me:$LINENO: result: $SHLIBS" >&5
9018echo "${ECHO_T}$SHLIBS" >&6
9019
9020
Guido van Rossum627b2d71993-12-24 10:39:16 +00009021# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009022
9023echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9024echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9025if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9026 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009027else
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009029LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009030cat >conftest.$ac_ext <<_ACEOF
9031#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009032#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009034/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009035#ifdef __cplusplus
9036extern "C"
9037#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009038/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 builtin and then its argument prototype would still apply. */
9040char dlopen ();
9041#ifdef F77_DUMMY_MAIN
9042# ifdef __cplusplus
9043 extern "C"
9044# endif
9045 int F77_DUMMY_MAIN() { return 1; }
9046#endif
9047int
9048main ()
9049{
9050dlopen ();
9051 ;
9052 return 0;
9053}
9054_ACEOF
9055rm -f conftest.$ac_objext conftest$ac_exeext
9056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9057 (eval $ac_link) 2>&5
9058 ac_status=$?
9059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9060 (exit $ac_status); } &&
9061 { ac_try='test -s conftest$ac_exeext'
9062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9063 (eval $ac_try) 2>&5
9064 ac_status=$?
9065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9066 (exit $ac_status); }; }; then
9067 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009068else
Martin v. Löwis11437992002-04-12 09:54:03 +00009069 echo "$as_me: failed program was:" >&5
9070cat conftest.$ac_ext >&5
9071ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009072fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009073rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9074LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009075fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009076echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9077echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9078if test $ac_cv_lib_dl_dlopen = yes; then
9079 cat >>confdefs.h <<_ACEOF
9080#define HAVE_LIBDL 1
9081_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009082
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009083 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009085fi
9086 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009087
9088echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9089echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9090if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9091 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009092else
Martin v. Löwis11437992002-04-12 09:54:03 +00009093 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009094LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009095cat >conftest.$ac_ext <<_ACEOF
9096#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009097#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009098
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009099/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009100#ifdef __cplusplus
9101extern "C"
9102#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009103/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 builtin and then its argument prototype would still apply. */
9105char shl_load ();
9106#ifdef F77_DUMMY_MAIN
9107# ifdef __cplusplus
9108 extern "C"
9109# endif
9110 int F77_DUMMY_MAIN() { return 1; }
9111#endif
9112int
9113main ()
9114{
9115shl_load ();
9116 ;
9117 return 0;
9118}
9119_ACEOF
9120rm -f conftest.$ac_objext conftest$ac_exeext
9121if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9122 (eval $ac_link) 2>&5
9123 ac_status=$?
9124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9125 (exit $ac_status); } &&
9126 { ac_try='test -s conftest$ac_exeext'
9127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9128 (eval $ac_try) 2>&5
9129 ac_status=$?
9130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9131 (exit $ac_status); }; }; then
9132 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009133else
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 echo "$as_me: failed program was:" >&5
9135cat conftest.$ac_ext >&5
9136ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009137fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009138rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9139LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009141echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9142echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9143if test $ac_cv_lib_dld_shl_load = yes; then
9144 cat >>confdefs.h <<_ACEOF
9145#define HAVE_LIBDLD 1
9146_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009147
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009148 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009149
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009150fi
9151 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009152
9153echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9154echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9155if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9156 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009157else
Martin v. Löwis11437992002-04-12 09:54:03 +00009158 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009159LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009160cat >conftest.$ac_ext <<_ACEOF
9161#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009162#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009163
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009164/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009165#ifdef __cplusplus
9166extern "C"
9167#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009168/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 builtin and then its argument prototype would still apply. */
9170char sem_init ();
9171#ifdef F77_DUMMY_MAIN
9172# ifdef __cplusplus
9173 extern "C"
9174# endif
9175 int F77_DUMMY_MAIN() { return 1; }
9176#endif
9177int
9178main ()
9179{
9180sem_init ();
9181 ;
9182 return 0;
9183}
9184_ACEOF
9185rm -f conftest.$ac_objext conftest$ac_exeext
9186if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9187 (eval $ac_link) 2>&5
9188 ac_status=$?
9189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9190 (exit $ac_status); } &&
9191 { ac_try='test -s conftest$ac_exeext'
9192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9193 (eval $ac_try) 2>&5
9194 ac_status=$?
9195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9196 (exit $ac_status); }; }; then
9197 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009198else
Martin v. Löwis11437992002-04-12 09:54:03 +00009199 echo "$as_me: failed program was:" >&5
9200cat conftest.$ac_ext >&5
9201ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009202fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009203rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9204LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009205fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009206echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9207echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9208if test $ac_cv_lib_rt_sem_init = yes; then
9209 cat >>confdefs.h <<_ACEOF
9210#define HAVE_LIBRT 1
9211_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009212
9213 LIBS="-lrt $LIBS"
9214
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009215fi
9216 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009217
9218# checks for system dependent C++ extensions support
9219case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009220 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9221echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9222 cat >conftest.$ac_ext <<_ACEOF
9223#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009224#include "confdefs.h"
9225#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009226#ifdef F77_DUMMY_MAIN
9227# ifdef __cplusplus
9228 extern "C"
9229# endif
9230 int F77_DUMMY_MAIN() { return 1; }
9231#endif
9232int
9233main ()
9234{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009235loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009236 ;
9237 return 0;
9238}
9239_ACEOF
9240rm -f conftest.$ac_objext conftest$ac_exeext
9241if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9242 (eval $ac_link) 2>&5
9243 ac_status=$?
9244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9245 (exit $ac_status); } &&
9246 { ac_try='test -s conftest$ac_exeext'
9247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9248 (eval $ac_try) 2>&5
9249 ac_status=$?
9250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9251 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009252
Martin v. Löwis11437992002-04-12 09:54:03 +00009253cat >>confdefs.h <<\_ACEOF
9254#define AIX_GENUINE_CPLUSPLUS 1
9255_ACEOF
9256
9257 echo "$as_me:$LINENO: result: yes" >&5
9258echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009259else
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 echo "$as_me: failed program was:" >&5
9261cat conftest.$ac_ext >&5
9262echo "$as_me:$LINENO: result: no" >&5
9263echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009264fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009265rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009266 *) ;;
9267esac
9268
Guido van Rossum70c7f481998-03-26 18:44:10 +00009269# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9270# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009271# BeOS' sockets are stashed in libnet.
9272case "$ac_sys_system" in
9273IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009274*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009275echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9276echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9277if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9278 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009279else
Martin v. Löwis11437992002-04-12 09:54:03 +00009280 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009281LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009282cat >conftest.$ac_ext <<_ACEOF
9283#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009284#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009285
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009286/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009287#ifdef __cplusplus
9288extern "C"
9289#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009290/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 builtin and then its argument prototype would still apply. */
9292char t_open ();
9293#ifdef F77_DUMMY_MAIN
9294# ifdef __cplusplus
9295 extern "C"
9296# endif
9297 int F77_DUMMY_MAIN() { return 1; }
9298#endif
9299int
9300main ()
9301{
9302t_open ();
9303 ;
9304 return 0;
9305}
9306_ACEOF
9307rm -f conftest.$ac_objext conftest$ac_exeext
9308if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9309 (eval $ac_link) 2>&5
9310 ac_status=$?
9311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9312 (exit $ac_status); } &&
9313 { ac_try='test -s conftest$ac_exeext'
9314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9315 (eval $ac_try) 2>&5
9316 ac_status=$?
9317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9318 (exit $ac_status); }; }; then
9319 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009320else
Martin v. Löwis11437992002-04-12 09:54:03 +00009321 echo "$as_me: failed program was:" >&5
9322cat conftest.$ac_ext >&5
9323ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009324fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009325rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9326LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009327fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009328echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9329echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9330if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009331 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009332fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009333 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009334echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9335echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9336if test "${ac_cv_lib_socket_socket+set}" = set; then
9337 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009338else
Martin v. Löwis11437992002-04-12 09:54:03 +00009339 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009340LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009341cat >conftest.$ac_ext <<_ACEOF
9342#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009343#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009344
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009345/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009346#ifdef __cplusplus
9347extern "C"
9348#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009349/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 builtin and then its argument prototype would still apply. */
9351char socket ();
9352#ifdef F77_DUMMY_MAIN
9353# ifdef __cplusplus
9354 extern "C"
9355# endif
9356 int F77_DUMMY_MAIN() { return 1; }
9357#endif
9358int
9359main ()
9360{
9361socket ();
9362 ;
9363 return 0;
9364}
9365_ACEOF
9366rm -f conftest.$ac_objext conftest$ac_exeext
9367if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9368 (eval $ac_link) 2>&5
9369 ac_status=$?
9370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9371 (exit $ac_status); } &&
9372 { ac_try='test -s conftest$ac_exeext'
9373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9374 (eval $ac_try) 2>&5
9375 ac_status=$?
9376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9377 (exit $ac_status); }; }; then
9378 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009379else
Martin v. Löwis11437992002-04-12 09:54:03 +00009380 echo "$as_me: failed program was:" >&5
9381cat conftest.$ac_ext >&5
9382ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009383fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009384rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9385LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009386fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009387echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9388echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9389if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009390 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009391fi
9392 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009393;;
9394esac
9395case "$ac_sys_system" in
9396BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009397echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9398echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9399if test "${ac_cv_lib_net_socket+set}" = set; then
9400 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009401else
Martin v. Löwis11437992002-04-12 09:54:03 +00009402 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009403LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009404cat >conftest.$ac_ext <<_ACEOF
9405#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009406#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009407
Guido van Rossumad678af1998-10-02 14:42:15 +00009408/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009409#ifdef __cplusplus
9410extern "C"
9411#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009412/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 builtin and then its argument prototype would still apply. */
9414char socket ();
9415#ifdef F77_DUMMY_MAIN
9416# ifdef __cplusplus
9417 extern "C"
9418# endif
9419 int F77_DUMMY_MAIN() { return 1; }
9420#endif
9421int
9422main ()
9423{
9424socket ();
9425 ;
9426 return 0;
9427}
9428_ACEOF
9429rm -f conftest.$ac_objext conftest$ac_exeext
9430if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9431 (eval $ac_link) 2>&5
9432 ac_status=$?
9433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9434 (exit $ac_status); } &&
9435 { ac_try='test -s conftest$ac_exeext'
9436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9437 (eval $ac_try) 2>&5
9438 ac_status=$?
9439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9440 (exit $ac_status); }; }; then
9441 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009442else
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 echo "$as_me: failed program was:" >&5
9444cat conftest.$ac_ext >&5
9445ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009446fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009447rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9448LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009449fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009450echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9451echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9452if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009453 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009454fi
9455 # BeOS
9456;;
9457esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009458
Martin v. Löwis11437992002-04-12 09:54:03 +00009459echo "$as_me:$LINENO: checking for --with-libs" >&5
9460echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9461
Guido van Rossuma68acba1996-07-31 17:36:39 +00009462# Check whether --with-libs or --without-libs was given.
9463if test "${with_libs+set}" = set; then
9464 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009465
9466echo "$as_me:$LINENO: result: $withval" >&5
9467echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009468LIBS="$withval $LIBS"
9469
9470else
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 echo "$as_me:$LINENO: result: no" >&5
9472echo "${ECHO_T}no" >&6
9473fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009474
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009475# Determine if signalmodule should be used.
9476
9477
Martin v. Löwis11437992002-04-12 09:54:03 +00009478echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9479echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9480
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009481# Check whether --with-signal-module or --without-signal-module was given.
9482if test "${with_signal_module+set}" = set; then
9483 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009484
Martin v. Löwis11437992002-04-12 09:54:03 +00009485fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009486
9487if test -z "$with_signal_module"
9488then with_signal_module="yes"
9489fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009490echo "$as_me:$LINENO: result: $with_signal_module" >&5
9491echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009492
9493if test "${with_signal_module}" = "yes"; then
9494 USE_SIGNAL_MODULE=""
9495 SIGNAL_OBJS=""
9496else
9497 USE_SIGNAL_MODULE="#"
9498 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9499fi
9500
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009501# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009502
Barry Warsawc0d24d82000-06-29 16:12:00 +00009503USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009504
Martin v. Löwis11437992002-04-12 09:54:03 +00009505echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9506echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9507
Guido van Rossumec2f0731997-01-22 20:54:01 +00009508
9509# Check whether --with-dec-threads or --without-dec-threads was given.
9510if test "${with_dec_threads+set}" = set; then
9511 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009512
9513echo "$as_me:$LINENO: result: $withval" >&5
9514echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009515LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009516if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009517 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009518fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009519else
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 echo "$as_me:$LINENO: result: no" >&5
9521echo "${ECHO_T}no" >&6
9522fi;
9523
9524# Templates for things AC_DEFINEd more than once.
9525# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009526
9527
Martin v. Löwis11437992002-04-12 09:54:03 +00009528
9529
9530
9531
9532
9533echo "$as_me:$LINENO: checking for --with-threads" >&5
9534echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9535
Guido van Rossumec2f0731997-01-22 20:54:01 +00009536# Check whether --with-threads or --without-threads was given.
9537if test "${with_threads+set}" = set; then
9538 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009539
Martin v. Löwis11437992002-04-12 09:54:03 +00009540fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009541
Barry Warsawc0d24d82000-06-29 16:12:00 +00009542# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009543
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009544# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009545if test "${with_thread+set}" = set; then
9546 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009547
Martin v. Löwis11437992002-04-12 09:54:03 +00009548with_threads=$with_thread
9549fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009550
9551if test -z "$with_threads"
9552then with_threads="yes"
9553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009554echo "$as_me:$LINENO: result: $with_threads" >&5
9555echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009556
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009557
Barry Warsawc0d24d82000-06-29 16:12:00 +00009558if test "$with_threads" = "no"
9559then
9560 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009561elif test "$ac_cv_pthread_is_default" = yes
9562then
Martin v. Löwis11437992002-04-12 09:54:03 +00009563 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009564#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009565_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009566
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009567 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009569#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009570_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009571
9572 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009574elif test "$ac_cv_kpthread" = "yes"
9575then
9576 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009577 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009578#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009579_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009580
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009581 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009582 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009583else
9584 if test ! -z "$with_threads" -a -d "$with_threads"
9585 then LDFLAGS="$LDFLAGS -L$with_threads"
9586 fi
9587 if test ! -z "$withval" -a -d "$withval"
9588 then LDFLAGS="$LDFLAGS -L$withval"
9589 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009590
9591 # According to the POSIX spec, a pthreads implementation must
9592 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009593 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9594echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9595 cat >conftest.$ac_ext <<_ACEOF
9596#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009597#include "confdefs.h"
9598#include <unistd.h>
9599 #ifdef _POSIX_THREADS
9600 yes
9601 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009602
9603_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9605 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009606 unistd_defines_pthreads=yes
9607else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009608 unistd_defines_pthreads=no
9609fi
9610rm -f conftest*
9611
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9613echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009614
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009616#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009617_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009618
Martin v. Löwis11437992002-04-12 09:54:03 +00009619 if test "${ac_cv_header_cthreads_h+set}" = set; then
9620 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9621echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9622if test "${ac_cv_header_cthreads_h+set}" = set; then
9623 echo $ECHO_N "(cached) $ECHO_C" >&6
9624fi
9625echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9626echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009627else
Martin v. Löwis11437992002-04-12 09:54:03 +00009628 # Is the header compilable?
9629echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9630echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9631cat >conftest.$ac_ext <<_ACEOF
9632#line $LINENO "configure"
9633#include "confdefs.h"
9634$ac_includes_default
9635#include <cthreads.h>
9636_ACEOF
9637rm -f conftest.$ac_objext
9638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9639 (eval $ac_compile) 2>&5
9640 ac_status=$?
9641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9642 (exit $ac_status); } &&
9643 { ac_try='test -s conftest.$ac_objext'
9644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9645 (eval $ac_try) 2>&5
9646 ac_status=$?
9647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9648 (exit $ac_status); }; }; then
9649 ac_header_compiler=yes
9650else
9651 echo "$as_me: failed program was:" >&5
9652cat conftest.$ac_ext >&5
9653ac_header_compiler=no
9654fi
9655rm -f conftest.$ac_objext conftest.$ac_ext
9656echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9657echo "${ECHO_T}$ac_header_compiler" >&6
9658
9659# Is the header present?
9660echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9661echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9662cat >conftest.$ac_ext <<_ACEOF
9663#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009664#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009665#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009666_ACEOF
9667if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9668 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9669 ac_status=$?
9670 egrep -v '^ *\+' conftest.er1 >conftest.err
9671 rm -f conftest.er1
9672 cat conftest.err >&5
9673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9674 (exit $ac_status); } >/dev/null; then
9675 if test -s conftest.err; then
9676 ac_cpp_err=$ac_c_preproc_warn_flag
9677 else
9678 ac_cpp_err=
9679 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009680else
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 ac_cpp_err=yes
9682fi
9683if test -z "$ac_cpp_err"; then
9684 ac_header_preproc=yes
9685else
9686 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009687 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009689fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009690rm -f conftest.err conftest.$ac_ext
9691echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9692echo "${ECHO_T}$ac_header_preproc" >&6
9693
9694# So? What about this header?
9695case $ac_header_compiler:$ac_header_preproc in
9696 yes:no )
9697 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9698echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9699 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9700echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9701 no:yes )
9702 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9703echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9704 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9705echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9706 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9707echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9708esac
9709echo "$as_me:$LINENO: checking for cthreads.h" >&5
9710echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9711if test "${ac_cv_header_cthreads_h+set}" = set; then
9712 echo $ECHO_N "(cached) $ECHO_C" >&6
9713else
9714 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009715fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009716echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9717echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9718
9719fi
9720if test $ac_cv_header_cthreads_h = yes; then
9721 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009722#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009723_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009724
Martin v. Löwis11437992002-04-12 09:54:03 +00009725 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009726#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009727_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009728
Martin v. Löwis11437992002-04-12 09:54:03 +00009729
9730cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009731#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009732_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009733
9734 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009735 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009736else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009737
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9739 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9740echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9741if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9742 echo $ECHO_N "(cached) $ECHO_C" >&6
9743fi
9744echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9745echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009746else
Martin v. Löwis11437992002-04-12 09:54:03 +00009747 # Is the header compilable?
9748echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9749echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9750cat >conftest.$ac_ext <<_ACEOF
9751#line $LINENO "configure"
9752#include "confdefs.h"
9753$ac_includes_default
9754#include <mach/cthreads.h>
9755_ACEOF
9756rm -f conftest.$ac_objext
9757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9758 (eval $ac_compile) 2>&5
9759 ac_status=$?
9760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9761 (exit $ac_status); } &&
9762 { ac_try='test -s conftest.$ac_objext'
9763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9764 (eval $ac_try) 2>&5
9765 ac_status=$?
9766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9767 (exit $ac_status); }; }; then
9768 ac_header_compiler=yes
9769else
9770 echo "$as_me: failed program was:" >&5
9771cat conftest.$ac_ext >&5
9772ac_header_compiler=no
9773fi
9774rm -f conftest.$ac_objext conftest.$ac_ext
9775echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9776echo "${ECHO_T}$ac_header_compiler" >&6
9777
9778# Is the header present?
9779echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9780echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9781cat >conftest.$ac_ext <<_ACEOF
9782#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009783#include "confdefs.h"
9784#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009785_ACEOF
9786if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9787 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9788 ac_status=$?
9789 egrep -v '^ *\+' conftest.er1 >conftest.err
9790 rm -f conftest.er1
9791 cat conftest.err >&5
9792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9793 (exit $ac_status); } >/dev/null; then
9794 if test -s conftest.err; then
9795 ac_cpp_err=$ac_c_preproc_warn_flag
9796 else
9797 ac_cpp_err=
9798 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009799else
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 ac_cpp_err=yes
9801fi
9802if test -z "$ac_cpp_err"; then
9803 ac_header_preproc=yes
9804else
9805 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009806 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009807 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009808fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009809rm -f conftest.err conftest.$ac_ext
9810echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9811echo "${ECHO_T}$ac_header_preproc" >&6
9812
9813# So? What about this header?
9814case $ac_header_compiler:$ac_header_preproc in
9815 yes:no )
9816 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9817echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9818 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9819echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9820 no:yes )
9821 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9822echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9823 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9824echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9825 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9826echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9827esac
9828echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9829echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9830if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9831 echo $ECHO_N "(cached) $ECHO_C" >&6
9832else
9833 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009834fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009835echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9836echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9837
9838fi
9839if test $ac_cv_header_mach_cthreads_h = yes; then
9840 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009841#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009842_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009843
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009845#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009846_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009847
Martin v. Löwis11437992002-04-12 09:54:03 +00009848
9849cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009850#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009851_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009852
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009853 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009854else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009855
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 echo "$as_me:$LINENO: checking for --with-pth" >&5
9857echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9858
9859# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009860if test "${with_pth+set}" = set; then
9861 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009862
Martin v. Löwis11437992002-04-12 09:54:03 +00009863 echo "$as_me:$LINENO: result: $withval" >&5
9864echo "${ECHO_T}$withval" >&6
9865 cat >>confdefs.h <<\_ACEOF
9866#define WITH_THREAD 1
9867_ACEOF
9868
9869
9870cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009871#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009872_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009873
Martin v. Löwis130fb172001-07-19 11:00:41 +00009874 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009875 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009876else
Martin v. Löwis11437992002-04-12 09:54:03 +00009877
9878 echo "$as_me:$LINENO: result: no" >&5
9879echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009880
9881 # Just looking for pthread_create in libpthread is not enough:
9882 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9883 # So we really have to include pthread.h, and then link.
9884 _libs=$LIBS
9885 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009886 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9887echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9888 cat >conftest.$ac_ext <<_ACEOF
9889#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009890#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009891#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009892
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009893void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009894#ifdef F77_DUMMY_MAIN
9895# ifdef __cplusplus
9896 extern "C"
9897# endif
9898 int F77_DUMMY_MAIN() { return 1; }
9899#endif
9900int
9901main ()
9902{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009903
9904pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009905 ;
9906 return 0;
9907}
9908_ACEOF
9909rm -f conftest.$ac_objext conftest$ac_exeext
9910if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9911 (eval $ac_link) 2>&5
9912 ac_status=$?
9913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9914 (exit $ac_status); } &&
9915 { ac_try='test -s conftest$ac_exeext'
9916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9917 (eval $ac_try) 2>&5
9918 ac_status=$?
9919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9920 (exit $ac_status); }; }; then
9921
9922 echo "$as_me:$LINENO: result: yes" >&5
9923echo "${ECHO_T}yes" >&6
9924 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009925#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009926_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009927
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009928 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009929 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009930else
Martin v. Löwis11437992002-04-12 09:54:03 +00009931 echo "$as_me: failed program was:" >&5
9932cat conftest.$ac_ext >&5
9933
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009934 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009935 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9936echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9937if test "${ac_cv_func_pthread_detach+set}" = set; then
9938 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009939else
Martin v. Löwis11437992002-04-12 09:54:03 +00009940 cat >conftest.$ac_ext <<_ACEOF
9941#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009942#include "confdefs.h"
9943/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009945#include <assert.h>
9946/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009947#ifdef __cplusplus
9948extern "C"
9949#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009950/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009951 builtin and then its argument prototype would still apply. */
9952char pthread_detach ();
9953char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009954
Martin v. Löwis11437992002-04-12 09:54:03 +00009955#ifdef F77_DUMMY_MAIN
9956# ifdef __cplusplus
9957 extern "C"
9958# endif
9959 int F77_DUMMY_MAIN() { return 1; }
9960#endif
9961int
9962main ()
9963{
Guido van Rossumad678af1998-10-02 14:42:15 +00009964/* The GNU C library defines this for functions which it implements
9965 to always fail with ENOSYS. Some functions are actually named
9966 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009967#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009968choke me
9969#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009970f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009971#endif
9972
Martin v. Löwis11437992002-04-12 09:54:03 +00009973 ;
9974 return 0;
9975}
9976_ACEOF
9977rm -f conftest.$ac_objext conftest$ac_exeext
9978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9979 (eval $ac_link) 2>&5
9980 ac_status=$?
9981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9982 (exit $ac_status); } &&
9983 { ac_try='test -s conftest$ac_exeext'
9984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9985 (eval $ac_try) 2>&5
9986 ac_status=$?
9987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9988 (exit $ac_status); }; }; then
9989 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009990else
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 echo "$as_me: failed program was:" >&5
9992cat conftest.$ac_ext >&5
9993ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009994fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009995rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009996fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009997echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9998echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9999if test $ac_cv_func_pthread_detach = yes; then
10000 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010001#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010002_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010003
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010004 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010005 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010006else
Guido van Rossumad678af1998-10-02 14:42:15 +000010007
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010008 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10009 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10010echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10011if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10012 echo $ECHO_N "(cached) $ECHO_C" >&6
10013fi
10014echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10015echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10016else
10017 # Is the header compilable?
10018echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10019echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10020cat >conftest.$ac_ext <<_ACEOF
10021#line $LINENO "configure"
10022#include "confdefs.h"
10023$ac_includes_default
10024#include <atheos/threads.h>
10025_ACEOF
10026rm -f conftest.$ac_objext
10027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10028 (eval $ac_compile) 2>&5
10029 ac_status=$?
10030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10031 (exit $ac_status); } &&
10032 { ac_try='test -s conftest.$ac_objext'
10033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10034 (eval $ac_try) 2>&5
10035 ac_status=$?
10036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10037 (exit $ac_status); }; }; then
10038 ac_header_compiler=yes
10039else
10040 echo "$as_me: failed program was:" >&5
10041cat conftest.$ac_ext >&5
10042ac_header_compiler=no
10043fi
10044rm -f conftest.$ac_objext conftest.$ac_ext
10045echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10046echo "${ECHO_T}$ac_header_compiler" >&6
10047
10048# Is the header present?
10049echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10050echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10051cat >conftest.$ac_ext <<_ACEOF
10052#line $LINENO "configure"
10053#include "confdefs.h"
10054#include <atheos/threads.h>
10055_ACEOF
10056if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10057 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10058 ac_status=$?
10059 egrep -v '^ *\+' conftest.er1 >conftest.err
10060 rm -f conftest.er1
10061 cat conftest.err >&5
10062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10063 (exit $ac_status); } >/dev/null; then
10064 if test -s conftest.err; then
10065 ac_cpp_err=$ac_c_preproc_warn_flag
10066 else
10067 ac_cpp_err=
10068 fi
10069else
10070 ac_cpp_err=yes
10071fi
10072if test -z "$ac_cpp_err"; then
10073 ac_header_preproc=yes
10074else
10075 echo "$as_me: failed program was:" >&5
10076 cat conftest.$ac_ext >&5
10077 ac_header_preproc=no
10078fi
10079rm -f conftest.err conftest.$ac_ext
10080echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10081echo "${ECHO_T}$ac_header_preproc" >&6
10082
10083# So? What about this header?
10084case $ac_header_compiler:$ac_header_preproc in
10085 yes:no )
10086 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10087echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10088 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10089echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10090 no:yes )
10091 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10092echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10093 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10094echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10095 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10096echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10097esac
10098echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10099echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10100if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10101 echo $ECHO_N "(cached) $ECHO_C" >&6
10102else
10103 ac_cv_header_atheos_threads_h=$ac_header_preproc
10104fi
10105echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10106echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10107
10108fi
10109if test $ac_cv_header_atheos_threads_h = yes; then
10110 cat >>confdefs.h <<\_ACEOF
10111#define WITH_THREAD 1
10112_ACEOF
10113
10114
10115cat >>confdefs.h <<\_ACEOF
10116#define ATHEOS_THREADS 1
10117_ACEOF
10118
10119 THREADOBJ="Python/thread.o"
10120else
10121
Martin v. Löwis11437992002-04-12 09:54:03 +000010122 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10123 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10124echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10125if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10126 echo $ECHO_N "(cached) $ECHO_C" >&6
10127fi
10128echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10129echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010130else
Martin v. Löwis11437992002-04-12 09:54:03 +000010131 # Is the header compilable?
10132echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10133echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10134cat >conftest.$ac_ext <<_ACEOF
10135#line $LINENO "configure"
10136#include "confdefs.h"
10137$ac_includes_default
10138#include <kernel/OS.h>
10139_ACEOF
10140rm -f conftest.$ac_objext
10141if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10142 (eval $ac_compile) 2>&5
10143 ac_status=$?
10144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10145 (exit $ac_status); } &&
10146 { ac_try='test -s conftest.$ac_objext'
10147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10148 (eval $ac_try) 2>&5
10149 ac_status=$?
10150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10151 (exit $ac_status); }; }; then
10152 ac_header_compiler=yes
10153else
10154 echo "$as_me: failed program was:" >&5
10155cat conftest.$ac_ext >&5
10156ac_header_compiler=no
10157fi
10158rm -f conftest.$ac_objext conftest.$ac_ext
10159echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10160echo "${ECHO_T}$ac_header_compiler" >&6
10161
10162# Is the header present?
10163echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10164echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10165cat >conftest.$ac_ext <<_ACEOF
10166#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010167#include "confdefs.h"
10168#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010169_ACEOF
10170if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10171 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10172 ac_status=$?
10173 egrep -v '^ *\+' conftest.er1 >conftest.err
10174 rm -f conftest.er1
10175 cat conftest.err >&5
10176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10177 (exit $ac_status); } >/dev/null; then
10178 if test -s conftest.err; then
10179 ac_cpp_err=$ac_c_preproc_warn_flag
10180 else
10181 ac_cpp_err=
10182 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010183else
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 ac_cpp_err=yes
10185fi
10186if test -z "$ac_cpp_err"; then
10187 ac_header_preproc=yes
10188else
10189 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010190 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010193rm -f conftest.err conftest.$ac_ext
10194echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10195echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010196
Martin v. Löwis11437992002-04-12 09:54:03 +000010197# So? What about this header?
10198case $ac_header_compiler:$ac_header_preproc in
10199 yes:no )
10200 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10201echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10202 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10203echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10204 no:yes )
10205 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10206echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10207 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10208echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10209 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10210echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10211esac
10212echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10213echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10214if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10215 echo $ECHO_N "(cached) $ECHO_C" >&6
10216else
10217 ac_cv_header_kernel_OS_h=$ac_header_preproc
10218fi
10219echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10220echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10221
10222fi
10223if test $ac_cv_header_kernel_OS_h = yes; then
10224 cat >>confdefs.h <<\_ACEOF
10225#define WITH_THREAD 1
10226_ACEOF
10227
10228
10229cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010230#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010231_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010232
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010233 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010234else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010235
Martin v. Löwis11437992002-04-12 09:54:03 +000010236 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10237echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10238if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10239 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010240else
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010242LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010243cat >conftest.$ac_ext <<_ACEOF
10244#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010245#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010246
Greg Steinadf63d62000-07-05 10:38:09 +000010247/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010248#ifdef __cplusplus
10249extern "C"
10250#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010251/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 builtin and then its argument prototype would still apply. */
10253char pthread_create ();
10254#ifdef F77_DUMMY_MAIN
10255# ifdef __cplusplus
10256 extern "C"
10257# endif
10258 int F77_DUMMY_MAIN() { return 1; }
10259#endif
10260int
10261main ()
10262{
10263pthread_create ();
10264 ;
10265 return 0;
10266}
10267_ACEOF
10268rm -f conftest.$ac_objext conftest$ac_exeext
10269if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10270 (eval $ac_link) 2>&5
10271 ac_status=$?
10272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10273 (exit $ac_status); } &&
10274 { ac_try='test -s conftest$ac_exeext'
10275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10276 (eval $ac_try) 2>&5
10277 ac_status=$?
10278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10279 (exit $ac_status); }; }; then
10280 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010281else
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 echo "$as_me: failed program was:" >&5
10283cat conftest.$ac_ext >&5
10284ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010285fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010286rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10287LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010288fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010289echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10290echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10291if test $ac_cv_lib_pthreads_pthread_create = yes; then
10292 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010293#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010294_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010295
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010296 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010297 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010298 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010299else
Greg Steinadf63d62000-07-05 10:38:09 +000010300
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10302echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10303if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10304 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010305else
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010307LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010308cat >conftest.$ac_ext <<_ACEOF
10309#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010310#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010311
Guido van Rossum49545951997-12-02 19:28:29 +000010312/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010313#ifdef __cplusplus
10314extern "C"
10315#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010316/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 builtin and then its argument prototype would still apply. */
10318char pthread_create ();
10319#ifdef F77_DUMMY_MAIN
10320# ifdef __cplusplus
10321 extern "C"
10322# endif
10323 int F77_DUMMY_MAIN() { return 1; }
10324#endif
10325int
10326main ()
10327{
10328pthread_create ();
10329 ;
10330 return 0;
10331}
10332_ACEOF
10333rm -f conftest.$ac_objext conftest$ac_exeext
10334if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10335 (eval $ac_link) 2>&5
10336 ac_status=$?
10337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10338 (exit $ac_status); } &&
10339 { ac_try='test -s conftest$ac_exeext'
10340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10341 (eval $ac_try) 2>&5
10342 ac_status=$?
10343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10344 (exit $ac_status); }; }; then
10345 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010346else
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 echo "$as_me: failed program was:" >&5
10348cat conftest.$ac_ext >&5
10349ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010350fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010351rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10352LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010354echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10355echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10356if test $ac_cv_lib_c_r_pthread_create = yes; then
10357 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010358#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010359_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010360
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010361 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010362 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010363 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010364else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010365
Martin v. Löwis11437992002-04-12 09:54:03 +000010366 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10367echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10368if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10369 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010370else
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010372LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010373cat >conftest.$ac_ext <<_ACEOF
10374#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010375#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010376
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010377/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010378#ifdef __cplusplus
10379extern "C"
10380#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010381/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 builtin and then its argument prototype would still apply. */
10383char __d6_pthread_create ();
10384#ifdef F77_DUMMY_MAIN
10385# ifdef __cplusplus
10386 extern "C"
10387# endif
10388 int F77_DUMMY_MAIN() { return 1; }
10389#endif
10390int
10391main ()
10392{
10393__d6_pthread_create ();
10394 ;
10395 return 0;
10396}
10397_ACEOF
10398rm -f conftest.$ac_objext conftest$ac_exeext
10399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10400 (eval $ac_link) 2>&5
10401 ac_status=$?
10402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10403 (exit $ac_status); } &&
10404 { ac_try='test -s conftest$ac_exeext'
10405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10406 (eval $ac_try) 2>&5
10407 ac_status=$?
10408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10409 (exit $ac_status); }; }; then
10410 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010411else
Martin v. Löwis11437992002-04-12 09:54:03 +000010412 echo "$as_me: failed program was:" >&5
10413cat conftest.$ac_ext >&5
10414ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010415fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010416rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10417LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010418fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010419echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10420echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10421if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10422 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010423#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010424_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010425
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010426 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010427 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010428 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010429else
Guido van Rossum49545951997-12-02 19:28:29 +000010430
Martin v. Löwis11437992002-04-12 09:54:03 +000010431 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10432echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10433if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10434 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010435else
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010437LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010438cat >conftest.$ac_ext <<_ACEOF
10439#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010440#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010441
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010442/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010443#ifdef __cplusplus
10444extern "C"
10445#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010446/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 builtin and then its argument prototype would still apply. */
10448char __pthread_create_system ();
10449#ifdef F77_DUMMY_MAIN
10450# ifdef __cplusplus
10451 extern "C"
10452# endif
10453 int F77_DUMMY_MAIN() { return 1; }
10454#endif
10455int
10456main ()
10457{
10458__pthread_create_system ();
10459 ;
10460 return 0;
10461}
10462_ACEOF
10463rm -f conftest.$ac_objext conftest$ac_exeext
10464if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10465 (eval $ac_link) 2>&5
10466 ac_status=$?
10467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10468 (exit $ac_status); } &&
10469 { ac_try='test -s conftest$ac_exeext'
10470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10471 (eval $ac_try) 2>&5
10472 ac_status=$?
10473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10474 (exit $ac_status); }; }; then
10475 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010476else
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 echo "$as_me: failed program was:" >&5
10478cat conftest.$ac_ext >&5
10479ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010480fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010481rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10482LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010483fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010484echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10485echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10486if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10487 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010488#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010489_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010490
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010491 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010492 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010493 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010494else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010495
Martin v. Löwis11437992002-04-12 09:54:03 +000010496 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10497echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10498if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10499 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010500else
Martin v. Löwis11437992002-04-12 09:54:03 +000010501 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010502LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010503cat >conftest.$ac_ext <<_ACEOF
10504#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010505#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010506
Guido van Rossumb93a8621998-05-07 13:27:32 +000010507/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010508#ifdef __cplusplus
10509extern "C"
10510#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010511/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010512 builtin and then its argument prototype would still apply. */
10513char pthread_create ();
10514#ifdef F77_DUMMY_MAIN
10515# ifdef __cplusplus
10516 extern "C"
10517# endif
10518 int F77_DUMMY_MAIN() { return 1; }
10519#endif
10520int
10521main ()
10522{
10523pthread_create ();
10524 ;
10525 return 0;
10526}
10527_ACEOF
10528rm -f conftest.$ac_objext conftest$ac_exeext
10529if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10530 (eval $ac_link) 2>&5
10531 ac_status=$?
10532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10533 (exit $ac_status); } &&
10534 { ac_try='test -s 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
10540 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010541else
Martin v. Löwis11437992002-04-12 09:54:03 +000010542 echo "$as_me: failed program was:" >&5
10543cat conftest.$ac_ext >&5
10544ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010545fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010546rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10547LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010548fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010549echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10550echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10551if test $ac_cv_lib_cma_pthread_create = yes; then
10552 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010553#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010554_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010555
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010556 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010557 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010558 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010559else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010560
Martin v. Löwis130fb172001-07-19 11:00:41 +000010561 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010562fi
10563
Guido van Rossum627b2d71993-12-24 10:39:16 +000010564
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010565fi
10566
Guido van Rossum0be3e491997-05-22 20:33:33 +000010567fi
10568
Guido van Rossum49545951997-12-02 19:28:29 +000010569fi
10570
Guido van Rossumb93a8621998-05-07 13:27:32 +000010571fi
10572
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010573fi
10574
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010575
Michael W. Hudson54241132001-12-07 15:38:26 +000010576fi
10577
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010578
10579fi
10580
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010581fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010582rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10583fi;
10584fi
10585
10586
10587fi
10588
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010589
Michael W. Hudson54241132001-12-07 15:38:26 +000010590
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010591 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010592 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010593
10594cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010595#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010596_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010597
10598 fi
10599
Martin v. Löwis11437992002-04-12 09:54:03 +000010600 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10601echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10602 if test "${ac_cv_pthread_system_supported+set}" = set; then
10603 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010604else
10605 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010606 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010607else
Martin v. Löwis11437992002-04-12 09:54:03 +000010608 cat >conftest.$ac_ext <<_ACEOF
10609#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010610#include "confdefs.h"
10611#include <pthread.h>
10612 void *foo(void *parm) {
10613 return NULL;
10614 }
10615 main() {
10616 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010617 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010618 if (pthread_attr_init(&attr)) exit(-1);
10619 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010620 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010621 exit(0);
10622 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010623_ACEOF
10624rm -f conftest$ac_exeext
10625if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10626 (eval $ac_link) 2>&5
10627 ac_status=$?
10628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10629 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10631 (eval $ac_try) 2>&5
10632 ac_status=$?
10633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10634 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010635 ac_cv_pthread_system_supported=yes
10636else
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 echo "$as_me: program exited with status $ac_status" >&5
10638echo "$as_me: failed program was:" >&5
10639cat conftest.$ac_ext >&5
10640( exit $ac_status )
10641ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010642fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010643rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010644fi
10645
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010646fi
10647
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10649echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010650 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010651
10652cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010653#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010654_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010655
10656 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010657
10658for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010659do
Martin v. Löwis11437992002-04-12 09:54:03 +000010660as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10661echo "$as_me:$LINENO: checking for $ac_func" >&5
10662echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10663if eval "test \"\${$as_ac_var+set}\" = set"; then
10664 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010665else
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 cat >conftest.$ac_ext <<_ACEOF
10667#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010668#include "confdefs.h"
10669/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010670 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010671#include <assert.h>
10672/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010673#ifdef __cplusplus
10674extern "C"
10675#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010676/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010677 builtin and then its argument prototype would still apply. */
10678char $ac_func ();
10679char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010680
Martin v. Löwis11437992002-04-12 09:54:03 +000010681#ifdef F77_DUMMY_MAIN
10682# ifdef __cplusplus
10683 extern "C"
10684# endif
10685 int F77_DUMMY_MAIN() { return 1; }
10686#endif
10687int
10688main ()
10689{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010690/* The GNU C library defines this for functions which it implements
10691 to always fail with ENOSYS. Some functions are actually named
10692 something starting with __ and the normal name is an alias. */
10693#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10694choke me
10695#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010696f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010697#endif
10698
Martin v. Löwis11437992002-04-12 09:54:03 +000010699 ;
10700 return 0;
10701}
10702_ACEOF
10703rm -f conftest.$ac_objext conftest$ac_exeext
10704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10705 (eval $ac_link) 2>&5
10706 ac_status=$?
10707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10708 (exit $ac_status); } &&
10709 { ac_try='test -s conftest$ac_exeext'
10710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10711 (eval $ac_try) 2>&5
10712 ac_status=$?
10713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10714 (exit $ac_status); }; }; then
10715 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010716else
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 echo "$as_me: failed program was:" >&5
10718cat conftest.$ac_ext >&5
10719eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010720fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010721rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010722fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010723echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10724echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10725if test `eval echo '${'$as_ac_var'}'` = yes; then
10726 cat >>confdefs.h <<_ACEOF
10727#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10728_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010729
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010730fi
10731done
10732
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010733 fi
10734
Martin v. Löwis11437992002-04-12 09:54:03 +000010735 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10736echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10737if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010739else
Martin v. Löwis11437992002-04-12 09:54:03 +000010740 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010741LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010742cat >conftest.$ac_ext <<_ACEOF
10743#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010744#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010745
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010746/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010747#ifdef __cplusplus
10748extern "C"
10749#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010750/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010751 builtin and then its argument prototype would still apply. */
10752char usconfig ();
10753#ifdef F77_DUMMY_MAIN
10754# ifdef __cplusplus
10755 extern "C"
10756# endif
10757 int F77_DUMMY_MAIN() { return 1; }
10758#endif
10759int
10760main ()
10761{
10762usconfig ();
10763 ;
10764 return 0;
10765}
10766_ACEOF
10767rm -f conftest.$ac_objext conftest$ac_exeext
10768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10769 (eval $ac_link) 2>&5
10770 ac_status=$?
10771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10772 (exit $ac_status); } &&
10773 { ac_try='test -s conftest$ac_exeext'
10774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10775 (eval $ac_try) 2>&5
10776 ac_status=$?
10777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10778 (exit $ac_status); }; }; then
10779 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010780else
Martin v. Löwis11437992002-04-12 09:54:03 +000010781 echo "$as_me: failed program was:" >&5
10782cat conftest.$ac_ext >&5
10783ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010784fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010785rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10786LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010787fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010788echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10789echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10790if test $ac_cv_lib_mpc_usconfig = yes; then
10791 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010792#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010793_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010794
Martin v. Löwis130fb172001-07-19 11:00:41 +000010795 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010796 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010797 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010798fi
10799
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010800
Martin v. Löwis11437992002-04-12 09:54:03 +000010801 if test $posix_threads != "yes"; then
10802 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10803echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10804if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10805 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010806else
Martin v. Löwis11437992002-04-12 09:54:03 +000010807 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010808LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010809cat >conftest.$ac_ext <<_ACEOF
10810#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010811#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010812
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010813/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010814#ifdef __cplusplus
10815extern "C"
10816#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010817/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 builtin and then its argument prototype would still apply. */
10819char thr_create ();
10820#ifdef F77_DUMMY_MAIN
10821# ifdef __cplusplus
10822 extern "C"
10823# endif
10824 int F77_DUMMY_MAIN() { return 1; }
10825#endif
10826int
10827main ()
10828{
10829thr_create ();
10830 ;
10831 return 0;
10832}
10833_ACEOF
10834rm -f conftest.$ac_objext conftest$ac_exeext
10835if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10836 (eval $ac_link) 2>&5
10837 ac_status=$?
10838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10839 (exit $ac_status); } &&
10840 { ac_try='test -s conftest$ac_exeext'
10841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10842 (eval $ac_try) 2>&5
10843 ac_status=$?
10844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10845 (exit $ac_status); }; }; then
10846 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010847else
Martin v. Löwis11437992002-04-12 09:54:03 +000010848 echo "$as_me: failed program was:" >&5
10849cat conftest.$ac_ext >&5
10850ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010851fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010852rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10853LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010854fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010855echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10856echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10857if test $ac_cv_lib_thread_thr_create = yes; then
10858 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010859#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010860_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010861
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010862 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010863 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010864 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010865fi
10866
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010867 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010868
Martin v. Löwis130fb172001-07-19 11:00:41 +000010869 if test "$USE_THREAD_MODULE" != "#"
10870 then
10871 # If the above checks didn't disable threads, (at least) OSF1
10872 # needs this '-threads' argument during linking.
10873 case $ac_sys_system in
10874 OSF1) LDLAST=-threads;;
10875 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010876 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010877fi
10878
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010880
10881
10882echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10883echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884# Check whether --enable-ipv6 or --disable-ipv6 was given.
10885if test "${enable_ipv6+set}" = set; then
10886 enableval="$enable_ipv6"
10887 case "$enableval" in
10888 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010889 echo "$as_me:$LINENO: result: no" >&5
10890echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891 ipv6=no
10892 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010893 *) echo "$as_me:$LINENO: result: yes" >&5
10894echo "${ECHO_T}yes" >&6
10895 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010896#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010897_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898
10899 ipv6=yes
10900 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010901 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010902else
Martin v. Löwis11437992002-04-12 09:54:03 +000010903
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010904 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 echo "$as_me:$LINENO: result: no" >&5
10906echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010907 ipv6=no
10908
10909else
Martin v. Löwis11437992002-04-12 09:54:03 +000010910 cat >conftest.$ac_ext <<_ACEOF
10911#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912#include "confdefs.h"
10913 /* AF_INET6 available check */
10914#include <sys/types.h>
10915#include <sys/socket.h>
10916main()
10917{
10918 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10919 exit(1);
10920 else
10921 exit(0);
10922}
10923
Martin v. Löwis11437992002-04-12 09:54:03 +000010924_ACEOF
10925rm -f conftest$ac_exeext
10926if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10927 (eval $ac_link) 2>&5
10928 ac_status=$?
10929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10930 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10932 (eval $ac_try) 2>&5
10933 ac_status=$?
10934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10935 (exit $ac_status); }; }; then
10936 echo "$as_me:$LINENO: result: yes" >&5
10937echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010938 ipv6=yes
10939else
Martin v. Löwis11437992002-04-12 09:54:03 +000010940 echo "$as_me: program exited with status $ac_status" >&5
10941echo "$as_me: failed program was:" >&5
10942cat conftest.$ac_ext >&5
10943( exit $ac_status )
10944echo "$as_me:$LINENO: result: no" >&5
10945echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946 ipv6=no
10947fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010948rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010949fi
10950
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010951if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010952 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10953echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10954 cat >conftest.$ac_ext <<_ACEOF
10955#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010956#include "confdefs.h"
10957#include <sys/types.h>
10958#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010959#ifdef F77_DUMMY_MAIN
10960# ifdef __cplusplus
10961 extern "C"
10962# endif
10963 int F77_DUMMY_MAIN() { return 1; }
10964#endif
10965int
10966main ()
10967{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010968struct sockaddr_in6 x;
10969x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010970 ;
10971 return 0;
10972}
10973_ACEOF
10974rm -f conftest.$ac_objext
10975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10976 (eval $ac_compile) 2>&5
10977 ac_status=$?
10978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10979 (exit $ac_status); } &&
10980 { ac_try='test -s conftest.$ac_objext'
10981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10982 (eval $ac_try) 2>&5
10983 ac_status=$?
10984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10985 (exit $ac_status); }; }; then
10986 echo "$as_me:$LINENO: result: yes" >&5
10987echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010988 ipv6=yes
10989else
Martin v. Löwis11437992002-04-12 09:54:03 +000010990 echo "$as_me: failed program was:" >&5
10991cat conftest.$ac_ext >&5
10992echo "$as_me:$LINENO: result: no" >&5
10993echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010994 ipv6=no
10995fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010996rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010997fi
10998
10999if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011000 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011001#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011002_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011003
11004fi
11005
Martin v. Löwis11437992002-04-12 09:54:03 +000011006fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011007
11008ipv6type=unknown
11009ipv6lib=none
11010ipv6trylibc=no
11011
11012if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011013 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11014echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011015 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11016 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011017 case $i in
11018 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011019 cat >conftest.$ac_ext <<_ACEOF
11020#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011021#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011022
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011023#include <netinet/in.h>
11024#ifdef IPV6_INRIA_VERSION
11025yes
11026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011027_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11029 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011030 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011031fi
11032rm -f conftest*
11033
11034 ;;
11035 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011036 cat >conftest.$ac_ext <<_ACEOF
11037#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011038#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011039
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011040#include <netinet/in.h>
11041#ifdef __KAME__
11042yes
11043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011044_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11046 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011047 ipv6type=$i;
11048 ipv6lib=inet6
11049 ipv6libdir=/usr/local/v6/lib
11050 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011051fi
11052rm -f conftest*
11053
11054 ;;
11055 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011056 cat >conftest.$ac_ext <<_ACEOF
11057#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011058#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011059
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011060#include <features.h>
11061#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11062yes
11063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011064_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11066 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067 ipv6type=$i;
11068 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011069fi
11070rm -f conftest*
11071
11072 ;;
11073 linux-inet6)
11074 if test -d /usr/inet6; then
11075 ipv6type=$i
11076 ipv6lib=inet6
11077 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011078 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011079 fi
11080 ;;
11081 solaris)
11082 if test -f /etc/netconfig; then
11083 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11084 ipv6type=$i
11085 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011086 fi
11087 fi
11088 ;;
11089 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011090 cat >conftest.$ac_ext <<_ACEOF
11091#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011092#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011093
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011094#include <sys/param.h>
11095#ifdef _TOSHIBA_INET6
11096yes
11097#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011098_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11100 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011101 ipv6type=$i;
11102 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011103 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011104fi
11105rm -f conftest*
11106
11107 ;;
11108 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011109 cat >conftest.$ac_ext <<_ACEOF
11110#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011111#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011112
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011113#include </usr/local/v6/include/sys/v6config.h>
11114#ifdef __V6D__
11115yes
11116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011117_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11119 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011120 ipv6type=$i;
11121 ipv6lib=v6;
11122 ipv6libdir=/usr/local/v6/lib;
11123 OPT="-I/usr/local/v6/include $OPT"
11124fi
11125rm -f conftest*
11126
11127 ;;
11128 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011129 cat >conftest.$ac_ext <<_ACEOF
11130#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011132
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011133#include <sys/param.h>
11134#ifdef _ZETA_MINAMI_INET6
11135yes
11136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011137_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11139 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011140 ipv6type=$i;
11141 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011142 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011143fi
11144rm -f conftest*
11145
11146 ;;
11147 esac
11148 if test "$ipv6type" != "unknown"; then
11149 break
11150 fi
11151 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011152 echo "$as_me:$LINENO: result: $ipv6type" >&5
11153echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011154fi
11155
11156if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11157 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11158 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11159 echo "using lib$ipv6lib"
11160 else
11161 if test $ipv6trylibc = "yes"; then
11162 echo "using libc"
11163 else
11164 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11165 echo "You need to fetch lib$ipv6lib.a from appropriate"
11166 echo 'ipv6 kit and compile beforehand.'
11167 exit 1
11168 fi
11169 fi
11170fi
11171
Jack Jansen7b8c7542002-04-14 20:12:41 +000011172# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011173echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11174echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011175
11176# Check whether --with-universal-newlines or --without-universal-newlines was given.
11177if test "${with_universal_newlines+set}" = set; then
11178 withval="$with_universal_newlines"
11179
11180fi;
11181
11182if test -z "$with_universal_newlines"
11183then with_universal_newlines="yes"
11184fi
11185if test "$with_universal_newlines" != "no"
11186then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011187
11188cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011189#define WITH_UNIVERSAL_NEWLINES 1
11190_ACEOF
11191
11192fi
11193echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11194echo "${ECHO_T}$with_universal_newlines" >&6
11195
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011196# Check for --with-doc-strings
11197echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11198echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11199
11200# Check whether --with-doc-strings or --without-doc-strings was given.
11201if test "${with_doc_strings+set}" = set; then
11202 withval="$with_doc_strings"
11203
11204fi;
11205
11206if test -z "$with_doc_strings"
11207then with_doc_strings="yes"
11208fi
11209if test "$with_doc_strings" != "no"
11210then
11211
11212cat >>confdefs.h <<\_ACEOF
11213#define WITH_DOC_STRINGS 1
11214_ACEOF
11215
11216fi
11217echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11218echo "${ECHO_T}$with_doc_strings" >&6
11219
Neil Schemenauera35c6882001-02-27 04:45:05 +000011220# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011221echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11222echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11223
Neil Schemenauera35c6882001-02-27 04:45:05 +000011224# Check whether --with-pymalloc or --without-pymalloc was given.
11225if test "${with_pymalloc+set}" = set; then
11226 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011227
Martin v. Löwis11437992002-04-12 09:54:03 +000011228fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011229
Neil Schemenauer16c22972002-03-22 15:34:49 +000011230if test -z "$with_pymalloc"
11231then with_pymalloc="yes"
11232fi
11233if test "$with_pymalloc" != "no"
11234then
Martin v. Löwis11437992002-04-12 09:54:03 +000011235
11236cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011237#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011238_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011239
11240fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011241echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11242echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011243
Barry Warsawef82cd72000-06-30 16:21:01 +000011244# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011245echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11246echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11247
Barry Warsawef82cd72000-06-30 16:21:01 +000011248# Check whether --with-wctype-functions or --without-wctype-functions was given.
11249if test "${with_wctype_functions+set}" = set; then
11250 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011251
Barry Warsawef82cd72000-06-30 16:21:01 +000011252if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011253then
11254
11255cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011256#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011257_ACEOF
11258
11259 echo "$as_me:$LINENO: result: yes" >&5
11260echo "${ECHO_T}yes" >&6
11261else echo "$as_me:$LINENO: result: no" >&5
11262echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011263fi
11264else
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 echo "$as_me:$LINENO: result: no" >&5
11266echo "${ECHO_T}no" >&6
11267fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011268
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011269# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011270
Guido van Rossum98935bf2001-09-05 19:13:16 +000011271DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011272
Martin v. Löwis11437992002-04-12 09:54:03 +000011273echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11274echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11275
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011276# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011277if test "${with_sgi_dl+set}" = set; then
11278 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011279
11280echo "$as_me:$LINENO: result: $withval" >&5
11281echo "${ECHO_T}$withval" >&6
11282
11283cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011284#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011285_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011286
Guido van Rossume97ee181999-12-20 21:27:22 +000011287DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011288dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011289if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011290then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011291else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11292echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11293 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011294fi
11295DLINCLDIR=${dldir}
11296LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011297else
Martin v. Löwis11437992002-04-12 09:54:03 +000011298 echo "$as_me:$LINENO: result: no" >&5
11299echo "${ECHO_T}no" >&6
11300fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011301
Martin v. Löwis11437992002-04-12 09:54:03 +000011302echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11303echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011304
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011305# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011306if test "${with_dl_dld+set}" = set; then
11307 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011308
11309echo "$as_me:$LINENO: result: $withval" >&5
11310echo "${ECHO_T}$withval" >&6
11311
11312cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011313#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011314_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011315
Guido van Rossume97ee181999-12-20 21:27:22 +000011316DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011317dldir=`echo "$withval" | sed 's/,.*//'`
11318dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011319if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011320then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011321else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11322echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11323 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011324fi
11325DLINCLDIR=${dldir}
11326LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011327else
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 echo "$as_me:$LINENO: result: no" >&5
11329echo "${ECHO_T}no" >&6
11330fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011331
Guido van Rossume97ee181999-12-20 21:27:22 +000011332# the dlopen() function means we might want to use dynload_shlib.o. some
11333# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011334
Thomas Wouters3a584202000-08-05 23:28:51 +000011335for ac_func in dlopen
11336do
Martin v. Löwis11437992002-04-12 09:54:03 +000011337as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11338echo "$as_me:$LINENO: checking for $ac_func" >&5
11339echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11340if eval "test \"\${$as_ac_var+set}\" = set"; then
11341 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011342else
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 cat >conftest.$ac_ext <<_ACEOF
11344#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011345#include "confdefs.h"
11346/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011347 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011348#include <assert.h>
11349/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011350#ifdef __cplusplus
11351extern "C"
11352#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011353/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011354 builtin and then its argument prototype would still apply. */
11355char $ac_func ();
11356char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011357
Martin v. Löwis11437992002-04-12 09:54:03 +000011358#ifdef F77_DUMMY_MAIN
11359# ifdef __cplusplus
11360 extern "C"
11361# endif
11362 int F77_DUMMY_MAIN() { return 1; }
11363#endif
11364int
11365main ()
11366{
Guido van Rossume97ee181999-12-20 21:27:22 +000011367/* The GNU C library defines this for functions which it implements
11368 to always fail with ENOSYS. Some functions are actually named
11369 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011370#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011371choke me
11372#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011373f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011374#endif
11375
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 ;
11377 return 0;
11378}
11379_ACEOF
11380rm -f conftest.$ac_objext conftest$ac_exeext
11381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11382 (eval $ac_link) 2>&5
11383 ac_status=$?
11384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11385 (exit $ac_status); } &&
11386 { ac_try='test -s conftest$ac_exeext'
11387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11388 (eval $ac_try) 2>&5
11389 ac_status=$?
11390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11391 (exit $ac_status); }; }; then
11392 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011393else
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 echo "$as_me: failed program was:" >&5
11395cat conftest.$ac_ext >&5
11396eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011397fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011398rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011399fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011400echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11401echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11402if test `eval echo '${'$as_ac_var'}'` = yes; then
11403 cat >>confdefs.h <<_ACEOF
11404#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11405_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011406
Guido van Rossume97ee181999-12-20 21:27:22 +000011407fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011408done
Guido van Rossume97ee181999-12-20 21:27:22 +000011409
Michael W. Hudson54241132001-12-07 15:38:26 +000011410
Guido van Rossume97ee181999-12-20 21:27:22 +000011411# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11412# loading of modules.
11413
Martin v. Löwis11437992002-04-12 09:54:03 +000011414echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11415echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011416if test -z "$DYNLOADFILE"
11417then
11418 case $ac_sys_system/$ac_sys_release in
11419 AIX*) DYNLOADFILE="dynload_aix.o";;
11420 BeOS*) DYNLOADFILE="dynload_beos.o";;
11421 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011422 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011423 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011424 *)
11425 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11426 # out any dynamic loading
11427 if test "$ac_cv_func_dlopen" = yes
11428 then DYNLOADFILE="dynload_shlib.o"
11429 else DYNLOADFILE="dynload_stub.o"
11430 fi
11431 ;;
11432 esac
11433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011434echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11435echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011436if test "$DYNLOADFILE" != "dynload_stub.o"
11437then
Martin v. Löwis11437992002-04-12 09:54:03 +000011438
11439cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011440#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011441_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011442
11443fi
11444
Neil Schemenauer4e425612001-06-19 15:44:15 +000011445# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11446
Michael W. Hudson54241132001-12-07 15:38:26 +000011447
Martin v. Löwis11437992002-04-12 09:54:03 +000011448echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11449echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011450if test -z "$MACHDEP_OBJS"
11451then
Jack Jansene578a632001-08-15 01:27:14 +000011452 MACHDEP_OBJS=$extra_machdep_objs
11453else
11454 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011455fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011456echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11457echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011458
Guido van Rossum627b2d71993-12-24 10:39:16 +000011459# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011533
Fred Drake6b3cc522002-04-15 19:20:27 +000011534
Jack Jansen0b06be72002-06-21 14:48:38 +000011535
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011536
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011537
Martin v. Löwis244edc82001-10-04 22:44:26 +000011538for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011539 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011540 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011541 hstrerror inet_pton kill killpg lchown link lstat mkfifo mknod mktime \
11542 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011543 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011544 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011545 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011546 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011547 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011548 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011549do
Martin v. Löwis11437992002-04-12 09:54:03 +000011550as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11551echo "$as_me:$LINENO: checking for $ac_func" >&5
11552echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11553if eval "test \"\${$as_ac_var+set}\" = set"; then
11554 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011555else
Martin v. Löwis11437992002-04-12 09:54:03 +000011556 cat >conftest.$ac_ext <<_ACEOF
11557#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011558#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011559/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011560 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011561#include <assert.h>
11562/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011563#ifdef __cplusplus
11564extern "C"
11565#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011566/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 builtin and then its argument prototype would still apply. */
11568char $ac_func ();
11569char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011570
Martin v. Löwis11437992002-04-12 09:54:03 +000011571#ifdef F77_DUMMY_MAIN
11572# ifdef __cplusplus
11573 extern "C"
11574# endif
11575 int F77_DUMMY_MAIN() { return 1; }
11576#endif
11577int
11578main ()
11579{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011580/* The GNU C library defines this for functions which it implements
11581 to always fail with ENOSYS. Some functions are actually named
11582 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011583#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011584choke me
11585#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011586f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011587#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011588
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 ;
11590 return 0;
11591}
11592_ACEOF
11593rm -f conftest.$ac_objext conftest$ac_exeext
11594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11595 (eval $ac_link) 2>&5
11596 ac_status=$?
11597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11598 (exit $ac_status); } &&
11599 { ac_try='test -s conftest$ac_exeext'
11600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11601 (eval $ac_try) 2>&5
11602 ac_status=$?
11603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11604 (exit $ac_status); }; }; then
11605 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011606else
Martin v. Löwis11437992002-04-12 09:54:03 +000011607 echo "$as_me: failed program was:" >&5
11608cat conftest.$ac_ext >&5
11609eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011610fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011611rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011612fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011613echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11614echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11615if test `eval echo '${'$as_ac_var'}'` = yes; then
11616 cat >>confdefs.h <<_ACEOF
11617#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11618_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011619
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011620fi
11621done
11622
Michael W. Hudson54241132001-12-07 15:38:26 +000011623
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011624# check for openpty and forkpty
11625
Martin v. Löwis11437992002-04-12 09:54:03 +000011626
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011627for ac_func in openpty
11628do
Martin v. Löwis11437992002-04-12 09:54:03 +000011629as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11630echo "$as_me:$LINENO: checking for $ac_func" >&5
11631echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11632if eval "test \"\${$as_ac_var+set}\" = set"; then
11633 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011634else
Martin v. Löwis11437992002-04-12 09:54:03 +000011635 cat >conftest.$ac_ext <<_ACEOF
11636#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011637#include "confdefs.h"
11638/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011639 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011640#include <assert.h>
11641/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011642#ifdef __cplusplus
11643extern "C"
11644#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011645/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011646 builtin and then its argument prototype would still apply. */
11647char $ac_func ();
11648char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011649
Martin v. Löwis11437992002-04-12 09:54:03 +000011650#ifdef F77_DUMMY_MAIN
11651# ifdef __cplusplus
11652 extern "C"
11653# endif
11654 int F77_DUMMY_MAIN() { return 1; }
11655#endif
11656int
11657main ()
11658{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011659/* The GNU C library defines this for functions which it implements
11660 to always fail with ENOSYS. Some functions are actually named
11661 something starting with __ and the normal name is an alias. */
11662#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11663choke me
11664#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011665f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011666#endif
11667
Martin v. Löwis11437992002-04-12 09:54:03 +000011668 ;
11669 return 0;
11670}
11671_ACEOF
11672rm -f conftest.$ac_objext conftest$ac_exeext
11673if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11674 (eval $ac_link) 2>&5
11675 ac_status=$?
11676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11677 (exit $ac_status); } &&
11678 { ac_try='test -s conftest$ac_exeext'
11679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11680 (eval $ac_try) 2>&5
11681 ac_status=$?
11682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11683 (exit $ac_status); }; }; then
11684 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011685else
Martin v. Löwis11437992002-04-12 09:54:03 +000011686 echo "$as_me: failed program was:" >&5
11687cat conftest.$ac_ext >&5
11688eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011689fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011690rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011691fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011692echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11693echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11694if test `eval echo '${'$as_ac_var'}'` = yes; then
11695 cat >>confdefs.h <<_ACEOF
11696#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11697_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011698
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011699else
Martin v. Löwis11437992002-04-12 09:54:03 +000011700 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11701echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11702if test "${ac_cv_lib_util_openpty+set}" = set; then
11703 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011704else
Martin v. Löwis11437992002-04-12 09:54:03 +000011705 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011706LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011707cat >conftest.$ac_ext <<_ACEOF
11708#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011709#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011710
Fred Drake8cef4cf2000-06-28 16:40:38 +000011711/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011712#ifdef __cplusplus
11713extern "C"
11714#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011715/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011716 builtin and then its argument prototype would still apply. */
11717char openpty ();
11718#ifdef F77_DUMMY_MAIN
11719# ifdef __cplusplus
11720 extern "C"
11721# endif
11722 int F77_DUMMY_MAIN() { return 1; }
11723#endif
11724int
11725main ()
11726{
11727openpty ();
11728 ;
11729 return 0;
11730}
11731_ACEOF
11732rm -f conftest.$ac_objext conftest$ac_exeext
11733if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11734 (eval $ac_link) 2>&5
11735 ac_status=$?
11736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11737 (exit $ac_status); } &&
11738 { ac_try='test -s conftest$ac_exeext'
11739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11740 (eval $ac_try) 2>&5
11741 ac_status=$?
11742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11743 (exit $ac_status); }; }; then
11744 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011745else
Martin v. Löwis11437992002-04-12 09:54:03 +000011746 echo "$as_me: failed program was:" >&5
11747cat conftest.$ac_ext >&5
11748ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011749fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011750rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11751LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011752fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011753echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11754echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11755if test $ac_cv_lib_util_openpty = yes; then
11756 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011757#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011758_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011759 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011760fi
11761
11762fi
11763done
11764
Martin v. Löwis11437992002-04-12 09:54:03 +000011765
Fred Drake8cef4cf2000-06-28 16:40:38 +000011766for ac_func in forkpty
11767do
Martin v. Löwis11437992002-04-12 09:54:03 +000011768as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11769echo "$as_me:$LINENO: checking for $ac_func" >&5
11770echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11771if eval "test \"\${$as_ac_var+set}\" = set"; then
11772 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011773else
Martin v. Löwis11437992002-04-12 09:54:03 +000011774 cat >conftest.$ac_ext <<_ACEOF
11775#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011776#include "confdefs.h"
11777/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011778 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011779#include <assert.h>
11780/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011781#ifdef __cplusplus
11782extern "C"
11783#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011784/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011785 builtin and then its argument prototype would still apply. */
11786char $ac_func ();
11787char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011788
Martin v. Löwis11437992002-04-12 09:54:03 +000011789#ifdef F77_DUMMY_MAIN
11790# ifdef __cplusplus
11791 extern "C"
11792# endif
11793 int F77_DUMMY_MAIN() { return 1; }
11794#endif
11795int
11796main ()
11797{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011798/* The GNU C library defines this for functions which it implements
11799 to always fail with ENOSYS. Some functions are actually named
11800 something starting with __ and the normal name is an alias. */
11801#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11802choke me
11803#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011804f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011805#endif
11806
Martin v. Löwis11437992002-04-12 09:54:03 +000011807 ;
11808 return 0;
11809}
11810_ACEOF
11811rm -f conftest.$ac_objext conftest$ac_exeext
11812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11813 (eval $ac_link) 2>&5
11814 ac_status=$?
11815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11816 (exit $ac_status); } &&
11817 { ac_try='test -s conftest$ac_exeext'
11818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11819 (eval $ac_try) 2>&5
11820 ac_status=$?
11821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11822 (exit $ac_status); }; }; then
11823 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011824else
Martin v. Löwis11437992002-04-12 09:54:03 +000011825 echo "$as_me: failed program was:" >&5
11826cat conftest.$ac_ext >&5
11827eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011828fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011829rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011830fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011831echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11832echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11833if test `eval echo '${'$as_ac_var'}'` = yes; then
11834 cat >>confdefs.h <<_ACEOF
11835#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11836_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011837
Fred Drake8cef4cf2000-06-28 16:40:38 +000011838else
Martin v. Löwis11437992002-04-12 09:54:03 +000011839 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11840echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11841if test "${ac_cv_lib_util_forkpty+set}" = set; then
11842 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011843else
Martin v. Löwis11437992002-04-12 09:54:03 +000011844 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011845LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011846cat >conftest.$ac_ext <<_ACEOF
11847#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011848#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011849
Fred Drake8cef4cf2000-06-28 16:40:38 +000011850/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011851#ifdef __cplusplus
11852extern "C"
11853#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011854/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011855 builtin and then its argument prototype would still apply. */
11856char forkpty ();
11857#ifdef F77_DUMMY_MAIN
11858# ifdef __cplusplus
11859 extern "C"
11860# endif
11861 int F77_DUMMY_MAIN() { return 1; }
11862#endif
11863int
11864main ()
11865{
11866forkpty ();
11867 ;
11868 return 0;
11869}
11870_ACEOF
11871rm -f conftest.$ac_objext conftest$ac_exeext
11872if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11873 (eval $ac_link) 2>&5
11874 ac_status=$?
11875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11876 (exit $ac_status); } &&
11877 { ac_try='test -s conftest$ac_exeext'
11878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11879 (eval $ac_try) 2>&5
11880 ac_status=$?
11881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11882 (exit $ac_status); }; }; then
11883 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011884else
Martin v. Löwis11437992002-04-12 09:54:03 +000011885 echo "$as_me: failed program was:" >&5
11886cat conftest.$ac_ext >&5
11887ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011888fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011889rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11890LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011891fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011892echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11893echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11894if test $ac_cv_lib_util_forkpty = yes; then
11895 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011896#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011897_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011898 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011899fi
11900
11901fi
11902done
11903
Jack Jansendd19cf82001-12-06 22:36:17 +000011904
Michael W. Hudson54241132001-12-07 15:38:26 +000011905# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011906
11907
11908
11909
11910
11911
Fred Drake8cef4cf2000-06-28 16:40:38 +000011912for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11913do
Martin v. Löwis11437992002-04-12 09:54:03 +000011914as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11915echo "$as_me:$LINENO: checking for $ac_func" >&5
11916echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11917if eval "test \"\${$as_ac_var+set}\" = set"; then
11918 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011919else
Martin v. Löwis11437992002-04-12 09:54:03 +000011920 cat >conftest.$ac_ext <<_ACEOF
11921#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011922#include "confdefs.h"
11923/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011924 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011925#include <assert.h>
11926/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011927#ifdef __cplusplus
11928extern "C"
11929#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011930/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011931 builtin and then its argument prototype would still apply. */
11932char $ac_func ();
11933char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011934
Martin v. Löwis11437992002-04-12 09:54:03 +000011935#ifdef F77_DUMMY_MAIN
11936# ifdef __cplusplus
11937 extern "C"
11938# endif
11939 int F77_DUMMY_MAIN() { return 1; }
11940#endif
11941int
11942main ()
11943{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011944/* The GNU C library defines this for functions which it implements
11945 to always fail with ENOSYS. Some functions are actually named
11946 something starting with __ and the normal name is an alias. */
11947#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11948choke me
11949#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011950f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011951#endif
11952
Martin v. Löwis11437992002-04-12 09:54:03 +000011953 ;
11954 return 0;
11955}
11956_ACEOF
11957rm -f conftest.$ac_objext conftest$ac_exeext
11958if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11959 (eval $ac_link) 2>&5
11960 ac_status=$?
11961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11962 (exit $ac_status); } &&
11963 { ac_try='test -s conftest$ac_exeext'
11964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11965 (eval $ac_try) 2>&5
11966 ac_status=$?
11967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11968 (exit $ac_status); }; }; then
11969 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011970else
Martin v. Löwis11437992002-04-12 09:54:03 +000011971 echo "$as_me: failed program was:" >&5
11972cat conftest.$ac_ext >&5
11973eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011974fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011975rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011976fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011977echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11978echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11979if test `eval echo '${'$as_ac_var'}'` = yes; then
11980 cat >>confdefs.h <<_ACEOF
11981#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11982_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011983
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011984fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011985done
11986
Michael W. Hudson54241132001-12-07 15:38:26 +000011987
Martin v. Löwis11437992002-04-12 09:54:03 +000011988
11989
11990
11991
11992
Martin v. Löwis1142de32002-03-29 16:28:31 +000011993for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011994do
Martin v. Löwis11437992002-04-12 09:54:03 +000011995as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11996echo "$as_me:$LINENO: checking for $ac_func" >&5
11997echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11998if eval "test \"\${$as_ac_var+set}\" = set"; then
11999 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012000else
Martin v. Löwis11437992002-04-12 09:54:03 +000012001 cat >conftest.$ac_ext <<_ACEOF
12002#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012003#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012004/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012006#include <assert.h>
12007/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012008#ifdef __cplusplus
12009extern "C"
12010#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012011/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012012 builtin and then its argument prototype would still apply. */
12013char $ac_func ();
12014char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012015
Martin v. Löwis11437992002-04-12 09:54:03 +000012016#ifdef F77_DUMMY_MAIN
12017# ifdef __cplusplus
12018 extern "C"
12019# endif
12020 int F77_DUMMY_MAIN() { return 1; }
12021#endif
12022int
12023main ()
12024{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012025/* The GNU C library defines this for functions which it implements
12026 to always fail with ENOSYS. Some functions are actually named
12027 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012028#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012029choke me
12030#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012031f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012032#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012033
Martin v. Löwis11437992002-04-12 09:54:03 +000012034 ;
12035 return 0;
12036}
12037_ACEOF
12038rm -f conftest.$ac_objext conftest$ac_exeext
12039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12040 (eval $ac_link) 2>&5
12041 ac_status=$?
12042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12043 (exit $ac_status); } &&
12044 { ac_try='test -s conftest$ac_exeext'
12045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12046 (eval $ac_try) 2>&5
12047 ac_status=$?
12048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12049 (exit $ac_status); }; }; then
12050 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012051else
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 echo "$as_me: failed program was:" >&5
12053cat conftest.$ac_ext >&5
12054eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012056rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012057fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012058echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12059echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12060if test `eval echo '${'$as_ac_var'}'` = yes; then
12061 cat >>confdefs.h <<_ACEOF
12062#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12063_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012064
Martin v. Löwis1142de32002-03-29 16:28:31 +000012065else
Martin v. Löwis11437992002-04-12 09:54:03 +000012066 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012067fi
12068done
12069
12070
Martin v. Löwis11437992002-04-12 09:54:03 +000012071
Martin v. Löwis1142de32002-03-29 16:28:31 +000012072for ac_func in getpgrp
12073do
Martin v. Löwis11437992002-04-12 09:54:03 +000012074as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12075echo "$as_me:$LINENO: checking for $ac_func" >&5
12076echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12077if eval "test \"\${$as_ac_var+set}\" = set"; then
12078 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012079else
Martin v. Löwis11437992002-04-12 09:54:03 +000012080 cat >conftest.$ac_ext <<_ACEOF
12081#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012082#include "confdefs.h"
12083/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012085#include <assert.h>
12086/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012087#ifdef __cplusplus
12088extern "C"
12089#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012090/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012091 builtin and then its argument prototype would still apply. */
12092char $ac_func ();
12093char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012094
Martin v. Löwis11437992002-04-12 09:54:03 +000012095#ifdef F77_DUMMY_MAIN
12096# ifdef __cplusplus
12097 extern "C"
12098# endif
12099 int F77_DUMMY_MAIN() { return 1; }
12100#endif
12101int
12102main ()
12103{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012104/* The GNU C library defines this for functions which it implements
12105 to always fail with ENOSYS. Some functions are actually named
12106 something starting with __ and the normal name is an alias. */
12107#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12108choke me
12109#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012110f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012111#endif
12112
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 ;
12114 return 0;
12115}
12116_ACEOF
12117rm -f conftest.$ac_objext conftest$ac_exeext
12118if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12119 (eval $ac_link) 2>&5
12120 ac_status=$?
12121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12122 (exit $ac_status); } &&
12123 { ac_try='test -s conftest$ac_exeext'
12124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12125 (eval $ac_try) 2>&5
12126 ac_status=$?
12127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12128 (exit $ac_status); }; }; then
12129 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012130else
Martin v. Löwis11437992002-04-12 09:54:03 +000012131 echo "$as_me: failed program was:" >&5
12132cat conftest.$ac_ext >&5
12133eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012135rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012137echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12138echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12139if test `eval echo '${'$as_ac_var'}'` = yes; then
12140 cat >>confdefs.h <<_ACEOF
12141#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12142_ACEOF
12143 cat >conftest.$ac_ext <<_ACEOF
12144#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012145#include "confdefs.h"
12146#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012147#ifdef F77_DUMMY_MAIN
12148# ifdef __cplusplus
12149 extern "C"
12150# endif
12151 int F77_DUMMY_MAIN() { return 1; }
12152#endif
12153int
12154main ()
12155{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 ;
12158 return 0;
12159}
12160_ACEOF
12161rm -f conftest.$ac_objext
12162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12163 (eval $ac_compile) 2>&5
12164 ac_status=$?
12165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12166 (exit $ac_status); } &&
12167 { ac_try='test -s conftest.$ac_objext'
12168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12169 (eval $ac_try) 2>&5
12170 ac_status=$?
12171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12172 (exit $ac_status); }; }; then
12173
12174cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012175#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012176_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012177
Martin v. Löwis11437992002-04-12 09:54:03 +000012178
Guido van Rossumf78abae1997-01-21 22:02:36 +000012179else
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 echo "$as_me: failed program was:" >&5
12181cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012182fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012183rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012184
Guido van Rossum627b2d71993-12-24 10:39:16 +000012185fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012186done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012187
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012188echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12189echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12190if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012191 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012192else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012193 if test "$cross_compiling" = yes; then
12194 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12195echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12196 { (exit 1); exit 1; }; }
12197else
Martin v. Löwis11437992002-04-12 09:54:03 +000012198 cat >conftest.$ac_ext <<_ACEOF
12199#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012200#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012201#if HAVE_UNISTD_H
12202# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012203#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012204
Martin v. Löwis11437992002-04-12 09:54:03 +000012205#ifdef F77_DUMMY_MAIN
12206# ifdef __cplusplus
12207 extern "C"
12208# endif
12209 int F77_DUMMY_MAIN() { return 1; }
12210#endif
12211int
12212main ()
12213{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012214/* If this system has a BSD-style setpgrp which takes arguments,
12215 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12216 exit successfully. */
12217 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 ;
12219 return 0;
12220}
12221_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012222rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12224 (eval $ac_link) 2>&5
12225 ac_status=$?
12226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012227 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12229 (eval $ac_try) 2>&5
12230 ac_status=$?
12231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12232 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012233 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012234else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012235 echo "$as_me: program exited with status $ac_status" >&5
12236echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012237cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012238( exit $ac_status )
12239ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012240fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012241rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012242fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012243fi
12244echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12245echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12246if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012247
12248cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012249#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012250_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012251
12252fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012253
Martin v. Löwis11437992002-04-12 09:54:03 +000012254
Thomas Wouters3a584202000-08-05 23:28:51 +000012255for ac_func in gettimeofday
12256do
Martin v. Löwis11437992002-04-12 09:54:03 +000012257as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12258echo "$as_me:$LINENO: checking for $ac_func" >&5
12259echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12260if eval "test \"\${$as_ac_var+set}\" = set"; then
12261 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012262else
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 cat >conftest.$ac_ext <<_ACEOF
12264#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012265#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012266/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012267 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012268#include <assert.h>
12269/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012270#ifdef __cplusplus
12271extern "C"
12272#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012273/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 builtin and then its argument prototype would still apply. */
12275char $ac_func ();
12276char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012277
Martin v. Löwis11437992002-04-12 09:54:03 +000012278#ifdef F77_DUMMY_MAIN
12279# ifdef __cplusplus
12280 extern "C"
12281# endif
12282 int F77_DUMMY_MAIN() { return 1; }
12283#endif
12284int
12285main ()
12286{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012287/* The GNU C library defines this for functions which it implements
12288 to always fail with ENOSYS. Some functions are actually named
12289 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012290#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012291choke me
12292#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012293f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012294#endif
12295
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 ;
12297 return 0;
12298}
12299_ACEOF
12300rm -f conftest.$ac_objext conftest$ac_exeext
12301if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12302 (eval $ac_link) 2>&5
12303 ac_status=$?
12304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12305 (exit $ac_status); } &&
12306 { ac_try='test -s conftest$ac_exeext'
12307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12308 (eval $ac_try) 2>&5
12309 ac_status=$?
12310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12311 (exit $ac_status); }; }; then
12312 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012313else
Martin v. Löwis11437992002-04-12 09:54:03 +000012314 echo "$as_me: failed program was:" >&5
12315cat conftest.$ac_ext >&5
12316eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012317fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012318rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012319fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012320echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12321echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12322if test `eval echo '${'$as_ac_var'}'` = yes; then
12323 cat >>confdefs.h <<_ACEOF
12324#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12325_ACEOF
12326 cat >conftest.$ac_ext <<_ACEOF
12327#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012328#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012329#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012330#ifdef F77_DUMMY_MAIN
12331# ifdef __cplusplus
12332 extern "C"
12333# endif
12334 int F77_DUMMY_MAIN() { return 1; }
12335#endif
12336int
12337main ()
12338{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012339gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012340 ;
12341 return 0;
12342}
12343_ACEOF
12344rm -f conftest.$ac_objext
12345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12346 (eval $ac_compile) 2>&5
12347 ac_status=$?
12348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12349 (exit $ac_status); } &&
12350 { ac_try='test -s conftest.$ac_objext'
12351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12352 (eval $ac_try) 2>&5
12353 ac_status=$?
12354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12355 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012356 :
12357else
Martin v. Löwis11437992002-04-12 09:54:03 +000012358 echo "$as_me: failed program was:" >&5
12359cat conftest.$ac_ext >&5
12360
12361cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012362#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012363_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012364
Martin v. Löwis11437992002-04-12 09:54:03 +000012365
Guido van Rossum627b2d71993-12-24 10:39:16 +000012366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012367rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012368
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012369fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012370done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012371
Michael W. Hudson54241132001-12-07 15:38:26 +000012372
12373
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012374# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012375# for [no]getaddrinfo in netdb.h.
12376echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12377echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12378cat >conftest.$ac_ext <<_ACEOF
12379#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012380#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012381
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012382#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012383#include <sys/socket.h>
12384#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012385#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012386
Martin v. Löwis11437992002-04-12 09:54:03 +000012387#ifdef F77_DUMMY_MAIN
12388# ifdef __cplusplus
12389 extern "C"
12390# endif
12391 int F77_DUMMY_MAIN() { return 1; }
12392#endif
12393int
12394main ()
12395{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012396
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012397getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012398
Martin v. Löwis11437992002-04-12 09:54:03 +000012399 ;
12400 return 0;
12401}
12402_ACEOF
12403rm -f conftest.$ac_objext conftest$ac_exeext
12404if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12405 (eval $ac_link) 2>&5
12406 ac_status=$?
12407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12408 (exit $ac_status); } &&
12409 { ac_try='test -s conftest$ac_exeext'
12410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12411 (eval $ac_try) 2>&5
12412 ac_status=$?
12413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12414 (exit $ac_status); }; }; then
12415
12416echo "$as_me:$LINENO: result: yes" >&5
12417echo "${ECHO_T}yes" >&6
12418echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12419echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012420if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 echo "$as_me:$LINENO: result: buggy" >&5
12422echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012423buggygetaddrinfo=yes
12424else
Martin v. Löwis11437992002-04-12 09:54:03 +000012425 cat >conftest.$ac_ext <<_ACEOF
12426#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012427#include "confdefs.h"
12428
12429#include <sys/types.h>
12430#include <netdb.h>
12431#include <string.h>
12432#include <sys/socket.h>
12433#include <netinet/in.h>
12434
12435main()
12436{
12437 int passive, gaierr, inet4 = 0, inet6 = 0;
12438 struct addrinfo hints, *ai, *aitop;
12439 char straddr[INET6_ADDRSTRLEN], strport[16];
12440
12441 for (passive = 0; passive <= 1; passive++) {
12442 memset(&hints, 0, sizeof(hints));
12443 hints.ai_family = AF_UNSPEC;
12444 hints.ai_flags = passive ? AI_PASSIVE : 0;
12445 hints.ai_socktype = SOCK_STREAM;
12446 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12447 (void)gai_strerror(gaierr);
12448 goto bad;
12449 }
12450 for (ai = aitop; ai; ai = ai->ai_next) {
12451 if (ai->ai_addr == NULL ||
12452 ai->ai_addrlen == 0 ||
12453 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12454 straddr, sizeof(straddr), strport, sizeof(strport),
12455 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12456 goto bad;
12457 }
12458 switch (ai->ai_family) {
12459 case AF_INET:
12460 if (strcmp(strport, "54321") != 0) {
12461 goto bad;
12462 }
12463 if (passive) {
12464 if (strcmp(straddr, "0.0.0.0") != 0) {
12465 goto bad;
12466 }
12467 } else {
12468 if (strcmp(straddr, "127.0.0.1") != 0) {
12469 goto bad;
12470 }
12471 }
12472 inet4++;
12473 break;
12474 case AF_INET6:
12475 if (strcmp(strport, "54321") != 0) {
12476 goto bad;
12477 }
12478 if (passive) {
12479 if (strcmp(straddr, "::") != 0) {
12480 goto bad;
12481 }
12482 } else {
12483 if (strcmp(straddr, "::1") != 0) {
12484 goto bad;
12485 }
12486 }
12487 inet6++;
12488 break;
12489 case AF_UNSPEC:
12490 goto bad;
12491 break;
12492 default:
12493 /* another family support? */
12494 break;
12495 }
12496 }
12497 }
12498
12499 if (!(inet4 == 0 || inet4 == 2))
12500 goto bad;
12501 if (!(inet6 == 0 || inet6 == 2))
12502 goto bad;
12503
12504 if (aitop)
12505 freeaddrinfo(aitop);
12506 exit(0);
12507
12508 bad:
12509 if (aitop)
12510 freeaddrinfo(aitop);
12511 exit(1);
12512}
12513
Martin v. Löwis11437992002-04-12 09:54:03 +000012514_ACEOF
12515rm -f conftest$ac_exeext
12516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12517 (eval $ac_link) 2>&5
12518 ac_status=$?
12519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12520 (exit $ac_status); } && { ac_try='./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 echo "$as_me:$LINENO: result: good" >&5
12527echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012528buggygetaddrinfo=no
12529else
Martin v. Löwis11437992002-04-12 09:54:03 +000012530 echo "$as_me: program exited with status $ac_status" >&5
12531echo "$as_me: failed program was:" >&5
12532cat conftest.$ac_ext >&5
12533( exit $ac_status )
12534echo "$as_me:$LINENO: result: buggy" >&5
12535echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012536buggygetaddrinfo=yes
12537fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012538rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012539fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012540else
Martin v. Löwis11437992002-04-12 09:54:03 +000012541 echo "$as_me: failed program was:" >&5
12542cat conftest.$ac_ext >&5
12543
12544echo "$as_me:$LINENO: result: no" >&5
12545echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012546buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012547
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012548fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012549rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012550
12551if test "$buggygetaddrinfo" = "yes"; then
12552 if test "$ipv6" = "yes"; then
12553 echo 'Fatal: You must get working getaddrinfo() function.'
12554 echo ' or you can specify "--disable-ipv6"'.
12555 exit 1
12556 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012557else
Martin v. Löwis11437992002-04-12 09:54:03 +000012558
12559cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012560#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012561_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012562
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012564
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012565for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012566do
Martin v. Löwis11437992002-04-12 09:54:03 +000012567as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12568echo "$as_me:$LINENO: checking for $ac_func" >&5
12569echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12570if eval "test \"\${$as_ac_var+set}\" = set"; then
12571 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012572else
Martin v. Löwis11437992002-04-12 09:54:03 +000012573 cat >conftest.$ac_ext <<_ACEOF
12574#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012575#include "confdefs.h"
12576/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012577 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012578#include <assert.h>
12579/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012580#ifdef __cplusplus
12581extern "C"
12582#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012583/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 builtin and then its argument prototype would still apply. */
12585char $ac_func ();
12586char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012587
Martin v. Löwis11437992002-04-12 09:54:03 +000012588#ifdef F77_DUMMY_MAIN
12589# ifdef __cplusplus
12590 extern "C"
12591# endif
12592 int F77_DUMMY_MAIN() { return 1; }
12593#endif
12594int
12595main ()
12596{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012597/* The GNU C library defines this for functions which it implements
12598 to always fail with ENOSYS. Some functions are actually named
12599 something starting with __ and the normal name is an alias. */
12600#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12601choke me
12602#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012603f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012604#endif
12605
Martin v. Löwis11437992002-04-12 09:54:03 +000012606 ;
12607 return 0;
12608}
12609_ACEOF
12610rm -f conftest.$ac_objext conftest$ac_exeext
12611if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12612 (eval $ac_link) 2>&5
12613 ac_status=$?
12614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12615 (exit $ac_status); } &&
12616 { ac_try='test -s conftest$ac_exeext'
12617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12618 (eval $ac_try) 2>&5
12619 ac_status=$?
12620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12621 (exit $ac_status); }; }; then
12622 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012623else
Martin v. Löwis11437992002-04-12 09:54:03 +000012624 echo "$as_me: failed program was:" >&5
12625cat conftest.$ac_ext >&5
12626eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012628rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012630echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12631echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12632if test `eval echo '${'$as_ac_var'}'` = yes; then
12633 cat >>confdefs.h <<_ACEOF
12634#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12635_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012636
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012637fi
12638done
12639
Michael W. Hudson54241132001-12-07 15:38:26 +000012640
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012641# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012642echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12643echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12644if test "${ac_cv_header_time+set}" = set; then
12645 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012646else
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 cat >conftest.$ac_ext <<_ACEOF
12648#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012649#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012650#include <sys/types.h>
12651#include <sys/time.h>
12652#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012653
12654#ifdef F77_DUMMY_MAIN
12655# ifdef __cplusplus
12656 extern "C"
12657# endif
12658 int F77_DUMMY_MAIN() { return 1; }
12659#endif
12660int
12661main ()
12662{
12663if ((struct tm *) 0)
12664return 0;
12665 ;
12666 return 0;
12667}
12668_ACEOF
12669rm -f conftest.$ac_objext
12670if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12671 (eval $ac_compile) 2>&5
12672 ac_status=$?
12673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12674 (exit $ac_status); } &&
12675 { ac_try='test -s conftest.$ac_objext'
12676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12677 (eval $ac_try) 2>&5
12678 ac_status=$?
12679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12680 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012681 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012682else
Martin v. Löwis11437992002-04-12 09:54:03 +000012683 echo "$as_me: failed program was:" >&5
12684cat conftest.$ac_ext >&5
12685ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012686fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012687rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012688fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012689echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12690echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012691if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012692
12693cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012694#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012695_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012696
12697fi
12698
Martin v. Löwis11437992002-04-12 09:54:03 +000012699echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12700echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12701if test "${ac_cv_struct_tm+set}" = set; then
12702 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012703else
Martin v. Löwis11437992002-04-12 09:54:03 +000012704 cat >conftest.$ac_ext <<_ACEOF
12705#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012706#include "confdefs.h"
12707#include <sys/types.h>
12708#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012709
12710#ifdef F77_DUMMY_MAIN
12711# ifdef __cplusplus
12712 extern "C"
12713# endif
12714 int F77_DUMMY_MAIN() { return 1; }
12715#endif
12716int
12717main ()
12718{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012720 ;
12721 return 0;
12722}
12723_ACEOF
12724rm -f conftest.$ac_objext
12725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12726 (eval $ac_compile) 2>&5
12727 ac_status=$?
12728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12729 (exit $ac_status); } &&
12730 { ac_try='test -s conftest.$ac_objext'
12731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12732 (eval $ac_try) 2>&5
12733 ac_status=$?
12734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12735 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012736 ac_cv_struct_tm=time.h
12737else
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 echo "$as_me: failed program was:" >&5
12739cat conftest.$ac_ext >&5
12740ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012741fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012742rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012743fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012744echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12745echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012746if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012747
12748cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012749#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012750_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012751
12752fi
12753
Martin v. Löwis11437992002-04-12 09:54:03 +000012754echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12755echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12756if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12757 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012758else
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 cat >conftest.$ac_ext <<_ACEOF
12760#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012761#include "confdefs.h"
12762#include <sys/types.h>
12763#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012764
12765
12766#ifdef F77_DUMMY_MAIN
12767# ifdef __cplusplus
12768 extern "C"
12769# endif
12770 int F77_DUMMY_MAIN() { return 1; }
12771#endif
12772int
12773main ()
12774{
12775static struct tm ac_aggr;
12776if (ac_aggr.tm_zone)
12777return 0;
12778 ;
12779 return 0;
12780}
12781_ACEOF
12782rm -f conftest.$ac_objext
12783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12784 (eval $ac_compile) 2>&5
12785 ac_status=$?
12786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12787 (exit $ac_status); } &&
12788 { ac_try='test -s conftest.$ac_objext'
12789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12790 (eval $ac_try) 2>&5
12791 ac_status=$?
12792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12793 (exit $ac_status); }; }; then
12794 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012795else
Martin v. Löwis11437992002-04-12 09:54:03 +000012796 echo "$as_me: failed program was:" >&5
12797cat conftest.$ac_ext >&5
12798ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012799fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012800rm -f conftest.$ac_objext conftest.$ac_ext
12801fi
12802echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12803echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12804if test $ac_cv_member_struct_tm_tm_zone = yes; then
12805
12806cat >>confdefs.h <<_ACEOF
12807#define HAVE_STRUCT_TM_TM_ZONE 1
12808_ACEOF
12809
12810
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012811fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012812
Martin v. Löwis11437992002-04-12 09:54:03 +000012813if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12814
12815cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012816#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012817_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012818
12819else
Martin v. Löwis11437992002-04-12 09:54:03 +000012820 echo "$as_me:$LINENO: checking for tzname" >&5
12821echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12822if test "${ac_cv_var_tzname+set}" = set; then
12823 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012824else
Martin v. Löwis11437992002-04-12 09:54:03 +000012825 cat >conftest.$ac_ext <<_ACEOF
12826#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012827#include "confdefs.h"
12828#include <time.h>
12829#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012830extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012832
12833#ifdef F77_DUMMY_MAIN
12834# ifdef __cplusplus
12835 extern "C"
12836# endif
12837 int F77_DUMMY_MAIN() { return 1; }
12838#endif
12839int
12840main ()
12841{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012842atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012843 ;
12844 return 0;
12845}
12846_ACEOF
12847rm -f conftest.$ac_objext conftest$ac_exeext
12848if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12849 (eval $ac_link) 2>&5
12850 ac_status=$?
12851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12852 (exit $ac_status); } &&
12853 { ac_try='test -s conftest$ac_exeext'
12854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12855 (eval $ac_try) 2>&5
12856 ac_status=$?
12857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12858 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012859 ac_cv_var_tzname=yes
12860else
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 echo "$as_me: failed program was:" >&5
12862cat conftest.$ac_ext >&5
12863ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012864fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012865rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012867echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12868echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012869 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012870
12871cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012872#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012873_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012874
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012875 fi
12876fi
12877
Jack Jansendd19cf82001-12-06 22:36:17 +000012878
Martin v. Löwis11437992002-04-12 09:54:03 +000012879echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12880echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12881if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12882 echo $ECHO_N "(cached) $ECHO_C" >&6
12883else
12884 cat >conftest.$ac_ext <<_ACEOF
12885#line $LINENO "configure"
12886#include "confdefs.h"
12887$ac_includes_default
12888#ifdef F77_DUMMY_MAIN
12889# ifdef __cplusplus
12890 extern "C"
12891# endif
12892 int F77_DUMMY_MAIN() { return 1; }
12893#endif
12894int
12895main ()
12896{
12897static struct stat ac_aggr;
12898if (ac_aggr.st_rdev)
12899return 0;
12900 ;
12901 return 0;
12902}
12903_ACEOF
12904rm -f conftest.$ac_objext
12905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12906 (eval $ac_compile) 2>&5
12907 ac_status=$?
12908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12909 (exit $ac_status); } &&
12910 { ac_try='test -s conftest.$ac_objext'
12911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12912 (eval $ac_try) 2>&5
12913 ac_status=$?
12914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12915 (exit $ac_status); }; }; then
12916 ac_cv_member_struct_stat_st_rdev=yes
12917else
12918 echo "$as_me: failed program was:" >&5
12919cat conftest.$ac_ext >&5
12920ac_cv_member_struct_stat_st_rdev=no
12921fi
12922rm -f conftest.$ac_objext conftest.$ac_ext
12923fi
12924echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12925echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12926if test $ac_cv_member_struct_stat_st_rdev = yes; then
12927
12928cat >>confdefs.h <<_ACEOF
12929#define HAVE_STRUCT_STAT_ST_RDEV 1
12930_ACEOF
12931
12932
12933cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012934#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012935_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012936
12937fi
12938
Martin v. Löwis11437992002-04-12 09:54:03 +000012939
12940
12941echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12942echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12943if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012945else
Martin v. Löwis11437992002-04-12 09:54:03 +000012946 cat >conftest.$ac_ext <<_ACEOF
12947#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012948#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012949$ac_includes_default
12950#ifdef F77_DUMMY_MAIN
12951# ifdef __cplusplus
12952 extern "C"
12953# endif
12954 int F77_DUMMY_MAIN() { return 1; }
12955#endif
12956int
12957main ()
12958{
12959static struct stat ac_aggr;
12960if (ac_aggr.st_blksize)
12961return 0;
12962 ;
12963 return 0;
12964}
12965_ACEOF
12966rm -f conftest.$ac_objext
12967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12968 (eval $ac_compile) 2>&5
12969 ac_status=$?
12970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12971 (exit $ac_status); } &&
12972 { ac_try='test -s conftest.$ac_objext'
12973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12974 (eval $ac_try) 2>&5
12975 ac_status=$?
12976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12977 (exit $ac_status); }; }; then
12978 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012979else
Martin v. Löwis11437992002-04-12 09:54:03 +000012980 echo "$as_me: failed program was:" >&5
12981cat conftest.$ac_ext >&5
12982ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012983fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012984rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012985fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012986echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12987echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12988if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012989
Martin v. Löwis11437992002-04-12 09:54:03 +000012990cat >>confdefs.h <<_ACEOF
12991#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12992_ACEOF
12993
12994
12995cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012996#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012997_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012998
12999fi
13000
Martin v. Löwis11437992002-04-12 09:54:03 +000013001
13002echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13003echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13004if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013006else
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 cat >conftest.$ac_ext <<_ACEOF
13008#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013009#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013010$ac_includes_default
13011#ifdef F77_DUMMY_MAIN
13012# ifdef __cplusplus
13013 extern "C"
13014# endif
13015 int F77_DUMMY_MAIN() { return 1; }
13016#endif
13017int
13018main ()
13019{
13020static struct stat ac_aggr;
13021if (ac_aggr.st_blocks)
13022return 0;
13023 ;
13024 return 0;
13025}
13026_ACEOF
13027rm -f conftest.$ac_objext
13028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13029 (eval $ac_compile) 2>&5
13030 ac_status=$?
13031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13032 (exit $ac_status); } &&
13033 { ac_try='test -s conftest.$ac_objext'
13034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13035 (eval $ac_try) 2>&5
13036 ac_status=$?
13037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13038 (exit $ac_status); }; }; then
13039 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013040else
Martin v. Löwis11437992002-04-12 09:54:03 +000013041 echo "$as_me: failed program was:" >&5
13042cat conftest.$ac_ext >&5
13043ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013045rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013046fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013047echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13048echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13049if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013050
Martin v. Löwis11437992002-04-12 09:54:03 +000013051cat >>confdefs.h <<_ACEOF
13052#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13053_ACEOF
13054
13055
13056cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013057#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013058_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013059
13060else
Martin v. Löwis11437992002-04-12 09:54:03 +000013061 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013062fi
13063
Michael W. Hudson54241132001-12-07 15:38:26 +000013064
Martin v. Löwis11437992002-04-12 09:54:03 +000013065
13066echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13067echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13068if test "${ac_cv_header_time_altzone+set}" = set; then
13069 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013070else
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 cat >conftest.$ac_ext <<_ACEOF
13072#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013073#include "confdefs.h"
13074#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013075#ifdef F77_DUMMY_MAIN
13076# ifdef __cplusplus
13077 extern "C"
13078# endif
13079 int F77_DUMMY_MAIN() { return 1; }
13080#endif
13081int
13082main ()
13083{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013084return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013085 ;
13086 return 0;
13087}
13088_ACEOF
13089rm -f conftest.$ac_objext
13090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13091 (eval $ac_compile) 2>&5
13092 ac_status=$?
13093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13094 (exit $ac_status); } &&
13095 { ac_try='test -s conftest.$ac_objext'
13096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13097 (eval $ac_try) 2>&5
13098 ac_status=$?
13099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13100 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013101 ac_cv_header_time_altzone=yes
13102else
Martin v. Löwis11437992002-04-12 09:54:03 +000013103 echo "$as_me: failed program was:" >&5
13104cat conftest.$ac_ext >&5
13105ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013106fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013107rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013108fi
13109
Martin v. Löwis11437992002-04-12 09:54:03 +000013110echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13111echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013112if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013113
13114cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013115#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013116_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013117
13118fi
13119
Guido van Rossumda88dad1995-01-26 00:46:29 +000013120was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013121echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13122echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13123cat >conftest.$ac_ext <<_ACEOF
13124#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013125#include "confdefs.h"
13126
13127#include <sys/types.h>
13128#include <sys/select.h>
13129#include <sys/time.h>
13130
Martin v. Löwis11437992002-04-12 09:54:03 +000013131#ifdef F77_DUMMY_MAIN
13132# ifdef __cplusplus
13133 extern "C"
13134# endif
13135 int F77_DUMMY_MAIN() { return 1; }
13136#endif
13137int
13138main ()
13139{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013140;
Martin v. Löwis11437992002-04-12 09:54:03 +000013141 ;
13142 return 0;
13143}
13144_ACEOF
13145rm -f conftest.$ac_objext
13146if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13147 (eval $ac_compile) 2>&5
13148 ac_status=$?
13149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13150 (exit $ac_status); } &&
13151 { ac_try='test -s conftest.$ac_objext'
13152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13153 (eval $ac_try) 2>&5
13154 ac_status=$?
13155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13156 (exit $ac_status); }; }; then
13157
13158
13159cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013160#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013161_ACEOF
13162
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013163 was_it_defined=yes
13164
Guido van Rossumf78abae1997-01-21 22:02:36 +000013165else
Martin v. Löwis11437992002-04-12 09:54:03 +000013166 echo "$as_me: failed program was:" >&5
13167cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013168fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013169rm -f conftest.$ac_objext conftest.$ac_ext
13170echo "$as_me:$LINENO: result: $was_it_defined" >&5
13171echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013172
Martin v. Löwis11437992002-04-12 09:54:03 +000013173echo "$as_me:$LINENO: checking for addrinfo" >&5
13174echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13175if test "${ac_cv_struct_addrinfo+set}" = set; then
13176 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013177else
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 cat >conftest.$ac_ext <<_ACEOF
13179#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013180#include "confdefs.h"
13181
13182# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013183#ifdef F77_DUMMY_MAIN
13184# ifdef __cplusplus
13185 extern "C"
13186# endif
13187 int F77_DUMMY_MAIN() { return 1; }
13188#endif
13189int
13190main ()
13191{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013192struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013193 ;
13194 return 0;
13195}
13196_ACEOF
13197rm -f conftest.$ac_objext
13198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13199 (eval $ac_compile) 2>&5
13200 ac_status=$?
13201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13202 (exit $ac_status); } &&
13203 { ac_try='test -s conftest.$ac_objext'
13204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13205 (eval $ac_try) 2>&5
13206 ac_status=$?
13207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13208 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013209 ac_cv_struct_addrinfo=yes
13210else
Martin v. Löwis11437992002-04-12 09:54:03 +000013211 echo "$as_me: failed program was:" >&5
13212cat conftest.$ac_ext >&5
13213ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013214fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013215rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013216fi
13217
Martin v. Löwis11437992002-04-12 09:54:03 +000013218echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13219echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013220if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013221
13222cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013223#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013224_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013225
13226fi
13227
Martin v. Löwis11437992002-04-12 09:54:03 +000013228echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13229echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13230if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13231 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013232else
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 cat >conftest.$ac_ext <<_ACEOF
13234#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013235#include "confdefs.h"
13236
13237# include <sys/types.h>
13238# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013239#ifdef F77_DUMMY_MAIN
13240# ifdef __cplusplus
13241 extern "C"
13242# endif
13243 int F77_DUMMY_MAIN() { return 1; }
13244#endif
13245int
13246main ()
13247{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013248struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013249 ;
13250 return 0;
13251}
13252_ACEOF
13253rm -f conftest.$ac_objext
13254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13255 (eval $ac_compile) 2>&5
13256 ac_status=$?
13257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13258 (exit $ac_status); } &&
13259 { ac_try='test -s conftest.$ac_objext'
13260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13261 (eval $ac_try) 2>&5
13262 ac_status=$?
13263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13264 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013265 ac_cv_struct_sockaddr_storage=yes
13266else
Martin v. Löwis11437992002-04-12 09:54:03 +000013267 echo "$as_me: failed program was:" >&5
13268cat conftest.$ac_ext >&5
13269ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013271rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013272fi
13273
Martin v. Löwis11437992002-04-12 09:54:03 +000013274echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13275echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013276if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013277
13278cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013279#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013280_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013281
13282fi
13283
Guido van Rossum627b2d71993-12-24 10:39:16 +000013284# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013285
Michael W. Hudson54241132001-12-07 15:38:26 +000013286
Martin v. Löwis11437992002-04-12 09:54:03 +000013287echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13288echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13289if test "${ac_cv_c_char_unsigned+set}" = set; then
13290 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013291else
Martin v. Löwis11437992002-04-12 09:54:03 +000013292 cat >conftest.$ac_ext <<_ACEOF
13293#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013294#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013295$ac_includes_default
13296#ifdef F77_DUMMY_MAIN
13297# ifdef __cplusplus
13298 extern "C"
13299# endif
13300 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013302int
13303main ()
13304{
13305static int test_array [1 - 2 * !(((char) -1) < 0)];
13306test_array [0] = 0
13307
13308 ;
13309 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013310}
Martin v. Löwis11437992002-04-12 09:54:03 +000013311_ACEOF
13312rm -f conftest.$ac_objext
13313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13314 (eval $ac_compile) 2>&5
13315 ac_status=$?
13316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13317 (exit $ac_status); } &&
13318 { ac_try='test -s conftest.$ac_objext'
13319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13320 (eval $ac_try) 2>&5
13321 ac_status=$?
13322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13323 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013324 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013325else
13326 echo "$as_me: failed program was:" >&5
13327cat conftest.$ac_ext >&5
13328ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013330rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013331fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013332echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13333echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013334if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013336#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013337_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338
13339fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013340
Martin v. Löwis11437992002-04-12 09:54:03 +000013341echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13342echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13343if test "${ac_cv_prog_cc_stdc+set}" = set; then
13344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013345else
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 ac_cv_prog_cc_stdc=no
13347ac_save_CC=$CC
13348cat >conftest.$ac_ext <<_ACEOF
13349#line $LINENO "configure"
13350#include "confdefs.h"
13351#include <stdarg.h>
13352#include <stdio.h>
13353#include <sys/types.h>
13354#include <sys/stat.h>
13355/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13356struct buf { int x; };
13357FILE * (*rcsopen) (struct buf *, struct stat *, int);
13358static char *e (p, i)
13359 char **p;
13360 int i;
13361{
13362 return p[i];
13363}
13364static char *f (char * (*g) (char **, int), char **p, ...)
13365{
13366 char *s;
13367 va_list v;
13368 va_start (v,p);
13369 s = g (p, va_arg (v,int));
13370 va_end (v);
13371 return s;
13372}
13373int test (int i, double x);
13374struct s1 {int (*f) (int a);};
13375struct s2 {int (*f) (double a);};
13376int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13377int argc;
13378char **argv;
13379#ifdef F77_DUMMY_MAIN
13380# ifdef __cplusplus
13381 extern "C"
13382# endif
13383 int F77_DUMMY_MAIN() { return 1; }
13384#endif
13385int
13386main ()
13387{
13388return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13389 ;
13390 return 0;
13391}
13392_ACEOF
13393# Don't try gcc -ansi; that turns off useful extensions and
13394# breaks some systems' header files.
13395# AIX -qlanglvl=ansi
13396# Ultrix and OSF/1 -std1
13397# HP-UX 10.20 and later -Ae
13398# HP-UX older versions -Aa -D_HPUX_SOURCE
13399# SVR4 -Xc -D__EXTENSIONS__
13400for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13401do
13402 CC="$ac_save_CC $ac_arg"
13403 rm -f conftest.$ac_objext
13404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13405 (eval $ac_compile) 2>&5
13406 ac_status=$?
13407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13408 (exit $ac_status); } &&
13409 { ac_try='test -s conftest.$ac_objext'
13410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13411 (eval $ac_try) 2>&5
13412 ac_status=$?
13413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13414 (exit $ac_status); }; }; then
13415 ac_cv_prog_cc_stdc=$ac_arg
13416break
13417else
13418 echo "$as_me: failed program was:" >&5
13419cat conftest.$ac_ext >&5
13420fi
13421rm -f conftest.$ac_objext
13422done
13423rm -f conftest.$ac_ext conftest.$ac_objext
13424CC=$ac_save_CC
13425
13426fi
13427
13428case "x$ac_cv_prog_cc_stdc" in
13429 x|xno)
13430 echo "$as_me:$LINENO: result: none needed" >&5
13431echo "${ECHO_T}none needed" >&6 ;;
13432 *)
13433 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13434echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13435 CC="$CC $ac_cv_prog_cc_stdc" ;;
13436esac
13437
13438echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13439echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13440if test "${ac_cv_c_const+set}" = set; then
13441 echo $ECHO_N "(cached) $ECHO_C" >&6
13442else
13443 cat >conftest.$ac_ext <<_ACEOF
13444#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013445#include "confdefs.h"
13446
Martin v. Löwis11437992002-04-12 09:54:03 +000013447#ifdef F77_DUMMY_MAIN
13448# ifdef __cplusplus
13449 extern "C"
13450# endif
13451 int F77_DUMMY_MAIN() { return 1; }
13452#endif
13453int
13454main ()
13455{
13456/* FIXME: Include the comments suggested by Paul. */
13457#ifndef __cplusplus
13458 /* Ultrix mips cc rejects this. */
13459 typedef int charset[2];
13460 const charset x;
13461 /* SunOS 4.1.1 cc rejects this. */
13462 char const *const *ccp;
13463 char **p;
13464 /* NEC SVR4.0.2 mips cc rejects this. */
13465 struct point {int x, y;};
13466 static struct point const zero = {0,0};
13467 /* AIX XL C 1.02.0.0 rejects this.
13468 It does not let you subtract one const X* pointer from another in
13469 an arm of an if-expression whose if-part is not a constant
13470 expression */
13471 const char *g = "string";
13472 ccp = &g + (g ? g-g : 0);
13473 /* HPUX 7.0 cc rejects these. */
13474 ++ccp;
13475 p = (char**) ccp;
13476 ccp = (char const *const *) p;
13477 { /* SCO 3.2v4 cc rejects this. */
13478 char *t;
13479 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013480
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 *t++ = 0;
13482 }
13483 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13484 int x[] = {25, 17};
13485 const int *foo = &x[0];
13486 ++foo;
13487 }
13488 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13489 typedef const int *iptr;
13490 iptr p = 0;
13491 ++p;
13492 }
13493 { /* AIX XL C 1.02.0.0 rejects this saying
13494 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13495 struct s { int j; const int *ap[3]; };
13496 struct s *b; b->j = 5;
13497 }
13498 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13499 const int foo = 10;
13500 }
13501#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013502
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 ;
13504 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013505}
Martin v. Löwis11437992002-04-12 09:54:03 +000013506_ACEOF
13507rm -f conftest.$ac_objext
13508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13509 (eval $ac_compile) 2>&5
13510 ac_status=$?
13511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13512 (exit $ac_status); } &&
13513 { ac_try='test -s conftest.$ac_objext'
13514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13515 (eval $ac_try) 2>&5
13516 ac_status=$?
13517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13518 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013519 ac_cv_c_const=yes
13520else
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 echo "$as_me: failed program was:" >&5
13522cat conftest.$ac_ext >&5
13523ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013525rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013526fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013527echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13528echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013529if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013530
13531cat >>confdefs.h <<\_ACEOF
13532#define const
13533_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013534
13535fi
13536
Michael W. Hudson54241132001-12-07 15:38:26 +000013537
Guido van Rossumda88dad1995-01-26 00:46:29 +000013538works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013539echo "$as_me:$LINENO: checking for working volatile" >&5
13540echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13541cat >conftest.$ac_ext <<_ACEOF
13542#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013543#include "confdefs.h"
13544
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 +000013554volatile int x; x = 0;
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
Guido van Rossumda88dad1995-01-26 00:46:29 +000013571 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013572else
Martin v. Löwis11437992002-04-12 09:54:03 +000013573 echo "$as_me: failed program was:" >&5
13574cat conftest.$ac_ext >&5
13575
13576cat >>confdefs.h <<\_ACEOF
13577#define volatile
13578_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013579
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013580
Guido van Rossum627b2d71993-12-24 10:39:16 +000013581fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013582rm -f conftest.$ac_objext conftest.$ac_ext
13583echo "$as_me:$LINENO: result: $works" >&5
13584echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013585
Guido van Rossumda88dad1995-01-26 00:46:29 +000013586works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013587echo "$as_me:$LINENO: checking for working signed char" >&5
13588echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13589cat >conftest.$ac_ext <<_ACEOF
13590#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013591#include "confdefs.h"
13592
Martin v. Löwis11437992002-04-12 09:54:03 +000013593#ifdef F77_DUMMY_MAIN
13594# ifdef __cplusplus
13595 extern "C"
13596# endif
13597 int F77_DUMMY_MAIN() { return 1; }
13598#endif
13599int
13600main ()
13601{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013602signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013603 ;
13604 return 0;
13605}
13606_ACEOF
13607rm -f conftest.$ac_objext
13608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13609 (eval $ac_compile) 2>&5
13610 ac_status=$?
13611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13612 (exit $ac_status); } &&
13613 { ac_try='test -s conftest.$ac_objext'
13614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13615 (eval $ac_try) 2>&5
13616 ac_status=$?
13617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13618 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013619 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013620else
Martin v. Löwis11437992002-04-12 09:54:03 +000013621 echo "$as_me: failed program was:" >&5
13622cat conftest.$ac_ext >&5
13623
13624cat >>confdefs.h <<\_ACEOF
13625#define signed
13626_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013627
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013628
Guido van Rossum7f43da71994-08-01 12:15:30 +000013629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013630rm -f conftest.$ac_objext conftest.$ac_ext
13631echo "$as_me:$LINENO: result: $works" >&5
13632echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013633
Guido van Rossumda88dad1995-01-26 00:46:29 +000013634have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013635echo "$as_me:$LINENO: checking for prototypes" >&5
13636echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13637cat >conftest.$ac_ext <<_ACEOF
13638#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013639#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013640int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013641#ifdef F77_DUMMY_MAIN
13642# ifdef __cplusplus
13643 extern "C"
13644# endif
13645 int F77_DUMMY_MAIN() { return 1; }
13646#endif
13647int
13648main ()
13649{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013650return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013651 ;
13652 return 0;
13653}
13654_ACEOF
13655rm -f conftest.$ac_objext
13656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13657 (eval $ac_compile) 2>&5
13658 ac_status=$?
13659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13660 (exit $ac_status); } &&
13661 { ac_try='test -s conftest.$ac_objext'
13662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13663 (eval $ac_try) 2>&5
13664 ac_status=$?
13665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13666 (exit $ac_status); }; }; then
13667
13668
13669cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013670#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013671_ACEOF
13672
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013673 have_prototypes=yes
13674
Guido van Rossumf78abae1997-01-21 22:02:36 +000013675else
Martin v. Löwis11437992002-04-12 09:54:03 +000013676 echo "$as_me: failed program was:" >&5
13677cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013678fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013679rm -f conftest.$ac_objext conftest.$ac_ext
13680echo "$as_me:$LINENO: result: $have_prototypes" >&5
13681echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013682
Guido van Rossumda88dad1995-01-26 00:46:29 +000013683works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013684echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13685echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13686cat >conftest.$ac_ext <<_ACEOF
13687#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013688#include "confdefs.h"
13689
13690#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013691int foo(int x, ...) {
13692 va_list va;
13693 va_start(va, x);
13694 va_arg(va, int);
13695 va_arg(va, char *);
13696 va_arg(va, double);
13697 return 0;
13698}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013699
Martin v. Löwis11437992002-04-12 09:54:03 +000013700#ifdef F77_DUMMY_MAIN
13701# ifdef __cplusplus
13702 extern "C"
13703# endif
13704 int F77_DUMMY_MAIN() { return 1; }
13705#endif
13706int
13707main ()
13708{
Guido van Rossum90eea071996-08-30 20:58:57 +000013709return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013710 ;
13711 return 0;
13712}
13713_ACEOF
13714rm -f conftest.$ac_objext
13715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13716 (eval $ac_compile) 2>&5
13717 ac_status=$?
13718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13719 (exit $ac_status); } &&
13720 { ac_try='test -s conftest.$ac_objext'
13721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13722 (eval $ac_try) 2>&5
13723 ac_status=$?
13724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13725 (exit $ac_status); }; }; then
13726
13727
13728cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013729#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013730_ACEOF
13731
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013732 works=yes
13733
Guido van Rossumf78abae1997-01-21 22:02:36 +000013734else
Martin v. Löwis11437992002-04-12 09:54:03 +000013735 echo "$as_me: failed program was:" >&5
13736cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013737fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013738rm -f conftest.$ac_objext conftest.$ac_ext
13739echo "$as_me:$LINENO: result: $works" >&5
13740echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013741
Guido van Rossumda88dad1995-01-26 00:46:29 +000013742if test "$have_prototypes" = yes; then
13743bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013744echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13745echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13746cat >conftest.$ac_ext <<_ACEOF
13747#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013748#include "confdefs.h"
13749#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013750#ifdef F77_DUMMY_MAIN
13751# ifdef __cplusplus
13752 extern "C"
13753# endif
13754 int F77_DUMMY_MAIN() { return 1; }
13755#endif
13756int
13757main ()
13758{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013759char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 ;
13761 return 0;
13762}
13763_ACEOF
13764rm -f conftest.$ac_objext
13765if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13766 (eval $ac_compile) 2>&5
13767 ac_status=$?
13768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13769 (exit $ac_status); } &&
13770 { ac_try='test -s conftest.$ac_objext'
13771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13772 (eval $ac_try) 2>&5
13773 ac_status=$?
13774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13775 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013776 :
13777else
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 echo "$as_me: failed program was:" >&5
13779cat conftest.$ac_ext >&5
13780
13781cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013783_ACEOF
13784
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013785 bad_prototypes=yes
13786
Guido van Rossum627b2d71993-12-24 10:39:16 +000013787fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013788rm -f conftest.$ac_objext conftest.$ac_ext
13789echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13790echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013791fi
13792
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013793# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013794echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13795echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13796cat >conftest.$ac_ext <<_ACEOF
13797#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013798#include "confdefs.h"
13799#include <sys/types.h>
13800#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013801#ifdef F77_DUMMY_MAIN
13802# ifdef __cplusplus
13803 extern "C"
13804# endif
13805 int F77_DUMMY_MAIN() { return 1; }
13806#endif
13807int
13808main ()
13809{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013810struct sockaddr x;
13811x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013812 ;
13813 return 0;
13814}
13815_ACEOF
13816rm -f conftest.$ac_objext
13817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13818 (eval $ac_compile) 2>&5
13819 ac_status=$?
13820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13821 (exit $ac_status); } &&
13822 { ac_try='test -s conftest.$ac_objext'
13823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13824 (eval $ac_try) 2>&5
13825 ac_status=$?
13826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13827 (exit $ac_status); }; }; then
13828 echo "$as_me:$LINENO: result: yes" >&5
13829echo "${ECHO_T}yes" >&6
13830
13831cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013832#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013833_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013834
13835else
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 echo "$as_me: failed program was:" >&5
13837cat conftest.$ac_ext >&5
13838echo "$as_me:$LINENO: result: no" >&5
13839echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013840fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013841rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013842
Guido van Rossumda88dad1995-01-26 00:46:29 +000013843va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013844echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13845echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13846cat >conftest.$ac_ext <<_ACEOF
13847#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013848#include "confdefs.h"
13849
13850#ifdef HAVE_STDARG_PROTOTYPES
13851#include <stdarg.h>
13852#else
13853#include <varargs.h>
13854#endif
13855
Martin v. Löwis11437992002-04-12 09:54:03 +000013856#ifdef F77_DUMMY_MAIN
13857# ifdef __cplusplus
13858 extern "C"
13859# endif
13860 int F77_DUMMY_MAIN() { return 1; }
13861#endif
13862int
13863main ()
13864{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013865va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013866 ;
13867 return 0;
13868}
13869_ACEOF
13870rm -f conftest.$ac_objext
13871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13872 (eval $ac_compile) 2>&5
13873 ac_status=$?
13874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13875 (exit $ac_status); } &&
13876 { ac_try='test -s conftest.$ac_objext'
13877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13878 (eval $ac_try) 2>&5
13879 ac_status=$?
13880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13881 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013882 :
13883else
Martin v. Löwis11437992002-04-12 09:54:03 +000013884 echo "$as_me: failed program was:" >&5
13885cat conftest.$ac_ext >&5
13886
13887
13888cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013889#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013890_ACEOF
13891
Guido van Rossumda88dad1995-01-26 00:46:29 +000013892 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013893
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013894fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013895rm -f conftest.$ac_objext conftest.$ac_ext
13896echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13897echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013898
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013899# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013900
13901
13902
13903echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13904echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13905if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13906 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013907else
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 cat >conftest.$ac_ext <<_ACEOF
13909#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013910#include "confdefs.h"
13911/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013913#include <assert.h>
13914/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013915#ifdef __cplusplus
13916extern "C"
13917#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013918/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 builtin and then its argument prototype would still apply. */
13920char gethostbyname_r ();
13921char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013922
Martin v. Löwis11437992002-04-12 09:54:03 +000013923#ifdef F77_DUMMY_MAIN
13924# ifdef __cplusplus
13925 extern "C"
13926# endif
13927 int F77_DUMMY_MAIN() { return 1; }
13928#endif
13929int
13930main ()
13931{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013932/* The GNU C library defines this for functions which it implements
13933 to always fail with ENOSYS. Some functions are actually named
13934 something starting with __ and the normal name is an alias. */
13935#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13936choke me
13937#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013938f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013939#endif
13940
Martin v. Löwis11437992002-04-12 09:54:03 +000013941 ;
13942 return 0;
13943}
13944_ACEOF
13945rm -f conftest.$ac_objext conftest$ac_exeext
13946if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13947 (eval $ac_link) 2>&5
13948 ac_status=$?
13949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13950 (exit $ac_status); } &&
13951 { ac_try='test -s conftest$ac_exeext'
13952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13953 (eval $ac_try) 2>&5
13954 ac_status=$?
13955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13956 (exit $ac_status); }; }; then
13957 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013958else
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 echo "$as_me: failed program was:" >&5
13960cat conftest.$ac_ext >&5
13961ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013962fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013963rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013964fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013965echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13966echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13967if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013968
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013970#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013971_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013972
Martin v. Löwis11437992002-04-12 09:54:03 +000013973 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13974echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013975 OLD_CFLAGS=$CFLAGS
13976 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013977 cat >conftest.$ac_ext <<_ACEOF
13978#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013979#include "confdefs.h"
13980
13981# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013982
13983#ifdef F77_DUMMY_MAIN
13984# ifdef __cplusplus
13985 extern "C"
13986# endif
13987 int F77_DUMMY_MAIN() { return 1; }
13988#endif
13989int
13990main ()
13991{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013992
13993 char *name;
13994 struct hostent *he, *res;
13995 char buffer[2048];
13996 int buflen = 2048;
13997 int h_errnop;
13998
13999 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014000
14001 ;
14002 return 0;
14003}
14004_ACEOF
14005rm -f conftest.$ac_objext
14006if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14007 (eval $ac_compile) 2>&5
14008 ac_status=$?
14009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14010 (exit $ac_status); } &&
14011 { ac_try='test -s conftest.$ac_objext'
14012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14013 (eval $ac_try) 2>&5
14014 ac_status=$?
14015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14016 (exit $ac_status); }; }; then
14017
14018 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014019#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014020_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
14023cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014024#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014025_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014026
Martin v. Löwis11437992002-04-12 09:54:03 +000014027 echo "$as_me:$LINENO: result: yes" >&5
14028echo "${ECHO_T}yes" >&6
14029
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014030else
Martin v. Löwis11437992002-04-12 09:54:03 +000014031 echo "$as_me: failed program was:" >&5
14032cat conftest.$ac_ext >&5
14033
14034 echo "$as_me:$LINENO: result: no" >&5
14035echo "${ECHO_T}no" >&6
14036 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14037echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14038 cat >conftest.$ac_ext <<_ACEOF
14039#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014040#include "confdefs.h"
14041
14042# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014043
14044#ifdef F77_DUMMY_MAIN
14045# ifdef __cplusplus
14046 extern "C"
14047# endif
14048 int F77_DUMMY_MAIN() { return 1; }
14049#endif
14050int
14051main ()
14052{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014053
14054 char *name;
14055 struct hostent *he;
14056 char buffer[2048];
14057 int buflen = 2048;
14058 int h_errnop;
14059
14060 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014061
14062 ;
14063 return 0;
14064}
14065_ACEOF
14066rm -f conftest.$ac_objext
14067if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14068 (eval $ac_compile) 2>&5
14069 ac_status=$?
14070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14071 (exit $ac_status); } &&
14072 { ac_try='test -s conftest.$ac_objext'
14073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14074 (eval $ac_try) 2>&5
14075 ac_status=$?
14076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14077 (exit $ac_status); }; }; then
14078
14079 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014080#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014081_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014082
Martin v. Löwis11437992002-04-12 09:54:03 +000014083
14084cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014085#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014086_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014087
Martin v. Löwis11437992002-04-12 09:54:03 +000014088 echo "$as_me:$LINENO: result: yes" >&5
14089echo "${ECHO_T}yes" >&6
14090
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014091else
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 echo "$as_me: failed program was:" >&5
14093cat conftest.$ac_ext >&5
14094
14095 echo "$as_me:$LINENO: result: no" >&5
14096echo "${ECHO_T}no" >&6
14097 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14098echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14099 cat >conftest.$ac_ext <<_ACEOF
14100#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014101#include "confdefs.h"
14102
14103# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
14105#ifdef F77_DUMMY_MAIN
14106# ifdef __cplusplus
14107 extern "C"
14108# endif
14109 int F77_DUMMY_MAIN() { return 1; }
14110#endif
14111int
14112main ()
14113{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014114
14115 char *name;
14116 struct hostent *he;
14117 struct hostent_data data;
14118
14119 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014120
14121 ;
14122 return 0;
14123}
14124_ACEOF
14125rm -f conftest.$ac_objext
14126if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14127 (eval $ac_compile) 2>&5
14128 ac_status=$?
14129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14130 (exit $ac_status); } &&
14131 { ac_try='test -s conftest.$ac_objext'
14132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14133 (eval $ac_try) 2>&5
14134 ac_status=$?
14135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14136 (exit $ac_status); }; }; then
14137
14138 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014139#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014140_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014141
Martin v. Löwis11437992002-04-12 09:54:03 +000014142
14143cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014144#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014145_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014146
Martin v. Löwis11437992002-04-12 09:54:03 +000014147 echo "$as_me:$LINENO: result: yes" >&5
14148echo "${ECHO_T}yes" >&6
14149
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014150else
Martin v. Löwis11437992002-04-12 09:54:03 +000014151 echo "$as_me: failed program was:" >&5
14152cat conftest.$ac_ext >&5
14153
14154 echo "$as_me:$LINENO: result: no" >&5
14155echo "${ECHO_T}no" >&6
14156
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014157fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014158rm -f conftest.$ac_objext conftest.$ac_ext
14159
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014160fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014161rm -f conftest.$ac_objext conftest.$ac_ext
14162
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014164rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014165 CFLAGS=$OLD_CFLAGS
14166
14167else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014168
Martin v. Löwis11437992002-04-12 09:54:03 +000014169
14170for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014171do
Martin v. Löwis11437992002-04-12 09:54:03 +000014172as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14173echo "$as_me:$LINENO: checking for $ac_func" >&5
14174echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14175if eval "test \"\${$as_ac_var+set}\" = set"; then
14176 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014177else
Martin v. Löwis11437992002-04-12 09:54:03 +000014178 cat >conftest.$ac_ext <<_ACEOF
14179#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014180#include "confdefs.h"
14181/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014182 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014183#include <assert.h>
14184/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014185#ifdef __cplusplus
14186extern "C"
14187#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014188/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014189 builtin and then its argument prototype would still apply. */
14190char $ac_func ();
14191char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014192
Martin v. Löwis11437992002-04-12 09:54:03 +000014193#ifdef F77_DUMMY_MAIN
14194# ifdef __cplusplus
14195 extern "C"
14196# endif
14197 int F77_DUMMY_MAIN() { return 1; }
14198#endif
14199int
14200main ()
14201{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014202/* The GNU C library defines this for functions which it implements
14203 to always fail with ENOSYS. Some functions are actually named
14204 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014205#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014206choke me
14207#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014208f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014209#endif
14210
Martin v. Löwis11437992002-04-12 09:54:03 +000014211 ;
14212 return 0;
14213}
14214_ACEOF
14215rm -f conftest.$ac_objext conftest$ac_exeext
14216if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14217 (eval $ac_link) 2>&5
14218 ac_status=$?
14219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14220 (exit $ac_status); } &&
14221 { ac_try='test -s conftest$ac_exeext'
14222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14223 (eval $ac_try) 2>&5
14224 ac_status=$?
14225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14226 (exit $ac_status); }; }; then
14227 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014228else
Martin v. Löwis11437992002-04-12 09:54:03 +000014229 echo "$as_me: failed program was:" >&5
14230cat conftest.$ac_ext >&5
14231eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014232fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014233rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014234fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014235echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14236echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14237if test `eval echo '${'$as_ac_var'}'` = yes; then
14238 cat >>confdefs.h <<_ACEOF
14239#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14240_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014241
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014242fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014243done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014244
Michael W. Hudson54241132001-12-07 15:38:26 +000014245
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014246fi
14247
Michael W. Hudson54241132001-12-07 15:38:26 +000014248
14249
14250
14251
14252
14253
Guido van Rossum627b2d71993-12-24 10:39:16 +000014254# checks for system services
14255# (none yet)
14256
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014257# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014258echo "$as_me:$LINENO: checking for __fpu_control" >&5
14259echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14260if test "${ac_cv_func___fpu_control+set}" = set; then
14261 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014262else
Martin v. Löwis11437992002-04-12 09:54:03 +000014263 cat >conftest.$ac_ext <<_ACEOF
14264#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014265#include "confdefs.h"
14266/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014267 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014268#include <assert.h>
14269/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014270#ifdef __cplusplus
14271extern "C"
14272#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014273/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014274 builtin and then its argument prototype would still apply. */
14275char __fpu_control ();
14276char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014277
Martin v. Löwis11437992002-04-12 09:54:03 +000014278#ifdef F77_DUMMY_MAIN
14279# ifdef __cplusplus
14280 extern "C"
14281# endif
14282 int F77_DUMMY_MAIN() { return 1; }
14283#endif
14284int
14285main ()
14286{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014287/* The GNU C library defines this for functions which it implements
14288 to always fail with ENOSYS. Some functions are actually named
14289 something starting with __ and the normal name is an alias. */
14290#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14291choke me
14292#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014293f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014294#endif
14295
Martin v. Löwis11437992002-04-12 09:54:03 +000014296 ;
14297 return 0;
14298}
14299_ACEOF
14300rm -f conftest.$ac_objext conftest$ac_exeext
14301if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14302 (eval $ac_link) 2>&5
14303 ac_status=$?
14304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14305 (exit $ac_status); } &&
14306 { ac_try='test -s conftest$ac_exeext'
14307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14308 (eval $ac_try) 2>&5
14309 ac_status=$?
14310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14311 (exit $ac_status); }; }; then
14312 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014313else
Martin v. Löwis11437992002-04-12 09:54:03 +000014314 echo "$as_me: failed program was:" >&5
14315cat conftest.$ac_ext >&5
14316ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014317fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014318rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014319fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014320echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14321echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14322if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014323 :
14324else
Martin v. Löwis11437992002-04-12 09:54:03 +000014325
14326echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14327echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14328if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14329 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014330else
Martin v. Löwis11437992002-04-12 09:54:03 +000014331 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014332LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014333cat >conftest.$ac_ext <<_ACEOF
14334#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014335#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014336
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014337/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014338#ifdef __cplusplus
14339extern "C"
14340#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014341/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014342 builtin and then its argument prototype would still apply. */
14343char __fpu_control ();
14344#ifdef F77_DUMMY_MAIN
14345# ifdef __cplusplus
14346 extern "C"
14347# endif
14348 int F77_DUMMY_MAIN() { return 1; }
14349#endif
14350int
14351main ()
14352{
14353__fpu_control ();
14354 ;
14355 return 0;
14356}
14357_ACEOF
14358rm -f conftest.$ac_objext conftest$ac_exeext
14359if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14360 (eval $ac_link) 2>&5
14361 ac_status=$?
14362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14363 (exit $ac_status); } &&
14364 { ac_try='test -s conftest$ac_exeext'
14365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14366 (eval $ac_try) 2>&5
14367 ac_status=$?
14368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14369 (exit $ac_status); }; }; then
14370 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014371else
Martin v. Löwis11437992002-04-12 09:54:03 +000014372 echo "$as_me: failed program was:" >&5
14373cat conftest.$ac_ext >&5
14374ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014375fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014376rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14377LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014378fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014379echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14380echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14381if test $ac_cv_lib_ieee___fpu_control = yes; then
14382 cat >>confdefs.h <<_ACEOF
14383#define HAVE_LIBIEEE 1
14384_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014385
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014386 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014387
Guido van Rossum627b2d71993-12-24 10:39:16 +000014388fi
14389
Michael W. Hudson54241132001-12-07 15:38:26 +000014390
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014391fi
14392
Michael W. Hudson54241132001-12-07 15:38:26 +000014393
Guido van Rossum7f253911997-05-09 02:42:48 +000014394# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014395echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14396echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14397
Guido van Rossum7f253911997-05-09 02:42:48 +000014398# Check whether --with-fpectl or --without-fpectl was given.
14399if test "${with_fpectl+set}" = set; then
14400 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014401
Guido van Rossum7f253911997-05-09 02:42:48 +000014402if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014403then
14404
14405cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014406#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014407_ACEOF
14408
14409 echo "$as_me:$LINENO: result: yes" >&5
14410echo "${ECHO_T}yes" >&6
14411else echo "$as_me:$LINENO: result: no" >&5
14412echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014413fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014414else
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 echo "$as_me:$LINENO: result: no" >&5
14416echo "${ECHO_T}no" >&6
14417fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014418
Guido van Rossum7f43da71994-08-01 12:15:30 +000014419# check for --with-libm=...
14420
Guido van Rossum563e7081996-09-10 18:20:48 +000014421case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014422Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014423BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014424*) LIBM=-lm
14425esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014426echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14427echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14428
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014429# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014430if test "${with_libm+set}" = set; then
14431 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014432
Guido van Rossum7f253911997-05-09 02:42:48 +000014433if test "$withval" = no
14434then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14436echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014437elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014438then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014439 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14440echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14441else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14442echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14443 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014444fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014445else
Martin v. Löwis11437992002-04-12 09:54:03 +000014446 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14447echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14448fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014449
14450# check for --with-libc=...
14451
Martin v. Löwis11437992002-04-12 09:54:03 +000014452echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14453echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14454
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014455# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014456if test "${with_libc+set}" = set; then
14457 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014458
Guido van Rossum7f253911997-05-09 02:42:48 +000014459if test "$withval" = no
14460then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14462echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014463elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014464then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14466echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14467else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14468echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14469 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014470fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014471else
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14473echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14474fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014475
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014476# check for hypot() in math library
14477LIBS_SAVE=$LIBS
14478LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014479
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014480for ac_func in hypot
14481do
Martin v. Löwis11437992002-04-12 09:54:03 +000014482as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14483echo "$as_me:$LINENO: checking for $ac_func" >&5
14484echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14485if eval "test \"\${$as_ac_var+set}\" = set"; then
14486 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014487else
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 cat >conftest.$ac_ext <<_ACEOF
14489#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014490#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014491/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014493#include <assert.h>
14494/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014495#ifdef __cplusplus
14496extern "C"
14497#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014498/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 builtin and then its argument prototype would still apply. */
14500char $ac_func ();
14501char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014502
Martin v. Löwis11437992002-04-12 09:54:03 +000014503#ifdef F77_DUMMY_MAIN
14504# ifdef __cplusplus
14505 extern "C"
14506# endif
14507 int F77_DUMMY_MAIN() { return 1; }
14508#endif
14509int
14510main ()
14511{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014512/* The GNU C library defines this for functions which it implements
14513 to always fail with ENOSYS. Some functions are actually named
14514 something starting with __ and the normal name is an alias. */
14515#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14516choke me
14517#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014518f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014519#endif
14520
Martin v. Löwis11437992002-04-12 09:54:03 +000014521 ;
14522 return 0;
14523}
14524_ACEOF
14525rm -f conftest.$ac_objext conftest$ac_exeext
14526if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14527 (eval $ac_link) 2>&5
14528 ac_status=$?
14529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14530 (exit $ac_status); } &&
14531 { ac_try='test -s conftest$ac_exeext'
14532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14533 (eval $ac_try) 2>&5
14534 ac_status=$?
14535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14536 (exit $ac_status); }; }; then
14537 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014538else
Martin v. Löwis11437992002-04-12 09:54:03 +000014539 echo "$as_me: failed program was:" >&5
14540cat conftest.$ac_ext >&5
14541eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014542fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014543rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014544fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014545echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14546echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14547if test `eval echo '${'$as_ac_var'}'` = yes; then
14548 cat >>confdefs.h <<_ACEOF
14549#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14550_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014551
Michael W. Hudson54241132001-12-07 15:38:26 +000014552else
Martin v. Löwis11437992002-04-12 09:54:03 +000014553 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014554fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014555done
14556
Michael W. Hudson54241132001-12-07 15:38:26 +000014557
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014558LIBS=$LIBS_SAVE
14559
Guido van Rossumad713701997-07-10 22:42:38 +000014560# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014561echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14562echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14563if test "${ac_cv_malloc_zero+set}" = set; then
14564 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014565else
14566 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014567 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014568else
Martin v. Löwis11437992002-04-12 09:54:03 +000014569 cat >conftest.$ac_ext <<_ACEOF
14570#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014571#include "confdefs.h"
14572#include <stdio.h>
14573#ifdef HAVE_STDLIB
14574#include <stdlib.h>
14575#else
14576char *malloc(), *realloc();
14577int *free();
14578#endif
14579main() {
14580 char *p;
14581 p = malloc(0);
14582 if (p == NULL) exit(1);
14583 p = realloc(p, 0);
14584 if (p == NULL) exit(1);
14585 free(p);
14586 exit(0);
14587}
Martin v. Löwis11437992002-04-12 09:54:03 +000014588_ACEOF
14589rm -f conftest$ac_exeext
14590if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14591 (eval $ac_link) 2>&5
14592 ac_status=$?
14593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14594 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14596 (eval $ac_try) 2>&5
14597 ac_status=$?
14598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14599 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014600 ac_cv_malloc_zero=nonnull
14601else
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 echo "$as_me: program exited with status $ac_status" >&5
14603echo "$as_me: failed program was:" >&5
14604cat conftest.$ac_ext >&5
14605( exit $ac_status )
14606ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014607fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014608rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014609fi
Guido van Rossumad713701997-07-10 22:42:38 +000014610fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014611 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014612echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14613echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014614if test "$ac_cv_malloc_zero" = null
14615then
Martin v. Löwis11437992002-04-12 09:54:03 +000014616
14617cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014618#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014619_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014620
14621fi
14622
Guido van Rossumef2255b2000-03-10 22:30:29 +000014623# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014624if test "${ac_cv_header_wchar_h+set}" = set; then
14625 echo "$as_me:$LINENO: checking for wchar.h" >&5
14626echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14627if test "${ac_cv_header_wchar_h+set}" = set; then
14628 echo $ECHO_N "(cached) $ECHO_C" >&6
14629fi
14630echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14631echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014632else
Martin v. Löwis11437992002-04-12 09:54:03 +000014633 # Is the header compilable?
14634echo "$as_me:$LINENO: checking wchar.h usability" >&5
14635echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14636cat >conftest.$ac_ext <<_ACEOF
14637#line $LINENO "configure"
14638#include "confdefs.h"
14639$ac_includes_default
14640#include <wchar.h>
14641_ACEOF
14642rm -f conftest.$ac_objext
14643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14644 (eval $ac_compile) 2>&5
14645 ac_status=$?
14646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14647 (exit $ac_status); } &&
14648 { ac_try='test -s conftest.$ac_objext'
14649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14650 (eval $ac_try) 2>&5
14651 ac_status=$?
14652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14653 (exit $ac_status); }; }; then
14654 ac_header_compiler=yes
14655else
14656 echo "$as_me: failed program was:" >&5
14657cat conftest.$ac_ext >&5
14658ac_header_compiler=no
14659fi
14660rm -f conftest.$ac_objext conftest.$ac_ext
14661echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14662echo "${ECHO_T}$ac_header_compiler" >&6
14663
14664# Is the header present?
14665echo "$as_me:$LINENO: checking wchar.h presence" >&5
14666echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14667cat >conftest.$ac_ext <<_ACEOF
14668#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014669#include "confdefs.h"
14670#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014671_ACEOF
14672if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14673 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14674 ac_status=$?
14675 egrep -v '^ *\+' conftest.er1 >conftest.err
14676 rm -f conftest.er1
14677 cat conftest.err >&5
14678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14679 (exit $ac_status); } >/dev/null; then
14680 if test -s conftest.err; then
14681 ac_cpp_err=$ac_c_preproc_warn_flag
14682 else
14683 ac_cpp_err=
14684 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014685else
Martin v. Löwis11437992002-04-12 09:54:03 +000014686 ac_cpp_err=yes
14687fi
14688if test -z "$ac_cpp_err"; then
14689 ac_header_preproc=yes
14690else
14691 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014692 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014693 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014694fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014695rm -f conftest.err conftest.$ac_ext
14696echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14697echo "${ECHO_T}$ac_header_preproc" >&6
14698
14699# So? What about this header?
14700case $ac_header_compiler:$ac_header_preproc in
14701 yes:no )
14702 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14703echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14704 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14705echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14706 no:yes )
14707 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14708echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14709 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14710echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14711 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14712echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14713esac
14714echo "$as_me:$LINENO: checking for wchar.h" >&5
14715echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14716if test "${ac_cv_header_wchar_h+set}" = set; then
14717 echo $ECHO_N "(cached) $ECHO_C" >&6
14718else
14719 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014720fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014721echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14722echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14723
14724fi
14725if test $ac_cv_header_wchar_h = yes; then
14726
14727
14728cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014729#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014730_ACEOF
14731
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014732 wchar_h="yes"
14733
Guido van Rossumef2255b2000-03-10 22:30:29 +000014734else
Martin v. Löwis11437992002-04-12 09:54:03 +000014735 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014736
14737fi
14738
Michael W. Hudson54241132001-12-07 15:38:26 +000014739
Martin v. Löwis11437992002-04-12 09:54:03 +000014740
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014741# determine wchar_t size
14742if test "$wchar_h" = yes
14743then
Martin v. Löwis11437992002-04-12 09:54:03 +000014744 echo "$as_me:$LINENO: checking for wchar_t" >&5
14745echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14746if test "${ac_cv_type_wchar_t+set}" = set; then
14747 echo $ECHO_N "(cached) $ECHO_C" >&6
14748else
14749 cat >conftest.$ac_ext <<_ACEOF
14750#line $LINENO "configure"
14751#include "confdefs.h"
14752#include <wchar.h>
14753
14754#ifdef F77_DUMMY_MAIN
14755# ifdef __cplusplus
14756 extern "C"
14757# endif
14758 int F77_DUMMY_MAIN() { return 1; }
14759#endif
14760int
14761main ()
14762{
14763if ((wchar_t *) 0)
14764 return 0;
14765if (sizeof (wchar_t))
14766 return 0;
14767 ;
14768 return 0;
14769}
14770_ACEOF
14771rm -f conftest.$ac_objext
14772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14773 (eval $ac_compile) 2>&5
14774 ac_status=$?
14775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14776 (exit $ac_status); } &&
14777 { ac_try='test -s conftest.$ac_objext'
14778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14779 (eval $ac_try) 2>&5
14780 ac_status=$?
14781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14782 (exit $ac_status); }; }; then
14783 ac_cv_type_wchar_t=yes
14784else
14785 echo "$as_me: failed program was:" >&5
14786cat conftest.$ac_ext >&5
14787ac_cv_type_wchar_t=no
14788fi
14789rm -f conftest.$ac_objext conftest.$ac_ext
14790fi
14791echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14792echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14793
14794echo "$as_me:$LINENO: checking size of wchar_t" >&5
14795echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14796if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14797 echo $ECHO_N "(cached) $ECHO_C" >&6
14798else
14799 if test "$ac_cv_type_wchar_t" = yes; then
14800 # The cast to unsigned long works around a bug in the HP C Compiler
14801 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14802 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14803 # This bug is HP SR number 8606223364.
14804 if test "$cross_compiling" = yes; then
14805 # Depending upon the size, compute the lo and hi bounds.
14806cat >conftest.$ac_ext <<_ACEOF
14807#line $LINENO "configure"
14808#include "confdefs.h"
14809#include <wchar.h>
14810
14811#ifdef F77_DUMMY_MAIN
14812# ifdef __cplusplus
14813 extern "C"
14814# endif
14815 int F77_DUMMY_MAIN() { return 1; }
14816#endif
14817int
14818main ()
14819{
14820static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14821test_array [0] = 0
14822
14823 ;
14824 return 0;
14825}
14826_ACEOF
14827rm -f conftest.$ac_objext
14828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14829 (eval $ac_compile) 2>&5
14830 ac_status=$?
14831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14832 (exit $ac_status); } &&
14833 { ac_try='test -s conftest.$ac_objext'
14834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14835 (eval $ac_try) 2>&5
14836 ac_status=$?
14837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14838 (exit $ac_status); }; }; then
14839 ac_lo=0 ac_mid=0
14840 while :; do
14841 cat >conftest.$ac_ext <<_ACEOF
14842#line $LINENO "configure"
14843#include "confdefs.h"
14844#include <wchar.h>
14845
14846#ifdef F77_DUMMY_MAIN
14847# ifdef __cplusplus
14848 extern "C"
14849# endif
14850 int F77_DUMMY_MAIN() { return 1; }
14851#endif
14852int
14853main ()
14854{
14855static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14856test_array [0] = 0
14857
14858 ;
14859 return 0;
14860}
14861_ACEOF
14862rm -f conftest.$ac_objext
14863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14864 (eval $ac_compile) 2>&5
14865 ac_status=$?
14866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14867 (exit $ac_status); } &&
14868 { ac_try='test -s conftest.$ac_objext'
14869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14870 (eval $ac_try) 2>&5
14871 ac_status=$?
14872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14873 (exit $ac_status); }; }; then
14874 ac_hi=$ac_mid; break
14875else
14876 echo "$as_me: failed program was:" >&5
14877cat conftest.$ac_ext >&5
14878ac_lo=`expr $ac_mid + 1`
14879 if test $ac_lo -le $ac_mid; then
14880 ac_lo= ac_hi=
14881 break
14882 fi
14883 ac_mid=`expr 2 '*' $ac_mid + 1`
14884fi
14885rm -f conftest.$ac_objext conftest.$ac_ext
14886 done
14887else
14888 echo "$as_me: failed program was:" >&5
14889cat conftest.$ac_ext >&5
14890cat >conftest.$ac_ext <<_ACEOF
14891#line $LINENO "configure"
14892#include "confdefs.h"
14893#include <wchar.h>
14894
14895#ifdef F77_DUMMY_MAIN
14896# ifdef __cplusplus
14897 extern "C"
14898# endif
14899 int F77_DUMMY_MAIN() { return 1; }
14900#endif
14901int
14902main ()
14903{
14904static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14905test_array [0] = 0
14906
14907 ;
14908 return 0;
14909}
14910_ACEOF
14911rm -f conftest.$ac_objext
14912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14913 (eval $ac_compile) 2>&5
14914 ac_status=$?
14915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14916 (exit $ac_status); } &&
14917 { ac_try='test -s conftest.$ac_objext'
14918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14919 (eval $ac_try) 2>&5
14920 ac_status=$?
14921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14922 (exit $ac_status); }; }; then
14923 ac_hi=-1 ac_mid=-1
14924 while :; do
14925 cat >conftest.$ac_ext <<_ACEOF
14926#line $LINENO "configure"
14927#include "confdefs.h"
14928#include <wchar.h>
14929
14930#ifdef F77_DUMMY_MAIN
14931# ifdef __cplusplus
14932 extern "C"
14933# endif
14934 int F77_DUMMY_MAIN() { return 1; }
14935#endif
14936int
14937main ()
14938{
14939static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14940test_array [0] = 0
14941
14942 ;
14943 return 0;
14944}
14945_ACEOF
14946rm -f conftest.$ac_objext
14947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14948 (eval $ac_compile) 2>&5
14949 ac_status=$?
14950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14951 (exit $ac_status); } &&
14952 { ac_try='test -s conftest.$ac_objext'
14953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14954 (eval $ac_try) 2>&5
14955 ac_status=$?
14956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14957 (exit $ac_status); }; }; then
14958 ac_lo=$ac_mid; break
14959else
14960 echo "$as_me: failed program was:" >&5
14961cat conftest.$ac_ext >&5
14962ac_hi=`expr '(' $ac_mid ')' - 1`
14963 if test $ac_mid -le $ac_hi; then
14964 ac_lo= ac_hi=
14965 break
14966 fi
14967 ac_mid=`expr 2 '*' $ac_mid`
14968fi
14969rm -f conftest.$ac_objext conftest.$ac_ext
14970 done
14971else
14972 echo "$as_me: failed program was:" >&5
14973cat conftest.$ac_ext >&5
14974ac_lo= ac_hi=
14975fi
14976rm -f conftest.$ac_objext conftest.$ac_ext
14977fi
14978rm -f conftest.$ac_objext conftest.$ac_ext
14979# Binary search between lo and hi bounds.
14980while test "x$ac_lo" != "x$ac_hi"; do
14981 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14982 cat >conftest.$ac_ext <<_ACEOF
14983#line $LINENO "configure"
14984#include "confdefs.h"
14985#include <wchar.h>
14986
14987#ifdef F77_DUMMY_MAIN
14988# ifdef __cplusplus
14989 extern "C"
14990# endif
14991 int F77_DUMMY_MAIN() { return 1; }
14992#endif
14993int
14994main ()
14995{
14996static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14997test_array [0] = 0
14998
14999 ;
15000 return 0;
15001}
15002_ACEOF
15003rm -f conftest.$ac_objext
15004if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15005 (eval $ac_compile) 2>&5
15006 ac_status=$?
15007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15008 (exit $ac_status); } &&
15009 { ac_try='test -s conftest.$ac_objext'
15010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15011 (eval $ac_try) 2>&5
15012 ac_status=$?
15013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15014 (exit $ac_status); }; }; then
15015 ac_hi=$ac_mid
15016else
15017 echo "$as_me: failed program was:" >&5
15018cat conftest.$ac_ext >&5
15019ac_lo=`expr '(' $ac_mid ')' + 1`
15020fi
15021rm -f conftest.$ac_objext conftest.$ac_ext
15022done
15023case $ac_lo in
15024?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15025'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15026echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15027 { (exit 1); exit 1; }; } ;;
15028esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015029else
15030 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015031 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15032echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15033 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015034else
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 cat >conftest.$ac_ext <<_ACEOF
15036#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015037#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015038#include <wchar.h>
15039
15040long longval () { return (long) (sizeof (wchar_t)); }
15041unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015042#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015043#include <stdlib.h>
15044#ifdef F77_DUMMY_MAIN
15045# ifdef __cplusplus
15046 extern "C"
15047# endif
15048 int F77_DUMMY_MAIN() { return 1; }
15049#endif
15050int
15051main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015052{
Martin v. Löwis11437992002-04-12 09:54:03 +000015053
15054 FILE *f = fopen ("conftest.val", "w");
15055 if (! f)
15056 exit (1);
15057 if (((long) (sizeof (wchar_t))) < 0)
15058 {
15059 long i = longval ();
15060 if (i != ((long) (sizeof (wchar_t))))
15061 exit (1);
15062 fprintf (f, "%ld\n", i);
15063 }
15064 else
15065 {
15066 unsigned long i = ulongval ();
15067 if (i != ((long) (sizeof (wchar_t))))
15068 exit (1);
15069 fprintf (f, "%lu\n", i);
15070 }
15071 exit (ferror (f) || fclose (f) != 0);
15072
15073 ;
15074 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015075}
Martin v. Löwis11437992002-04-12 09:54:03 +000015076_ACEOF
15077rm -f conftest$ac_exeext
15078if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15079 (eval $ac_link) 2>&5
15080 ac_status=$?
15081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15082 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15083 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15084 (eval $ac_try) 2>&5
15085 ac_status=$?
15086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15087 (exit $ac_status); }; }; then
15088 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015089else
Martin v. Löwis11437992002-04-12 09:54:03 +000015090 echo "$as_me: program exited with status $ac_status" >&5
15091echo "$as_me: failed program was:" >&5
15092cat conftest.$ac_ext >&5
15093( exit $ac_status )
15094{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15095echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15096 { (exit 1); exit 1; }; }
15097fi
15098rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15099fi
15100fi
15101rm -f conftest.val
15102else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015103 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015104fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015105fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015106echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15107echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15108cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015109#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015110_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015111
Michael W. Hudson54241132001-12-07 15:38:26 +000015112
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015113fi
15114
Martin v. Löwis11437992002-04-12 09:54:03 +000015115echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15116echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015117# Check whether --enable-unicode or --disable-unicode was given.
15118if test "${enable_unicode+set}" = set; then
15119 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015120
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015121else
15122 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015123fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015124
15125if test $enable_unicode = yes
15126then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015127 # Without any arguments, Py_UNICODE defaults to two-byte mode
15128 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015129fi
15130
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015131
15132
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015133case "$enable_unicode" in
15134ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015136#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015137_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015138
15139 ;;
15140ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015142#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015143_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015144
15145 ;;
15146esac
15147
Michael W. Hudson54241132001-12-07 15:38:26 +000015148
Martin v. Löwis11437992002-04-12 09:54:03 +000015149
15150
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015151
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015152if test "$enable_unicode" = "no"
15153then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015154 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015155 echo "$as_me:$LINENO: result: not used" >&5
15156echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015157else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015158 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015159
15160cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015161#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015162_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015163
15164 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15165 then
15166 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015167
Martin v. Löwis11437992002-04-12 09:54:03 +000015168cat >>confdefs.h <<\_ACEOF
15169#define HAVE_USABLE_WCHAR_T 1
15170_ACEOF
15171
15172 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015173#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015174_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015175
15176 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15177 then
15178 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015179 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015180#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015181_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015182
15183 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15184 then
15185 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015187#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015188_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015189
15190 else
15191 PY_UNICODE_TYPE="no type found"
15192 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15194echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015195fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015196
15197# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015198echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15199echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15200if test "${ac_cv_c_bigendian+set}" = set; then
15201 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015202else
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 # See if sys/param.h defines the BYTE_ORDER macro.
15204cat >conftest.$ac_ext <<_ACEOF
15205#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015206#include "confdefs.h"
15207#include <sys/types.h>
15208#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015209
Martin v. Löwis11437992002-04-12 09:54:03 +000015210#ifdef F77_DUMMY_MAIN
15211# ifdef __cplusplus
15212 extern "C"
15213# endif
15214 int F77_DUMMY_MAIN() { return 1; }
15215#endif
15216int
15217main ()
15218{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015219#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15220 bogus endian macros
15221#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015222
15223 ;
15224 return 0;
15225}
15226_ACEOF
15227rm -f conftest.$ac_objext
15228if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15229 (eval $ac_compile) 2>&5
15230 ac_status=$?
15231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15232 (exit $ac_status); } &&
15233 { ac_try='test -s conftest.$ac_objext'
15234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15235 (eval $ac_try) 2>&5
15236 ac_status=$?
15237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15238 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015239 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015240cat >conftest.$ac_ext <<_ACEOF
15241#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015242#include "confdefs.h"
15243#include <sys/types.h>
15244#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015245
Martin v. Löwis11437992002-04-12 09:54:03 +000015246#ifdef F77_DUMMY_MAIN
15247# ifdef __cplusplus
15248 extern "C"
15249# endif
15250 int F77_DUMMY_MAIN() { return 1; }
15251#endif
15252int
15253main ()
15254{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015255#if BYTE_ORDER != BIG_ENDIAN
15256 not big endian
15257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015258
15259 ;
15260 return 0;
15261}
15262_ACEOF
15263rm -f conftest.$ac_objext
15264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15265 (eval $ac_compile) 2>&5
15266 ac_status=$?
15267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15268 (exit $ac_status); } &&
15269 { ac_try='test -s conftest.$ac_objext'
15270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15271 (eval $ac_try) 2>&5
15272 ac_status=$?
15273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15274 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015275 ac_cv_c_bigendian=yes
15276else
Martin v. Löwis11437992002-04-12 09:54:03 +000015277 echo "$as_me: failed program was:" >&5
15278cat conftest.$ac_ext >&5
15279ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015281rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015282else
Martin v. Löwis11437992002-04-12 09:54:03 +000015283 echo "$as_me: failed program was:" >&5
15284cat conftest.$ac_ext >&5
15285# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015286if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 # try to guess the endianess by grep'ing values into an object file
15288 ac_cv_c_bigendian=unknown
15289 cat >conftest.$ac_ext <<_ACEOF
15290#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015291#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015292short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15293short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15294void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15295short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15296short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15297void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15298#ifdef F77_DUMMY_MAIN
15299# ifdef __cplusplus
15300 extern "C"
15301# endif
15302 int F77_DUMMY_MAIN() { return 1; }
15303#endif
15304int
15305main ()
15306{
15307 _ascii (); _ebcdic ();
15308 ;
15309 return 0;
15310}
15311_ACEOF
15312rm -f conftest.$ac_objext
15313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15314 (eval $ac_compile) 2>&5
15315 ac_status=$?
15316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15317 (exit $ac_status); } &&
15318 { ac_try='test -s conftest.$ac_objext'
15319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15320 (eval $ac_try) 2>&5
15321 ac_status=$?
15322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15323 (exit $ac_status); }; }; then
15324 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15325 ac_cv_c_bigendian=yes
15326fi
15327if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15328 if test "$ac_cv_c_bigendian" = unknown; then
15329 ac_cv_c_bigendian=no
15330 else
15331 # finding both strings is unlikely to happen, but who knows?
15332 ac_cv_c_bigendian=unknown
15333 fi
15334fi
15335else
15336 echo "$as_me: failed program was:" >&5
15337cat conftest.$ac_ext >&5
15338fi
15339rm -f conftest.$ac_objext conftest.$ac_ext
15340else
15341 cat >conftest.$ac_ext <<_ACEOF
15342#line $LINENO "configure"
15343#include "confdefs.h"
15344int
15345main ()
15346{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015347 /* Are we little or big endian? From Harbison&Steele. */
15348 union
15349 {
15350 long l;
15351 char c[sizeof (long)];
15352 } u;
15353 u.l = 1;
15354 exit (u.c[sizeof (long) - 1] == 1);
15355}
Martin v. Löwis11437992002-04-12 09:54:03 +000015356_ACEOF
15357rm -f conftest$ac_exeext
15358if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15359 (eval $ac_link) 2>&5
15360 ac_status=$?
15361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15362 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15364 (eval $ac_try) 2>&5
15365 ac_status=$?
15366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15367 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015368 ac_cv_c_bigendian=no
15369else
Martin v. Löwis11437992002-04-12 09:54:03 +000015370 echo "$as_me: program exited with status $ac_status" >&5
15371echo "$as_me: failed program was:" >&5
15372cat conftest.$ac_ext >&5
15373( exit $ac_status )
15374ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015375fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015376rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015377fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015378fi
15379rm -f conftest.$ac_objext conftest.$ac_ext
15380fi
15381echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15382echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15383case $ac_cv_c_bigendian in
15384 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015385
Martin v. Löwis11437992002-04-12 09:54:03 +000015386cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015387#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015388_ACEOF
15389 ;;
15390 no)
15391 ;;
15392 *)
15393 { { echo "$as_me:$LINENO: error: unknown endianess
15394presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15395echo "$as_me: error: unknown endianess
15396presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15397 { (exit 1); exit 1; }; } ;;
15398esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015399
Michael W. Hudson54241132001-12-07 15:38:26 +000015400
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015401# Check whether right shifting a negative integer extends the sign bit
15402# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015403echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15404echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15405if test "${ac_cv_rshift_extends_sign+set}" = set; then
15406 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015407else
Martin v. Löwis11437992002-04-12 09:54:03 +000015408
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015409if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015410 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015411else
Martin v. Löwis11437992002-04-12 09:54:03 +000015412 cat >conftest.$ac_ext <<_ACEOF
15413#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015414#include "confdefs.h"
15415
15416int main()
15417{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015418 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015419}
15420
Martin v. Löwis11437992002-04-12 09:54:03 +000015421_ACEOF
15422rm -f conftest$ac_exeext
15423if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15424 (eval $ac_link) 2>&5
15425 ac_status=$?
15426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15427 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15429 (eval $ac_try) 2>&5
15430 ac_status=$?
15431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15432 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015433 ac_cv_rshift_extends_sign=yes
15434else
Martin v. Löwis11437992002-04-12 09:54:03 +000015435 echo "$as_me: program exited with status $ac_status" >&5
15436echo "$as_me: failed program was:" >&5
15437cat conftest.$ac_ext >&5
15438( exit $ac_status )
15439ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015441rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15442fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015443fi
15444
Martin v. Löwis11437992002-04-12 09:54:03 +000015445echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15446echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015447if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015448then
Martin v. Löwis11437992002-04-12 09:54:03 +000015449
15450cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015451#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015452_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015453
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015454fi
15455
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015456# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015457echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15458echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15459if test "${ac_cv_have_getc_unlocked+set}" = set; then
15460 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015461else
Martin v. Löwis11437992002-04-12 09:54:03 +000015462
15463cat >conftest.$ac_ext <<_ACEOF
15464#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015465#include "confdefs.h"
15466#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015467#ifdef F77_DUMMY_MAIN
15468# ifdef __cplusplus
15469 extern "C"
15470# endif
15471 int F77_DUMMY_MAIN() { return 1; }
15472#endif
15473int
15474main ()
15475{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015476
15477 FILE *f = fopen("/dev/null", "r");
15478 flockfile(f);
15479 getc_unlocked(f);
15480 funlockfile(f);
15481
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 ;
15483 return 0;
15484}
15485_ACEOF
15486rm -f conftest.$ac_objext conftest$ac_exeext
15487if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15488 (eval $ac_link) 2>&5
15489 ac_status=$?
15490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15491 (exit $ac_status); } &&
15492 { ac_try='test -s conftest$ac_exeext'
15493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15494 (eval $ac_try) 2>&5
15495 ac_status=$?
15496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15497 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015498 ac_cv_have_getc_unlocked=yes
15499else
Martin v. Löwis11437992002-04-12 09:54:03 +000015500 echo "$as_me: failed program was:" >&5
15501cat conftest.$ac_ext >&5
15502ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015503fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015504rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015505fi
15506
Martin v. Löwis11437992002-04-12 09:54:03 +000015507echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15508echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015509if test "$ac_cv_have_getc_unlocked" = yes
15510then
Martin v. Löwis11437992002-04-12 09:54:03 +000015511
15512cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015513#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015514_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015515
15516fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015517
Martin v. Löwis0daad592001-09-30 21:09:59 +000015518# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015519echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15520echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15521if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15522 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015523else
Martin v. Löwis11437992002-04-12 09:54:03 +000015524 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015525LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015526cat >conftest.$ac_ext <<_ACEOF
15527#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015528#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015529
Guido van Rossum353ae582001-07-10 16:45:32 +000015530/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015531#ifdef __cplusplus
15532extern "C"
15533#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015534/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015535 builtin and then its argument prototype would still apply. */
15536char rl_pre_input_hook ();
15537#ifdef F77_DUMMY_MAIN
15538# ifdef __cplusplus
15539 extern "C"
15540# endif
15541 int F77_DUMMY_MAIN() { return 1; }
15542#endif
15543int
15544main ()
15545{
15546rl_pre_input_hook ();
15547 ;
15548 return 0;
15549}
15550_ACEOF
15551rm -f conftest.$ac_objext conftest$ac_exeext
15552if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15553 (eval $ac_link) 2>&5
15554 ac_status=$?
15555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15556 (exit $ac_status); } &&
15557 { ac_try='test -s conftest$ac_exeext'
15558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15559 (eval $ac_try) 2>&5
15560 ac_status=$?
15561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15562 (exit $ac_status); }; }; then
15563 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015564else
Martin v. Löwis11437992002-04-12 09:54:03 +000015565 echo "$as_me: failed program was:" >&5
15566cat conftest.$ac_ext >&5
15567ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015569rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15570LIBS=$ac_check_lib_save_LIBS
15571fi
15572echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15573echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15574if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015575
Martin v. Löwis11437992002-04-12 09:54:03 +000015576cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015577#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015578_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015579
Martin v. Löwis0daad592001-09-30 21:09:59 +000015580fi
15581
Michael W. Hudson54241132001-12-07 15:38:26 +000015582
Martin v. Löwis0daad592001-09-30 21:09:59 +000015583# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015584echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15585echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15586if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15587 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015588else
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015590LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015591cat >conftest.$ac_ext <<_ACEOF
15592#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015593#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015594
Martin v. Löwis0daad592001-09-30 21:09:59 +000015595/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015596#ifdef __cplusplus
15597extern "C"
15598#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015599/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015600 builtin and then its argument prototype would still apply. */
15601char rl_completion_matches ();
15602#ifdef F77_DUMMY_MAIN
15603# ifdef __cplusplus
15604 extern "C"
15605# endif
15606 int F77_DUMMY_MAIN() { return 1; }
15607#endif
15608int
15609main ()
15610{
15611rl_completion_matches ();
15612 ;
15613 return 0;
15614}
15615_ACEOF
15616rm -f conftest.$ac_objext conftest$ac_exeext
15617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15618 (eval $ac_link) 2>&5
15619 ac_status=$?
15620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15621 (exit $ac_status); } &&
15622 { ac_try='test -s conftest$ac_exeext'
15623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15624 (eval $ac_try) 2>&5
15625 ac_status=$?
15626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15627 (exit $ac_status); }; }; then
15628 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015629else
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 echo "$as_me: failed program was:" >&5
15631cat conftest.$ac_ext >&5
15632ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015633fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015634rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15635LIBS=$ac_check_lib_save_LIBS
15636fi
15637echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15638echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15639if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015640
Martin v. Löwis11437992002-04-12 09:54:03 +000015641cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015642#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015643_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015644
Guido van Rossum353ae582001-07-10 16:45:32 +000015645fi
15646
Jack Jansendd19cf82001-12-06 22:36:17 +000015647
Martin v. Löwis11437992002-04-12 09:54:03 +000015648echo "$as_me:$LINENO: checking for broken nice()" >&5
15649echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15650if test "${ac_cv_broken_nice+set}" = set; then
15651 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015652else
Martin v. Löwis11437992002-04-12 09:54:03 +000015653
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015654if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015655 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015656else
Martin v. Löwis11437992002-04-12 09:54:03 +000015657 cat >conftest.$ac_ext <<_ACEOF
15658#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015659#include "confdefs.h"
15660
15661int main()
15662{
15663 int val1 = nice(1);
15664 if (val1 != -1 && val1 == nice(2))
15665 exit(0);
15666 exit(1);
15667}
15668
Martin v. Löwis11437992002-04-12 09:54:03 +000015669_ACEOF
15670rm -f conftest$ac_exeext
15671if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15672 (eval $ac_link) 2>&5
15673 ac_status=$?
15674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15675 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15677 (eval $ac_try) 2>&5
15678 ac_status=$?
15679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15680 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015681 ac_cv_broken_nice=yes
15682else
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 echo "$as_me: program exited with status $ac_status" >&5
15684echo "$as_me: failed program was:" >&5
15685cat conftest.$ac_ext >&5
15686( exit $ac_status )
15687ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015688fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015689rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15690fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015691fi
15692
Martin v. Löwis11437992002-04-12 09:54:03 +000015693echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15694echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015695if test "$ac_cv_broken_nice" = yes
15696then
Martin v. Löwis11437992002-04-12 09:54:03 +000015697
15698cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015699#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015700_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015701
15702fi
15703
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015704# Look for subsecond timestamps in struct stat
15705echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
15706echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
15707if test "${ac_cv_stat_tv_nsec+set}" = set; then
15708 echo $ECHO_N "(cached) $ECHO_C" >&6
15709else
15710 cat >conftest.$ac_ext <<_ACEOF
15711#line $LINENO "configure"
15712#include "confdefs.h"
15713#include <sys/stat.h>
15714#ifdef F77_DUMMY_MAIN
15715# ifdef __cplusplus
15716 extern "C"
15717# endif
15718 int F77_DUMMY_MAIN() { return 1; }
15719#endif
15720int
15721main ()
15722{
15723
15724struct stat st;
15725st.st_mtim.tv_nsec = 1;
15726
15727 ;
15728 return 0;
15729}
15730_ACEOF
15731rm -f conftest.$ac_objext
15732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15733 (eval $ac_compile) 2>&5
15734 ac_status=$?
15735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15736 (exit $ac_status); } &&
15737 { ac_try='test -s conftest.$ac_objext'
15738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15739 (eval $ac_try) 2>&5
15740 ac_status=$?
15741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15742 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015743 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015744else
15745 echo "$as_me: failed program was:" >&5
15746cat conftest.$ac_ext >&5
15747ac_cv_stat_tv_nsec=no
15748fi
15749rm -f conftest.$ac_objext conftest.$ac_ext
15750fi
15751
15752echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
15753echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
15754if test "$ac_cv_stat_tv_nsec" = yes
15755then
15756
15757cat >>confdefs.h <<\_ACEOF
15758#define HAVE_STAT_TV_NSEC 1
15759_ACEOF
15760
15761fi
15762
Jack Jansen666b1e72001-10-31 12:11:48 +000015763# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015764echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15765echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15766if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15767 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015768else
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 cat >conftest.$ac_ext <<_ACEOF
15770#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015771#include "confdefs.h"
15772#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015773#ifdef F77_DUMMY_MAIN
15774# ifdef __cplusplus
15775 extern "C"
15776# endif
15777 int F77_DUMMY_MAIN() { return 1; }
15778#endif
15779int
15780main ()
15781{
Jack Jansen666b1e72001-10-31 12:11:48 +000015782
15783 int rtn;
15784 rtn = mvwdelch(0,0,0);
15785
Martin v. Löwis11437992002-04-12 09:54:03 +000015786 ;
15787 return 0;
15788}
15789_ACEOF
15790rm -f conftest.$ac_objext
15791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15792 (eval $ac_compile) 2>&5
15793 ac_status=$?
15794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15795 (exit $ac_status); } &&
15796 { ac_try='test -s conftest.$ac_objext'
15797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15798 (eval $ac_try) 2>&5
15799 ac_status=$?
15800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15801 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015802 ac_cv_mvwdelch_is_expression=yes
15803else
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 echo "$as_me: failed program was:" >&5
15805cat conftest.$ac_ext >&5
15806ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015807fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015808rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015809fi
15810
Martin v. Löwis11437992002-04-12 09:54:03 +000015811echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15812echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015813
15814if test "$ac_cv_mvwdelch_is_expression" = yes
15815then
Martin v. Löwis11437992002-04-12 09:54:03 +000015816
15817cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015818#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015819_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015820
15821fi
15822
Martin v. Löwis11437992002-04-12 09:54:03 +000015823echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15824echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15825if test "${ac_cv_window_has_flags+set}" = set; then
15826 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015827else
Martin v. Löwis11437992002-04-12 09:54:03 +000015828 cat >conftest.$ac_ext <<_ACEOF
15829#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015830#include "confdefs.h"
15831#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015832#ifdef F77_DUMMY_MAIN
15833# ifdef __cplusplus
15834 extern "C"
15835# endif
15836 int F77_DUMMY_MAIN() { return 1; }
15837#endif
15838int
15839main ()
15840{
Jack Jansen666b1e72001-10-31 12:11:48 +000015841
15842 WINDOW *w;
15843 w->_flags = 0;
15844
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 ;
15846 return 0;
15847}
15848_ACEOF
15849rm -f conftest.$ac_objext
15850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15851 (eval $ac_compile) 2>&5
15852 ac_status=$?
15853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15854 (exit $ac_status); } &&
15855 { ac_try='test -s conftest.$ac_objext'
15856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15857 (eval $ac_try) 2>&5
15858 ac_status=$?
15859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15860 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015861 ac_cv_window_has_flags=yes
15862else
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 echo "$as_me: failed program was:" >&5
15864cat conftest.$ac_ext >&5
15865ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015867rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015868fi
15869
Martin v. Löwis11437992002-04-12 09:54:03 +000015870echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15871echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015872
Jack Jansen666b1e72001-10-31 12:11:48 +000015873
15874if test "$ac_cv_window_has_flags" = yes
15875then
Martin v. Löwis11437992002-04-12 09:54:03 +000015876
15877cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015878#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015879_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015880
15881fi
15882
Guido van Rossum95713eb2000-05-18 20:53:31 +000015883# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15884# Add sys/socket.h to confdefs.h
15885cat >> confdefs.h <<\EOF
15886#ifdef HAVE_SYS_SOCKET_H
15887#include <sys/socket.h>
15888#endif
15889EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015890echo "$as_me:$LINENO: checking for socklen_t" >&5
15891echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15892if test "${ac_cv_type_socklen_t+set}" = set; then
15893 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015894else
Martin v. Löwis11437992002-04-12 09:54:03 +000015895 cat >conftest.$ac_ext <<_ACEOF
15896#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015897#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015898$ac_includes_default
15899#ifdef F77_DUMMY_MAIN
15900# ifdef __cplusplus
15901 extern "C"
15902# endif
15903 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015905int
15906main ()
15907{
15908if ((socklen_t *) 0)
15909 return 0;
15910if (sizeof (socklen_t))
15911 return 0;
15912 ;
15913 return 0;
15914}
15915_ACEOF
15916rm -f conftest.$ac_objext
15917if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15918 (eval $ac_compile) 2>&5
15919 ac_status=$?
15920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15921 (exit $ac_status); } &&
15922 { ac_try='test -s conftest.$ac_objext'
15923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15924 (eval $ac_try) 2>&5
15925 ac_status=$?
15926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15927 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015928 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015929else
Martin v. Löwis11437992002-04-12 09:54:03 +000015930 echo "$as_me: failed program was:" >&5
15931cat conftest.$ac_ext >&5
15932ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015934rm -f conftest.$ac_objext conftest.$ac_ext
15935fi
15936echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15937echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15938if test $ac_cv_type_socklen_t = yes; then
15939 :
15940else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015941
Martin v. Löwis11437992002-04-12 09:54:03 +000015942cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015943#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015944_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015945
15946fi
15947
Michael W. Hudson54241132001-12-07 15:38:26 +000015948
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015949#AC_MSG_CHECKING(for Modules/Setup)
15950#if test ! -f Modules/Setup ; then
15951# if test ! -d Modules ; then
15952# mkdir Modules
15953# fi
15954# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15955# AC_MSG_RESULT(creating)
15956#else
15957# AC_MSG_RESULT(already exists)
15958#fi
15959
Michael W. Hudson54241132001-12-07 15:38:26 +000015960
15961
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015962for h in `(cd $srcdir;echo Python/thread_*.h)`
15963do
15964 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15965done
15966
Michael W. Hudson54241132001-12-07 15:38:26 +000015967
Jack Jansen0b06be72002-06-21 14:48:38 +000015968SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000015969echo "$as_me:$LINENO: checking for build directories" >&5
15970echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015971for dir in $SRCDIRS; do
15972 if test ! -d $dir; then
15973 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015974 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015975done
Martin v. Löwis11437992002-04-12 09:54:03 +000015976echo "$as_me:$LINENO: result: done" >&5
15977echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015978
Guido van Rossum627b2d71993-12-24 10:39:16 +000015979# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015980ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15981cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015982# This file is a shell script that caches the results of configure
15983# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015984# scripts and configure runs, see configure's option --config-cache.
15985# It is not useful on other systems. If it contains results you don't
15986# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015987#
Martin v. Löwis11437992002-04-12 09:54:03 +000015988# config.status only pays attention to the cache file if you give it
15989# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015990#
Martin v. Löwis11437992002-04-12 09:54:03 +000015991# `ac_cv_env_foo' variables (set or unset) will be overriden when
15992# loading this file, other *unset* `ac_cv_foo' will be assigned the
15993# following values.
15994
15995_ACEOF
15996
Guido van Rossumf78abae1997-01-21 22:02:36 +000015997# The following way of writing the cache mishandles newlines in values,
15998# but we know of no workaround that is simple, portable, and efficient.
15999# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016000# Ultrix sh set writes to stderr and can't be redirected directly,
16001# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016002{
16003 (set) 2>&1 |
16004 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16005 *ac_space=\ *)
16006 # `set' does not quote correctly, so add quotes (double-quote
16007 # substitution turns \\\\ into \\, and sed turns \\ into \).
16008 sed -n \
16009 "s/'/'\\\\''/g;
16010 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16011 ;;
16012 *)
16013 # `set' quotes correctly as required by POSIX, so do not add quotes.
16014 sed -n \
16015 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16016 ;;
16017 esac;
16018} |
16019 sed '
16020 t clear
16021 : clear
16022 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16023 t end
16024 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16025 : end' >>confcache
16026if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016027 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016028 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16029 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016030 else
16031 echo "not updating unwritable cache $cache_file"
16032 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016033fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016034rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016035
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016036test "x$prefix" = xNONE && prefix=$ac_default_prefix
16037# Let make expand exec_prefix.
16038test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016039
Martin v. Löwis11437992002-04-12 09:54:03 +000016040# VPATH may cause trouble with some makes, so we remove $(srcdir),
16041# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16042# trailing colons and then remove the whole line if VPATH becomes empty
16043# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016044if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016045 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16046s/:*\$(srcdir):*/:/;
16047s/:*\${srcdir}:*/:/;
16048s/:*@srcdir@:*/:/;
16049s/^\([^=]*=[ ]*\):*/\1/;
16050s/:*$//;
16051s/^[^=]*=[ ]*$//;
16052}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016053fi
16054
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016055DEFS=-DHAVE_CONFIG_H
16056
Martin v. Löwis11437992002-04-12 09:54:03 +000016057
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016058: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016059ac_clean_files_save=$ac_clean_files
16060ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16061{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16062echo "$as_me: creating $CONFIG_STATUS" >&6;}
16063cat >$CONFIG_STATUS <<_ACEOF
16064#! $SHELL
16065# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016066# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016067# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016068# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016069
Martin v. Löwis11437992002-04-12 09:54:03 +000016070debug=false
16071SHELL=\${CONFIG_SHELL-$SHELL}
16072_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016073
Martin v. Löwis11437992002-04-12 09:54:03 +000016074cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016075
Martin v. Löwis11437992002-04-12 09:54:03 +000016076## --------------------- ##
16077## M4sh Initialization. ##
16078## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016079
Martin v. Löwis11437992002-04-12 09:54:03 +000016080# Be Bourne compatible
16081if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16082 emulate sh
16083 NULLCMD=:
16084elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16085 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016086fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016087
Martin v. Löwis11437992002-04-12 09:54:03 +000016088# NLS nuisances.
16089# Support unset when possible.
16090if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16091 as_unset=unset
16092else
16093 as_unset=false
16094fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016095
Martin v. Löwis11437992002-04-12 09:54:03 +000016096(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16097 { $as_unset LANG || test "${LANG+set}" != set; } ||
16098 { LANG=C; export LANG; }
16099(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16100 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16101 { LC_ALL=C; export LC_ALL; }
16102(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16103 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16104 { LC_TIME=C; export LC_TIME; }
16105(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16106 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16107 { LC_CTYPE=C; export LC_CTYPE; }
16108(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16109 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16110 { LANGUAGE=C; export LANGUAGE; }
16111(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16112 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16113 { LC_COLLATE=C; export LC_COLLATE; }
16114(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16115 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16116 { LC_NUMERIC=C; export LC_NUMERIC; }
16117(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16118 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16119 { LC_MESSAGES=C; export LC_MESSAGES; }
16120
16121
16122# Name of the executable.
16123as_me=`(basename "$0") 2>/dev/null ||
16124$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16125 X"$0" : 'X\(//\)$' \| \
16126 X"$0" : 'X\(/\)$' \| \
16127 . : '\(.\)' 2>/dev/null ||
16128echo X/"$0" |
16129 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16130 /^X\/\(\/\/\)$/{ s//\1/; q; }
16131 /^X\/\(\/\).*/{ s//\1/; q; }
16132 s/.*/./; q'`
16133
16134# PATH needs CR, and LINENO needs CR and PATH.
16135# Avoid depending upon Character Ranges.
16136as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16137as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16138as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16139as_cr_digits='0123456789'
16140as_cr_alnum=$as_cr_Letters$as_cr_digits
16141
16142# The user is always right.
16143if test "${PATH_SEPARATOR+set}" != set; then
16144 echo "#! /bin/sh" >conftest.sh
16145 echo "exit 0" >>conftest.sh
16146 chmod +x conftest.sh
16147 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16148 PATH_SEPARATOR=';'
16149 else
16150 PATH_SEPARATOR=:
16151 fi
16152 rm -f conftest.sh
16153fi
16154
16155
16156 as_lineno_1=$LINENO
16157 as_lineno_2=$LINENO
16158 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16159 test "x$as_lineno_1" != "x$as_lineno_2" &&
16160 test "x$as_lineno_3" = "x$as_lineno_2" || {
16161 # Find who we are. Look in the path if we contain no path at all
16162 # relative or not.
16163 case $0 in
16164 *[\\/]* ) as_myself=$0 ;;
16165 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16166for as_dir in $PATH
16167do
16168 IFS=$as_save_IFS
16169 test -z "$as_dir" && as_dir=.
16170 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16171done
16172
16173 ;;
16174 esac
16175 # We did not find ourselves, most probably we were run as `sh COMMAND'
16176 # in which case we are not to be found in the path.
16177 if test "x$as_myself" = x; then
16178 as_myself=$0
16179 fi
16180 if test ! -f "$as_myself"; then
16181 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16182echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16183 { (exit 1); exit 1; }; }
16184 fi
16185 case $CONFIG_SHELL in
16186 '')
16187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16189do
16190 IFS=$as_save_IFS
16191 test -z "$as_dir" && as_dir=.
16192 for as_base in sh bash ksh sh5; do
16193 case $as_dir in
16194 /*)
16195 if ("$as_dir/$as_base" -c '
16196 as_lineno_1=$LINENO
16197 as_lineno_2=$LINENO
16198 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16199 test "x$as_lineno_1" != "x$as_lineno_2" &&
16200 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16201 CONFIG_SHELL=$as_dir/$as_base
16202 export CONFIG_SHELL
16203 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16204 fi;;
16205 esac
16206 done
16207done
16208;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016209 esac
16210
Martin v. Löwis11437992002-04-12 09:54:03 +000016211 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16212 # uniformly replaced by the line number. The first 'sed' inserts a
16213 # line-number line before each line; the second 'sed' does the real
16214 # work. The second script uses 'N' to pair each line-number line
16215 # with the numbered line, and appends trailing '-' during
16216 # substitution so that $LINENO is not a special case at line end.
16217 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16218 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16219 sed '=' <$as_myself |
16220 sed '
16221 N
16222 s,$,-,
16223 : loop
16224 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16225 t loop
16226 s,-$,,
16227 s,^['$as_cr_digits']*\n,,
16228 ' >$as_me.lineno &&
16229 chmod +x $as_me.lineno ||
16230 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16231echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16232 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016233
Martin v. Löwis11437992002-04-12 09:54:03 +000016234 # Don't try to exec as it changes $[0], causing all sort of problems
16235 # (the dirname of $[0] is not the place where we might find the
16236 # original and so on. Autoconf is especially sensible to this).
16237 . ./$as_me.lineno
16238 # Exit status is that of the last command.
16239 exit
16240}
16241
16242
16243case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16244 *c*,-n*) ECHO_N= ECHO_C='
16245' ECHO_T=' ' ;;
16246 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16247 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16248esac
16249
16250if expr a : '\(a\)' >/dev/null 2>&1; then
16251 as_expr=expr
16252else
16253 as_expr=false
16254fi
16255
16256rm -f conf$$ conf$$.exe conf$$.file
16257echo >conf$$.file
16258if ln -s conf$$.file conf$$ 2>/dev/null; then
16259 # We could just check for DJGPP; but this test a) works b) is more generic
16260 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16261 if test -f conf$$.exe; then
16262 # Don't use ln at all; we don't have any links
16263 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016264 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016265 as_ln_s='ln -s'
16266 fi
16267elif ln conf$$.file conf$$ 2>/dev/null; then
16268 as_ln_s=ln
16269else
16270 as_ln_s='cp -p'
16271fi
16272rm -f conf$$ conf$$.exe conf$$.file
16273
16274as_executable_p="test -f"
16275
16276# Sed expression to map a string onto a valid CPP name.
16277as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16278
16279# Sed expression to map a string onto a valid variable name.
16280as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16281
16282
16283# IFS
16284# We need space, tab and new line, in precisely that order.
16285as_nl='
16286'
16287IFS=" $as_nl"
16288
16289# CDPATH.
16290$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16291
16292exec 6>&1
16293
16294# Open the log real soon, to keep \$[0] and so on meaningful, and to
16295# report actual input values of CONFIG_FILES etc. instead of their
16296# values after options handling. Logging --version etc. is OK.
16297exec 5>>config.log
16298{
16299 echo
16300 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16301## Running $as_me. ##
16302_ASBOX
16303} >&5
16304cat >&5 <<_CSEOF
16305
16306This file was extended by $as_me, which was
16307generated by GNU Autoconf 2.53. Invocation command line was
16308
16309 CONFIG_FILES = $CONFIG_FILES
16310 CONFIG_HEADERS = $CONFIG_HEADERS
16311 CONFIG_LINKS = $CONFIG_LINKS
16312 CONFIG_COMMANDS = $CONFIG_COMMANDS
16313 $ $0 $@
16314
16315_CSEOF
16316echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16317echo >&5
16318_ACEOF
16319
16320# Files that config.status was made for.
16321if test -n "$ac_config_files"; then
16322 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16323fi
16324
16325if test -n "$ac_config_headers"; then
16326 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16327fi
16328
16329if test -n "$ac_config_links"; then
16330 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16331fi
16332
16333if test -n "$ac_config_commands"; then
16334 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16335fi
16336
16337cat >>$CONFIG_STATUS <<\_ACEOF
16338
16339ac_cs_usage="\
16340\`$as_me' instantiates files from templates according to the
16341current configuration.
16342
16343Usage: $0 [OPTIONS] [FILE]...
16344
16345 -h, --help print this help, then exit
16346 -V, --version print version number, then exit
16347 -d, --debug don't remove temporary files
16348 --recheck update $as_me by reconfiguring in the same conditions
16349 --file=FILE[:TEMPLATE]
16350 instantiate the configuration file FILE
16351 --header=FILE[:TEMPLATE]
16352 instantiate the configuration header FILE
16353
16354Configuration files:
16355$config_files
16356
16357Configuration headers:
16358$config_headers
16359
16360Report bugs to <bug-autoconf@gnu.org>."
16361_ACEOF
16362
16363cat >>$CONFIG_STATUS <<_ACEOF
16364ac_cs_version="\\
16365config.status
16366configured by $0, generated by GNU Autoconf 2.53,
16367 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16368
16369Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16370Free Software Foundation, Inc.
16371This config.status script is free software; the Free Software Foundation
16372gives unlimited permission to copy, distribute and modify it."
16373srcdir=$srcdir
16374INSTALL="$INSTALL"
16375_ACEOF
16376
16377cat >>$CONFIG_STATUS <<\_ACEOF
16378# If no file are specified by the user, then we need to provide default
16379# value. By we need to know if files were specified by the user.
16380ac_need_defaults=:
16381while test $# != 0
16382do
16383 case $1 in
16384 --*=*)
16385 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16386 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16387 shift
16388 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16389 shift
16390 ;;
16391 -*);;
16392 *) # This is not an option, so the user has probably given explicit
16393 # arguments.
16394 ac_need_defaults=false;;
16395 esac
16396
16397 case $1 in
16398 # Handling of the options.
16399_ACEOF
16400cat >>$CONFIG_STATUS <<_ACEOF
16401 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16402 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16403 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16404_ACEOF
16405cat >>$CONFIG_STATUS <<\_ACEOF
16406 --version | --vers* | -V )
16407 echo "$ac_cs_version"; exit 0 ;;
16408 --he | --h)
16409 # Conflict between --help and --header
16410 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16411Try \`$0 --help' for more information." >&5
16412echo "$as_me: error: ambiguous option: $1
16413Try \`$0 --help' for more information." >&2;}
16414 { (exit 1); exit 1; }; };;
16415 --help | --hel | -h )
16416 echo "$ac_cs_usage"; exit 0 ;;
16417 --debug | --d* | -d )
16418 debug=: ;;
16419 --file | --fil | --fi | --f )
16420 shift
16421 CONFIG_FILES="$CONFIG_FILES $1"
16422 ac_need_defaults=false;;
16423 --header | --heade | --head | --hea )
16424 shift
16425 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16426 ac_need_defaults=false;;
16427
16428 # This is an error.
16429 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16430Try \`$0 --help' for more information." >&5
16431echo "$as_me: error: unrecognized option: $1
16432Try \`$0 --help' for more information." >&2;}
16433 { (exit 1); exit 1; }; } ;;
16434
16435 *) ac_config_targets="$ac_config_targets $1" ;;
16436
16437 esac
16438 shift
16439done
16440
16441_ACEOF
16442
16443
16444
16445
16446
16447cat >>$CONFIG_STATUS <<\_ACEOF
16448for ac_config_target in $ac_config_targets
16449do
16450 case "$ac_config_target" in
16451 # Handling of arguments.
16452 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16453 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16454 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16455 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16456echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16457 { (exit 1); exit 1; }; };;
16458 esac
16459done
16460
16461# If the user did not use the arguments to specify the items to instantiate,
16462# then the envvar interface is used. Set only those that are not.
16463# We use the long form for the default assignment because of an extremely
16464# bizarre bug on SunOS 4.1.3.
16465if $ac_need_defaults; then
16466 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16467 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16468fi
16469
16470# Create a temporary directory, and hook for its removal unless debugging.
16471$debug ||
16472{
16473 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16474 trap '{ (exit 1); exit 1; }' 1 2 13 15
16475}
16476
16477# Create a (secure) tmp directory for tmp files.
16478: ${TMPDIR=/tmp}
16479{
16480 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16481 test -n "$tmp" && test -d "$tmp"
16482} ||
16483{
16484 tmp=$TMPDIR/cs$$-$RANDOM
16485 (umask 077 && mkdir $tmp)
16486} ||
16487{
16488 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16489 { (exit 1); exit 1; }
16490}
16491
16492_ACEOF
16493
16494cat >>$CONFIG_STATUS <<_ACEOF
16495
16496#
16497# CONFIG_FILES section.
16498#
16499
16500# No need to generate the scripts if there are no CONFIG_FILES.
16501# This happens for instance when ./config.status config.h
16502if test -n "\$CONFIG_FILES"; then
16503 # Protect against being on the right side of a sed subst in config.status.
16504 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16505 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16506s,@SHELL@,$SHELL,;t t
16507s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16508s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16509s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16510s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16511s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16512s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16513s,@exec_prefix@,$exec_prefix,;t t
16514s,@prefix@,$prefix,;t t
16515s,@program_transform_name@,$program_transform_name,;t t
16516s,@bindir@,$bindir,;t t
16517s,@sbindir@,$sbindir,;t t
16518s,@libexecdir@,$libexecdir,;t t
16519s,@datadir@,$datadir,;t t
16520s,@sysconfdir@,$sysconfdir,;t t
16521s,@sharedstatedir@,$sharedstatedir,;t t
16522s,@localstatedir@,$localstatedir,;t t
16523s,@libdir@,$libdir,;t t
16524s,@includedir@,$includedir,;t t
16525s,@oldincludedir@,$oldincludedir,;t t
16526s,@infodir@,$infodir,;t t
16527s,@mandir@,$mandir,;t t
16528s,@build_alias@,$build_alias,;t t
16529s,@host_alias@,$host_alias,;t t
16530s,@target_alias@,$target_alias,;t t
16531s,@DEFS@,$DEFS,;t t
16532s,@ECHO_C@,$ECHO_C,;t t
16533s,@ECHO_N@,$ECHO_N,;t t
16534s,@ECHO_T@,$ECHO_T,;t t
16535s,@LIBS@,$LIBS,;t t
16536s,@VERSION@,$VERSION,;t t
16537s,@SOVERSION@,$SOVERSION,;t t
16538s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16539s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16540s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16541s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16542s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16543s,@MACHDEP@,$MACHDEP,;t t
16544s,@SGI_ABI@,$SGI_ABI,;t t
16545s,@CXX@,$CXX,;t t
16546s,@MAINOBJ@,$MAINOBJ,;t t
16547s,@EXEEXT@,$EXEEXT,;t t
16548s,@CC@,$CC,;t t
16549s,@CFLAGS@,$CFLAGS,;t t
16550s,@LDFLAGS@,$LDFLAGS,;t t
16551s,@CPPFLAGS@,$CPPFLAGS,;t t
16552s,@ac_ct_CC@,$ac_ct_CC,;t t
16553s,@OBJEXT@,$OBJEXT,;t t
16554s,@CPP@,$CPP,;t t
16555s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16556s,@LIBRARY@,$LIBRARY,;t t
16557s,@LDLIBRARY@,$LDLIBRARY,;t t
16558s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16559s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16560s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16561s,@INSTSONAME@,$INSTSONAME,;t t
16562s,@RUNSHARED@,$RUNSHARED,;t t
16563s,@LINKCC@,$LINKCC,;t t
16564s,@RANLIB@,$RANLIB,;t t
16565s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16566s,@AR@,$AR,;t t
16567s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16568s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16569s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16570s,@LN@,$LN,;t t
16571s,@OPT@,$OPT,;t t
16572s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16573s,@SO@,$SO,;t t
16574s,@LDSHARED@,$LDSHARED,;t t
16575s,@BLDSHARED@,$BLDSHARED,;t t
16576s,@CCSHARED@,$CCSHARED,;t t
16577s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16578s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016579s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016580s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16581s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16582s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16583s,@LDLAST@,$LDLAST,;t t
16584s,@THREADOBJ@,$THREADOBJ,;t t
16585s,@DLINCLDIR@,$DLINCLDIR,;t t
16586s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16587s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16588s,@LIBOBJS@,$LIBOBJS,;t t
16589s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16590s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16591s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16592s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16593s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16594s,@LIBM@,$LIBM,;t t
16595s,@LIBC@,$LIBC,;t t
16596s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16597s,@THREADHEADERS@,$THREADHEADERS,;t t
16598s,@SRCDIRS@,$SRCDIRS,;t t
16599CEOF
16600
16601_ACEOF
16602
16603 cat >>$CONFIG_STATUS <<\_ACEOF
16604 # Split the substitutions into bite-sized pieces for seds with
16605 # small command number limits, like on Digital OSF/1 and HP-UX.
16606 ac_max_sed_lines=48
16607 ac_sed_frag=1 # Number of current file.
16608 ac_beg=1 # First line for current file.
16609 ac_end=$ac_max_sed_lines # Line after last line for current file.
16610 ac_more_lines=:
16611 ac_sed_cmds=
16612 while $ac_more_lines; do
16613 if test $ac_beg -gt 1; then
16614 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16615 else
16616 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16617 fi
16618 if test ! -s $tmp/subs.frag; then
16619 ac_more_lines=false
16620 else
16621 # The purpose of the label and of the branching condition is to
16622 # speed up the sed processing (if there are no `@' at all, there
16623 # is no need to browse any of the substitutions).
16624 # These are the two extra sed commands mentioned above.
16625 (echo ':t
16626 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16627 if test -z "$ac_sed_cmds"; then
16628 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16629 else
16630 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16631 fi
16632 ac_sed_frag=`expr $ac_sed_frag + 1`
16633 ac_beg=$ac_end
16634 ac_end=`expr $ac_end + $ac_max_sed_lines`
16635 fi
16636 done
16637 if test -z "$ac_sed_cmds"; then
16638 ac_sed_cmds=cat
16639 fi
16640fi # test -n "$CONFIG_FILES"
16641
16642_ACEOF
16643cat >>$CONFIG_STATUS <<\_ACEOF
16644for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16645 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16646 case $ac_file in
16647 - | *:- | *:-:* ) # input from stdin
16648 cat >$tmp/stdin
16649 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16650 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16651 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16652 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16653 * ) ac_file_in=$ac_file.in ;;
16654 esac
16655
16656 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16657 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16658$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16659 X"$ac_file" : 'X\(//\)[^/]' \| \
16660 X"$ac_file" : 'X\(//\)$' \| \
16661 X"$ac_file" : 'X\(/\)' \| \
16662 . : '\(.\)' 2>/dev/null ||
16663echo X"$ac_file" |
16664 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16665 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16666 /^X\(\/\/\)$/{ s//\1/; q; }
16667 /^X\(\/\).*/{ s//\1/; q; }
16668 s/.*/./; q'`
16669 { case "$ac_dir" in
16670 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16671 *) as_incr_dir=.;;
16672esac
16673as_dummy="$ac_dir"
16674for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16675 case $as_mkdir_dir in
16676 # Skip DOS drivespec
16677 ?:) as_incr_dir=$as_mkdir_dir ;;
16678 *)
16679 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16680 test -d "$as_incr_dir" ||
16681 mkdir "$as_incr_dir" ||
16682 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16683echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16684 { (exit 1); exit 1; }; }
16685 ;;
16686 esac
16687done; }
16688
16689 ac_builddir=.
16690
16691if test "$ac_dir" != .; then
16692 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16693 # A "../" for each directory in $ac_dir_suffix.
16694 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16695else
16696 ac_dir_suffix= ac_top_builddir=
16697fi
16698
16699case $srcdir in
16700 .) # No --srcdir option. We are building in place.
16701 ac_srcdir=.
16702 if test -z "$ac_top_builddir"; then
16703 ac_top_srcdir=.
16704 else
16705 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16706 fi ;;
16707 [\\/]* | ?:[\\/]* ) # Absolute path.
16708 ac_srcdir=$srcdir$ac_dir_suffix;
16709 ac_top_srcdir=$srcdir ;;
16710 *) # Relative path.
16711 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16712 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16713esac
16714# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16715# absolute.
16716ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16717ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16718ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16719ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16720
16721
16722 case $INSTALL in
16723 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16724 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16725 esac
16726
16727 if test x"$ac_file" != x-; then
16728 { echo "$as_me:$LINENO: creating $ac_file" >&5
16729echo "$as_me: creating $ac_file" >&6;}
16730 rm -f "$ac_file"
16731 fi
16732 # Let's still pretend it is `configure' which instantiates (i.e., don't
16733 # use $as_me), people would be surprised to read:
16734 # /* config.h. Generated by config.status. */
16735 if test x"$ac_file" = x-; then
16736 configure_input=
16737 else
16738 configure_input="$ac_file. "
16739 fi
16740 configure_input=$configure_input"Generated from `echo $ac_file_in |
16741 sed 's,.*/,,'` by configure."
16742
16743 # First look for the input files in the build tree, otherwise in the
16744 # src tree.
16745 ac_file_inputs=`IFS=:
16746 for f in $ac_file_in; do
16747 case $f in
16748 -) echo $tmp/stdin ;;
16749 [\\/$]*)
16750 # Absolute (can't be DOS-style, as IFS=:)
16751 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16752echo "$as_me: error: cannot find input file: $f" >&2;}
16753 { (exit 1); exit 1; }; }
16754 echo $f;;
16755 *) # Relative
16756 if test -f "$f"; then
16757 # Build tree
16758 echo $f
16759 elif test -f "$srcdir/$f"; then
16760 # Source tree
16761 echo $srcdir/$f
16762 else
16763 # /dev/null tree
16764 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16765echo "$as_me: error: cannot find input file: $f" >&2;}
16766 { (exit 1); exit 1; }; }
16767 fi;;
16768 esac
16769 done` || { (exit 1); exit 1; }
16770_ACEOF
16771cat >>$CONFIG_STATUS <<_ACEOF
16772 sed "$ac_vpsub
16773$extrasub
16774_ACEOF
16775cat >>$CONFIG_STATUS <<\_ACEOF
16776:t
16777/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16778s,@configure_input@,$configure_input,;t t
16779s,@srcdir@,$ac_srcdir,;t t
16780s,@abs_srcdir@,$ac_abs_srcdir,;t t
16781s,@top_srcdir@,$ac_top_srcdir,;t t
16782s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16783s,@builddir@,$ac_builddir,;t t
16784s,@abs_builddir@,$ac_abs_builddir,;t t
16785s,@top_builddir@,$ac_top_builddir,;t t
16786s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16787s,@INSTALL@,$ac_INSTALL,;t t
16788" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16789 rm -f $tmp/stdin
16790 if test x"$ac_file" != x-; then
16791 mv $tmp/out $ac_file
16792 else
16793 cat $tmp/out
16794 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016795 fi
16796
Martin v. Löwis11437992002-04-12 09:54:03 +000016797done
16798_ACEOF
16799cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016800
Martin v. Löwis11437992002-04-12 09:54:03 +000016801#
16802# CONFIG_HEADER section.
16803#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016804
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016805# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16806# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016807#
16808# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016809ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16810ac_dB='[ ].*$,\1#\2'
16811ac_dC=' '
16812ac_dD=',;t'
16813# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16814ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16815ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016816ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016817ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016818
Martin v. Löwis11437992002-04-12 09:54:03 +000016819for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016820 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016821 case $ac_file in
16822 - | *:- | *:-:* ) # input from stdin
16823 cat >$tmp/stdin
16824 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16825 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16826 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16827 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16828 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016829 esac
16830
Martin v. Löwis11437992002-04-12 09:54:03 +000016831 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16832echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016833
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 # First look for the input files in the build tree, otherwise in the
16835 # src tree.
16836 ac_file_inputs=`IFS=:
16837 for f in $ac_file_in; do
16838 case $f in
16839 -) echo $tmp/stdin ;;
16840 [\\/$]*)
16841 # Absolute (can't be DOS-style, as IFS=:)
16842 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16843echo "$as_me: error: cannot find input file: $f" >&2;}
16844 { (exit 1); exit 1; }; }
16845 echo $f;;
16846 *) # Relative
16847 if test -f "$f"; then
16848 # Build tree
16849 echo $f
16850 elif test -f "$srcdir/$f"; then
16851 # Source tree
16852 echo $srcdir/$f
16853 else
16854 # /dev/null tree
16855 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16856echo "$as_me: error: cannot find input file: $f" >&2;}
16857 { (exit 1); exit 1; }; }
16858 fi;;
16859 esac
16860 done` || { (exit 1); exit 1; }
16861 # Remove the trailing spaces.
16862 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016863
Martin v. Löwis11437992002-04-12 09:54:03 +000016864_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016865
Martin v. Löwis11437992002-04-12 09:54:03 +000016866# Transform confdefs.h into two sed scripts, `conftest.defines' and
16867# `conftest.undefs', that substitutes the proper values into
16868# config.h.in to produce config.h. The first handles `#define'
16869# templates, and the second `#undef' templates.
16870# And first: Protect against being on the right side of a sed subst in
16871# config.status. Protect against being in an unquoted here document
16872# in config.status.
16873rm -f conftest.defines conftest.undefs
16874# Using a here document instead of a string reduces the quoting nightmare.
16875# Putting comments in sed scripts is not portable.
16876#
16877# `end' is used to avoid that the second main sed command (meant for
16878# 0-ary CPP macros) applies to n-ary macro definitions.
16879# See the Autoconf documentation for `clear'.
16880cat >confdef2sed.sed <<\_ACEOF
16881s/[\\&,]/\\&/g
16882s,[\\$`],\\&,g
16883t clear
16884: clear
16885s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16886t end
16887s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16888: end
16889_ACEOF
16890# If some macros were called several times there might be several times
16891# the same #defines, which is useless. Nevertheless, we may not want to
16892# sort them, since we want the *last* AC-DEFINE to be honored.
16893uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16894sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16895rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016896
16897# This sed command replaces #undef with comments. This is necessary, for
16898# example, in the case of _POSIX_SOURCE, which is predefined and required
16899# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016900cat >>conftest.undefs <<\_ACEOF
16901s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16902_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016903
Martin v. Löwis11437992002-04-12 09:54:03 +000016904# Break up conftest.defines because some shells have a limit on the size
16905# of here documents, and old seds have small limits too (100 cmds).
16906echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16907echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16908echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16909echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016910rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016911while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016912do
Martin v. Löwis11437992002-04-12 09:54:03 +000016913 # Write a limited-size here document to $tmp/defines.sed.
16914 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16915 # Speed up: don't consider the non `#define' lines.
16916 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16917 # Work around the forget-to-reset-the-flag bug.
16918 echo 't clr' >>$CONFIG_STATUS
16919 echo ': clr' >>$CONFIG_STATUS
16920 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016921 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016922 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16923 rm -f $tmp/in
16924 mv $tmp/out $tmp/in
16925' >>$CONFIG_STATUS
16926 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16927 rm -f conftest.defines
16928 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016929done
Martin v. Löwis11437992002-04-12 09:54:03 +000016930rm -f conftest.defines
16931echo ' fi # egrep' >>$CONFIG_STATUS
16932echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016933
Martin v. Löwis11437992002-04-12 09:54:03 +000016934# Break up conftest.undefs because some shells have a limit on the size
16935# of here documents, and old seds have small limits too (100 cmds).
16936echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16937rm -f conftest.tail
16938while grep . conftest.undefs >/dev/null
16939do
16940 # Write a limited-size here document to $tmp/undefs.sed.
16941 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16942 # Speed up: don't consider the non `#undef'
16943 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16944 # Work around the forget-to-reset-the-flag bug.
16945 echo 't clr' >>$CONFIG_STATUS
16946 echo ': clr' >>$CONFIG_STATUS
16947 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16948 echo 'CEOF
16949 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16950 rm -f $tmp/in
16951 mv $tmp/out $tmp/in
16952' >>$CONFIG_STATUS
16953 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16954 rm -f conftest.undefs
16955 mv conftest.tail conftest.undefs
16956done
16957rm -f conftest.undefs
16958
16959cat >>$CONFIG_STATUS <<\_ACEOF
16960 # Let's still pretend it is `configure' which instantiates (i.e., don't
16961 # use $as_me), people would be surprised to read:
16962 # /* config.h. Generated by config.status. */
16963 if test x"$ac_file" = x-; then
16964 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016965 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016967 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016968 cat $tmp/in >>$tmp/config.h
16969 rm -f $tmp/in
16970 if test x"$ac_file" != x-; then
16971 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16972 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16973echo "$as_me: $ac_file is unchanged" >&6;}
16974 else
16975 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16976$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16977 X"$ac_file" : 'X\(//\)[^/]' \| \
16978 X"$ac_file" : 'X\(//\)$' \| \
16979 X"$ac_file" : 'X\(/\)' \| \
16980 . : '\(.\)' 2>/dev/null ||
16981echo X"$ac_file" |
16982 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16983 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16984 /^X\(\/\/\)$/{ s//\1/; q; }
16985 /^X\(\/\).*/{ s//\1/; q; }
16986 s/.*/./; q'`
16987 { case "$ac_dir" in
16988 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16989 *) as_incr_dir=.;;
16990esac
16991as_dummy="$ac_dir"
16992for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16993 case $as_mkdir_dir in
16994 # Skip DOS drivespec
16995 ?:) as_incr_dir=$as_mkdir_dir ;;
16996 *)
16997 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16998 test -d "$as_incr_dir" ||
16999 mkdir "$as_incr_dir" ||
17000 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17001echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17002 { (exit 1); exit 1; }; }
17003 ;;
17004 esac
17005done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017006
Martin v. Löwis11437992002-04-12 09:54:03 +000017007 rm -f $ac_file
17008 mv $tmp/config.h $ac_file
17009 fi
17010 else
17011 cat $tmp/config.h
17012 rm -f $tmp/config.h
17013 fi
17014done
17015_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017016
Martin v. Löwis11437992002-04-12 09:54:03 +000017017cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017018
Martin v. Löwis11437992002-04-12 09:54:03 +000017019{ (exit 0); exit 0; }
17020_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017021chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017022ac_clean_files=$ac_clean_files_save
17023
17024
17025# configure is writing to config.log, and then calls config.status.
17026# config.status does its own redirection, appending to config.log.
17027# Unfortunately, on DOS this fails, as config.log is still kept open
17028# by configure, so config.status won't be able to write to it; its
17029# output is simply discarded. So we exec the FD to /dev/null,
17030# effectively closing config.log, so it can be properly (re)opened and
17031# appended to by config.status. When coming back to configure, we
17032# need to make the FD available again.
17033if test "$no_create" != yes; then
17034 ac_cs_success=:
17035 exec 5>/dev/null
17036 $SHELL $CONFIG_STATUS || ac_cs_success=false
17037 exec 5>>config.log
17038 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17039 # would make configure fail if this is the last instruction.
17040 $ac_cs_success || { (exit 1); exit 1; }
17041fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017042
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017043
17044echo "creating Setup"
17045if test ! -f Modules/Setup
17046then
17047 cp $srcdir/Modules/Setup.dist Modules/Setup
17048fi
17049
17050echo "creating Setup.local"
17051if test ! -f Modules/Setup.local
17052then
17053 echo "# Edit this file for local setup changes" >Modules/Setup.local
17054fi
17055
17056echo "creating Makefile"
17057$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17058 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017059 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017060mv config.c Modules