blob: 9d3fb08b296b9c239135fa83aa6324fc11f95e6f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis06a83e92002-04-14 10:19:44 +00002# From configure.in Revision: 1.307 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis11437992002-04-12 09:54:03 +00004# Generated by GNU Autoconf 2.53.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
30# NLS nuisances.
31# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
38(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
256PACKAGE_NAME=
257PACKAGE_TARNAME=
258PACKAGE_VERSION=
259PACKAGE_STRING=
260PACKAGE_BUGREPORT=
261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
764\`configure' configures this package to adapt to many kinds of systems.
765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
820
821 cat <<\_ACEOF
822
823Optional Features:
824 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
825 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
826 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
827 --enable-shared disable/enable building shared python library
828 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
829 --enable-ipv6 Enable ipv6 (with ipv4) support
830 --disable-ipv6 Disable ipv6 support
831 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
832
833Optional Packages:
834 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
835 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
836 --without-gcc never use gcc
837 --with-cxx=<compiler> enable C++ support
838 --with-suffix=.exe set executable suffix
839 --with-pydebug build with Py_DEBUG defined
840 --with-libs='lib1 ...' link against additional libs
841 --with-signal-module disable/enable signal module
842 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
843 --with(out)-threads=DIRECTORY disable/enable thread support
844 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
845 --with-pth use GNU pth threading libraries
846 --with(out)-cycle-gc disable/enable garbage collection
Jack Jansen7b8c7542002-04-14 20:12:41 +0000847 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 --with(out)-pymalloc disable/enable specialized mallocs
849 --with-wctype-functions use wctype.h functions
850 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
851 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
852 --with-fpectl enable SIGFPE catching
853 --with-libm=STRING math library
854 --with-libc=STRING C library
855
856Some influential environment variables:
857 CC C compiler command
858 CFLAGS C compiler flags
859 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
860 nonstandard directory <lib dir>
861 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
862 headers in a nonstandard directory <include dir>
863 CPP C preprocessor
864
865Use these variables to override the choices made by `configure' or to help
866it to find libraries and programs with nonstandard names/locations.
867
868_ACEOF
869fi
870
871if test "$ac_init_help" = "recursive"; then
872 # If there are subdirs, report their specific --help.
873 ac_popdir=`pwd`
874 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
875 test -d $ac_dir || continue
876 ac_builddir=.
877
878if test "$ac_dir" != .; then
879 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
880 # A "../" for each directory in $ac_dir_suffix.
881 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
882else
883 ac_dir_suffix= ac_top_builddir=
884fi
885
886case $srcdir in
887 .) # No --srcdir option. We are building in place.
888 ac_srcdir=.
889 if test -z "$ac_top_builddir"; then
890 ac_top_srcdir=.
891 else
892 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
893 fi ;;
894 [\\/]* | ?:[\\/]* ) # Absolute path.
895 ac_srcdir=$srcdir$ac_dir_suffix;
896 ac_top_srcdir=$srcdir ;;
897 *) # Relative path.
898 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
899 ac_top_srcdir=$ac_top_builddir$srcdir ;;
900esac
901# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
902# absolute.
903ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
904ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
905ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
906ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
907
908 cd $ac_dir
909 # Check for guested configure; otherwise get Cygnus style configure.
910 if test -f $ac_srcdir/configure.gnu; then
911 echo
912 $SHELL $ac_srcdir/configure.gnu --help=recursive
913 elif test -f $ac_srcdir/configure; then
914 echo
915 $SHELL $ac_srcdir/configure --help=recursive
916 elif test -f $ac_srcdir/configure.ac ||
917 test -f $ac_srcdir/configure.in; then
918 echo
919 $ac_configure --help
920 else
921 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
922 fi
923 cd $ac_popdir
924 done
925fi
926
927test -n "$ac_init_help" && exit 0
928if $ac_init_version; then
929 cat <<\_ACEOF
930
931Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
932Free Software Foundation, Inc.
933This configure script is free software; the Free Software Foundation
934gives unlimited permission to copy, distribute and modify it.
935_ACEOF
936 exit 0
937fi
938exec 5>config.log
939cat >&5 <<_ACEOF
940This file contains any messages produced by compilers while
941running configure, to aid debugging if configure makes a mistake.
942
943It was created by $as_me, which was
944generated by GNU Autoconf 2.53. Invocation command line was
945
946 $ $0 $@
947
948_ACEOF
949{
950cat <<_ASUNAME
951## --------- ##
952## Platform. ##
953## --------- ##
954
955hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
956uname -m = `(uname -m) 2>/dev/null || echo unknown`
957uname -r = `(uname -r) 2>/dev/null || echo unknown`
958uname -s = `(uname -s) 2>/dev/null || echo unknown`
959uname -v = `(uname -v) 2>/dev/null || echo unknown`
960
961/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
962/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
963
964/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
965/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
966/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
967hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
968/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
969/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
970/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
971
972_ASUNAME
973
974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
975for as_dir in $PATH
976do
977 IFS=$as_save_IFS
978 test -z "$as_dir" && as_dir=.
979 echo "PATH: $as_dir"
980done
981
982} >&5
983
984cat >&5 <<_ACEOF
985
986
987## ----------- ##
988## Core tests. ##
989## ----------- ##
990
991_ACEOF
992
993
994# Keep a trace of the command line.
995# Strip out --no-create and --no-recursion so they do not pile up.
996# Also quote any args containing shell meta-characters.
997ac_configure_args=
998ac_sep=
999for ac_arg
1000do
1001 case $ac_arg in
1002 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003 | --no-cr | --no-c | -n ) continue ;;
1004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 continue ;;
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1009 esac
1010 case " $ac_configure_args " in
1011 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1012 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1013 ac_sep=" " ;;
1014 esac
1015 # Get rid of the leading space.
1016done
1017
1018# When interrupted or exit'd, cleanup temporary files, and complete
1019# config.log. We remove comments because anyway the quotes in there
1020# would cause problems or look ugly.
1021# WARNING: Be sure not to use single quotes in there, as some shells,
1022# such as our DU 5.0 friend, will then `close' the trap.
1023trap 'exit_status=$?
1024 # Save into config.log some information that might help in debugging.
1025 {
1026 echo
1027 cat <<\_ASBOX
1028## ---------------- ##
1029## Cache variables. ##
1030## ---------------- ##
1031_ASBOX
1032 echo
1033 # The following way of writing the cache mishandles newlines in values,
1034{
1035 (set) 2>&1 |
1036 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1037 *ac_space=\ *)
1038 sed -n \
1039 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1040 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1041 ;;
1042 *)
1043 sed -n \
1044 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1045 ;;
1046 esac;
1047}
1048 echo
1049 if test -s confdefs.h; then
1050 cat <<\_ASBOX
1051## ----------- ##
1052## confdefs.h. ##
1053## ----------- ##
1054_ASBOX
1055 echo
1056 sed "/^$/d" confdefs.h
1057 echo
1058 fi
1059 test "$ac_signal" != 0 &&
1060 echo "$as_me: caught signal $ac_signal"
1061 echo "$as_me: exit $exit_status"
1062 } >&5
1063 rm -f core core.* *.core &&
1064 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1065 exit $exit_status
1066 ' 0
1067for ac_signal in 1 2 13 15; do
1068 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1069done
1070ac_signal=0
1071
1072# confdefs.h avoids OS command line length limits that DEFS can exceed.
1073rm -rf conftest* confdefs.h
1074# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1075echo >confdefs.h
1076
1077# Predefined preprocessor variables.
1078
1079cat >>confdefs.h <<_ACEOF
1080#define PACKAGE_NAME "$PACKAGE_NAME"
1081_ACEOF
1082
1083
1084cat >>confdefs.h <<_ACEOF
1085#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1086_ACEOF
1087
1088
1089cat >>confdefs.h <<_ACEOF
1090#define PACKAGE_VERSION "$PACKAGE_VERSION"
1091_ACEOF
1092
1093
1094cat >>confdefs.h <<_ACEOF
1095#define PACKAGE_STRING "$PACKAGE_STRING"
1096_ACEOF
1097
1098
1099cat >>confdefs.h <<_ACEOF
1100#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1101_ACEOF
1102
1103
1104# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105# Prefer explicitly selected file to automatically selected ones.
1106if test -z "$CONFIG_SITE"; then
1107 if test "x$prefix" != xNONE; then
1108 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1109 else
1110 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1111 fi
1112fi
1113for ac_site_file in $CONFIG_SITE; do
1114 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1116echo "$as_me: loading site script $ac_site_file" >&6;}
1117 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 . "$ac_site_file"
1119 fi
1120done
1121
1122if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # Some versions of bash will fail to source /dev/null (special
1124 # files actually), so we avoid doing that.
1125 if test -f "$cache_file"; then
1126 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1127echo "$as_me: loading cache $cache_file" >&6;}
1128 case $cache_file in
1129 [\\/]* | ?:[\\/]* ) . $cache_file;;
1130 *) . ./$cache_file;;
1131 esac
1132 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133else
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1135echo "$as_me: creating cache $cache_file" >&6;}
1136 >$cache_file
1137fi
1138
1139# Check that the precious variables saved in the cache have kept the same
1140# value.
1141ac_cache_corrupted=false
1142for ac_var in `(set) 2>&1 |
1143 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1144 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1145 eval ac_new_set=\$ac_env_${ac_var}_set
1146 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1147 eval ac_new_val="\$ac_env_${ac_var}_value"
1148 case $ac_old_set,$ac_new_set in
1149 set,)
1150 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1151echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1152 ac_cache_corrupted=: ;;
1153 ,set)
1154 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1155echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1156 ac_cache_corrupted=: ;;
1157 ,);;
1158 *)
1159 if test "x$ac_old_val" != "x$ac_new_val"; then
1160 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1161echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1162 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1163echo "$as_me: former value: $ac_old_val" >&2;}
1164 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1165echo "$as_me: current value: $ac_new_val" >&2;}
1166 ac_cache_corrupted=:
1167 fi;;
1168 esac
1169 # Pass precious variables to config.status.
1170 if test "$ac_new_set" = set; then
1171 case $ac_new_val in
1172 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1173 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1174 *) ac_arg=$ac_var=$ac_new_val ;;
1175 esac
1176 case " $ac_configure_args " in
1177 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1178 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1179 esac
1180 fi
1181done
1182if $ac_cache_corrupted; then
1183 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1184echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1185 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1186echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1187 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188fi
1189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1194ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196
Michael W. Hudson54241132001-12-07 15:38:26 +00001197
1198
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213ac_config_headers="$ac_config_headers pyconfig.h"
1214
1215
1216# This is for stuff that absolutely must end up in pyconfig.h.
1217# Please use pyport.h instead, if possible.
1218
1219
1220
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001221# Set VERSION so we only need to edit in one place (i.e., here)
1222
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001223VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001224
Martin v. Löwis1142de32002-03-29 16:28:31 +00001225
1226SOVERSION=1.0
1227
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001228# Arguments passed to configure.
1229
1230CONFIG_ARGS="$ac_configure_args"
1231
Michael W. Hudson54241132001-12-07 15:38:26 +00001232
Jack Jansene578a632001-08-15 01:27:14 +00001233# Check whether --enable-framework or --disable-framework was given.
1234if test "${enable_framework+set}" = set; then
1235 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001236
Jack Jansene578a632001-08-15 01:27:14 +00001237 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001239 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001240 esac
1241 case $enableval in
1242 no)
1243 PYTHONFRAMEWORK=
1244 PYTHONFRAMEWORKDIR=no-framework
1245 PYTHONFRAMEWORKPREFIX=
1246 PYTHONFRAMEWORKINSTALLDIR=
1247 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001248 ;;
1249 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001250 PYTHONFRAMEWORK=Python
1251 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001252 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001253 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1254 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001255 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001256
Guido van Rossum563e7081996-09-10 18:20:48 +00001257else
Martin v. Löwis11437992002-04-12 09:54:03 +00001258
Jack Jansene578a632001-08-15 01:27:14 +00001259 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001260 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001261 PYTHONFRAMEWORKPREFIX=
1262 PYTHONFRAMEWORKINSTALLDIR=
1263 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001264
Martin v. Löwis11437992002-04-12 09:54:03 +00001265fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001266
1267
1268
1269
Jack Jansene578a632001-08-15 01:27:14 +00001270
1271##AC_ARG_WITH(dyld,
1272##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1273##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001274# Set name for machine-dependent library files
1275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276echo "$as_me:$LINENO: checking MACHDEP" >&5
1277echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001278if test -z "$MACHDEP"
1279then
Guido van Rossum563e7081996-09-10 18:20:48 +00001280 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001281 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001282 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001284 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001285 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001286 ac_md_system=`echo $ac_sys_system |
1287 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1288 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001289 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001290 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001291
Guido van Rossum07397971997-04-29 21:49:50 +00001292 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001293 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001294 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001295 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001296 esac
1297fi
Guido van Rossum91922671997-10-09 20:24:13 +00001298
1299#
1300# SGI compilers allow the specification of the both the ABI and the
1301# ISA on the command line. Depending on the values of these switches,
1302# different and often incompatable code will be generated.
1303#
1304# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1305# thus supply support for various ABI/ISA combinations. The MACHDEP
1306# variable is also adjusted.
1307#
1308
1309if test ! -z "$SGI_ABI"
1310then
1311 CC="cc $SGI_ABI"
1312 LDFLAGS="$SGI_ABI $LDFLAGS"
1313 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1314fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001315echo "$as_me:$LINENO: result: $MACHDEP" >&5
1316echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001317
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001319echo "$as_me:$LINENO: checking for --without-gcc" >&5
1320echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1321
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001322# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001323if test "${with_gcc+set}" = set; then
1324 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001325
Guido van Rossum7f43da71994-08-01 12:15:30 +00001326 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001327 no) CC=cc
1328 without_gcc=yes;;
1329 yes) CC=gcc
1330 without_gcc=no;;
1331 *) CC=$withval
1332 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001334else
Martin v. Löwis11437992002-04-12 09:54:03 +00001335
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001336 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001337 AIX*) CC=cc_r
1338 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001339 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001340 case $BE_HOST_CPU in
1341 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001342 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001343 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +00001344 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001345 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001346 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001347 ;;
1348 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001349 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001350 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001351 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001352 ;;
1353 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001354 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1355echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1356 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001357 ;;
1358 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001359 AR="\$(srcdir)/Modules/ar_beos"
1360 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001361 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001362 Monterey*)
1363 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001364 without_gcc=;;
1365 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001366 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001367fi;
1368echo "$as_me:$LINENO: result: $without_gcc" >&5
1369echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001370
1371
Guido van Rossum95012191999-12-16 17:50:52 +00001372
Fred Drakea1a84e72001-03-06 05:52:16 +00001373MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001374echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1375echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1376
Guido van Rossum95012191999-12-16 17:50:52 +00001377# Check whether --with-cxx or --without-cxx was given.
1378if test "${with_cxx+set}" = set; then
1379 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001380
Martin v. Löwis22352952000-12-13 17:37:02 +00001381 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001382 case $withval in
1383 no) CXX=
1384 with_cxx=no;;
1385 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001386 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001387 with_cxx=$withval;;
1388 esac
1389else
Martin v. Löwis11437992002-04-12 09:54:03 +00001390
Guido van Rossum95012191999-12-16 17:50:52 +00001391 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001392 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394fi;
1395echo "$as_me:$LINENO: result: $with_cxx" >&5
1396echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001397
1398if test "$with_cxx" = "yes"
1399then
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1401echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1402 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001403fi
1404
1405
1406
1407
Martin v. Löwis11437992002-04-12 09:54:03 +00001408if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001409then
1410 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1411do
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 # 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 +00001413set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001414echo "$as_me:$LINENO: checking for $ac_word" >&5
1415echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1416if test "${ac_cv_prog_CXX+set}" = set; then
1417 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001418else
1419 if test -n "$CXX"; then
1420 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1421else
Martin v. Löwis11437992002-04-12 09:54:03 +00001422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1423for as_dir in $PATH
1424do
1425 IFS=$as_save_IFS
1426 test -z "$as_dir" && as_dir=.
1427 for ac_exec_ext in '' $ac_executable_extensions; do
1428 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1429 ac_cv_prog_CXX="$ac_prog"
1430 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1431 break 2
1432 fi
1433done
1434done
1435
Martin v. Löwis22352952000-12-13 17:37:02 +00001436fi
1437fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001438CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001439if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 echo "$as_me:$LINENO: result: $CXX" >&5
1441echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001442else
Martin v. Löwis11437992002-04-12 09:54:03 +00001443 echo "$as_me:$LINENO: result: no" >&5
1444echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001445fi
1446
Martin v. Löwis11437992002-04-12 09:54:03 +00001447 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001448done
1449test -n "$CXX" || CXX="notfound"
1450
1451 if test "$CXX" = "notfound"
1452 then
1453 CXX=
1454 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001455 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001456ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1460 cat >conftest.$ac_ext <<_ACEOF
1461#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001462#include "confdefs.h"
1463
Martin v. Löwis11437992002-04-12 09:54:03 +00001464#ifdef F77_DUMMY_MAIN
1465# ifdef __cplusplus
1466 extern "C"
1467# endif
1468 int F77_DUMMY_MAIN() { return 1; }
1469#endif
1470int
1471main ()
1472{
Michael W. Hudson54241132001-12-07 15:38:26 +00001473
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 ;
1475 return 0;
1476}
1477_ACEOF
1478ac_clean_files_save=$ac_clean_files
1479ac_clean_files="$ac_clean_files a.out a.exe"
1480# Try to create an executable without -o first, disregard a.out.
1481# It will help us diagnose broken compilers, and finding out an intuition
1482# of exeext.
1483echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1484echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1485ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1486if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1487 (eval $ac_link_default) 2>&5
1488 ac_status=$?
1489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1490 (exit $ac_status); }; then
1491 # Find the output, starting from the most likely. This scheme is
1492# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1493# resort.
1494
1495# Be careful to initialize this variable, since it used to be cached.
1496# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1497ac_cv_exeext=
1498for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1499 ls a.out conftest 2>/dev/null;
1500 ls a.* conftest.* 2>/dev/null`; do
1501 case $ac_file in
1502 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1503 a.out ) # We found the default executable, but exeext='' is most
1504 # certainly right.
1505 break;;
1506 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1507 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1508 export ac_cv_exeext
1509 break;;
1510 * ) break;;
1511 esac
1512done
1513else
1514 echo "$as_me: failed program was:" >&5
1515cat conftest.$ac_ext >&5
1516{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1517echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1518 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001519fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001520
1521ac_exeext=$ac_cv_exeext
1522echo "$as_me:$LINENO: result: $ac_file" >&5
1523echo "${ECHO_T}$ac_file" >&6
1524
1525# Check the compiler produces executables we can run. If not, either
1526# the compiler is broken, or we cross compile.
1527echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1528echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1529# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1530# If not cross compiling, check that we can run a simple program.
1531if test "$cross_compiling" != yes; then
1532 if { ac_try='./$ac_file'
1533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1534 (eval $ac_try) 2>&5
1535 ac_status=$?
1536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1537 (exit $ac_status); }; }; then
1538 cross_compiling=no
1539 else
1540 if test "$cross_compiling" = maybe; then
1541 cross_compiling=yes
1542 else
1543 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1544If you meant to cross compile, use \`--host'." >&5
1545echo "$as_me: error: cannot run C++ compiled programs.
1546If you meant to cross compile, use \`--host'." >&2;}
1547 { (exit 1); exit 1; }; }
1548 fi
1549 fi
1550fi
1551echo "$as_me:$LINENO: result: yes" >&5
1552echo "${ECHO_T}yes" >&6
1553
1554rm -f a.out a.exe conftest$ac_cv_exeext
1555ac_clean_files=$ac_clean_files_save
1556# Check the compiler produces executables we can run. If not, either
1557# the compiler is broken, or we cross compile.
1558echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1559echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1560echo "$as_me:$LINENO: result: $cross_compiling" >&5
1561echo "${ECHO_T}$cross_compiling" >&6
1562
1563echo "$as_me:$LINENO: checking for suffix of executables" >&5
1564echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1565if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1566 (eval $ac_link) 2>&5
1567 ac_status=$?
1568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1569 (exit $ac_status); }; then
1570 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1571# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1572# work properly (i.e., refer to `conftest.exe'), while it won't with
1573# `rm'.
1574for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1575 case $ac_file in
1576 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1577 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1578 export ac_cv_exeext
1579 break;;
1580 * ) break;;
1581 esac
1582done
1583else
1584 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1585echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1586 { (exit 1); exit 1; }; }
1587fi
1588
1589rm -f conftest$ac_cv_exeext
1590echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1591echo "${ECHO_T}$ac_cv_exeext" >&6
1592
1593rm -f conftest.$ac_ext
1594EXEEXT=$ac_cv_exeext
1595ac_exeext=$EXEEXT
1596
1597 ac_ext=c
1598ac_cpp='$CPP $CPPFLAGS'
1599ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1600ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1601ac_compiler_gnu=$ac_cv_c_compiler_gnu
1602
1603
Martin v. Löwis22352952000-12-13 17:37:02 +00001604
1605 fi
1606fi
1607
Guido van Rossum8b131c51995-03-09 14:10:13 +00001608# If the user switches compilers, we can't believe the cache
1609if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1610then
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1612(it is also a good idea to do 'make clean' before compiling)" >&5
1613echo "$as_me: error: cached CC is different -- throw away $cache_file
1614(it is also a good idea to do 'make clean' before compiling)" >&2;}
1615 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001616fi
1617
Martin v. Löwis11437992002-04-12 09:54:03 +00001618ac_ext=c
1619ac_cpp='$CPP $CPPFLAGS'
1620ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1621ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1622ac_compiler_gnu=$ac_cv_c_compiler_gnu
1623if test -n "$ac_tool_prefix"; then
1624 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1625set dummy ${ac_tool_prefix}gcc; ac_word=$2
1626echo "$as_me:$LINENO: checking for $ac_word" >&5
1627echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1628if test "${ac_cv_prog_CC+set}" = set; then
1629 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001630else
1631 if test -n "$CC"; then
1632 ac_cv_prog_CC="$CC" # Let the user override the test.
1633else
Martin v. Löwis11437992002-04-12 09:54:03 +00001634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1635for as_dir in $PATH
1636do
1637 IFS=$as_save_IFS
1638 test -z "$as_dir" && as_dir=.
1639 for ac_exec_ext in '' $ac_executable_extensions; do
1640 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1641 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1642 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1643 break 2
1644 fi
1645done
1646done
1647
Jack Jansendd19cf82001-12-06 22:36:17 +00001648fi
1649fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001650CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001651if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001652 echo "$as_me:$LINENO: result: $CC" >&5
1653echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001654else
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 echo "$as_me:$LINENO: result: no" >&5
1656echo "${ECHO_T}no" >&6
1657fi
1658
1659fi
1660if test -z "$ac_cv_prog_CC"; then
1661 ac_ct_CC=$CC
1662 # Extract the first word of "gcc", so it can be a program name with args.
1663set dummy gcc; ac_word=$2
1664echo "$as_me:$LINENO: checking for $ac_word" >&5
1665echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1666if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1667 echo $ECHO_N "(cached) $ECHO_C" >&6
1668else
1669 if test -n "$ac_ct_CC"; then
1670 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1671else
1672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1673for as_dir in $PATH
1674do
1675 IFS=$as_save_IFS
1676 test -z "$as_dir" && as_dir=.
1677 for ac_exec_ext in '' $ac_executable_extensions; do
1678 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1679 ac_cv_prog_ac_ct_CC="gcc"
1680 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1681 break 2
1682 fi
1683done
1684done
1685
1686fi
1687fi
1688ac_ct_CC=$ac_cv_prog_ac_ct_CC
1689if test -n "$ac_ct_CC"; then
1690 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1691echo "${ECHO_T}$ac_ct_CC" >&6
1692else
1693 echo "$as_me:$LINENO: result: no" >&5
1694echo "${ECHO_T}no" >&6
1695fi
1696
1697 CC=$ac_ct_CC
1698else
1699 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001700fi
1701
Jack Jansendd19cf82001-12-06 22:36:17 +00001702if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001703 if test -n "$ac_tool_prefix"; then
1704 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1705set dummy ${ac_tool_prefix}cc; ac_word=$2
1706echo "$as_me:$LINENO: checking for $ac_word" >&5
1707echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1708if test "${ac_cv_prog_CC+set}" = set; then
1709 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001710else
1711 if test -n "$CC"; then
1712 ac_cv_prog_CC="$CC" # Let the user override the test.
1713else
Martin v. Löwis11437992002-04-12 09:54:03 +00001714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1715for as_dir in $PATH
1716do
1717 IFS=$as_save_IFS
1718 test -z "$as_dir" && as_dir=.
1719 for ac_exec_ext in '' $ac_executable_extensions; do
1720 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1721 ac_cv_prog_CC="${ac_tool_prefix}cc"
1722 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1723 break 2
1724 fi
1725done
1726done
1727
1728fi
1729fi
1730CC=$ac_cv_prog_CC
1731if test -n "$CC"; then
1732 echo "$as_me:$LINENO: result: $CC" >&5
1733echo "${ECHO_T}$CC" >&6
1734else
1735 echo "$as_me:$LINENO: result: no" >&5
1736echo "${ECHO_T}no" >&6
1737fi
1738
1739fi
1740if test -z "$ac_cv_prog_CC"; then
1741 ac_ct_CC=$CC
1742 # Extract the first word of "cc", so it can be a program name with args.
1743set dummy cc; ac_word=$2
1744echo "$as_me:$LINENO: checking for $ac_word" >&5
1745echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1746if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1747 echo $ECHO_N "(cached) $ECHO_C" >&6
1748else
1749 if test -n "$ac_ct_CC"; then
1750 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1751else
1752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1753for as_dir in $PATH
1754do
1755 IFS=$as_save_IFS
1756 test -z "$as_dir" && as_dir=.
1757 for ac_exec_ext in '' $ac_executable_extensions; do
1758 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1759 ac_cv_prog_ac_ct_CC="cc"
1760 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1761 break 2
1762 fi
1763done
1764done
1765
1766fi
1767fi
1768ac_ct_CC=$ac_cv_prog_ac_ct_CC
1769if test -n "$ac_ct_CC"; then
1770 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1771echo "${ECHO_T}$ac_ct_CC" >&6
1772else
1773 echo "$as_me:$LINENO: result: no" >&5
1774echo "${ECHO_T}no" >&6
1775fi
1776
1777 CC=$ac_ct_CC
1778else
1779 CC="$ac_cv_prog_CC"
1780fi
1781
1782fi
1783if test -z "$CC"; then
1784 # Extract the first word of "cc", so it can be a program name with args.
1785set dummy cc; ac_word=$2
1786echo "$as_me:$LINENO: checking for $ac_word" >&5
1787echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1788if test "${ac_cv_prog_CC+set}" = set; then
1789 echo $ECHO_N "(cached) $ECHO_C" >&6
1790else
1791 if test -n "$CC"; then
1792 ac_cv_prog_CC="$CC" # Let the user override the test.
1793else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001794 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1796for as_dir in $PATH
1797do
1798 IFS=$as_save_IFS
1799 test -z "$as_dir" && as_dir=.
1800 for ac_exec_ext in '' $ac_executable_extensions; do
1801 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1802 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1803 ac_prog_rejected=yes
1804 continue
1805 fi
1806 ac_cv_prog_CC="cc"
1807 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1808 break 2
1809 fi
1810done
1811done
1812
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001813if test $ac_prog_rejected = yes; then
1814 # We found a bogon in the path, so make sure we never use it.
1815 set dummy $ac_cv_prog_CC
1816 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001817 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001818 # We chose a different compiler from the bogus one.
1819 # However, it has the same basename, so the bogon will be chosen
1820 # first if we set CC to just the basename; use the full file name.
1821 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001822 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001823 shift
1824 ac_cv_prog_CC="$@"
1825 fi
1826fi
1827fi
1828fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001829CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001830if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001831 echo "$as_me:$LINENO: result: $CC" >&5
1832echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001833else
Martin v. Löwis11437992002-04-12 09:54:03 +00001834 echo "$as_me:$LINENO: result: no" >&5
1835echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001836fi
1837
Martin v. Löwis11437992002-04-12 09:54:03 +00001838fi
1839if test -z "$CC"; then
1840 if test -n "$ac_tool_prefix"; then
1841 for ac_prog in cl
1842 do
1843 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1844set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1845echo "$as_me:$LINENO: checking for $ac_word" >&5
1846echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1847if test "${ac_cv_prog_CC+set}" = set; then
1848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001849else
1850 if test -n "$CC"; then
1851 ac_cv_prog_CC="$CC" # Let the user override the test.
1852else
Martin v. Löwis11437992002-04-12 09:54:03 +00001853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1854for as_dir in $PATH
1855do
1856 IFS=$as_save_IFS
1857 test -z "$as_dir" && as_dir=.
1858 for ac_exec_ext in '' $ac_executable_extensions; do
1859 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1860 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1861 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1862 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001864done
1865done
1866
1867fi
1868fi
1869CC=$ac_cv_prog_CC
1870if test -n "$CC"; then
1871 echo "$as_me:$LINENO: result: $CC" >&5
1872echo "${ECHO_T}$CC" >&6
1873else
1874 echo "$as_me:$LINENO: result: no" >&5
1875echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001876fi
1877
Martin v. Löwis11437992002-04-12 09:54:03 +00001878 test -n "$CC" && break
1879 done
1880fi
1881if test -z "$CC"; then
1882 ac_ct_CC=$CC
1883 for ac_prog in cl
1884do
1885 # Extract the first word of "$ac_prog", so it can be a program name with args.
1886set dummy $ac_prog; ac_word=$2
1887echo "$as_me:$LINENO: checking for $ac_word" >&5
1888echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1889if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1890 echo $ECHO_N "(cached) $ECHO_C" >&6
1891else
1892 if test -n "$ac_ct_CC"; then
1893 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1894else
1895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1896for as_dir in $PATH
1897do
1898 IFS=$as_save_IFS
1899 test -z "$as_dir" && as_dir=.
1900 for ac_exec_ext in '' $ac_executable_extensions; do
1901 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1902 ac_cv_prog_ac_ct_CC="$ac_prog"
1903 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1904 break 2
1905 fi
1906done
1907done
Jack Jansendd19cf82001-12-06 22:36:17 +00001908
Martin v. Löwis11437992002-04-12 09:54:03 +00001909fi
1910fi
1911ac_ct_CC=$ac_cv_prog_ac_ct_CC
1912if test -n "$ac_ct_CC"; then
1913 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1914echo "${ECHO_T}$ac_ct_CC" >&6
1915else
1916 echo "$as_me:$LINENO: result: no" >&5
1917echo "${ECHO_T}no" >&6
1918fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001919
Martin v. Löwis11437992002-04-12 09:54:03 +00001920 test -n "$ac_ct_CC" && break
1921done
Michael W. Hudson54241132001-12-07 15:38:26 +00001922
Martin v. Löwis11437992002-04-12 09:54:03 +00001923 CC=$ac_ct_CC
1924fi
1925
1926fi
1927
1928
1929test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1930echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1931 { (exit 1); exit 1; }; }
1932
1933# Provide some information about the compiler.
1934echo "$as_me:$LINENO:" \
1935 "checking for C compiler version" >&5
1936ac_compiler=`set X $ac_compile; echo $2`
1937{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1938 (eval $ac_compiler --version </dev/null >&5) 2>&5
1939 ac_status=$?
1940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1941 (exit $ac_status); }
1942{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1943 (eval $ac_compiler -v </dev/null >&5) 2>&5
1944 ac_status=$?
1945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1946 (exit $ac_status); }
1947{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1948 (eval $ac_compiler -V </dev/null >&5) 2>&5
1949 ac_status=$?
1950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1951 (exit $ac_status); }
1952
1953cat >conftest.$ac_ext <<_ACEOF
1954#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001955#include "confdefs.h"
1956
Martin v. Löwis11437992002-04-12 09:54:03 +00001957#ifdef F77_DUMMY_MAIN
1958# ifdef __cplusplus
1959 extern "C"
1960# endif
1961 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001963int
1964main ()
1965{
1966
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971ac_clean_files_save=$ac_clean_files
1972ac_clean_files="$ac_clean_files a.out a.exe"
1973# Try to create an executable without -o first, disregard a.out.
1974# It will help us diagnose broken compilers, and finding out an intuition
1975# of exeext.
1976echo "$as_me:$LINENO: checking for C compiler default output" >&5
1977echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1978ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1979if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1980 (eval $ac_link_default) 2>&5
1981 ac_status=$?
1982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1983 (exit $ac_status); }; then
1984 # Find the output, starting from the most likely. This scheme is
1985# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1986# resort.
1987
1988# Be careful to initialize this variable, since it used to be cached.
1989# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1990ac_cv_exeext=
1991for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1992 ls a.out conftest 2>/dev/null;
1993 ls a.* conftest.* 2>/dev/null`; do
1994 case $ac_file in
1995 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1996 a.out ) # We found the default executable, but exeext='' is most
1997 # certainly right.
1998 break;;
1999 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2000 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2001 export ac_cv_exeext
2002 break;;
2003 * ) break;;
2004 esac
2005done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002006else
Martin v. Löwis11437992002-04-12 09:54:03 +00002007 echo "$as_me: failed program was:" >&5
2008cat conftest.$ac_ext >&5
2009{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2010echo "$as_me: error: C compiler cannot create executables" >&2;}
2011 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002012fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002013
Martin v. Löwis11437992002-04-12 09:54:03 +00002014ac_exeext=$ac_cv_exeext
2015echo "$as_me:$LINENO: result: $ac_file" >&5
2016echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002017
Martin v. Löwis11437992002-04-12 09:54:03 +00002018# Check the compiler produces executables we can run. If not, either
2019# the compiler is broken, or we cross compile.
2020echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2021echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2022# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2023# If not cross compiling, check that we can run a simple program.
2024if test "$cross_compiling" != yes; then
2025 if { ac_try='./$ac_file'
2026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2027 (eval $ac_try) 2>&5
2028 ac_status=$?
2029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2030 (exit $ac_status); }; }; then
2031 cross_compiling=no
2032 else
2033 if test "$cross_compiling" = maybe; then
2034 cross_compiling=yes
2035 else
2036 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2037If you meant to cross compile, use \`--host'." >&5
2038echo "$as_me: error: cannot run C compiled programs.
2039If you meant to cross compile, use \`--host'." >&2;}
2040 { (exit 1); exit 1; }; }
2041 fi
2042 fi
2043fi
2044echo "$as_me:$LINENO: result: yes" >&5
2045echo "${ECHO_T}yes" >&6
2046
2047rm -f a.out a.exe conftest$ac_cv_exeext
2048ac_clean_files=$ac_clean_files_save
2049# Check the compiler produces executables we can run. If not, either
2050# the compiler is broken, or we cross compile.
2051echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2052echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2053echo "$as_me:$LINENO: result: $cross_compiling" >&5
2054echo "${ECHO_T}$cross_compiling" >&6
2055
2056echo "$as_me:$LINENO: checking for suffix of executables" >&5
2057echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2059 (eval $ac_link) 2>&5
2060 ac_status=$?
2061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2062 (exit $ac_status); }; then
2063 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2064# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2065# work properly (i.e., refer to `conftest.exe'), while it won't with
2066# `rm'.
2067for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2068 case $ac_file in
2069 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2070 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2071 export ac_cv_exeext
2072 break;;
2073 * ) break;;
2074 esac
2075done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002076else
Martin v. Löwis11437992002-04-12 09:54:03 +00002077 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2078echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2079 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002080fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002081
Martin v. Löwis11437992002-04-12 09:54:03 +00002082rm -f conftest$ac_cv_exeext
2083echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2084echo "${ECHO_T}$ac_cv_exeext" >&6
2085
2086rm -f conftest.$ac_ext
2087EXEEXT=$ac_cv_exeext
2088ac_exeext=$EXEEXT
2089echo "$as_me:$LINENO: checking for suffix of object files" >&5
2090echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2091if test "${ac_cv_objext+set}" = set; then
2092 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002093else
Martin v. Löwis11437992002-04-12 09:54:03 +00002094 cat >conftest.$ac_ext <<_ACEOF
2095#line $LINENO "configure"
2096#include "confdefs.h"
2097
2098#ifdef F77_DUMMY_MAIN
2099# ifdef __cplusplus
2100 extern "C"
2101# endif
2102 int F77_DUMMY_MAIN() { return 1; }
2103#endif
2104int
2105main ()
2106{
2107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112rm -f conftest.o conftest.obj
2113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2114 (eval $ac_compile) 2>&5
2115 ac_status=$?
2116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2117 (exit $ac_status); }; then
2118 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2119 case $ac_file in
2120 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2121 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2122 break;;
2123 esac
2124done
2125else
2126 echo "$as_me: failed program was:" >&5
2127cat conftest.$ac_ext >&5
2128{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2129echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2130 { (exit 1); exit 1; }; }
2131fi
2132
2133rm -f conftest.$ac_cv_objext conftest.$ac_ext
2134fi
2135echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2136echo "${ECHO_T}$ac_cv_objext" >&6
2137OBJEXT=$ac_cv_objext
2138ac_objext=$OBJEXT
2139echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2140echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2141if test "${ac_cv_c_compiler_gnu+set}" = set; then
2142 echo $ECHO_N "(cached) $ECHO_C" >&6
2143else
2144 cat >conftest.$ac_ext <<_ACEOF
2145#line $LINENO "configure"
2146#include "confdefs.h"
2147
2148#ifdef F77_DUMMY_MAIN
2149# ifdef __cplusplus
2150 extern "C"
2151# endif
2152 int F77_DUMMY_MAIN() { return 1; }
2153#endif
2154int
2155main ()
2156{
2157#ifndef __GNUC__
2158 choke me
2159#endif
2160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165rm -f conftest.$ac_objext
2166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2167 (eval $ac_compile) 2>&5
2168 ac_status=$?
2169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2170 (exit $ac_status); } &&
2171 { ac_try='test -s conftest.$ac_objext'
2172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2173 (eval $ac_try) 2>&5
2174 ac_status=$?
2175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2176 (exit $ac_status); }; }; then
2177 ac_compiler_gnu=yes
2178else
2179 echo "$as_me: failed program was:" >&5
2180cat conftest.$ac_ext >&5
2181ac_compiler_gnu=no
2182fi
2183rm -f conftest.$ac_objext conftest.$ac_ext
2184ac_cv_c_compiler_gnu=$ac_compiler_gnu
2185
2186fi
2187echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2188echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2189GCC=`test $ac_compiler_gnu = yes && echo yes`
2190ac_test_CFLAGS=${CFLAGS+set}
2191ac_save_CFLAGS=$CFLAGS
2192CFLAGS="-g"
2193echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2194echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2195if test "${ac_cv_prog_cc_g+set}" = set; then
2196 echo $ECHO_N "(cached) $ECHO_C" >&6
2197else
2198 cat >conftest.$ac_ext <<_ACEOF
2199#line $LINENO "configure"
2200#include "confdefs.h"
2201
2202#ifdef F77_DUMMY_MAIN
2203# ifdef __cplusplus
2204 extern "C"
2205# endif
2206 int F77_DUMMY_MAIN() { return 1; }
2207#endif
2208int
2209main ()
2210{
2211
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216rm -f conftest.$ac_objext
2217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2218 (eval $ac_compile) 2>&5
2219 ac_status=$?
2220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2221 (exit $ac_status); } &&
2222 { ac_try='test -s conftest.$ac_objext'
2223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2224 (eval $ac_try) 2>&5
2225 ac_status=$?
2226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2227 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002228 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002229else
Martin v. Löwis11437992002-04-12 09:54:03 +00002230 echo "$as_me: failed program was:" >&5
2231cat conftest.$ac_ext >&5
2232ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002234rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002235fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002236echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2237echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002238if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002239 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002240elif test $ac_cv_prog_cc_g = yes; then
2241 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002242 CFLAGS="-g -O2"
2243 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002244 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002245 fi
2246else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002247 if test "$GCC" = yes; then
2248 CFLAGS="-O2"
2249 else
2250 CFLAGS=
2251 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002252fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002253# Some people use a C++ compiler to compile C. Since we use `exit',
2254# in C++ we need to declare it. In case someone uses the same compiler
2255# for both compiling C and C++ we need to have the C++ compiler decide
2256# the declaration of exit, since it's the most demanding environment.
2257cat >conftest.$ac_ext <<_ACEOF
2258#ifndef __cplusplus
2259 choke me
2260#endif
2261_ACEOF
2262rm -f conftest.$ac_objext
2263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2264 (eval $ac_compile) 2>&5
2265 ac_status=$?
2266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2267 (exit $ac_status); } &&
2268 { ac_try='test -s conftest.$ac_objext'
2269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2270 (eval $ac_try) 2>&5
2271 ac_status=$?
2272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2273 (exit $ac_status); }; }; then
2274 for ac_declaration in \
2275 ''\
2276 '#include <stdlib.h>' \
2277 'extern "C" void std::exit (int) throw (); using std::exit;' \
2278 'extern "C" void std::exit (int); using std::exit;' \
2279 'extern "C" void exit (int) throw ();' \
2280 'extern "C" void exit (int);' \
2281 'void exit (int);'
2282do
2283 cat >conftest.$ac_ext <<_ACEOF
2284#line $LINENO "configure"
2285#include "confdefs.h"
2286#include <stdlib.h>
2287$ac_declaration
2288#ifdef F77_DUMMY_MAIN
2289# ifdef __cplusplus
2290 extern "C"
2291# endif
2292 int F77_DUMMY_MAIN() { return 1; }
2293#endif
2294int
2295main ()
2296{
2297exit (42);
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302rm -f conftest.$ac_objext
2303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2304 (eval $ac_compile) 2>&5
2305 ac_status=$?
2306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2307 (exit $ac_status); } &&
2308 { ac_try='test -s conftest.$ac_objext'
2309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2310 (eval $ac_try) 2>&5
2311 ac_status=$?
2312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2313 (exit $ac_status); }; }; then
2314 :
2315else
2316 echo "$as_me: failed program was:" >&5
2317cat conftest.$ac_ext >&5
2318continue
2319fi
2320rm -f conftest.$ac_objext conftest.$ac_ext
2321 cat >conftest.$ac_ext <<_ACEOF
2322#line $LINENO "configure"
2323#include "confdefs.h"
2324$ac_declaration
2325#ifdef F77_DUMMY_MAIN
2326# ifdef __cplusplus
2327 extern "C"
2328# endif
2329 int F77_DUMMY_MAIN() { return 1; }
2330#endif
2331int
2332main ()
2333{
2334exit (42);
2335 ;
2336 return 0;
2337}
2338_ACEOF
2339rm -f conftest.$ac_objext
2340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2341 (eval $ac_compile) 2>&5
2342 ac_status=$?
2343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2344 (exit $ac_status); } &&
2345 { ac_try='test -s conftest.$ac_objext'
2346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2347 (eval $ac_try) 2>&5
2348 ac_status=$?
2349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2350 (exit $ac_status); }; }; then
2351 break
2352else
2353 echo "$as_me: failed program was:" >&5
2354cat conftest.$ac_ext >&5
2355fi
2356rm -f conftest.$ac_objext conftest.$ac_ext
2357done
2358rm -f conftest*
2359if test -n "$ac_declaration"; then
2360 echo '#ifdef __cplusplus' >>confdefs.h
2361 echo $ac_declaration >>confdefs.h
2362 echo '#endif' >>confdefs.h
2363fi
2364
2365else
2366 echo "$as_me: failed program was:" >&5
2367cat conftest.$ac_ext >&5
2368fi
2369rm -f conftest.$ac_objext conftest.$ac_ext
2370ac_ext=c
2371ac_cpp='$CPP $CPPFLAGS'
2372ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2373ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2374ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002375
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002376
2377# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379ac_ext=c
2380ac_cpp='$CPP $CPPFLAGS'
2381ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2382ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2383ac_compiler_gnu=$ac_cv_c_compiler_gnu
2384echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2385echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002386# On Suns, sometimes $CPP names a directory.
2387if test -n "$CPP" && test -d "$CPP"; then
2388 CPP=
2389fi
2390if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002391 if test "${ac_cv_prog_CPP+set}" = set; then
2392 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002393else
Martin v. Löwis11437992002-04-12 09:54:03 +00002394 # Double quotes because CPP needs to be expanded
2395 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2396 do
2397 ac_preproc_ok=false
2398for ac_c_preproc_warn_flag in '' yes
2399do
2400 # Use a header file that comes with gcc, so configuring glibc
2401 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002402 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002403 # not just through cpp. "Syntax error" is here to catch this case.
2404 cat >conftest.$ac_ext <<_ACEOF
2405#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002406#include "confdefs.h"
2407#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002408 Syntax error
2409_ACEOF
2410if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2411 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2412 ac_status=$?
2413 egrep -v '^ *\+' conftest.er1 >conftest.err
2414 rm -f conftest.er1
2415 cat conftest.err >&5
2416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2417 (exit $ac_status); } >/dev/null; then
2418 if test -s conftest.err; then
2419 ac_cpp_err=$ac_c_preproc_warn_flag
2420 else
2421 ac_cpp_err=
2422 fi
2423else
2424 ac_cpp_err=yes
2425fi
2426if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002427 :
2428else
Martin v. Löwis11437992002-04-12 09:54:03 +00002429 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002430 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 # Broken: fails on valid input.
2432continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002434rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002435
Martin v. Löwis11437992002-04-12 09:54:03 +00002436 # OK, works on sane cases. Now check whether non-existent headers
2437 # can be detected and how.
2438 cat >conftest.$ac_ext <<_ACEOF
2439#line $LINENO "configure"
2440#include "confdefs.h"
2441#include <ac_nonexistent.h>
2442_ACEOF
2443if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2444 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2445 ac_status=$?
2446 egrep -v '^ *\+' conftest.er1 >conftest.err
2447 rm -f conftest.er1
2448 cat conftest.err >&5
2449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2450 (exit $ac_status); } >/dev/null; then
2451 if test -s conftest.err; then
2452 ac_cpp_err=$ac_c_preproc_warn_flag
2453 else
2454 ac_cpp_err=
2455 fi
2456else
2457 ac_cpp_err=yes
2458fi
2459if test -z "$ac_cpp_err"; then
2460 # Broken: success on invalid input.
2461continue
2462else
2463 echo "$as_me: failed program was:" >&5
2464 cat conftest.$ac_ext >&5
2465 # Passes both tests.
2466ac_preproc_ok=:
2467break
2468fi
2469rm -f conftest.err conftest.$ac_ext
2470
2471done
2472# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2473rm -f conftest.err conftest.$ac_ext
2474if $ac_preproc_ok; then
2475 break
2476fi
2477
2478 done
2479 ac_cv_prog_CPP=$CPP
2480
2481fi
2482 CPP=$ac_cv_prog_CPP
2483else
2484 ac_cv_prog_CPP=$CPP
2485fi
2486echo "$as_me:$LINENO: result: $CPP" >&5
2487echo "${ECHO_T}$CPP" >&6
2488ac_preproc_ok=false
2489for ac_c_preproc_warn_flag in '' yes
2490do
2491 # Use a header file that comes with gcc, so configuring glibc
2492 # with a fresh cross-compiler works.
2493 # On the NeXT, cc -E runs the code through the compiler's parser,
2494 # not just through cpp. "Syntax error" is here to catch this case.
2495 cat >conftest.$ac_ext <<_ACEOF
2496#line $LINENO "configure"
2497#include "confdefs.h"
2498#include <assert.h>
2499 Syntax error
2500_ACEOF
2501if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2502 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2503 ac_status=$?
2504 egrep -v '^ *\+' conftest.er1 >conftest.err
2505 rm -f conftest.er1
2506 cat conftest.err >&5
2507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2508 (exit $ac_status); } >/dev/null; then
2509 if test -s conftest.err; then
2510 ac_cpp_err=$ac_c_preproc_warn_flag
2511 else
2512 ac_cpp_err=
2513 fi
2514else
2515 ac_cpp_err=yes
2516fi
2517if test -z "$ac_cpp_err"; then
2518 :
2519else
2520 echo "$as_me: failed program was:" >&5
2521 cat conftest.$ac_ext >&5
2522 # Broken: fails on valid input.
2523continue
2524fi
2525rm -f conftest.err conftest.$ac_ext
2526
2527 # OK, works on sane cases. Now check whether non-existent headers
2528 # can be detected and how.
2529 cat >conftest.$ac_ext <<_ACEOF
2530#line $LINENO "configure"
2531#include "confdefs.h"
2532#include <ac_nonexistent.h>
2533_ACEOF
2534if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2535 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2536 ac_status=$?
2537 egrep -v '^ *\+' conftest.er1 >conftest.err
2538 rm -f conftest.er1
2539 cat conftest.err >&5
2540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2541 (exit $ac_status); } >/dev/null; then
2542 if test -s conftest.err; then
2543 ac_cpp_err=$ac_c_preproc_warn_flag
2544 else
2545 ac_cpp_err=
2546 fi
2547else
2548 ac_cpp_err=yes
2549fi
2550if test -z "$ac_cpp_err"; then
2551 # Broken: success on invalid input.
2552continue
2553else
2554 echo "$as_me: failed program was:" >&5
2555 cat conftest.$ac_ext >&5
2556 # Passes both tests.
2557ac_preproc_ok=:
2558break
2559fi
2560rm -f conftest.err conftest.$ac_ext
2561
2562done
2563# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2564rm -f conftest.err conftest.$ac_ext
2565if $ac_preproc_ok; then
2566 :
2567else
2568 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2569echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2570 { (exit 1); exit 1; }; }
2571fi
2572
2573ac_ext=c
2574ac_cpp='$CPP $CPPFLAGS'
2575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2577ac_compiler_gnu=$ac_cv_c_compiler_gnu
2578
2579
2580
2581echo "$as_me:$LINENO: checking for AIX" >&5
2582echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2583cat >conftest.$ac_ext <<_ACEOF
2584#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002585#include "confdefs.h"
2586#ifdef _AIX
2587 yes
2588#endif
2589
Martin v. Löwis11437992002-04-12 09:54:03 +00002590_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002591if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2592 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 echo "$as_me:$LINENO: result: yes" >&5
2594echo "${ECHO_T}yes" >&6
2595cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002596#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002597_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002598
2599else
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 echo "$as_me:$LINENO: result: no" >&5
2601echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002602fi
2603rm -f conftest*
2604
Michael W. Hudson54241132001-12-07 15:38:26 +00002605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2607echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2608if test "${ac_cv_header_stdc+set}" = set; then
2609 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002610else
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 cat >conftest.$ac_ext <<_ACEOF
2612#line $LINENO "configure"
2613#include "confdefs.h"
2614#include <stdlib.h>
2615#include <stdarg.h>
2616#include <string.h>
2617#include <float.h>
2618
2619_ACEOF
2620if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2621 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2622 ac_status=$?
2623 egrep -v '^ *\+' conftest.er1 >conftest.err
2624 rm -f conftest.er1
2625 cat conftest.err >&5
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); } >/dev/null; then
2628 if test -s conftest.err; then
2629 ac_cpp_err=$ac_c_preproc_warn_flag
2630 else
2631 ac_cpp_err=
2632 fi
2633else
2634 ac_cpp_err=yes
2635fi
2636if test -z "$ac_cpp_err"; then
2637 ac_cv_header_stdc=yes
2638else
2639 echo "$as_me: failed program was:" >&5
2640 cat conftest.$ac_ext >&5
2641 ac_cv_header_stdc=no
2642fi
2643rm -f conftest.err conftest.$ac_ext
2644
2645if test $ac_cv_header_stdc = yes; then
2646 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2647 cat >conftest.$ac_ext <<_ACEOF
2648#line $LINENO "configure"
2649#include "confdefs.h"
2650#include <string.h>
2651
2652_ACEOF
2653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2654 egrep "memchr" >/dev/null 2>&1; then
2655 :
2656else
2657 ac_cv_header_stdc=no
2658fi
2659rm -f conftest*
2660
2661fi
2662
2663if test $ac_cv_header_stdc = yes; then
2664 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2665 cat >conftest.$ac_ext <<_ACEOF
2666#line $LINENO "configure"
2667#include "confdefs.h"
2668#include <stdlib.h>
2669
2670_ACEOF
2671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2672 egrep "free" >/dev/null 2>&1; then
2673 :
2674else
2675 ac_cv_header_stdc=no
2676fi
2677rm -f conftest*
2678
2679fi
2680
2681if test $ac_cv_header_stdc = yes; then
2682 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2683 if test "$cross_compiling" = yes; then
2684 :
2685else
2686 cat >conftest.$ac_ext <<_ACEOF
2687#line $LINENO "configure"
2688#include "confdefs.h"
2689#include <ctype.h>
2690#if ((' ' & 0x0FF) == 0x020)
2691# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2692# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2693#else
2694# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2695 || ('j' <= (c) && (c) <= 'r') \
2696 || ('s' <= (c) && (c) <= 'z'))
2697# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2698#endif
2699
2700#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2701int
2702main ()
2703{
2704 int i;
2705 for (i = 0; i < 256; i++)
2706 if (XOR (islower (i), ISLOWER (i))
2707 || toupper (i) != TOUPPER (i))
2708 exit(2);
2709 exit (0);
2710}
2711_ACEOF
2712rm -f conftest$ac_exeext
2713if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2714 (eval $ac_link) 2>&5
2715 ac_status=$?
2716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2717 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2719 (eval $ac_try) 2>&5
2720 ac_status=$?
2721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2722 (exit $ac_status); }; }; then
2723 :
2724else
2725 echo "$as_me: program exited with status $ac_status" >&5
2726echo "$as_me: failed program was:" >&5
2727cat conftest.$ac_ext >&5
2728( exit $ac_status )
2729ac_cv_header_stdc=no
2730fi
2731rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2732fi
2733fi
2734fi
2735echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2736echo "${ECHO_T}$ac_cv_header_stdc" >&6
2737if test $ac_cv_header_stdc = yes; then
2738
2739cat >>confdefs.h <<\_ACEOF
2740#define STDC_HEADERS 1
2741_ACEOF
2742
2743fi
2744
2745# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2756 inttypes.h stdint.h unistd.h
2757do
2758as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2759echo "$as_me:$LINENO: checking for $ac_header" >&5
2760echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2761if eval "test \"\${$as_ac_Header+set}\" = set"; then
2762 echo $ECHO_N "(cached) $ECHO_C" >&6
2763else
2764 cat >conftest.$ac_ext <<_ACEOF
2765#line $LINENO "configure"
2766#include "confdefs.h"
2767$ac_includes_default
2768
2769#include <$ac_header>
2770_ACEOF
2771rm -f conftest.$ac_objext
2772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2773 (eval $ac_compile) 2>&5
2774 ac_status=$?
2775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2776 (exit $ac_status); } &&
2777 { ac_try='test -s conftest.$ac_objext'
2778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2779 (eval $ac_try) 2>&5
2780 ac_status=$?
2781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2782 (exit $ac_status); }; }; then
2783 eval "$as_ac_Header=yes"
2784else
2785 echo "$as_me: failed program was:" >&5
2786cat conftest.$ac_ext >&5
2787eval "$as_ac_Header=no"
2788fi
2789rm -f conftest.$ac_objext conftest.$ac_ext
2790fi
2791echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2792echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2793if test `eval echo '${'$as_ac_Header'}'` = yes; then
2794 cat >>confdefs.h <<_ACEOF
2795#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2796_ACEOF
2797
2798fi
2799
2800done
2801
2802
2803if test "${ac_cv_header_minix_config_h+set}" = set; then
2804 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2805echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2806if test "${ac_cv_header_minix_config_h+set}" = set; then
2807 echo $ECHO_N "(cached) $ECHO_C" >&6
2808fi
2809echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2810echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2811else
2812 # Is the header compilable?
2813echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2814echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2815cat >conftest.$ac_ext <<_ACEOF
2816#line $LINENO "configure"
2817#include "confdefs.h"
2818$ac_includes_default
2819#include <minix/config.h>
2820_ACEOF
2821rm -f conftest.$ac_objext
2822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2823 (eval $ac_compile) 2>&5
2824 ac_status=$?
2825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2826 (exit $ac_status); } &&
2827 { ac_try='test -s conftest.$ac_objext'
2828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2829 (eval $ac_try) 2>&5
2830 ac_status=$?
2831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2832 (exit $ac_status); }; }; then
2833 ac_header_compiler=yes
2834else
2835 echo "$as_me: failed program was:" >&5
2836cat conftest.$ac_ext >&5
2837ac_header_compiler=no
2838fi
2839rm -f conftest.$ac_objext conftest.$ac_ext
2840echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2841echo "${ECHO_T}$ac_header_compiler" >&6
2842
2843# Is the header present?
2844echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2845echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2846cat >conftest.$ac_ext <<_ACEOF
2847#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002848#include "confdefs.h"
2849#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002850_ACEOF
2851if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2852 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2853 ac_status=$?
2854 egrep -v '^ *\+' conftest.er1 >conftest.err
2855 rm -f conftest.er1
2856 cat conftest.err >&5
2857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2858 (exit $ac_status); } >/dev/null; then
2859 if test -s conftest.err; then
2860 ac_cpp_err=$ac_c_preproc_warn_flag
2861 else
2862 ac_cpp_err=
2863 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002864else
Martin v. Löwis11437992002-04-12 09:54:03 +00002865 ac_cpp_err=yes
2866fi
2867if test -z "$ac_cpp_err"; then
2868 ac_header_preproc=yes
2869else
2870 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002871 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002872 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002873fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002874rm -f conftest.err conftest.$ac_ext
2875echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2876echo "${ECHO_T}$ac_header_preproc" >&6
2877
2878# So? What about this header?
2879case $ac_header_compiler:$ac_header_preproc in
2880 yes:no )
2881 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2882echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2883 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2884echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2885 no:yes )
2886 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2887echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2888 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2889echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2890 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2891echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2892esac
2893echo "$as_me:$LINENO: checking for minix/config.h" >&5
2894echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2895if test "${ac_cv_header_minix_config_h+set}" = set; then
2896 echo $ECHO_N "(cached) $ECHO_C" >&6
2897else
2898 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002899fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002900echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2901echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2902
2903fi
2904if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002905 MINIX=yes
2906else
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002908fi
2909
Martin v. Löwis11437992002-04-12 09:54:03 +00002910
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002911if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002912
2913cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002914#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002915_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002916
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
2918cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002919#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002920_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002921
Martin v. Löwis11437992002-04-12 09:54:03 +00002922
2923cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002924#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002925_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002926
2927fi
2928
2929
Michael W. Hudson54241132001-12-07 15:38:26 +00002930
Martin v. Löwis11437992002-04-12 09:54:03 +00002931echo "$as_me:$LINENO: checking for --with-suffix" >&5
2932echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002933
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002934# Check whether --with-suffix or --without-suffix was given.
2935if test "${with_suffix+set}" = set; then
2936 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002938 case $withval in
2939 no) EXEEXT=;;
2940 yes) EXEEXT=.exe;;
2941 *) EXEEXT=$withval;;
2942 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002943fi;
2944echo "$as_me:$LINENO: result: $EXEEXT" >&5
2945echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002946
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002947# Test whether we're running on a non-case-sensitive system, in which
2948# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2951echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002952if test -d "python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002953then
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 echo "$as_me:$LINENO: result: yes" >&5
2955echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002956 BUILDEXEEXT=.exe
2957else
Martin v. Löwis11437992002-04-12 09:54:03 +00002958 echo "$as_me:$LINENO: result: no" >&5
2959echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002960 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002961fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002962
Guido van Rossumdd997f71998-10-07 19:58:26 +00002963case $MACHDEP in
2964bsdos*)
2965 case $CC in
2966 gcc) CC="$CC -D_HAVE_BSDI";;
2967 esac;;
2968esac
2969
Guido van Rossum24b1e751997-08-21 02:29:16 +00002970case $ac_sys_system in
2971hp*|HP*)
2972 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002973 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002974 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002975Monterey*)
2976 case $CC in
2977 cc) CC="$CC -Wl,-Bexport";;
2978 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002979SunOS*)
2980 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002981
2982cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002983#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002984_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002985
2986 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002987esac
2988
Michael W. Hudson54241132001-12-07 15:38:26 +00002989
2990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991echo "$as_me:$LINENO: checking LIBRARY" >&5
2992echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002993if test -z "$LIBRARY"
2994then
2995 LIBRARY='libpython$(VERSION).a'
2996fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002997echo "$as_me:$LINENO: result: $LIBRARY" >&5
2998echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002999
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003000# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003001# name of the library into which to insert object files). BLDLIBRARY is also
3002# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3003# is blank as the main program is not linked directly against LDLIBRARY.
3004# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3005# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3006# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3007# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003008#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003009# RUNSHARED is used to run shared python without installed libraries
3010#
3011# INSTSONAME is the name of the shared library that will be use to install
3012# on the system - some systems like version suffix, others don't
3013
3014
Michael W. Hudson54241132001-12-07 15:38:26 +00003015
3016
3017
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003018
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003019LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003020BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis1142de32002-03-29 16:28:31 +00003021INSTSONMAE='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003022DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003023LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003024RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003025
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003026# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003027# If CXX is set, and if it is needed to link a main function that was
3028# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3029# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003030# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003031# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003032
Martin v. Löwis11437992002-04-12 09:54:03 +00003033echo "$as_me:$LINENO: checking LINKCC" >&5
3034echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003035if test -z "$LINKCC"
3036then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003037 if test -z "$CXX"; then
3038 LINKCC="\$(PURIFY) \$(CC)"
3039 else
3040 echo 'int main(){return 0;}' > conftest.$ac_ext
3041 $CXX -c conftest.$ac_ext 2>&5
3042 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3043 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3044 then
3045 LINKCC="\$(PURIFY) \$(CC)"
3046 else
3047 LINKCC="\$(PURIFY) \$(CXX)"
3048 fi
3049 rm -fr conftest*
3050 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003051 case $ac_sys_system in
3052 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003053 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003054 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003055 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003056 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003057 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003058 esac
3059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003060echo "$as_me:$LINENO: result: $LINKCC" >&5
3061echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003062
Martin v. Löwis11437992002-04-12 09:54:03 +00003063echo "$as_me:$LINENO: checking for --enable-shared" >&5
3064echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003065# Check whether --enable-shared or --disable-shared was given.
3066if test "${enable_shared+set}" = set; then
3067 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003068
Martin v. Löwis11437992002-04-12 09:54:03 +00003069fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003070
3071if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003072then
Martin v. Löwis1142de32002-03-29 16:28:31 +00003073 enable_shared="no"
3074fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003075echo "$as_me:$LINENO: result: $enable_shared" >&5
3076echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003077
3078
Martin v. Löwis11437992002-04-12 09:54:03 +00003079echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3080echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003081
Guido van Rossumb8552162001-09-05 14:58:11 +00003082# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3083# library that we build, but we do not want to link against it (we
3084# will find it with a -framework option). For this reason there is an
3085# extra variable BLDLIBRARY against which Python and the extension
3086# modules are linked, BLDLIBRARY. This is normally the same as
3087# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003088if test "$enable_framework"
3089then
3090 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3091 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3092 BLDLIBRARY=''
3093else
3094 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003095fi
Jack Jansene578a632001-08-15 01:27:14 +00003096
Martin v. Löwis1142de32002-03-29 16:28:31 +00003097# Other platforms follow
3098if test $enable_shared = "yes"; then
3099 case $ac_sys_system in
3100 BeOS*)
3101 LDLIBRARY='libpython$(VERSION).so'
3102 ;;
3103 CYGWIN*)
3104 LDLIBRARY='libpython$(VERSION).dll.a'
3105 DLLLIBRARY='libpython$(VERSION).dll'
3106 ;;
3107 SunOS*)
3108 LDLIBRARY='libpython$(VERSION).so'
3109 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3110 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3111 ;;
3112 Linux*)
3113 LDLIBRARY='libpython$(VERSION).so'
3114 BLDLIBRARY='-L. -lpython$(VERSION)'
3115 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3116 INSTSONAME="$LDLIBRARY".$SOVERSION
3117 ;;
3118 hp*|HP*)
3119 LDLIBRARY='libpython$(VERSION).sl'
3120 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3121 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3122 ;;
3123 OSF*)
3124 LDLIBRARY='libpython$(VERSION).so'
3125 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3126 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3127 ;;
3128 esac
3129 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3130 case $MACHDEP in
3131 dguxR4)
3132 LDLIBRARY='libpython$(VERSION).so'
3133 OPT="$OPT -pic"
3134 ;;
3135 esac
3136fi
3137
Martin v. Löwis11437992002-04-12 09:54:03 +00003138echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3139echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003140
Martin v. Löwis11437992002-04-12 09:54:03 +00003141if test -n "$ac_tool_prefix"; then
3142 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3143set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3144echo "$as_me:$LINENO: checking for $ac_word" >&5
3145echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3146if test "${ac_cv_prog_RANLIB+set}" = set; then
3147 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148else
3149 if test -n "$RANLIB"; then
3150 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3151else
Martin v. Löwis11437992002-04-12 09:54:03 +00003152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3153for as_dir in $PATH
3154do
3155 IFS=$as_save_IFS
3156 test -z "$as_dir" && as_dir=.
3157 for ac_exec_ext in '' $ac_executable_extensions; do
3158 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3159 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3160 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3161 break 2
3162 fi
3163done
3164done
3165
Guido van Rossum627b2d71993-12-24 10:39:16 +00003166fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003168RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003169if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003170 echo "$as_me:$LINENO: result: $RANLIB" >&5
3171echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003172else
Martin v. Löwis11437992002-04-12 09:54:03 +00003173 echo "$as_me:$LINENO: result: no" >&5
3174echo "${ECHO_T}no" >&6
3175fi
3176
3177fi
3178if test -z "$ac_cv_prog_RANLIB"; then
3179 ac_ct_RANLIB=$RANLIB
3180 # Extract the first word of "ranlib", so it can be a program name with args.
3181set dummy ranlib; ac_word=$2
3182echo "$as_me:$LINENO: checking for $ac_word" >&5
3183echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3184if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3185 echo $ECHO_N "(cached) $ECHO_C" >&6
3186else
3187 if test -n "$ac_ct_RANLIB"; then
3188 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3189else
3190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3191for as_dir in $PATH
3192do
3193 IFS=$as_save_IFS
3194 test -z "$as_dir" && as_dir=.
3195 for ac_exec_ext in '' $ac_executable_extensions; do
3196 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3197 ac_cv_prog_ac_ct_RANLIB="ranlib"
3198 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3199 break 2
3200 fi
3201done
3202done
3203
3204 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3205fi
3206fi
3207ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3208if test -n "$ac_ct_RANLIB"; then
3209 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3210echo "${ECHO_T}$ac_ct_RANLIB" >&6
3211else
3212 echo "$as_me:$LINENO: result: no" >&5
3213echo "${ECHO_T}no" >&6
3214fi
3215
3216 RANLIB=$ac_ct_RANLIB
3217else
3218 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003219fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003220
3221
Guido van Rossum7f43da71994-08-01 12:15:30 +00003222for ac_prog in ar aal
3223do
Martin v. Löwis11437992002-04-12 09:54:03 +00003224 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003225set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003226echo "$as_me:$LINENO: checking for $ac_word" >&5
3227echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3228if test "${ac_cv_prog_AR+set}" = set; then
3229 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003230else
3231 if test -n "$AR"; then
3232 ac_cv_prog_AR="$AR" # Let the user override the test.
3233else
Martin v. Löwis11437992002-04-12 09:54:03 +00003234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3235for as_dir in $PATH
3236do
3237 IFS=$as_save_IFS
3238 test -z "$as_dir" && as_dir=.
3239 for ac_exec_ext in '' $ac_executable_extensions; do
3240 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3241 ac_cv_prog_AR="$ac_prog"
3242 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3243 break 2
3244 fi
3245done
3246done
3247
Guido van Rossum7f43da71994-08-01 12:15:30 +00003248fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003249fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003250AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003251if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003252 echo "$as_me:$LINENO: result: $AR" >&5
3253echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003254else
Martin v. Löwis11437992002-04-12 09:54:03 +00003255 echo "$as_me:$LINENO: result: no" >&5
3256echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003258
Martin v. Löwis11437992002-04-12 09:54:03 +00003259 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003260done
3261test -n "$AR" || AR="ar"
3262
Michael W. Hudson54241132001-12-07 15:38:26 +00003263
Neil Schemenauera42c8272001-03-31 00:01:55 +00003264case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003265bsdos*|hp*|HP*)
3266 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003267 if test -z "$INSTALL"
3268 then
3269 INSTALL="${srcdir}/install-sh -c"
3270 fi
3271esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003272ac_aux_dir=
3273for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3274 if test -f $ac_dir/install-sh; then
3275 ac_aux_dir=$ac_dir
3276 ac_install_sh="$ac_aux_dir/install-sh -c"
3277 break
3278 elif test -f $ac_dir/install.sh; then
3279 ac_aux_dir=$ac_dir
3280 ac_install_sh="$ac_aux_dir/install.sh -c"
3281 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003282 elif test -f $ac_dir/shtool; then
3283 ac_aux_dir=$ac_dir
3284 ac_install_sh="$ac_aux_dir/shtool install -c"
3285 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003286 fi
3287done
3288if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003289 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3290echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3291 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003292fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003293ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3294ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3295ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003296
3297# Find a good install program. We prefer a C program (faster),
3298# so one script is as good as another. But avoid the broken or
3299# incompatible versions:
3300# SysV /etc/install, /usr/sbin/install
3301# SunOS /usr/etc/install
3302# IRIX /sbin/install
3303# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003304# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003305# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3306# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3307# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3308# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003309echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3310echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003311if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003312if test "${ac_cv_path_install+set}" = set; then
3313 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003314else
Martin v. Löwis11437992002-04-12 09:54:03 +00003315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316for as_dir in $PATH
3317do
3318 IFS=$as_save_IFS
3319 test -z "$as_dir" && as_dir=.
3320 # Account for people who put trailing slashes in PATH elements.
3321case $as_dir/ in
3322 ./ | .// | /cC/* | \
3323 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3324 /usr/ucb/* ) ;;
3325 *)
3326 # OSF1 and SCO ODT 3.0 have their own names for install.
3327 # Don't use installbsd from OSF since it installs stuff as root
3328 # by default.
3329 for ac_prog in ginstall scoinst install; do
3330 for ac_exec_ext in '' $ac_executable_extensions; do
3331 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3332 if test $ac_prog = install &&
3333 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3334 # AIX install. It has an incompatible calling convention.
3335 :
3336 elif test $ac_prog = install &&
3337 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3338 # program-specific install script used by HP pwplus--don't use.
3339 :
3340 else
3341 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3342 break 3
3343 fi
3344 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003345 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003346 done
3347 ;;
3348esac
3349done
3350
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003351
3352fi
3353 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003354 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003355 else
3356 # As a last resort, use the slow shell script. We don't cache a
3357 # path for INSTALL within a source directory, because that will
3358 # break other packages using the cache if that directory is
3359 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003360 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003361 fi
3362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003363echo "$as_me:$LINENO: result: $INSTALL" >&5
3364echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003365
3366# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3367# It thinks the first close brace ends the variable substitution.
3368test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3369
Martin v. Löwis11437992002-04-12 09:54:03 +00003370test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003371
3372test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3373
Michael W. Hudson54241132001-12-07 15:38:26 +00003374
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003375# Not every filesystem supports hard links
3376
3377if test -z "$LN" ; then
3378 case $ac_sys_system in
3379 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003380 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003381 *) LN=ln;;
3382 esac
3383fi
3384
Fred Drake109d9862001-07-11 06:27:56 +00003385# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003386echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3387echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3388
Fred Drake109d9862001-07-11 06:27:56 +00003389# Check whether --with-pydebug or --without-pydebug was given.
3390if test "${with_pydebug+set}" = set; then
3391 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003392
Fred Drake109d9862001-07-11 06:27:56 +00003393if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003394then
3395
3396cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003397#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003398_ACEOF
3399
3400 echo "$as_me:$LINENO: result: yes" >&5
3401echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003402 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003403else echo "$as_me:$LINENO: result: no" >&5
3404echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003405fi
3406else
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 echo "$as_me:$LINENO: result: no" >&5
3408echo "${ECHO_T}no" >&6
3409fi;
Fred Drake109d9862001-07-11 06:27:56 +00003410
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003411# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003412
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003413if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003414then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003415 case $GCC in
3416 yes)
3417 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003418 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003419 if test "$Py_DEBUG" = 'true' ; then
3420 # Optimization messes up debuggers, so turn it off for
3421 # debug builds.
3422 OPT="-g -Wall -Wstrict-prototypes"
3423 else
3424 OPT="-g -O3 -Wall -Wstrict-prototypes"
3425 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003426 *)
Fred Drake109d9862001-07-11 06:27:56 +00003427 OPT="-O3 -Wall -Wstrict-prototypes";;
3428 esac
3429 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003430 *)
3431 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003432 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003433 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3434 *)
3435 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003436 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003437 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003438 case $ac_sys_system in
3439 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003440 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003441 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003442fi
3443
Fred Drakee1ceaa02001-12-04 20:55:47 +00003444if test "$Py_DEBUG" = 'true'; then
3445 :
3446else
3447 OPT="-DNDEBUG $OPT"
3448fi
3449
Trent Mick635f6fb2000-08-23 21:33:05 +00003450# The current (beta) Monterey compiler dies with optimizations
3451case $ac_sys_system in
3452Monterey*) OPT="";;
3453esac
3454
Guido van Rossum563e7081996-09-10 18:20:48 +00003455if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003456then
3457 OPT="$OPT $ac_arch_flags"
3458fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003459
Martin v. Löwis11437992002-04-12 09:54:03 +00003460echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3461echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3462if test "${ac_cv_opt_olimit_ok+set}" = set; then
3463 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003464else
3465 ac_save_cc="$CC"
3466CC="$CC -OPT:Olimit=0"
3467if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003468 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003469else
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 cat >conftest.$ac_ext <<_ACEOF
3471#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003472#include "confdefs.h"
3473int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003474_ACEOF
3475rm -f conftest$ac_exeext
3476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3477 (eval $ac_link) 2>&5
3478 ac_status=$?
3479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3482 (eval $ac_try) 2>&5
3483 ac_status=$?
3484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3485 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003486 ac_cv_opt_olimit_ok=yes
3487else
Martin v. Löwis11437992002-04-12 09:54:03 +00003488 echo "$as_me: program exited with status $ac_status" >&5
3489echo "$as_me: failed program was:" >&5
3490cat conftest.$ac_ext >&5
3491( exit $ac_status )
3492ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003494rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003495fi
Guido van Rossum91922671997-10-09 20:24:13 +00003496CC="$ac_save_cc"
3497fi
3498
Martin v. Löwis11437992002-04-12 09:54:03 +00003499echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3500echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003501if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003502 case $ac_sys_system in
3503 Darwin*) OPT="$OPT" ;;
3504 *) OPT="$OPT -OPT:Olimit=0";;
3505 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003506else
Martin v. Löwis11437992002-04-12 09:54:03 +00003507 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3508echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3509 if test "${ac_cv_olimit_ok+set}" = set; then
3510 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003511else
3512 ac_save_cc="$CC"
3513 CC="$CC -Olimit 1500"
3514 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003515 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003516else
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 cat >conftest.$ac_ext <<_ACEOF
3518#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003519#include "confdefs.h"
3520int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003521_ACEOF
3522rm -f conftest$ac_exeext
3523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3524 (eval $ac_link) 2>&5
3525 ac_status=$?
3526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3529 (eval $ac_try) 2>&5
3530 ac_status=$?
3531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3532 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003533 ac_cv_olimit_ok=yes
3534else
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 echo "$as_me: program exited with status $ac_status" >&5
3536echo "$as_me: failed program was:" >&5
3537cat conftest.$ac_ext >&5
3538( exit $ac_status )
3539ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003541rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003542fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003543 CC="$ac_save_cc"
3544fi
3545
Martin v. Löwis11437992002-04-12 09:54:03 +00003546 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3547echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003548 if test $ac_cv_olimit_ok = yes; then
3549 OPT="$OPT -Olimit 1500"
3550 fi
3551fi
3552
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003553# On some compilers, pthreads are available without further options
3554# (e.g. MacOS X). On some of these systems, the compiler will not
3555# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3556# So we have to see first whether pthreads are available without
3557# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003558echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3559echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3560if test "${ac_cv_pthread_is_default+set}" = set; then
3561 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003562else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003563 if test "$cross_compiling" = yes; then
3564 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003565else
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 cat >conftest.$ac_ext <<_ACEOF
3567#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003568#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003569
Martin v. Löwis130fb172001-07-19 11:00:41 +00003570#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003571
3572void* routine(void* p){return NULL;}
3573
3574int main(){
3575 pthread_t p;
3576 if(pthread_create(&p,NULL,routine,NULL)!=0)
3577 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003578 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003579 return 0;
3580}
3581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582_ACEOF
3583rm -f conftest$ac_exeext
3584if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3585 (eval $ac_link) 2>&5
3586 ac_status=$?
3587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3588 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3590 (eval $ac_try) 2>&5
3591 ac_status=$?
3592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3593 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003594 ac_cv_pthread_is_default=yes
3595else
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 echo "$as_me: program exited with status $ac_status" >&5
3597echo "$as_me: failed program was:" >&5
3598cat conftest.$ac_ext >&5
3599( exit $ac_status )
3600ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003601fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003602rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003603fi
3604
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003605fi
3606
Martin v. Löwis11437992002-04-12 09:54:03 +00003607echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3608echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003609
Michael W. Hudson54241132001-12-07 15:38:26 +00003610
Martin v. Löwis11437992002-04-12 09:54:03 +00003611if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003612then
3613 ac_cv_kpthread=no
3614else
3615# -Kpthread, if available, provides the right #defines
3616# and linker options to make pthread_create available
3617# Some compilers won't report that they do not support -Kpthread,
3618# so we need to run a program to see whether it really made the
3619# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003620echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3621echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3622if test "${ac_cv_kpthread+set}" = set; then
3623 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003624else
3625 ac_save_cc="$CC"
3626CC="$CC -Kpthread"
3627if test "$cross_compiling" = yes; then
3628 ac_cv_kpthread=no
3629else
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 cat >conftest.$ac_ext <<_ACEOF
3631#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003632#include "confdefs.h"
3633
3634#include <pthread.h>
3635
3636void* routine(void* p){return NULL;}
3637
3638int main(){
3639 pthread_t p;
3640 if(pthread_create(&p,NULL,routine,NULL)!=0)
3641 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003642 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003643 return 0;
3644}
3645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646_ACEOF
3647rm -f conftest$ac_exeext
3648if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3649 (eval $ac_link) 2>&5
3650 ac_status=$?
3651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3652 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3654 (eval $ac_try) 2>&5
3655 ac_status=$?
3656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3657 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003658 ac_cv_kpthread=yes
3659else
Martin v. Löwis11437992002-04-12 09:54:03 +00003660 echo "$as_me: program exited with status $ac_status" >&5
3661echo "$as_me: failed program was:" >&5
3662cat conftest.$ac_ext >&5
3663( exit $ac_status )
3664ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003665fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003666rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003667fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003668CC="$ac_save_cc"
3669fi
3670
Martin v. Löwis11437992002-04-12 09:54:03 +00003671echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3672echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003673fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003674
Michael W. Hudson54241132001-12-07 15:38:26 +00003675
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003676# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003677echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3678echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3679if test "${ac_cv_header_stdc+set}" = set; then
3680 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003681else
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 cat >conftest.$ac_ext <<_ACEOF
3683#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003684#include "confdefs.h"
3685#include <stdlib.h>
3686#include <stdarg.h>
3687#include <string.h>
3688#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003689
3690_ACEOF
3691if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3692 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3693 ac_status=$?
3694 egrep -v '^ *\+' conftest.er1 >conftest.err
3695 rm -f conftest.er1
3696 cat conftest.err >&5
3697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3698 (exit $ac_status); } >/dev/null; then
3699 if test -s conftest.err; then
3700 ac_cpp_err=$ac_c_preproc_warn_flag
3701 else
3702 ac_cpp_err=
3703 fi
3704else
3705 ac_cpp_err=yes
3706fi
3707if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003708 ac_cv_header_stdc=yes
3709else
Martin v. Löwis11437992002-04-12 09:54:03 +00003710 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003711 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003712 ac_cv_header_stdc=no
3713fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003714rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003715
3716if test $ac_cv_header_stdc = yes; then
3717 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 cat >conftest.$ac_ext <<_ACEOF
3719#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003720#include "confdefs.h"
3721#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003722
3723_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3725 egrep "memchr" >/dev/null 2>&1; then
3726 :
3727else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003728 ac_cv_header_stdc=no
3729fi
3730rm -f conftest*
3731
3732fi
3733
3734if test $ac_cv_header_stdc = yes; then
3735 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 cat >conftest.$ac_ext <<_ACEOF
3737#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003738#include "confdefs.h"
3739#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003740
3741_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3743 egrep "free" >/dev/null 2>&1; then
3744 :
3745else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003746 ac_cv_header_stdc=no
3747fi
3748rm -f conftest*
3749
3750fi
3751
3752if test $ac_cv_header_stdc = yes; then
3753 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003754 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003756else
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 cat >conftest.$ac_ext <<_ACEOF
3758#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003759#include "confdefs.h"
3760#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003761#if ((' ' & 0x0FF) == 0x020)
3762# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3763# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3764#else
3765# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3766 || ('j' <= (c) && (c) <= 'r') \
3767 || ('s' <= (c) && (c) <= 'z'))
3768# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3769#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003770
Martin v. Löwis11437992002-04-12 09:54:03 +00003771#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3772int
3773main ()
3774{
3775 int i;
3776 for (i = 0; i < 256; i++)
3777 if (XOR (islower (i), ISLOWER (i))
3778 || toupper (i) != TOUPPER (i))
3779 exit(2);
3780 exit (0);
3781}
3782_ACEOF
3783rm -f conftest$ac_exeext
3784if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3785 (eval $ac_link) 2>&5
3786 ac_status=$?
3787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3788 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3790 (eval $ac_try) 2>&5
3791 ac_status=$?
3792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3793 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003794 :
3795else
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 echo "$as_me: program exited with status $ac_status" >&5
3797echo "$as_me: failed program was:" >&5
3798cat conftest.$ac_ext >&5
3799( exit $ac_status )
3800ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003803fi
3804fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003805fi
3806echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3807echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003808if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003809
3810cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003811#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003812_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003813
3814fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003815
Martin v. Löwis11437992002-04-12 09:54:03 +00003816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003858libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003859signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00003860sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003861sys/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 +00003862sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00003863ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003864do
Martin v. Löwis11437992002-04-12 09:54:03 +00003865as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3866if eval "test \"\${$as_ac_Header+set}\" = set"; then
3867 echo "$as_me:$LINENO: checking for $ac_header" >&5
3868echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3869if eval "test \"\${$as_ac_Header+set}\" = set"; then
3870 echo $ECHO_N "(cached) $ECHO_C" >&6
3871fi
3872echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3873echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003874else
Martin v. Löwis11437992002-04-12 09:54:03 +00003875 # Is the header compilable?
3876echo "$as_me:$LINENO: checking $ac_header usability" >&5
3877echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3878cat >conftest.$ac_ext <<_ACEOF
3879#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003880#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003881$ac_includes_default
3882#include <$ac_header>
3883_ACEOF
3884rm -f conftest.$ac_objext
3885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3886 (eval $ac_compile) 2>&5
3887 ac_status=$?
3888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3889 (exit $ac_status); } &&
3890 { ac_try='test -s conftest.$ac_objext'
3891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3892 (eval $ac_try) 2>&5
3893 ac_status=$?
3894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3895 (exit $ac_status); }; }; then
3896 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003897else
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 echo "$as_me: failed program was:" >&5
3899cat conftest.$ac_ext >&5
3900ac_header_compiler=no
3901fi
3902rm -f conftest.$ac_objext conftest.$ac_ext
3903echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3904echo "${ECHO_T}$ac_header_compiler" >&6
3905
3906# Is the header present?
3907echo "$as_me:$LINENO: checking $ac_header presence" >&5
3908echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3909cat >conftest.$ac_ext <<_ACEOF
3910#line $LINENO "configure"
3911#include "confdefs.h"
3912#include <$ac_header>
3913_ACEOF
3914if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3915 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3916 ac_status=$?
3917 egrep -v '^ *\+' conftest.er1 >conftest.err
3918 rm -f conftest.er1
3919 cat conftest.err >&5
3920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3921 (exit $ac_status); } >/dev/null; then
3922 if test -s conftest.err; then
3923 ac_cpp_err=$ac_c_preproc_warn_flag
3924 else
3925 ac_cpp_err=
3926 fi
3927else
3928 ac_cpp_err=yes
3929fi
3930if test -z "$ac_cpp_err"; then
3931 ac_header_preproc=yes
3932else
3933 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003934 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003936fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003937rm -f conftest.err conftest.$ac_ext
3938echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3939echo "${ECHO_T}$ac_header_preproc" >&6
3940
3941# So? What about this header?
3942case $ac_header_compiler:$ac_header_preproc in
3943 yes:no )
3944 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3945echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3946 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3947echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3948 no:yes )
3949 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3950echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3951 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3952echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3953 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3954echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3955esac
3956echo "$as_me:$LINENO: checking for $ac_header" >&5
3957echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3958if eval "test \"\${$as_ac_Header+set}\" = set"; then
3959 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003960else
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003962fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003963echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3964echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3965
3966fi
3967if test `eval echo '${'$as_ac_Header'}'` = yes; then
3968 cat >>confdefs.h <<_ACEOF
3969#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3970_ACEOF
3971
3972fi
3973
Guido van Rossum627b2d71993-12-24 10:39:16 +00003974done
3975
Martin v. Löwis11437992002-04-12 09:54:03 +00003976
3977
3978
3979
3980
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003981ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003982for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3983 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3984echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3985echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3986if eval "test \"\${$as_ac_Header+set}\" = set"; then
3987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003988else
Martin v. Löwis11437992002-04-12 09:54:03 +00003989 cat >conftest.$ac_ext <<_ACEOF
3990#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003991#include "confdefs.h"
3992#include <sys/types.h>
3993#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00003994
3995#ifdef F77_DUMMY_MAIN
3996# ifdef __cplusplus
3997 extern "C"
3998# endif
3999 int F77_DUMMY_MAIN() { return 1; }
4000#endif
4001int
4002main ()
4003{
4004if ((DIR *) 0)
4005return 0;
4006 ;
4007 return 0;
4008}
4009_ACEOF
4010rm -f conftest.$ac_objext
4011if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4012 (eval $ac_compile) 2>&5
4013 ac_status=$?
4014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4015 (exit $ac_status); } &&
4016 { ac_try='test -s conftest.$ac_objext'
4017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4018 (eval $ac_try) 2>&5
4019 ac_status=$?
4020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4021 (exit $ac_status); }; }; then
4022 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004023else
Martin v. Löwis11437992002-04-12 09:54:03 +00004024 echo "$as_me: failed program was:" >&5
4025cat conftest.$ac_ext >&5
4026eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004028rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004029fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004030echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4031echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4032if test `eval echo '${'$as_ac_Header'}'` = yes; then
4033 cat >>confdefs.h <<_ACEOF
4034#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4035_ACEOF
4036
4037ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004038fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004040done
4041# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4042if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004043 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4044echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4045if test "${ac_cv_search_opendir+set}" = set; then
4046 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004047else
Martin v. Löwis11437992002-04-12 09:54:03 +00004048 ac_func_search_save_LIBS=$LIBS
4049ac_cv_search_opendir=no
4050cat >conftest.$ac_ext <<_ACEOF
4051#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004052#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004054/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004055#ifdef __cplusplus
4056extern "C"
4057#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004058/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004059 builtin and then its argument prototype would still apply. */
4060char opendir ();
4061#ifdef F77_DUMMY_MAIN
4062# ifdef __cplusplus
4063 extern "C"
4064# endif
4065 int F77_DUMMY_MAIN() { return 1; }
4066#endif
4067int
4068main ()
4069{
4070opendir ();
4071 ;
4072 return 0;
4073}
4074_ACEOF
4075rm -f conftest.$ac_objext conftest$ac_exeext
4076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4077 (eval $ac_link) 2>&5
4078 ac_status=$?
4079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4080 (exit $ac_status); } &&
4081 { ac_try='test -s conftest$ac_exeext'
4082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4083 (eval $ac_try) 2>&5
4084 ac_status=$?
4085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4086 (exit $ac_status); }; }; then
4087 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004088else
Martin v. Löwis11437992002-04-12 09:54:03 +00004089 echo "$as_me: failed program was:" >&5
4090cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004091fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004092rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4093if test "$ac_cv_search_opendir" = no; then
4094 for ac_lib in dir; do
4095 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4096 cat >conftest.$ac_ext <<_ACEOF
4097#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004098#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004099
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004100/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004101#ifdef __cplusplus
4102extern "C"
4103#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004104/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004105 builtin and then its argument prototype would still apply. */
4106char opendir ();
4107#ifdef F77_DUMMY_MAIN
4108# ifdef __cplusplus
4109 extern "C"
4110# endif
4111 int F77_DUMMY_MAIN() { return 1; }
4112#endif
4113int
4114main ()
4115{
4116opendir ();
4117 ;
4118 return 0;
4119}
4120_ACEOF
4121rm -f conftest.$ac_objext conftest$ac_exeext
4122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4123 (eval $ac_link) 2>&5
4124 ac_status=$?
4125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126 (exit $ac_status); } &&
4127 { ac_try='test -s conftest$ac_exeext'
4128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4129 (eval $ac_try) 2>&5
4130 ac_status=$?
4131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4132 (exit $ac_status); }; }; then
4133 ac_cv_search_opendir="-l$ac_lib"
4134break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004135else
Martin v. Löwis11437992002-04-12 09:54:03 +00004136 echo "$as_me: failed program was:" >&5
4137cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004138fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004139rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4140 done
4141fi
4142LIBS=$ac_func_search_save_LIBS
4143fi
4144echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4145echo "${ECHO_T}$ac_cv_search_opendir" >&6
4146if test "$ac_cv_search_opendir" != no; then
4147 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004150
Michael W. Hudson54241132001-12-07 15:38:26 +00004151else
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4153echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4154if test "${ac_cv_search_opendir+set}" = set; then
4155 echo $ECHO_N "(cached) $ECHO_C" >&6
4156else
4157 ac_func_search_save_LIBS=$LIBS
4158ac_cv_search_opendir=no
4159cat >conftest.$ac_ext <<_ACEOF
4160#line $LINENO "configure"
4161#include "confdefs.h"
4162
4163/* Override any gcc2 internal prototype to avoid an error. */
4164#ifdef __cplusplus
4165extern "C"
4166#endif
4167/* We use char because int might match the return type of a gcc2
4168 builtin and then its argument prototype would still apply. */
4169char opendir ();
4170#ifdef F77_DUMMY_MAIN
4171# ifdef __cplusplus
4172 extern "C"
4173# endif
4174 int F77_DUMMY_MAIN() { return 1; }
4175#endif
4176int
4177main ()
4178{
4179opendir ();
4180 ;
4181 return 0;
4182}
4183_ACEOF
4184rm -f conftest.$ac_objext conftest$ac_exeext
4185if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4186 (eval $ac_link) 2>&5
4187 ac_status=$?
4188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4189 (exit $ac_status); } &&
4190 { ac_try='test -s conftest$ac_exeext'
4191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4192 (eval $ac_try) 2>&5
4193 ac_status=$?
4194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195 (exit $ac_status); }; }; then
4196 ac_cv_search_opendir="none required"
4197else
4198 echo "$as_me: failed program was:" >&5
4199cat conftest.$ac_ext >&5
4200fi
4201rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4202if test "$ac_cv_search_opendir" = no; then
4203 for ac_lib in x; do
4204 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4205 cat >conftest.$ac_ext <<_ACEOF
4206#line $LINENO "configure"
4207#include "confdefs.h"
4208
4209/* Override any gcc2 internal prototype to avoid an error. */
4210#ifdef __cplusplus
4211extern "C"
4212#endif
4213/* We use char because int might match the return type of a gcc2
4214 builtin and then its argument prototype would still apply. */
4215char opendir ();
4216#ifdef F77_DUMMY_MAIN
4217# ifdef __cplusplus
4218 extern "C"
4219# endif
4220 int F77_DUMMY_MAIN() { return 1; }
4221#endif
4222int
4223main ()
4224{
4225opendir ();
4226 ;
4227 return 0;
4228}
4229_ACEOF
4230rm -f conftest.$ac_objext conftest$ac_exeext
4231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4232 (eval $ac_link) 2>&5
4233 ac_status=$?
4234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4235 (exit $ac_status); } &&
4236 { ac_try='test -s conftest$ac_exeext'
4237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4238 (eval $ac_try) 2>&5
4239 ac_status=$?
4240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4241 (exit $ac_status); }; }; then
4242 ac_cv_search_opendir="-l$ac_lib"
4243break
4244else
4245 echo "$as_me: failed program was:" >&5
4246cat conftest.$ac_ext >&5
4247fi
4248rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4249 done
4250fi
4251LIBS=$ac_func_search_save_LIBS
4252fi
4253echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4254echo "${ECHO_T}$ac_cv_search_opendir" >&6
4255if test "$ac_cv_search_opendir" != no; then
4256 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4257
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258fi
4259
4260fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004261
Michael W. Hudson54241132001-12-07 15:38:26 +00004262
Guido van Rossum627b2d71993-12-24 10:39:16 +00004263# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004264was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004265echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4266echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4267cat >conftest.$ac_ext <<_ACEOF
4268#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269#include "confdefs.h"
4270#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004271
4272_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4274 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004275 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004276else
Martin v. Löwis11437992002-04-12 09:54:03 +00004277
4278
4279cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004281_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004282
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004283
Guido van Rossum627b2d71993-12-24 10:39:16 +00004284fi
4285rm -f conftest*
4286
Martin v. Löwis11437992002-04-12 09:54:03 +00004287echo "$as_me:$LINENO: result: $was_it_defined" >&5
4288echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004289
Guido van Rossum810cc512001-09-09 23:51:39 +00004290# Two defines needed to enable largefile support on various platforms
4291# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004292
Martin v. Löwis11437992002-04-12 09:54:03 +00004293cat >>confdefs.h <<\_ACEOF
4294#define _LARGEFILE_SOURCE 1
4295_ACEOF
4296
4297
4298cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004299#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004300_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004301
Michael W. Hudson54241132001-12-07 15:38:26 +00004302
Guido van Rossum84e7b241996-08-19 21:59:00 +00004303# Add some code to confdefs.h so that the test for off_t works on SCO
4304cat >> confdefs.h <<\EOF
4305#if defined(SCO_DS)
4306#undef _OFF_T
4307#endif
4308EOF
4309
Guido van Rossumef2255b2000-03-10 22:30:29 +00004310# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004311echo "$as_me:$LINENO: checking for mode_t" >&5
4312echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4313if test "${ac_cv_type_mode_t+set}" = set; then
4314 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004315else
Martin v. Löwis11437992002-04-12 09:54:03 +00004316 cat >conftest.$ac_ext <<_ACEOF
4317#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004318#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004319$ac_includes_default
4320#ifdef F77_DUMMY_MAIN
4321# ifdef __cplusplus
4322 extern "C"
4323# endif
4324 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004325#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004326int
4327main ()
4328{
4329if ((mode_t *) 0)
4330 return 0;
4331if (sizeof (mode_t))
4332 return 0;
4333 ;
4334 return 0;
4335}
4336_ACEOF
4337rm -f conftest.$ac_objext
4338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4339 (eval $ac_compile) 2>&5
4340 ac_status=$?
4341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4342 (exit $ac_status); } &&
4343 { ac_try='test -s conftest.$ac_objext'
4344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4345 (eval $ac_try) 2>&5
4346 ac_status=$?
4347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4348 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004349 ac_cv_type_mode_t=yes
4350else
Martin v. Löwis11437992002-04-12 09:54:03 +00004351 echo "$as_me: failed program was:" >&5
4352cat conftest.$ac_ext >&5
4353ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004354fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004355rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004356fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004357echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4358echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4359if test $ac_cv_type_mode_t = yes; then
4360 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361else
Martin v. Löwis11437992002-04-12 09:54:03 +00004362
4363cat >>confdefs.h <<_ACEOF
4364#define mode_t int
4365_ACEOF
4366
4367fi
4368
4369echo "$as_me:$LINENO: checking for off_t" >&5
4370echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4371if test "${ac_cv_type_off_t+set}" = set; then
4372 echo $ECHO_N "(cached) $ECHO_C" >&6
4373else
4374 cat >conftest.$ac_ext <<_ACEOF
4375#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004376#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004377$ac_includes_default
4378#ifdef F77_DUMMY_MAIN
4379# ifdef __cplusplus
4380 extern "C"
4381# endif
4382 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004384int
4385main ()
4386{
4387if ((off_t *) 0)
4388 return 0;
4389if (sizeof (off_t))
4390 return 0;
4391 ;
4392 return 0;
4393}
4394_ACEOF
4395rm -f conftest.$ac_objext
4396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4397 (eval $ac_compile) 2>&5
4398 ac_status=$?
4399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4400 (exit $ac_status); } &&
4401 { ac_try='test -s conftest.$ac_objext'
4402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4403 (eval $ac_try) 2>&5
4404 ac_status=$?
4405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4406 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004407 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004408else
Martin v. Löwis11437992002-04-12 09:54:03 +00004409 echo "$as_me: failed program was:" >&5
4410cat conftest.$ac_ext >&5
4411ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004413rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004414fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004415echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4416echo "${ECHO_T}$ac_cv_type_off_t" >&6
4417if test $ac_cv_type_off_t = yes; then
4418 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004419else
Martin v. Löwis11437992002-04-12 09:54:03 +00004420
4421cat >>confdefs.h <<_ACEOF
4422#define off_t long
4423_ACEOF
4424
4425fi
4426
4427echo "$as_me:$LINENO: checking for pid_t" >&5
4428echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4429if test "${ac_cv_type_pid_t+set}" = set; then
4430 echo $ECHO_N "(cached) $ECHO_C" >&6
4431else
4432 cat >conftest.$ac_ext <<_ACEOF
4433#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004434#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004435$ac_includes_default
4436#ifdef F77_DUMMY_MAIN
4437# ifdef __cplusplus
4438 extern "C"
4439# endif
4440 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004442int
4443main ()
4444{
4445if ((pid_t *) 0)
4446 return 0;
4447if (sizeof (pid_t))
4448 return 0;
4449 ;
4450 return 0;
4451}
4452_ACEOF
4453rm -f conftest.$ac_objext
4454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4455 (eval $ac_compile) 2>&5
4456 ac_status=$?
4457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4458 (exit $ac_status); } &&
4459 { ac_try='test -s conftest.$ac_objext'
4460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4461 (eval $ac_try) 2>&5
4462 ac_status=$?
4463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4464 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004465 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004466else
Martin v. Löwis11437992002-04-12 09:54:03 +00004467 echo "$as_me: failed program was:" >&5
4468cat conftest.$ac_ext >&5
4469ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004470fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004471rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004472fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004473echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4474echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4475if test $ac_cv_type_pid_t = yes; then
4476 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004477else
Martin v. Löwis11437992002-04-12 09:54:03 +00004478
4479cat >>confdefs.h <<_ACEOF
4480#define pid_t int
4481_ACEOF
4482
4483fi
4484
4485echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4486echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4487if test "${ac_cv_type_signal+set}" = set; then
4488 echo $ECHO_N "(cached) $ECHO_C" >&6
4489else
4490 cat >conftest.$ac_ext <<_ACEOF
4491#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004492#include "confdefs.h"
4493#include <sys/types.h>
4494#include <signal.h>
4495#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004496# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004497#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004498#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004499extern "C" void (*signal (int, void (*)(int)))(int);
4500#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004501void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004502#endif
4503
Martin v. Löwis11437992002-04-12 09:54:03 +00004504#ifdef F77_DUMMY_MAIN
4505# ifdef __cplusplus
4506 extern "C"
4507# endif
4508 int F77_DUMMY_MAIN() { return 1; }
4509#endif
4510int
4511main ()
4512{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004513int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004514 ;
4515 return 0;
4516}
4517_ACEOF
4518rm -f conftest.$ac_objext
4519if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4520 (eval $ac_compile) 2>&5
4521 ac_status=$?
4522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4523 (exit $ac_status); } &&
4524 { ac_try='test -s conftest.$ac_objext'
4525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4526 (eval $ac_try) 2>&5
4527 ac_status=$?
4528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4529 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004530 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004531else
Martin v. Löwis11437992002-04-12 09:54:03 +00004532 echo "$as_me: failed program was:" >&5
4533cat conftest.$ac_ext >&5
4534ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004535fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004536rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004537fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004538echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4539echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004540
Martin v. Löwis11437992002-04-12 09:54:03 +00004541cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004542#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004543_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004544
Michael W. Hudson54241132001-12-07 15:38:26 +00004545
Martin v. Löwis11437992002-04-12 09:54:03 +00004546echo "$as_me:$LINENO: checking for size_t" >&5
4547echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4548if test "${ac_cv_type_size_t+set}" = set; then
4549 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004550else
Martin v. Löwis11437992002-04-12 09:54:03 +00004551 cat >conftest.$ac_ext <<_ACEOF
4552#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004553#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004554$ac_includes_default
4555#ifdef F77_DUMMY_MAIN
4556# ifdef __cplusplus
4557 extern "C"
4558# endif
4559 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004561int
4562main ()
4563{
4564if ((size_t *) 0)
4565 return 0;
4566if (sizeof (size_t))
4567 return 0;
4568 ;
4569 return 0;
4570}
4571_ACEOF
4572rm -f conftest.$ac_objext
4573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4574 (eval $ac_compile) 2>&5
4575 ac_status=$?
4576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4577 (exit $ac_status); } &&
4578 { ac_try='test -s conftest.$ac_objext'
4579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4580 (eval $ac_try) 2>&5
4581 ac_status=$?
4582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4583 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004584 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004585else
Martin v. Löwis11437992002-04-12 09:54:03 +00004586 echo "$as_me: failed program was:" >&5
4587cat conftest.$ac_ext >&5
4588ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004590rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004592echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4593echo "${ECHO_T}$ac_cv_type_size_t" >&6
4594if test $ac_cv_type_size_t = yes; then
4595 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004596else
Martin v. Löwis11437992002-04-12 09:54:03 +00004597
4598cat >>confdefs.h <<_ACEOF
4599#define size_t unsigned
4600_ACEOF
4601
4602fi
4603
4604echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4605echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4606if test "${ac_cv_type_uid_t+set}" = set; then
4607 echo $ECHO_N "(cached) $ECHO_C" >&6
4608else
4609 cat >conftest.$ac_ext <<_ACEOF
4610#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004611#include "confdefs.h"
4612#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004613
4614_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004615if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4616 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004617 ac_cv_type_uid_t=yes
4618else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004619 ac_cv_type_uid_t=no
4620fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004621rm -f conftest*
4622
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004623fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004624echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4625echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004626if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004627
Martin v. Löwis11437992002-04-12 09:54:03 +00004628cat >>confdefs.h <<\_ACEOF
4629#define uid_t int
4630_ACEOF
4631
4632
4633cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004634#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004635_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004636
4637fi
4638
Jack Jansendd19cf82001-12-06 22:36:17 +00004639
Michael W. Hudson54241132001-12-07 15:38:26 +00004640# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004641echo "$as_me:$LINENO: checking for int" >&5
4642echo $ECHO_N "checking for int... $ECHO_C" >&6
4643if test "${ac_cv_type_int+set}" = set; then
4644 echo $ECHO_N "(cached) $ECHO_C" >&6
4645else
4646 cat >conftest.$ac_ext <<_ACEOF
4647#line $LINENO "configure"
4648#include "confdefs.h"
4649$ac_includes_default
4650#ifdef F77_DUMMY_MAIN
4651# ifdef __cplusplus
4652 extern "C"
4653# endif
4654 int F77_DUMMY_MAIN() { return 1; }
4655#endif
4656int
4657main ()
4658{
4659if ((int *) 0)
4660 return 0;
4661if (sizeof (int))
4662 return 0;
4663 ;
4664 return 0;
4665}
4666_ACEOF
4667rm -f conftest.$ac_objext
4668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4669 (eval $ac_compile) 2>&5
4670 ac_status=$?
4671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4672 (exit $ac_status); } &&
4673 { ac_try='test -s conftest.$ac_objext'
4674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4675 (eval $ac_try) 2>&5
4676 ac_status=$?
4677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4678 (exit $ac_status); }; }; then
4679 ac_cv_type_int=yes
4680else
4681 echo "$as_me: failed program was:" >&5
4682cat conftest.$ac_ext >&5
4683ac_cv_type_int=no
4684fi
4685rm -f conftest.$ac_objext conftest.$ac_ext
4686fi
4687echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4688echo "${ECHO_T}$ac_cv_type_int" >&6
4689
4690echo "$as_me:$LINENO: checking size of int" >&5
4691echo $ECHO_N "checking size of int... $ECHO_C" >&6
4692if test "${ac_cv_sizeof_int+set}" = set; then
4693 echo $ECHO_N "(cached) $ECHO_C" >&6
4694else
4695 if test "$ac_cv_type_int" = yes; then
4696 # The cast to unsigned long works around a bug in the HP C Compiler
4697 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4698 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4699 # This bug is HP SR number 8606223364.
4700 if test "$cross_compiling" = yes; then
4701 # Depending upon the size, compute the lo and hi bounds.
4702cat >conftest.$ac_ext <<_ACEOF
4703#line $LINENO "configure"
4704#include "confdefs.h"
4705$ac_includes_default
4706#ifdef F77_DUMMY_MAIN
4707# ifdef __cplusplus
4708 extern "C"
4709# endif
4710 int F77_DUMMY_MAIN() { return 1; }
4711#endif
4712int
4713main ()
4714{
4715static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4716test_array [0] = 0
4717
4718 ;
4719 return 0;
4720}
4721_ACEOF
4722rm -f conftest.$ac_objext
4723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4724 (eval $ac_compile) 2>&5
4725 ac_status=$?
4726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4727 (exit $ac_status); } &&
4728 { ac_try='test -s conftest.$ac_objext'
4729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4730 (eval $ac_try) 2>&5
4731 ac_status=$?
4732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4733 (exit $ac_status); }; }; then
4734 ac_lo=0 ac_mid=0
4735 while :; do
4736 cat >conftest.$ac_ext <<_ACEOF
4737#line $LINENO "configure"
4738#include "confdefs.h"
4739$ac_includes_default
4740#ifdef F77_DUMMY_MAIN
4741# ifdef __cplusplus
4742 extern "C"
4743# endif
4744 int F77_DUMMY_MAIN() { return 1; }
4745#endif
4746int
4747main ()
4748{
4749static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4750test_array [0] = 0
4751
4752 ;
4753 return 0;
4754}
4755_ACEOF
4756rm -f conftest.$ac_objext
4757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4758 (eval $ac_compile) 2>&5
4759 ac_status=$?
4760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4761 (exit $ac_status); } &&
4762 { ac_try='test -s conftest.$ac_objext'
4763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4764 (eval $ac_try) 2>&5
4765 ac_status=$?
4766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4767 (exit $ac_status); }; }; then
4768 ac_hi=$ac_mid; break
4769else
4770 echo "$as_me: failed program was:" >&5
4771cat conftest.$ac_ext >&5
4772ac_lo=`expr $ac_mid + 1`
4773 if test $ac_lo -le $ac_mid; then
4774 ac_lo= ac_hi=
4775 break
4776 fi
4777 ac_mid=`expr 2 '*' $ac_mid + 1`
4778fi
4779rm -f conftest.$ac_objext conftest.$ac_ext
4780 done
4781else
4782 echo "$as_me: failed program was:" >&5
4783cat conftest.$ac_ext >&5
4784cat >conftest.$ac_ext <<_ACEOF
4785#line $LINENO "configure"
4786#include "confdefs.h"
4787$ac_includes_default
4788#ifdef F77_DUMMY_MAIN
4789# ifdef __cplusplus
4790 extern "C"
4791# endif
4792 int F77_DUMMY_MAIN() { return 1; }
4793#endif
4794int
4795main ()
4796{
4797static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4798test_array [0] = 0
4799
4800 ;
4801 return 0;
4802}
4803_ACEOF
4804rm -f conftest.$ac_objext
4805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4806 (eval $ac_compile) 2>&5
4807 ac_status=$?
4808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); } &&
4810 { ac_try='test -s conftest.$ac_objext'
4811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4812 (eval $ac_try) 2>&5
4813 ac_status=$?
4814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815 (exit $ac_status); }; }; then
4816 ac_hi=-1 ac_mid=-1
4817 while :; do
4818 cat >conftest.$ac_ext <<_ACEOF
4819#line $LINENO "configure"
4820#include "confdefs.h"
4821$ac_includes_default
4822#ifdef F77_DUMMY_MAIN
4823# ifdef __cplusplus
4824 extern "C"
4825# endif
4826 int F77_DUMMY_MAIN() { return 1; }
4827#endif
4828int
4829main ()
4830{
4831static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4832test_array [0] = 0
4833
4834 ;
4835 return 0;
4836}
4837_ACEOF
4838rm -f conftest.$ac_objext
4839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4840 (eval $ac_compile) 2>&5
4841 ac_status=$?
4842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4843 (exit $ac_status); } &&
4844 { ac_try='test -s conftest.$ac_objext'
4845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4846 (eval $ac_try) 2>&5
4847 ac_status=$?
4848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4849 (exit $ac_status); }; }; then
4850 ac_lo=$ac_mid; break
4851else
4852 echo "$as_me: failed program was:" >&5
4853cat conftest.$ac_ext >&5
4854ac_hi=`expr '(' $ac_mid ')' - 1`
4855 if test $ac_mid -le $ac_hi; then
4856 ac_lo= ac_hi=
4857 break
4858 fi
4859 ac_mid=`expr 2 '*' $ac_mid`
4860fi
4861rm -f conftest.$ac_objext conftest.$ac_ext
4862 done
4863else
4864 echo "$as_me: failed program was:" >&5
4865cat conftest.$ac_ext >&5
4866ac_lo= ac_hi=
4867fi
4868rm -f conftest.$ac_objext conftest.$ac_ext
4869fi
4870rm -f conftest.$ac_objext conftest.$ac_ext
4871# Binary search between lo and hi bounds.
4872while test "x$ac_lo" != "x$ac_hi"; do
4873 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4874 cat >conftest.$ac_ext <<_ACEOF
4875#line $LINENO "configure"
4876#include "confdefs.h"
4877$ac_includes_default
4878#ifdef F77_DUMMY_MAIN
4879# ifdef __cplusplus
4880 extern "C"
4881# endif
4882 int F77_DUMMY_MAIN() { return 1; }
4883#endif
4884int
4885main ()
4886{
4887static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4888test_array [0] = 0
4889
4890 ;
4891 return 0;
4892}
4893_ACEOF
4894rm -f conftest.$ac_objext
4895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4896 (eval $ac_compile) 2>&5
4897 ac_status=$?
4898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4899 (exit $ac_status); } &&
4900 { ac_try='test -s conftest.$ac_objext'
4901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4902 (eval $ac_try) 2>&5
4903 ac_status=$?
4904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4905 (exit $ac_status); }; }; then
4906 ac_hi=$ac_mid
4907else
4908 echo "$as_me: failed program was:" >&5
4909cat conftest.$ac_ext >&5
4910ac_lo=`expr '(' $ac_mid ')' + 1`
4911fi
4912rm -f conftest.$ac_objext conftest.$ac_ext
4913done
4914case $ac_lo in
4915?*) ac_cv_sizeof_int=$ac_lo;;
4916'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4917echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4918 { (exit 1); exit 1; }; } ;;
4919esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004920else
4921 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004922 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4923echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4924 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004925else
Martin v. Löwis11437992002-04-12 09:54:03 +00004926 cat >conftest.$ac_ext <<_ACEOF
4927#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004928#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004929$ac_includes_default
4930long longval () { return (long) (sizeof (int)); }
4931unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004932#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004933#include <stdlib.h>
4934#ifdef F77_DUMMY_MAIN
4935# ifdef __cplusplus
4936 extern "C"
4937# endif
4938 int F77_DUMMY_MAIN() { return 1; }
4939#endif
4940int
4941main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004942{
Martin v. Löwis11437992002-04-12 09:54:03 +00004943
4944 FILE *f = fopen ("conftest.val", "w");
4945 if (! f)
4946 exit (1);
4947 if (((long) (sizeof (int))) < 0)
4948 {
4949 long i = longval ();
4950 if (i != ((long) (sizeof (int))))
4951 exit (1);
4952 fprintf (f, "%ld\n", i);
4953 }
4954 else
4955 {
4956 unsigned long i = ulongval ();
4957 if (i != ((long) (sizeof (int))))
4958 exit (1);
4959 fprintf (f, "%lu\n", i);
4960 }
4961 exit (ferror (f) || fclose (f) != 0);
4962
4963 ;
4964 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004965}
Martin v. Löwis11437992002-04-12 09:54:03 +00004966_ACEOF
4967rm -f conftest$ac_exeext
4968if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4969 (eval $ac_link) 2>&5
4970 ac_status=$?
4971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4972 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4974 (eval $ac_try) 2>&5
4975 ac_status=$?
4976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977 (exit $ac_status); }; }; then
4978 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004979else
Martin v. Löwis11437992002-04-12 09:54:03 +00004980 echo "$as_me: program exited with status $ac_status" >&5
4981echo "$as_me: failed program was:" >&5
4982cat conftest.$ac_ext >&5
4983( exit $ac_status )
4984{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4985echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4986 { (exit 1); exit 1; }; }
4987fi
4988rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4989fi
4990fi
4991rm -f conftest.val
4992else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004993 ac_cv_sizeof_int=0
4994fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004995fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004996echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4997echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4998cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004999#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005000_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005001
5002
Martin v. Löwis11437992002-04-12 09:54:03 +00005003echo "$as_me:$LINENO: checking for long" >&5
5004echo $ECHO_N "checking for long... $ECHO_C" >&6
5005if test "${ac_cv_type_long+set}" = set; then
5006 echo $ECHO_N "(cached) $ECHO_C" >&6
5007else
5008 cat >conftest.$ac_ext <<_ACEOF
5009#line $LINENO "configure"
5010#include "confdefs.h"
5011$ac_includes_default
5012#ifdef F77_DUMMY_MAIN
5013# ifdef __cplusplus
5014 extern "C"
5015# endif
5016 int F77_DUMMY_MAIN() { return 1; }
5017#endif
5018int
5019main ()
5020{
5021if ((long *) 0)
5022 return 0;
5023if (sizeof (long))
5024 return 0;
5025 ;
5026 return 0;
5027}
5028_ACEOF
5029rm -f conftest.$ac_objext
5030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5031 (eval $ac_compile) 2>&5
5032 ac_status=$?
5033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5034 (exit $ac_status); } &&
5035 { ac_try='test -s conftest.$ac_objext'
5036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5037 (eval $ac_try) 2>&5
5038 ac_status=$?
5039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5040 (exit $ac_status); }; }; then
5041 ac_cv_type_long=yes
5042else
5043 echo "$as_me: failed program was:" >&5
5044cat conftest.$ac_ext >&5
5045ac_cv_type_long=no
5046fi
5047rm -f conftest.$ac_objext conftest.$ac_ext
5048fi
5049echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5050echo "${ECHO_T}$ac_cv_type_long" >&6
5051
5052echo "$as_me:$LINENO: checking size of long" >&5
5053echo $ECHO_N "checking size of long... $ECHO_C" >&6
5054if test "${ac_cv_sizeof_long+set}" = set; then
5055 echo $ECHO_N "(cached) $ECHO_C" >&6
5056else
5057 if test "$ac_cv_type_long" = yes; then
5058 # The cast to unsigned long works around a bug in the HP C Compiler
5059 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5060 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5061 # This bug is HP SR number 8606223364.
5062 if test "$cross_compiling" = yes; then
5063 # Depending upon the size, compute the lo and hi bounds.
5064cat >conftest.$ac_ext <<_ACEOF
5065#line $LINENO "configure"
5066#include "confdefs.h"
5067$ac_includes_default
5068#ifdef F77_DUMMY_MAIN
5069# ifdef __cplusplus
5070 extern "C"
5071# endif
5072 int F77_DUMMY_MAIN() { return 1; }
5073#endif
5074int
5075main ()
5076{
5077static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5078test_array [0] = 0
5079
5080 ;
5081 return 0;
5082}
5083_ACEOF
5084rm -f conftest.$ac_objext
5085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5086 (eval $ac_compile) 2>&5
5087 ac_status=$?
5088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5089 (exit $ac_status); } &&
5090 { ac_try='test -s conftest.$ac_objext'
5091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5092 (eval $ac_try) 2>&5
5093 ac_status=$?
5094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5095 (exit $ac_status); }; }; then
5096 ac_lo=0 ac_mid=0
5097 while :; do
5098 cat >conftest.$ac_ext <<_ACEOF
5099#line $LINENO "configure"
5100#include "confdefs.h"
5101$ac_includes_default
5102#ifdef F77_DUMMY_MAIN
5103# ifdef __cplusplus
5104 extern "C"
5105# endif
5106 int F77_DUMMY_MAIN() { return 1; }
5107#endif
5108int
5109main ()
5110{
5111static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5112test_array [0] = 0
5113
5114 ;
5115 return 0;
5116}
5117_ACEOF
5118rm -f conftest.$ac_objext
5119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5120 (eval $ac_compile) 2>&5
5121 ac_status=$?
5122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5123 (exit $ac_status); } &&
5124 { ac_try='test -s conftest.$ac_objext'
5125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5126 (eval $ac_try) 2>&5
5127 ac_status=$?
5128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5129 (exit $ac_status); }; }; then
5130 ac_hi=$ac_mid; break
5131else
5132 echo "$as_me: failed program was:" >&5
5133cat conftest.$ac_ext >&5
5134ac_lo=`expr $ac_mid + 1`
5135 if test $ac_lo -le $ac_mid; then
5136 ac_lo= ac_hi=
5137 break
5138 fi
5139 ac_mid=`expr 2 '*' $ac_mid + 1`
5140fi
5141rm -f conftest.$ac_objext conftest.$ac_ext
5142 done
5143else
5144 echo "$as_me: failed program was:" >&5
5145cat conftest.$ac_ext >&5
5146cat >conftest.$ac_ext <<_ACEOF
5147#line $LINENO "configure"
5148#include "confdefs.h"
5149$ac_includes_default
5150#ifdef F77_DUMMY_MAIN
5151# ifdef __cplusplus
5152 extern "C"
5153# endif
5154 int F77_DUMMY_MAIN() { return 1; }
5155#endif
5156int
5157main ()
5158{
5159static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5160test_array [0] = 0
5161
5162 ;
5163 return 0;
5164}
5165_ACEOF
5166rm -f conftest.$ac_objext
5167if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5168 (eval $ac_compile) 2>&5
5169 ac_status=$?
5170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5171 (exit $ac_status); } &&
5172 { ac_try='test -s conftest.$ac_objext'
5173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5174 (eval $ac_try) 2>&5
5175 ac_status=$?
5176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5177 (exit $ac_status); }; }; then
5178 ac_hi=-1 ac_mid=-1
5179 while :; do
5180 cat >conftest.$ac_ext <<_ACEOF
5181#line $LINENO "configure"
5182#include "confdefs.h"
5183$ac_includes_default
5184#ifdef F77_DUMMY_MAIN
5185# ifdef __cplusplus
5186 extern "C"
5187# endif
5188 int F77_DUMMY_MAIN() { return 1; }
5189#endif
5190int
5191main ()
5192{
5193static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5194test_array [0] = 0
5195
5196 ;
5197 return 0;
5198}
5199_ACEOF
5200rm -f conftest.$ac_objext
5201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5202 (eval $ac_compile) 2>&5
5203 ac_status=$?
5204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5205 (exit $ac_status); } &&
5206 { ac_try='test -s conftest.$ac_objext'
5207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5208 (eval $ac_try) 2>&5
5209 ac_status=$?
5210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5211 (exit $ac_status); }; }; then
5212 ac_lo=$ac_mid; break
5213else
5214 echo "$as_me: failed program was:" >&5
5215cat conftest.$ac_ext >&5
5216ac_hi=`expr '(' $ac_mid ')' - 1`
5217 if test $ac_mid -le $ac_hi; then
5218 ac_lo= ac_hi=
5219 break
5220 fi
5221 ac_mid=`expr 2 '*' $ac_mid`
5222fi
5223rm -f conftest.$ac_objext conftest.$ac_ext
5224 done
5225else
5226 echo "$as_me: failed program was:" >&5
5227cat conftest.$ac_ext >&5
5228ac_lo= ac_hi=
5229fi
5230rm -f conftest.$ac_objext conftest.$ac_ext
5231fi
5232rm -f conftest.$ac_objext conftest.$ac_ext
5233# Binary search between lo and hi bounds.
5234while test "x$ac_lo" != "x$ac_hi"; do
5235 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5236 cat >conftest.$ac_ext <<_ACEOF
5237#line $LINENO "configure"
5238#include "confdefs.h"
5239$ac_includes_default
5240#ifdef F77_DUMMY_MAIN
5241# ifdef __cplusplus
5242 extern "C"
5243# endif
5244 int F77_DUMMY_MAIN() { return 1; }
5245#endif
5246int
5247main ()
5248{
5249static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5250test_array [0] = 0
5251
5252 ;
5253 return 0;
5254}
5255_ACEOF
5256rm -f conftest.$ac_objext
5257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5258 (eval $ac_compile) 2>&5
5259 ac_status=$?
5260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5261 (exit $ac_status); } &&
5262 { ac_try='test -s conftest.$ac_objext'
5263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5264 (eval $ac_try) 2>&5
5265 ac_status=$?
5266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267 (exit $ac_status); }; }; then
5268 ac_hi=$ac_mid
5269else
5270 echo "$as_me: failed program was:" >&5
5271cat conftest.$ac_ext >&5
5272ac_lo=`expr '(' $ac_mid ')' + 1`
5273fi
5274rm -f conftest.$ac_objext conftest.$ac_ext
5275done
5276case $ac_lo in
5277?*) ac_cv_sizeof_long=$ac_lo;;
5278'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5279echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5280 { (exit 1); exit 1; }; } ;;
5281esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005282else
5283 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005284 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5285echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5286 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005287else
Martin v. Löwis11437992002-04-12 09:54:03 +00005288 cat >conftest.$ac_ext <<_ACEOF
5289#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005290#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005291$ac_includes_default
5292long longval () { return (long) (sizeof (long)); }
5293unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005294#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005295#include <stdlib.h>
5296#ifdef F77_DUMMY_MAIN
5297# ifdef __cplusplus
5298 extern "C"
5299# endif
5300 int F77_DUMMY_MAIN() { return 1; }
5301#endif
5302int
5303main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005304{
Martin v. Löwis11437992002-04-12 09:54:03 +00005305
5306 FILE *f = fopen ("conftest.val", "w");
5307 if (! f)
5308 exit (1);
5309 if (((long) (sizeof (long))) < 0)
5310 {
5311 long i = longval ();
5312 if (i != ((long) (sizeof (long))))
5313 exit (1);
5314 fprintf (f, "%ld\n", i);
5315 }
5316 else
5317 {
5318 unsigned long i = ulongval ();
5319 if (i != ((long) (sizeof (long))))
5320 exit (1);
5321 fprintf (f, "%lu\n", i);
5322 }
5323 exit (ferror (f) || fclose (f) != 0);
5324
5325 ;
5326 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005327}
Martin v. Löwis11437992002-04-12 09:54:03 +00005328_ACEOF
5329rm -f conftest$ac_exeext
5330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5331 (eval $ac_link) 2>&5
5332 ac_status=$?
5333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5334 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5336 (eval $ac_try) 2>&5
5337 ac_status=$?
5338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5339 (exit $ac_status); }; }; then
5340 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005341else
Martin v. Löwis11437992002-04-12 09:54:03 +00005342 echo "$as_me: program exited with status $ac_status" >&5
5343echo "$as_me: failed program was:" >&5
5344cat conftest.$ac_ext >&5
5345( exit $ac_status )
5346{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5347echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5348 { (exit 1); exit 1; }; }
5349fi
5350rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5351fi
5352fi
5353rm -f conftest.val
5354else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005355 ac_cv_sizeof_long=0
5356fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005358echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5359echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5360cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005361#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005362_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005363
5364
Martin v. Löwis11437992002-04-12 09:54:03 +00005365echo "$as_me:$LINENO: checking for void *" >&5
5366echo $ECHO_N "checking for void *... $ECHO_C" >&6
5367if test "${ac_cv_type_void_p+set}" = set; then
5368 echo $ECHO_N "(cached) $ECHO_C" >&6
5369else
5370 cat >conftest.$ac_ext <<_ACEOF
5371#line $LINENO "configure"
5372#include "confdefs.h"
5373$ac_includes_default
5374#ifdef F77_DUMMY_MAIN
5375# ifdef __cplusplus
5376 extern "C"
5377# endif
5378 int F77_DUMMY_MAIN() { return 1; }
5379#endif
5380int
5381main ()
5382{
5383if ((void * *) 0)
5384 return 0;
5385if (sizeof (void *))
5386 return 0;
5387 ;
5388 return 0;
5389}
5390_ACEOF
5391rm -f conftest.$ac_objext
5392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5393 (eval $ac_compile) 2>&5
5394 ac_status=$?
5395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5396 (exit $ac_status); } &&
5397 { ac_try='test -s conftest.$ac_objext'
5398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5399 (eval $ac_try) 2>&5
5400 ac_status=$?
5401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5402 (exit $ac_status); }; }; then
5403 ac_cv_type_void_p=yes
5404else
5405 echo "$as_me: failed program was:" >&5
5406cat conftest.$ac_ext >&5
5407ac_cv_type_void_p=no
5408fi
5409rm -f conftest.$ac_objext conftest.$ac_ext
5410fi
5411echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5412echo "${ECHO_T}$ac_cv_type_void_p" >&6
5413
5414echo "$as_me:$LINENO: checking size of void *" >&5
5415echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5416if test "${ac_cv_sizeof_void_p+set}" = set; then
5417 echo $ECHO_N "(cached) $ECHO_C" >&6
5418else
5419 if test "$ac_cv_type_void_p" = yes; then
5420 # The cast to unsigned long works around a bug in the HP C Compiler
5421 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5422 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5423 # This bug is HP SR number 8606223364.
5424 if test "$cross_compiling" = yes; then
5425 # Depending upon the size, compute the lo and hi bounds.
5426cat >conftest.$ac_ext <<_ACEOF
5427#line $LINENO "configure"
5428#include "confdefs.h"
5429$ac_includes_default
5430#ifdef F77_DUMMY_MAIN
5431# ifdef __cplusplus
5432 extern "C"
5433# endif
5434 int F77_DUMMY_MAIN() { return 1; }
5435#endif
5436int
5437main ()
5438{
5439static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5440test_array [0] = 0
5441
5442 ;
5443 return 0;
5444}
5445_ACEOF
5446rm -f conftest.$ac_objext
5447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5448 (eval $ac_compile) 2>&5
5449 ac_status=$?
5450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5451 (exit $ac_status); } &&
5452 { ac_try='test -s conftest.$ac_objext'
5453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5454 (eval $ac_try) 2>&5
5455 ac_status=$?
5456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5457 (exit $ac_status); }; }; then
5458 ac_lo=0 ac_mid=0
5459 while :; do
5460 cat >conftest.$ac_ext <<_ACEOF
5461#line $LINENO "configure"
5462#include "confdefs.h"
5463$ac_includes_default
5464#ifdef F77_DUMMY_MAIN
5465# ifdef __cplusplus
5466 extern "C"
5467# endif
5468 int F77_DUMMY_MAIN() { return 1; }
5469#endif
5470int
5471main ()
5472{
5473static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5474test_array [0] = 0
5475
5476 ;
5477 return 0;
5478}
5479_ACEOF
5480rm -f conftest.$ac_objext
5481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5482 (eval $ac_compile) 2>&5
5483 ac_status=$?
5484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5485 (exit $ac_status); } &&
5486 { ac_try='test -s conftest.$ac_objext'
5487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5488 (eval $ac_try) 2>&5
5489 ac_status=$?
5490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5491 (exit $ac_status); }; }; then
5492 ac_hi=$ac_mid; break
5493else
5494 echo "$as_me: failed program was:" >&5
5495cat conftest.$ac_ext >&5
5496ac_lo=`expr $ac_mid + 1`
5497 if test $ac_lo -le $ac_mid; then
5498 ac_lo= ac_hi=
5499 break
5500 fi
5501 ac_mid=`expr 2 '*' $ac_mid + 1`
5502fi
5503rm -f conftest.$ac_objext conftest.$ac_ext
5504 done
5505else
5506 echo "$as_me: failed program was:" >&5
5507cat conftest.$ac_ext >&5
5508cat >conftest.$ac_ext <<_ACEOF
5509#line $LINENO "configure"
5510#include "confdefs.h"
5511$ac_includes_default
5512#ifdef F77_DUMMY_MAIN
5513# ifdef __cplusplus
5514 extern "C"
5515# endif
5516 int F77_DUMMY_MAIN() { return 1; }
5517#endif
5518int
5519main ()
5520{
5521static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5522test_array [0] = 0
5523
5524 ;
5525 return 0;
5526}
5527_ACEOF
5528rm -f conftest.$ac_objext
5529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5530 (eval $ac_compile) 2>&5
5531 ac_status=$?
5532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5533 (exit $ac_status); } &&
5534 { ac_try='test -s conftest.$ac_objext'
5535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5536 (eval $ac_try) 2>&5
5537 ac_status=$?
5538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5539 (exit $ac_status); }; }; then
5540 ac_hi=-1 ac_mid=-1
5541 while :; do
5542 cat >conftest.$ac_ext <<_ACEOF
5543#line $LINENO "configure"
5544#include "confdefs.h"
5545$ac_includes_default
5546#ifdef F77_DUMMY_MAIN
5547# ifdef __cplusplus
5548 extern "C"
5549# endif
5550 int F77_DUMMY_MAIN() { return 1; }
5551#endif
5552int
5553main ()
5554{
5555static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5556test_array [0] = 0
5557
5558 ;
5559 return 0;
5560}
5561_ACEOF
5562rm -f conftest.$ac_objext
5563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5564 (eval $ac_compile) 2>&5
5565 ac_status=$?
5566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5567 (exit $ac_status); } &&
5568 { ac_try='test -s conftest.$ac_objext'
5569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5570 (eval $ac_try) 2>&5
5571 ac_status=$?
5572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5573 (exit $ac_status); }; }; then
5574 ac_lo=$ac_mid; break
5575else
5576 echo "$as_me: failed program was:" >&5
5577cat conftest.$ac_ext >&5
5578ac_hi=`expr '(' $ac_mid ')' - 1`
5579 if test $ac_mid -le $ac_hi; then
5580 ac_lo= ac_hi=
5581 break
5582 fi
5583 ac_mid=`expr 2 '*' $ac_mid`
5584fi
5585rm -f conftest.$ac_objext conftest.$ac_ext
5586 done
5587else
5588 echo "$as_me: failed program was:" >&5
5589cat conftest.$ac_ext >&5
5590ac_lo= ac_hi=
5591fi
5592rm -f conftest.$ac_objext conftest.$ac_ext
5593fi
5594rm -f conftest.$ac_objext conftest.$ac_ext
5595# Binary search between lo and hi bounds.
5596while test "x$ac_lo" != "x$ac_hi"; do
5597 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5598 cat >conftest.$ac_ext <<_ACEOF
5599#line $LINENO "configure"
5600#include "confdefs.h"
5601$ac_includes_default
5602#ifdef F77_DUMMY_MAIN
5603# ifdef __cplusplus
5604 extern "C"
5605# endif
5606 int F77_DUMMY_MAIN() { return 1; }
5607#endif
5608int
5609main ()
5610{
5611static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5612test_array [0] = 0
5613
5614 ;
5615 return 0;
5616}
5617_ACEOF
5618rm -f conftest.$ac_objext
5619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5620 (eval $ac_compile) 2>&5
5621 ac_status=$?
5622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5623 (exit $ac_status); } &&
5624 { ac_try='test -s conftest.$ac_objext'
5625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5626 (eval $ac_try) 2>&5
5627 ac_status=$?
5628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5629 (exit $ac_status); }; }; then
5630 ac_hi=$ac_mid
5631else
5632 echo "$as_me: failed program was:" >&5
5633cat conftest.$ac_ext >&5
5634ac_lo=`expr '(' $ac_mid ')' + 1`
5635fi
5636rm -f conftest.$ac_objext conftest.$ac_ext
5637done
5638case $ac_lo in
5639?*) ac_cv_sizeof_void_p=$ac_lo;;
5640'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5641echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5642 { (exit 1); exit 1; }; } ;;
5643esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005644else
5645 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005646 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5647echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5648 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005649else
Martin v. Löwis11437992002-04-12 09:54:03 +00005650 cat >conftest.$ac_ext <<_ACEOF
5651#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005652#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005653$ac_includes_default
5654long longval () { return (long) (sizeof (void *)); }
5655unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005656#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005657#include <stdlib.h>
5658#ifdef F77_DUMMY_MAIN
5659# ifdef __cplusplus
5660 extern "C"
5661# endif
5662 int F77_DUMMY_MAIN() { return 1; }
5663#endif
5664int
5665main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005666{
Martin v. Löwis11437992002-04-12 09:54:03 +00005667
5668 FILE *f = fopen ("conftest.val", "w");
5669 if (! f)
5670 exit (1);
5671 if (((long) (sizeof (void *))) < 0)
5672 {
5673 long i = longval ();
5674 if (i != ((long) (sizeof (void *))))
5675 exit (1);
5676 fprintf (f, "%ld\n", i);
5677 }
5678 else
5679 {
5680 unsigned long i = ulongval ();
5681 if (i != ((long) (sizeof (void *))))
5682 exit (1);
5683 fprintf (f, "%lu\n", i);
5684 }
5685 exit (ferror (f) || fclose (f) != 0);
5686
5687 ;
5688 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005689}
Martin v. Löwis11437992002-04-12 09:54:03 +00005690_ACEOF
5691rm -f conftest$ac_exeext
5692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5693 (eval $ac_link) 2>&5
5694 ac_status=$?
5695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5698 (eval $ac_try) 2>&5
5699 ac_status=$?
5700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5701 (exit $ac_status); }; }; then
5702 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005703else
Martin v. Löwis11437992002-04-12 09:54:03 +00005704 echo "$as_me: program exited with status $ac_status" >&5
5705echo "$as_me: failed program was:" >&5
5706cat conftest.$ac_ext >&5
5707( exit $ac_status )
5708{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5709echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5710 { (exit 1); exit 1; }; }
5711fi
5712rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5713fi
5714fi
5715rm -f conftest.val
5716else
Guido van Rossumad678af1998-10-02 14:42:15 +00005717 ac_cv_sizeof_void_p=0
5718fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005719fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005720echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5721echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5722cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005723#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005724_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005725
5726
Martin v. Löwis11437992002-04-12 09:54:03 +00005727echo "$as_me:$LINENO: checking for char" >&5
5728echo $ECHO_N "checking for char... $ECHO_C" >&6
5729if test "${ac_cv_type_char+set}" = set; then
5730 echo $ECHO_N "(cached) $ECHO_C" >&6
5731else
5732 cat >conftest.$ac_ext <<_ACEOF
5733#line $LINENO "configure"
5734#include "confdefs.h"
5735$ac_includes_default
5736#ifdef F77_DUMMY_MAIN
5737# ifdef __cplusplus
5738 extern "C"
5739# endif
5740 int F77_DUMMY_MAIN() { return 1; }
5741#endif
5742int
5743main ()
5744{
5745if ((char *) 0)
5746 return 0;
5747if (sizeof (char))
5748 return 0;
5749 ;
5750 return 0;
5751}
5752_ACEOF
5753rm -f conftest.$ac_objext
5754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5755 (eval $ac_compile) 2>&5
5756 ac_status=$?
5757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5758 (exit $ac_status); } &&
5759 { ac_try='test -s conftest.$ac_objext'
5760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5761 (eval $ac_try) 2>&5
5762 ac_status=$?
5763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764 (exit $ac_status); }; }; then
5765 ac_cv_type_char=yes
5766else
5767 echo "$as_me: failed program was:" >&5
5768cat conftest.$ac_ext >&5
5769ac_cv_type_char=no
5770fi
5771rm -f conftest.$ac_objext conftest.$ac_ext
5772fi
5773echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5774echo "${ECHO_T}$ac_cv_type_char" >&6
5775
5776echo "$as_me:$LINENO: checking size of char" >&5
5777echo $ECHO_N "checking size of char... $ECHO_C" >&6
5778if test "${ac_cv_sizeof_char+set}" = set; then
5779 echo $ECHO_N "(cached) $ECHO_C" >&6
5780else
5781 if test "$ac_cv_type_char" = yes; then
5782 # The cast to unsigned long works around a bug in the HP C Compiler
5783 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5784 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5785 # This bug is HP SR number 8606223364.
5786 if test "$cross_compiling" = yes; then
5787 # Depending upon the size, compute the lo and hi bounds.
5788cat >conftest.$ac_ext <<_ACEOF
5789#line $LINENO "configure"
5790#include "confdefs.h"
5791$ac_includes_default
5792#ifdef F77_DUMMY_MAIN
5793# ifdef __cplusplus
5794 extern "C"
5795# endif
5796 int F77_DUMMY_MAIN() { return 1; }
5797#endif
5798int
5799main ()
5800{
5801static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5802test_array [0] = 0
5803
5804 ;
5805 return 0;
5806}
5807_ACEOF
5808rm -f conftest.$ac_objext
5809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5810 (eval $ac_compile) 2>&5
5811 ac_status=$?
5812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5813 (exit $ac_status); } &&
5814 { ac_try='test -s conftest.$ac_objext'
5815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5816 (eval $ac_try) 2>&5
5817 ac_status=$?
5818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5819 (exit $ac_status); }; }; then
5820 ac_lo=0 ac_mid=0
5821 while :; do
5822 cat >conftest.$ac_ext <<_ACEOF
5823#line $LINENO "configure"
5824#include "confdefs.h"
5825$ac_includes_default
5826#ifdef F77_DUMMY_MAIN
5827# ifdef __cplusplus
5828 extern "C"
5829# endif
5830 int F77_DUMMY_MAIN() { return 1; }
5831#endif
5832int
5833main ()
5834{
5835static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5836test_array [0] = 0
5837
5838 ;
5839 return 0;
5840}
5841_ACEOF
5842rm -f conftest.$ac_objext
5843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5844 (eval $ac_compile) 2>&5
5845 ac_status=$?
5846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5847 (exit $ac_status); } &&
5848 { ac_try='test -s conftest.$ac_objext'
5849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5850 (eval $ac_try) 2>&5
5851 ac_status=$?
5852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5853 (exit $ac_status); }; }; then
5854 ac_hi=$ac_mid; break
5855else
5856 echo "$as_me: failed program was:" >&5
5857cat conftest.$ac_ext >&5
5858ac_lo=`expr $ac_mid + 1`
5859 if test $ac_lo -le $ac_mid; then
5860 ac_lo= ac_hi=
5861 break
5862 fi
5863 ac_mid=`expr 2 '*' $ac_mid + 1`
5864fi
5865rm -f conftest.$ac_objext conftest.$ac_ext
5866 done
5867else
5868 echo "$as_me: failed program was:" >&5
5869cat conftest.$ac_ext >&5
5870cat >conftest.$ac_ext <<_ACEOF
5871#line $LINENO "configure"
5872#include "confdefs.h"
5873$ac_includes_default
5874#ifdef F77_DUMMY_MAIN
5875# ifdef __cplusplus
5876 extern "C"
5877# endif
5878 int F77_DUMMY_MAIN() { return 1; }
5879#endif
5880int
5881main ()
5882{
5883static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5884test_array [0] = 0
5885
5886 ;
5887 return 0;
5888}
5889_ACEOF
5890rm -f conftest.$ac_objext
5891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5892 (eval $ac_compile) 2>&5
5893 ac_status=$?
5894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5895 (exit $ac_status); } &&
5896 { ac_try='test -s conftest.$ac_objext'
5897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5898 (eval $ac_try) 2>&5
5899 ac_status=$?
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5901 (exit $ac_status); }; }; then
5902 ac_hi=-1 ac_mid=-1
5903 while :; do
5904 cat >conftest.$ac_ext <<_ACEOF
5905#line $LINENO "configure"
5906#include "confdefs.h"
5907$ac_includes_default
5908#ifdef F77_DUMMY_MAIN
5909# ifdef __cplusplus
5910 extern "C"
5911# endif
5912 int F77_DUMMY_MAIN() { return 1; }
5913#endif
5914int
5915main ()
5916{
5917static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5918test_array [0] = 0
5919
5920 ;
5921 return 0;
5922}
5923_ACEOF
5924rm -f conftest.$ac_objext
5925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5926 (eval $ac_compile) 2>&5
5927 ac_status=$?
5928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5929 (exit $ac_status); } &&
5930 { ac_try='test -s conftest.$ac_objext'
5931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5932 (eval $ac_try) 2>&5
5933 ac_status=$?
5934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5935 (exit $ac_status); }; }; then
5936 ac_lo=$ac_mid; break
5937else
5938 echo "$as_me: failed program was:" >&5
5939cat conftest.$ac_ext >&5
5940ac_hi=`expr '(' $ac_mid ')' - 1`
5941 if test $ac_mid -le $ac_hi; then
5942 ac_lo= ac_hi=
5943 break
5944 fi
5945 ac_mid=`expr 2 '*' $ac_mid`
5946fi
5947rm -f conftest.$ac_objext conftest.$ac_ext
5948 done
5949else
5950 echo "$as_me: failed program was:" >&5
5951cat conftest.$ac_ext >&5
5952ac_lo= ac_hi=
5953fi
5954rm -f conftest.$ac_objext conftest.$ac_ext
5955fi
5956rm -f conftest.$ac_objext conftest.$ac_ext
5957# Binary search between lo and hi bounds.
5958while test "x$ac_lo" != "x$ac_hi"; do
5959 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5960 cat >conftest.$ac_ext <<_ACEOF
5961#line $LINENO "configure"
5962#include "confdefs.h"
5963$ac_includes_default
5964#ifdef F77_DUMMY_MAIN
5965# ifdef __cplusplus
5966 extern "C"
5967# endif
5968 int F77_DUMMY_MAIN() { return 1; }
5969#endif
5970int
5971main ()
5972{
5973static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5974test_array [0] = 0
5975
5976 ;
5977 return 0;
5978}
5979_ACEOF
5980rm -f conftest.$ac_objext
5981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5982 (eval $ac_compile) 2>&5
5983 ac_status=$?
5984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5985 (exit $ac_status); } &&
5986 { ac_try='test -s conftest.$ac_objext'
5987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5988 (eval $ac_try) 2>&5
5989 ac_status=$?
5990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5991 (exit $ac_status); }; }; then
5992 ac_hi=$ac_mid
5993else
5994 echo "$as_me: failed program was:" >&5
5995cat conftest.$ac_ext >&5
5996ac_lo=`expr '(' $ac_mid ')' + 1`
5997fi
5998rm -f conftest.$ac_objext conftest.$ac_ext
5999done
6000case $ac_lo in
6001?*) ac_cv_sizeof_char=$ac_lo;;
6002'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6003echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6004 { (exit 1); exit 1; }; } ;;
6005esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006006else
6007 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006008 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6009echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6010 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006011else
Martin v. Löwis11437992002-04-12 09:54:03 +00006012 cat >conftest.$ac_ext <<_ACEOF
6013#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006014#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006015$ac_includes_default
6016long longval () { return (long) (sizeof (char)); }
6017unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006018#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006019#include <stdlib.h>
6020#ifdef F77_DUMMY_MAIN
6021# ifdef __cplusplus
6022 extern "C"
6023# endif
6024 int F77_DUMMY_MAIN() { return 1; }
6025#endif
6026int
6027main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006028{
Martin v. Löwis11437992002-04-12 09:54:03 +00006029
6030 FILE *f = fopen ("conftest.val", "w");
6031 if (! f)
6032 exit (1);
6033 if (((long) (sizeof (char))) < 0)
6034 {
6035 long i = longval ();
6036 if (i != ((long) (sizeof (char))))
6037 exit (1);
6038 fprintf (f, "%ld\n", i);
6039 }
6040 else
6041 {
6042 unsigned long i = ulongval ();
6043 if (i != ((long) (sizeof (char))))
6044 exit (1);
6045 fprintf (f, "%lu\n", i);
6046 }
6047 exit (ferror (f) || fclose (f) != 0);
6048
6049 ;
6050 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006051}
Martin v. Löwis11437992002-04-12 09:54:03 +00006052_ACEOF
6053rm -f conftest$ac_exeext
6054if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6055 (eval $ac_link) 2>&5
6056 ac_status=$?
6057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6058 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6060 (eval $ac_try) 2>&5
6061 ac_status=$?
6062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6063 (exit $ac_status); }; }; then
6064 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006065else
Martin v. Löwis11437992002-04-12 09:54:03 +00006066 echo "$as_me: program exited with status $ac_status" >&5
6067echo "$as_me: failed program was:" >&5
6068cat conftest.$ac_ext >&5
6069( exit $ac_status )
6070{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6071echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6072 { (exit 1); exit 1; }; }
6073fi
6074rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6075fi
6076fi
6077rm -f conftest.val
6078else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006079 ac_cv_sizeof_char=0
6080fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006081fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006082echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6083echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6084cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006085#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006086_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006087
6088
Martin v. Löwis11437992002-04-12 09:54:03 +00006089echo "$as_me:$LINENO: checking for short" >&5
6090echo $ECHO_N "checking for short... $ECHO_C" >&6
6091if test "${ac_cv_type_short+set}" = set; then
6092 echo $ECHO_N "(cached) $ECHO_C" >&6
6093else
6094 cat >conftest.$ac_ext <<_ACEOF
6095#line $LINENO "configure"
6096#include "confdefs.h"
6097$ac_includes_default
6098#ifdef F77_DUMMY_MAIN
6099# ifdef __cplusplus
6100 extern "C"
6101# endif
6102 int F77_DUMMY_MAIN() { return 1; }
6103#endif
6104int
6105main ()
6106{
6107if ((short *) 0)
6108 return 0;
6109if (sizeof (short))
6110 return 0;
6111 ;
6112 return 0;
6113}
6114_ACEOF
6115rm -f conftest.$ac_objext
6116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6117 (eval $ac_compile) 2>&5
6118 ac_status=$?
6119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6120 (exit $ac_status); } &&
6121 { ac_try='test -s conftest.$ac_objext'
6122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6123 (eval $ac_try) 2>&5
6124 ac_status=$?
6125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6126 (exit $ac_status); }; }; then
6127 ac_cv_type_short=yes
6128else
6129 echo "$as_me: failed program was:" >&5
6130cat conftest.$ac_ext >&5
6131ac_cv_type_short=no
6132fi
6133rm -f conftest.$ac_objext conftest.$ac_ext
6134fi
6135echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6136echo "${ECHO_T}$ac_cv_type_short" >&6
6137
6138echo "$as_me:$LINENO: checking size of short" >&5
6139echo $ECHO_N "checking size of short... $ECHO_C" >&6
6140if test "${ac_cv_sizeof_short+set}" = set; then
6141 echo $ECHO_N "(cached) $ECHO_C" >&6
6142else
6143 if test "$ac_cv_type_short" = yes; then
6144 # The cast to unsigned long works around a bug in the HP C Compiler
6145 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6146 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6147 # This bug is HP SR number 8606223364.
6148 if test "$cross_compiling" = yes; then
6149 # Depending upon the size, compute the lo and hi bounds.
6150cat >conftest.$ac_ext <<_ACEOF
6151#line $LINENO "configure"
6152#include "confdefs.h"
6153$ac_includes_default
6154#ifdef F77_DUMMY_MAIN
6155# ifdef __cplusplus
6156 extern "C"
6157# endif
6158 int F77_DUMMY_MAIN() { return 1; }
6159#endif
6160int
6161main ()
6162{
6163static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6164test_array [0] = 0
6165
6166 ;
6167 return 0;
6168}
6169_ACEOF
6170rm -f conftest.$ac_objext
6171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6172 (eval $ac_compile) 2>&5
6173 ac_status=$?
6174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6175 (exit $ac_status); } &&
6176 { ac_try='test -s conftest.$ac_objext'
6177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6178 (eval $ac_try) 2>&5
6179 ac_status=$?
6180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6181 (exit $ac_status); }; }; then
6182 ac_lo=0 ac_mid=0
6183 while :; do
6184 cat >conftest.$ac_ext <<_ACEOF
6185#line $LINENO "configure"
6186#include "confdefs.h"
6187$ac_includes_default
6188#ifdef F77_DUMMY_MAIN
6189# ifdef __cplusplus
6190 extern "C"
6191# endif
6192 int F77_DUMMY_MAIN() { return 1; }
6193#endif
6194int
6195main ()
6196{
6197static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6198test_array [0] = 0
6199
6200 ;
6201 return 0;
6202}
6203_ACEOF
6204rm -f conftest.$ac_objext
6205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6206 (eval $ac_compile) 2>&5
6207 ac_status=$?
6208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6209 (exit $ac_status); } &&
6210 { ac_try='test -s conftest.$ac_objext'
6211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6212 (eval $ac_try) 2>&5
6213 ac_status=$?
6214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6215 (exit $ac_status); }; }; then
6216 ac_hi=$ac_mid; break
6217else
6218 echo "$as_me: failed program was:" >&5
6219cat conftest.$ac_ext >&5
6220ac_lo=`expr $ac_mid + 1`
6221 if test $ac_lo -le $ac_mid; then
6222 ac_lo= ac_hi=
6223 break
6224 fi
6225 ac_mid=`expr 2 '*' $ac_mid + 1`
6226fi
6227rm -f conftest.$ac_objext conftest.$ac_ext
6228 done
6229else
6230 echo "$as_me: failed program was:" >&5
6231cat conftest.$ac_ext >&5
6232cat >conftest.$ac_ext <<_ACEOF
6233#line $LINENO "configure"
6234#include "confdefs.h"
6235$ac_includes_default
6236#ifdef F77_DUMMY_MAIN
6237# ifdef __cplusplus
6238 extern "C"
6239# endif
6240 int F77_DUMMY_MAIN() { return 1; }
6241#endif
6242int
6243main ()
6244{
6245static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6246test_array [0] = 0
6247
6248 ;
6249 return 0;
6250}
6251_ACEOF
6252rm -f conftest.$ac_objext
6253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6254 (eval $ac_compile) 2>&5
6255 ac_status=$?
6256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6257 (exit $ac_status); } &&
6258 { ac_try='test -s conftest.$ac_objext'
6259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6260 (eval $ac_try) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); }; }; then
6264 ac_hi=-1 ac_mid=-1
6265 while :; do
6266 cat >conftest.$ac_ext <<_ACEOF
6267#line $LINENO "configure"
6268#include "confdefs.h"
6269$ac_includes_default
6270#ifdef F77_DUMMY_MAIN
6271# ifdef __cplusplus
6272 extern "C"
6273# endif
6274 int F77_DUMMY_MAIN() { return 1; }
6275#endif
6276int
6277main ()
6278{
6279static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6280test_array [0] = 0
6281
6282 ;
6283 return 0;
6284}
6285_ACEOF
6286rm -f conftest.$ac_objext
6287if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6288 (eval $ac_compile) 2>&5
6289 ac_status=$?
6290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6291 (exit $ac_status); } &&
6292 { ac_try='test -s conftest.$ac_objext'
6293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6294 (eval $ac_try) 2>&5
6295 ac_status=$?
6296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6297 (exit $ac_status); }; }; then
6298 ac_lo=$ac_mid; break
6299else
6300 echo "$as_me: failed program was:" >&5
6301cat conftest.$ac_ext >&5
6302ac_hi=`expr '(' $ac_mid ')' - 1`
6303 if test $ac_mid -le $ac_hi; then
6304 ac_lo= ac_hi=
6305 break
6306 fi
6307 ac_mid=`expr 2 '*' $ac_mid`
6308fi
6309rm -f conftest.$ac_objext conftest.$ac_ext
6310 done
6311else
6312 echo "$as_me: failed program was:" >&5
6313cat conftest.$ac_ext >&5
6314ac_lo= ac_hi=
6315fi
6316rm -f conftest.$ac_objext conftest.$ac_ext
6317fi
6318rm -f conftest.$ac_objext conftest.$ac_ext
6319# Binary search between lo and hi bounds.
6320while test "x$ac_lo" != "x$ac_hi"; do
6321 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6322 cat >conftest.$ac_ext <<_ACEOF
6323#line $LINENO "configure"
6324#include "confdefs.h"
6325$ac_includes_default
6326#ifdef F77_DUMMY_MAIN
6327# ifdef __cplusplus
6328 extern "C"
6329# endif
6330 int F77_DUMMY_MAIN() { return 1; }
6331#endif
6332int
6333main ()
6334{
6335static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6336test_array [0] = 0
6337
6338 ;
6339 return 0;
6340}
6341_ACEOF
6342rm -f conftest.$ac_objext
6343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6344 (eval $ac_compile) 2>&5
6345 ac_status=$?
6346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6347 (exit $ac_status); } &&
6348 { ac_try='test -s conftest.$ac_objext'
6349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6350 (eval $ac_try) 2>&5
6351 ac_status=$?
6352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6353 (exit $ac_status); }; }; then
6354 ac_hi=$ac_mid
6355else
6356 echo "$as_me: failed program was:" >&5
6357cat conftest.$ac_ext >&5
6358ac_lo=`expr '(' $ac_mid ')' + 1`
6359fi
6360rm -f conftest.$ac_objext conftest.$ac_ext
6361done
6362case $ac_lo in
6363?*) ac_cv_sizeof_short=$ac_lo;;
6364'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6365echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6366 { (exit 1); exit 1; }; } ;;
6367esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006368else
6369 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006370 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6371echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6372 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006373else
Martin v. Löwis11437992002-04-12 09:54:03 +00006374 cat >conftest.$ac_ext <<_ACEOF
6375#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006376#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006377$ac_includes_default
6378long longval () { return (long) (sizeof (short)); }
6379unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006380#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006381#include <stdlib.h>
6382#ifdef F77_DUMMY_MAIN
6383# ifdef __cplusplus
6384 extern "C"
6385# endif
6386 int F77_DUMMY_MAIN() { return 1; }
6387#endif
6388int
6389main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006390{
Martin v. Löwis11437992002-04-12 09:54:03 +00006391
6392 FILE *f = fopen ("conftest.val", "w");
6393 if (! f)
6394 exit (1);
6395 if (((long) (sizeof (short))) < 0)
6396 {
6397 long i = longval ();
6398 if (i != ((long) (sizeof (short))))
6399 exit (1);
6400 fprintf (f, "%ld\n", i);
6401 }
6402 else
6403 {
6404 unsigned long i = ulongval ();
6405 if (i != ((long) (sizeof (short))))
6406 exit (1);
6407 fprintf (f, "%lu\n", i);
6408 }
6409 exit (ferror (f) || fclose (f) != 0);
6410
6411 ;
6412 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006413}
Martin v. Löwis11437992002-04-12 09:54:03 +00006414_ACEOF
6415rm -f conftest$ac_exeext
6416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6417 (eval $ac_link) 2>&5
6418 ac_status=$?
6419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6420 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6422 (eval $ac_try) 2>&5
6423 ac_status=$?
6424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6425 (exit $ac_status); }; }; then
6426 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006427else
Martin v. Löwis11437992002-04-12 09:54:03 +00006428 echo "$as_me: program exited with status $ac_status" >&5
6429echo "$as_me: failed program was:" >&5
6430cat conftest.$ac_ext >&5
6431( exit $ac_status )
6432{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6433echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6434 { (exit 1); exit 1; }; }
6435fi
6436rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6437fi
6438fi
6439rm -f conftest.val
6440else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006441 ac_cv_sizeof_short=0
6442fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006443fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006444echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6445echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6446cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006447#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006448_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006449
6450
Martin v. Löwis11437992002-04-12 09:54:03 +00006451echo "$as_me:$LINENO: checking for float" >&5
6452echo $ECHO_N "checking for float... $ECHO_C" >&6
6453if test "${ac_cv_type_float+set}" = set; then
6454 echo $ECHO_N "(cached) $ECHO_C" >&6
6455else
6456 cat >conftest.$ac_ext <<_ACEOF
6457#line $LINENO "configure"
6458#include "confdefs.h"
6459$ac_includes_default
6460#ifdef F77_DUMMY_MAIN
6461# ifdef __cplusplus
6462 extern "C"
6463# endif
6464 int F77_DUMMY_MAIN() { return 1; }
6465#endif
6466int
6467main ()
6468{
6469if ((float *) 0)
6470 return 0;
6471if (sizeof (float))
6472 return 0;
6473 ;
6474 return 0;
6475}
6476_ACEOF
6477rm -f conftest.$ac_objext
6478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6479 (eval $ac_compile) 2>&5
6480 ac_status=$?
6481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6482 (exit $ac_status); } &&
6483 { ac_try='test -s conftest.$ac_objext'
6484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6485 (eval $ac_try) 2>&5
6486 ac_status=$?
6487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6488 (exit $ac_status); }; }; then
6489 ac_cv_type_float=yes
6490else
6491 echo "$as_me: failed program was:" >&5
6492cat conftest.$ac_ext >&5
6493ac_cv_type_float=no
6494fi
6495rm -f conftest.$ac_objext conftest.$ac_ext
6496fi
6497echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6498echo "${ECHO_T}$ac_cv_type_float" >&6
6499
6500echo "$as_me:$LINENO: checking size of float" >&5
6501echo $ECHO_N "checking size of float... $ECHO_C" >&6
6502if test "${ac_cv_sizeof_float+set}" = set; then
6503 echo $ECHO_N "(cached) $ECHO_C" >&6
6504else
6505 if test "$ac_cv_type_float" = yes; then
6506 # The cast to unsigned long works around a bug in the HP C Compiler
6507 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6508 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6509 # This bug is HP SR number 8606223364.
6510 if test "$cross_compiling" = yes; then
6511 # Depending upon the size, compute the lo and hi bounds.
6512cat >conftest.$ac_ext <<_ACEOF
6513#line $LINENO "configure"
6514#include "confdefs.h"
6515$ac_includes_default
6516#ifdef F77_DUMMY_MAIN
6517# ifdef __cplusplus
6518 extern "C"
6519# endif
6520 int F77_DUMMY_MAIN() { return 1; }
6521#endif
6522int
6523main ()
6524{
6525static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6526test_array [0] = 0
6527
6528 ;
6529 return 0;
6530}
6531_ACEOF
6532rm -f conftest.$ac_objext
6533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6534 (eval $ac_compile) 2>&5
6535 ac_status=$?
6536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6537 (exit $ac_status); } &&
6538 { ac_try='test -s conftest.$ac_objext'
6539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6540 (eval $ac_try) 2>&5
6541 ac_status=$?
6542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6543 (exit $ac_status); }; }; then
6544 ac_lo=0 ac_mid=0
6545 while :; do
6546 cat >conftest.$ac_ext <<_ACEOF
6547#line $LINENO "configure"
6548#include "confdefs.h"
6549$ac_includes_default
6550#ifdef F77_DUMMY_MAIN
6551# ifdef __cplusplus
6552 extern "C"
6553# endif
6554 int F77_DUMMY_MAIN() { return 1; }
6555#endif
6556int
6557main ()
6558{
6559static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6560test_array [0] = 0
6561
6562 ;
6563 return 0;
6564}
6565_ACEOF
6566rm -f conftest.$ac_objext
6567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6568 (eval $ac_compile) 2>&5
6569 ac_status=$?
6570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6571 (exit $ac_status); } &&
6572 { ac_try='test -s conftest.$ac_objext'
6573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6574 (eval $ac_try) 2>&5
6575 ac_status=$?
6576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6577 (exit $ac_status); }; }; then
6578 ac_hi=$ac_mid; break
6579else
6580 echo "$as_me: failed program was:" >&5
6581cat conftest.$ac_ext >&5
6582ac_lo=`expr $ac_mid + 1`
6583 if test $ac_lo -le $ac_mid; then
6584 ac_lo= ac_hi=
6585 break
6586 fi
6587 ac_mid=`expr 2 '*' $ac_mid + 1`
6588fi
6589rm -f conftest.$ac_objext conftest.$ac_ext
6590 done
6591else
6592 echo "$as_me: failed program was:" >&5
6593cat conftest.$ac_ext >&5
6594cat >conftest.$ac_ext <<_ACEOF
6595#line $LINENO "configure"
6596#include "confdefs.h"
6597$ac_includes_default
6598#ifdef F77_DUMMY_MAIN
6599# ifdef __cplusplus
6600 extern "C"
6601# endif
6602 int F77_DUMMY_MAIN() { return 1; }
6603#endif
6604int
6605main ()
6606{
6607static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6608test_array [0] = 0
6609
6610 ;
6611 return 0;
6612}
6613_ACEOF
6614rm -f conftest.$ac_objext
6615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6616 (eval $ac_compile) 2>&5
6617 ac_status=$?
6618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6619 (exit $ac_status); } &&
6620 { ac_try='test -s conftest.$ac_objext'
6621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6622 (eval $ac_try) 2>&5
6623 ac_status=$?
6624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6625 (exit $ac_status); }; }; then
6626 ac_hi=-1 ac_mid=-1
6627 while :; do
6628 cat >conftest.$ac_ext <<_ACEOF
6629#line $LINENO "configure"
6630#include "confdefs.h"
6631$ac_includes_default
6632#ifdef F77_DUMMY_MAIN
6633# ifdef __cplusplus
6634 extern "C"
6635# endif
6636 int F77_DUMMY_MAIN() { return 1; }
6637#endif
6638int
6639main ()
6640{
6641static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6642test_array [0] = 0
6643
6644 ;
6645 return 0;
6646}
6647_ACEOF
6648rm -f conftest.$ac_objext
6649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6650 (eval $ac_compile) 2>&5
6651 ac_status=$?
6652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6653 (exit $ac_status); } &&
6654 { ac_try='test -s conftest.$ac_objext'
6655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6656 (eval $ac_try) 2>&5
6657 ac_status=$?
6658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6659 (exit $ac_status); }; }; then
6660 ac_lo=$ac_mid; break
6661else
6662 echo "$as_me: failed program was:" >&5
6663cat conftest.$ac_ext >&5
6664ac_hi=`expr '(' $ac_mid ')' - 1`
6665 if test $ac_mid -le $ac_hi; then
6666 ac_lo= ac_hi=
6667 break
6668 fi
6669 ac_mid=`expr 2 '*' $ac_mid`
6670fi
6671rm -f conftest.$ac_objext conftest.$ac_ext
6672 done
6673else
6674 echo "$as_me: failed program was:" >&5
6675cat conftest.$ac_ext >&5
6676ac_lo= ac_hi=
6677fi
6678rm -f conftest.$ac_objext conftest.$ac_ext
6679fi
6680rm -f conftest.$ac_objext conftest.$ac_ext
6681# Binary search between lo and hi bounds.
6682while test "x$ac_lo" != "x$ac_hi"; do
6683 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6684 cat >conftest.$ac_ext <<_ACEOF
6685#line $LINENO "configure"
6686#include "confdefs.h"
6687$ac_includes_default
6688#ifdef F77_DUMMY_MAIN
6689# ifdef __cplusplus
6690 extern "C"
6691# endif
6692 int F77_DUMMY_MAIN() { return 1; }
6693#endif
6694int
6695main ()
6696{
6697static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6698test_array [0] = 0
6699
6700 ;
6701 return 0;
6702}
6703_ACEOF
6704rm -f conftest.$ac_objext
6705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6706 (eval $ac_compile) 2>&5
6707 ac_status=$?
6708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6709 (exit $ac_status); } &&
6710 { ac_try='test -s conftest.$ac_objext'
6711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6712 (eval $ac_try) 2>&5
6713 ac_status=$?
6714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715 (exit $ac_status); }; }; then
6716 ac_hi=$ac_mid
6717else
6718 echo "$as_me: failed program was:" >&5
6719cat conftest.$ac_ext >&5
6720ac_lo=`expr '(' $ac_mid ')' + 1`
6721fi
6722rm -f conftest.$ac_objext conftest.$ac_ext
6723done
6724case $ac_lo in
6725?*) ac_cv_sizeof_float=$ac_lo;;
6726'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6727echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6728 { (exit 1); exit 1; }; } ;;
6729esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006730else
6731 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006732 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6733echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6734 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006735else
Martin v. Löwis11437992002-04-12 09:54:03 +00006736 cat >conftest.$ac_ext <<_ACEOF
6737#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006738#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006739$ac_includes_default
6740long longval () { return (long) (sizeof (float)); }
6741unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006742#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006743#include <stdlib.h>
6744#ifdef F77_DUMMY_MAIN
6745# ifdef __cplusplus
6746 extern "C"
6747# endif
6748 int F77_DUMMY_MAIN() { return 1; }
6749#endif
6750int
6751main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006752{
Martin v. Löwis11437992002-04-12 09:54:03 +00006753
6754 FILE *f = fopen ("conftest.val", "w");
6755 if (! f)
6756 exit (1);
6757 if (((long) (sizeof (float))) < 0)
6758 {
6759 long i = longval ();
6760 if (i != ((long) (sizeof (float))))
6761 exit (1);
6762 fprintf (f, "%ld\n", i);
6763 }
6764 else
6765 {
6766 unsigned long i = ulongval ();
6767 if (i != ((long) (sizeof (float))))
6768 exit (1);
6769 fprintf (f, "%lu\n", i);
6770 }
6771 exit (ferror (f) || fclose (f) != 0);
6772
6773 ;
6774 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006775}
Martin v. Löwis11437992002-04-12 09:54:03 +00006776_ACEOF
6777rm -f conftest$ac_exeext
6778if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6779 (eval $ac_link) 2>&5
6780 ac_status=$?
6781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6782 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6784 (eval $ac_try) 2>&5
6785 ac_status=$?
6786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6787 (exit $ac_status); }; }; then
6788 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006789else
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 echo "$as_me: program exited with status $ac_status" >&5
6791echo "$as_me: failed program was:" >&5
6792cat conftest.$ac_ext >&5
6793( exit $ac_status )
6794{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6795echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6796 { (exit 1); exit 1; }; }
6797fi
6798rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6799fi
6800fi
6801rm -f conftest.val
6802else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006803 ac_cv_sizeof_float=0
6804fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006805fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006806echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6807echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6808cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006809#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006810_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006811
6812
Martin v. Löwis11437992002-04-12 09:54:03 +00006813echo "$as_me:$LINENO: checking for double" >&5
6814echo $ECHO_N "checking for double... $ECHO_C" >&6
6815if test "${ac_cv_type_double+set}" = set; then
6816 echo $ECHO_N "(cached) $ECHO_C" >&6
6817else
6818 cat >conftest.$ac_ext <<_ACEOF
6819#line $LINENO "configure"
6820#include "confdefs.h"
6821$ac_includes_default
6822#ifdef F77_DUMMY_MAIN
6823# ifdef __cplusplus
6824 extern "C"
6825# endif
6826 int F77_DUMMY_MAIN() { return 1; }
6827#endif
6828int
6829main ()
6830{
6831if ((double *) 0)
6832 return 0;
6833if (sizeof (double))
6834 return 0;
6835 ;
6836 return 0;
6837}
6838_ACEOF
6839rm -f conftest.$ac_objext
6840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6841 (eval $ac_compile) 2>&5
6842 ac_status=$?
6843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6844 (exit $ac_status); } &&
6845 { ac_try='test -s conftest.$ac_objext'
6846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6847 (eval $ac_try) 2>&5
6848 ac_status=$?
6849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6850 (exit $ac_status); }; }; then
6851 ac_cv_type_double=yes
6852else
6853 echo "$as_me: failed program was:" >&5
6854cat conftest.$ac_ext >&5
6855ac_cv_type_double=no
6856fi
6857rm -f conftest.$ac_objext conftest.$ac_ext
6858fi
6859echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6860echo "${ECHO_T}$ac_cv_type_double" >&6
6861
6862echo "$as_me:$LINENO: checking size of double" >&5
6863echo $ECHO_N "checking size of double... $ECHO_C" >&6
6864if test "${ac_cv_sizeof_double+set}" = set; then
6865 echo $ECHO_N "(cached) $ECHO_C" >&6
6866else
6867 if test "$ac_cv_type_double" = yes; then
6868 # The cast to unsigned long works around a bug in the HP C Compiler
6869 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6870 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6871 # This bug is HP SR number 8606223364.
6872 if test "$cross_compiling" = yes; then
6873 # Depending upon the size, compute the lo and hi bounds.
6874cat >conftest.$ac_ext <<_ACEOF
6875#line $LINENO "configure"
6876#include "confdefs.h"
6877$ac_includes_default
6878#ifdef F77_DUMMY_MAIN
6879# ifdef __cplusplus
6880 extern "C"
6881# endif
6882 int F77_DUMMY_MAIN() { return 1; }
6883#endif
6884int
6885main ()
6886{
6887static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6888test_array [0] = 0
6889
6890 ;
6891 return 0;
6892}
6893_ACEOF
6894rm -f conftest.$ac_objext
6895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6896 (eval $ac_compile) 2>&5
6897 ac_status=$?
6898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6899 (exit $ac_status); } &&
6900 { ac_try='test -s conftest.$ac_objext'
6901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6902 (eval $ac_try) 2>&5
6903 ac_status=$?
6904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6905 (exit $ac_status); }; }; then
6906 ac_lo=0 ac_mid=0
6907 while :; do
6908 cat >conftest.$ac_ext <<_ACEOF
6909#line $LINENO "configure"
6910#include "confdefs.h"
6911$ac_includes_default
6912#ifdef F77_DUMMY_MAIN
6913# ifdef __cplusplus
6914 extern "C"
6915# endif
6916 int F77_DUMMY_MAIN() { return 1; }
6917#endif
6918int
6919main ()
6920{
6921static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6922test_array [0] = 0
6923
6924 ;
6925 return 0;
6926}
6927_ACEOF
6928rm -f conftest.$ac_objext
6929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6930 (eval $ac_compile) 2>&5
6931 ac_status=$?
6932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6933 (exit $ac_status); } &&
6934 { ac_try='test -s conftest.$ac_objext'
6935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6936 (eval $ac_try) 2>&5
6937 ac_status=$?
6938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6939 (exit $ac_status); }; }; then
6940 ac_hi=$ac_mid; break
6941else
6942 echo "$as_me: failed program was:" >&5
6943cat conftest.$ac_ext >&5
6944ac_lo=`expr $ac_mid + 1`
6945 if test $ac_lo -le $ac_mid; then
6946 ac_lo= ac_hi=
6947 break
6948 fi
6949 ac_mid=`expr 2 '*' $ac_mid + 1`
6950fi
6951rm -f conftest.$ac_objext conftest.$ac_ext
6952 done
6953else
6954 echo "$as_me: failed program was:" >&5
6955cat conftest.$ac_ext >&5
6956cat >conftest.$ac_ext <<_ACEOF
6957#line $LINENO "configure"
6958#include "confdefs.h"
6959$ac_includes_default
6960#ifdef F77_DUMMY_MAIN
6961# ifdef __cplusplus
6962 extern "C"
6963# endif
6964 int F77_DUMMY_MAIN() { return 1; }
6965#endif
6966int
6967main ()
6968{
6969static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6970test_array [0] = 0
6971
6972 ;
6973 return 0;
6974}
6975_ACEOF
6976rm -f conftest.$ac_objext
6977if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6978 (eval $ac_compile) 2>&5
6979 ac_status=$?
6980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6981 (exit $ac_status); } &&
6982 { ac_try='test -s conftest.$ac_objext'
6983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6984 (eval $ac_try) 2>&5
6985 ac_status=$?
6986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6987 (exit $ac_status); }; }; then
6988 ac_hi=-1 ac_mid=-1
6989 while :; do
6990 cat >conftest.$ac_ext <<_ACEOF
6991#line $LINENO "configure"
6992#include "confdefs.h"
6993$ac_includes_default
6994#ifdef F77_DUMMY_MAIN
6995# ifdef __cplusplus
6996 extern "C"
6997# endif
6998 int F77_DUMMY_MAIN() { return 1; }
6999#endif
7000int
7001main ()
7002{
7003static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7004test_array [0] = 0
7005
7006 ;
7007 return 0;
7008}
7009_ACEOF
7010rm -f conftest.$ac_objext
7011if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7012 (eval $ac_compile) 2>&5
7013 ac_status=$?
7014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7015 (exit $ac_status); } &&
7016 { ac_try='test -s conftest.$ac_objext'
7017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7018 (eval $ac_try) 2>&5
7019 ac_status=$?
7020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7021 (exit $ac_status); }; }; then
7022 ac_lo=$ac_mid; break
7023else
7024 echo "$as_me: failed program was:" >&5
7025cat conftest.$ac_ext >&5
7026ac_hi=`expr '(' $ac_mid ')' - 1`
7027 if test $ac_mid -le $ac_hi; then
7028 ac_lo= ac_hi=
7029 break
7030 fi
7031 ac_mid=`expr 2 '*' $ac_mid`
7032fi
7033rm -f conftest.$ac_objext conftest.$ac_ext
7034 done
7035else
7036 echo "$as_me: failed program was:" >&5
7037cat conftest.$ac_ext >&5
7038ac_lo= ac_hi=
7039fi
7040rm -f conftest.$ac_objext conftest.$ac_ext
7041fi
7042rm -f conftest.$ac_objext conftest.$ac_ext
7043# Binary search between lo and hi bounds.
7044while test "x$ac_lo" != "x$ac_hi"; do
7045 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7046 cat >conftest.$ac_ext <<_ACEOF
7047#line $LINENO "configure"
7048#include "confdefs.h"
7049$ac_includes_default
7050#ifdef F77_DUMMY_MAIN
7051# ifdef __cplusplus
7052 extern "C"
7053# endif
7054 int F77_DUMMY_MAIN() { return 1; }
7055#endif
7056int
7057main ()
7058{
7059static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7060test_array [0] = 0
7061
7062 ;
7063 return 0;
7064}
7065_ACEOF
7066rm -f conftest.$ac_objext
7067if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7068 (eval $ac_compile) 2>&5
7069 ac_status=$?
7070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7071 (exit $ac_status); } &&
7072 { ac_try='test -s conftest.$ac_objext'
7073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7074 (eval $ac_try) 2>&5
7075 ac_status=$?
7076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7077 (exit $ac_status); }; }; then
7078 ac_hi=$ac_mid
7079else
7080 echo "$as_me: failed program was:" >&5
7081cat conftest.$ac_ext >&5
7082ac_lo=`expr '(' $ac_mid ')' + 1`
7083fi
7084rm -f conftest.$ac_objext conftest.$ac_ext
7085done
7086case $ac_lo in
7087?*) ac_cv_sizeof_double=$ac_lo;;
7088'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7089echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7090 { (exit 1); exit 1; }; } ;;
7091esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007092else
7093 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007094 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7095echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7096 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007097else
Martin v. Löwis11437992002-04-12 09:54:03 +00007098 cat >conftest.$ac_ext <<_ACEOF
7099#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007100#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007101$ac_includes_default
7102long longval () { return (long) (sizeof (double)); }
7103unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007104#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007105#include <stdlib.h>
7106#ifdef F77_DUMMY_MAIN
7107# ifdef __cplusplus
7108 extern "C"
7109# endif
7110 int F77_DUMMY_MAIN() { return 1; }
7111#endif
7112int
7113main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007114{
Martin v. Löwis11437992002-04-12 09:54:03 +00007115
7116 FILE *f = fopen ("conftest.val", "w");
7117 if (! f)
7118 exit (1);
7119 if (((long) (sizeof (double))) < 0)
7120 {
7121 long i = longval ();
7122 if (i != ((long) (sizeof (double))))
7123 exit (1);
7124 fprintf (f, "%ld\n", i);
7125 }
7126 else
7127 {
7128 unsigned long i = ulongval ();
7129 if (i != ((long) (sizeof (double))))
7130 exit (1);
7131 fprintf (f, "%lu\n", i);
7132 }
7133 exit (ferror (f) || fclose (f) != 0);
7134
7135 ;
7136 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007137}
Martin v. Löwis11437992002-04-12 09:54:03 +00007138_ACEOF
7139rm -f conftest$ac_exeext
7140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7141 (eval $ac_link) 2>&5
7142 ac_status=$?
7143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7144 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7146 (eval $ac_try) 2>&5
7147 ac_status=$?
7148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7149 (exit $ac_status); }; }; then
7150 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007151else
Martin v. Löwis11437992002-04-12 09:54:03 +00007152 echo "$as_me: program exited with status $ac_status" >&5
7153echo "$as_me: failed program was:" >&5
7154cat conftest.$ac_ext >&5
7155( exit $ac_status )
7156{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7157echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7158 { (exit 1); exit 1; }; }
7159fi
7160rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7161fi
7162fi
7163rm -f conftest.val
7164else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007165 ac_cv_sizeof_double=0
7166fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007168echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7169echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7170cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007171#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007172_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007173
7174
Martin v. Löwis11437992002-04-12 09:54:03 +00007175echo "$as_me:$LINENO: checking for fpos_t" >&5
7176echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7177if test "${ac_cv_type_fpos_t+set}" = set; then
7178 echo $ECHO_N "(cached) $ECHO_C" >&6
7179else
7180 cat >conftest.$ac_ext <<_ACEOF
7181#line $LINENO "configure"
7182#include "confdefs.h"
7183$ac_includes_default
7184#ifdef F77_DUMMY_MAIN
7185# ifdef __cplusplus
7186 extern "C"
7187# endif
7188 int F77_DUMMY_MAIN() { return 1; }
7189#endif
7190int
7191main ()
7192{
7193if ((fpos_t *) 0)
7194 return 0;
7195if (sizeof (fpos_t))
7196 return 0;
7197 ;
7198 return 0;
7199}
7200_ACEOF
7201rm -f conftest.$ac_objext
7202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7203 (eval $ac_compile) 2>&5
7204 ac_status=$?
7205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7206 (exit $ac_status); } &&
7207 { ac_try='test -s conftest.$ac_objext'
7208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7209 (eval $ac_try) 2>&5
7210 ac_status=$?
7211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7212 (exit $ac_status); }; }; then
7213 ac_cv_type_fpos_t=yes
7214else
7215 echo "$as_me: failed program was:" >&5
7216cat conftest.$ac_ext >&5
7217ac_cv_type_fpos_t=no
7218fi
7219rm -f conftest.$ac_objext conftest.$ac_ext
7220fi
7221echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7222echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7223
7224echo "$as_me:$LINENO: checking size of fpos_t" >&5
7225echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7226if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7227 echo $ECHO_N "(cached) $ECHO_C" >&6
7228else
7229 if test "$ac_cv_type_fpos_t" = yes; then
7230 # The cast to unsigned long works around a bug in the HP C Compiler
7231 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7232 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7233 # This bug is HP SR number 8606223364.
7234 if test "$cross_compiling" = yes; then
7235 # Depending upon the size, compute the lo and hi bounds.
7236cat >conftest.$ac_ext <<_ACEOF
7237#line $LINENO "configure"
7238#include "confdefs.h"
7239$ac_includes_default
7240#ifdef F77_DUMMY_MAIN
7241# ifdef __cplusplus
7242 extern "C"
7243# endif
7244 int F77_DUMMY_MAIN() { return 1; }
7245#endif
7246int
7247main ()
7248{
7249static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7250test_array [0] = 0
7251
7252 ;
7253 return 0;
7254}
7255_ACEOF
7256rm -f conftest.$ac_objext
7257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7258 (eval $ac_compile) 2>&5
7259 ac_status=$?
7260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7261 (exit $ac_status); } &&
7262 { ac_try='test -s conftest.$ac_objext'
7263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7264 (eval $ac_try) 2>&5
7265 ac_status=$?
7266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7267 (exit $ac_status); }; }; then
7268 ac_lo=0 ac_mid=0
7269 while :; do
7270 cat >conftest.$ac_ext <<_ACEOF
7271#line $LINENO "configure"
7272#include "confdefs.h"
7273$ac_includes_default
7274#ifdef F77_DUMMY_MAIN
7275# ifdef __cplusplus
7276 extern "C"
7277# endif
7278 int F77_DUMMY_MAIN() { return 1; }
7279#endif
7280int
7281main ()
7282{
7283static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7284test_array [0] = 0
7285
7286 ;
7287 return 0;
7288}
7289_ACEOF
7290rm -f conftest.$ac_objext
7291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7292 (eval $ac_compile) 2>&5
7293 ac_status=$?
7294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7295 (exit $ac_status); } &&
7296 { ac_try='test -s conftest.$ac_objext'
7297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7298 (eval $ac_try) 2>&5
7299 ac_status=$?
7300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7301 (exit $ac_status); }; }; then
7302 ac_hi=$ac_mid; break
7303else
7304 echo "$as_me: failed program was:" >&5
7305cat conftest.$ac_ext >&5
7306ac_lo=`expr $ac_mid + 1`
7307 if test $ac_lo -le $ac_mid; then
7308 ac_lo= ac_hi=
7309 break
7310 fi
7311 ac_mid=`expr 2 '*' $ac_mid + 1`
7312fi
7313rm -f conftest.$ac_objext conftest.$ac_ext
7314 done
7315else
7316 echo "$as_me: failed program was:" >&5
7317cat conftest.$ac_ext >&5
7318cat >conftest.$ac_ext <<_ACEOF
7319#line $LINENO "configure"
7320#include "confdefs.h"
7321$ac_includes_default
7322#ifdef F77_DUMMY_MAIN
7323# ifdef __cplusplus
7324 extern "C"
7325# endif
7326 int F77_DUMMY_MAIN() { return 1; }
7327#endif
7328int
7329main ()
7330{
7331static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7332test_array [0] = 0
7333
7334 ;
7335 return 0;
7336}
7337_ACEOF
7338rm -f conftest.$ac_objext
7339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7340 (eval $ac_compile) 2>&5
7341 ac_status=$?
7342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7343 (exit $ac_status); } &&
7344 { ac_try='test -s conftest.$ac_objext'
7345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7346 (eval $ac_try) 2>&5
7347 ac_status=$?
7348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7349 (exit $ac_status); }; }; then
7350 ac_hi=-1 ac_mid=-1
7351 while :; do
7352 cat >conftest.$ac_ext <<_ACEOF
7353#line $LINENO "configure"
7354#include "confdefs.h"
7355$ac_includes_default
7356#ifdef F77_DUMMY_MAIN
7357# ifdef __cplusplus
7358 extern "C"
7359# endif
7360 int F77_DUMMY_MAIN() { return 1; }
7361#endif
7362int
7363main ()
7364{
7365static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7366test_array [0] = 0
7367
7368 ;
7369 return 0;
7370}
7371_ACEOF
7372rm -f conftest.$ac_objext
7373if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7374 (eval $ac_compile) 2>&5
7375 ac_status=$?
7376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7377 (exit $ac_status); } &&
7378 { ac_try='test -s conftest.$ac_objext'
7379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7380 (eval $ac_try) 2>&5
7381 ac_status=$?
7382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7383 (exit $ac_status); }; }; then
7384 ac_lo=$ac_mid; break
7385else
7386 echo "$as_me: failed program was:" >&5
7387cat conftest.$ac_ext >&5
7388ac_hi=`expr '(' $ac_mid ')' - 1`
7389 if test $ac_mid -le $ac_hi; then
7390 ac_lo= ac_hi=
7391 break
7392 fi
7393 ac_mid=`expr 2 '*' $ac_mid`
7394fi
7395rm -f conftest.$ac_objext conftest.$ac_ext
7396 done
7397else
7398 echo "$as_me: failed program was:" >&5
7399cat conftest.$ac_ext >&5
7400ac_lo= ac_hi=
7401fi
7402rm -f conftest.$ac_objext conftest.$ac_ext
7403fi
7404rm -f conftest.$ac_objext conftest.$ac_ext
7405# Binary search between lo and hi bounds.
7406while test "x$ac_lo" != "x$ac_hi"; do
7407 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7408 cat >conftest.$ac_ext <<_ACEOF
7409#line $LINENO "configure"
7410#include "confdefs.h"
7411$ac_includes_default
7412#ifdef F77_DUMMY_MAIN
7413# ifdef __cplusplus
7414 extern "C"
7415# endif
7416 int F77_DUMMY_MAIN() { return 1; }
7417#endif
7418int
7419main ()
7420{
7421static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7422test_array [0] = 0
7423
7424 ;
7425 return 0;
7426}
7427_ACEOF
7428rm -f conftest.$ac_objext
7429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7430 (eval $ac_compile) 2>&5
7431 ac_status=$?
7432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7433 (exit $ac_status); } &&
7434 { ac_try='test -s conftest.$ac_objext'
7435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7436 (eval $ac_try) 2>&5
7437 ac_status=$?
7438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439 (exit $ac_status); }; }; then
7440 ac_hi=$ac_mid
7441else
7442 echo "$as_me: failed program was:" >&5
7443cat conftest.$ac_ext >&5
7444ac_lo=`expr '(' $ac_mid ')' + 1`
7445fi
7446rm -f conftest.$ac_objext conftest.$ac_ext
7447done
7448case $ac_lo in
7449?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7450'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7451echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7452 { (exit 1); exit 1; }; } ;;
7453esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007454else
7455 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007456 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7457echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7458 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007459else
Martin v. Löwis11437992002-04-12 09:54:03 +00007460 cat >conftest.$ac_ext <<_ACEOF
7461#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007462#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007463$ac_includes_default
7464long longval () { return (long) (sizeof (fpos_t)); }
7465unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007466#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007467#include <stdlib.h>
7468#ifdef F77_DUMMY_MAIN
7469# ifdef __cplusplus
7470 extern "C"
7471# endif
7472 int F77_DUMMY_MAIN() { return 1; }
7473#endif
7474int
7475main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007476{
Martin v. Löwis11437992002-04-12 09:54:03 +00007477
7478 FILE *f = fopen ("conftest.val", "w");
7479 if (! f)
7480 exit (1);
7481 if (((long) (sizeof (fpos_t))) < 0)
7482 {
7483 long i = longval ();
7484 if (i != ((long) (sizeof (fpos_t))))
7485 exit (1);
7486 fprintf (f, "%ld\n", i);
7487 }
7488 else
7489 {
7490 unsigned long i = ulongval ();
7491 if (i != ((long) (sizeof (fpos_t))))
7492 exit (1);
7493 fprintf (f, "%lu\n", i);
7494 }
7495 exit (ferror (f) || fclose (f) != 0);
7496
7497 ;
7498 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007499}
Martin v. Löwis11437992002-04-12 09:54:03 +00007500_ACEOF
7501rm -f conftest$ac_exeext
7502if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7503 (eval $ac_link) 2>&5
7504 ac_status=$?
7505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7506 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7508 (eval $ac_try) 2>&5
7509 ac_status=$?
7510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7511 (exit $ac_status); }; }; then
7512 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007513else
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 echo "$as_me: program exited with status $ac_status" >&5
7515echo "$as_me: failed program was:" >&5
7516cat conftest.$ac_ext >&5
7517( exit $ac_status )
7518{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7519echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7520 { (exit 1); exit 1; }; }
7521fi
7522rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7523fi
7524fi
7525rm -f conftest.val
7526else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007527 ac_cv_sizeof_fpos_t=0
7528fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007529fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007530echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7531echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7532cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007533#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007534_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007535
Michael W. Hudson54241132001-12-07 15:38:26 +00007536
7537
Martin v. Löwis11437992002-04-12 09:54:03 +00007538echo "$as_me:$LINENO: checking for long long support" >&5
7539echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007540have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007541cat >conftest.$ac_ext <<_ACEOF
7542#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007543#include "confdefs.h"
7544
Martin v. Löwis11437992002-04-12 09:54:03 +00007545#ifdef F77_DUMMY_MAIN
7546# ifdef __cplusplus
7547 extern "C"
7548# endif
7549 int F77_DUMMY_MAIN() { return 1; }
7550#endif
7551int
7552main ()
7553{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007554long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007555 ;
7556 return 0;
7557}
7558_ACEOF
7559rm -f conftest.$ac_objext
7560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7561 (eval $ac_compile) 2>&5
7562 ac_status=$?
7563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7564 (exit $ac_status); } &&
7565 { ac_try='test -s conftest.$ac_objext'
7566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7567 (eval $ac_try) 2>&5
7568 ac_status=$?
7569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7570 (exit $ac_status); }; }; then
7571
7572
7573cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007574#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007575_ACEOF
7576
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007577 have_long_long=yes
7578
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007579else
Martin v. Löwis11437992002-04-12 09:54:03 +00007580 echo "$as_me: failed program was:" >&5
7581cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007582fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007583rm -f conftest.$ac_objext conftest.$ac_ext
7584echo "$as_me:$LINENO: result: $have_long_long" >&5
7585echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007586if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007587echo "$as_me:$LINENO: checking for long long" >&5
7588echo $ECHO_N "checking for long long... $ECHO_C" >&6
7589if test "${ac_cv_type_long_long+set}" = set; then
7590 echo $ECHO_N "(cached) $ECHO_C" >&6
7591else
7592 cat >conftest.$ac_ext <<_ACEOF
7593#line $LINENO "configure"
7594#include "confdefs.h"
7595$ac_includes_default
7596#ifdef F77_DUMMY_MAIN
7597# ifdef __cplusplus
7598 extern "C"
7599# endif
7600 int F77_DUMMY_MAIN() { return 1; }
7601#endif
7602int
7603main ()
7604{
7605if ((long long *) 0)
7606 return 0;
7607if (sizeof (long long))
7608 return 0;
7609 ;
7610 return 0;
7611}
7612_ACEOF
7613rm -f conftest.$ac_objext
7614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7615 (eval $ac_compile) 2>&5
7616 ac_status=$?
7617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7618 (exit $ac_status); } &&
7619 { ac_try='test -s conftest.$ac_objext'
7620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7621 (eval $ac_try) 2>&5
7622 ac_status=$?
7623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624 (exit $ac_status); }; }; then
7625 ac_cv_type_long_long=yes
7626else
7627 echo "$as_me: failed program was:" >&5
7628cat conftest.$ac_ext >&5
7629ac_cv_type_long_long=no
7630fi
7631rm -f conftest.$ac_objext conftest.$ac_ext
7632fi
7633echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7634echo "${ECHO_T}$ac_cv_type_long_long" >&6
7635
7636echo "$as_me:$LINENO: checking size of long long" >&5
7637echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7638if test "${ac_cv_sizeof_long_long+set}" = set; then
7639 echo $ECHO_N "(cached) $ECHO_C" >&6
7640else
7641 if test "$ac_cv_type_long_long" = yes; then
7642 # The cast to unsigned long works around a bug in the HP C Compiler
7643 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7644 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7645 # This bug is HP SR number 8606223364.
7646 if test "$cross_compiling" = yes; then
7647 # Depending upon the size, compute the lo and hi bounds.
7648cat >conftest.$ac_ext <<_ACEOF
7649#line $LINENO "configure"
7650#include "confdefs.h"
7651$ac_includes_default
7652#ifdef F77_DUMMY_MAIN
7653# ifdef __cplusplus
7654 extern "C"
7655# endif
7656 int F77_DUMMY_MAIN() { return 1; }
7657#endif
7658int
7659main ()
7660{
7661static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7662test_array [0] = 0
7663
7664 ;
7665 return 0;
7666}
7667_ACEOF
7668rm -f conftest.$ac_objext
7669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7670 (eval $ac_compile) 2>&5
7671 ac_status=$?
7672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7673 (exit $ac_status); } &&
7674 { ac_try='test -s conftest.$ac_objext'
7675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7676 (eval $ac_try) 2>&5
7677 ac_status=$?
7678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679 (exit $ac_status); }; }; then
7680 ac_lo=0 ac_mid=0
7681 while :; do
7682 cat >conftest.$ac_ext <<_ACEOF
7683#line $LINENO "configure"
7684#include "confdefs.h"
7685$ac_includes_default
7686#ifdef F77_DUMMY_MAIN
7687# ifdef __cplusplus
7688 extern "C"
7689# endif
7690 int F77_DUMMY_MAIN() { return 1; }
7691#endif
7692int
7693main ()
7694{
7695static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7696test_array [0] = 0
7697
7698 ;
7699 return 0;
7700}
7701_ACEOF
7702rm -f conftest.$ac_objext
7703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7704 (eval $ac_compile) 2>&5
7705 ac_status=$?
7706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7707 (exit $ac_status); } &&
7708 { ac_try='test -s conftest.$ac_objext'
7709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7710 (eval $ac_try) 2>&5
7711 ac_status=$?
7712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7713 (exit $ac_status); }; }; then
7714 ac_hi=$ac_mid; break
7715else
7716 echo "$as_me: failed program was:" >&5
7717cat conftest.$ac_ext >&5
7718ac_lo=`expr $ac_mid + 1`
7719 if test $ac_lo -le $ac_mid; then
7720 ac_lo= ac_hi=
7721 break
7722 fi
7723 ac_mid=`expr 2 '*' $ac_mid + 1`
7724fi
7725rm -f conftest.$ac_objext conftest.$ac_ext
7726 done
7727else
7728 echo "$as_me: failed program was:" >&5
7729cat conftest.$ac_ext >&5
7730cat >conftest.$ac_ext <<_ACEOF
7731#line $LINENO "configure"
7732#include "confdefs.h"
7733$ac_includes_default
7734#ifdef F77_DUMMY_MAIN
7735# ifdef __cplusplus
7736 extern "C"
7737# endif
7738 int F77_DUMMY_MAIN() { return 1; }
7739#endif
7740int
7741main ()
7742{
7743static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7744test_array [0] = 0
7745
7746 ;
7747 return 0;
7748}
7749_ACEOF
7750rm -f conftest.$ac_objext
7751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7752 (eval $ac_compile) 2>&5
7753 ac_status=$?
7754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7755 (exit $ac_status); } &&
7756 { ac_try='test -s conftest.$ac_objext'
7757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7758 (eval $ac_try) 2>&5
7759 ac_status=$?
7760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7761 (exit $ac_status); }; }; then
7762 ac_hi=-1 ac_mid=-1
7763 while :; do
7764 cat >conftest.$ac_ext <<_ACEOF
7765#line $LINENO "configure"
7766#include "confdefs.h"
7767$ac_includes_default
7768#ifdef F77_DUMMY_MAIN
7769# ifdef __cplusplus
7770 extern "C"
7771# endif
7772 int F77_DUMMY_MAIN() { return 1; }
7773#endif
7774int
7775main ()
7776{
7777static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7778test_array [0] = 0
7779
7780 ;
7781 return 0;
7782}
7783_ACEOF
7784rm -f conftest.$ac_objext
7785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7786 (eval $ac_compile) 2>&5
7787 ac_status=$?
7788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7789 (exit $ac_status); } &&
7790 { ac_try='test -s conftest.$ac_objext'
7791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7792 (eval $ac_try) 2>&5
7793 ac_status=$?
7794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7795 (exit $ac_status); }; }; then
7796 ac_lo=$ac_mid; break
7797else
7798 echo "$as_me: failed program was:" >&5
7799cat conftest.$ac_ext >&5
7800ac_hi=`expr '(' $ac_mid ')' - 1`
7801 if test $ac_mid -le $ac_hi; then
7802 ac_lo= ac_hi=
7803 break
7804 fi
7805 ac_mid=`expr 2 '*' $ac_mid`
7806fi
7807rm -f conftest.$ac_objext conftest.$ac_ext
7808 done
7809else
7810 echo "$as_me: failed program was:" >&5
7811cat conftest.$ac_ext >&5
7812ac_lo= ac_hi=
7813fi
7814rm -f conftest.$ac_objext conftest.$ac_ext
7815fi
7816rm -f conftest.$ac_objext conftest.$ac_ext
7817# Binary search between lo and hi bounds.
7818while test "x$ac_lo" != "x$ac_hi"; do
7819 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7820 cat >conftest.$ac_ext <<_ACEOF
7821#line $LINENO "configure"
7822#include "confdefs.h"
7823$ac_includes_default
7824#ifdef F77_DUMMY_MAIN
7825# ifdef __cplusplus
7826 extern "C"
7827# endif
7828 int F77_DUMMY_MAIN() { return 1; }
7829#endif
7830int
7831main ()
7832{
7833static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7834test_array [0] = 0
7835
7836 ;
7837 return 0;
7838}
7839_ACEOF
7840rm -f conftest.$ac_objext
7841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7842 (eval $ac_compile) 2>&5
7843 ac_status=$?
7844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7845 (exit $ac_status); } &&
7846 { ac_try='test -s conftest.$ac_objext'
7847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7848 (eval $ac_try) 2>&5
7849 ac_status=$?
7850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7851 (exit $ac_status); }; }; then
7852 ac_hi=$ac_mid
7853else
7854 echo "$as_me: failed program was:" >&5
7855cat conftest.$ac_ext >&5
7856ac_lo=`expr '(' $ac_mid ')' + 1`
7857fi
7858rm -f conftest.$ac_objext conftest.$ac_ext
7859done
7860case $ac_lo in
7861?*) ac_cv_sizeof_long_long=$ac_lo;;
7862'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7863echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7864 { (exit 1); exit 1; }; } ;;
7865esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007866else
7867 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7869echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7870 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007871else
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 cat >conftest.$ac_ext <<_ACEOF
7873#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007874#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007875$ac_includes_default
7876long longval () { return (long) (sizeof (long long)); }
7877unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007878#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007879#include <stdlib.h>
7880#ifdef F77_DUMMY_MAIN
7881# ifdef __cplusplus
7882 extern "C"
7883# endif
7884 int F77_DUMMY_MAIN() { return 1; }
7885#endif
7886int
7887main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007888{
Martin v. Löwis11437992002-04-12 09:54:03 +00007889
7890 FILE *f = fopen ("conftest.val", "w");
7891 if (! f)
7892 exit (1);
7893 if (((long) (sizeof (long long))) < 0)
7894 {
7895 long i = longval ();
7896 if (i != ((long) (sizeof (long long))))
7897 exit (1);
7898 fprintf (f, "%ld\n", i);
7899 }
7900 else
7901 {
7902 unsigned long i = ulongval ();
7903 if (i != ((long) (sizeof (long long))))
7904 exit (1);
7905 fprintf (f, "%lu\n", i);
7906 }
7907 exit (ferror (f) || fclose (f) != 0);
7908
7909 ;
7910 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007911}
Martin v. Löwis11437992002-04-12 09:54:03 +00007912_ACEOF
7913rm -f conftest$ac_exeext
7914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7915 (eval $ac_link) 2>&5
7916 ac_status=$?
7917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7918 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7920 (eval $ac_try) 2>&5
7921 ac_status=$?
7922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7923 (exit $ac_status); }; }; then
7924 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007925else
Martin v. Löwis11437992002-04-12 09:54:03 +00007926 echo "$as_me: program exited with status $ac_status" >&5
7927echo "$as_me: failed program was:" >&5
7928cat conftest.$ac_ext >&5
7929( exit $ac_status )
7930{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7931echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7932 { (exit 1); exit 1; }; }
7933fi
7934rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7935fi
7936fi
7937rm -f conftest.val
7938else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007939 ac_cv_sizeof_long_long=0
7940fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007941fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007942echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7943echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7944cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007945#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007946_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007947
Michael W. Hudson54241132001-12-07 15:38:26 +00007948
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007949fi
7950
Martin v. Löwis11437992002-04-12 09:54:03 +00007951echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7952echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007953have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007954cat >conftest.$ac_ext <<_ACEOF
7955#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007956#include "confdefs.h"
7957
Martin v. Löwis11437992002-04-12 09:54:03 +00007958#ifdef F77_DUMMY_MAIN
7959# ifdef __cplusplus
7960 extern "C"
7961# endif
7962 int F77_DUMMY_MAIN() { return 1; }
7963#endif
7964int
7965main ()
7966{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007967uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 ;
7969 return 0;
7970}
7971_ACEOF
7972rm -f conftest.$ac_objext
7973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7974 (eval $ac_compile) 2>&5
7975 ac_status=$?
7976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7977 (exit $ac_status); } &&
7978 { ac_try='test -s conftest.$ac_objext'
7979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7980 (eval $ac_try) 2>&5
7981 ac_status=$?
7982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7983 (exit $ac_status); }; }; then
7984
7985
7986cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007987#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007988_ACEOF
7989
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007990 have_uintptr_t=yes
7991
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007992else
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 echo "$as_me: failed program was:" >&5
7994cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007995fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007996rm -f conftest.$ac_objext conftest.$ac_ext
7997echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
7998echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007999if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008000echo "$as_me:$LINENO: checking for uintptr_t" >&5
8001echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8002if test "${ac_cv_type_uintptr_t+set}" = set; then
8003 echo $ECHO_N "(cached) $ECHO_C" >&6
8004else
8005 cat >conftest.$ac_ext <<_ACEOF
8006#line $LINENO "configure"
8007#include "confdefs.h"
8008$ac_includes_default
8009#ifdef F77_DUMMY_MAIN
8010# ifdef __cplusplus
8011 extern "C"
8012# endif
8013 int F77_DUMMY_MAIN() { return 1; }
8014#endif
8015int
8016main ()
8017{
8018if ((uintptr_t *) 0)
8019 return 0;
8020if (sizeof (uintptr_t))
8021 return 0;
8022 ;
8023 return 0;
8024}
8025_ACEOF
8026rm -f conftest.$ac_objext
8027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8028 (eval $ac_compile) 2>&5
8029 ac_status=$?
8030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8031 (exit $ac_status); } &&
8032 { ac_try='test -s conftest.$ac_objext'
8033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8034 (eval $ac_try) 2>&5
8035 ac_status=$?
8036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8037 (exit $ac_status); }; }; then
8038 ac_cv_type_uintptr_t=yes
8039else
8040 echo "$as_me: failed program was:" >&5
8041cat conftest.$ac_ext >&5
8042ac_cv_type_uintptr_t=no
8043fi
8044rm -f conftest.$ac_objext conftest.$ac_ext
8045fi
8046echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8047echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8048
8049echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8050echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8051if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8052 echo $ECHO_N "(cached) $ECHO_C" >&6
8053else
8054 if test "$ac_cv_type_uintptr_t" = yes; then
8055 # The cast to unsigned long works around a bug in the HP C Compiler
8056 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8057 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8058 # This bug is HP SR number 8606223364.
8059 if test "$cross_compiling" = yes; then
8060 # Depending upon the size, compute the lo and hi bounds.
8061cat >conftest.$ac_ext <<_ACEOF
8062#line $LINENO "configure"
8063#include "confdefs.h"
8064$ac_includes_default
8065#ifdef F77_DUMMY_MAIN
8066# ifdef __cplusplus
8067 extern "C"
8068# endif
8069 int F77_DUMMY_MAIN() { return 1; }
8070#endif
8071int
8072main ()
8073{
8074static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8075test_array [0] = 0
8076
8077 ;
8078 return 0;
8079}
8080_ACEOF
8081rm -f conftest.$ac_objext
8082if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8083 (eval $ac_compile) 2>&5
8084 ac_status=$?
8085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8086 (exit $ac_status); } &&
8087 { ac_try='test -s conftest.$ac_objext'
8088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8089 (eval $ac_try) 2>&5
8090 ac_status=$?
8091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8092 (exit $ac_status); }; }; then
8093 ac_lo=0 ac_mid=0
8094 while :; do
8095 cat >conftest.$ac_ext <<_ACEOF
8096#line $LINENO "configure"
8097#include "confdefs.h"
8098$ac_includes_default
8099#ifdef F77_DUMMY_MAIN
8100# ifdef __cplusplus
8101 extern "C"
8102# endif
8103 int F77_DUMMY_MAIN() { return 1; }
8104#endif
8105int
8106main ()
8107{
8108static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8109test_array [0] = 0
8110
8111 ;
8112 return 0;
8113}
8114_ACEOF
8115rm -f conftest.$ac_objext
8116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8117 (eval $ac_compile) 2>&5
8118 ac_status=$?
8119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8120 (exit $ac_status); } &&
8121 { ac_try='test -s conftest.$ac_objext'
8122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8123 (eval $ac_try) 2>&5
8124 ac_status=$?
8125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8126 (exit $ac_status); }; }; then
8127 ac_hi=$ac_mid; break
8128else
8129 echo "$as_me: failed program was:" >&5
8130cat conftest.$ac_ext >&5
8131ac_lo=`expr $ac_mid + 1`
8132 if test $ac_lo -le $ac_mid; then
8133 ac_lo= ac_hi=
8134 break
8135 fi
8136 ac_mid=`expr 2 '*' $ac_mid + 1`
8137fi
8138rm -f conftest.$ac_objext conftest.$ac_ext
8139 done
8140else
8141 echo "$as_me: failed program was:" >&5
8142cat conftest.$ac_ext >&5
8143cat >conftest.$ac_ext <<_ACEOF
8144#line $LINENO "configure"
8145#include "confdefs.h"
8146$ac_includes_default
8147#ifdef F77_DUMMY_MAIN
8148# ifdef __cplusplus
8149 extern "C"
8150# endif
8151 int F77_DUMMY_MAIN() { return 1; }
8152#endif
8153int
8154main ()
8155{
8156static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8157test_array [0] = 0
8158
8159 ;
8160 return 0;
8161}
8162_ACEOF
8163rm -f conftest.$ac_objext
8164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8165 (eval $ac_compile) 2>&5
8166 ac_status=$?
8167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8168 (exit $ac_status); } &&
8169 { ac_try='test -s conftest.$ac_objext'
8170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8171 (eval $ac_try) 2>&5
8172 ac_status=$?
8173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8174 (exit $ac_status); }; }; then
8175 ac_hi=-1 ac_mid=-1
8176 while :; do
8177 cat >conftest.$ac_ext <<_ACEOF
8178#line $LINENO "configure"
8179#include "confdefs.h"
8180$ac_includes_default
8181#ifdef F77_DUMMY_MAIN
8182# ifdef __cplusplus
8183 extern "C"
8184# endif
8185 int F77_DUMMY_MAIN() { return 1; }
8186#endif
8187int
8188main ()
8189{
8190static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8191test_array [0] = 0
8192
8193 ;
8194 return 0;
8195}
8196_ACEOF
8197rm -f conftest.$ac_objext
8198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8199 (eval $ac_compile) 2>&5
8200 ac_status=$?
8201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8202 (exit $ac_status); } &&
8203 { ac_try='test -s conftest.$ac_objext'
8204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8205 (eval $ac_try) 2>&5
8206 ac_status=$?
8207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8208 (exit $ac_status); }; }; then
8209 ac_lo=$ac_mid; break
8210else
8211 echo "$as_me: failed program was:" >&5
8212cat conftest.$ac_ext >&5
8213ac_hi=`expr '(' $ac_mid ')' - 1`
8214 if test $ac_mid -le $ac_hi; then
8215 ac_lo= ac_hi=
8216 break
8217 fi
8218 ac_mid=`expr 2 '*' $ac_mid`
8219fi
8220rm -f conftest.$ac_objext conftest.$ac_ext
8221 done
8222else
8223 echo "$as_me: failed program was:" >&5
8224cat conftest.$ac_ext >&5
8225ac_lo= ac_hi=
8226fi
8227rm -f conftest.$ac_objext conftest.$ac_ext
8228fi
8229rm -f conftest.$ac_objext conftest.$ac_ext
8230# Binary search between lo and hi bounds.
8231while test "x$ac_lo" != "x$ac_hi"; do
8232 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8233 cat >conftest.$ac_ext <<_ACEOF
8234#line $LINENO "configure"
8235#include "confdefs.h"
8236$ac_includes_default
8237#ifdef F77_DUMMY_MAIN
8238# ifdef __cplusplus
8239 extern "C"
8240# endif
8241 int F77_DUMMY_MAIN() { return 1; }
8242#endif
8243int
8244main ()
8245{
8246static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8247test_array [0] = 0
8248
8249 ;
8250 return 0;
8251}
8252_ACEOF
8253rm -f conftest.$ac_objext
8254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8255 (eval $ac_compile) 2>&5
8256 ac_status=$?
8257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8258 (exit $ac_status); } &&
8259 { ac_try='test -s conftest.$ac_objext'
8260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8261 (eval $ac_try) 2>&5
8262 ac_status=$?
8263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8264 (exit $ac_status); }; }; then
8265 ac_hi=$ac_mid
8266else
8267 echo "$as_me: failed program was:" >&5
8268cat conftest.$ac_ext >&5
8269ac_lo=`expr '(' $ac_mid ')' + 1`
8270fi
8271rm -f conftest.$ac_objext conftest.$ac_ext
8272done
8273case $ac_lo in
8274?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8275'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8276echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8277 { (exit 1); exit 1; }; } ;;
8278esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008279else
8280 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008281 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8282echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8283 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008284else
Martin v. Löwis11437992002-04-12 09:54:03 +00008285 cat >conftest.$ac_ext <<_ACEOF
8286#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008287#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008288$ac_includes_default
8289long longval () { return (long) (sizeof (uintptr_t)); }
8290unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008291#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008292#include <stdlib.h>
8293#ifdef F77_DUMMY_MAIN
8294# ifdef __cplusplus
8295 extern "C"
8296# endif
8297 int F77_DUMMY_MAIN() { return 1; }
8298#endif
8299int
8300main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008301{
Martin v. Löwis11437992002-04-12 09:54:03 +00008302
8303 FILE *f = fopen ("conftest.val", "w");
8304 if (! f)
8305 exit (1);
8306 if (((long) (sizeof (uintptr_t))) < 0)
8307 {
8308 long i = longval ();
8309 if (i != ((long) (sizeof (uintptr_t))))
8310 exit (1);
8311 fprintf (f, "%ld\n", i);
8312 }
8313 else
8314 {
8315 unsigned long i = ulongval ();
8316 if (i != ((long) (sizeof (uintptr_t))))
8317 exit (1);
8318 fprintf (f, "%lu\n", i);
8319 }
8320 exit (ferror (f) || fclose (f) != 0);
8321
8322 ;
8323 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008324}
Martin v. Löwis11437992002-04-12 09:54:03 +00008325_ACEOF
8326rm -f conftest$ac_exeext
8327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8328 (eval $ac_link) 2>&5
8329 ac_status=$?
8330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8331 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8333 (eval $ac_try) 2>&5
8334 ac_status=$?
8335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8336 (exit $ac_status); }; }; then
8337 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008338else
Martin v. Löwis11437992002-04-12 09:54:03 +00008339 echo "$as_me: program exited with status $ac_status" >&5
8340echo "$as_me: failed program was:" >&5
8341cat conftest.$ac_ext >&5
8342( exit $ac_status )
8343{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8344echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8345 { (exit 1); exit 1; }; }
8346fi
8347rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8348fi
8349fi
8350rm -f conftest.val
8351else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008352 ac_cv_sizeof_uintptr_t=0
8353fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008354fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008355echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8356echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8357cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008358#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008359_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008360
Michael W. Hudson54241132001-12-07 15:38:26 +00008361
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008362fi
8363
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008364# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008365echo "$as_me:$LINENO: checking size of off_t" >&5
8366echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8367if test "${ac_cv_sizeof_off_t+set}" = set; then
8368 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008369else
8370 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008371 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008372else
Martin v. Löwis11437992002-04-12 09:54:03 +00008373 cat >conftest.$ac_ext <<_ACEOF
8374#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008375#include "confdefs.h"
8376#include <stdio.h>
8377#include <sys/types.h>
8378main()
8379{
8380 FILE *f=fopen("conftestval", "w");
8381 if (!f) exit(1);
8382 fprintf(f, "%d\n", sizeof(off_t));
8383 exit(0);
8384}
Martin v. Löwis11437992002-04-12 09:54:03 +00008385_ACEOF
8386rm -f conftest$ac_exeext
8387if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8388 (eval $ac_link) 2>&5
8389 ac_status=$?
8390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8391 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8393 (eval $ac_try) 2>&5
8394 ac_status=$?
8395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8396 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008397 ac_cv_sizeof_off_t=`cat conftestval`
8398else
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 echo "$as_me: program exited with status $ac_status" >&5
8400echo "$as_me: failed program was:" >&5
8401cat conftest.$ac_ext >&5
8402( exit $ac_status )
8403ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008405rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008406fi
8407
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008408fi
8409
Martin v. Löwis11437992002-04-12 09:54:03 +00008410echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8411echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8412
8413cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008414#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008415_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008416
Michael W. Hudson54241132001-12-07 15:38:26 +00008417
Martin v. Löwis11437992002-04-12 09:54:03 +00008418echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8419echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008420if test "$have_long_long" = yes -a \
8421 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8422 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008423
Martin v. Löwis11437992002-04-12 09:54:03 +00008424cat >>confdefs.h <<\_ACEOF
8425#define HAVE_LARGEFILE_SUPPORT 1
8426_ACEOF
8427
8428 echo "$as_me:$LINENO: result: yes" >&5
8429echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008430else
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 echo "$as_me:$LINENO: result: no" >&5
8432echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008433fi
8434
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008435# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008436echo "$as_me:$LINENO: checking size of time_t" >&5
8437echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8438if test "${ac_cv_sizeof_time_t+set}" = set; then
8439 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008440else
8441 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008442 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008443else
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 cat >conftest.$ac_ext <<_ACEOF
8445#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008446#include "confdefs.h"
8447#include <stdio.h>
8448#include <time.h>
8449main()
8450{
8451 FILE *f=fopen("conftestval", "w");
8452 if (!f) exit(1);
8453 fprintf(f, "%d\n", sizeof(time_t));
8454 exit(0);
8455}
Martin v. Löwis11437992002-04-12 09:54:03 +00008456_ACEOF
8457rm -f conftest$ac_exeext
8458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8459 (eval $ac_link) 2>&5
8460 ac_status=$?
8461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8462 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8464 (eval $ac_try) 2>&5
8465 ac_status=$?
8466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8467 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008468 ac_cv_sizeof_time_t=`cat conftestval`
8469else
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 echo "$as_me: program exited with status $ac_status" >&5
8471echo "$as_me: failed program was:" >&5
8472cat conftest.$ac_ext >&5
8473( exit $ac_status )
8474ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008475fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008476rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008477fi
8478
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008479fi
8480
Martin v. Löwis11437992002-04-12 09:54:03 +00008481echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8482echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8483
8484cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008485#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008486_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008487
Michael W. Hudson54241132001-12-07 15:38:26 +00008488
8489
Trent Mick635f6fb2000-08-23 21:33:05 +00008490# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008491ac_save_cc="$CC"
8492if test "$ac_cv_kpthread" = "yes"
8493then CC="$CC -Kpthread"
8494fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008495echo "$as_me:$LINENO: checking for pthread_t" >&5
8496echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008497have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008498cat >conftest.$ac_ext <<_ACEOF
8499#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008500#include "confdefs.h"
8501#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008502#ifdef F77_DUMMY_MAIN
8503# ifdef __cplusplus
8504 extern "C"
8505# endif
8506 int F77_DUMMY_MAIN() { return 1; }
8507#endif
8508int
8509main ()
8510{
Guido van Rossum12580492000-09-24 16:47:19 +00008511pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 ;
8513 return 0;
8514}
8515_ACEOF
8516rm -f conftest.$ac_objext
8517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8518 (eval $ac_compile) 2>&5
8519 ac_status=$?
8520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8521 (exit $ac_status); } &&
8522 { ac_try='test -s conftest.$ac_objext'
8523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8524 (eval $ac_try) 2>&5
8525 ac_status=$?
8526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8527 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008528 have_pthread_t=yes
8529else
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 echo "$as_me: failed program was:" >&5
8531cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008532fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008533rm -f conftest.$ac_objext conftest.$ac_ext
8534echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8535echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008536if test "$have_pthread_t" = yes ; then
8537 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8539echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8540 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8541 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008542else
8543 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008544 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008545else
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 cat >conftest.$ac_ext <<_ACEOF
8547#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008548#include "confdefs.h"
8549#include <stdio.h>
8550 #include <pthread.h>
8551 main()
8552 {
8553 FILE *f=fopen("conftestval", "w");
8554 if (!f) exit(1);
8555 fprintf(f, "%d\n", sizeof(pthread_t));
8556 exit(0);
8557 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008558_ACEOF
8559rm -f conftest$ac_exeext
8560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8561 (eval $ac_link) 2>&5
8562 ac_status=$?
8563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8564 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8566 (eval $ac_try) 2>&5
8567 ac_status=$?
8568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8569 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008570 ac_cv_sizeof_pthread_t=`cat conftestval`
8571else
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 echo "$as_me: program exited with status $ac_status" >&5
8573echo "$as_me: failed program was:" >&5
8574cat conftest.$ac_ext >&5
8575( exit $ac_status )
8576ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008577fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008578rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008579fi
8580
Trent Mick635f6fb2000-08-23 21:33:05 +00008581fi
8582
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8584echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8585
8586cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008587#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008588_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008589
8590fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008591CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008592
Martin v. Löwis11437992002-04-12 09:54:03 +00008593echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8594echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008595# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8596if test "${enable_toolbox_glue+set}" = set; then
8597 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599fi;
Jack Jansene578a632001-08-15 01:27:14 +00008600
8601if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008602then
Jack Jansene578a632001-08-15 01:27:14 +00008603 case $ac_sys_system/$ac_sys_release in
8604 Darwin/*)
8605 enable_toolbox_glue="yes";;
8606 *)
8607 enable_toolbox_glue="no";;
8608 esac
8609fi
8610case "$enable_toolbox_glue" in
8611yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008612 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008613 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008614 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008615
8616cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008617#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008618_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008619
8620 ;;
8621*)
8622 extra_frameworks=""
8623 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008624 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008625 ;;
8626esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008627echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8628echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008629
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008630
8631case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008632 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008633 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008634 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8635 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008636 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8637 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008638 Darwin/*)
8639 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008640 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8641 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008642 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8643 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008644esac
8645
Martin v. Löwis11437992002-04-12 09:54:03 +00008646echo "$as_me:$LINENO: checking for --enable-framework" >&5
8647echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008648if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008649then
Jack Jansenca06bc62001-08-03 15:32:23 +00008650 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008651 # -U __environ is needed since bundles don't have access
8652 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008653 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008654 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008655
Jack Jansena3891ea2001-09-07 14:25:12 +00008656 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008657 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8658 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008659 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661cat >>confdefs.h <<\_ACEOF
8662#define WITH_NEXT_FRAMEWORK 1
8663_ACEOF
8664
8665 echo "$as_me:$LINENO: result: yes" >&5
8666echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008667else
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 echo "$as_me:$LINENO: result: no" >&5
8669echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008670fi
8671
Martin v. Löwis11437992002-04-12 09:54:03 +00008672echo "$as_me:$LINENO: checking for dyld" >&5
8673echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008674case $ac_sys_system/$ac_sys_release in
8675 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677cat >>confdefs.h <<\_ACEOF
8678#define WITH_DYLD 1
8679_ACEOF
8680
8681 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8682echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008683 ;;
8684 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 echo "$as_me:$LINENO: result: no" >&5
8686echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008687 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008688esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008689
Guido van Rossum0a516c91994-09-12 10:58:40 +00008690# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008691
Michael W. Hudson54241132001-12-07 15:38:26 +00008692
8693
8694
8695
Guido van Rossum0a516c91994-09-12 10:58:40 +00008696# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008697# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008698echo "$as_me:$LINENO: checking SO" >&5
8699echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008700if test -z "$SO"
8701then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008702 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008703 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008704 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008705 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008706 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008707fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008708echo "$as_me:$LINENO: result: $SO" >&5
8709echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008710# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008711# -- "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 +00008712# (Shared libraries in this instance are shared modules to be loaded into
8713# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008714echo "$as_me:$LINENO: checking LDSHARED" >&5
8715echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008716if test -z "$LDSHARED"
8717then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008718 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008719 AIX*)
8720 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008721 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008722 ;;
8723 BeOS*)
8724 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008725 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008726 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008727 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008728 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008729 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00008731 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008732 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008733 else LDSHARED="$(CC) -G";
Greg Ward57c9a662000-05-26 12:22:54 +00008734 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008735 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008736 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8737 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008738 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008739 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8740 if test "$enable_framework" ; then
8741 # Link against the framework. All externals should be defined.
8742 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8743 else
8744 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008745 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008746 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008747 Darwin/*)
8748 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8749 if test "$enable_framework" ; then
8750 # Link against the framework. All externals should be defined.
8751 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8752 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008753 # No framework, use the Python app as bundle-loader
8754 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8755 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008756 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008757 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008758 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008759 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008760 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008761 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008762 then
8763 LDSHARED="cc -shared ${LDFLAGS}"
8764 else
8765 LDSHARED="ld -Bshareable ${LDFLAGS}"
8766 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008767 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008768 if test "$GCC" = "yes"
8769 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008770 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008771 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008772 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008773 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008774 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008775 *) LDSHARED="ld";;
8776 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008777fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008778echo "$as_me:$LINENO: result: $LDSHARED" >&5
8779echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008780BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008781# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008782# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008783echo "$as_me:$LINENO: checking CCSHARED" >&5
8784echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008785if test -z "$CCSHARED"
8786then
Guido van Rossum07397971997-04-29 21:49:50 +00008787 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008788 SunOS*) if test "$GCC" = yes;
8789 then CCSHARED="-fPIC";
8790 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008791 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008792 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008793 else CCSHARED="+z";
8794 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008795 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008796 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008797 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008798 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008799 if test "$GCC" = "yes"
8800 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008801 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008802 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008803 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008804 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008805 IRIX*/6*) case $CC in
8806 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008807 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008808 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008809 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008810 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008811fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008812echo "$as_me:$LINENO: result: $CCSHARED" >&5
8813echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008814# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008815# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008816echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8817echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008818if test -z "$LINKFORSHARED"
8819then
Guido van Rossum07397971997-04-29 21:49:50 +00008820 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008821 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008822 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008823 LINKFORSHARED="-Wl,-E -Wl,+s";;
8824# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008825 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008826 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008827 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008829 # -u __dummy makes the linker aware of the objc runtime
8830 # in System.framework; otherwise, __objcInit (referenced in
8831 # crt1.o) gets erroneously defined as common, which breaks dynamic
8832 # loading of any modules which reference it in System.framework.
8833 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8834 # not used by the core itself but which needs to be in the core so
8835 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008836 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008837 if test "$enable_framework"
8838 then
8839 LINKFORSHARED="$LINKFORSHARED -framework Python"
8840 fi
8841 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008842 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008843 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008844 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008845 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008846 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8847 then
8848 LINKFORSHARED="-Wl,--export-dynamic"
8849 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008850 SunOS/5*) case $CC in
8851 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00008852 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008853 then
8854 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008855 fi;;
8856 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008857 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008858fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008859echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8860echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008861
Michael W. Hudson54241132001-12-07 15:38:26 +00008862
Martin v. Löwis11437992002-04-12 09:54:03 +00008863echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8864echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008865if test ! "$LIBRARY" = "$LDLIBRARY"
8866then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008867 case $ac_sys_system in
8868 CYGWIN*)
8869 # Cygwin needs CCSHARED when building extension DLLs
8870 # but not when building the interpreter DLL.
8871 CFLAGSFORSHARED='';;
8872 *)
8873 CFLAGSFORSHARED='$(CCSHARED)'
8874 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008875fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008876echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8877echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008878
Guido van Rossum627b2d71993-12-24 10:39:16 +00008879# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008880
8881echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8882echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8883if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8884 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008885else
Martin v. Löwis11437992002-04-12 09:54:03 +00008886 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008887LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008888cat >conftest.$ac_ext <<_ACEOF
8889#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008890#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008891
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008892/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008893#ifdef __cplusplus
8894extern "C"
8895#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008896/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008897 builtin and then its argument prototype would still apply. */
8898char dlopen ();
8899#ifdef F77_DUMMY_MAIN
8900# ifdef __cplusplus
8901 extern "C"
8902# endif
8903 int F77_DUMMY_MAIN() { return 1; }
8904#endif
8905int
8906main ()
8907{
8908dlopen ();
8909 ;
8910 return 0;
8911}
8912_ACEOF
8913rm -f conftest.$ac_objext conftest$ac_exeext
8914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8915 (eval $ac_link) 2>&5
8916 ac_status=$?
8917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8918 (exit $ac_status); } &&
8919 { ac_try='test -s conftest$ac_exeext'
8920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8921 (eval $ac_try) 2>&5
8922 ac_status=$?
8923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8924 (exit $ac_status); }; }; then
8925 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008926else
Martin v. Löwis11437992002-04-12 09:54:03 +00008927 echo "$as_me: failed program was:" >&5
8928cat conftest.$ac_ext >&5
8929ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008930fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008931rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8932LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008933fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008934echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8935echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8936if test $ac_cv_lib_dl_dlopen = yes; then
8937 cat >>confdefs.h <<_ACEOF
8938#define HAVE_LIBDL 1
8939_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008940
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008941 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008942
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008943fi
8944 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008945
8946echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8947echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8948if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8949 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008950else
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008952LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008953cat >conftest.$ac_ext <<_ACEOF
8954#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008955#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008956
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008957/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008958#ifdef __cplusplus
8959extern "C"
8960#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008961/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 builtin and then its argument prototype would still apply. */
8963char shl_load ();
8964#ifdef F77_DUMMY_MAIN
8965# ifdef __cplusplus
8966 extern "C"
8967# endif
8968 int F77_DUMMY_MAIN() { return 1; }
8969#endif
8970int
8971main ()
8972{
8973shl_load ();
8974 ;
8975 return 0;
8976}
8977_ACEOF
8978rm -f conftest.$ac_objext conftest$ac_exeext
8979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8980 (eval $ac_link) 2>&5
8981 ac_status=$?
8982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8983 (exit $ac_status); } &&
8984 { ac_try='test -s conftest$ac_exeext'
8985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8986 (eval $ac_try) 2>&5
8987 ac_status=$?
8988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8989 (exit $ac_status); }; }; then
8990 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008991else
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 echo "$as_me: failed program was:" >&5
8993cat conftest.$ac_ext >&5
8994ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008995fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008996rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8997LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008999echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9000echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9001if test $ac_cv_lib_dld_shl_load = yes; then
9002 cat >>confdefs.h <<_ACEOF
9003#define HAVE_LIBDLD 1
9004_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009005
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009006 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009007
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009008fi
9009 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009010
9011echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9012echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9013if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9014 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009015else
Martin v. Löwis11437992002-04-12 09:54:03 +00009016 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009017LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009018cat >conftest.$ac_ext <<_ACEOF
9019#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009020#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009021
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009022/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009023#ifdef __cplusplus
9024extern "C"
9025#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009026/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009027 builtin and then its argument prototype would still apply. */
9028char sem_init ();
9029#ifdef F77_DUMMY_MAIN
9030# ifdef __cplusplus
9031 extern "C"
9032# endif
9033 int F77_DUMMY_MAIN() { return 1; }
9034#endif
9035int
9036main ()
9037{
9038sem_init ();
9039 ;
9040 return 0;
9041}
9042_ACEOF
9043rm -f conftest.$ac_objext conftest$ac_exeext
9044if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9045 (eval $ac_link) 2>&5
9046 ac_status=$?
9047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9048 (exit $ac_status); } &&
9049 { ac_try='test -s conftest$ac_exeext'
9050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9051 (eval $ac_try) 2>&5
9052 ac_status=$?
9053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9054 (exit $ac_status); }; }; then
9055 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009056else
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 echo "$as_me: failed program was:" >&5
9058cat conftest.$ac_ext >&5
9059ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009060fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009061rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9062LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009064echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9065echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9066if test $ac_cv_lib_rt_sem_init = yes; then
9067 cat >>confdefs.h <<_ACEOF
9068#define HAVE_LIBRT 1
9069_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009070
9071 LIBS="-lrt $LIBS"
9072
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009073fi
9074 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009075
9076# checks for system dependent C++ extensions support
9077case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9079echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9080 cat >conftest.$ac_ext <<_ACEOF
9081#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009082#include "confdefs.h"
9083#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009084#ifdef F77_DUMMY_MAIN
9085# ifdef __cplusplus
9086 extern "C"
9087# endif
9088 int F77_DUMMY_MAIN() { return 1; }
9089#endif
9090int
9091main ()
9092{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009093loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009094 ;
9095 return 0;
9096}
9097_ACEOF
9098rm -f conftest.$ac_objext conftest$ac_exeext
9099if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9100 (eval $ac_link) 2>&5
9101 ac_status=$?
9102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9103 (exit $ac_status); } &&
9104 { ac_try='test -s conftest$ac_exeext'
9105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9106 (eval $ac_try) 2>&5
9107 ac_status=$?
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009110
Martin v. Löwis11437992002-04-12 09:54:03 +00009111cat >>confdefs.h <<\_ACEOF
9112#define AIX_GENUINE_CPLUSPLUS 1
9113_ACEOF
9114
9115 echo "$as_me:$LINENO: result: yes" >&5
9116echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009117else
Martin v. Löwis11437992002-04-12 09:54:03 +00009118 echo "$as_me: failed program was:" >&5
9119cat conftest.$ac_ext >&5
9120echo "$as_me:$LINENO: result: no" >&5
9121echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009122fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009123rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009124 *) ;;
9125esac
9126
Guido van Rossum70c7f481998-03-26 18:44:10 +00009127# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9128# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009129# BeOS' sockets are stashed in libnet.
9130case "$ac_sys_system" in
9131IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009132*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009133echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9134echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9135if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9136 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009137else
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009139LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009140cat >conftest.$ac_ext <<_ACEOF
9141#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009142#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009143
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009144/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009145#ifdef __cplusplus
9146extern "C"
9147#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009148/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009149 builtin and then its argument prototype would still apply. */
9150char t_open ();
9151#ifdef F77_DUMMY_MAIN
9152# ifdef __cplusplus
9153 extern "C"
9154# endif
9155 int F77_DUMMY_MAIN() { return 1; }
9156#endif
9157int
9158main ()
9159{
9160t_open ();
9161 ;
9162 return 0;
9163}
9164_ACEOF
9165rm -f conftest.$ac_objext conftest$ac_exeext
9166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9167 (eval $ac_link) 2>&5
9168 ac_status=$?
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); } &&
9171 { ac_try='test -s conftest$ac_exeext'
9172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9173 (eval $ac_try) 2>&5
9174 ac_status=$?
9175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); }; }; then
9177 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009178else
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 echo "$as_me: failed program was:" >&5
9180cat conftest.$ac_ext >&5
9181ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009183rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9184LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009185fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009186echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9187echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9188if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009189 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009190fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009191 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009192echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9193echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9194if test "${ac_cv_lib_socket_socket+set}" = set; then
9195 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009196else
Martin v. Löwis11437992002-04-12 09:54:03 +00009197 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009198LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009199cat >conftest.$ac_ext <<_ACEOF
9200#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009201#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009202
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009203/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009204#ifdef __cplusplus
9205extern "C"
9206#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009207/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 builtin and then its argument prototype would still apply. */
9209char socket ();
9210#ifdef F77_DUMMY_MAIN
9211# ifdef __cplusplus
9212 extern "C"
9213# endif
9214 int F77_DUMMY_MAIN() { return 1; }
9215#endif
9216int
9217main ()
9218{
9219socket ();
9220 ;
9221 return 0;
9222}
9223_ACEOF
9224rm -f conftest.$ac_objext conftest$ac_exeext
9225if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9226 (eval $ac_link) 2>&5
9227 ac_status=$?
9228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9229 (exit $ac_status); } &&
9230 { ac_try='test -s conftest$ac_exeext'
9231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9232 (eval $ac_try) 2>&5
9233 ac_status=$?
9234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9235 (exit $ac_status); }; }; then
9236 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009237else
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 echo "$as_me: failed program was:" >&5
9239cat conftest.$ac_ext >&5
9240ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009241fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009242rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9243LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009244fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009245echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9246echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9247if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009248 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009249fi
9250 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009251;;
9252esac
9253case "$ac_sys_system" in
9254BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009255echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9256echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9257if test "${ac_cv_lib_net_socket+set}" = set; then
9258 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009259else
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009261LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009262cat >conftest.$ac_ext <<_ACEOF
9263#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009264#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009265
Guido van Rossumad678af1998-10-02 14:42:15 +00009266/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009267#ifdef __cplusplus
9268extern "C"
9269#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009270/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009271 builtin and then its argument prototype would still apply. */
9272char socket ();
9273#ifdef F77_DUMMY_MAIN
9274# ifdef __cplusplus
9275 extern "C"
9276# endif
9277 int F77_DUMMY_MAIN() { return 1; }
9278#endif
9279int
9280main ()
9281{
9282socket ();
9283 ;
9284 return 0;
9285}
9286_ACEOF
9287rm -f conftest.$ac_objext conftest$ac_exeext
9288if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9289 (eval $ac_link) 2>&5
9290 ac_status=$?
9291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9292 (exit $ac_status); } &&
9293 { ac_try='test -s conftest$ac_exeext'
9294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9295 (eval $ac_try) 2>&5
9296 ac_status=$?
9297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9298 (exit $ac_status); }; }; then
9299 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009300else
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 echo "$as_me: failed program was:" >&5
9302cat conftest.$ac_ext >&5
9303ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009304fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009305rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9306LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009308echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9309echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9310if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009311 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009312fi
9313 # BeOS
9314;;
9315esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009316
Martin v. Löwis11437992002-04-12 09:54:03 +00009317echo "$as_me:$LINENO: checking for --with-libs" >&5
9318echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9319
Guido van Rossuma68acba1996-07-31 17:36:39 +00009320# Check whether --with-libs or --without-libs was given.
9321if test "${with_libs+set}" = set; then
9322 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009323
9324echo "$as_me:$LINENO: result: $withval" >&5
9325echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009326LIBS="$withval $LIBS"
9327
9328else
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 echo "$as_me:$LINENO: result: no" >&5
9330echo "${ECHO_T}no" >&6
9331fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009332
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009333# Determine if signalmodule should be used.
9334
9335
Martin v. Löwis11437992002-04-12 09:54:03 +00009336echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9337echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9338
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009339# Check whether --with-signal-module or --without-signal-module was given.
9340if test "${with_signal_module+set}" = set; then
9341 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009342
Martin v. Löwis11437992002-04-12 09:54:03 +00009343fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009344
9345if test -z "$with_signal_module"
9346then with_signal_module="yes"
9347fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009348echo "$as_me:$LINENO: result: $with_signal_module" >&5
9349echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009350
9351if test "${with_signal_module}" = "yes"; then
9352 USE_SIGNAL_MODULE=""
9353 SIGNAL_OBJS=""
9354else
9355 USE_SIGNAL_MODULE="#"
9356 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9357fi
9358
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009359# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009360
Barry Warsawc0d24d82000-06-29 16:12:00 +00009361USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009362
Martin v. Löwis11437992002-04-12 09:54:03 +00009363echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9364echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9365
Guido van Rossumec2f0731997-01-22 20:54:01 +00009366
9367# Check whether --with-dec-threads or --without-dec-threads was given.
9368if test "${with_dec_threads+set}" = set; then
9369 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009370
9371echo "$as_me:$LINENO: result: $withval" >&5
9372echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009373LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009374if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009375 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009376fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009377else
Martin v. Löwis11437992002-04-12 09:54:03 +00009378 echo "$as_me:$LINENO: result: no" >&5
9379echo "${ECHO_T}no" >&6
9380fi;
9381
9382# Templates for things AC_DEFINEd more than once.
9383# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009384
9385
Martin v. Löwis11437992002-04-12 09:54:03 +00009386
9387
9388
9389
9390
9391echo "$as_me:$LINENO: checking for --with-threads" >&5
9392echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9393
Guido van Rossumec2f0731997-01-22 20:54:01 +00009394# Check whether --with-threads or --without-threads was given.
9395if test "${with_threads+set}" = set; then
9396 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009397
Martin v. Löwis11437992002-04-12 09:54:03 +00009398fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009399
Barry Warsawc0d24d82000-06-29 16:12:00 +00009400# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009401
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009402# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009403if test "${with_thread+set}" = set; then
9404 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009405
Martin v. Löwis11437992002-04-12 09:54:03 +00009406with_threads=$with_thread
9407fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009408
9409if test -z "$with_threads"
9410then with_threads="yes"
9411fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009412echo "$as_me:$LINENO: result: $with_threads" >&5
9413echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009414
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009415
Barry Warsawc0d24d82000-06-29 16:12:00 +00009416if test "$with_threads" = "no"
9417then
9418 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009419elif test "$ac_cv_pthread_is_default" = yes
9420then
Martin v. Löwis11437992002-04-12 09:54:03 +00009421 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009422#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009423_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009424
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009425 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009427#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009428_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009429
9430 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009432elif test "$ac_cv_kpthread" = "yes"
9433then
9434 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009436#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009437_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009438
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009439 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009440 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009441else
9442 if test ! -z "$with_threads" -a -d "$with_threads"
9443 then LDFLAGS="$LDFLAGS -L$with_threads"
9444 fi
9445 if test ! -z "$withval" -a -d "$withval"
9446 then LDFLAGS="$LDFLAGS -L$withval"
9447 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009448
9449 # According to the POSIX spec, a pthreads implementation must
9450 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9452echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9453 cat >conftest.$ac_ext <<_ACEOF
9454#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009455#include "confdefs.h"
9456#include <unistd.h>
9457 #ifdef _POSIX_THREADS
9458 yes
9459 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009460
9461_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009462if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9463 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009464 unistd_defines_pthreads=yes
9465else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009466 unistd_defines_pthreads=no
9467fi
9468rm -f conftest*
9469
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9471echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009472
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009474#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009475_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009476
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 if test "${ac_cv_header_cthreads_h+set}" = set; then
9478 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9479echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9480if test "${ac_cv_header_cthreads_h+set}" = set; then
9481 echo $ECHO_N "(cached) $ECHO_C" >&6
9482fi
9483echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9484echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009485else
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 # Is the header compilable?
9487echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9488echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9489cat >conftest.$ac_ext <<_ACEOF
9490#line $LINENO "configure"
9491#include "confdefs.h"
9492$ac_includes_default
9493#include <cthreads.h>
9494_ACEOF
9495rm -f conftest.$ac_objext
9496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9497 (eval $ac_compile) 2>&5
9498 ac_status=$?
9499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9500 (exit $ac_status); } &&
9501 { ac_try='test -s conftest.$ac_objext'
9502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9503 (eval $ac_try) 2>&5
9504 ac_status=$?
9505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9506 (exit $ac_status); }; }; then
9507 ac_header_compiler=yes
9508else
9509 echo "$as_me: failed program was:" >&5
9510cat conftest.$ac_ext >&5
9511ac_header_compiler=no
9512fi
9513rm -f conftest.$ac_objext conftest.$ac_ext
9514echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9515echo "${ECHO_T}$ac_header_compiler" >&6
9516
9517# Is the header present?
9518echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9519echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9520cat >conftest.$ac_ext <<_ACEOF
9521#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009522#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009523#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009524_ACEOF
9525if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9526 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9527 ac_status=$?
9528 egrep -v '^ *\+' conftest.er1 >conftest.err
9529 rm -f conftest.er1
9530 cat conftest.err >&5
9531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9532 (exit $ac_status); } >/dev/null; then
9533 if test -s conftest.err; then
9534 ac_cpp_err=$ac_c_preproc_warn_flag
9535 else
9536 ac_cpp_err=
9537 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009538else
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 ac_cpp_err=yes
9540fi
9541if test -z "$ac_cpp_err"; then
9542 ac_header_preproc=yes
9543else
9544 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009545 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009547fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009548rm -f conftest.err conftest.$ac_ext
9549echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9550echo "${ECHO_T}$ac_header_preproc" >&6
9551
9552# So? What about this header?
9553case $ac_header_compiler:$ac_header_preproc in
9554 yes:no )
9555 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9556echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9557 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9558echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9559 no:yes )
9560 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9561echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9562 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9563echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9564 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9565echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9566esac
9567echo "$as_me:$LINENO: checking for cthreads.h" >&5
9568echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9569if test "${ac_cv_header_cthreads_h+set}" = set; then
9570 echo $ECHO_N "(cached) $ECHO_C" >&6
9571else
9572 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009573fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009574echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9575echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9576
9577fi
9578if test $ac_cv_header_cthreads_h = yes; then
9579 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009580#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009581_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009582
Martin v. Löwis11437992002-04-12 09:54:03 +00009583 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009584#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009585_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009586
Martin v. Löwis11437992002-04-12 09:54:03 +00009587
9588cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009589#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009590_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009591
9592 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009593 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009594else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009595
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9597 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9598echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9599if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9600 echo $ECHO_N "(cached) $ECHO_C" >&6
9601fi
9602echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9603echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009604else
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 # Is the header compilable?
9606echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9607echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9608cat >conftest.$ac_ext <<_ACEOF
9609#line $LINENO "configure"
9610#include "confdefs.h"
9611$ac_includes_default
9612#include <mach/cthreads.h>
9613_ACEOF
9614rm -f conftest.$ac_objext
9615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9616 (eval $ac_compile) 2>&5
9617 ac_status=$?
9618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9619 (exit $ac_status); } &&
9620 { ac_try='test -s conftest.$ac_objext'
9621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9622 (eval $ac_try) 2>&5
9623 ac_status=$?
9624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9625 (exit $ac_status); }; }; then
9626 ac_header_compiler=yes
9627else
9628 echo "$as_me: failed program was:" >&5
9629cat conftest.$ac_ext >&5
9630ac_header_compiler=no
9631fi
9632rm -f conftest.$ac_objext conftest.$ac_ext
9633echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9634echo "${ECHO_T}$ac_header_compiler" >&6
9635
9636# Is the header present?
9637echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9638echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9639cat >conftest.$ac_ext <<_ACEOF
9640#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009641#include "confdefs.h"
9642#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009643_ACEOF
9644if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9645 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9646 ac_status=$?
9647 egrep -v '^ *\+' conftest.er1 >conftest.err
9648 rm -f conftest.er1
9649 cat conftest.err >&5
9650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651 (exit $ac_status); } >/dev/null; then
9652 if test -s conftest.err; then
9653 ac_cpp_err=$ac_c_preproc_warn_flag
9654 else
9655 ac_cpp_err=
9656 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009657else
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_cpp_err=yes
9659fi
9660if test -z "$ac_cpp_err"; then
9661 ac_header_preproc=yes
9662else
9663 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009664 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009665 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009666fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009667rm -f conftest.err conftest.$ac_ext
9668echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9669echo "${ECHO_T}$ac_header_preproc" >&6
9670
9671# So? What about this header?
9672case $ac_header_compiler:$ac_header_preproc in
9673 yes:no )
9674 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9675echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9676 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9677echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9678 no:yes )
9679 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9680echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9681 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9682echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9683 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9684echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9685esac
9686echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9687echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9688if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9689 echo $ECHO_N "(cached) $ECHO_C" >&6
9690else
9691 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009692fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009693echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9694echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9695
9696fi
9697if test $ac_cv_header_mach_cthreads_h = yes; then
9698 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009699#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009700_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009701
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009703#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009704_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009705
Martin v. Löwis11437992002-04-12 09:54:03 +00009706
9707cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009708#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009709_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009710
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009711 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009712else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009713
Martin v. Löwis11437992002-04-12 09:54:03 +00009714 echo "$as_me:$LINENO: checking for --with-pth" >&5
9715echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9716
9717# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009718if test "${with_pth+set}" = set; then
9719 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009720
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 echo "$as_me:$LINENO: result: $withval" >&5
9722echo "${ECHO_T}$withval" >&6
9723 cat >>confdefs.h <<\_ACEOF
9724#define WITH_THREAD 1
9725_ACEOF
9726
9727
9728cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009729#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009730_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009731
Martin v. Löwis130fb172001-07-19 11:00:41 +00009732 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009733 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009734else
Martin v. Löwis11437992002-04-12 09:54:03 +00009735
9736 echo "$as_me:$LINENO: result: no" >&5
9737echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009738
9739 # Just looking for pthread_create in libpthread is not enough:
9740 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9741 # So we really have to include pthread.h, and then link.
9742 _libs=$LIBS
9743 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9745echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9746 cat >conftest.$ac_ext <<_ACEOF
9747#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009748#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009749#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009750
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009751void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009752#ifdef F77_DUMMY_MAIN
9753# ifdef __cplusplus
9754 extern "C"
9755# endif
9756 int F77_DUMMY_MAIN() { return 1; }
9757#endif
9758int
9759main ()
9760{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009761
9762pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 ;
9764 return 0;
9765}
9766_ACEOF
9767rm -f conftest.$ac_objext conftest$ac_exeext
9768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9769 (eval $ac_link) 2>&5
9770 ac_status=$?
9771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772 (exit $ac_status); } &&
9773 { ac_try='test -s conftest$ac_exeext'
9774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9775 (eval $ac_try) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); }; }; then
9779
9780 echo "$as_me:$LINENO: result: yes" >&5
9781echo "${ECHO_T}yes" >&6
9782 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009783#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009784_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009785
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009786 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009787 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009788else
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 echo "$as_me: failed program was:" >&5
9790cat conftest.$ac_ext >&5
9791
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009792 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9794echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9795if test "${ac_cv_func_pthread_detach+set}" = set; then
9796 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009797else
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 cat >conftest.$ac_ext <<_ACEOF
9799#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009800#include "confdefs.h"
9801/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009803#include <assert.h>
9804/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009805#ifdef __cplusplus
9806extern "C"
9807#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009808/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 builtin and then its argument prototype would still apply. */
9810char pthread_detach ();
9811char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009812
Martin v. Löwis11437992002-04-12 09:54:03 +00009813#ifdef F77_DUMMY_MAIN
9814# ifdef __cplusplus
9815 extern "C"
9816# endif
9817 int F77_DUMMY_MAIN() { return 1; }
9818#endif
9819int
9820main ()
9821{
Guido van Rossumad678af1998-10-02 14:42:15 +00009822/* The GNU C library defines this for functions which it implements
9823 to always fail with ENOSYS. Some functions are actually named
9824 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009825#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009826choke me
9827#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009828f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009829#endif
9830
Martin v. Löwis11437992002-04-12 09:54:03 +00009831 ;
9832 return 0;
9833}
9834_ACEOF
9835rm -f conftest.$ac_objext conftest$ac_exeext
9836if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9837 (eval $ac_link) 2>&5
9838 ac_status=$?
9839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9840 (exit $ac_status); } &&
9841 { ac_try='test -s conftest$ac_exeext'
9842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9843 (eval $ac_try) 2>&5
9844 ac_status=$?
9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846 (exit $ac_status); }; }; then
9847 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009848else
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 echo "$as_me: failed program was:" >&5
9850cat conftest.$ac_ext >&5
9851ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009852fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009853rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009854fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009855echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9856echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9857if test $ac_cv_func_pthread_detach = yes; then
9858 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009859#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009860_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009861
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009862 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009863 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009864else
Guido van Rossumad678af1998-10-02 14:42:15 +00009865
Martin v. Löwis11437992002-04-12 09:54:03 +00009866 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9867 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9868echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9869if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9870 echo $ECHO_N "(cached) $ECHO_C" >&6
9871fi
9872echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9873echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009874else
Martin v. Löwis11437992002-04-12 09:54:03 +00009875 # Is the header compilable?
9876echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
9877echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
9878cat >conftest.$ac_ext <<_ACEOF
9879#line $LINENO "configure"
9880#include "confdefs.h"
9881$ac_includes_default
9882#include <kernel/OS.h>
9883_ACEOF
9884rm -f conftest.$ac_objext
9885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9886 (eval $ac_compile) 2>&5
9887 ac_status=$?
9888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9889 (exit $ac_status); } &&
9890 { ac_try='test -s conftest.$ac_objext'
9891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9892 (eval $ac_try) 2>&5
9893 ac_status=$?
9894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9895 (exit $ac_status); }; }; then
9896 ac_header_compiler=yes
9897else
9898 echo "$as_me: failed program was:" >&5
9899cat conftest.$ac_ext >&5
9900ac_header_compiler=no
9901fi
9902rm -f conftest.$ac_objext conftest.$ac_ext
9903echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9904echo "${ECHO_T}$ac_header_compiler" >&6
9905
9906# Is the header present?
9907echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
9908echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
9909cat >conftest.$ac_ext <<_ACEOF
9910#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009911#include "confdefs.h"
9912#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009913_ACEOF
9914if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9915 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9916 ac_status=$?
9917 egrep -v '^ *\+' conftest.er1 >conftest.err
9918 rm -f conftest.er1
9919 cat conftest.err >&5
9920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9921 (exit $ac_status); } >/dev/null; then
9922 if test -s conftest.err; then
9923 ac_cpp_err=$ac_c_preproc_warn_flag
9924 else
9925 ac_cpp_err=
9926 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009927else
Martin v. Löwis11437992002-04-12 09:54:03 +00009928 ac_cpp_err=yes
9929fi
9930if test -z "$ac_cpp_err"; then
9931 ac_header_preproc=yes
9932else
9933 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009934 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009935 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009936fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009937rm -f conftest.err conftest.$ac_ext
9938echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9939echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009940
Martin v. Löwis11437992002-04-12 09:54:03 +00009941# So? What about this header?
9942case $ac_header_compiler:$ac_header_preproc in
9943 yes:no )
9944 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
9945echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9946 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9947echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9948 no:yes )
9949 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
9950echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
9951 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
9952echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
9953 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9954echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9955esac
9956echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9957echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9958if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9959 echo $ECHO_N "(cached) $ECHO_C" >&6
9960else
9961 ac_cv_header_kernel_OS_h=$ac_header_preproc
9962fi
9963echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9964echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
9965
9966fi
9967if test $ac_cv_header_kernel_OS_h = yes; then
9968 cat >>confdefs.h <<\_ACEOF
9969#define WITH_THREAD 1
9970_ACEOF
9971
9972
9973cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009974#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009975_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009976
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009977 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009978else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009979
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
9981echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
9982if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
9983 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009984else
Martin v. Löwis11437992002-04-12 09:54:03 +00009985 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009986LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009987cat >conftest.$ac_ext <<_ACEOF
9988#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00009989#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009990
Greg Steinadf63d62000-07-05 10:38:09 +00009991/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009992#ifdef __cplusplus
9993extern "C"
9994#endif
Greg Steinadf63d62000-07-05 10:38:09 +00009995/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009996 builtin and then its argument prototype would still apply. */
9997char pthread_create ();
9998#ifdef F77_DUMMY_MAIN
9999# ifdef __cplusplus
10000 extern "C"
10001# endif
10002 int F77_DUMMY_MAIN() { return 1; }
10003#endif
10004int
10005main ()
10006{
10007pthread_create ();
10008 ;
10009 return 0;
10010}
10011_ACEOF
10012rm -f conftest.$ac_objext conftest$ac_exeext
10013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10014 (eval $ac_link) 2>&5
10015 ac_status=$?
10016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017 (exit $ac_status); } &&
10018 { ac_try='test -s conftest$ac_exeext'
10019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10020 (eval $ac_try) 2>&5
10021 ac_status=$?
10022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10023 (exit $ac_status); }; }; then
10024 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010025else
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 echo "$as_me: failed program was:" >&5
10027cat conftest.$ac_ext >&5
10028ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10031LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010032fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010033echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10034echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10035if test $ac_cv_lib_pthreads_pthread_create = yes; then
10036 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010037#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010038_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010039
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010040 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010041 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010042 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010043else
Greg Steinadf63d62000-07-05 10:38:09 +000010044
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10046echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10047if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10048 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010049else
Martin v. Löwis11437992002-04-12 09:54:03 +000010050 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010051LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010052cat >conftest.$ac_ext <<_ACEOF
10053#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010054#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010055
Guido van Rossum49545951997-12-02 19:28:29 +000010056/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010057#ifdef __cplusplus
10058extern "C"
10059#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010060/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010061 builtin and then its argument prototype would still apply. */
10062char pthread_create ();
10063#ifdef F77_DUMMY_MAIN
10064# ifdef __cplusplus
10065 extern "C"
10066# endif
10067 int F77_DUMMY_MAIN() { return 1; }
10068#endif
10069int
10070main ()
10071{
10072pthread_create ();
10073 ;
10074 return 0;
10075}
10076_ACEOF
10077rm -f conftest.$ac_objext conftest$ac_exeext
10078if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10079 (eval $ac_link) 2>&5
10080 ac_status=$?
10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); } &&
10083 { ac_try='test -s conftest$ac_exeext'
10084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10085 (eval $ac_try) 2>&5
10086 ac_status=$?
10087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088 (exit $ac_status); }; }; then
10089 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010090else
Martin v. Löwis11437992002-04-12 09:54:03 +000010091 echo "$as_me: failed program was:" >&5
10092cat conftest.$ac_ext >&5
10093ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010094fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010095rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10096LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010097fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010098echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10099echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10100if test $ac_cv_lib_c_r_pthread_create = yes; then
10101 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010102#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010103_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010104
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010105 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010106 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010107 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010108else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010109
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10111echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10112if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10113 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010114else
Martin v. Löwis11437992002-04-12 09:54:03 +000010115 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010116LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010117cat >conftest.$ac_ext <<_ACEOF
10118#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010119#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010120
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010121/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010122#ifdef __cplusplus
10123extern "C"
10124#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010125/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 builtin and then its argument prototype would still apply. */
10127char __d6_pthread_create ();
10128#ifdef F77_DUMMY_MAIN
10129# ifdef __cplusplus
10130 extern "C"
10131# endif
10132 int F77_DUMMY_MAIN() { return 1; }
10133#endif
10134int
10135main ()
10136{
10137__d6_pthread_create ();
10138 ;
10139 return 0;
10140}
10141_ACEOF
10142rm -f conftest.$ac_objext conftest$ac_exeext
10143if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10144 (eval $ac_link) 2>&5
10145 ac_status=$?
10146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10147 (exit $ac_status); } &&
10148 { ac_try='test -s conftest$ac_exeext'
10149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10150 (eval $ac_try) 2>&5
10151 ac_status=$?
10152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153 (exit $ac_status); }; }; then
10154 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010155else
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 echo "$as_me: failed program was:" >&5
10157cat conftest.$ac_ext >&5
10158ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010159fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010160rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10161LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010163echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10164echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10165if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10166 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010167#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010168_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010169
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010170 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010171 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010172 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010173else
Guido van Rossum49545951997-12-02 19:28:29 +000010174
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10176echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10177if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10178 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010179else
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010181LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010182cat >conftest.$ac_ext <<_ACEOF
10183#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010184#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010185
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010186/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010187#ifdef __cplusplus
10188extern "C"
10189#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010190/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 builtin and then its argument prototype would still apply. */
10192char __pthread_create_system ();
10193#ifdef F77_DUMMY_MAIN
10194# ifdef __cplusplus
10195 extern "C"
10196# endif
10197 int F77_DUMMY_MAIN() { return 1; }
10198#endif
10199int
10200main ()
10201{
10202__pthread_create_system ();
10203 ;
10204 return 0;
10205}
10206_ACEOF
10207rm -f conftest.$ac_objext conftest$ac_exeext
10208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10209 (eval $ac_link) 2>&5
10210 ac_status=$?
10211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10212 (exit $ac_status); } &&
10213 { ac_try='test -s conftest$ac_exeext'
10214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10215 (eval $ac_try) 2>&5
10216 ac_status=$?
10217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10218 (exit $ac_status); }; }; then
10219 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010220else
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 echo "$as_me: failed program was:" >&5
10222cat conftest.$ac_ext >&5
10223ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010224fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010225rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10226LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010227fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010228echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10229echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10230if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10231 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010232#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010233_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010234
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010235 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010236 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010237 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010238else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010239
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10241echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10242if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10243 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010244else
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010246LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010247cat >conftest.$ac_ext <<_ACEOF
10248#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010249#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010250
Guido van Rossumb93a8621998-05-07 13:27:32 +000010251/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010252#ifdef __cplusplus
10253extern "C"
10254#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010255/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 builtin and then its argument prototype would still apply. */
10257char pthread_create ();
10258#ifdef F77_DUMMY_MAIN
10259# ifdef __cplusplus
10260 extern "C"
10261# endif
10262 int F77_DUMMY_MAIN() { return 1; }
10263#endif
10264int
10265main ()
10266{
10267pthread_create ();
10268 ;
10269 return 0;
10270}
10271_ACEOF
10272rm -f conftest.$ac_objext conftest$ac_exeext
10273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10274 (eval $ac_link) 2>&5
10275 ac_status=$?
10276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10277 (exit $ac_status); } &&
10278 { ac_try='test -s conftest$ac_exeext'
10279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10280 (eval $ac_try) 2>&5
10281 ac_status=$?
10282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10283 (exit $ac_status); }; }; then
10284 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010285else
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 echo "$as_me: failed program was:" >&5
10287cat conftest.$ac_ext >&5
10288ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010290rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10291LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010293echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10294echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10295if test $ac_cv_lib_cma_pthread_create = yes; then
10296 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010297#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010298_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010299
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010300 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010301 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010302 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010303else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010304
Martin v. Löwis130fb172001-07-19 11:00:41 +000010305 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010306fi
10307
Guido van Rossum627b2d71993-12-24 10:39:16 +000010308
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010309fi
10310
Guido van Rossum0be3e491997-05-22 20:33:33 +000010311fi
10312
Guido van Rossum49545951997-12-02 19:28:29 +000010313fi
10314
Guido van Rossumb93a8621998-05-07 13:27:32 +000010315fi
10316
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010317fi
10318
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010319
Michael W. Hudson54241132001-12-07 15:38:26 +000010320fi
10321
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010322fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010323rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10324fi;
10325fi
10326
10327
10328fi
10329
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010330
Michael W. Hudson54241132001-12-07 15:38:26 +000010331
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010332 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010333 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010334
10335cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010336#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010337_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010338
10339 fi
10340
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10342echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10343 if test "${ac_cv_pthread_system_supported+set}" = set; then
10344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010345else
10346 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010347 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010348else
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 cat >conftest.$ac_ext <<_ACEOF
10350#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010351#include "confdefs.h"
10352#include <pthread.h>
10353 void *foo(void *parm) {
10354 return NULL;
10355 }
10356 main() {
10357 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010358 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010359 if (pthread_attr_init(&attr)) exit(-1);
10360 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010361 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010362 exit(0);
10363 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010364_ACEOF
10365rm -f conftest$ac_exeext
10366if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10367 (eval $ac_link) 2>&5
10368 ac_status=$?
10369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10370 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10372 (eval $ac_try) 2>&5
10373 ac_status=$?
10374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10375 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010376 ac_cv_pthread_system_supported=yes
10377else
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 echo "$as_me: program exited with status $ac_status" >&5
10379echo "$as_me: failed program was:" >&5
10380cat conftest.$ac_ext >&5
10381( exit $ac_status )
10382ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010383fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010384rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010385fi
10386
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010387fi
10388
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10390echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010391 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010392
10393cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010394#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010395_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010396
10397 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010398
10399for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010400do
Martin v. Löwis11437992002-04-12 09:54:03 +000010401as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10402echo "$as_me:$LINENO: checking for $ac_func" >&5
10403echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10404if eval "test \"\${$as_ac_var+set}\" = set"; then
10405 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010406else
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 cat >conftest.$ac_ext <<_ACEOF
10408#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010409#include "confdefs.h"
10410/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010411 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010412#include <assert.h>
10413/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010414#ifdef __cplusplus
10415extern "C"
10416#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010417/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 builtin and then its argument prototype would still apply. */
10419char $ac_func ();
10420char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010421
Martin v. Löwis11437992002-04-12 09:54:03 +000010422#ifdef F77_DUMMY_MAIN
10423# ifdef __cplusplus
10424 extern "C"
10425# endif
10426 int F77_DUMMY_MAIN() { return 1; }
10427#endif
10428int
10429main ()
10430{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010431/* The GNU C library defines this for functions which it implements
10432 to always fail with ENOSYS. Some functions are actually named
10433 something starting with __ and the normal name is an alias. */
10434#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10435choke me
10436#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010437f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010438#endif
10439
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 ;
10441 return 0;
10442}
10443_ACEOF
10444rm -f conftest.$ac_objext conftest$ac_exeext
10445if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10446 (eval $ac_link) 2>&5
10447 ac_status=$?
10448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10449 (exit $ac_status); } &&
10450 { ac_try='test -s conftest$ac_exeext'
10451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10452 (eval $ac_try) 2>&5
10453 ac_status=$?
10454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10455 (exit $ac_status); }; }; then
10456 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010457else
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 echo "$as_me: failed program was:" >&5
10459cat conftest.$ac_ext >&5
10460eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010461fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010462rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010463fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010464echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10465echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10466if test `eval echo '${'$as_ac_var'}'` = yes; then
10467 cat >>confdefs.h <<_ACEOF
10468#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10469_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010470
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010471fi
10472done
10473
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010474 fi
10475
Martin v. Löwis11437992002-04-12 09:54:03 +000010476 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10477echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10478if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10479 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010480else
Martin v. Löwis11437992002-04-12 09:54:03 +000010481 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010482LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010483cat >conftest.$ac_ext <<_ACEOF
10484#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010485#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010486
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010487/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010488#ifdef __cplusplus
10489extern "C"
10490#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010491/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010492 builtin and then its argument prototype would still apply. */
10493char usconfig ();
10494#ifdef F77_DUMMY_MAIN
10495# ifdef __cplusplus
10496 extern "C"
10497# endif
10498 int F77_DUMMY_MAIN() { return 1; }
10499#endif
10500int
10501main ()
10502{
10503usconfig ();
10504 ;
10505 return 0;
10506}
10507_ACEOF
10508rm -f conftest.$ac_objext conftest$ac_exeext
10509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10510 (eval $ac_link) 2>&5
10511 ac_status=$?
10512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10513 (exit $ac_status); } &&
10514 { ac_try='test -s conftest$ac_exeext'
10515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10516 (eval $ac_try) 2>&5
10517 ac_status=$?
10518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10519 (exit $ac_status); }; }; then
10520 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010521else
Martin v. Löwis11437992002-04-12 09:54:03 +000010522 echo "$as_me: failed program was:" >&5
10523cat conftest.$ac_ext >&5
10524ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010525fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010526rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10527LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010528fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010529echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10530echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10531if test $ac_cv_lib_mpc_usconfig = yes; then
10532 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010533#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010534_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010535
Martin v. Löwis130fb172001-07-19 11:00:41 +000010536 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010537 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010538 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010539fi
10540
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010541
Martin v. Löwis11437992002-04-12 09:54:03 +000010542 if test $posix_threads != "yes"; then
10543 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10544echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10545if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10546 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010547else
Martin v. Löwis11437992002-04-12 09:54:03 +000010548 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010549LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010550cat >conftest.$ac_ext <<_ACEOF
10551#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010552#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010554/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010555#ifdef __cplusplus
10556extern "C"
10557#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010558/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 builtin and then its argument prototype would still apply. */
10560char thr_create ();
10561#ifdef F77_DUMMY_MAIN
10562# ifdef __cplusplus
10563 extern "C"
10564# endif
10565 int F77_DUMMY_MAIN() { return 1; }
10566#endif
10567int
10568main ()
10569{
10570thr_create ();
10571 ;
10572 return 0;
10573}
10574_ACEOF
10575rm -f conftest.$ac_objext conftest$ac_exeext
10576if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10577 (eval $ac_link) 2>&5
10578 ac_status=$?
10579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10580 (exit $ac_status); } &&
10581 { ac_try='test -s conftest$ac_exeext'
10582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10583 (eval $ac_try) 2>&5
10584 ac_status=$?
10585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10586 (exit $ac_status); }; }; then
10587 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010588else
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 echo "$as_me: failed program was:" >&5
10590cat conftest.$ac_ext >&5
10591ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010593rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10594LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010595fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010596echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10597echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10598if test $ac_cv_lib_thread_thr_create = yes; then
10599 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010600#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010601_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010602
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010603 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010604 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010605 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010606fi
10607
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010608 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010609
Martin v. Löwis130fb172001-07-19 11:00:41 +000010610 if test "$USE_THREAD_MODULE" != "#"
10611 then
10612 # If the above checks didn't disable threads, (at least) OSF1
10613 # needs this '-threads' argument during linking.
10614 case $ac_sys_system in
10615 OSF1) LDLAST=-threads;;
10616 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010617 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010618fi
10619
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010620# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010621
10622
10623echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10624echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010625# Check whether --enable-ipv6 or --disable-ipv6 was given.
10626if test "${enable_ipv6+set}" = set; then
10627 enableval="$enable_ipv6"
10628 case "$enableval" in
10629 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010630 echo "$as_me:$LINENO: result: no" >&5
10631echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010632 ipv6=no
10633 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 *) echo "$as_me:$LINENO: result: yes" >&5
10635echo "${ECHO_T}yes" >&6
10636 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010637#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010638_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010639
10640 ipv6=yes
10641 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010642 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010643else
Martin v. Löwis11437992002-04-12 09:54:03 +000010644
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010645 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010646 echo "$as_me:$LINENO: result: no" >&5
10647echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010648 ipv6=no
10649
10650else
Martin v. Löwis11437992002-04-12 09:54:03 +000010651 cat >conftest.$ac_ext <<_ACEOF
10652#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010653#include "confdefs.h"
10654 /* AF_INET6 available check */
10655#include <sys/types.h>
10656#include <sys/socket.h>
10657main()
10658{
10659 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10660 exit(1);
10661 else
10662 exit(0);
10663}
10664
Martin v. Löwis11437992002-04-12 09:54:03 +000010665_ACEOF
10666rm -f conftest$ac_exeext
10667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10668 (eval $ac_link) 2>&5
10669 ac_status=$?
10670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10671 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10673 (eval $ac_try) 2>&5
10674 ac_status=$?
10675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10676 (exit $ac_status); }; }; then
10677 echo "$as_me:$LINENO: result: yes" >&5
10678echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010679 ipv6=yes
10680else
Martin v. Löwis11437992002-04-12 09:54:03 +000010681 echo "$as_me: program exited with status $ac_status" >&5
10682echo "$as_me: failed program was:" >&5
10683cat conftest.$ac_ext >&5
10684( exit $ac_status )
10685echo "$as_me:$LINENO: result: no" >&5
10686echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010687 ipv6=no
10688fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010689rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010690fi
10691
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010692if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10694echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10695 cat >conftest.$ac_ext <<_ACEOF
10696#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010697#include "confdefs.h"
10698#include <sys/types.h>
10699#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010700#ifdef F77_DUMMY_MAIN
10701# ifdef __cplusplus
10702 extern "C"
10703# endif
10704 int F77_DUMMY_MAIN() { return 1; }
10705#endif
10706int
10707main ()
10708{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010709struct sockaddr_in6 x;
10710x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 ;
10712 return 0;
10713}
10714_ACEOF
10715rm -f conftest.$ac_objext
10716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10717 (eval $ac_compile) 2>&5
10718 ac_status=$?
10719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10720 (exit $ac_status); } &&
10721 { ac_try='test -s conftest.$ac_objext'
10722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10723 (eval $ac_try) 2>&5
10724 ac_status=$?
10725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10726 (exit $ac_status); }; }; then
10727 echo "$as_me:$LINENO: result: yes" >&5
10728echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010729 ipv6=yes
10730else
Martin v. Löwis11437992002-04-12 09:54:03 +000010731 echo "$as_me: failed program was:" >&5
10732cat conftest.$ac_ext >&5
10733echo "$as_me:$LINENO: result: no" >&5
10734echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010735 ipv6=no
10736fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010737rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010738fi
10739
10740if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010741 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010742#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010743_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010744
10745fi
10746
Martin v. Löwis11437992002-04-12 09:54:03 +000010747fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748
10749ipv6type=unknown
10750ipv6lib=none
10751ipv6trylibc=no
10752
10753if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010754 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10755echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010756 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10757 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758 case $i in
10759 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 cat >conftest.$ac_ext <<_ACEOF
10761#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010762#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010763
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764#include <netinet/in.h>
10765#ifdef IPV6_INRIA_VERSION
10766yes
10767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010768_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10770 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010771 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772fi
10773rm -f conftest*
10774
10775 ;;
10776 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 cat >conftest.$ac_ext <<_ACEOF
10778#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781#include <netinet/in.h>
10782#ifdef __KAME__
10783yes
10784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010785_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10787 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788 ipv6type=$i;
10789 ipv6lib=inet6
10790 ipv6libdir=/usr/local/v6/lib
10791 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792fi
10793rm -f conftest*
10794
10795 ;;
10796 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010797 cat >conftest.$ac_ext <<_ACEOF
10798#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010799#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010800
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801#include <features.h>
10802#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10803yes
10804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010805_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10807 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010808 ipv6type=$i;
10809 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810fi
10811rm -f conftest*
10812
10813 ;;
10814 linux-inet6)
10815 if test -d /usr/inet6; then
10816 ipv6type=$i
10817 ipv6lib=inet6
10818 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010819 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820 fi
10821 ;;
10822 solaris)
10823 if test -f /etc/netconfig; then
10824 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10825 ipv6type=$i
10826 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827 fi
10828 fi
10829 ;;
10830 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010831 cat >conftest.$ac_ext <<_ACEOF
10832#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010834
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835#include <sys/param.h>
10836#ifdef _TOSHIBA_INET6
10837yes
10838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010839_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10841 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842 ipv6type=$i;
10843 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010844 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010845fi
10846rm -f conftest*
10847
10848 ;;
10849 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010850 cat >conftest.$ac_ext <<_ACEOF
10851#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010853
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854#include </usr/local/v6/include/sys/v6config.h>
10855#ifdef __V6D__
10856yes
10857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010858_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10860 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861 ipv6type=$i;
10862 ipv6lib=v6;
10863 ipv6libdir=/usr/local/v6/lib;
10864 OPT="-I/usr/local/v6/include $OPT"
10865fi
10866rm -f conftest*
10867
10868 ;;
10869 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000010870 cat >conftest.$ac_ext <<_ACEOF
10871#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010872#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010873
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874#include <sys/param.h>
10875#ifdef _ZETA_MINAMI_INET6
10876yes
10877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010878_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10880 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010881 ipv6type=$i;
10882 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010883 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884fi
10885rm -f conftest*
10886
10887 ;;
10888 esac
10889 if test "$ipv6type" != "unknown"; then
10890 break
10891 fi
10892 done
Martin v. Löwis11437992002-04-12 09:54:03 +000010893 echo "$as_me:$LINENO: result: $ipv6type" >&5
10894echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895fi
10896
10897if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10898 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10899 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10900 echo "using lib$ipv6lib"
10901 else
10902 if test $ipv6trylibc = "yes"; then
10903 echo "using libc"
10904 else
10905 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10906 echo "You need to fetch lib$ipv6lib.a from appropriate"
10907 echo 'ipv6 kit and compile beforehand.'
10908 exit 1
10909 fi
10910 fi
10911fi
10912
Barry Warsawef82cd72000-06-30 16:21:01 +000010913# Check for GC support
Martin v. Löwis11437992002-04-12 09:54:03 +000010914echo "$as_me:$LINENO: checking for --with-cycle-gc" >&5
10915echo $ECHO_N "checking for --with-cycle-gc... $ECHO_C" >&6
10916
Barry Warsawef82cd72000-06-30 16:21:01 +000010917# Check whether --with-cycle-gc or --without-cycle-gc was given.
10918if test "${with_cycle_gc+set}" = set; then
10919 withval="$with_cycle_gc"
Barry Warsawef82cd72000-06-30 16:21:01 +000010920
Martin v. Löwis11437992002-04-12 09:54:03 +000010921fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000010922
10923if test -z "$with_cycle_gc"
10924then with_cycle_gc="yes"
10925fi
Neil Schemenauercf229462001-08-29 23:58:47 +000010926if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +000010927then
Martin v. Löwis11437992002-04-12 09:54:03 +000010928
10929cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010930#define WITH_CYCLE_GC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010931_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010932
10933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010934echo "$as_me:$LINENO: result: $with_cycle_gc" >&5
10935echo "${ECHO_T}$with_cycle_gc" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000010936
Jack Jansen7b8c7542002-04-14 20:12:41 +000010937# Check for universal newline support
10938echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
10939echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
10940
10941# Check whether --with-universal-newlines or --without-universal-newlines was given.
10942if test "${with_universal_newlines+set}" = set; then
10943 withval="$with_universal_newlines"
10944
10945fi;
10946
10947if test -z "$with_universal_newlines"
10948then with_universal_newlines="yes"
10949fi
10950if test "$with_universal_newlines" != "no"
10951then
10952 cat >>confdefs.h <<\_ACEOF
10953#define WITH_UNIVERSAL_NEWLINES 1
10954_ACEOF
10955
10956fi
10957echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
10958echo "${ECHO_T}$with_universal_newlines" >&6
10959
Neil Schemenauera35c6882001-02-27 04:45:05 +000010960# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000010961echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
10962echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
10963
Neil Schemenauera35c6882001-02-27 04:45:05 +000010964# Check whether --with-pymalloc or --without-pymalloc was given.
10965if test "${with_pymalloc+set}" = set; then
10966 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000010967
Martin v. Löwis11437992002-04-12 09:54:03 +000010968fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000010969
Neil Schemenauer16c22972002-03-22 15:34:49 +000010970if test -z "$with_pymalloc"
10971then with_pymalloc="yes"
10972fi
10973if test "$with_pymalloc" != "no"
10974then
Martin v. Löwis11437992002-04-12 09:54:03 +000010975
10976cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010977#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010978_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010979
10980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010981echo "$as_me:$LINENO: result: $with_pymalloc" >&5
10982echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000010983
Barry Warsawef82cd72000-06-30 16:21:01 +000010984# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000010985echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
10986echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
10987
Barry Warsawef82cd72000-06-30 16:21:01 +000010988# Check whether --with-wctype-functions or --without-wctype-functions was given.
10989if test "${with_wctype_functions+set}" = set; then
10990 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000010991
Barry Warsawef82cd72000-06-30 16:21:01 +000010992if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010993then
10994
10995cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010996#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010997_ACEOF
10998
10999 echo "$as_me:$LINENO: result: yes" >&5
11000echo "${ECHO_T}yes" >&6
11001else echo "$as_me:$LINENO: result: no" >&5
11002echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011003fi
11004else
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 echo "$as_me:$LINENO: result: no" >&5
11006echo "${ECHO_T}no" >&6
11007fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011008
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011009# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011010
Guido van Rossum98935bf2001-09-05 19:13:16 +000011011DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011012
Martin v. Löwis11437992002-04-12 09:54:03 +000011013echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11014echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11015
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011016# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011017if test "${with_sgi_dl+set}" = set; then
11018 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011019
11020echo "$as_me:$LINENO: result: $withval" >&5
11021echo "${ECHO_T}$withval" >&6
11022
11023cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011024#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011025_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011026
Guido van Rossume97ee181999-12-20 21:27:22 +000011027DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011028dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011029if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011030then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011031else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11032echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11033 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011034fi
11035DLINCLDIR=${dldir}
11036LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011037else
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 echo "$as_me:$LINENO: result: no" >&5
11039echo "${ECHO_T}no" >&6
11040fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011041
Martin v. Löwis11437992002-04-12 09:54:03 +000011042echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11043echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011044
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011045# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011046if test "${with_dl_dld+set}" = set; then
11047 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011048
11049echo "$as_me:$LINENO: result: $withval" >&5
11050echo "${ECHO_T}$withval" >&6
11051
11052cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011053#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011054_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011055
Guido van Rossume97ee181999-12-20 21:27:22 +000011056DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011057dldir=`echo "$withval" | sed 's/,.*//'`
11058dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011059if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011060then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011061else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11062echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11063 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011064fi
11065DLINCLDIR=${dldir}
11066LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011067else
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 echo "$as_me:$LINENO: result: no" >&5
11069echo "${ECHO_T}no" >&6
11070fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011071
Guido van Rossume97ee181999-12-20 21:27:22 +000011072# the dlopen() function means we might want to use dynload_shlib.o. some
11073# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011074
Thomas Wouters3a584202000-08-05 23:28:51 +000011075for ac_func in dlopen
11076do
Martin v. Löwis11437992002-04-12 09:54:03 +000011077as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11078echo "$as_me:$LINENO: checking for $ac_func" >&5
11079echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11080if eval "test \"\${$as_ac_var+set}\" = set"; then
11081 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011082else
Martin v. Löwis11437992002-04-12 09:54:03 +000011083 cat >conftest.$ac_ext <<_ACEOF
11084#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011085#include "confdefs.h"
11086/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011088#include <assert.h>
11089/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011090#ifdef __cplusplus
11091extern "C"
11092#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011093/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 builtin and then its argument prototype would still apply. */
11095char $ac_func ();
11096char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011097
Martin v. Löwis11437992002-04-12 09:54:03 +000011098#ifdef F77_DUMMY_MAIN
11099# ifdef __cplusplus
11100 extern "C"
11101# endif
11102 int F77_DUMMY_MAIN() { return 1; }
11103#endif
11104int
11105main ()
11106{
Guido van Rossume97ee181999-12-20 21:27:22 +000011107/* The GNU C library defines this for functions which it implements
11108 to always fail with ENOSYS. Some functions are actually named
11109 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011110#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011111choke me
11112#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011113f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011114#endif
11115
Martin v. Löwis11437992002-04-12 09:54:03 +000011116 ;
11117 return 0;
11118}
11119_ACEOF
11120rm -f conftest.$ac_objext conftest$ac_exeext
11121if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11122 (eval $ac_link) 2>&5
11123 ac_status=$?
11124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11125 (exit $ac_status); } &&
11126 { ac_try='test -s conftest$ac_exeext'
11127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11128 (eval $ac_try) 2>&5
11129 ac_status=$?
11130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11131 (exit $ac_status); }; }; then
11132 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011133else
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 echo "$as_me: failed program was:" >&5
11135cat conftest.$ac_ext >&5
11136eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011137fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011138rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011139fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011140echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11141echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11142if test `eval echo '${'$as_ac_var'}'` = yes; then
11143 cat >>confdefs.h <<_ACEOF
11144#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11145_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011146
Guido van Rossume97ee181999-12-20 21:27:22 +000011147fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011148done
Guido van Rossume97ee181999-12-20 21:27:22 +000011149
Michael W. Hudson54241132001-12-07 15:38:26 +000011150
Guido van Rossume97ee181999-12-20 21:27:22 +000011151# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11152# loading of modules.
11153
Martin v. Löwis11437992002-04-12 09:54:03 +000011154echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11155echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011156if test -z "$DYNLOADFILE"
11157then
11158 case $ac_sys_system/$ac_sys_release in
11159 AIX*) DYNLOADFILE="dynload_aix.o";;
11160 BeOS*) DYNLOADFILE="dynload_beos.o";;
11161 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011162 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011163 *)
11164 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11165 # out any dynamic loading
11166 if test "$ac_cv_func_dlopen" = yes
11167 then DYNLOADFILE="dynload_shlib.o"
11168 else DYNLOADFILE="dynload_stub.o"
11169 fi
11170 ;;
11171 esac
11172fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011173echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11174echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011175if test "$DYNLOADFILE" != "dynload_stub.o"
11176then
Martin v. Löwis11437992002-04-12 09:54:03 +000011177
11178cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011179#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011180_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011181
11182fi
11183
Neil Schemenauer4e425612001-06-19 15:44:15 +000011184# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11185
Michael W. Hudson54241132001-12-07 15:38:26 +000011186
Martin v. Löwis11437992002-04-12 09:54:03 +000011187echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11188echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011189if test -z "$MACHDEP_OBJS"
11190then
Jack Jansene578a632001-08-15 01:27:14 +000011191 MACHDEP_OBJS=$extra_machdep_objs
11192else
11193 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011194fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011195echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11196echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011197
Guido van Rossum627b2d71993-12-24 10:39:16 +000011198# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011272
Martin v. Löwis244edc82001-10-04 22:44:26 +000011273for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +000011274 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +000011275 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011276 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011277 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011278 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011279 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011280 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +000011281 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +000011282 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011283 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011284do
Martin v. Löwis11437992002-04-12 09:54:03 +000011285as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11286echo "$as_me:$LINENO: checking for $ac_func" >&5
11287echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11288if eval "test \"\${$as_ac_var+set}\" = set"; then
11289 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011290else
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 cat >conftest.$ac_ext <<_ACEOF
11292#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011293#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011294/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011295 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011296#include <assert.h>
11297/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011298#ifdef __cplusplus
11299extern "C"
11300#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011301/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 builtin and then its argument prototype would still apply. */
11303char $ac_func ();
11304char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011305
Martin v. Löwis11437992002-04-12 09:54:03 +000011306#ifdef F77_DUMMY_MAIN
11307# ifdef __cplusplus
11308 extern "C"
11309# endif
11310 int F77_DUMMY_MAIN() { return 1; }
11311#endif
11312int
11313main ()
11314{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011315/* The GNU C library defines this for functions which it implements
11316 to always fail with ENOSYS. Some functions are actually named
11317 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011318#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011319choke me
11320#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011321f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011322#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011323
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 ;
11325 return 0;
11326}
11327_ACEOF
11328rm -f conftest.$ac_objext conftest$ac_exeext
11329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11330 (eval $ac_link) 2>&5
11331 ac_status=$?
11332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11333 (exit $ac_status); } &&
11334 { ac_try='test -s conftest$ac_exeext'
11335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11336 (eval $ac_try) 2>&5
11337 ac_status=$?
11338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11339 (exit $ac_status); }; }; then
11340 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011341else
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 echo "$as_me: failed program was:" >&5
11343cat conftest.$ac_ext >&5
11344eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011346rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011347fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011348echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11349echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11350if test `eval echo '${'$as_ac_var'}'` = yes; then
11351 cat >>confdefs.h <<_ACEOF
11352#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11353_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011354
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011355fi
11356done
11357
Michael W. Hudson54241132001-12-07 15:38:26 +000011358
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011359# check for openpty and forkpty
11360
Martin v. Löwis11437992002-04-12 09:54:03 +000011361
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011362for ac_func in openpty
11363do
Martin v. Löwis11437992002-04-12 09:54:03 +000011364as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11365echo "$as_me:$LINENO: checking for $ac_func" >&5
11366echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11367if eval "test \"\${$as_ac_var+set}\" = set"; then
11368 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011369else
Martin v. Löwis11437992002-04-12 09:54:03 +000011370 cat >conftest.$ac_ext <<_ACEOF
11371#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011372#include "confdefs.h"
11373/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011374 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011375#include <assert.h>
11376/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011377#ifdef __cplusplus
11378extern "C"
11379#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011380/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 builtin and then its argument prototype would still apply. */
11382char $ac_func ();
11383char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011384
Martin v. Löwis11437992002-04-12 09:54:03 +000011385#ifdef F77_DUMMY_MAIN
11386# ifdef __cplusplus
11387 extern "C"
11388# endif
11389 int F77_DUMMY_MAIN() { return 1; }
11390#endif
11391int
11392main ()
11393{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011394/* The GNU C library defines this for functions which it implements
11395 to always fail with ENOSYS. Some functions are actually named
11396 something starting with __ and the normal name is an alias. */
11397#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11398choke me
11399#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011400f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011401#endif
11402
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 ;
11404 return 0;
11405}
11406_ACEOF
11407rm -f conftest.$ac_objext conftest$ac_exeext
11408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11409 (eval $ac_link) 2>&5
11410 ac_status=$?
11411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11412 (exit $ac_status); } &&
11413 { ac_try='test -s conftest$ac_exeext'
11414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11415 (eval $ac_try) 2>&5
11416 ac_status=$?
11417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11418 (exit $ac_status); }; }; then
11419 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011420else
Martin v. Löwis11437992002-04-12 09:54:03 +000011421 echo "$as_me: failed program was:" >&5
11422cat conftest.$ac_ext >&5
11423eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011424fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011425rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011426fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011427echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11428echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11429if test `eval echo '${'$as_ac_var'}'` = yes; then
11430 cat >>confdefs.h <<_ACEOF
11431#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11432_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011433
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011434else
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11436echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11437if test "${ac_cv_lib_util_openpty+set}" = set; then
11438 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011439else
Martin v. Löwis11437992002-04-12 09:54:03 +000011440 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011441LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011442cat >conftest.$ac_ext <<_ACEOF
11443#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011444#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011445
Fred Drake8cef4cf2000-06-28 16:40:38 +000011446/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011447#ifdef __cplusplus
11448extern "C"
11449#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011450/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011451 builtin and then its argument prototype would still apply. */
11452char openpty ();
11453#ifdef F77_DUMMY_MAIN
11454# ifdef __cplusplus
11455 extern "C"
11456# endif
11457 int F77_DUMMY_MAIN() { return 1; }
11458#endif
11459int
11460main ()
11461{
11462openpty ();
11463 ;
11464 return 0;
11465}
11466_ACEOF
11467rm -f conftest.$ac_objext conftest$ac_exeext
11468if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11469 (eval $ac_link) 2>&5
11470 ac_status=$?
11471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11472 (exit $ac_status); } &&
11473 { ac_try='test -s conftest$ac_exeext'
11474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11475 (eval $ac_try) 2>&5
11476 ac_status=$?
11477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11478 (exit $ac_status); }; }; then
11479 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011480else
Martin v. Löwis11437992002-04-12 09:54:03 +000011481 echo "$as_me: failed program was:" >&5
11482cat conftest.$ac_ext >&5
11483ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011484fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011485rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11486LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011488echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11489echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11490if test $ac_cv_lib_util_openpty = yes; then
11491 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011492#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011493_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011494 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011495fi
11496
11497fi
11498done
11499
Martin v. Löwis11437992002-04-12 09:54:03 +000011500
Fred Drake8cef4cf2000-06-28 16:40:38 +000011501for ac_func in forkpty
11502do
Martin v. Löwis11437992002-04-12 09:54:03 +000011503as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11504echo "$as_me:$LINENO: checking for $ac_func" >&5
11505echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11506if eval "test \"\${$as_ac_var+set}\" = set"; then
11507 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011508else
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 cat >conftest.$ac_ext <<_ACEOF
11510#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011511#include "confdefs.h"
11512/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011514#include <assert.h>
11515/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011516#ifdef __cplusplus
11517extern "C"
11518#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011519/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 builtin and then its argument prototype would still apply. */
11521char $ac_func ();
11522char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011523
Martin v. Löwis11437992002-04-12 09:54:03 +000011524#ifdef F77_DUMMY_MAIN
11525# ifdef __cplusplus
11526 extern "C"
11527# endif
11528 int F77_DUMMY_MAIN() { return 1; }
11529#endif
11530int
11531main ()
11532{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011533/* The GNU C library defines this for functions which it implements
11534 to always fail with ENOSYS. Some functions are actually named
11535 something starting with __ and the normal name is an alias. */
11536#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11537choke me
11538#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011539f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011540#endif
11541
Martin v. Löwis11437992002-04-12 09:54:03 +000011542 ;
11543 return 0;
11544}
11545_ACEOF
11546rm -f conftest.$ac_objext conftest$ac_exeext
11547if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11548 (eval $ac_link) 2>&5
11549 ac_status=$?
11550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11551 (exit $ac_status); } &&
11552 { ac_try='test -s conftest$ac_exeext'
11553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11554 (eval $ac_try) 2>&5
11555 ac_status=$?
11556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11557 (exit $ac_status); }; }; then
11558 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011559else
Martin v. Löwis11437992002-04-12 09:54:03 +000011560 echo "$as_me: failed program was:" >&5
11561cat conftest.$ac_ext >&5
11562eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011564rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011566echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11567echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11568if test `eval echo '${'$as_ac_var'}'` = yes; then
11569 cat >>confdefs.h <<_ACEOF
11570#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11571_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011572
Fred Drake8cef4cf2000-06-28 16:40:38 +000011573else
Martin v. Löwis11437992002-04-12 09:54:03 +000011574 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11575echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11576if test "${ac_cv_lib_util_forkpty+set}" = set; then
11577 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011578else
Martin v. Löwis11437992002-04-12 09:54:03 +000011579 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011580LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011581cat >conftest.$ac_ext <<_ACEOF
11582#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011583#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011584
Fred Drake8cef4cf2000-06-28 16:40:38 +000011585/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011586#ifdef __cplusplus
11587extern "C"
11588#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011589/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 builtin and then its argument prototype would still apply. */
11591char forkpty ();
11592#ifdef F77_DUMMY_MAIN
11593# ifdef __cplusplus
11594 extern "C"
11595# endif
11596 int F77_DUMMY_MAIN() { return 1; }
11597#endif
11598int
11599main ()
11600{
11601forkpty ();
11602 ;
11603 return 0;
11604}
11605_ACEOF
11606rm -f conftest.$ac_objext conftest$ac_exeext
11607if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11608 (eval $ac_link) 2>&5
11609 ac_status=$?
11610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11611 (exit $ac_status); } &&
11612 { ac_try='test -s conftest$ac_exeext'
11613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11614 (eval $ac_try) 2>&5
11615 ac_status=$?
11616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11617 (exit $ac_status); }; }; then
11618 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011619else
Martin v. Löwis11437992002-04-12 09:54:03 +000011620 echo "$as_me: failed program was:" >&5
11621cat conftest.$ac_ext >&5
11622ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011623fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011624rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11625LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011626fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011627echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11628echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11629if test $ac_cv_lib_util_forkpty = yes; then
11630 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011631#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011632_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011633 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011634fi
11635
11636fi
11637done
11638
Jack Jansendd19cf82001-12-06 22:36:17 +000011639
Michael W. Hudson54241132001-12-07 15:38:26 +000011640# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011641
11642
11643
11644
11645
11646
Fred Drake8cef4cf2000-06-28 16:40:38 +000011647for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11648do
Martin v. Löwis11437992002-04-12 09:54:03 +000011649as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11650echo "$as_me:$LINENO: checking for $ac_func" >&5
11651echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11652if eval "test \"\${$as_ac_var+set}\" = set"; then
11653 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011654else
Martin v. Löwis11437992002-04-12 09:54:03 +000011655 cat >conftest.$ac_ext <<_ACEOF
11656#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011657#include "confdefs.h"
11658/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011659 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011660#include <assert.h>
11661/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011662#ifdef __cplusplus
11663extern "C"
11664#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011665/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011666 builtin and then its argument prototype would still apply. */
11667char $ac_func ();
11668char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011669
Martin v. Löwis11437992002-04-12 09:54:03 +000011670#ifdef F77_DUMMY_MAIN
11671# ifdef __cplusplus
11672 extern "C"
11673# endif
11674 int F77_DUMMY_MAIN() { return 1; }
11675#endif
11676int
11677main ()
11678{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011679/* The GNU C library defines this for functions which it implements
11680 to always fail with ENOSYS. Some functions are actually named
11681 something starting with __ and the normal name is an alias. */
11682#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11683choke me
11684#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011685f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011686#endif
11687
Martin v. Löwis11437992002-04-12 09:54:03 +000011688 ;
11689 return 0;
11690}
11691_ACEOF
11692rm -f conftest.$ac_objext conftest$ac_exeext
11693if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11694 (eval $ac_link) 2>&5
11695 ac_status=$?
11696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11697 (exit $ac_status); } &&
11698 { ac_try='test -s conftest$ac_exeext'
11699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11700 (eval $ac_try) 2>&5
11701 ac_status=$?
11702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11703 (exit $ac_status); }; }; then
11704 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011705else
Martin v. Löwis11437992002-04-12 09:54:03 +000011706 echo "$as_me: failed program was:" >&5
11707cat conftest.$ac_ext >&5
11708eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011709fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011710rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011711fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011712echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11713echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11714if test `eval echo '${'$as_ac_var'}'` = yes; then
11715 cat >>confdefs.h <<_ACEOF
11716#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11717_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011718
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011719fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011720done
11721
Michael W. Hudson54241132001-12-07 15:38:26 +000011722
Martin v. Löwis11437992002-04-12 09:54:03 +000011723
11724
11725
11726
11727
Martin v. Löwis1142de32002-03-29 16:28:31 +000011728for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011729do
Martin v. Löwis11437992002-04-12 09:54:03 +000011730as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11731echo "$as_me:$LINENO: checking for $ac_func" >&5
11732echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11733if eval "test \"\${$as_ac_var+set}\" = set"; then
11734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011735else
Martin v. Löwis11437992002-04-12 09:54:03 +000011736 cat >conftest.$ac_ext <<_ACEOF
11737#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011738#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011739/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011740 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011741#include <assert.h>
11742/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011743#ifdef __cplusplus
11744extern "C"
11745#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011746/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011747 builtin and then its argument prototype would still apply. */
11748char $ac_func ();
11749char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011750
Martin v. Löwis11437992002-04-12 09:54:03 +000011751#ifdef F77_DUMMY_MAIN
11752# ifdef __cplusplus
11753 extern "C"
11754# endif
11755 int F77_DUMMY_MAIN() { return 1; }
11756#endif
11757int
11758main ()
11759{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011760/* The GNU C library defines this for functions which it implements
11761 to always fail with ENOSYS. Some functions are actually named
11762 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011763#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011764choke me
11765#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011766f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011767#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011768
Martin v. Löwis11437992002-04-12 09:54:03 +000011769 ;
11770 return 0;
11771}
11772_ACEOF
11773rm -f conftest.$ac_objext conftest$ac_exeext
11774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11775 (eval $ac_link) 2>&5
11776 ac_status=$?
11777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11778 (exit $ac_status); } &&
11779 { ac_try='test -s conftest$ac_exeext'
11780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11781 (eval $ac_try) 2>&5
11782 ac_status=$?
11783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11784 (exit $ac_status); }; }; then
11785 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011786else
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 echo "$as_me: failed program was:" >&5
11788cat conftest.$ac_ext >&5
11789eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011790fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011791rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011792fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011793echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11794echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11795if test `eval echo '${'$as_ac_var'}'` = yes; then
11796 cat >>confdefs.h <<_ACEOF
11797#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11798_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011799
Martin v. Löwis1142de32002-03-29 16:28:31 +000011800else
Martin v. Löwis11437992002-04-12 09:54:03 +000011801 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011802fi
11803done
11804
11805
Martin v. Löwis11437992002-04-12 09:54:03 +000011806
Martin v. Löwis1142de32002-03-29 16:28:31 +000011807for ac_func in getpgrp
11808do
Martin v. Löwis11437992002-04-12 09:54:03 +000011809as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11810echo "$as_me:$LINENO: checking for $ac_func" >&5
11811echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11812if eval "test \"\${$as_ac_var+set}\" = set"; then
11813 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011814else
Martin v. Löwis11437992002-04-12 09:54:03 +000011815 cat >conftest.$ac_ext <<_ACEOF
11816#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011817#include "confdefs.h"
11818/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011819 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011820#include <assert.h>
11821/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011822#ifdef __cplusplus
11823extern "C"
11824#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011825/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011826 builtin and then its argument prototype would still apply. */
11827char $ac_func ();
11828char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011829
Martin v. Löwis11437992002-04-12 09:54:03 +000011830#ifdef F77_DUMMY_MAIN
11831# ifdef __cplusplus
11832 extern "C"
11833# endif
11834 int F77_DUMMY_MAIN() { return 1; }
11835#endif
11836int
11837main ()
11838{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011839/* The GNU C library defines this for functions which it implements
11840 to always fail with ENOSYS. Some functions are actually named
11841 something starting with __ and the normal name is an alias. */
11842#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11843choke me
11844#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011845f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000011846#endif
11847
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 ;
11849 return 0;
11850}
11851_ACEOF
11852rm -f conftest.$ac_objext conftest$ac_exeext
11853if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11854 (eval $ac_link) 2>&5
11855 ac_status=$?
11856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11857 (exit $ac_status); } &&
11858 { ac_try='test -s conftest$ac_exeext'
11859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11860 (eval $ac_try) 2>&5
11861 ac_status=$?
11862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11863 (exit $ac_status); }; }; then
11864 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011865else
Martin v. Löwis11437992002-04-12 09:54:03 +000011866 echo "$as_me: failed program was:" >&5
11867cat conftest.$ac_ext >&5
11868eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011869fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011870rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011871fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011872echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11873echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11874if test `eval echo '${'$as_ac_var'}'` = yes; then
11875 cat >>confdefs.h <<_ACEOF
11876#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11877_ACEOF
11878 cat >conftest.$ac_ext <<_ACEOF
11879#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011880#include "confdefs.h"
11881#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011882#ifdef F77_DUMMY_MAIN
11883# ifdef __cplusplus
11884 extern "C"
11885# endif
11886 int F77_DUMMY_MAIN() { return 1; }
11887#endif
11888int
11889main ()
11890{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011891getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011892 ;
11893 return 0;
11894}
11895_ACEOF
11896rm -f conftest.$ac_objext
11897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11898 (eval $ac_compile) 2>&5
11899 ac_status=$?
11900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11901 (exit $ac_status); } &&
11902 { ac_try='test -s conftest.$ac_objext'
11903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11904 (eval $ac_try) 2>&5
11905 ac_status=$?
11906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11907 (exit $ac_status); }; }; then
11908
11909cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011910#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011911_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011912
Martin v. Löwis11437992002-04-12 09:54:03 +000011913
Guido van Rossumf78abae1997-01-21 22:02:36 +000011914else
Martin v. Löwis11437992002-04-12 09:54:03 +000011915 echo "$as_me: failed program was:" >&5
11916cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000011917fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011918rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011919
Guido van Rossum627b2d71993-12-24 10:39:16 +000011920fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011921done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011922
Martin v. Löwis11437992002-04-12 09:54:03 +000011923
Thomas Wouters3a584202000-08-05 23:28:51 +000011924for ac_func in setpgrp
11925do
Martin v. Löwis11437992002-04-12 09:54:03 +000011926as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11927echo "$as_me:$LINENO: checking for $ac_func" >&5
11928echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11929if eval "test \"\${$as_ac_var+set}\" = set"; then
11930 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011931else
Martin v. Löwis11437992002-04-12 09:54:03 +000011932 cat >conftest.$ac_ext <<_ACEOF
11933#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011934#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011935/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011936 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011937#include <assert.h>
11938/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011939#ifdef __cplusplus
11940extern "C"
11941#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011942/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011943 builtin and then its argument prototype would still apply. */
11944char $ac_func ();
11945char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011946
Martin v. Löwis11437992002-04-12 09:54:03 +000011947#ifdef F77_DUMMY_MAIN
11948# ifdef __cplusplus
11949 extern "C"
11950# endif
11951 int F77_DUMMY_MAIN() { return 1; }
11952#endif
11953int
11954main ()
11955{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011956/* The GNU C library defines this for functions which it implements
11957 to always fail with ENOSYS. Some functions are actually named
11958 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011959#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011960choke me
11961#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011962f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011963#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011964
Martin v. Löwis11437992002-04-12 09:54:03 +000011965 ;
11966 return 0;
11967}
11968_ACEOF
11969rm -f conftest.$ac_objext conftest$ac_exeext
11970if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11971 (eval $ac_link) 2>&5
11972 ac_status=$?
11973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11974 (exit $ac_status); } &&
11975 { ac_try='test -s conftest$ac_exeext'
11976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11977 (eval $ac_try) 2>&5
11978 ac_status=$?
11979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11980 (exit $ac_status); }; }; then
11981 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011982else
Martin v. Löwis11437992002-04-12 09:54:03 +000011983 echo "$as_me: failed program was:" >&5
11984cat conftest.$ac_ext >&5
11985eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011986fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011987rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011988fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011989echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11990echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11991if test `eval echo '${'$as_ac_var'}'` = yes; then
11992 cat >>confdefs.h <<_ACEOF
11993#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11994_ACEOF
11995 cat >conftest.$ac_ext <<_ACEOF
11996#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011997#include "confdefs.h"
11998#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011999#ifdef F77_DUMMY_MAIN
12000# ifdef __cplusplus
12001 extern "C"
12002# endif
12003 int F77_DUMMY_MAIN() { return 1; }
12004#endif
12005int
12006main ()
12007{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012008setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012009 ;
12010 return 0;
12011}
12012_ACEOF
12013rm -f conftest.$ac_objext
12014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12015 (eval $ac_compile) 2>&5
12016 ac_status=$?
12017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12018 (exit $ac_status); } &&
12019 { ac_try='test -s conftest.$ac_objext'
12020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12021 (eval $ac_try) 2>&5
12022 ac_status=$?
12023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12024 (exit $ac_status); }; }; then
12025
12026cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012027#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012028_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012029
Martin v. Löwis11437992002-04-12 09:54:03 +000012030
Guido van Rossumf78abae1997-01-21 22:02:36 +000012031else
Martin v. Löwis11437992002-04-12 09:54:03 +000012032 echo "$as_me: failed program was:" >&5
12033cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012034fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012035rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012036
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012037fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012038done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012039
Martin v. Löwis11437992002-04-12 09:54:03 +000012040
Thomas Wouters3a584202000-08-05 23:28:51 +000012041for ac_func in gettimeofday
12042do
Martin v. Löwis11437992002-04-12 09:54:03 +000012043as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12044echo "$as_me:$LINENO: checking for $ac_func" >&5
12045echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12046if eval "test \"\${$as_ac_var+set}\" = set"; then
12047 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012048else
Martin v. Löwis11437992002-04-12 09:54:03 +000012049 cat >conftest.$ac_ext <<_ACEOF
12050#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012051#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012052/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012053 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012054#include <assert.h>
12055/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012056#ifdef __cplusplus
12057extern "C"
12058#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012059/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012060 builtin and then its argument prototype would still apply. */
12061char $ac_func ();
12062char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012063
Martin v. Löwis11437992002-04-12 09:54:03 +000012064#ifdef F77_DUMMY_MAIN
12065# ifdef __cplusplus
12066 extern "C"
12067# endif
12068 int F77_DUMMY_MAIN() { return 1; }
12069#endif
12070int
12071main ()
12072{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012073/* The GNU C library defines this for functions which it implements
12074 to always fail with ENOSYS. Some functions are actually named
12075 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012076#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012077choke me
12078#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012079f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012080#endif
12081
Martin v. Löwis11437992002-04-12 09:54:03 +000012082 ;
12083 return 0;
12084}
12085_ACEOF
12086rm -f conftest.$ac_objext conftest$ac_exeext
12087if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12088 (eval $ac_link) 2>&5
12089 ac_status=$?
12090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12091 (exit $ac_status); } &&
12092 { ac_try='test -s conftest$ac_exeext'
12093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12094 (eval $ac_try) 2>&5
12095 ac_status=$?
12096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12097 (exit $ac_status); }; }; then
12098 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012099else
Martin v. Löwis11437992002-04-12 09:54:03 +000012100 echo "$as_me: failed program was:" >&5
12101cat conftest.$ac_ext >&5
12102eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012103fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012104rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012105fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012106echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12107echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12108if test `eval echo '${'$as_ac_var'}'` = yes; then
12109 cat >>confdefs.h <<_ACEOF
12110#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12111_ACEOF
12112 cat >conftest.$ac_ext <<_ACEOF
12113#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012114#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012115#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012116#ifdef F77_DUMMY_MAIN
12117# ifdef __cplusplus
12118 extern "C"
12119# endif
12120 int F77_DUMMY_MAIN() { return 1; }
12121#endif
12122int
12123main ()
12124{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012125gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012126 ;
12127 return 0;
12128}
12129_ACEOF
12130rm -f conftest.$ac_objext
12131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12132 (eval $ac_compile) 2>&5
12133 ac_status=$?
12134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12135 (exit $ac_status); } &&
12136 { ac_try='test -s conftest.$ac_objext'
12137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12138 (eval $ac_try) 2>&5
12139 ac_status=$?
12140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12141 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012142 :
12143else
Martin v. Löwis11437992002-04-12 09:54:03 +000012144 echo "$as_me: failed program was:" >&5
12145cat conftest.$ac_ext >&5
12146
12147cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012148#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012149_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012150
Martin v. Löwis11437992002-04-12 09:54:03 +000012151
Guido van Rossum627b2d71993-12-24 10:39:16 +000012152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012153rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012154
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012155fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012156done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012157
Michael W. Hudson54241132001-12-07 15:38:26 +000012158
12159
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012160# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012161# for [no]getaddrinfo in netdb.h.
12162echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12163echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12164cat >conftest.$ac_ext <<_ACEOF
12165#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012166#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012167
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012168#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012169#include <sys/socket.h>
12170#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012171#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012172
Martin v. Löwis11437992002-04-12 09:54:03 +000012173#ifdef F77_DUMMY_MAIN
12174# ifdef __cplusplus
12175 extern "C"
12176# endif
12177 int F77_DUMMY_MAIN() { return 1; }
12178#endif
12179int
12180main ()
12181{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012182
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012183getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012184
Martin v. Löwis11437992002-04-12 09:54:03 +000012185 ;
12186 return 0;
12187}
12188_ACEOF
12189rm -f conftest.$ac_objext conftest$ac_exeext
12190if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12191 (eval $ac_link) 2>&5
12192 ac_status=$?
12193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12194 (exit $ac_status); } &&
12195 { ac_try='test -s conftest$ac_exeext'
12196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12197 (eval $ac_try) 2>&5
12198 ac_status=$?
12199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12200 (exit $ac_status); }; }; then
12201
12202echo "$as_me:$LINENO: result: yes" >&5
12203echo "${ECHO_T}yes" >&6
12204echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12205echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012206if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012207 echo "$as_me:$LINENO: result: buggy" >&5
12208echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012209buggygetaddrinfo=yes
12210else
Martin v. Löwis11437992002-04-12 09:54:03 +000012211 cat >conftest.$ac_ext <<_ACEOF
12212#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012213#include "confdefs.h"
12214
12215#include <sys/types.h>
12216#include <netdb.h>
12217#include <string.h>
12218#include <sys/socket.h>
12219#include <netinet/in.h>
12220
12221main()
12222{
12223 int passive, gaierr, inet4 = 0, inet6 = 0;
12224 struct addrinfo hints, *ai, *aitop;
12225 char straddr[INET6_ADDRSTRLEN], strport[16];
12226
12227 for (passive = 0; passive <= 1; passive++) {
12228 memset(&hints, 0, sizeof(hints));
12229 hints.ai_family = AF_UNSPEC;
12230 hints.ai_flags = passive ? AI_PASSIVE : 0;
12231 hints.ai_socktype = SOCK_STREAM;
12232 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12233 (void)gai_strerror(gaierr);
12234 goto bad;
12235 }
12236 for (ai = aitop; ai; ai = ai->ai_next) {
12237 if (ai->ai_addr == NULL ||
12238 ai->ai_addrlen == 0 ||
12239 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12240 straddr, sizeof(straddr), strport, sizeof(strport),
12241 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12242 goto bad;
12243 }
12244 switch (ai->ai_family) {
12245 case AF_INET:
12246 if (strcmp(strport, "54321") != 0) {
12247 goto bad;
12248 }
12249 if (passive) {
12250 if (strcmp(straddr, "0.0.0.0") != 0) {
12251 goto bad;
12252 }
12253 } else {
12254 if (strcmp(straddr, "127.0.0.1") != 0) {
12255 goto bad;
12256 }
12257 }
12258 inet4++;
12259 break;
12260 case AF_INET6:
12261 if (strcmp(strport, "54321") != 0) {
12262 goto bad;
12263 }
12264 if (passive) {
12265 if (strcmp(straddr, "::") != 0) {
12266 goto bad;
12267 }
12268 } else {
12269 if (strcmp(straddr, "::1") != 0) {
12270 goto bad;
12271 }
12272 }
12273 inet6++;
12274 break;
12275 case AF_UNSPEC:
12276 goto bad;
12277 break;
12278 default:
12279 /* another family support? */
12280 break;
12281 }
12282 }
12283 }
12284
12285 if (!(inet4 == 0 || inet4 == 2))
12286 goto bad;
12287 if (!(inet6 == 0 || inet6 == 2))
12288 goto bad;
12289
12290 if (aitop)
12291 freeaddrinfo(aitop);
12292 exit(0);
12293
12294 bad:
12295 if (aitop)
12296 freeaddrinfo(aitop);
12297 exit(1);
12298}
12299
Martin v. Löwis11437992002-04-12 09:54:03 +000012300_ACEOF
12301rm -f conftest$ac_exeext
12302if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12303 (eval $ac_link) 2>&5
12304 ac_status=$?
12305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12306 (exit $ac_status); } && { ac_try='./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 echo "$as_me:$LINENO: result: good" >&5
12313echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012314buggygetaddrinfo=no
12315else
Martin v. Löwis11437992002-04-12 09:54:03 +000012316 echo "$as_me: program exited with status $ac_status" >&5
12317echo "$as_me: failed program was:" >&5
12318cat conftest.$ac_ext >&5
12319( exit $ac_status )
12320echo "$as_me:$LINENO: result: buggy" >&5
12321echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012322buggygetaddrinfo=yes
12323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012324rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012325fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012326else
Martin v. Löwis11437992002-04-12 09:54:03 +000012327 echo "$as_me: failed program was:" >&5
12328cat conftest.$ac_ext >&5
12329
12330echo "$as_me:$LINENO: result: no" >&5
12331echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012332buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012333
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012334fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012335rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012336
12337if test "$buggygetaddrinfo" = "yes"; then
12338 if test "$ipv6" = "yes"; then
12339 echo 'Fatal: You must get working getaddrinfo() function.'
12340 echo ' or you can specify "--disable-ipv6"'.
12341 exit 1
12342 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012343else
Martin v. Löwis11437992002-04-12 09:54:03 +000012344
12345cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012346#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012347_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012348
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012349fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012350
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012351for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012352do
Martin v. Löwis11437992002-04-12 09:54:03 +000012353as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12354echo "$as_me:$LINENO: checking for $ac_func" >&5
12355echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12356if eval "test \"\${$as_ac_var+set}\" = set"; then
12357 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012358else
Martin v. Löwis11437992002-04-12 09:54:03 +000012359 cat >conftest.$ac_ext <<_ACEOF
12360#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012361#include "confdefs.h"
12362/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012363 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012364#include <assert.h>
12365/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012366#ifdef __cplusplus
12367extern "C"
12368#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012369/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 builtin and then its argument prototype would still apply. */
12371char $ac_func ();
12372char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012373
Martin v. Löwis11437992002-04-12 09:54:03 +000012374#ifdef F77_DUMMY_MAIN
12375# ifdef __cplusplus
12376 extern "C"
12377# endif
12378 int F77_DUMMY_MAIN() { return 1; }
12379#endif
12380int
12381main ()
12382{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012383/* The GNU C library defines this for functions which it implements
12384 to always fail with ENOSYS. Some functions are actually named
12385 something starting with __ and the normal name is an alias. */
12386#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12387choke me
12388#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012389f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012390#endif
12391
Martin v. Löwis11437992002-04-12 09:54:03 +000012392 ;
12393 return 0;
12394}
12395_ACEOF
12396rm -f conftest.$ac_objext conftest$ac_exeext
12397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12398 (eval $ac_link) 2>&5
12399 ac_status=$?
12400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12401 (exit $ac_status); } &&
12402 { ac_try='test -s conftest$ac_exeext'
12403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12404 (eval $ac_try) 2>&5
12405 ac_status=$?
12406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12407 (exit $ac_status); }; }; then
12408 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012409else
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 echo "$as_me: failed program was:" >&5
12411cat conftest.$ac_ext >&5
12412eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012413fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012414rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012415fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012416echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12417echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12418if test `eval echo '${'$as_ac_var'}'` = yes; then
12419 cat >>confdefs.h <<_ACEOF
12420#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12421_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012422
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012423fi
12424done
12425
Michael W. Hudson54241132001-12-07 15:38:26 +000012426
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012427# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012428echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12429echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12430if test "${ac_cv_header_time+set}" = set; then
12431 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012432else
Martin v. Löwis11437992002-04-12 09:54:03 +000012433 cat >conftest.$ac_ext <<_ACEOF
12434#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012435#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012436#include <sys/types.h>
12437#include <sys/time.h>
12438#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012439
12440#ifdef F77_DUMMY_MAIN
12441# ifdef __cplusplus
12442 extern "C"
12443# endif
12444 int F77_DUMMY_MAIN() { return 1; }
12445#endif
12446int
12447main ()
12448{
12449if ((struct tm *) 0)
12450return 0;
12451 ;
12452 return 0;
12453}
12454_ACEOF
12455rm -f conftest.$ac_objext
12456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12457 (eval $ac_compile) 2>&5
12458 ac_status=$?
12459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12460 (exit $ac_status); } &&
12461 { ac_try='test -s conftest.$ac_objext'
12462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12463 (eval $ac_try) 2>&5
12464 ac_status=$?
12465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12466 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012467 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012468else
Martin v. Löwis11437992002-04-12 09:54:03 +000012469 echo "$as_me: failed program was:" >&5
12470cat conftest.$ac_ext >&5
12471ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012472fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012473rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012474fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012475echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12476echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012477if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
12479cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012480#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012481_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012482
12483fi
12484
Martin v. Löwis11437992002-04-12 09:54:03 +000012485echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12486echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12487if test "${ac_cv_struct_tm+set}" = set; then
12488 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012489else
Martin v. Löwis11437992002-04-12 09:54:03 +000012490 cat >conftest.$ac_ext <<_ACEOF
12491#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012492#include "confdefs.h"
12493#include <sys/types.h>
12494#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012495
12496#ifdef F77_DUMMY_MAIN
12497# ifdef __cplusplus
12498 extern "C"
12499# endif
12500 int F77_DUMMY_MAIN() { return 1; }
12501#endif
12502int
12503main ()
12504{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012505struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012506 ;
12507 return 0;
12508}
12509_ACEOF
12510rm -f conftest.$ac_objext
12511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12512 (eval $ac_compile) 2>&5
12513 ac_status=$?
12514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12515 (exit $ac_status); } &&
12516 { ac_try='test -s conftest.$ac_objext'
12517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12518 (eval $ac_try) 2>&5
12519 ac_status=$?
12520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12521 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012522 ac_cv_struct_tm=time.h
12523else
Martin v. Löwis11437992002-04-12 09:54:03 +000012524 echo "$as_me: failed program was:" >&5
12525cat conftest.$ac_ext >&5
12526ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012527fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012528rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012529fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012530echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12531echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012532if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012533
12534cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012535#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012536_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012537
12538fi
12539
Martin v. Löwis11437992002-04-12 09:54:03 +000012540echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12541echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12542if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12543 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012544else
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 cat >conftest.$ac_ext <<_ACEOF
12546#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012547#include "confdefs.h"
12548#include <sys/types.h>
12549#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012550
12551
12552#ifdef F77_DUMMY_MAIN
12553# ifdef __cplusplus
12554 extern "C"
12555# endif
12556 int F77_DUMMY_MAIN() { return 1; }
12557#endif
12558int
12559main ()
12560{
12561static struct tm ac_aggr;
12562if (ac_aggr.tm_zone)
12563return 0;
12564 ;
12565 return 0;
12566}
12567_ACEOF
12568rm -f conftest.$ac_objext
12569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12570 (eval $ac_compile) 2>&5
12571 ac_status=$?
12572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12573 (exit $ac_status); } &&
12574 { ac_try='test -s conftest.$ac_objext'
12575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12576 (eval $ac_try) 2>&5
12577 ac_status=$?
12578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12579 (exit $ac_status); }; }; then
12580 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012581else
Martin v. Löwis11437992002-04-12 09:54:03 +000012582 echo "$as_me: failed program was:" >&5
12583cat conftest.$ac_ext >&5
12584ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012585fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012586rm -f conftest.$ac_objext conftest.$ac_ext
12587fi
12588echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12589echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12590if test $ac_cv_member_struct_tm_tm_zone = yes; then
12591
12592cat >>confdefs.h <<_ACEOF
12593#define HAVE_STRUCT_TM_TM_ZONE 1
12594_ACEOF
12595
12596
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012597fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012598
Martin v. Löwis11437992002-04-12 09:54:03 +000012599if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12600
12601cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012602#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012603_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012604
12605else
Martin v. Löwis11437992002-04-12 09:54:03 +000012606 echo "$as_me:$LINENO: checking for tzname" >&5
12607echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12608if test "${ac_cv_var_tzname+set}" = set; then
12609 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012610else
Martin v. Löwis11437992002-04-12 09:54:03 +000012611 cat >conftest.$ac_ext <<_ACEOF
12612#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012613#include "confdefs.h"
12614#include <time.h>
12615#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012616extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012618
12619#ifdef F77_DUMMY_MAIN
12620# ifdef __cplusplus
12621 extern "C"
12622# endif
12623 int F77_DUMMY_MAIN() { return 1; }
12624#endif
12625int
12626main ()
12627{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012628atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012629 ;
12630 return 0;
12631}
12632_ACEOF
12633rm -f conftest.$ac_objext conftest$ac_exeext
12634if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12635 (eval $ac_link) 2>&5
12636 ac_status=$?
12637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12638 (exit $ac_status); } &&
12639 { ac_try='test -s conftest$ac_exeext'
12640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12641 (eval $ac_try) 2>&5
12642 ac_status=$?
12643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12644 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012645 ac_cv_var_tzname=yes
12646else
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 echo "$as_me: failed program was:" >&5
12648cat conftest.$ac_ext >&5
12649ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012650fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012651rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012652fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012653echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12654echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012655 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012656
12657cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012658#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012659_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012660
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012661 fi
12662fi
12663
Jack Jansendd19cf82001-12-06 22:36:17 +000012664
Martin v. Löwis11437992002-04-12 09:54:03 +000012665echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12666echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12667if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12668 echo $ECHO_N "(cached) $ECHO_C" >&6
12669else
12670 cat >conftest.$ac_ext <<_ACEOF
12671#line $LINENO "configure"
12672#include "confdefs.h"
12673$ac_includes_default
12674#ifdef F77_DUMMY_MAIN
12675# ifdef __cplusplus
12676 extern "C"
12677# endif
12678 int F77_DUMMY_MAIN() { return 1; }
12679#endif
12680int
12681main ()
12682{
12683static struct stat ac_aggr;
12684if (ac_aggr.st_rdev)
12685return 0;
12686 ;
12687 return 0;
12688}
12689_ACEOF
12690rm -f conftest.$ac_objext
12691if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12692 (eval $ac_compile) 2>&5
12693 ac_status=$?
12694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12695 (exit $ac_status); } &&
12696 { ac_try='test -s conftest.$ac_objext'
12697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12698 (eval $ac_try) 2>&5
12699 ac_status=$?
12700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12701 (exit $ac_status); }; }; then
12702 ac_cv_member_struct_stat_st_rdev=yes
12703else
12704 echo "$as_me: failed program was:" >&5
12705cat conftest.$ac_ext >&5
12706ac_cv_member_struct_stat_st_rdev=no
12707fi
12708rm -f conftest.$ac_objext conftest.$ac_ext
12709fi
12710echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12711echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12712if test $ac_cv_member_struct_stat_st_rdev = yes; then
12713
12714cat >>confdefs.h <<_ACEOF
12715#define HAVE_STRUCT_STAT_ST_RDEV 1
12716_ACEOF
12717
12718
12719cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012720#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012721_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012722
12723fi
12724
Martin v. Löwis11437992002-04-12 09:54:03 +000012725
12726
12727echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12728echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12729if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12730 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012731else
Martin v. Löwis11437992002-04-12 09:54:03 +000012732 cat >conftest.$ac_ext <<_ACEOF
12733#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012734#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012735$ac_includes_default
12736#ifdef F77_DUMMY_MAIN
12737# ifdef __cplusplus
12738 extern "C"
12739# endif
12740 int F77_DUMMY_MAIN() { return 1; }
12741#endif
12742int
12743main ()
12744{
12745static struct stat ac_aggr;
12746if (ac_aggr.st_blksize)
12747return 0;
12748 ;
12749 return 0;
12750}
12751_ACEOF
12752rm -f conftest.$ac_objext
12753if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12754 (eval $ac_compile) 2>&5
12755 ac_status=$?
12756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12757 (exit $ac_status); } &&
12758 { ac_try='test -s conftest.$ac_objext'
12759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12760 (eval $ac_try) 2>&5
12761 ac_status=$?
12762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12763 (exit $ac_status); }; }; then
12764 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012765else
Martin v. Löwis11437992002-04-12 09:54:03 +000012766 echo "$as_me: failed program was:" >&5
12767cat conftest.$ac_ext >&5
12768ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012769fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012770rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012771fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012772echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12773echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12774if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012775
Martin v. Löwis11437992002-04-12 09:54:03 +000012776cat >>confdefs.h <<_ACEOF
12777#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12778_ACEOF
12779
12780
12781cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012782#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012783_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012784
12785fi
12786
Martin v. Löwis11437992002-04-12 09:54:03 +000012787
12788echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12789echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12790if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12791 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012792else
Martin v. Löwis11437992002-04-12 09:54:03 +000012793 cat >conftest.$ac_ext <<_ACEOF
12794#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012795#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012796$ac_includes_default
12797#ifdef F77_DUMMY_MAIN
12798# ifdef __cplusplus
12799 extern "C"
12800# endif
12801 int F77_DUMMY_MAIN() { return 1; }
12802#endif
12803int
12804main ()
12805{
12806static struct stat ac_aggr;
12807if (ac_aggr.st_blocks)
12808return 0;
12809 ;
12810 return 0;
12811}
12812_ACEOF
12813rm -f conftest.$ac_objext
12814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12815 (eval $ac_compile) 2>&5
12816 ac_status=$?
12817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12818 (exit $ac_status); } &&
12819 { ac_try='test -s conftest.$ac_objext'
12820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12821 (eval $ac_try) 2>&5
12822 ac_status=$?
12823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12824 (exit $ac_status); }; }; then
12825 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012826else
Martin v. Löwis11437992002-04-12 09:54:03 +000012827 echo "$as_me: failed program was:" >&5
12828cat conftest.$ac_ext >&5
12829ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012830fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012831rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012833echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12834echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12835if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012836
Martin v. Löwis11437992002-04-12 09:54:03 +000012837cat >>confdefs.h <<_ACEOF
12838#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12839_ACEOF
12840
12841
12842cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012843#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012844_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012845
12846else
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012848fi
12849
Michael W. Hudson54241132001-12-07 15:38:26 +000012850
Martin v. Löwis11437992002-04-12 09:54:03 +000012851
12852echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12853echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12854if test "${ac_cv_header_time_altzone+set}" = set; then
12855 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012856else
Martin v. Löwis11437992002-04-12 09:54:03 +000012857 cat >conftest.$ac_ext <<_ACEOF
12858#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012859#include "confdefs.h"
12860#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012861#ifdef F77_DUMMY_MAIN
12862# ifdef __cplusplus
12863 extern "C"
12864# endif
12865 int F77_DUMMY_MAIN() { return 1; }
12866#endif
12867int
12868main ()
12869{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012870return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012871 ;
12872 return 0;
12873}
12874_ACEOF
12875rm -f conftest.$ac_objext
12876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12877 (eval $ac_compile) 2>&5
12878 ac_status=$?
12879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12880 (exit $ac_status); } &&
12881 { ac_try='test -s conftest.$ac_objext'
12882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12883 (eval $ac_try) 2>&5
12884 ac_status=$?
12885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12886 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012887 ac_cv_header_time_altzone=yes
12888else
Martin v. Löwis11437992002-04-12 09:54:03 +000012889 echo "$as_me: failed program was:" >&5
12890cat conftest.$ac_ext >&5
12891ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012892fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012893rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012894fi
12895
Martin v. Löwis11437992002-04-12 09:54:03 +000012896echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
12897echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012898if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
12900cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012901#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012902_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012903
12904fi
12905
Guido van Rossumda88dad1995-01-26 00:46:29 +000012906was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012907echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
12908echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
12909cat >conftest.$ac_ext <<_ACEOF
12910#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012911#include "confdefs.h"
12912
12913#include <sys/types.h>
12914#include <sys/select.h>
12915#include <sys/time.h>
12916
Martin v. Löwis11437992002-04-12 09:54:03 +000012917#ifdef F77_DUMMY_MAIN
12918# ifdef __cplusplus
12919 extern "C"
12920# endif
12921 int F77_DUMMY_MAIN() { return 1; }
12922#endif
12923int
12924main ()
12925{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012926;
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 ;
12928 return 0;
12929}
12930_ACEOF
12931rm -f conftest.$ac_objext
12932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12933 (eval $ac_compile) 2>&5
12934 ac_status=$?
12935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12936 (exit $ac_status); } &&
12937 { ac_try='test -s conftest.$ac_objext'
12938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12939 (eval $ac_try) 2>&5
12940 ac_status=$?
12941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12942 (exit $ac_status); }; }; then
12943
12944
12945cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012946#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012947_ACEOF
12948
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012949 was_it_defined=yes
12950
Guido van Rossumf78abae1997-01-21 22:02:36 +000012951else
Martin v. Löwis11437992002-04-12 09:54:03 +000012952 echo "$as_me: failed program was:" >&5
12953cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012954fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012955rm -f conftest.$ac_objext conftest.$ac_ext
12956echo "$as_me:$LINENO: result: $was_it_defined" >&5
12957echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000012958
Martin v. Löwis11437992002-04-12 09:54:03 +000012959echo "$as_me:$LINENO: checking for addrinfo" >&5
12960echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
12961if test "${ac_cv_struct_addrinfo+set}" = set; then
12962 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012963else
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 cat >conftest.$ac_ext <<_ACEOF
12965#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012966#include "confdefs.h"
12967
12968# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012969#ifdef F77_DUMMY_MAIN
12970# ifdef __cplusplus
12971 extern "C"
12972# endif
12973 int F77_DUMMY_MAIN() { return 1; }
12974#endif
12975int
12976main ()
12977{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012978struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012979 ;
12980 return 0;
12981}
12982_ACEOF
12983rm -f conftest.$ac_objext
12984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12985 (eval $ac_compile) 2>&5
12986 ac_status=$?
12987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12988 (exit $ac_status); } &&
12989 { ac_try='test -s conftest.$ac_objext'
12990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12991 (eval $ac_try) 2>&5
12992 ac_status=$?
12993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12994 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012995 ac_cv_struct_addrinfo=yes
12996else
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 echo "$as_me: failed program was:" >&5
12998cat conftest.$ac_ext >&5
12999ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013000fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013001rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013002fi
13003
Martin v. Löwis11437992002-04-12 09:54:03 +000013004echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13005echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013006if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013007
13008cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013009#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013010_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013011
13012fi
13013
Martin v. Löwis11437992002-04-12 09:54:03 +000013014echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13015echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13016if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13017 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013018else
Martin v. Löwis11437992002-04-12 09:54:03 +000013019 cat >conftest.$ac_ext <<_ACEOF
13020#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013021#include "confdefs.h"
13022
13023# include <sys/types.h>
13024# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013025#ifdef F77_DUMMY_MAIN
13026# ifdef __cplusplus
13027 extern "C"
13028# endif
13029 int F77_DUMMY_MAIN() { return 1; }
13030#endif
13031int
13032main ()
13033{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013034struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013035 ;
13036 return 0;
13037}
13038_ACEOF
13039rm -f conftest.$ac_objext
13040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13041 (eval $ac_compile) 2>&5
13042 ac_status=$?
13043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13044 (exit $ac_status); } &&
13045 { ac_try='test -s conftest.$ac_objext'
13046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13047 (eval $ac_try) 2>&5
13048 ac_status=$?
13049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13050 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013051 ac_cv_struct_sockaddr_storage=yes
13052else
Martin v. Löwis11437992002-04-12 09:54:03 +000013053 echo "$as_me: failed program was:" >&5
13054cat conftest.$ac_ext >&5
13055ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013056fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013057rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013058fi
13059
Martin v. Löwis11437992002-04-12 09:54:03 +000013060echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13061echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013062if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013063
13064cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013065#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013066_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013067
13068fi
13069
Guido van Rossum627b2d71993-12-24 10:39:16 +000013070# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013071
Michael W. Hudson54241132001-12-07 15:38:26 +000013072
Martin v. Löwis11437992002-04-12 09:54:03 +000013073echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13074echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13075if test "${ac_cv_c_char_unsigned+set}" = set; then
13076 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013077else
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 cat >conftest.$ac_ext <<_ACEOF
13079#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013080#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013081$ac_includes_default
13082#ifdef F77_DUMMY_MAIN
13083# ifdef __cplusplus
13084 extern "C"
13085# endif
13086 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013088int
13089main ()
13090{
13091static int test_array [1 - 2 * !(((char) -1) < 0)];
13092test_array [0] = 0
13093
13094 ;
13095 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013096}
Martin v. Löwis11437992002-04-12 09:54:03 +000013097_ACEOF
13098rm -f conftest.$ac_objext
13099if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13100 (eval $ac_compile) 2>&5
13101 ac_status=$?
13102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13103 (exit $ac_status); } &&
13104 { ac_try='test -s conftest.$ac_objext'
13105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13106 (eval $ac_try) 2>&5
13107 ac_status=$?
13108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13109 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013110 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013111else
13112 echo "$as_me: failed program was:" >&5
13113cat conftest.$ac_ext >&5
13114ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013115fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013116rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013118echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13119echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013120if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013122#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013123_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013124
13125fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013126
Martin v. Löwis11437992002-04-12 09:54:03 +000013127echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13128echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13129if test "${ac_cv_prog_cc_stdc+set}" = set; then
13130 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013131else
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 ac_cv_prog_cc_stdc=no
13133ac_save_CC=$CC
13134cat >conftest.$ac_ext <<_ACEOF
13135#line $LINENO "configure"
13136#include "confdefs.h"
13137#include <stdarg.h>
13138#include <stdio.h>
13139#include <sys/types.h>
13140#include <sys/stat.h>
13141/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13142struct buf { int x; };
13143FILE * (*rcsopen) (struct buf *, struct stat *, int);
13144static char *e (p, i)
13145 char **p;
13146 int i;
13147{
13148 return p[i];
13149}
13150static char *f (char * (*g) (char **, int), char **p, ...)
13151{
13152 char *s;
13153 va_list v;
13154 va_start (v,p);
13155 s = g (p, va_arg (v,int));
13156 va_end (v);
13157 return s;
13158}
13159int test (int i, double x);
13160struct s1 {int (*f) (int a);};
13161struct s2 {int (*f) (double a);};
13162int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13163int argc;
13164char **argv;
13165#ifdef F77_DUMMY_MAIN
13166# ifdef __cplusplus
13167 extern "C"
13168# endif
13169 int F77_DUMMY_MAIN() { return 1; }
13170#endif
13171int
13172main ()
13173{
13174return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13175 ;
13176 return 0;
13177}
13178_ACEOF
13179# Don't try gcc -ansi; that turns off useful extensions and
13180# breaks some systems' header files.
13181# AIX -qlanglvl=ansi
13182# Ultrix and OSF/1 -std1
13183# HP-UX 10.20 and later -Ae
13184# HP-UX older versions -Aa -D_HPUX_SOURCE
13185# SVR4 -Xc -D__EXTENSIONS__
13186for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13187do
13188 CC="$ac_save_CC $ac_arg"
13189 rm -f conftest.$ac_objext
13190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13191 (eval $ac_compile) 2>&5
13192 ac_status=$?
13193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13194 (exit $ac_status); } &&
13195 { ac_try='test -s conftest.$ac_objext'
13196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13197 (eval $ac_try) 2>&5
13198 ac_status=$?
13199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13200 (exit $ac_status); }; }; then
13201 ac_cv_prog_cc_stdc=$ac_arg
13202break
13203else
13204 echo "$as_me: failed program was:" >&5
13205cat conftest.$ac_ext >&5
13206fi
13207rm -f conftest.$ac_objext
13208done
13209rm -f conftest.$ac_ext conftest.$ac_objext
13210CC=$ac_save_CC
13211
13212fi
13213
13214case "x$ac_cv_prog_cc_stdc" in
13215 x|xno)
13216 echo "$as_me:$LINENO: result: none needed" >&5
13217echo "${ECHO_T}none needed" >&6 ;;
13218 *)
13219 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13220echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13221 CC="$CC $ac_cv_prog_cc_stdc" ;;
13222esac
13223
13224echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13225echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13226if test "${ac_cv_c_const+set}" = set; then
13227 echo $ECHO_N "(cached) $ECHO_C" >&6
13228else
13229 cat >conftest.$ac_ext <<_ACEOF
13230#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013231#include "confdefs.h"
13232
Martin v. Löwis11437992002-04-12 09:54:03 +000013233#ifdef F77_DUMMY_MAIN
13234# ifdef __cplusplus
13235 extern "C"
13236# endif
13237 int F77_DUMMY_MAIN() { return 1; }
13238#endif
13239int
13240main ()
13241{
13242/* FIXME: Include the comments suggested by Paul. */
13243#ifndef __cplusplus
13244 /* Ultrix mips cc rejects this. */
13245 typedef int charset[2];
13246 const charset x;
13247 /* SunOS 4.1.1 cc rejects this. */
13248 char const *const *ccp;
13249 char **p;
13250 /* NEC SVR4.0.2 mips cc rejects this. */
13251 struct point {int x, y;};
13252 static struct point const zero = {0,0};
13253 /* AIX XL C 1.02.0.0 rejects this.
13254 It does not let you subtract one const X* pointer from another in
13255 an arm of an if-expression whose if-part is not a constant
13256 expression */
13257 const char *g = "string";
13258 ccp = &g + (g ? g-g : 0);
13259 /* HPUX 7.0 cc rejects these. */
13260 ++ccp;
13261 p = (char**) ccp;
13262 ccp = (char const *const *) p;
13263 { /* SCO 3.2v4 cc rejects this. */
13264 char *t;
13265 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013266
Martin v. Löwis11437992002-04-12 09:54:03 +000013267 *t++ = 0;
13268 }
13269 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13270 int x[] = {25, 17};
13271 const int *foo = &x[0];
13272 ++foo;
13273 }
13274 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13275 typedef const int *iptr;
13276 iptr p = 0;
13277 ++p;
13278 }
13279 { /* AIX XL C 1.02.0.0 rejects this saying
13280 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13281 struct s { int j; const int *ap[3]; };
13282 struct s *b; b->j = 5;
13283 }
13284 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13285 const int foo = 10;
13286 }
13287#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 ;
13290 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013291}
Martin v. Löwis11437992002-04-12 09:54:03 +000013292_ACEOF
13293rm -f conftest.$ac_objext
13294if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13295 (eval $ac_compile) 2>&5
13296 ac_status=$?
13297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13298 (exit $ac_status); } &&
13299 { ac_try='test -s conftest.$ac_objext'
13300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13301 (eval $ac_try) 2>&5
13302 ac_status=$?
13303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13304 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305 ac_cv_c_const=yes
13306else
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 echo "$as_me: failed program was:" >&5
13308cat conftest.$ac_ext >&5
13309ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013310fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013311rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013312fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013313echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13314echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013315if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013316
13317cat >>confdefs.h <<\_ACEOF
13318#define const
13319_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013320
13321fi
13322
Michael W. Hudson54241132001-12-07 15:38:26 +000013323
Guido van Rossumda88dad1995-01-26 00:46:29 +000013324works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013325echo "$as_me:$LINENO: checking for working volatile" >&5
13326echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13327cat >conftest.$ac_ext <<_ACEOF
13328#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013329#include "confdefs.h"
13330
Martin v. Löwis11437992002-04-12 09:54:03 +000013331#ifdef F77_DUMMY_MAIN
13332# ifdef __cplusplus
13333 extern "C"
13334# endif
13335 int F77_DUMMY_MAIN() { return 1; }
13336#endif
13337int
13338main ()
13339{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013341 ;
13342 return 0;
13343}
13344_ACEOF
13345rm -f conftest.$ac_objext
13346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13347 (eval $ac_compile) 2>&5
13348 ac_status=$?
13349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13350 (exit $ac_status); } &&
13351 { ac_try='test -s conftest.$ac_objext'
13352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13353 (eval $ac_try) 2>&5
13354 ac_status=$?
13355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13356 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013357 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013358else
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 echo "$as_me: failed program was:" >&5
13360cat conftest.$ac_ext >&5
13361
13362cat >>confdefs.h <<\_ACEOF
13363#define volatile
13364_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013365
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013366
Guido van Rossum627b2d71993-12-24 10:39:16 +000013367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013368rm -f conftest.$ac_objext conftest.$ac_ext
13369echo "$as_me:$LINENO: result: $works" >&5
13370echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013371
Guido van Rossumda88dad1995-01-26 00:46:29 +000013372works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013373echo "$as_me:$LINENO: checking for working signed char" >&5
13374echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13375cat >conftest.$ac_ext <<_ACEOF
13376#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013377#include "confdefs.h"
13378
Martin v. Löwis11437992002-04-12 09:54:03 +000013379#ifdef F77_DUMMY_MAIN
13380# ifdef __cplusplus
13381 extern "C"
13382# endif
13383 int F77_DUMMY_MAIN() { return 1; }
13384#endif
13385int
13386main ()
13387{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013388signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 ;
13390 return 0;
13391}
13392_ACEOF
13393rm -f conftest.$ac_objext
13394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13395 (eval $ac_compile) 2>&5
13396 ac_status=$?
13397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13398 (exit $ac_status); } &&
13399 { ac_try='test -s conftest.$ac_objext'
13400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13401 (eval $ac_try) 2>&5
13402 ac_status=$?
13403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13404 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013405 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013406else
Martin v. Löwis11437992002-04-12 09:54:03 +000013407 echo "$as_me: failed program was:" >&5
13408cat conftest.$ac_ext >&5
13409
13410cat >>confdefs.h <<\_ACEOF
13411#define signed
13412_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013413
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013414
Guido van Rossum7f43da71994-08-01 12:15:30 +000013415fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013416rm -f conftest.$ac_objext conftest.$ac_ext
13417echo "$as_me:$LINENO: result: $works" >&5
13418echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013419
Guido van Rossumda88dad1995-01-26 00:46:29 +000013420have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013421echo "$as_me:$LINENO: checking for prototypes" >&5
13422echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13423cat >conftest.$ac_ext <<_ACEOF
13424#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013425#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013426int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013427#ifdef F77_DUMMY_MAIN
13428# ifdef __cplusplus
13429 extern "C"
13430# endif
13431 int F77_DUMMY_MAIN() { return 1; }
13432#endif
13433int
13434main ()
13435{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013436return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 ;
13438 return 0;
13439}
13440_ACEOF
13441rm -f conftest.$ac_objext
13442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13443 (eval $ac_compile) 2>&5
13444 ac_status=$?
13445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13446 (exit $ac_status); } &&
13447 { ac_try='test -s conftest.$ac_objext'
13448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13449 (eval $ac_try) 2>&5
13450 ac_status=$?
13451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13452 (exit $ac_status); }; }; then
13453
13454
13455cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013456#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013457_ACEOF
13458
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013459 have_prototypes=yes
13460
Guido van Rossumf78abae1997-01-21 22:02:36 +000013461else
Martin v. Löwis11437992002-04-12 09:54:03 +000013462 echo "$as_me: failed program was:" >&5
13463cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013464fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013465rm -f conftest.$ac_objext conftest.$ac_ext
13466echo "$as_me:$LINENO: result: $have_prototypes" >&5
13467echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013468
Guido van Rossumda88dad1995-01-26 00:46:29 +000013469works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013470echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13471echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13472cat >conftest.$ac_ext <<_ACEOF
13473#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013474#include "confdefs.h"
13475
13476#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013477int foo(int x, ...) {
13478 va_list va;
13479 va_start(va, x);
13480 va_arg(va, int);
13481 va_arg(va, char *);
13482 va_arg(va, double);
13483 return 0;
13484}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013485
Martin v. Löwis11437992002-04-12 09:54:03 +000013486#ifdef F77_DUMMY_MAIN
13487# ifdef __cplusplus
13488 extern "C"
13489# endif
13490 int F77_DUMMY_MAIN() { return 1; }
13491#endif
13492int
13493main ()
13494{
Guido van Rossum90eea071996-08-30 20:58:57 +000013495return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013496 ;
13497 return 0;
13498}
13499_ACEOF
13500rm -f conftest.$ac_objext
13501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13502 (eval $ac_compile) 2>&5
13503 ac_status=$?
13504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13505 (exit $ac_status); } &&
13506 { ac_try='test -s conftest.$ac_objext'
13507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13508 (eval $ac_try) 2>&5
13509 ac_status=$?
13510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13511 (exit $ac_status); }; }; then
13512
13513
13514cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013515#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013516_ACEOF
13517
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013518 works=yes
13519
Guido van Rossumf78abae1997-01-21 22:02:36 +000013520else
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 echo "$as_me: failed program was:" >&5
13522cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013523fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013524rm -f conftest.$ac_objext conftest.$ac_ext
13525echo "$as_me:$LINENO: result: $works" >&5
13526echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013527
Guido van Rossumda88dad1995-01-26 00:46:29 +000013528if test "$have_prototypes" = yes; then
13529bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013530echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13531echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13532cat >conftest.$ac_ext <<_ACEOF
13533#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013534#include "confdefs.h"
13535#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013536#ifdef F77_DUMMY_MAIN
13537# ifdef __cplusplus
13538 extern "C"
13539# endif
13540 int F77_DUMMY_MAIN() { return 1; }
13541#endif
13542int
13543main ()
13544{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013545char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013546 ;
13547 return 0;
13548}
13549_ACEOF
13550rm -f conftest.$ac_objext
13551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13552 (eval $ac_compile) 2>&5
13553 ac_status=$?
13554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13555 (exit $ac_status); } &&
13556 { ac_try='test -s conftest.$ac_objext'
13557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13558 (eval $ac_try) 2>&5
13559 ac_status=$?
13560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13561 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013562 :
13563else
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 echo "$as_me: failed program was:" >&5
13565cat conftest.$ac_ext >&5
13566
13567cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013568#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013569_ACEOF
13570
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013571 bad_prototypes=yes
13572
Guido van Rossum627b2d71993-12-24 10:39:16 +000013573fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013574rm -f conftest.$ac_objext conftest.$ac_ext
13575echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13576echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013577fi
13578
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013579# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013580echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13581echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13582cat >conftest.$ac_ext <<_ACEOF
13583#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013584#include "confdefs.h"
13585#include <sys/types.h>
13586#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013587#ifdef F77_DUMMY_MAIN
13588# ifdef __cplusplus
13589 extern "C"
13590# endif
13591 int F77_DUMMY_MAIN() { return 1; }
13592#endif
13593int
13594main ()
13595{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013596struct sockaddr x;
13597x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013598 ;
13599 return 0;
13600}
13601_ACEOF
13602rm -f conftest.$ac_objext
13603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13604 (eval $ac_compile) 2>&5
13605 ac_status=$?
13606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13607 (exit $ac_status); } &&
13608 { ac_try='test -s conftest.$ac_objext'
13609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13610 (eval $ac_try) 2>&5
13611 ac_status=$?
13612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13613 (exit $ac_status); }; }; then
13614 echo "$as_me:$LINENO: result: yes" >&5
13615echo "${ECHO_T}yes" >&6
13616
13617cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013618#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013619_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013620
13621else
Martin v. Löwis11437992002-04-12 09:54:03 +000013622 echo "$as_me: failed program was:" >&5
13623cat conftest.$ac_ext >&5
13624echo "$as_me:$LINENO: result: no" >&5
13625echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013626fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013627rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013628
Martin v. Löwis11437992002-04-12 09:54:03 +000013629echo "$as_me:$LINENO: checking for bad static forward" >&5
13630echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13631if test "${ac_cv_bad_static_forward+set}" = set; then
13632 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013633else
13634 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013635 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013636else
Martin v. Löwis11437992002-04-12 09:54:03 +000013637 cat >conftest.$ac_ext <<_ACEOF
13638#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013639#include "confdefs.h"
13640
13641struct s { int a; int b; };
13642static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013643int foobar() {
13644 static int random;
13645 random = (int) &foo;
13646 return random;
13647}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013648static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013649main() {
13650 exit(!((int)&foo == foobar()));
13651}
Martin v. Löwis11437992002-04-12 09:54:03 +000013652_ACEOF
13653rm -f conftest$ac_exeext
13654if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13655 (eval $ac_link) 2>&5
13656 ac_status=$?
13657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13658 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13660 (eval $ac_try) 2>&5
13661 ac_status=$?
13662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13663 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013664 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013665else
Martin v. Löwis11437992002-04-12 09:54:03 +000013666 echo "$as_me: program exited with status $ac_status" >&5
13667echo "$as_me: failed program was:" >&5
13668cat conftest.$ac_ext >&5
13669( exit $ac_status )
13670ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013671fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013672rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13673fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013674fi
13675
Martin v. Löwis11437992002-04-12 09:54:03 +000013676echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13677echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013678if test "$ac_cv_bad_static_forward" = yes
13679then
Martin v. Löwis11437992002-04-12 09:54:03 +000013680
13681cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013682#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013683_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013684
13685fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013686
Guido van Rossumda88dad1995-01-26 00:46:29 +000013687va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013688echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13689echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13690cat >conftest.$ac_ext <<_ACEOF
13691#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013692#include "confdefs.h"
13693
13694#ifdef HAVE_STDARG_PROTOTYPES
13695#include <stdarg.h>
13696#else
13697#include <varargs.h>
13698#endif
13699
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 Rossum76be6ed1995-01-02 18:33:54 +000013709va_list list1, list2; list1 = list2;
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
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013726 :
13727else
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 echo "$as_me: failed program was:" >&5
13729cat conftest.$ac_ext >&5
13730
13731
13732cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013733#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013734_ACEOF
13735
Guido van Rossumda88dad1995-01-26 00:46:29 +000013736 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013737
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013738fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013739rm -f conftest.$ac_objext conftest.$ac_ext
13740echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13741echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013742
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013743# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013744
13745
13746
13747echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13748echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13749if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13750 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013751else
Martin v. Löwis11437992002-04-12 09:54:03 +000013752 cat >conftest.$ac_ext <<_ACEOF
13753#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013754#include "confdefs.h"
13755/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013757#include <assert.h>
13758/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013759#ifdef __cplusplus
13760extern "C"
13761#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013762/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 builtin and then its argument prototype would still apply. */
13764char gethostbyname_r ();
13765char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013766
Martin v. Löwis11437992002-04-12 09:54:03 +000013767#ifdef F77_DUMMY_MAIN
13768# ifdef __cplusplus
13769 extern "C"
13770# endif
13771 int F77_DUMMY_MAIN() { return 1; }
13772#endif
13773int
13774main ()
13775{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013776/* The GNU C library defines this for functions which it implements
13777 to always fail with ENOSYS. Some functions are actually named
13778 something starting with __ and the normal name is an alias. */
13779#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13780choke me
13781#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013782f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013783#endif
13784
Martin v. Löwis11437992002-04-12 09:54:03 +000013785 ;
13786 return 0;
13787}
13788_ACEOF
13789rm -f conftest.$ac_objext conftest$ac_exeext
13790if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13791 (eval $ac_link) 2>&5
13792 ac_status=$?
13793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13794 (exit $ac_status); } &&
13795 { ac_try='test -s conftest$ac_exeext'
13796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13797 (eval $ac_try) 2>&5
13798 ac_status=$?
13799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13800 (exit $ac_status); }; }; then
13801 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013802else
Martin v. Löwis11437992002-04-12 09:54:03 +000013803 echo "$as_me: failed program was:" >&5
13804cat conftest.$ac_ext >&5
13805ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013806fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013807rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013808fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013809echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13810echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13811if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013812
Martin v. Löwis11437992002-04-12 09:54:03 +000013813 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013814#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013815_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013816
Martin v. Löwis11437992002-04-12 09:54:03 +000013817 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13818echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013819 OLD_CFLAGS=$CFLAGS
13820 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 cat >conftest.$ac_ext <<_ACEOF
13822#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013823#include "confdefs.h"
13824
13825# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013826
13827#ifdef F77_DUMMY_MAIN
13828# ifdef __cplusplus
13829 extern "C"
13830# endif
13831 int F77_DUMMY_MAIN() { return 1; }
13832#endif
13833int
13834main ()
13835{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013836
13837 char *name;
13838 struct hostent *he, *res;
13839 char buffer[2048];
13840 int buflen = 2048;
13841 int h_errnop;
13842
13843 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013844
13845 ;
13846 return 0;
13847}
13848_ACEOF
13849rm -f conftest.$ac_objext
13850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13851 (eval $ac_compile) 2>&5
13852 ac_status=$?
13853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13854 (exit $ac_status); } &&
13855 { ac_try='test -s conftest.$ac_objext'
13856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13857 (eval $ac_try) 2>&5
13858 ac_status=$?
13859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13860 (exit $ac_status); }; }; then
13861
13862 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013863#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013864_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013865
Martin v. Löwis11437992002-04-12 09:54:03 +000013866
13867cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013868#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013869_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013870
Martin v. Löwis11437992002-04-12 09:54:03 +000013871 echo "$as_me:$LINENO: result: yes" >&5
13872echo "${ECHO_T}yes" >&6
13873
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013874else
Martin v. Löwis11437992002-04-12 09:54:03 +000013875 echo "$as_me: failed program was:" >&5
13876cat conftest.$ac_ext >&5
13877
13878 echo "$as_me:$LINENO: result: no" >&5
13879echo "${ECHO_T}no" >&6
13880 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13881echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13882 cat >conftest.$ac_ext <<_ACEOF
13883#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013884#include "confdefs.h"
13885
13886# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013887
13888#ifdef F77_DUMMY_MAIN
13889# ifdef __cplusplus
13890 extern "C"
13891# endif
13892 int F77_DUMMY_MAIN() { return 1; }
13893#endif
13894int
13895main ()
13896{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013897
13898 char *name;
13899 struct hostent *he;
13900 char buffer[2048];
13901 int buflen = 2048;
13902 int h_errnop;
13903
13904 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013905
13906 ;
13907 return 0;
13908}
13909_ACEOF
13910rm -f conftest.$ac_objext
13911if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13912 (eval $ac_compile) 2>&5
13913 ac_status=$?
13914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13915 (exit $ac_status); } &&
13916 { ac_try='test -s conftest.$ac_objext'
13917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13918 (eval $ac_try) 2>&5
13919 ac_status=$?
13920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13921 (exit $ac_status); }; }; then
13922
13923 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013924#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013925_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013926
Martin v. Löwis11437992002-04-12 09:54:03 +000013927
13928cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013929#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013930_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013931
Martin v. Löwis11437992002-04-12 09:54:03 +000013932 echo "$as_me:$LINENO: result: yes" >&5
13933echo "${ECHO_T}yes" >&6
13934
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013935else
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 echo "$as_me: failed program was:" >&5
13937cat conftest.$ac_ext >&5
13938
13939 echo "$as_me:$LINENO: result: no" >&5
13940echo "${ECHO_T}no" >&6
13941 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
13942echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
13943 cat >conftest.$ac_ext <<_ACEOF
13944#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013945#include "confdefs.h"
13946
13947# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013948
13949#ifdef F77_DUMMY_MAIN
13950# ifdef __cplusplus
13951 extern "C"
13952# endif
13953 int F77_DUMMY_MAIN() { return 1; }
13954#endif
13955int
13956main ()
13957{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013958
13959 char *name;
13960 struct hostent *he;
13961 struct hostent_data data;
13962
13963 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000013964
13965 ;
13966 return 0;
13967}
13968_ACEOF
13969rm -f conftest.$ac_objext
13970if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13971 (eval $ac_compile) 2>&5
13972 ac_status=$?
13973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13974 (exit $ac_status); } &&
13975 { ac_try='test -s conftest.$ac_objext'
13976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13977 (eval $ac_try) 2>&5
13978 ac_status=$?
13979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13980 (exit $ac_status); }; }; then
13981
13982 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013983#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013984_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013985
Martin v. Löwis11437992002-04-12 09:54:03 +000013986
13987cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013988#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013989_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013990
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 echo "$as_me:$LINENO: result: yes" >&5
13992echo "${ECHO_T}yes" >&6
13993
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013994else
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 echo "$as_me: failed program was:" >&5
13996cat conftest.$ac_ext >&5
13997
13998 echo "$as_me:$LINENO: result: no" >&5
13999echo "${ECHO_T}no" >&6
14000
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014001fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014002rm -f conftest.$ac_objext conftest.$ac_ext
14003
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014004fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014005rm -f conftest.$ac_objext conftest.$ac_ext
14006
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014007fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014008rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014009 CFLAGS=$OLD_CFLAGS
14010
14011else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014012
Martin v. Löwis11437992002-04-12 09:54:03 +000014013
14014for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014015do
Martin v. Löwis11437992002-04-12 09:54:03 +000014016as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14017echo "$as_me:$LINENO: checking for $ac_func" >&5
14018echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14019if eval "test \"\${$as_ac_var+set}\" = set"; then
14020 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014021else
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 cat >conftest.$ac_ext <<_ACEOF
14023#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014024#include "confdefs.h"
14025/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014026 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014027#include <assert.h>
14028/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014029#ifdef __cplusplus
14030extern "C"
14031#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014032/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014033 builtin and then its argument prototype would still apply. */
14034char $ac_func ();
14035char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014036
Martin v. Löwis11437992002-04-12 09:54:03 +000014037#ifdef F77_DUMMY_MAIN
14038# ifdef __cplusplus
14039 extern "C"
14040# endif
14041 int F77_DUMMY_MAIN() { return 1; }
14042#endif
14043int
14044main ()
14045{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014046/* The GNU C library defines this for functions which it implements
14047 to always fail with ENOSYS. Some functions are actually named
14048 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014049#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014050choke me
14051#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014052f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014053#endif
14054
Martin v. Löwis11437992002-04-12 09:54:03 +000014055 ;
14056 return 0;
14057}
14058_ACEOF
14059rm -f conftest.$ac_objext conftest$ac_exeext
14060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14061 (eval $ac_link) 2>&5
14062 ac_status=$?
14063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14064 (exit $ac_status); } &&
14065 { ac_try='test -s conftest$ac_exeext'
14066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14067 (eval $ac_try) 2>&5
14068 ac_status=$?
14069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14070 (exit $ac_status); }; }; then
14071 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014072else
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 echo "$as_me: failed program was:" >&5
14074cat conftest.$ac_ext >&5
14075eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014076fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014077rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014079echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14080echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14081if test `eval echo '${'$as_ac_var'}'` = yes; then
14082 cat >>confdefs.h <<_ACEOF
14083#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14084_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014085
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014086fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014087done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014088
Michael W. Hudson54241132001-12-07 15:38:26 +000014089
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014090fi
14091
Michael W. Hudson54241132001-12-07 15:38:26 +000014092
14093
14094
14095
14096
14097
Guido van Rossum627b2d71993-12-24 10:39:16 +000014098# checks for system services
14099# (none yet)
14100
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014101# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014102echo "$as_me:$LINENO: checking for __fpu_control" >&5
14103echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14104if test "${ac_cv_func___fpu_control+set}" = set; then
14105 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014106else
Martin v. Löwis11437992002-04-12 09:54:03 +000014107 cat >conftest.$ac_ext <<_ACEOF
14108#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014109#include "confdefs.h"
14110/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014112#include <assert.h>
14113/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014114#ifdef __cplusplus
14115extern "C"
14116#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014117/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014118 builtin and then its argument prototype would still apply. */
14119char __fpu_control ();
14120char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014121
Martin v. Löwis11437992002-04-12 09:54:03 +000014122#ifdef F77_DUMMY_MAIN
14123# ifdef __cplusplus
14124 extern "C"
14125# endif
14126 int F77_DUMMY_MAIN() { return 1; }
14127#endif
14128int
14129main ()
14130{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014131/* The GNU C library defines this for functions which it implements
14132 to always fail with ENOSYS. Some functions are actually named
14133 something starting with __ and the normal name is an alias. */
14134#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14135choke me
14136#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014137f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014138#endif
14139
Martin v. Löwis11437992002-04-12 09:54:03 +000014140 ;
14141 return 0;
14142}
14143_ACEOF
14144rm -f conftest.$ac_objext conftest$ac_exeext
14145if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14146 (eval $ac_link) 2>&5
14147 ac_status=$?
14148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14149 (exit $ac_status); } &&
14150 { ac_try='test -s conftest$ac_exeext'
14151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14152 (eval $ac_try) 2>&5
14153 ac_status=$?
14154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14155 (exit $ac_status); }; }; then
14156 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014157else
Martin v. Löwis11437992002-04-12 09:54:03 +000014158 echo "$as_me: failed program was:" >&5
14159cat conftest.$ac_ext >&5
14160ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014161fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014162rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014164echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14165echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14166if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014167 :
14168else
Martin v. Löwis11437992002-04-12 09:54:03 +000014169
14170echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14171echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14172if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14173 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014174else
Martin v. Löwis11437992002-04-12 09:54:03 +000014175 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014176LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014177cat >conftest.$ac_ext <<_ACEOF
14178#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014179#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014181/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014182#ifdef __cplusplus
14183extern "C"
14184#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014185/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014186 builtin and then its argument prototype would still apply. */
14187char __fpu_control ();
14188#ifdef F77_DUMMY_MAIN
14189# ifdef __cplusplus
14190 extern "C"
14191# endif
14192 int F77_DUMMY_MAIN() { return 1; }
14193#endif
14194int
14195main ()
14196{
14197__fpu_control ();
14198 ;
14199 return 0;
14200}
14201_ACEOF
14202rm -f conftest.$ac_objext conftest$ac_exeext
14203if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14204 (eval $ac_link) 2>&5
14205 ac_status=$?
14206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14207 (exit $ac_status); } &&
14208 { ac_try='test -s conftest$ac_exeext'
14209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14210 (eval $ac_try) 2>&5
14211 ac_status=$?
14212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14213 (exit $ac_status); }; }; then
14214 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014215else
Martin v. Löwis11437992002-04-12 09:54:03 +000014216 echo "$as_me: failed program was:" >&5
14217cat conftest.$ac_ext >&5
14218ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014220rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14221LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014223echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14224echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14225if test $ac_cv_lib_ieee___fpu_control = yes; then
14226 cat >>confdefs.h <<_ACEOF
14227#define HAVE_LIBIEEE 1
14228_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014229
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014230 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014231
Guido van Rossum627b2d71993-12-24 10:39:16 +000014232fi
14233
Michael W. Hudson54241132001-12-07 15:38:26 +000014234
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014235fi
14236
Michael W. Hudson54241132001-12-07 15:38:26 +000014237
Guido van Rossum7f253911997-05-09 02:42:48 +000014238# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014239echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14240echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14241
Guido van Rossum7f253911997-05-09 02:42:48 +000014242# Check whether --with-fpectl or --without-fpectl was given.
14243if test "${with_fpectl+set}" = set; then
14244 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014245
Guido van Rossum7f253911997-05-09 02:42:48 +000014246if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014247then
14248
14249cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014250#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014251_ACEOF
14252
14253 echo "$as_me:$LINENO: result: yes" >&5
14254echo "${ECHO_T}yes" >&6
14255else echo "$as_me:$LINENO: result: no" >&5
14256echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014257fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014258else
Martin v. Löwis11437992002-04-12 09:54:03 +000014259 echo "$as_me:$LINENO: result: no" >&5
14260echo "${ECHO_T}no" >&6
14261fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014262
Guido van Rossum7f43da71994-08-01 12:15:30 +000014263# check for --with-libm=...
14264
Guido van Rossum563e7081996-09-10 18:20:48 +000014265case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014266Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014267BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014268*) LIBM=-lm
14269esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014270echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14271echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14272
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014273# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014274if test "${with_libm+set}" = set; then
14275 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014276
Guido van Rossum7f253911997-05-09 02:42:48 +000014277if test "$withval" = no
14278then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014279 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14280echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014281elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014282then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014283 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14284echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14285else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14286echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14287 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014288fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014289else
Martin v. Löwis11437992002-04-12 09:54:03 +000014290 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14291echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14292fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014293
14294# check for --with-libc=...
14295
Martin v. Löwis11437992002-04-12 09:54:03 +000014296echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14297echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14298
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014299# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014300if test "${with_libc+set}" = set; then
14301 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014302
Guido van Rossum7f253911997-05-09 02:42:48 +000014303if test "$withval" = no
14304then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014305 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14306echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014307elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014308then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014309 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14310echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14311else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14312echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14313 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014314fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014315else
Martin v. Löwis11437992002-04-12 09:54:03 +000014316 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14317echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14318fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014319
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014320# check for hypot() in math library
14321LIBS_SAVE=$LIBS
14322LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014323
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014324for ac_func in hypot
14325do
Martin v. Löwis11437992002-04-12 09:54:03 +000014326as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14327echo "$as_me:$LINENO: checking for $ac_func" >&5
14328echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14329if eval "test \"\${$as_ac_var+set}\" = set"; then
14330 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014331else
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 cat >conftest.$ac_ext <<_ACEOF
14333#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014334#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014335/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014336 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014337#include <assert.h>
14338/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014339#ifdef __cplusplus
14340extern "C"
14341#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014342/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 builtin and then its argument prototype would still apply. */
14344char $ac_func ();
14345char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014346
Martin v. Löwis11437992002-04-12 09:54:03 +000014347#ifdef F77_DUMMY_MAIN
14348# ifdef __cplusplus
14349 extern "C"
14350# endif
14351 int F77_DUMMY_MAIN() { return 1; }
14352#endif
14353int
14354main ()
14355{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014356/* The GNU C library defines this for functions which it implements
14357 to always fail with ENOSYS. Some functions are actually named
14358 something starting with __ and the normal name is an alias. */
14359#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14360choke me
14361#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014362f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014363#endif
14364
Martin v. Löwis11437992002-04-12 09:54:03 +000014365 ;
14366 return 0;
14367}
14368_ACEOF
14369rm -f conftest.$ac_objext conftest$ac_exeext
14370if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14371 (eval $ac_link) 2>&5
14372 ac_status=$?
14373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14374 (exit $ac_status); } &&
14375 { ac_try='test -s conftest$ac_exeext'
14376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14377 (eval $ac_try) 2>&5
14378 ac_status=$?
14379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14380 (exit $ac_status); }; }; then
14381 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014382else
Martin v. Löwis11437992002-04-12 09:54:03 +000014383 echo "$as_me: failed program was:" >&5
14384cat conftest.$ac_ext >&5
14385eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014386fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014387rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014388fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014389echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14390echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14391if test `eval echo '${'$as_ac_var'}'` = yes; then
14392 cat >>confdefs.h <<_ACEOF
14393#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14394_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014395
Michael W. Hudson54241132001-12-07 15:38:26 +000014396else
Martin v. Löwis11437992002-04-12 09:54:03 +000014397 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014398fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014399done
14400
Michael W. Hudson54241132001-12-07 15:38:26 +000014401
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014402LIBS=$LIBS_SAVE
14403
Guido van Rossumad713701997-07-10 22:42:38 +000014404# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014405echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14406echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14407if test "${ac_cv_malloc_zero+set}" = set; then
14408 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014409else
14410 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014411 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014412else
Martin v. Löwis11437992002-04-12 09:54:03 +000014413 cat >conftest.$ac_ext <<_ACEOF
14414#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014415#include "confdefs.h"
14416#include <stdio.h>
14417#ifdef HAVE_STDLIB
14418#include <stdlib.h>
14419#else
14420char *malloc(), *realloc();
14421int *free();
14422#endif
14423main() {
14424 char *p;
14425 p = malloc(0);
14426 if (p == NULL) exit(1);
14427 p = realloc(p, 0);
14428 if (p == NULL) exit(1);
14429 free(p);
14430 exit(0);
14431}
Martin v. Löwis11437992002-04-12 09:54:03 +000014432_ACEOF
14433rm -f conftest$ac_exeext
14434if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14435 (eval $ac_link) 2>&5
14436 ac_status=$?
14437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14438 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14440 (eval $ac_try) 2>&5
14441 ac_status=$?
14442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14443 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014444 ac_cv_malloc_zero=nonnull
14445else
Martin v. Löwis11437992002-04-12 09:54:03 +000014446 echo "$as_me: program exited with status $ac_status" >&5
14447echo "$as_me: failed program was:" >&5
14448cat conftest.$ac_ext >&5
14449( exit $ac_status )
14450ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014451fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014452rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014453fi
Guido van Rossumad713701997-07-10 22:42:38 +000014454fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014455 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014456echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14457echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014458if test "$ac_cv_malloc_zero" = null
14459then
Martin v. Löwis11437992002-04-12 09:54:03 +000014460
14461cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014462#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014463_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014464
14465fi
14466
Guido van Rossumef2255b2000-03-10 22:30:29 +000014467# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014468if test "${ac_cv_header_wchar_h+set}" = set; then
14469 echo "$as_me:$LINENO: checking for wchar.h" >&5
14470echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14471if test "${ac_cv_header_wchar_h+set}" = set; then
14472 echo $ECHO_N "(cached) $ECHO_C" >&6
14473fi
14474echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14475echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014476else
Martin v. Löwis11437992002-04-12 09:54:03 +000014477 # Is the header compilable?
14478echo "$as_me:$LINENO: checking wchar.h usability" >&5
14479echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14480cat >conftest.$ac_ext <<_ACEOF
14481#line $LINENO "configure"
14482#include "confdefs.h"
14483$ac_includes_default
14484#include <wchar.h>
14485_ACEOF
14486rm -f conftest.$ac_objext
14487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14488 (eval $ac_compile) 2>&5
14489 ac_status=$?
14490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14491 (exit $ac_status); } &&
14492 { ac_try='test -s conftest.$ac_objext'
14493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14494 (eval $ac_try) 2>&5
14495 ac_status=$?
14496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14497 (exit $ac_status); }; }; then
14498 ac_header_compiler=yes
14499else
14500 echo "$as_me: failed program was:" >&5
14501cat conftest.$ac_ext >&5
14502ac_header_compiler=no
14503fi
14504rm -f conftest.$ac_objext conftest.$ac_ext
14505echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14506echo "${ECHO_T}$ac_header_compiler" >&6
14507
14508# Is the header present?
14509echo "$as_me:$LINENO: checking wchar.h presence" >&5
14510echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14511cat >conftest.$ac_ext <<_ACEOF
14512#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014513#include "confdefs.h"
14514#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014515_ACEOF
14516if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14517 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14518 ac_status=$?
14519 egrep -v '^ *\+' conftest.er1 >conftest.err
14520 rm -f conftest.er1
14521 cat conftest.err >&5
14522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14523 (exit $ac_status); } >/dev/null; then
14524 if test -s conftest.err; then
14525 ac_cpp_err=$ac_c_preproc_warn_flag
14526 else
14527 ac_cpp_err=
14528 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014529else
Martin v. Löwis11437992002-04-12 09:54:03 +000014530 ac_cpp_err=yes
14531fi
14532if test -z "$ac_cpp_err"; then
14533 ac_header_preproc=yes
14534else
14535 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014536 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014537 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014538fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014539rm -f conftest.err conftest.$ac_ext
14540echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14541echo "${ECHO_T}$ac_header_preproc" >&6
14542
14543# So? What about this header?
14544case $ac_header_compiler:$ac_header_preproc in
14545 yes:no )
14546 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14547echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14548 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14549echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14550 no:yes )
14551 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14552echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14553 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14554echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14555 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14556echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14557esac
14558echo "$as_me:$LINENO: checking for wchar.h" >&5
14559echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14560if test "${ac_cv_header_wchar_h+set}" = set; then
14561 echo $ECHO_N "(cached) $ECHO_C" >&6
14562else
14563 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014565echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14566echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14567
14568fi
14569if test $ac_cv_header_wchar_h = yes; then
14570
14571
14572cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014573#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014574_ACEOF
14575
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014576 wchar_h="yes"
14577
Guido van Rossumef2255b2000-03-10 22:30:29 +000014578else
Martin v. Löwis11437992002-04-12 09:54:03 +000014579 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014580
14581fi
14582
Michael W. Hudson54241132001-12-07 15:38:26 +000014583
Martin v. Löwis11437992002-04-12 09:54:03 +000014584
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014585# determine wchar_t size
14586if test "$wchar_h" = yes
14587then
Martin v. Löwis11437992002-04-12 09:54:03 +000014588 echo "$as_me:$LINENO: checking for wchar_t" >&5
14589echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14590if test "${ac_cv_type_wchar_t+set}" = set; then
14591 echo $ECHO_N "(cached) $ECHO_C" >&6
14592else
14593 cat >conftest.$ac_ext <<_ACEOF
14594#line $LINENO "configure"
14595#include "confdefs.h"
14596#include <wchar.h>
14597
14598#ifdef F77_DUMMY_MAIN
14599# ifdef __cplusplus
14600 extern "C"
14601# endif
14602 int F77_DUMMY_MAIN() { return 1; }
14603#endif
14604int
14605main ()
14606{
14607if ((wchar_t *) 0)
14608 return 0;
14609if (sizeof (wchar_t))
14610 return 0;
14611 ;
14612 return 0;
14613}
14614_ACEOF
14615rm -f conftest.$ac_objext
14616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14617 (eval $ac_compile) 2>&5
14618 ac_status=$?
14619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14620 (exit $ac_status); } &&
14621 { ac_try='test -s conftest.$ac_objext'
14622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14623 (eval $ac_try) 2>&5
14624 ac_status=$?
14625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14626 (exit $ac_status); }; }; then
14627 ac_cv_type_wchar_t=yes
14628else
14629 echo "$as_me: failed program was:" >&5
14630cat conftest.$ac_ext >&5
14631ac_cv_type_wchar_t=no
14632fi
14633rm -f conftest.$ac_objext conftest.$ac_ext
14634fi
14635echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14636echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14637
14638echo "$as_me:$LINENO: checking size of wchar_t" >&5
14639echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14640if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14641 echo $ECHO_N "(cached) $ECHO_C" >&6
14642else
14643 if test "$ac_cv_type_wchar_t" = yes; then
14644 # The cast to unsigned long works around a bug in the HP C Compiler
14645 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14646 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14647 # This bug is HP SR number 8606223364.
14648 if test "$cross_compiling" = yes; then
14649 # Depending upon the size, compute the lo and hi bounds.
14650cat >conftest.$ac_ext <<_ACEOF
14651#line $LINENO "configure"
14652#include "confdefs.h"
14653#include <wchar.h>
14654
14655#ifdef F77_DUMMY_MAIN
14656# ifdef __cplusplus
14657 extern "C"
14658# endif
14659 int F77_DUMMY_MAIN() { return 1; }
14660#endif
14661int
14662main ()
14663{
14664static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14665test_array [0] = 0
14666
14667 ;
14668 return 0;
14669}
14670_ACEOF
14671rm -f conftest.$ac_objext
14672if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14673 (eval $ac_compile) 2>&5
14674 ac_status=$?
14675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14676 (exit $ac_status); } &&
14677 { ac_try='test -s conftest.$ac_objext'
14678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14679 (eval $ac_try) 2>&5
14680 ac_status=$?
14681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14682 (exit $ac_status); }; }; then
14683 ac_lo=0 ac_mid=0
14684 while :; do
14685 cat >conftest.$ac_ext <<_ACEOF
14686#line $LINENO "configure"
14687#include "confdefs.h"
14688#include <wchar.h>
14689
14690#ifdef F77_DUMMY_MAIN
14691# ifdef __cplusplus
14692 extern "C"
14693# endif
14694 int F77_DUMMY_MAIN() { return 1; }
14695#endif
14696int
14697main ()
14698{
14699static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14700test_array [0] = 0
14701
14702 ;
14703 return 0;
14704}
14705_ACEOF
14706rm -f conftest.$ac_objext
14707if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14708 (eval $ac_compile) 2>&5
14709 ac_status=$?
14710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14711 (exit $ac_status); } &&
14712 { ac_try='test -s conftest.$ac_objext'
14713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14714 (eval $ac_try) 2>&5
14715 ac_status=$?
14716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14717 (exit $ac_status); }; }; then
14718 ac_hi=$ac_mid; break
14719else
14720 echo "$as_me: failed program was:" >&5
14721cat conftest.$ac_ext >&5
14722ac_lo=`expr $ac_mid + 1`
14723 if test $ac_lo -le $ac_mid; then
14724 ac_lo= ac_hi=
14725 break
14726 fi
14727 ac_mid=`expr 2 '*' $ac_mid + 1`
14728fi
14729rm -f conftest.$ac_objext conftest.$ac_ext
14730 done
14731else
14732 echo "$as_me: failed program was:" >&5
14733cat conftest.$ac_ext >&5
14734cat >conftest.$ac_ext <<_ACEOF
14735#line $LINENO "configure"
14736#include "confdefs.h"
14737#include <wchar.h>
14738
14739#ifdef F77_DUMMY_MAIN
14740# ifdef __cplusplus
14741 extern "C"
14742# endif
14743 int F77_DUMMY_MAIN() { return 1; }
14744#endif
14745int
14746main ()
14747{
14748static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14749test_array [0] = 0
14750
14751 ;
14752 return 0;
14753}
14754_ACEOF
14755rm -f conftest.$ac_objext
14756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14757 (eval $ac_compile) 2>&5
14758 ac_status=$?
14759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14760 (exit $ac_status); } &&
14761 { ac_try='test -s conftest.$ac_objext'
14762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14763 (eval $ac_try) 2>&5
14764 ac_status=$?
14765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14766 (exit $ac_status); }; }; then
14767 ac_hi=-1 ac_mid=-1
14768 while :; do
14769 cat >conftest.$ac_ext <<_ACEOF
14770#line $LINENO "configure"
14771#include "confdefs.h"
14772#include <wchar.h>
14773
14774#ifdef F77_DUMMY_MAIN
14775# ifdef __cplusplus
14776 extern "C"
14777# endif
14778 int F77_DUMMY_MAIN() { return 1; }
14779#endif
14780int
14781main ()
14782{
14783static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14784test_array [0] = 0
14785
14786 ;
14787 return 0;
14788}
14789_ACEOF
14790rm -f conftest.$ac_objext
14791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14792 (eval $ac_compile) 2>&5
14793 ac_status=$?
14794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14795 (exit $ac_status); } &&
14796 { ac_try='test -s conftest.$ac_objext'
14797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14798 (eval $ac_try) 2>&5
14799 ac_status=$?
14800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14801 (exit $ac_status); }; }; then
14802 ac_lo=$ac_mid; break
14803else
14804 echo "$as_me: failed program was:" >&5
14805cat conftest.$ac_ext >&5
14806ac_hi=`expr '(' $ac_mid ')' - 1`
14807 if test $ac_mid -le $ac_hi; then
14808 ac_lo= ac_hi=
14809 break
14810 fi
14811 ac_mid=`expr 2 '*' $ac_mid`
14812fi
14813rm -f conftest.$ac_objext conftest.$ac_ext
14814 done
14815else
14816 echo "$as_me: failed program was:" >&5
14817cat conftest.$ac_ext >&5
14818ac_lo= ac_hi=
14819fi
14820rm -f conftest.$ac_objext conftest.$ac_ext
14821fi
14822rm -f conftest.$ac_objext conftest.$ac_ext
14823# Binary search between lo and hi bounds.
14824while test "x$ac_lo" != "x$ac_hi"; do
14825 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14826 cat >conftest.$ac_ext <<_ACEOF
14827#line $LINENO "configure"
14828#include "confdefs.h"
14829#include <wchar.h>
14830
14831#ifdef F77_DUMMY_MAIN
14832# ifdef __cplusplus
14833 extern "C"
14834# endif
14835 int F77_DUMMY_MAIN() { return 1; }
14836#endif
14837int
14838main ()
14839{
14840static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14841test_array [0] = 0
14842
14843 ;
14844 return 0;
14845}
14846_ACEOF
14847rm -f conftest.$ac_objext
14848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14849 (eval $ac_compile) 2>&5
14850 ac_status=$?
14851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14852 (exit $ac_status); } &&
14853 { ac_try='test -s conftest.$ac_objext'
14854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14855 (eval $ac_try) 2>&5
14856 ac_status=$?
14857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14858 (exit $ac_status); }; }; then
14859 ac_hi=$ac_mid
14860else
14861 echo "$as_me: failed program was:" >&5
14862cat conftest.$ac_ext >&5
14863ac_lo=`expr '(' $ac_mid ')' + 1`
14864fi
14865rm -f conftest.$ac_objext conftest.$ac_ext
14866done
14867case $ac_lo in
14868?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14869'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14870echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14871 { (exit 1); exit 1; }; } ;;
14872esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014873else
14874 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014875 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14876echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14877 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014878else
Martin v. Löwis11437992002-04-12 09:54:03 +000014879 cat >conftest.$ac_ext <<_ACEOF
14880#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014881#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014882#include <wchar.h>
14883
14884long longval () { return (long) (sizeof (wchar_t)); }
14885unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014886#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014887#include <stdlib.h>
14888#ifdef F77_DUMMY_MAIN
14889# ifdef __cplusplus
14890 extern "C"
14891# endif
14892 int F77_DUMMY_MAIN() { return 1; }
14893#endif
14894int
14895main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014896{
Martin v. Löwis11437992002-04-12 09:54:03 +000014897
14898 FILE *f = fopen ("conftest.val", "w");
14899 if (! f)
14900 exit (1);
14901 if (((long) (sizeof (wchar_t))) < 0)
14902 {
14903 long i = longval ();
14904 if (i != ((long) (sizeof (wchar_t))))
14905 exit (1);
14906 fprintf (f, "%ld\n", i);
14907 }
14908 else
14909 {
14910 unsigned long i = ulongval ();
14911 if (i != ((long) (sizeof (wchar_t))))
14912 exit (1);
14913 fprintf (f, "%lu\n", i);
14914 }
14915 exit (ferror (f) || fclose (f) != 0);
14916
14917 ;
14918 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014919}
Martin v. Löwis11437992002-04-12 09:54:03 +000014920_ACEOF
14921rm -f conftest$ac_exeext
14922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14923 (eval $ac_link) 2>&5
14924 ac_status=$?
14925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14928 (eval $ac_try) 2>&5
14929 ac_status=$?
14930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14931 (exit $ac_status); }; }; then
14932 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014933else
Martin v. Löwis11437992002-04-12 09:54:03 +000014934 echo "$as_me: program exited with status $ac_status" >&5
14935echo "$as_me: failed program was:" >&5
14936cat conftest.$ac_ext >&5
14937( exit $ac_status )
14938{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14939echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14940 { (exit 1); exit 1; }; }
14941fi
14942rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14943fi
14944fi
14945rm -f conftest.val
14946else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014947 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000014948fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014949fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014950echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
14951echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
14952cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014953#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014954_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014955
Michael W. Hudson54241132001-12-07 15:38:26 +000014956
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014957fi
14958
Martin v. Löwis11437992002-04-12 09:54:03 +000014959echo "$as_me:$LINENO: checking what type to use for unicode" >&5
14960echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014961# Check whether --enable-unicode or --disable-unicode was given.
14962if test "${enable_unicode+set}" = set; then
14963 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000014964
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014965else
14966 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014967fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014968
14969if test $enable_unicode = yes
14970then
Martin v. Löwisfd917792001-06-27 20:22:04 +000014971 # Without any arguments, Py_UNICODE defaults to two-byte mode
14972 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014973fi
14974
Martin v. Löwis0036cba2002-04-12 09:58:45 +000014975
14976
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014977case "$enable_unicode" in
14978ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014980#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000014981_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014982
14983 ;;
14984ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014986#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000014987_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014988
14989 ;;
14990esac
14991
Michael W. Hudson54241132001-12-07 15:38:26 +000014992
Martin v. Löwis11437992002-04-12 09:54:03 +000014993
14994
Martin v. Löwis0036cba2002-04-12 09:58:45 +000014995
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014996if test "$enable_unicode" = "no"
14997then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000014998 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000014999 echo "$as_me:$LINENO: result: not used" >&5
15000echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015001else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015002 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015003
15004cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015005#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015006_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015007
15008 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15009 then
15010 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015011
Martin v. Löwis11437992002-04-12 09:54:03 +000015012cat >>confdefs.h <<\_ACEOF
15013#define HAVE_USABLE_WCHAR_T 1
15014_ACEOF
15015
15016 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015017#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015018_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015019
15020 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15021 then
15022 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015024#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015025_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015026
15027 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15028 then
15029 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015030 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015031#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015032_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015033
15034 else
15035 PY_UNICODE_TYPE="no type found"
15036 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015037 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15038echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015039fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015040
15041# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015042echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15043echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15044if test "${ac_cv_c_bigendian+set}" = set; then
15045 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015046else
Martin v. Löwis11437992002-04-12 09:54:03 +000015047 # See if sys/param.h defines the BYTE_ORDER macro.
15048cat >conftest.$ac_ext <<_ACEOF
15049#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015050#include "confdefs.h"
15051#include <sys/types.h>
15052#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015053
Martin v. Löwis11437992002-04-12 09:54:03 +000015054#ifdef F77_DUMMY_MAIN
15055# ifdef __cplusplus
15056 extern "C"
15057# endif
15058 int F77_DUMMY_MAIN() { return 1; }
15059#endif
15060int
15061main ()
15062{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015063#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15064 bogus endian macros
15065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015066
15067 ;
15068 return 0;
15069}
15070_ACEOF
15071rm -f conftest.$ac_objext
15072if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15073 (eval $ac_compile) 2>&5
15074 ac_status=$?
15075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15076 (exit $ac_status); } &&
15077 { ac_try='test -s conftest.$ac_objext'
15078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15079 (eval $ac_try) 2>&5
15080 ac_status=$?
15081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15082 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015083 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015084cat >conftest.$ac_ext <<_ACEOF
15085#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015086#include "confdefs.h"
15087#include <sys/types.h>
15088#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015089
Martin v. Löwis11437992002-04-12 09:54:03 +000015090#ifdef F77_DUMMY_MAIN
15091# ifdef __cplusplus
15092 extern "C"
15093# endif
15094 int F77_DUMMY_MAIN() { return 1; }
15095#endif
15096int
15097main ()
15098{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015099#if BYTE_ORDER != BIG_ENDIAN
15100 not big endian
15101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015102
15103 ;
15104 return 0;
15105}
15106_ACEOF
15107rm -f conftest.$ac_objext
15108if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15109 (eval $ac_compile) 2>&5
15110 ac_status=$?
15111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15112 (exit $ac_status); } &&
15113 { ac_try='test -s conftest.$ac_objext'
15114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15115 (eval $ac_try) 2>&5
15116 ac_status=$?
15117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15118 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015119 ac_cv_c_bigendian=yes
15120else
Martin v. Löwis11437992002-04-12 09:54:03 +000015121 echo "$as_me: failed program was:" >&5
15122cat conftest.$ac_ext >&5
15123ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015125rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015126else
Martin v. Löwis11437992002-04-12 09:54:03 +000015127 echo "$as_me: failed program was:" >&5
15128cat conftest.$ac_ext >&5
15129# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015130if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 # try to guess the endianess by grep'ing values into an object file
15132 ac_cv_c_bigendian=unknown
15133 cat >conftest.$ac_ext <<_ACEOF
15134#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015135#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015136short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15137short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15138void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15139short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15140short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15141void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15142#ifdef F77_DUMMY_MAIN
15143# ifdef __cplusplus
15144 extern "C"
15145# endif
15146 int F77_DUMMY_MAIN() { return 1; }
15147#endif
15148int
15149main ()
15150{
15151 _ascii (); _ebcdic ();
15152 ;
15153 return 0;
15154}
15155_ACEOF
15156rm -f conftest.$ac_objext
15157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15158 (eval $ac_compile) 2>&5
15159 ac_status=$?
15160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15161 (exit $ac_status); } &&
15162 { ac_try='test -s conftest.$ac_objext'
15163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15164 (eval $ac_try) 2>&5
15165 ac_status=$?
15166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15167 (exit $ac_status); }; }; then
15168 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15169 ac_cv_c_bigendian=yes
15170fi
15171if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15172 if test "$ac_cv_c_bigendian" = unknown; then
15173 ac_cv_c_bigendian=no
15174 else
15175 # finding both strings is unlikely to happen, but who knows?
15176 ac_cv_c_bigendian=unknown
15177 fi
15178fi
15179else
15180 echo "$as_me: failed program was:" >&5
15181cat conftest.$ac_ext >&5
15182fi
15183rm -f conftest.$ac_objext conftest.$ac_ext
15184else
15185 cat >conftest.$ac_ext <<_ACEOF
15186#line $LINENO "configure"
15187#include "confdefs.h"
15188int
15189main ()
15190{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015191 /* Are we little or big endian? From Harbison&Steele. */
15192 union
15193 {
15194 long l;
15195 char c[sizeof (long)];
15196 } u;
15197 u.l = 1;
15198 exit (u.c[sizeof (long) - 1] == 1);
15199}
Martin v. Löwis11437992002-04-12 09:54:03 +000015200_ACEOF
15201rm -f conftest$ac_exeext
15202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15203 (eval $ac_link) 2>&5
15204 ac_status=$?
15205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15206 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15208 (eval $ac_try) 2>&5
15209 ac_status=$?
15210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15211 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015212 ac_cv_c_bigendian=no
15213else
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 echo "$as_me: program exited with status $ac_status" >&5
15215echo "$as_me: failed program was:" >&5
15216cat conftest.$ac_ext >&5
15217( exit $ac_status )
15218ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015220rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015222fi
15223rm -f conftest.$ac_objext conftest.$ac_ext
15224fi
15225echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15226echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15227case $ac_cv_c_bigendian in
15228 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015229
Martin v. Löwis11437992002-04-12 09:54:03 +000015230cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015231#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015232_ACEOF
15233 ;;
15234 no)
15235 ;;
15236 *)
15237 { { echo "$as_me:$LINENO: error: unknown endianess
15238presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15239echo "$as_me: error: unknown endianess
15240presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15241 { (exit 1); exit 1; }; } ;;
15242esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015243
Michael W. Hudson54241132001-12-07 15:38:26 +000015244
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015245# Check whether right shifting a negative integer extends the sign bit
15246# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015247echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15248echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15249if test "${ac_cv_rshift_extends_sign+set}" = set; then
15250 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015251else
Martin v. Löwis11437992002-04-12 09:54:03 +000015252
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015253if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015254 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015255else
Martin v. Löwis11437992002-04-12 09:54:03 +000015256 cat >conftest.$ac_ext <<_ACEOF
15257#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015258#include "confdefs.h"
15259
15260int main()
15261{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015262 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015263}
15264
Martin v. Löwis11437992002-04-12 09:54:03 +000015265_ACEOF
15266rm -f conftest$ac_exeext
15267if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15268 (eval $ac_link) 2>&5
15269 ac_status=$?
15270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15271 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15273 (eval $ac_try) 2>&5
15274 ac_status=$?
15275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15276 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015277 ac_cv_rshift_extends_sign=yes
15278else
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 echo "$as_me: program exited with status $ac_status" >&5
15280echo "$as_me: failed program was:" >&5
15281cat conftest.$ac_ext >&5
15282( exit $ac_status )
15283ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015284fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015285rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15286fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015287fi
15288
Martin v. Löwis11437992002-04-12 09:54:03 +000015289echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15290echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015291if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015292then
Martin v. Löwis11437992002-04-12 09:54:03 +000015293
15294cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015295#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015296_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015297
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015298fi
15299
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015300# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015301echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15302echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15303if test "${ac_cv_have_getc_unlocked+set}" = set; then
15304 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015305else
Martin v. Löwis11437992002-04-12 09:54:03 +000015306
15307cat >conftest.$ac_ext <<_ACEOF
15308#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015309#include "confdefs.h"
15310#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015311#ifdef F77_DUMMY_MAIN
15312# ifdef __cplusplus
15313 extern "C"
15314# endif
15315 int F77_DUMMY_MAIN() { return 1; }
15316#endif
15317int
15318main ()
15319{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015320
15321 FILE *f = fopen("/dev/null", "r");
15322 flockfile(f);
15323 getc_unlocked(f);
15324 funlockfile(f);
15325
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 ;
15327 return 0;
15328}
15329_ACEOF
15330rm -f conftest.$ac_objext conftest$ac_exeext
15331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15332 (eval $ac_link) 2>&5
15333 ac_status=$?
15334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15335 (exit $ac_status); } &&
15336 { ac_try='test -s conftest$ac_exeext'
15337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15338 (eval $ac_try) 2>&5
15339 ac_status=$?
15340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15341 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015342 ac_cv_have_getc_unlocked=yes
15343else
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 echo "$as_me: failed program was:" >&5
15345cat conftest.$ac_ext >&5
15346ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015347fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015348rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015349fi
15350
Martin v. Löwis11437992002-04-12 09:54:03 +000015351echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15352echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015353if test "$ac_cv_have_getc_unlocked" = yes
15354then
Martin v. Löwis11437992002-04-12 09:54:03 +000015355
15356cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015357#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015358_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015359
15360fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015361
Martin v. Löwis0daad592001-09-30 21:09:59 +000015362# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015363echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15364echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15365if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15366 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015367else
Martin v. Löwis11437992002-04-12 09:54:03 +000015368 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015369LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015370cat >conftest.$ac_ext <<_ACEOF
15371#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015372#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015373
Guido van Rossum353ae582001-07-10 16:45:32 +000015374/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015375#ifdef __cplusplus
15376extern "C"
15377#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015378/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015379 builtin and then its argument prototype would still apply. */
15380char rl_pre_input_hook ();
15381#ifdef F77_DUMMY_MAIN
15382# ifdef __cplusplus
15383 extern "C"
15384# endif
15385 int F77_DUMMY_MAIN() { return 1; }
15386#endif
15387int
15388main ()
15389{
15390rl_pre_input_hook ();
15391 ;
15392 return 0;
15393}
15394_ACEOF
15395rm -f conftest.$ac_objext conftest$ac_exeext
15396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15397 (eval $ac_link) 2>&5
15398 ac_status=$?
15399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15400 (exit $ac_status); } &&
15401 { ac_try='test -s conftest$ac_exeext'
15402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15403 (eval $ac_try) 2>&5
15404 ac_status=$?
15405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15406 (exit $ac_status); }; }; then
15407 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015408else
Martin v. Löwis11437992002-04-12 09:54:03 +000015409 echo "$as_me: failed program was:" >&5
15410cat conftest.$ac_ext >&5
15411ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015413rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15414LIBS=$ac_check_lib_save_LIBS
15415fi
15416echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15417echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15418if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015419
Martin v. Löwis11437992002-04-12 09:54:03 +000015420cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015421#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015422_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015423
Martin v. Löwis0daad592001-09-30 21:09:59 +000015424fi
15425
Michael W. Hudson54241132001-12-07 15:38:26 +000015426
Martin v. Löwis0daad592001-09-30 21:09:59 +000015427# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015428echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15429echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15430if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15431 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015432else
Martin v. Löwis11437992002-04-12 09:54:03 +000015433 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015434LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015435cat >conftest.$ac_ext <<_ACEOF
15436#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015437#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015438
Martin v. Löwis0daad592001-09-30 21:09:59 +000015439/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015440#ifdef __cplusplus
15441extern "C"
15442#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015443/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015444 builtin and then its argument prototype would still apply. */
15445char rl_completion_matches ();
15446#ifdef F77_DUMMY_MAIN
15447# ifdef __cplusplus
15448 extern "C"
15449# endif
15450 int F77_DUMMY_MAIN() { return 1; }
15451#endif
15452int
15453main ()
15454{
15455rl_completion_matches ();
15456 ;
15457 return 0;
15458}
15459_ACEOF
15460rm -f conftest.$ac_objext conftest$ac_exeext
15461if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15462 (eval $ac_link) 2>&5
15463 ac_status=$?
15464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15465 (exit $ac_status); } &&
15466 { ac_try='test -s conftest$ac_exeext'
15467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15468 (eval $ac_try) 2>&5
15469 ac_status=$?
15470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15471 (exit $ac_status); }; }; then
15472 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015473else
Martin v. Löwis11437992002-04-12 09:54:03 +000015474 echo "$as_me: failed program was:" >&5
15475cat conftest.$ac_ext >&5
15476ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015478rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15479LIBS=$ac_check_lib_save_LIBS
15480fi
15481echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15482echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15483if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015484
Martin v. Löwis11437992002-04-12 09:54:03 +000015485cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015486#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015487_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015488
Guido van Rossum353ae582001-07-10 16:45:32 +000015489fi
15490
Jack Jansendd19cf82001-12-06 22:36:17 +000015491
Martin v. Löwis11437992002-04-12 09:54:03 +000015492echo "$as_me:$LINENO: checking for broken nice()" >&5
15493echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15494if test "${ac_cv_broken_nice+set}" = set; then
15495 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015496else
Martin v. Löwis11437992002-04-12 09:54:03 +000015497
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015498if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015499 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015500else
Martin v. Löwis11437992002-04-12 09:54:03 +000015501 cat >conftest.$ac_ext <<_ACEOF
15502#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015503#include "confdefs.h"
15504
15505int main()
15506{
15507 int val1 = nice(1);
15508 if (val1 != -1 && val1 == nice(2))
15509 exit(0);
15510 exit(1);
15511}
15512
Martin v. Löwis11437992002-04-12 09:54:03 +000015513_ACEOF
15514rm -f conftest$ac_exeext
15515if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15516 (eval $ac_link) 2>&5
15517 ac_status=$?
15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15521 (eval $ac_try) 2>&5
15522 ac_status=$?
15523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15524 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015525 ac_cv_broken_nice=yes
15526else
Martin v. Löwis11437992002-04-12 09:54:03 +000015527 echo "$as_me: program exited with status $ac_status" >&5
15528echo "$as_me: failed program was:" >&5
15529cat conftest.$ac_ext >&5
15530( exit $ac_status )
15531ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015532fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015533rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15534fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015535fi
15536
Martin v. Löwis11437992002-04-12 09:54:03 +000015537echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15538echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015539if test "$ac_cv_broken_nice" = yes
15540then
Martin v. Löwis11437992002-04-12 09:54:03 +000015541
15542cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015543#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015544_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015545
15546fi
15547
Jack Jansen666b1e72001-10-31 12:11:48 +000015548# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015549echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15550echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15551if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15552 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015553else
Martin v. Löwis11437992002-04-12 09:54:03 +000015554 cat >conftest.$ac_ext <<_ACEOF
15555#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015556#include "confdefs.h"
15557#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015558#ifdef F77_DUMMY_MAIN
15559# ifdef __cplusplus
15560 extern "C"
15561# endif
15562 int F77_DUMMY_MAIN() { return 1; }
15563#endif
15564int
15565main ()
15566{
Jack Jansen666b1e72001-10-31 12:11:48 +000015567
15568 int rtn;
15569 rtn = mvwdelch(0,0,0);
15570
Martin v. Löwis11437992002-04-12 09:54:03 +000015571 ;
15572 return 0;
15573}
15574_ACEOF
15575rm -f conftest.$ac_objext
15576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15577 (eval $ac_compile) 2>&5
15578 ac_status=$?
15579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15580 (exit $ac_status); } &&
15581 { ac_try='test -s conftest.$ac_objext'
15582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15583 (eval $ac_try) 2>&5
15584 ac_status=$?
15585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15586 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015587 ac_cv_mvwdelch_is_expression=yes
15588else
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 echo "$as_me: failed program was:" >&5
15590cat conftest.$ac_ext >&5
15591ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015593rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015594fi
15595
Martin v. Löwis11437992002-04-12 09:54:03 +000015596echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15597echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015598
15599if test "$ac_cv_mvwdelch_is_expression" = yes
15600then
Martin v. Löwis11437992002-04-12 09:54:03 +000015601
15602cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015603#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015604_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015605
15606fi
15607
Martin v. Löwis11437992002-04-12 09:54:03 +000015608echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15609echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15610if test "${ac_cv_window_has_flags+set}" = set; then
15611 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015612else
Martin v. Löwis11437992002-04-12 09:54:03 +000015613 cat >conftest.$ac_ext <<_ACEOF
15614#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015615#include "confdefs.h"
15616#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015617#ifdef F77_DUMMY_MAIN
15618# ifdef __cplusplus
15619 extern "C"
15620# endif
15621 int F77_DUMMY_MAIN() { return 1; }
15622#endif
15623int
15624main ()
15625{
Jack Jansen666b1e72001-10-31 12:11:48 +000015626
15627 WINDOW *w;
15628 w->_flags = 0;
15629
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 ;
15631 return 0;
15632}
15633_ACEOF
15634rm -f conftest.$ac_objext
15635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15636 (eval $ac_compile) 2>&5
15637 ac_status=$?
15638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15639 (exit $ac_status); } &&
15640 { ac_try='test -s conftest.$ac_objext'
15641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15642 (eval $ac_try) 2>&5
15643 ac_status=$?
15644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15645 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015646 ac_cv_window_has_flags=yes
15647else
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 echo "$as_me: failed program was:" >&5
15649cat conftest.$ac_ext >&5
15650ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015652rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015653fi
15654
Martin v. Löwis11437992002-04-12 09:54:03 +000015655echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15656echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015657
Jack Jansen666b1e72001-10-31 12:11:48 +000015658
15659if test "$ac_cv_window_has_flags" = yes
15660then
Martin v. Löwis11437992002-04-12 09:54:03 +000015661
15662cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015663#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015664_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015665
15666fi
15667
Guido van Rossum95713eb2000-05-18 20:53:31 +000015668# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15669# Add sys/socket.h to confdefs.h
15670cat >> confdefs.h <<\EOF
15671#ifdef HAVE_SYS_SOCKET_H
15672#include <sys/socket.h>
15673#endif
15674EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015675echo "$as_me:$LINENO: checking for socklen_t" >&5
15676echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15677if test "${ac_cv_type_socklen_t+set}" = set; then
15678 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015679else
Martin v. Löwis11437992002-04-12 09:54:03 +000015680 cat >conftest.$ac_ext <<_ACEOF
15681#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015682#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015683$ac_includes_default
15684#ifdef F77_DUMMY_MAIN
15685# ifdef __cplusplus
15686 extern "C"
15687# endif
15688 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015689#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015690int
15691main ()
15692{
15693if ((socklen_t *) 0)
15694 return 0;
15695if (sizeof (socklen_t))
15696 return 0;
15697 ;
15698 return 0;
15699}
15700_ACEOF
15701rm -f conftest.$ac_objext
15702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15703 (eval $ac_compile) 2>&5
15704 ac_status=$?
15705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15706 (exit $ac_status); } &&
15707 { ac_try='test -s conftest.$ac_objext'
15708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15709 (eval $ac_try) 2>&5
15710 ac_status=$?
15711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15712 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015713 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015714else
Martin v. Löwis11437992002-04-12 09:54:03 +000015715 echo "$as_me: failed program was:" >&5
15716cat conftest.$ac_ext >&5
15717ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015719rm -f conftest.$ac_objext conftest.$ac_ext
15720fi
15721echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15722echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15723if test $ac_cv_type_socklen_t = yes; then
15724 :
15725else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015726
Martin v. Löwis11437992002-04-12 09:54:03 +000015727cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015728#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015729_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015730
15731fi
15732
Michael W. Hudson54241132001-12-07 15:38:26 +000015733
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015734#AC_MSG_CHECKING(for Modules/Setup)
15735#if test ! -f Modules/Setup ; then
15736# if test ! -d Modules ; then
15737# mkdir Modules
15738# fi
15739# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15740# AC_MSG_RESULT(creating)
15741#else
15742# AC_MSG_RESULT(already exists)
15743#fi
15744
Michael W. Hudson54241132001-12-07 15:38:26 +000015745
15746
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015747for h in `(cd $srcdir;echo Python/thread_*.h)`
15748do
15749 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15750done
15751
Michael W. Hudson54241132001-12-07 15:38:26 +000015752
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +000015753SRCDIRS="Parser Grammar Objects Python Modules"
Martin v. Löwis11437992002-04-12 09:54:03 +000015754echo "$as_me:$LINENO: checking for build directories" >&5
15755echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015756for dir in $SRCDIRS; do
15757 if test ! -d $dir; then
15758 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015759 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015760done
Martin v. Löwis11437992002-04-12 09:54:03 +000015761echo "$as_me:$LINENO: result: done" >&5
15762echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015763
Guido van Rossum627b2d71993-12-24 10:39:16 +000015764# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015765ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15766cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015767# This file is a shell script that caches the results of configure
15768# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015769# scripts and configure runs, see configure's option --config-cache.
15770# It is not useful on other systems. If it contains results you don't
15771# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015772#
Martin v. Löwis11437992002-04-12 09:54:03 +000015773# config.status only pays attention to the cache file if you give it
15774# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015775#
Martin v. Löwis11437992002-04-12 09:54:03 +000015776# `ac_cv_env_foo' variables (set or unset) will be overriden when
15777# loading this file, other *unset* `ac_cv_foo' will be assigned the
15778# following values.
15779
15780_ACEOF
15781
Guido van Rossumf78abae1997-01-21 22:02:36 +000015782# The following way of writing the cache mishandles newlines in values,
15783# but we know of no workaround that is simple, portable, and efficient.
15784# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015785# Ultrix sh set writes to stderr and can't be redirected directly,
15786# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015787{
15788 (set) 2>&1 |
15789 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15790 *ac_space=\ *)
15791 # `set' does not quote correctly, so add quotes (double-quote
15792 # substitution turns \\\\ into \\, and sed turns \\ into \).
15793 sed -n \
15794 "s/'/'\\\\''/g;
15795 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15796 ;;
15797 *)
15798 # `set' quotes correctly as required by POSIX, so do not add quotes.
15799 sed -n \
15800 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15801 ;;
15802 esac;
15803} |
15804 sed '
15805 t clear
15806 : clear
15807 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15808 t end
15809 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15810 : end' >>confcache
15811if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015812 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015813 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15814 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015815 else
15816 echo "not updating unwritable cache $cache_file"
15817 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015818fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015819rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015820
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015821test "x$prefix" = xNONE && prefix=$ac_default_prefix
15822# Let make expand exec_prefix.
15823test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015824
Martin v. Löwis11437992002-04-12 09:54:03 +000015825# VPATH may cause trouble with some makes, so we remove $(srcdir),
15826# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15827# trailing colons and then remove the whole line if VPATH becomes empty
15828# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015829if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015830 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15831s/:*\$(srcdir):*/:/;
15832s/:*\${srcdir}:*/:/;
15833s/:*@srcdir@:*/:/;
15834s/^\([^=]*=[ ]*\):*/\1/;
15835s/:*$//;
15836s/^[^=]*=[ ]*$//;
15837}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015838fi
15839
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015840DEFS=-DHAVE_CONFIG_H
15841
Martin v. Löwis11437992002-04-12 09:54:03 +000015842
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015843: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015844ac_clean_files_save=$ac_clean_files
15845ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15846{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15847echo "$as_me: creating $CONFIG_STATUS" >&6;}
15848cat >$CONFIG_STATUS <<_ACEOF
15849#! $SHELL
15850# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015851# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015852# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015853# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015854
Martin v. Löwis11437992002-04-12 09:54:03 +000015855debug=false
15856SHELL=\${CONFIG_SHELL-$SHELL}
15857_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015858
Martin v. Löwis11437992002-04-12 09:54:03 +000015859cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015860
Martin v. Löwis11437992002-04-12 09:54:03 +000015861## --------------------- ##
15862## M4sh Initialization. ##
15863## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015864
Martin v. Löwis11437992002-04-12 09:54:03 +000015865# Be Bourne compatible
15866if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15867 emulate sh
15868 NULLCMD=:
15869elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15870 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015871fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015872
Martin v. Löwis11437992002-04-12 09:54:03 +000015873# NLS nuisances.
15874# Support unset when possible.
15875if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15876 as_unset=unset
15877else
15878 as_unset=false
15879fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015880
Martin v. Löwis11437992002-04-12 09:54:03 +000015881(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15882 { $as_unset LANG || test "${LANG+set}" != set; } ||
15883 { LANG=C; export LANG; }
15884(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15885 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15886 { LC_ALL=C; export LC_ALL; }
15887(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15888 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15889 { LC_TIME=C; export LC_TIME; }
15890(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15891 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15892 { LC_CTYPE=C; export LC_CTYPE; }
15893(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15894 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15895 { LANGUAGE=C; export LANGUAGE; }
15896(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15897 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15898 { LC_COLLATE=C; export LC_COLLATE; }
15899(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15900 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15901 { LC_NUMERIC=C; export LC_NUMERIC; }
15902(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15903 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15904 { LC_MESSAGES=C; export LC_MESSAGES; }
15905
15906
15907# Name of the executable.
15908as_me=`(basename "$0") 2>/dev/null ||
15909$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15910 X"$0" : 'X\(//\)$' \| \
15911 X"$0" : 'X\(/\)$' \| \
15912 . : '\(.\)' 2>/dev/null ||
15913echo X/"$0" |
15914 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15915 /^X\/\(\/\/\)$/{ s//\1/; q; }
15916 /^X\/\(\/\).*/{ s//\1/; q; }
15917 s/.*/./; q'`
15918
15919# PATH needs CR, and LINENO needs CR and PATH.
15920# Avoid depending upon Character Ranges.
15921as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15922as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15923as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15924as_cr_digits='0123456789'
15925as_cr_alnum=$as_cr_Letters$as_cr_digits
15926
15927# The user is always right.
15928if test "${PATH_SEPARATOR+set}" != set; then
15929 echo "#! /bin/sh" >conftest.sh
15930 echo "exit 0" >>conftest.sh
15931 chmod +x conftest.sh
15932 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15933 PATH_SEPARATOR=';'
15934 else
15935 PATH_SEPARATOR=:
15936 fi
15937 rm -f conftest.sh
15938fi
15939
15940
15941 as_lineno_1=$LINENO
15942 as_lineno_2=$LINENO
15943 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15944 test "x$as_lineno_1" != "x$as_lineno_2" &&
15945 test "x$as_lineno_3" = "x$as_lineno_2" || {
15946 # Find who we are. Look in the path if we contain no path at all
15947 # relative or not.
15948 case $0 in
15949 *[\\/]* ) as_myself=$0 ;;
15950 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15951for as_dir in $PATH
15952do
15953 IFS=$as_save_IFS
15954 test -z "$as_dir" && as_dir=.
15955 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15956done
15957
15958 ;;
15959 esac
15960 # We did not find ourselves, most probably we were run as `sh COMMAND'
15961 # in which case we are not to be found in the path.
15962 if test "x$as_myself" = x; then
15963 as_myself=$0
15964 fi
15965 if test ! -f "$as_myself"; then
15966 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15967echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15968 { (exit 1); exit 1; }; }
15969 fi
15970 case $CONFIG_SHELL in
15971 '')
15972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15973for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15974do
15975 IFS=$as_save_IFS
15976 test -z "$as_dir" && as_dir=.
15977 for as_base in sh bash ksh sh5; do
15978 case $as_dir in
15979 /*)
15980 if ("$as_dir/$as_base" -c '
15981 as_lineno_1=$LINENO
15982 as_lineno_2=$LINENO
15983 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15984 test "x$as_lineno_1" != "x$as_lineno_2" &&
15985 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
15986 CONFIG_SHELL=$as_dir/$as_base
15987 export CONFIG_SHELL
15988 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15989 fi;;
15990 esac
15991 done
15992done
15993;;
Jack Jansendd19cf82001-12-06 22:36:17 +000015994 esac
15995
Martin v. Löwis11437992002-04-12 09:54:03 +000015996 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
15997 # uniformly replaced by the line number. The first 'sed' inserts a
15998 # line-number line before each line; the second 'sed' does the real
15999 # work. The second script uses 'N' to pair each line-number line
16000 # with the numbered line, and appends trailing '-' during
16001 # substitution so that $LINENO is not a special case at line end.
16002 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16003 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16004 sed '=' <$as_myself |
16005 sed '
16006 N
16007 s,$,-,
16008 : loop
16009 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16010 t loop
16011 s,-$,,
16012 s,^['$as_cr_digits']*\n,,
16013 ' >$as_me.lineno &&
16014 chmod +x $as_me.lineno ||
16015 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16016echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16017 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016018
Martin v. Löwis11437992002-04-12 09:54:03 +000016019 # Don't try to exec as it changes $[0], causing all sort of problems
16020 # (the dirname of $[0] is not the place where we might find the
16021 # original and so on. Autoconf is especially sensible to this).
16022 . ./$as_me.lineno
16023 # Exit status is that of the last command.
16024 exit
16025}
16026
16027
16028case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16029 *c*,-n*) ECHO_N= ECHO_C='
16030' ECHO_T=' ' ;;
16031 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16032 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16033esac
16034
16035if expr a : '\(a\)' >/dev/null 2>&1; then
16036 as_expr=expr
16037else
16038 as_expr=false
16039fi
16040
16041rm -f conf$$ conf$$.exe conf$$.file
16042echo >conf$$.file
16043if ln -s conf$$.file conf$$ 2>/dev/null; then
16044 # We could just check for DJGPP; but this test a) works b) is more generic
16045 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16046 if test -f conf$$.exe; then
16047 # Don't use ln at all; we don't have any links
16048 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016049 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016050 as_ln_s='ln -s'
16051 fi
16052elif ln conf$$.file conf$$ 2>/dev/null; then
16053 as_ln_s=ln
16054else
16055 as_ln_s='cp -p'
16056fi
16057rm -f conf$$ conf$$.exe conf$$.file
16058
16059as_executable_p="test -f"
16060
16061# Sed expression to map a string onto a valid CPP name.
16062as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16063
16064# Sed expression to map a string onto a valid variable name.
16065as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16066
16067
16068# IFS
16069# We need space, tab and new line, in precisely that order.
16070as_nl='
16071'
16072IFS=" $as_nl"
16073
16074# CDPATH.
16075$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16076
16077exec 6>&1
16078
16079# Open the log real soon, to keep \$[0] and so on meaningful, and to
16080# report actual input values of CONFIG_FILES etc. instead of their
16081# values after options handling. Logging --version etc. is OK.
16082exec 5>>config.log
16083{
16084 echo
16085 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16086## Running $as_me. ##
16087_ASBOX
16088} >&5
16089cat >&5 <<_CSEOF
16090
16091This file was extended by $as_me, which was
16092generated by GNU Autoconf 2.53. Invocation command line was
16093
16094 CONFIG_FILES = $CONFIG_FILES
16095 CONFIG_HEADERS = $CONFIG_HEADERS
16096 CONFIG_LINKS = $CONFIG_LINKS
16097 CONFIG_COMMANDS = $CONFIG_COMMANDS
16098 $ $0 $@
16099
16100_CSEOF
16101echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16102echo >&5
16103_ACEOF
16104
16105# Files that config.status was made for.
16106if test -n "$ac_config_files"; then
16107 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16108fi
16109
16110if test -n "$ac_config_headers"; then
16111 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16112fi
16113
16114if test -n "$ac_config_links"; then
16115 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16116fi
16117
16118if test -n "$ac_config_commands"; then
16119 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16120fi
16121
16122cat >>$CONFIG_STATUS <<\_ACEOF
16123
16124ac_cs_usage="\
16125\`$as_me' instantiates files from templates according to the
16126current configuration.
16127
16128Usage: $0 [OPTIONS] [FILE]...
16129
16130 -h, --help print this help, then exit
16131 -V, --version print version number, then exit
16132 -d, --debug don't remove temporary files
16133 --recheck update $as_me by reconfiguring in the same conditions
16134 --file=FILE[:TEMPLATE]
16135 instantiate the configuration file FILE
16136 --header=FILE[:TEMPLATE]
16137 instantiate the configuration header FILE
16138
16139Configuration files:
16140$config_files
16141
16142Configuration headers:
16143$config_headers
16144
16145Report bugs to <bug-autoconf@gnu.org>."
16146_ACEOF
16147
16148cat >>$CONFIG_STATUS <<_ACEOF
16149ac_cs_version="\\
16150config.status
16151configured by $0, generated by GNU Autoconf 2.53,
16152 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16153
16154Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16155Free Software Foundation, Inc.
16156This config.status script is free software; the Free Software Foundation
16157gives unlimited permission to copy, distribute and modify it."
16158srcdir=$srcdir
16159INSTALL="$INSTALL"
16160_ACEOF
16161
16162cat >>$CONFIG_STATUS <<\_ACEOF
16163# If no file are specified by the user, then we need to provide default
16164# value. By we need to know if files were specified by the user.
16165ac_need_defaults=:
16166while test $# != 0
16167do
16168 case $1 in
16169 --*=*)
16170 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16171 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16172 shift
16173 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16174 shift
16175 ;;
16176 -*);;
16177 *) # This is not an option, so the user has probably given explicit
16178 # arguments.
16179 ac_need_defaults=false;;
16180 esac
16181
16182 case $1 in
16183 # Handling of the options.
16184_ACEOF
16185cat >>$CONFIG_STATUS <<_ACEOF
16186 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16187 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16188 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16189_ACEOF
16190cat >>$CONFIG_STATUS <<\_ACEOF
16191 --version | --vers* | -V )
16192 echo "$ac_cs_version"; exit 0 ;;
16193 --he | --h)
16194 # Conflict between --help and --header
16195 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16196Try \`$0 --help' for more information." >&5
16197echo "$as_me: error: ambiguous option: $1
16198Try \`$0 --help' for more information." >&2;}
16199 { (exit 1); exit 1; }; };;
16200 --help | --hel | -h )
16201 echo "$ac_cs_usage"; exit 0 ;;
16202 --debug | --d* | -d )
16203 debug=: ;;
16204 --file | --fil | --fi | --f )
16205 shift
16206 CONFIG_FILES="$CONFIG_FILES $1"
16207 ac_need_defaults=false;;
16208 --header | --heade | --head | --hea )
16209 shift
16210 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16211 ac_need_defaults=false;;
16212
16213 # This is an error.
16214 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16215Try \`$0 --help' for more information." >&5
16216echo "$as_me: error: unrecognized option: $1
16217Try \`$0 --help' for more information." >&2;}
16218 { (exit 1); exit 1; }; } ;;
16219
16220 *) ac_config_targets="$ac_config_targets $1" ;;
16221
16222 esac
16223 shift
16224done
16225
16226_ACEOF
16227
16228
16229
16230
16231
16232cat >>$CONFIG_STATUS <<\_ACEOF
16233for ac_config_target in $ac_config_targets
16234do
16235 case "$ac_config_target" in
16236 # Handling of arguments.
16237 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16238 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16239 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16240 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16241echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16242 { (exit 1); exit 1; }; };;
16243 esac
16244done
16245
16246# If the user did not use the arguments to specify the items to instantiate,
16247# then the envvar interface is used. Set only those that are not.
16248# We use the long form for the default assignment because of an extremely
16249# bizarre bug on SunOS 4.1.3.
16250if $ac_need_defaults; then
16251 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16252 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16253fi
16254
16255# Create a temporary directory, and hook for its removal unless debugging.
16256$debug ||
16257{
16258 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16259 trap '{ (exit 1); exit 1; }' 1 2 13 15
16260}
16261
16262# Create a (secure) tmp directory for tmp files.
16263: ${TMPDIR=/tmp}
16264{
16265 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16266 test -n "$tmp" && test -d "$tmp"
16267} ||
16268{
16269 tmp=$TMPDIR/cs$$-$RANDOM
16270 (umask 077 && mkdir $tmp)
16271} ||
16272{
16273 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16274 { (exit 1); exit 1; }
16275}
16276
16277_ACEOF
16278
16279cat >>$CONFIG_STATUS <<_ACEOF
16280
16281#
16282# CONFIG_FILES section.
16283#
16284
16285# No need to generate the scripts if there are no CONFIG_FILES.
16286# This happens for instance when ./config.status config.h
16287if test -n "\$CONFIG_FILES"; then
16288 # Protect against being on the right side of a sed subst in config.status.
16289 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16290 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16291s,@SHELL@,$SHELL,;t t
16292s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16293s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16294s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16295s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16296s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16297s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16298s,@exec_prefix@,$exec_prefix,;t t
16299s,@prefix@,$prefix,;t t
16300s,@program_transform_name@,$program_transform_name,;t t
16301s,@bindir@,$bindir,;t t
16302s,@sbindir@,$sbindir,;t t
16303s,@libexecdir@,$libexecdir,;t t
16304s,@datadir@,$datadir,;t t
16305s,@sysconfdir@,$sysconfdir,;t t
16306s,@sharedstatedir@,$sharedstatedir,;t t
16307s,@localstatedir@,$localstatedir,;t t
16308s,@libdir@,$libdir,;t t
16309s,@includedir@,$includedir,;t t
16310s,@oldincludedir@,$oldincludedir,;t t
16311s,@infodir@,$infodir,;t t
16312s,@mandir@,$mandir,;t t
16313s,@build_alias@,$build_alias,;t t
16314s,@host_alias@,$host_alias,;t t
16315s,@target_alias@,$target_alias,;t t
16316s,@DEFS@,$DEFS,;t t
16317s,@ECHO_C@,$ECHO_C,;t t
16318s,@ECHO_N@,$ECHO_N,;t t
16319s,@ECHO_T@,$ECHO_T,;t t
16320s,@LIBS@,$LIBS,;t t
16321s,@VERSION@,$VERSION,;t t
16322s,@SOVERSION@,$SOVERSION,;t t
16323s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16324s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16325s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16326s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16327s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16328s,@MACHDEP@,$MACHDEP,;t t
16329s,@SGI_ABI@,$SGI_ABI,;t t
16330s,@CXX@,$CXX,;t t
16331s,@MAINOBJ@,$MAINOBJ,;t t
16332s,@EXEEXT@,$EXEEXT,;t t
16333s,@CC@,$CC,;t t
16334s,@CFLAGS@,$CFLAGS,;t t
16335s,@LDFLAGS@,$LDFLAGS,;t t
16336s,@CPPFLAGS@,$CPPFLAGS,;t t
16337s,@ac_ct_CC@,$ac_ct_CC,;t t
16338s,@OBJEXT@,$OBJEXT,;t t
16339s,@CPP@,$CPP,;t t
16340s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16341s,@LIBRARY@,$LIBRARY,;t t
16342s,@LDLIBRARY@,$LDLIBRARY,;t t
16343s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16344s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16345s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16346s,@INSTSONAME@,$INSTSONAME,;t t
16347s,@RUNSHARED@,$RUNSHARED,;t t
16348s,@LINKCC@,$LINKCC,;t t
16349s,@RANLIB@,$RANLIB,;t t
16350s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16351s,@AR@,$AR,;t t
16352s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16353s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16354s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16355s,@LN@,$LN,;t t
16356s,@OPT@,$OPT,;t t
16357s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16358s,@SO@,$SO,;t t
16359s,@LDSHARED@,$LDSHARED,;t t
16360s,@BLDSHARED@,$BLDSHARED,;t t
16361s,@CCSHARED@,$CCSHARED,;t t
16362s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16363s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
16364s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16365s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16366s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16367s,@LDLAST@,$LDLAST,;t t
16368s,@THREADOBJ@,$THREADOBJ,;t t
16369s,@DLINCLDIR@,$DLINCLDIR,;t t
16370s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16371s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16372s,@LIBOBJS@,$LIBOBJS,;t t
16373s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16374s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16375s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16376s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16377s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16378s,@LIBM@,$LIBM,;t t
16379s,@LIBC@,$LIBC,;t t
16380s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16381s,@THREADHEADERS@,$THREADHEADERS,;t t
16382s,@SRCDIRS@,$SRCDIRS,;t t
16383CEOF
16384
16385_ACEOF
16386
16387 cat >>$CONFIG_STATUS <<\_ACEOF
16388 # Split the substitutions into bite-sized pieces for seds with
16389 # small command number limits, like on Digital OSF/1 and HP-UX.
16390 ac_max_sed_lines=48
16391 ac_sed_frag=1 # Number of current file.
16392 ac_beg=1 # First line for current file.
16393 ac_end=$ac_max_sed_lines # Line after last line for current file.
16394 ac_more_lines=:
16395 ac_sed_cmds=
16396 while $ac_more_lines; do
16397 if test $ac_beg -gt 1; then
16398 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16399 else
16400 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16401 fi
16402 if test ! -s $tmp/subs.frag; then
16403 ac_more_lines=false
16404 else
16405 # The purpose of the label and of the branching condition is to
16406 # speed up the sed processing (if there are no `@' at all, there
16407 # is no need to browse any of the substitutions).
16408 # These are the two extra sed commands mentioned above.
16409 (echo ':t
16410 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16411 if test -z "$ac_sed_cmds"; then
16412 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16413 else
16414 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16415 fi
16416 ac_sed_frag=`expr $ac_sed_frag + 1`
16417 ac_beg=$ac_end
16418 ac_end=`expr $ac_end + $ac_max_sed_lines`
16419 fi
16420 done
16421 if test -z "$ac_sed_cmds"; then
16422 ac_sed_cmds=cat
16423 fi
16424fi # test -n "$CONFIG_FILES"
16425
16426_ACEOF
16427cat >>$CONFIG_STATUS <<\_ACEOF
16428for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16429 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16430 case $ac_file in
16431 - | *:- | *:-:* ) # input from stdin
16432 cat >$tmp/stdin
16433 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16434 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16435 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16436 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16437 * ) ac_file_in=$ac_file.in ;;
16438 esac
16439
16440 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16441 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16442$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16443 X"$ac_file" : 'X\(//\)[^/]' \| \
16444 X"$ac_file" : 'X\(//\)$' \| \
16445 X"$ac_file" : 'X\(/\)' \| \
16446 . : '\(.\)' 2>/dev/null ||
16447echo X"$ac_file" |
16448 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16449 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16450 /^X\(\/\/\)$/{ s//\1/; q; }
16451 /^X\(\/\).*/{ s//\1/; q; }
16452 s/.*/./; q'`
16453 { case "$ac_dir" in
16454 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16455 *) as_incr_dir=.;;
16456esac
16457as_dummy="$ac_dir"
16458for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16459 case $as_mkdir_dir in
16460 # Skip DOS drivespec
16461 ?:) as_incr_dir=$as_mkdir_dir ;;
16462 *)
16463 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16464 test -d "$as_incr_dir" ||
16465 mkdir "$as_incr_dir" ||
16466 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16467echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16468 { (exit 1); exit 1; }; }
16469 ;;
16470 esac
16471done; }
16472
16473 ac_builddir=.
16474
16475if test "$ac_dir" != .; then
16476 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16477 # A "../" for each directory in $ac_dir_suffix.
16478 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16479else
16480 ac_dir_suffix= ac_top_builddir=
16481fi
16482
16483case $srcdir in
16484 .) # No --srcdir option. We are building in place.
16485 ac_srcdir=.
16486 if test -z "$ac_top_builddir"; then
16487 ac_top_srcdir=.
16488 else
16489 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16490 fi ;;
16491 [\\/]* | ?:[\\/]* ) # Absolute path.
16492 ac_srcdir=$srcdir$ac_dir_suffix;
16493 ac_top_srcdir=$srcdir ;;
16494 *) # Relative path.
16495 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16496 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16497esac
16498# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16499# absolute.
16500ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16501ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16502ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16503ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16504
16505
16506 case $INSTALL in
16507 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16508 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16509 esac
16510
16511 if test x"$ac_file" != x-; then
16512 { echo "$as_me:$LINENO: creating $ac_file" >&5
16513echo "$as_me: creating $ac_file" >&6;}
16514 rm -f "$ac_file"
16515 fi
16516 # Let's still pretend it is `configure' which instantiates (i.e., don't
16517 # use $as_me), people would be surprised to read:
16518 # /* config.h. Generated by config.status. */
16519 if test x"$ac_file" = x-; then
16520 configure_input=
16521 else
16522 configure_input="$ac_file. "
16523 fi
16524 configure_input=$configure_input"Generated from `echo $ac_file_in |
16525 sed 's,.*/,,'` by configure."
16526
16527 # First look for the input files in the build tree, otherwise in the
16528 # src tree.
16529 ac_file_inputs=`IFS=:
16530 for f in $ac_file_in; do
16531 case $f in
16532 -) echo $tmp/stdin ;;
16533 [\\/$]*)
16534 # Absolute (can't be DOS-style, as IFS=:)
16535 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16536echo "$as_me: error: cannot find input file: $f" >&2;}
16537 { (exit 1); exit 1; }; }
16538 echo $f;;
16539 *) # Relative
16540 if test -f "$f"; then
16541 # Build tree
16542 echo $f
16543 elif test -f "$srcdir/$f"; then
16544 # Source tree
16545 echo $srcdir/$f
16546 else
16547 # /dev/null tree
16548 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16549echo "$as_me: error: cannot find input file: $f" >&2;}
16550 { (exit 1); exit 1; }; }
16551 fi;;
16552 esac
16553 done` || { (exit 1); exit 1; }
16554_ACEOF
16555cat >>$CONFIG_STATUS <<_ACEOF
16556 sed "$ac_vpsub
16557$extrasub
16558_ACEOF
16559cat >>$CONFIG_STATUS <<\_ACEOF
16560:t
16561/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16562s,@configure_input@,$configure_input,;t t
16563s,@srcdir@,$ac_srcdir,;t t
16564s,@abs_srcdir@,$ac_abs_srcdir,;t t
16565s,@top_srcdir@,$ac_top_srcdir,;t t
16566s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16567s,@builddir@,$ac_builddir,;t t
16568s,@abs_builddir@,$ac_abs_builddir,;t t
16569s,@top_builddir@,$ac_top_builddir,;t t
16570s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16571s,@INSTALL@,$ac_INSTALL,;t t
16572" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16573 rm -f $tmp/stdin
16574 if test x"$ac_file" != x-; then
16575 mv $tmp/out $ac_file
16576 else
16577 cat $tmp/out
16578 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016579 fi
16580
Martin v. Löwis11437992002-04-12 09:54:03 +000016581done
16582_ACEOF
16583cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016584
Martin v. Löwis11437992002-04-12 09:54:03 +000016585#
16586# CONFIG_HEADER section.
16587#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016588
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016589# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16590# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016591#
16592# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016593ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16594ac_dB='[ ].*$,\1#\2'
16595ac_dC=' '
16596ac_dD=',;t'
16597# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16598ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16599ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016600ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016601ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016602
Martin v. Löwis11437992002-04-12 09:54:03 +000016603for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016604 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016605 case $ac_file in
16606 - | *:- | *:-:* ) # input from stdin
16607 cat >$tmp/stdin
16608 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16609 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16610 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16611 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16612 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016613 esac
16614
Martin v. Löwis11437992002-04-12 09:54:03 +000016615 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16616echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016617
Martin v. Löwis11437992002-04-12 09:54:03 +000016618 # First look for the input files in the build tree, otherwise in the
16619 # src tree.
16620 ac_file_inputs=`IFS=:
16621 for f in $ac_file_in; do
16622 case $f in
16623 -) echo $tmp/stdin ;;
16624 [\\/$]*)
16625 # Absolute (can't be DOS-style, as IFS=:)
16626 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16627echo "$as_me: error: cannot find input file: $f" >&2;}
16628 { (exit 1); exit 1; }; }
16629 echo $f;;
16630 *) # Relative
16631 if test -f "$f"; then
16632 # Build tree
16633 echo $f
16634 elif test -f "$srcdir/$f"; then
16635 # Source tree
16636 echo $srcdir/$f
16637 else
16638 # /dev/null tree
16639 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16640echo "$as_me: error: cannot find input file: $f" >&2;}
16641 { (exit 1); exit 1; }; }
16642 fi;;
16643 esac
16644 done` || { (exit 1); exit 1; }
16645 # Remove the trailing spaces.
16646 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016647
Martin v. Löwis11437992002-04-12 09:54:03 +000016648_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016649
Martin v. Löwis11437992002-04-12 09:54:03 +000016650# Transform confdefs.h into two sed scripts, `conftest.defines' and
16651# `conftest.undefs', that substitutes the proper values into
16652# config.h.in to produce config.h. The first handles `#define'
16653# templates, and the second `#undef' templates.
16654# And first: Protect against being on the right side of a sed subst in
16655# config.status. Protect against being in an unquoted here document
16656# in config.status.
16657rm -f conftest.defines conftest.undefs
16658# Using a here document instead of a string reduces the quoting nightmare.
16659# Putting comments in sed scripts is not portable.
16660#
16661# `end' is used to avoid that the second main sed command (meant for
16662# 0-ary CPP macros) applies to n-ary macro definitions.
16663# See the Autoconf documentation for `clear'.
16664cat >confdef2sed.sed <<\_ACEOF
16665s/[\\&,]/\\&/g
16666s,[\\$`],\\&,g
16667t clear
16668: clear
16669s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16670t end
16671s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16672: end
16673_ACEOF
16674# If some macros were called several times there might be several times
16675# the same #defines, which is useless. Nevertheless, we may not want to
16676# sort them, since we want the *last* AC-DEFINE to be honored.
16677uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16678sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16679rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016680
16681# This sed command replaces #undef with comments. This is necessary, for
16682# example, in the case of _POSIX_SOURCE, which is predefined and required
16683# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016684cat >>conftest.undefs <<\_ACEOF
16685s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16686_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016687
Martin v. Löwis11437992002-04-12 09:54:03 +000016688# Break up conftest.defines because some shells have a limit on the size
16689# of here documents, and old seds have small limits too (100 cmds).
16690echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16691echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16692echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16693echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016694rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016695while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016696do
Martin v. Löwis11437992002-04-12 09:54:03 +000016697 # Write a limited-size here document to $tmp/defines.sed.
16698 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16699 # Speed up: don't consider the non `#define' lines.
16700 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16701 # Work around the forget-to-reset-the-flag bug.
16702 echo 't clr' >>$CONFIG_STATUS
16703 echo ': clr' >>$CONFIG_STATUS
16704 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016705 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016706 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16707 rm -f $tmp/in
16708 mv $tmp/out $tmp/in
16709' >>$CONFIG_STATUS
16710 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16711 rm -f conftest.defines
16712 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016713done
Martin v. Löwis11437992002-04-12 09:54:03 +000016714rm -f conftest.defines
16715echo ' fi # egrep' >>$CONFIG_STATUS
16716echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016717
Martin v. Löwis11437992002-04-12 09:54:03 +000016718# Break up conftest.undefs because some shells have a limit on the size
16719# of here documents, and old seds have small limits too (100 cmds).
16720echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16721rm -f conftest.tail
16722while grep . conftest.undefs >/dev/null
16723do
16724 # Write a limited-size here document to $tmp/undefs.sed.
16725 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16726 # Speed up: don't consider the non `#undef'
16727 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16728 # Work around the forget-to-reset-the-flag bug.
16729 echo 't clr' >>$CONFIG_STATUS
16730 echo ': clr' >>$CONFIG_STATUS
16731 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16732 echo 'CEOF
16733 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16734 rm -f $tmp/in
16735 mv $tmp/out $tmp/in
16736' >>$CONFIG_STATUS
16737 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16738 rm -f conftest.undefs
16739 mv conftest.tail conftest.undefs
16740done
16741rm -f conftest.undefs
16742
16743cat >>$CONFIG_STATUS <<\_ACEOF
16744 # Let's still pretend it is `configure' which instantiates (i.e., don't
16745 # use $as_me), people would be surprised to read:
16746 # /* config.h. Generated by config.status. */
16747 if test x"$ac_file" = x-; then
16748 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016749 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016750 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016751 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016752 cat $tmp/in >>$tmp/config.h
16753 rm -f $tmp/in
16754 if test x"$ac_file" != x-; then
16755 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16756 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16757echo "$as_me: $ac_file is unchanged" >&6;}
16758 else
16759 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16760$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16761 X"$ac_file" : 'X\(//\)[^/]' \| \
16762 X"$ac_file" : 'X\(//\)$' \| \
16763 X"$ac_file" : 'X\(/\)' \| \
16764 . : '\(.\)' 2>/dev/null ||
16765echo X"$ac_file" |
16766 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16767 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16768 /^X\(\/\/\)$/{ s//\1/; q; }
16769 /^X\(\/\).*/{ s//\1/; q; }
16770 s/.*/./; q'`
16771 { case "$ac_dir" in
16772 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16773 *) as_incr_dir=.;;
16774esac
16775as_dummy="$ac_dir"
16776for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16777 case $as_mkdir_dir in
16778 # Skip DOS drivespec
16779 ?:) as_incr_dir=$as_mkdir_dir ;;
16780 *)
16781 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16782 test -d "$as_incr_dir" ||
16783 mkdir "$as_incr_dir" ||
16784 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16785echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16786 { (exit 1); exit 1; }; }
16787 ;;
16788 esac
16789done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016790
Martin v. Löwis11437992002-04-12 09:54:03 +000016791 rm -f $ac_file
16792 mv $tmp/config.h $ac_file
16793 fi
16794 else
16795 cat $tmp/config.h
16796 rm -f $tmp/config.h
16797 fi
16798done
16799_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016800
Martin v. Löwis11437992002-04-12 09:54:03 +000016801cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016802
Martin v. Löwis11437992002-04-12 09:54:03 +000016803{ (exit 0); exit 0; }
16804_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016805chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016806ac_clean_files=$ac_clean_files_save
16807
16808
16809# configure is writing to config.log, and then calls config.status.
16810# config.status does its own redirection, appending to config.log.
16811# Unfortunately, on DOS this fails, as config.log is still kept open
16812# by configure, so config.status won't be able to write to it; its
16813# output is simply discarded. So we exec the FD to /dev/null,
16814# effectively closing config.log, so it can be properly (re)opened and
16815# appended to by config.status. When coming back to configure, we
16816# need to make the FD available again.
16817if test "$no_create" != yes; then
16818 ac_cs_success=:
16819 exec 5>/dev/null
16820 $SHELL $CONFIG_STATUS || ac_cs_success=false
16821 exec 5>>config.log
16822 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16823 # would make configure fail if this is the last instruction.
16824 $ac_cs_success || { (exit 1); exit 1; }
16825fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016826
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016827
16828echo "creating Setup"
16829if test ! -f Modules/Setup
16830then
16831 cp $srcdir/Modules/Setup.dist Modules/Setup
16832fi
16833
16834echo "creating Setup.local"
16835if test ! -f Modules/Setup.local
16836then
16837 echo "# Edit this file for local setup changes" >Modules/Setup.local
16838fi
16839
16840echo "creating Makefile"
16841$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16842 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016843 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016844mv config.c Modules