blob: 4bd474084d82d761fe6ec4f3e861102f516f6a99 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossume5bd2f42002-07-19 19:32:30 +00002# From configure.in Revision: 1.333 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis11437992002-04-12 09:54:03 +00004# Generated by GNU Autoconf 2.53.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
30# NLS nuisances.
31# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
38(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
256PACKAGE_NAME=
257PACKAGE_TARNAME=
258PACKAGE_VERSION=
259PACKAGE_STRING=
260PACKAGE_BUGREPORT=
261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
764\`configure' configures this package to adapt to many kinds of systems.
765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
820
821 cat <<\_ACEOF
822
823Optional Features:
824 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
825 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
826 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
827 --enable-shared disable/enable building shared python library
828 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
829 --enable-ipv6 Enable ipv6 (with ipv4) support
830 --disable-ipv6 Disable ipv6 support
831 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
832
833Optional Packages:
834 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
835 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
836 --without-gcc never use gcc
837 --with-cxx=<compiler> enable C++ support
838 --with-suffix=.exe set executable suffix
839 --with-pydebug build with Py_DEBUG defined
840 --with-libs='lib1 ...' link against additional libs
841 --with-signal-module disable/enable signal module
842 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
843 --with(out)-threads=DIRECTORY disable/enable thread support
844 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
845 --with-pth use GNU pth threading libraries
Jack Jansen7b8c7542002-04-14 20:12:41 +0000846 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +0000847 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 --with(out)-pymalloc disable/enable specialized mallocs
849 --with-wctype-functions use wctype.h functions
850 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
851 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
852 --with-fpectl enable SIGFPE catching
853 --with-libm=STRING math library
854 --with-libc=STRING C library
855
856Some influential environment variables:
857 CC C compiler command
858 CFLAGS C compiler flags
859 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
860 nonstandard directory <lib dir>
861 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
862 headers in a nonstandard directory <include dir>
863 CPP C preprocessor
864
865Use these variables to override the choices made by `configure' or to help
866it to find libraries and programs with nonstandard names/locations.
867
868_ACEOF
869fi
870
871if test "$ac_init_help" = "recursive"; then
872 # If there are subdirs, report their specific --help.
873 ac_popdir=`pwd`
874 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
875 test -d $ac_dir || continue
876 ac_builddir=.
877
878if test "$ac_dir" != .; then
879 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
880 # A "../" for each directory in $ac_dir_suffix.
881 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
882else
883 ac_dir_suffix= ac_top_builddir=
884fi
885
886case $srcdir in
887 .) # No --srcdir option. We are building in place.
888 ac_srcdir=.
889 if test -z "$ac_top_builddir"; then
890 ac_top_srcdir=.
891 else
892 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
893 fi ;;
894 [\\/]* | ?:[\\/]* ) # Absolute path.
895 ac_srcdir=$srcdir$ac_dir_suffix;
896 ac_top_srcdir=$srcdir ;;
897 *) # Relative path.
898 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
899 ac_top_srcdir=$ac_top_builddir$srcdir ;;
900esac
901# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
902# absolute.
903ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
904ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
905ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
906ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
907
908 cd $ac_dir
909 # Check for guested configure; otherwise get Cygnus style configure.
910 if test -f $ac_srcdir/configure.gnu; then
911 echo
912 $SHELL $ac_srcdir/configure.gnu --help=recursive
913 elif test -f $ac_srcdir/configure; then
914 echo
915 $SHELL $ac_srcdir/configure --help=recursive
916 elif test -f $ac_srcdir/configure.ac ||
917 test -f $ac_srcdir/configure.in; then
918 echo
919 $ac_configure --help
920 else
921 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
922 fi
923 cd $ac_popdir
924 done
925fi
926
927test -n "$ac_init_help" && exit 0
928if $ac_init_version; then
929 cat <<\_ACEOF
930
931Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
932Free Software Foundation, Inc.
933This configure script is free software; the Free Software Foundation
934gives unlimited permission to copy, distribute and modify it.
935_ACEOF
936 exit 0
937fi
938exec 5>config.log
939cat >&5 <<_ACEOF
940This file contains any messages produced by compilers while
941running configure, to aid debugging if configure makes a mistake.
942
943It was created by $as_me, which was
944generated by GNU Autoconf 2.53. Invocation command line was
945
946 $ $0 $@
947
948_ACEOF
949{
950cat <<_ASUNAME
951## --------- ##
952## Platform. ##
953## --------- ##
954
955hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
956uname -m = `(uname -m) 2>/dev/null || echo unknown`
957uname -r = `(uname -r) 2>/dev/null || echo unknown`
958uname -s = `(uname -s) 2>/dev/null || echo unknown`
959uname -v = `(uname -v) 2>/dev/null || echo unknown`
960
961/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
962/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
963
964/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
965/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
966/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
967hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
968/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
969/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
970/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
971
972_ASUNAME
973
974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
975for as_dir in $PATH
976do
977 IFS=$as_save_IFS
978 test -z "$as_dir" && as_dir=.
979 echo "PATH: $as_dir"
980done
981
982} >&5
983
984cat >&5 <<_ACEOF
985
986
987## ----------- ##
988## Core tests. ##
989## ----------- ##
990
991_ACEOF
992
993
994# Keep a trace of the command line.
995# Strip out --no-create and --no-recursion so they do not pile up.
996# Also quote any args containing shell meta-characters.
997ac_configure_args=
998ac_sep=
999for ac_arg
1000do
1001 case $ac_arg in
1002 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003 | --no-cr | --no-c | -n ) continue ;;
1004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 continue ;;
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1009 esac
1010 case " $ac_configure_args " in
1011 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1012 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1013 ac_sep=" " ;;
1014 esac
1015 # Get rid of the leading space.
1016done
1017
1018# When interrupted or exit'd, cleanup temporary files, and complete
1019# config.log. We remove comments because anyway the quotes in there
1020# would cause problems or look ugly.
1021# WARNING: Be sure not to use single quotes in there, as some shells,
1022# such as our DU 5.0 friend, will then `close' the trap.
1023trap 'exit_status=$?
1024 # Save into config.log some information that might help in debugging.
1025 {
1026 echo
1027 cat <<\_ASBOX
1028## ---------------- ##
1029## Cache variables. ##
1030## ---------------- ##
1031_ASBOX
1032 echo
1033 # The following way of writing the cache mishandles newlines in values,
1034{
1035 (set) 2>&1 |
1036 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1037 *ac_space=\ *)
1038 sed -n \
1039 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1040 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1041 ;;
1042 *)
1043 sed -n \
1044 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1045 ;;
1046 esac;
1047}
1048 echo
1049 if test -s confdefs.h; then
1050 cat <<\_ASBOX
1051## ----------- ##
1052## confdefs.h. ##
1053## ----------- ##
1054_ASBOX
1055 echo
1056 sed "/^$/d" confdefs.h
1057 echo
1058 fi
1059 test "$ac_signal" != 0 &&
1060 echo "$as_me: caught signal $ac_signal"
1061 echo "$as_me: exit $exit_status"
1062 } >&5
1063 rm -f core core.* *.core &&
1064 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1065 exit $exit_status
1066 ' 0
1067for ac_signal in 1 2 13 15; do
1068 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1069done
1070ac_signal=0
1071
1072# confdefs.h avoids OS command line length limits that DEFS can exceed.
1073rm -rf conftest* confdefs.h
1074# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1075echo >confdefs.h
1076
1077# Predefined preprocessor variables.
1078
1079cat >>confdefs.h <<_ACEOF
1080#define PACKAGE_NAME "$PACKAGE_NAME"
1081_ACEOF
1082
1083
1084cat >>confdefs.h <<_ACEOF
1085#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1086_ACEOF
1087
1088
1089cat >>confdefs.h <<_ACEOF
1090#define PACKAGE_VERSION "$PACKAGE_VERSION"
1091_ACEOF
1092
1093
1094cat >>confdefs.h <<_ACEOF
1095#define PACKAGE_STRING "$PACKAGE_STRING"
1096_ACEOF
1097
1098
1099cat >>confdefs.h <<_ACEOF
1100#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1101_ACEOF
1102
1103
1104# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105# Prefer explicitly selected file to automatically selected ones.
1106if test -z "$CONFIG_SITE"; then
1107 if test "x$prefix" != xNONE; then
1108 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1109 else
1110 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1111 fi
1112fi
1113for ac_site_file in $CONFIG_SITE; do
1114 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1116echo "$as_me: loading site script $ac_site_file" >&6;}
1117 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 . "$ac_site_file"
1119 fi
1120done
1121
1122if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # Some versions of bash will fail to source /dev/null (special
1124 # files actually), so we avoid doing that.
1125 if test -f "$cache_file"; then
1126 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1127echo "$as_me: loading cache $cache_file" >&6;}
1128 case $cache_file in
1129 [\\/]* | ?:[\\/]* ) . $cache_file;;
1130 *) . ./$cache_file;;
1131 esac
1132 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133else
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1135echo "$as_me: creating cache $cache_file" >&6;}
1136 >$cache_file
1137fi
1138
1139# Check that the precious variables saved in the cache have kept the same
1140# value.
1141ac_cache_corrupted=false
1142for ac_var in `(set) 2>&1 |
1143 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1144 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1145 eval ac_new_set=\$ac_env_${ac_var}_set
1146 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1147 eval ac_new_val="\$ac_env_${ac_var}_value"
1148 case $ac_old_set,$ac_new_set in
1149 set,)
1150 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1151echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1152 ac_cache_corrupted=: ;;
1153 ,set)
1154 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1155echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1156 ac_cache_corrupted=: ;;
1157 ,);;
1158 *)
1159 if test "x$ac_old_val" != "x$ac_new_val"; then
1160 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1161echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1162 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1163echo "$as_me: former value: $ac_old_val" >&2;}
1164 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1165echo "$as_me: current value: $ac_new_val" >&2;}
1166 ac_cache_corrupted=:
1167 fi;;
1168 esac
1169 # Pass precious variables to config.status.
1170 if test "$ac_new_set" = set; then
1171 case $ac_new_val in
1172 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1173 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1174 *) ac_arg=$ac_var=$ac_new_val ;;
1175 esac
1176 case " $ac_configure_args " in
1177 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1178 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1179 esac
1180 fi
1181done
1182if $ac_cache_corrupted; then
1183 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1184echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1185 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1186echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1187 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188fi
1189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1194ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196
Michael W. Hudson54241132001-12-07 15:38:26 +00001197
1198
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213ac_config_headers="$ac_config_headers pyconfig.h"
1214
1215
1216# This is for stuff that absolutely must end up in pyconfig.h.
1217# Please use pyport.h instead, if possible.
1218
1219
1220
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001221# Set VERSION so we only need to edit in one place (i.e., here)
1222
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001223VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001224
Martin v. Löwis1142de32002-03-29 16:28:31 +00001225
1226SOVERSION=1.0
1227
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";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001295 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001296 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001297 esac
1298fi
Guido van Rossum91922671997-10-09 20:24:13 +00001299
1300#
1301# SGI compilers allow the specification of the both the ABI and the
1302# ISA on the command line. Depending on the values of these switches,
1303# different and often incompatable code will be generated.
1304#
1305# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1306# thus supply support for various ABI/ISA combinations. The MACHDEP
1307# variable is also adjusted.
1308#
1309
1310if test ! -z "$SGI_ABI"
1311then
1312 CC="cc $SGI_ABI"
1313 LDFLAGS="$SGI_ABI $LDFLAGS"
1314 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1315fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001316echo "$as_me:$LINENO: result: $MACHDEP" >&5
1317echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001318
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001320echo "$as_me:$LINENO: checking for --without-gcc" >&5
1321echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1322
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001323# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001324if test "${with_gcc+set}" = set; then
1325 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001326
Guido van Rossum7f43da71994-08-01 12:15:30 +00001327 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001328 no) CC=cc
1329 without_gcc=yes;;
1330 yes) CC=gcc
1331 without_gcc=no;;
1332 *) CC=$withval
1333 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001334 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001335else
Martin v. Löwis11437992002-04-12 09:54:03 +00001336
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001337 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001338 AIX*) CC=cc_r
1339 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001340 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001341 case $BE_HOST_CPU in
1342 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001343 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001344 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001345 OPT="-O -export pragma"
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 Jansen0b06be72002-06-21 14:48:38 +00002952if test -d "${srcdir}/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öwis09bdf722002-05-08 08:51:29 +00003021INSTSONAME='$(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
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003040 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003041 $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öwisb51033d2002-05-03 05:53:15 +00003073 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003074 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003075 enable_shared="yes";;
3076 *)
3077 enable_shared="no";;
3078 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003079fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003080echo "$as_me:$LINENO: result: $enable_shared" >&5
3081echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003082
3083
Martin v. Löwis11437992002-04-12 09:54:03 +00003084echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3085echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003086
Guido van Rossumb8552162001-09-05 14:58:11 +00003087# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3088# library that we build, but we do not want to link against it (we
3089# will find it with a -framework option). For this reason there is an
3090# extra variable BLDLIBRARY against which Python and the extension
3091# modules are linked, BLDLIBRARY. This is normally the same as
3092# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003093if test "$enable_framework"
3094then
3095 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3096 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3097 BLDLIBRARY=''
3098else
3099 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003100fi
Jack Jansene578a632001-08-15 01:27:14 +00003101
Martin v. Löwis1142de32002-03-29 16:28:31 +00003102# Other platforms follow
3103if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003104
3105cat >>confdefs.h <<\_ACEOF
3106#define Py_ENABLE_SHARED 1
3107_ACEOF
3108
Martin v. Löwis1142de32002-03-29 16:28:31 +00003109 case $ac_sys_system in
3110 BeOS*)
3111 LDLIBRARY='libpython$(VERSION).so'
3112 ;;
3113 CYGWIN*)
3114 LDLIBRARY='libpython$(VERSION).dll.a'
3115 DLLLIBRARY='libpython$(VERSION).dll'
3116 ;;
3117 SunOS*)
3118 LDLIBRARY='libpython$(VERSION).so'
3119 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3120 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3121 ;;
3122 Linux*)
3123 LDLIBRARY='libpython$(VERSION).so'
3124 BLDLIBRARY='-L. -lpython$(VERSION)'
3125 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3126 INSTSONAME="$LDLIBRARY".$SOVERSION
3127 ;;
3128 hp*|HP*)
3129 LDLIBRARY='libpython$(VERSION).sl'
3130 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3131 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3132 ;;
3133 OSF*)
3134 LDLIBRARY='libpython$(VERSION).so'
3135 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3136 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3137 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003138 atheos*)
3139 LDLIBRARY='libpython$(VERSION).so'
3140 BLDLIBRARY='-L. -lpython$(VERSION)'
3141 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3142 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003143 esac
3144 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3145 case $MACHDEP in
3146 dguxR4)
3147 LDLIBRARY='libpython$(VERSION).so'
3148 OPT="$OPT -pic"
3149 ;;
3150 esac
3151fi
3152
Martin v. Löwis11437992002-04-12 09:54:03 +00003153echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3154echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003155
Martin v. Löwis11437992002-04-12 09:54:03 +00003156if test -n "$ac_tool_prefix"; then
3157 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3158set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3159echo "$as_me:$LINENO: checking for $ac_word" >&5
3160echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3161if test "${ac_cv_prog_RANLIB+set}" = set; then
3162 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003163else
3164 if test -n "$RANLIB"; then
3165 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3166else
Martin v. Löwis11437992002-04-12 09:54:03 +00003167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3168for as_dir in $PATH
3169do
3170 IFS=$as_save_IFS
3171 test -z "$as_dir" && as_dir=.
3172 for ac_exec_ext in '' $ac_executable_extensions; do
3173 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3174 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3175 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3176 break 2
3177 fi
3178done
3179done
3180
Guido van Rossum627b2d71993-12-24 10:39:16 +00003181fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003183RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003184if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003185 echo "$as_me:$LINENO: result: $RANLIB" >&5
3186echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003187else
Martin v. Löwis11437992002-04-12 09:54:03 +00003188 echo "$as_me:$LINENO: result: no" >&5
3189echo "${ECHO_T}no" >&6
3190fi
3191
3192fi
3193if test -z "$ac_cv_prog_RANLIB"; then
3194 ac_ct_RANLIB=$RANLIB
3195 # Extract the first word of "ranlib", so it can be a program name with args.
3196set dummy ranlib; ac_word=$2
3197echo "$as_me:$LINENO: checking for $ac_word" >&5
3198echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3199if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3200 echo $ECHO_N "(cached) $ECHO_C" >&6
3201else
3202 if test -n "$ac_ct_RANLIB"; then
3203 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3204else
3205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3206for as_dir in $PATH
3207do
3208 IFS=$as_save_IFS
3209 test -z "$as_dir" && as_dir=.
3210 for ac_exec_ext in '' $ac_executable_extensions; do
3211 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3212 ac_cv_prog_ac_ct_RANLIB="ranlib"
3213 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3214 break 2
3215 fi
3216done
3217done
3218
3219 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3220fi
3221fi
3222ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3223if test -n "$ac_ct_RANLIB"; then
3224 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3225echo "${ECHO_T}$ac_ct_RANLIB" >&6
3226else
3227 echo "$as_me:$LINENO: result: no" >&5
3228echo "${ECHO_T}no" >&6
3229fi
3230
3231 RANLIB=$ac_ct_RANLIB
3232else
3233 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003234fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003235
3236
Guido van Rossum7f43da71994-08-01 12:15:30 +00003237for ac_prog in ar aal
3238do
Martin v. Löwis11437992002-04-12 09:54:03 +00003239 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003240set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003241echo "$as_me:$LINENO: checking for $ac_word" >&5
3242echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3243if test "${ac_cv_prog_AR+set}" = set; then
3244 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003245else
3246 if test -n "$AR"; then
3247 ac_cv_prog_AR="$AR" # Let the user override the test.
3248else
Martin v. Löwis11437992002-04-12 09:54:03 +00003249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3250for as_dir in $PATH
3251do
3252 IFS=$as_save_IFS
3253 test -z "$as_dir" && as_dir=.
3254 for ac_exec_ext in '' $ac_executable_extensions; do
3255 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3256 ac_cv_prog_AR="$ac_prog"
3257 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3258 break 2
3259 fi
3260done
3261done
3262
Guido van Rossum7f43da71994-08-01 12:15:30 +00003263fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003264fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003265AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003266if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003267 echo "$as_me:$LINENO: result: $AR" >&5
3268echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003269else
Martin v. Löwis11437992002-04-12 09:54:03 +00003270 echo "$as_me:$LINENO: result: no" >&5
3271echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003272fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003273
Martin v. Löwis11437992002-04-12 09:54:03 +00003274 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003275done
3276test -n "$AR" || AR="ar"
3277
Michael W. Hudson54241132001-12-07 15:38:26 +00003278
Neil Schemenauera42c8272001-03-31 00:01:55 +00003279case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003280bsdos*|hp*|HP*)
3281 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003282 if test -z "$INSTALL"
3283 then
3284 INSTALL="${srcdir}/install-sh -c"
3285 fi
3286esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003287ac_aux_dir=
3288for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3289 if test -f $ac_dir/install-sh; then
3290 ac_aux_dir=$ac_dir
3291 ac_install_sh="$ac_aux_dir/install-sh -c"
3292 break
3293 elif test -f $ac_dir/install.sh; then
3294 ac_aux_dir=$ac_dir
3295 ac_install_sh="$ac_aux_dir/install.sh -c"
3296 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003297 elif test -f $ac_dir/shtool; then
3298 ac_aux_dir=$ac_dir
3299 ac_install_sh="$ac_aux_dir/shtool install -c"
3300 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003301 fi
3302done
3303if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003304 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3305echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3306 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003308ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3309ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3310ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003311
3312# Find a good install program. We prefer a C program (faster),
3313# so one script is as good as another. But avoid the broken or
3314# incompatible versions:
3315# SysV /etc/install, /usr/sbin/install
3316# SunOS /usr/etc/install
3317# IRIX /sbin/install
3318# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003319# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003320# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3321# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3322# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3323# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003324echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3325echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003326if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003327if test "${ac_cv_path_install+set}" = set; then
3328 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003329else
Martin v. Löwis11437992002-04-12 09:54:03 +00003330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3331for as_dir in $PATH
3332do
3333 IFS=$as_save_IFS
3334 test -z "$as_dir" && as_dir=.
3335 # Account for people who put trailing slashes in PATH elements.
3336case $as_dir/ in
3337 ./ | .// | /cC/* | \
3338 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3339 /usr/ucb/* ) ;;
3340 *)
3341 # OSF1 and SCO ODT 3.0 have their own names for install.
3342 # Don't use installbsd from OSF since it installs stuff as root
3343 # by default.
3344 for ac_prog in ginstall scoinst install; do
3345 for ac_exec_ext in '' $ac_executable_extensions; do
3346 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3347 if test $ac_prog = install &&
3348 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3349 # AIX install. It has an incompatible calling convention.
3350 :
3351 elif test $ac_prog = install &&
3352 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3353 # program-specific install script used by HP pwplus--don't use.
3354 :
3355 else
3356 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3357 break 3
3358 fi
3359 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003360 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003361 done
3362 ;;
3363esac
3364done
3365
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003366
3367fi
3368 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003369 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003370 else
3371 # As a last resort, use the slow shell script. We don't cache a
3372 # path for INSTALL within a source directory, because that will
3373 # break other packages using the cache if that directory is
3374 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003375 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003376 fi
3377fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003378echo "$as_me:$LINENO: result: $INSTALL" >&5
3379echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003380
3381# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3382# It thinks the first close brace ends the variable substitution.
3383test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3384
Martin v. Löwis11437992002-04-12 09:54:03 +00003385test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003386
3387test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3388
Michael W. Hudson54241132001-12-07 15:38:26 +00003389
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003390# Not every filesystem supports hard links
3391
3392if test -z "$LN" ; then
3393 case $ac_sys_system in
3394 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003395 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003396 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003397 *) LN=ln;;
3398 esac
3399fi
3400
Fred Drake109d9862001-07-11 06:27:56 +00003401# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003402echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3403echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3404
Fred Drake109d9862001-07-11 06:27:56 +00003405# Check whether --with-pydebug or --without-pydebug was given.
3406if test "${with_pydebug+set}" = set; then
3407 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003408
Fred Drake109d9862001-07-11 06:27:56 +00003409if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003410then
3411
3412cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003413#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003414_ACEOF
3415
3416 echo "$as_me:$LINENO: result: yes" >&5
3417echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003418 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003419else echo "$as_me:$LINENO: result: no" >&5
3420echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003421fi
3422else
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 echo "$as_me:$LINENO: result: no" >&5
3424echo "${ECHO_T}no" >&6
3425fi;
Fred Drake109d9862001-07-11 06:27:56 +00003426
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003427# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003428
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003429if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003430then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003431 case $GCC in
3432 yes)
3433 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003434 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003435 if test "$Py_DEBUG" = 'true' ; then
3436 # Optimization messes up debuggers, so turn it off for
3437 # debug builds.
3438 OPT="-g -Wall -Wstrict-prototypes"
3439 else
3440 OPT="-g -O3 -Wall -Wstrict-prototypes"
3441 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003442 *)
Fred Drake109d9862001-07-11 06:27:56 +00003443 OPT="-O3 -Wall -Wstrict-prototypes";;
3444 esac
3445 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003446 *)
3447 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003448 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003449 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3450 *)
3451 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003452 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003453 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003454 case $ac_sys_system in
3455 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003456 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003457 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003458fi
3459
Fred Drakee1ceaa02001-12-04 20:55:47 +00003460if test "$Py_DEBUG" = 'true'; then
3461 :
3462else
3463 OPT="-DNDEBUG $OPT"
3464fi
3465
Trent Mick635f6fb2000-08-23 21:33:05 +00003466# The current (beta) Monterey compiler dies with optimizations
3467case $ac_sys_system in
3468Monterey*) OPT="";;
3469esac
3470
Guido van Rossum563e7081996-09-10 18:20:48 +00003471if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003472then
3473 OPT="$OPT $ac_arch_flags"
3474fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003475
Martin v. Löwis11437992002-04-12 09:54:03 +00003476echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3477echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3478if test "${ac_cv_opt_olimit_ok+set}" = set; then
3479 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003480else
3481 ac_save_cc="$CC"
3482CC="$CC -OPT:Olimit=0"
3483if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003484 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003485else
Martin v. Löwis11437992002-04-12 09:54:03 +00003486 cat >conftest.$ac_ext <<_ACEOF
3487#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003488#include "confdefs.h"
3489int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003490_ACEOF
3491rm -f conftest$ac_exeext
3492if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3493 (eval $ac_link) 2>&5
3494 ac_status=$?
3495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3496 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3498 (eval $ac_try) 2>&5
3499 ac_status=$?
3500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3501 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003502 ac_cv_opt_olimit_ok=yes
3503else
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 echo "$as_me: program exited with status $ac_status" >&5
3505echo "$as_me: failed program was:" >&5
3506cat conftest.$ac_ext >&5
3507( exit $ac_status )
3508ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003510rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003511fi
Guido van Rossum91922671997-10-09 20:24:13 +00003512CC="$ac_save_cc"
3513fi
3514
Martin v. Löwis11437992002-04-12 09:54:03 +00003515echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3516echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003517if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003518 case $ac_sys_system in
3519 Darwin*) OPT="$OPT" ;;
3520 *) OPT="$OPT -OPT:Olimit=0";;
3521 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003522else
Martin v. Löwis11437992002-04-12 09:54:03 +00003523 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3524echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3525 if test "${ac_cv_olimit_ok+set}" = set; then
3526 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003527else
3528 ac_save_cc="$CC"
3529 CC="$CC -Olimit 1500"
3530 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003531 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003532else
Martin v. Löwis11437992002-04-12 09:54:03 +00003533 cat >conftest.$ac_ext <<_ACEOF
3534#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003535#include "confdefs.h"
3536int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003537_ACEOF
3538rm -f conftest$ac_exeext
3539if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3540 (eval $ac_link) 2>&5
3541 ac_status=$?
3542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3545 (eval $ac_try) 2>&5
3546 ac_status=$?
3547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3548 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003549 ac_cv_olimit_ok=yes
3550else
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 echo "$as_me: program exited with status $ac_status" >&5
3552echo "$as_me: failed program was:" >&5
3553cat conftest.$ac_ext >&5
3554( exit $ac_status )
3555ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003556fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003557rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003558fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003559 CC="$ac_save_cc"
3560fi
3561
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3563echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003564 if test $ac_cv_olimit_ok = yes; then
3565 OPT="$OPT -Olimit 1500"
3566 fi
3567fi
3568
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003569# On some compilers, pthreads are available without further options
3570# (e.g. MacOS X). On some of these systems, the compiler will not
3571# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3572# So we have to see first whether pthreads are available without
3573# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003574echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3575echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3576if test "${ac_cv_pthread_is_default+set}" = set; then
3577 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003578else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003579 if test "$cross_compiling" = yes; then
3580 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003581else
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 cat >conftest.$ac_ext <<_ACEOF
3583#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003584#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003585
Martin v. Löwis130fb172001-07-19 11:00:41 +00003586#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003587
3588void* routine(void* p){return NULL;}
3589
3590int main(){
3591 pthread_t p;
3592 if(pthread_create(&p,NULL,routine,NULL)!=0)
3593 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003594 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003595 return 0;
3596}
3597
Martin v. Löwis11437992002-04-12 09:54:03 +00003598_ACEOF
3599rm -f conftest$ac_exeext
3600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3601 (eval $ac_link) 2>&5
3602 ac_status=$?
3603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3606 (eval $ac_try) 2>&5
3607 ac_status=$?
3608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3609 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003610 ac_cv_pthread_is_default=yes
3611else
Martin v. Löwis11437992002-04-12 09:54:03 +00003612 echo "$as_me: program exited with status $ac_status" >&5
3613echo "$as_me: failed program was:" >&5
3614cat conftest.$ac_ext >&5
3615( exit $ac_status )
3616ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003617fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003618rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003619fi
3620
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003621fi
3622
Martin v. Löwis11437992002-04-12 09:54:03 +00003623echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3624echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003625
Michael W. Hudson54241132001-12-07 15:38:26 +00003626
Martin v. Löwis11437992002-04-12 09:54:03 +00003627if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003628then
3629 ac_cv_kpthread=no
3630else
3631# -Kpthread, if available, provides the right #defines
3632# and linker options to make pthread_create available
3633# Some compilers won't report that they do not support -Kpthread,
3634# so we need to run a program to see whether it really made the
3635# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003636echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3637echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3638if test "${ac_cv_kpthread+set}" = set; then
3639 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003640else
3641 ac_save_cc="$CC"
3642CC="$CC -Kpthread"
3643if test "$cross_compiling" = yes; then
3644 ac_cv_kpthread=no
3645else
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 cat >conftest.$ac_ext <<_ACEOF
3647#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003648#include "confdefs.h"
3649
3650#include <pthread.h>
3651
3652void* routine(void* p){return NULL;}
3653
3654int main(){
3655 pthread_t p;
3656 if(pthread_create(&p,NULL,routine,NULL)!=0)
3657 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003658 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003659 return 0;
3660}
3661
Martin v. Löwis11437992002-04-12 09:54:03 +00003662_ACEOF
3663rm -f conftest$ac_exeext
3664if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3665 (eval $ac_link) 2>&5
3666 ac_status=$?
3667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3668 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3670 (eval $ac_try) 2>&5
3671 ac_status=$?
3672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3673 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003674 ac_cv_kpthread=yes
3675else
Martin v. Löwis11437992002-04-12 09:54:03 +00003676 echo "$as_me: program exited with status $ac_status" >&5
3677echo "$as_me: failed program was:" >&5
3678cat conftest.$ac_ext >&5
3679( exit $ac_status )
3680ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003681fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003682rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003683fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003684CC="$ac_save_cc"
3685fi
3686
Martin v. Löwis11437992002-04-12 09:54:03 +00003687echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3688echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003689fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003690
Michael W. Hudson54241132001-12-07 15:38:26 +00003691
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003692# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003693echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3694echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3695if test "${ac_cv_header_stdc+set}" = set; then
3696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003697else
Martin v. Löwis11437992002-04-12 09:54:03 +00003698 cat >conftest.$ac_ext <<_ACEOF
3699#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003700#include "confdefs.h"
3701#include <stdlib.h>
3702#include <stdarg.h>
3703#include <string.h>
3704#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003705
3706_ACEOF
3707if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3708 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3709 ac_status=$?
3710 egrep -v '^ *\+' conftest.er1 >conftest.err
3711 rm -f conftest.er1
3712 cat conftest.err >&5
3713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3714 (exit $ac_status); } >/dev/null; then
3715 if test -s conftest.err; then
3716 ac_cpp_err=$ac_c_preproc_warn_flag
3717 else
3718 ac_cpp_err=
3719 fi
3720else
3721 ac_cpp_err=yes
3722fi
3723if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003724 ac_cv_header_stdc=yes
3725else
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003727 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003728 ac_cv_header_stdc=no
3729fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003730rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003731
3732if test $ac_cv_header_stdc = yes; then
3733 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 cat >conftest.$ac_ext <<_ACEOF
3735#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003736#include "confdefs.h"
3737#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003738
3739_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003740if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3741 egrep "memchr" >/dev/null 2>&1; then
3742 :
3743else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003744 ac_cv_header_stdc=no
3745fi
3746rm -f conftest*
3747
3748fi
3749
3750if test $ac_cv_header_stdc = yes; then
3751 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 cat >conftest.$ac_ext <<_ACEOF
3753#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003754#include "confdefs.h"
3755#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003756
3757_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003758if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3759 egrep "free" >/dev/null 2>&1; then
3760 :
3761else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003762 ac_cv_header_stdc=no
3763fi
3764rm -f conftest*
3765
3766fi
3767
3768if test $ac_cv_header_stdc = yes; then
3769 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003771 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003772else
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 cat >conftest.$ac_ext <<_ACEOF
3774#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003775#include "confdefs.h"
3776#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003777#if ((' ' & 0x0FF) == 0x020)
3778# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3779# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3780#else
3781# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3782 || ('j' <= (c) && (c) <= 'r') \
3783 || ('s' <= (c) && (c) <= 'z'))
3784# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3785#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003786
Martin v. Löwis11437992002-04-12 09:54:03 +00003787#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3788int
3789main ()
3790{
3791 int i;
3792 for (i = 0; i < 256; i++)
3793 if (XOR (islower (i), ISLOWER (i))
3794 || toupper (i) != TOUPPER (i))
3795 exit(2);
3796 exit (0);
3797}
3798_ACEOF
3799rm -f conftest$ac_exeext
3800if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3801 (eval $ac_link) 2>&5
3802 ac_status=$?
3803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3804 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3806 (eval $ac_try) 2>&5
3807 ac_status=$?
3808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3809 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003810 :
3811else
Martin v. Löwis11437992002-04-12 09:54:03 +00003812 echo "$as_me: program exited with status $ac_status" >&5
3813echo "$as_me: failed program was:" >&5
3814cat conftest.$ac_ext >&5
3815( exit $ac_status )
3816ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003817fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003818rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003819fi
3820fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003821fi
3822echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3823echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003824if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
3826cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003827#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003828_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003829
3830fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003831
Martin v. Löwis11437992002-04-12 09:54:03 +00003832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
Martin v. Löwis11437992002-04-12 09:54:03 +00003869for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003870libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003871signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003872sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003873sys/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 +00003874sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003875sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003876do
Martin v. Löwis11437992002-04-12 09:54:03 +00003877as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3878if eval "test \"\${$as_ac_Header+set}\" = set"; then
3879 echo "$as_me:$LINENO: checking for $ac_header" >&5
3880echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3881if eval "test \"\${$as_ac_Header+set}\" = set"; then
3882 echo $ECHO_N "(cached) $ECHO_C" >&6
3883fi
3884echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3885echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003886else
Martin v. Löwis11437992002-04-12 09:54:03 +00003887 # Is the header compilable?
3888echo "$as_me:$LINENO: checking $ac_header usability" >&5
3889echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3890cat >conftest.$ac_ext <<_ACEOF
3891#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003892#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003893$ac_includes_default
3894#include <$ac_header>
3895_ACEOF
3896rm -f conftest.$ac_objext
3897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3898 (eval $ac_compile) 2>&5
3899 ac_status=$?
3900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3901 (exit $ac_status); } &&
3902 { ac_try='test -s conftest.$ac_objext'
3903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3904 (eval $ac_try) 2>&5
3905 ac_status=$?
3906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3907 (exit $ac_status); }; }; then
3908 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003909else
Martin v. Löwis11437992002-04-12 09:54:03 +00003910 echo "$as_me: failed program was:" >&5
3911cat conftest.$ac_ext >&5
3912ac_header_compiler=no
3913fi
3914rm -f conftest.$ac_objext conftest.$ac_ext
3915echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3916echo "${ECHO_T}$ac_header_compiler" >&6
3917
3918# Is the header present?
3919echo "$as_me:$LINENO: checking $ac_header presence" >&5
3920echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3921cat >conftest.$ac_ext <<_ACEOF
3922#line $LINENO "configure"
3923#include "confdefs.h"
3924#include <$ac_header>
3925_ACEOF
3926if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3927 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3928 ac_status=$?
3929 egrep -v '^ *\+' conftest.er1 >conftest.err
3930 rm -f conftest.er1
3931 cat conftest.err >&5
3932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3933 (exit $ac_status); } >/dev/null; then
3934 if test -s conftest.err; then
3935 ac_cpp_err=$ac_c_preproc_warn_flag
3936 else
3937 ac_cpp_err=
3938 fi
3939else
3940 ac_cpp_err=yes
3941fi
3942if test -z "$ac_cpp_err"; then
3943 ac_header_preproc=yes
3944else
3945 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003946 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003947 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003948fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003949rm -f conftest.err conftest.$ac_ext
3950echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3951echo "${ECHO_T}$ac_header_preproc" >&6
3952
3953# So? What about this header?
3954case $ac_header_compiler:$ac_header_preproc in
3955 yes:no )
3956 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3957echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3958 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3959echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3960 no:yes )
3961 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3962echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3963 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3964echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3965 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3966echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3967esac
3968echo "$as_me:$LINENO: checking for $ac_header" >&5
3969echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3970if eval "test \"\${$as_ac_Header+set}\" = set"; then
3971 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003972else
Martin v. Löwis11437992002-04-12 09:54:03 +00003973 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003974fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003975echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3976echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3977
3978fi
3979if test `eval echo '${'$as_ac_Header'}'` = yes; then
3980 cat >>confdefs.h <<_ACEOF
3981#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3982_ACEOF
3983
3984fi
3985
Guido van Rossum627b2d71993-12-24 10:39:16 +00003986done
3987
Martin v. Löwis11437992002-04-12 09:54:03 +00003988
3989
3990
3991
3992
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003993ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003994for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3995 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3996echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3997echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3998if eval "test \"\${$as_ac_Header+set}\" = set"; then
3999 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004000else
Martin v. Löwis11437992002-04-12 09:54:03 +00004001 cat >conftest.$ac_ext <<_ACEOF
4002#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004003#include "confdefs.h"
4004#include <sys/types.h>
4005#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004006
4007#ifdef F77_DUMMY_MAIN
4008# ifdef __cplusplus
4009 extern "C"
4010# endif
4011 int F77_DUMMY_MAIN() { return 1; }
4012#endif
4013int
4014main ()
4015{
4016if ((DIR *) 0)
4017return 0;
4018 ;
4019 return 0;
4020}
4021_ACEOF
4022rm -f conftest.$ac_objext
4023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4024 (eval $ac_compile) 2>&5
4025 ac_status=$?
4026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4027 (exit $ac_status); } &&
4028 { ac_try='test -s conftest.$ac_objext'
4029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4030 (eval $ac_try) 2>&5
4031 ac_status=$?
4032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4033 (exit $ac_status); }; }; then
4034 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004035else
Martin v. Löwis11437992002-04-12 09:54:03 +00004036 echo "$as_me: failed program was:" >&5
4037cat conftest.$ac_ext >&5
4038eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004040rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004041fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004042echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4043echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4044if test `eval echo '${'$as_ac_Header'}'` = yes; then
4045 cat >>confdefs.h <<_ACEOF
4046#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4047_ACEOF
4048
4049ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004050fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004051
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004052done
4053# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4054if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004055 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4056echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4057if test "${ac_cv_search_opendir+set}" = set; then
4058 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004059else
Martin v. Löwis11437992002-04-12 09:54:03 +00004060 ac_func_search_save_LIBS=$LIBS
4061ac_cv_search_opendir=no
4062cat >conftest.$ac_ext <<_ACEOF
4063#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004064#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004066/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004067#ifdef __cplusplus
4068extern "C"
4069#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004070/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004071 builtin and then its argument prototype would still apply. */
4072char opendir ();
4073#ifdef F77_DUMMY_MAIN
4074# ifdef __cplusplus
4075 extern "C"
4076# endif
4077 int F77_DUMMY_MAIN() { return 1; }
4078#endif
4079int
4080main ()
4081{
4082opendir ();
4083 ;
4084 return 0;
4085}
4086_ACEOF
4087rm -f conftest.$ac_objext conftest$ac_exeext
4088if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4089 (eval $ac_link) 2>&5
4090 ac_status=$?
4091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4092 (exit $ac_status); } &&
4093 { ac_try='test -s conftest$ac_exeext'
4094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4095 (eval $ac_try) 2>&5
4096 ac_status=$?
4097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4098 (exit $ac_status); }; }; then
4099 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004100else
Martin v. Löwis11437992002-04-12 09:54:03 +00004101 echo "$as_me: failed program was:" >&5
4102cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004103fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004104rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4105if test "$ac_cv_search_opendir" = no; then
4106 for ac_lib in dir; do
4107 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4108 cat >conftest.$ac_ext <<_ACEOF
4109#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004110#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004111
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004112/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004113#ifdef __cplusplus
4114extern "C"
4115#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004116/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004117 builtin and then its argument prototype would still apply. */
4118char opendir ();
4119#ifdef F77_DUMMY_MAIN
4120# ifdef __cplusplus
4121 extern "C"
4122# endif
4123 int F77_DUMMY_MAIN() { return 1; }
4124#endif
4125int
4126main ()
4127{
4128opendir ();
4129 ;
4130 return 0;
4131}
4132_ACEOF
4133rm -f conftest.$ac_objext conftest$ac_exeext
4134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4135 (eval $ac_link) 2>&5
4136 ac_status=$?
4137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4138 (exit $ac_status); } &&
4139 { ac_try='test -s conftest$ac_exeext'
4140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4141 (eval $ac_try) 2>&5
4142 ac_status=$?
4143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4144 (exit $ac_status); }; }; then
4145 ac_cv_search_opendir="-l$ac_lib"
4146break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004147else
Martin v. Löwis11437992002-04-12 09:54:03 +00004148 echo "$as_me: failed program was:" >&5
4149cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004151rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4152 done
4153fi
4154LIBS=$ac_func_search_save_LIBS
4155fi
4156echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4157echo "${ECHO_T}$ac_cv_search_opendir" >&6
4158if test "$ac_cv_search_opendir" != no; then
4159 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004160
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004162
Michael W. Hudson54241132001-12-07 15:38:26 +00004163else
Martin v. Löwis11437992002-04-12 09:54:03 +00004164 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4165echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4166if test "${ac_cv_search_opendir+set}" = set; then
4167 echo $ECHO_N "(cached) $ECHO_C" >&6
4168else
4169 ac_func_search_save_LIBS=$LIBS
4170ac_cv_search_opendir=no
4171cat >conftest.$ac_ext <<_ACEOF
4172#line $LINENO "configure"
4173#include "confdefs.h"
4174
4175/* Override any gcc2 internal prototype to avoid an error. */
4176#ifdef __cplusplus
4177extern "C"
4178#endif
4179/* We use char because int might match the return type of a gcc2
4180 builtin and then its argument prototype would still apply. */
4181char opendir ();
4182#ifdef F77_DUMMY_MAIN
4183# ifdef __cplusplus
4184 extern "C"
4185# endif
4186 int F77_DUMMY_MAIN() { return 1; }
4187#endif
4188int
4189main ()
4190{
4191opendir ();
4192 ;
4193 return 0;
4194}
4195_ACEOF
4196rm -f conftest.$ac_objext conftest$ac_exeext
4197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4198 (eval $ac_link) 2>&5
4199 ac_status=$?
4200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4201 (exit $ac_status); } &&
4202 { ac_try='test -s conftest$ac_exeext'
4203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4204 (eval $ac_try) 2>&5
4205 ac_status=$?
4206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4207 (exit $ac_status); }; }; then
4208 ac_cv_search_opendir="none required"
4209else
4210 echo "$as_me: failed program was:" >&5
4211cat conftest.$ac_ext >&5
4212fi
4213rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4214if test "$ac_cv_search_opendir" = no; then
4215 for ac_lib in x; do
4216 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4217 cat >conftest.$ac_ext <<_ACEOF
4218#line $LINENO "configure"
4219#include "confdefs.h"
4220
4221/* Override any gcc2 internal prototype to avoid an error. */
4222#ifdef __cplusplus
4223extern "C"
4224#endif
4225/* We use char because int might match the return type of a gcc2
4226 builtin and then its argument prototype would still apply. */
4227char opendir ();
4228#ifdef F77_DUMMY_MAIN
4229# ifdef __cplusplus
4230 extern "C"
4231# endif
4232 int F77_DUMMY_MAIN() { return 1; }
4233#endif
4234int
4235main ()
4236{
4237opendir ();
4238 ;
4239 return 0;
4240}
4241_ACEOF
4242rm -f conftest.$ac_objext conftest$ac_exeext
4243if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4244 (eval $ac_link) 2>&5
4245 ac_status=$?
4246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4247 (exit $ac_status); } &&
4248 { ac_try='test -s conftest$ac_exeext'
4249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4250 (eval $ac_try) 2>&5
4251 ac_status=$?
4252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4253 (exit $ac_status); }; }; then
4254 ac_cv_search_opendir="-l$ac_lib"
4255break
4256else
4257 echo "$as_me: failed program was:" >&5
4258cat conftest.$ac_ext >&5
4259fi
4260rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4261 done
4262fi
4263LIBS=$ac_func_search_save_LIBS
4264fi
4265echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4266echo "${ECHO_T}$ac_cv_search_opendir" >&6
4267if test "$ac_cv_search_opendir" != no; then
4268 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4269
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270fi
4271
4272fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004273
Michael W. Hudson54241132001-12-07 15:38:26 +00004274
Guido van Rossum627b2d71993-12-24 10:39:16 +00004275# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004276was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004277echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4278echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4279cat >conftest.$ac_ext <<_ACEOF
4280#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281#include "confdefs.h"
4282#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004283
4284_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4286 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004287 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004288else
Martin v. Löwis11437992002-04-12 09:54:03 +00004289
4290
4291cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004293_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004294
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004295
Guido van Rossum627b2d71993-12-24 10:39:16 +00004296fi
4297rm -f conftest*
4298
Martin v. Löwis11437992002-04-12 09:54:03 +00004299echo "$as_me:$LINENO: result: $was_it_defined" >&5
4300echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004301
Guido van Rossum810cc512001-09-09 23:51:39 +00004302# Two defines needed to enable largefile support on various platforms
4303# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004304
Martin v. Löwis11437992002-04-12 09:54:03 +00004305cat >>confdefs.h <<\_ACEOF
4306#define _LARGEFILE_SOURCE 1
4307_ACEOF
4308
4309
4310cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004311#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004312_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004313
Michael W. Hudson54241132001-12-07 15:38:26 +00004314
Guido van Rossum84e7b241996-08-19 21:59:00 +00004315# Add some code to confdefs.h so that the test for off_t works on SCO
4316cat >> confdefs.h <<\EOF
4317#if defined(SCO_DS)
4318#undef _OFF_T
4319#endif
4320EOF
4321
Guido van Rossumef2255b2000-03-10 22:30:29 +00004322# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004323echo "$as_me:$LINENO: checking for mode_t" >&5
4324echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4325if test "${ac_cv_type_mode_t+set}" = set; then
4326 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004327else
Martin v. Löwis11437992002-04-12 09:54:03 +00004328 cat >conftest.$ac_ext <<_ACEOF
4329#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004330#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004331$ac_includes_default
4332#ifdef F77_DUMMY_MAIN
4333# ifdef __cplusplus
4334 extern "C"
4335# endif
4336 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004337#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004338int
4339main ()
4340{
4341if ((mode_t *) 0)
4342 return 0;
4343if (sizeof (mode_t))
4344 return 0;
4345 ;
4346 return 0;
4347}
4348_ACEOF
4349rm -f conftest.$ac_objext
4350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4351 (eval $ac_compile) 2>&5
4352 ac_status=$?
4353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4354 (exit $ac_status); } &&
4355 { ac_try='test -s conftest.$ac_objext'
4356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4357 (eval $ac_try) 2>&5
4358 ac_status=$?
4359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4360 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004361 ac_cv_type_mode_t=yes
4362else
Martin v. Löwis11437992002-04-12 09:54:03 +00004363 echo "$as_me: failed program was:" >&5
4364cat conftest.$ac_ext >&5
4365ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004366fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004367rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004368fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004369echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4370echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4371if test $ac_cv_type_mode_t = yes; then
4372 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004373else
Martin v. Löwis11437992002-04-12 09:54:03 +00004374
4375cat >>confdefs.h <<_ACEOF
4376#define mode_t int
4377_ACEOF
4378
4379fi
4380
4381echo "$as_me:$LINENO: checking for off_t" >&5
4382echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4383if test "${ac_cv_type_off_t+set}" = set; then
4384 echo $ECHO_N "(cached) $ECHO_C" >&6
4385else
4386 cat >conftest.$ac_ext <<_ACEOF
4387#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004388#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004389$ac_includes_default
4390#ifdef F77_DUMMY_MAIN
4391# ifdef __cplusplus
4392 extern "C"
4393# endif
4394 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004396int
4397main ()
4398{
4399if ((off_t *) 0)
4400 return 0;
4401if (sizeof (off_t))
4402 return 0;
4403 ;
4404 return 0;
4405}
4406_ACEOF
4407rm -f conftest.$ac_objext
4408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4409 (eval $ac_compile) 2>&5
4410 ac_status=$?
4411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4412 (exit $ac_status); } &&
4413 { ac_try='test -s conftest.$ac_objext'
4414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4415 (eval $ac_try) 2>&5
4416 ac_status=$?
4417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4418 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004419 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004420else
Martin v. Löwis11437992002-04-12 09:54:03 +00004421 echo "$as_me: failed program was:" >&5
4422cat conftest.$ac_ext >&5
4423ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004424fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004425rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004426fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004427echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4428echo "${ECHO_T}$ac_cv_type_off_t" >&6
4429if test $ac_cv_type_off_t = yes; then
4430 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004431else
Martin v. Löwis11437992002-04-12 09:54:03 +00004432
4433cat >>confdefs.h <<_ACEOF
4434#define off_t long
4435_ACEOF
4436
4437fi
4438
4439echo "$as_me:$LINENO: checking for pid_t" >&5
4440echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4441if test "${ac_cv_type_pid_t+set}" = set; then
4442 echo $ECHO_N "(cached) $ECHO_C" >&6
4443else
4444 cat >conftest.$ac_ext <<_ACEOF
4445#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004446#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004447$ac_includes_default
4448#ifdef F77_DUMMY_MAIN
4449# ifdef __cplusplus
4450 extern "C"
4451# endif
4452 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004454int
4455main ()
4456{
4457if ((pid_t *) 0)
4458 return 0;
4459if (sizeof (pid_t))
4460 return 0;
4461 ;
4462 return 0;
4463}
4464_ACEOF
4465rm -f conftest.$ac_objext
4466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4467 (eval $ac_compile) 2>&5
4468 ac_status=$?
4469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4470 (exit $ac_status); } &&
4471 { ac_try='test -s conftest.$ac_objext'
4472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4473 (eval $ac_try) 2>&5
4474 ac_status=$?
4475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4476 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004477 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004478else
Martin v. Löwis11437992002-04-12 09:54:03 +00004479 echo "$as_me: failed program was:" >&5
4480cat conftest.$ac_ext >&5
4481ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004482fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004483rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004485echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4486echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4487if test $ac_cv_type_pid_t = yes; then
4488 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004489else
Martin v. Löwis11437992002-04-12 09:54:03 +00004490
4491cat >>confdefs.h <<_ACEOF
4492#define pid_t int
4493_ACEOF
4494
4495fi
4496
4497echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4498echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4499if test "${ac_cv_type_signal+set}" = set; then
4500 echo $ECHO_N "(cached) $ECHO_C" >&6
4501else
4502 cat >conftest.$ac_ext <<_ACEOF
4503#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004504#include "confdefs.h"
4505#include <sys/types.h>
4506#include <signal.h>
4507#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004508# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004509#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004510#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004511extern "C" void (*signal (int, void (*)(int)))(int);
4512#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004513void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004514#endif
4515
Martin v. Löwis11437992002-04-12 09:54:03 +00004516#ifdef F77_DUMMY_MAIN
4517# ifdef __cplusplus
4518 extern "C"
4519# endif
4520 int F77_DUMMY_MAIN() { return 1; }
4521#endif
4522int
4523main ()
4524{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004525int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004526 ;
4527 return 0;
4528}
4529_ACEOF
4530rm -f conftest.$ac_objext
4531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4532 (eval $ac_compile) 2>&5
4533 ac_status=$?
4534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4535 (exit $ac_status); } &&
4536 { ac_try='test -s conftest.$ac_objext'
4537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4538 (eval $ac_try) 2>&5
4539 ac_status=$?
4540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4541 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004542 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004543else
Martin v. Löwis11437992002-04-12 09:54:03 +00004544 echo "$as_me: failed program was:" >&5
4545cat conftest.$ac_ext >&5
4546ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004547fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004548rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004549fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004550echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4551echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004552
Martin v. Löwis11437992002-04-12 09:54:03 +00004553cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004554#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004555_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004556
Michael W. Hudson54241132001-12-07 15:38:26 +00004557
Martin v. Löwis11437992002-04-12 09:54:03 +00004558echo "$as_me:$LINENO: checking for size_t" >&5
4559echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4560if test "${ac_cv_type_size_t+set}" = set; then
4561 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004562else
Martin v. Löwis11437992002-04-12 09:54:03 +00004563 cat >conftest.$ac_ext <<_ACEOF
4564#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004565#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004566$ac_includes_default
4567#ifdef F77_DUMMY_MAIN
4568# ifdef __cplusplus
4569 extern "C"
4570# endif
4571 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004572#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004573int
4574main ()
4575{
4576if ((size_t *) 0)
4577 return 0;
4578if (sizeof (size_t))
4579 return 0;
4580 ;
4581 return 0;
4582}
4583_ACEOF
4584rm -f conftest.$ac_objext
4585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4586 (eval $ac_compile) 2>&5
4587 ac_status=$?
4588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4589 (exit $ac_status); } &&
4590 { ac_try='test -s conftest.$ac_objext'
4591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4592 (eval $ac_try) 2>&5
4593 ac_status=$?
4594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4595 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004596 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004597else
Martin v. Löwis11437992002-04-12 09:54:03 +00004598 echo "$as_me: failed program was:" >&5
4599cat conftest.$ac_ext >&5
4600ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004601fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004602rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004603fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004604echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4605echo "${ECHO_T}$ac_cv_type_size_t" >&6
4606if test $ac_cv_type_size_t = yes; then
4607 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004608else
Martin v. Löwis11437992002-04-12 09:54:03 +00004609
4610cat >>confdefs.h <<_ACEOF
4611#define size_t unsigned
4612_ACEOF
4613
4614fi
4615
4616echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4617echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4618if test "${ac_cv_type_uid_t+set}" = set; then
4619 echo $ECHO_N "(cached) $ECHO_C" >&6
4620else
4621 cat >conftest.$ac_ext <<_ACEOF
4622#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004623#include "confdefs.h"
4624#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004625
4626_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004627if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4628 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004629 ac_cv_type_uid_t=yes
4630else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004631 ac_cv_type_uid_t=no
4632fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004633rm -f conftest*
4634
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004636echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4637echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004638if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004639
Martin v. Löwis11437992002-04-12 09:54:03 +00004640cat >>confdefs.h <<\_ACEOF
4641#define uid_t int
4642_ACEOF
4643
4644
4645cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004646#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004647_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004648
4649fi
4650
Jack Jansendd19cf82001-12-06 22:36:17 +00004651
Michael W. Hudson54241132001-12-07 15:38:26 +00004652# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004653echo "$as_me:$LINENO: checking for int" >&5
4654echo $ECHO_N "checking for int... $ECHO_C" >&6
4655if test "${ac_cv_type_int+set}" = set; then
4656 echo $ECHO_N "(cached) $ECHO_C" >&6
4657else
4658 cat >conftest.$ac_ext <<_ACEOF
4659#line $LINENO "configure"
4660#include "confdefs.h"
4661$ac_includes_default
4662#ifdef F77_DUMMY_MAIN
4663# ifdef __cplusplus
4664 extern "C"
4665# endif
4666 int F77_DUMMY_MAIN() { return 1; }
4667#endif
4668int
4669main ()
4670{
4671if ((int *) 0)
4672 return 0;
4673if (sizeof (int))
4674 return 0;
4675 ;
4676 return 0;
4677}
4678_ACEOF
4679rm -f conftest.$ac_objext
4680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4681 (eval $ac_compile) 2>&5
4682 ac_status=$?
4683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4684 (exit $ac_status); } &&
4685 { ac_try='test -s conftest.$ac_objext'
4686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4687 (eval $ac_try) 2>&5
4688 ac_status=$?
4689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4690 (exit $ac_status); }; }; then
4691 ac_cv_type_int=yes
4692else
4693 echo "$as_me: failed program was:" >&5
4694cat conftest.$ac_ext >&5
4695ac_cv_type_int=no
4696fi
4697rm -f conftest.$ac_objext conftest.$ac_ext
4698fi
4699echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4700echo "${ECHO_T}$ac_cv_type_int" >&6
4701
4702echo "$as_me:$LINENO: checking size of int" >&5
4703echo $ECHO_N "checking size of int... $ECHO_C" >&6
4704if test "${ac_cv_sizeof_int+set}" = set; then
4705 echo $ECHO_N "(cached) $ECHO_C" >&6
4706else
4707 if test "$ac_cv_type_int" = yes; then
4708 # The cast to unsigned long works around a bug in the HP C Compiler
4709 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4710 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4711 # This bug is HP SR number 8606223364.
4712 if test "$cross_compiling" = yes; then
4713 # Depending upon the size, compute the lo and hi bounds.
4714cat >conftest.$ac_ext <<_ACEOF
4715#line $LINENO "configure"
4716#include "confdefs.h"
4717$ac_includes_default
4718#ifdef F77_DUMMY_MAIN
4719# ifdef __cplusplus
4720 extern "C"
4721# endif
4722 int F77_DUMMY_MAIN() { return 1; }
4723#endif
4724int
4725main ()
4726{
4727static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4728test_array [0] = 0
4729
4730 ;
4731 return 0;
4732}
4733_ACEOF
4734rm -f conftest.$ac_objext
4735if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4736 (eval $ac_compile) 2>&5
4737 ac_status=$?
4738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4739 (exit $ac_status); } &&
4740 { ac_try='test -s conftest.$ac_objext'
4741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4742 (eval $ac_try) 2>&5
4743 ac_status=$?
4744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4745 (exit $ac_status); }; }; then
4746 ac_lo=0 ac_mid=0
4747 while :; do
4748 cat >conftest.$ac_ext <<_ACEOF
4749#line $LINENO "configure"
4750#include "confdefs.h"
4751$ac_includes_default
4752#ifdef F77_DUMMY_MAIN
4753# ifdef __cplusplus
4754 extern "C"
4755# endif
4756 int F77_DUMMY_MAIN() { return 1; }
4757#endif
4758int
4759main ()
4760{
4761static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4762test_array [0] = 0
4763
4764 ;
4765 return 0;
4766}
4767_ACEOF
4768rm -f conftest.$ac_objext
4769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4770 (eval $ac_compile) 2>&5
4771 ac_status=$?
4772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4773 (exit $ac_status); } &&
4774 { ac_try='test -s conftest.$ac_objext'
4775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4776 (eval $ac_try) 2>&5
4777 ac_status=$?
4778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4779 (exit $ac_status); }; }; then
4780 ac_hi=$ac_mid; break
4781else
4782 echo "$as_me: failed program was:" >&5
4783cat conftest.$ac_ext >&5
4784ac_lo=`expr $ac_mid + 1`
4785 if test $ac_lo -le $ac_mid; then
4786 ac_lo= ac_hi=
4787 break
4788 fi
4789 ac_mid=`expr 2 '*' $ac_mid + 1`
4790fi
4791rm -f conftest.$ac_objext conftest.$ac_ext
4792 done
4793else
4794 echo "$as_me: failed program was:" >&5
4795cat conftest.$ac_ext >&5
4796cat >conftest.$ac_ext <<_ACEOF
4797#line $LINENO "configure"
4798#include "confdefs.h"
4799$ac_includes_default
4800#ifdef F77_DUMMY_MAIN
4801# ifdef __cplusplus
4802 extern "C"
4803# endif
4804 int F77_DUMMY_MAIN() { return 1; }
4805#endif
4806int
4807main ()
4808{
4809static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4810test_array [0] = 0
4811
4812 ;
4813 return 0;
4814}
4815_ACEOF
4816rm -f conftest.$ac_objext
4817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4818 (eval $ac_compile) 2>&5
4819 ac_status=$?
4820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4821 (exit $ac_status); } &&
4822 { ac_try='test -s conftest.$ac_objext'
4823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4824 (eval $ac_try) 2>&5
4825 ac_status=$?
4826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4827 (exit $ac_status); }; }; then
4828 ac_hi=-1 ac_mid=-1
4829 while :; do
4830 cat >conftest.$ac_ext <<_ACEOF
4831#line $LINENO "configure"
4832#include "confdefs.h"
4833$ac_includes_default
4834#ifdef F77_DUMMY_MAIN
4835# ifdef __cplusplus
4836 extern "C"
4837# endif
4838 int F77_DUMMY_MAIN() { return 1; }
4839#endif
4840int
4841main ()
4842{
4843static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4844test_array [0] = 0
4845
4846 ;
4847 return 0;
4848}
4849_ACEOF
4850rm -f conftest.$ac_objext
4851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4852 (eval $ac_compile) 2>&5
4853 ac_status=$?
4854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4855 (exit $ac_status); } &&
4856 { ac_try='test -s conftest.$ac_objext'
4857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4858 (eval $ac_try) 2>&5
4859 ac_status=$?
4860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4861 (exit $ac_status); }; }; then
4862 ac_lo=$ac_mid; break
4863else
4864 echo "$as_me: failed program was:" >&5
4865cat conftest.$ac_ext >&5
4866ac_hi=`expr '(' $ac_mid ')' - 1`
4867 if test $ac_mid -le $ac_hi; then
4868 ac_lo= ac_hi=
4869 break
4870 fi
4871 ac_mid=`expr 2 '*' $ac_mid`
4872fi
4873rm -f conftest.$ac_objext conftest.$ac_ext
4874 done
4875else
4876 echo "$as_me: failed program was:" >&5
4877cat conftest.$ac_ext >&5
4878ac_lo= ac_hi=
4879fi
4880rm -f conftest.$ac_objext conftest.$ac_ext
4881fi
4882rm -f conftest.$ac_objext conftest.$ac_ext
4883# Binary search between lo and hi bounds.
4884while test "x$ac_lo" != "x$ac_hi"; do
4885 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4886 cat >conftest.$ac_ext <<_ACEOF
4887#line $LINENO "configure"
4888#include "confdefs.h"
4889$ac_includes_default
4890#ifdef F77_DUMMY_MAIN
4891# ifdef __cplusplus
4892 extern "C"
4893# endif
4894 int F77_DUMMY_MAIN() { return 1; }
4895#endif
4896int
4897main ()
4898{
4899static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4900test_array [0] = 0
4901
4902 ;
4903 return 0;
4904}
4905_ACEOF
4906rm -f conftest.$ac_objext
4907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4908 (eval $ac_compile) 2>&5
4909 ac_status=$?
4910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4911 (exit $ac_status); } &&
4912 { ac_try='test -s conftest.$ac_objext'
4913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4914 (eval $ac_try) 2>&5
4915 ac_status=$?
4916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4917 (exit $ac_status); }; }; then
4918 ac_hi=$ac_mid
4919else
4920 echo "$as_me: failed program was:" >&5
4921cat conftest.$ac_ext >&5
4922ac_lo=`expr '(' $ac_mid ')' + 1`
4923fi
4924rm -f conftest.$ac_objext conftest.$ac_ext
4925done
4926case $ac_lo in
4927?*) ac_cv_sizeof_int=$ac_lo;;
4928'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4929echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4930 { (exit 1); exit 1; }; } ;;
4931esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004932else
4933 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004934 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4935echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4936 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004937else
Martin v. Löwis11437992002-04-12 09:54:03 +00004938 cat >conftest.$ac_ext <<_ACEOF
4939#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004940#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004941$ac_includes_default
4942long longval () { return (long) (sizeof (int)); }
4943unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004944#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004945#include <stdlib.h>
4946#ifdef F77_DUMMY_MAIN
4947# ifdef __cplusplus
4948 extern "C"
4949# endif
4950 int F77_DUMMY_MAIN() { return 1; }
4951#endif
4952int
4953main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004954{
Martin v. Löwis11437992002-04-12 09:54:03 +00004955
4956 FILE *f = fopen ("conftest.val", "w");
4957 if (! f)
4958 exit (1);
4959 if (((long) (sizeof (int))) < 0)
4960 {
4961 long i = longval ();
4962 if (i != ((long) (sizeof (int))))
4963 exit (1);
4964 fprintf (f, "%ld\n", i);
4965 }
4966 else
4967 {
4968 unsigned long i = ulongval ();
4969 if (i != ((long) (sizeof (int))))
4970 exit (1);
4971 fprintf (f, "%lu\n", i);
4972 }
4973 exit (ferror (f) || fclose (f) != 0);
4974
4975 ;
4976 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004977}
Martin v. Löwis11437992002-04-12 09:54:03 +00004978_ACEOF
4979rm -f conftest$ac_exeext
4980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4981 (eval $ac_link) 2>&5
4982 ac_status=$?
4983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4984 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4986 (eval $ac_try) 2>&5
4987 ac_status=$?
4988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4989 (exit $ac_status); }; }; then
4990 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004991else
Martin v. Löwis11437992002-04-12 09:54:03 +00004992 echo "$as_me: program exited with status $ac_status" >&5
4993echo "$as_me: failed program was:" >&5
4994cat conftest.$ac_ext >&5
4995( exit $ac_status )
4996{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4997echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4998 { (exit 1); exit 1; }; }
4999fi
5000rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5001fi
5002fi
5003rm -f conftest.val
5004else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005005 ac_cv_sizeof_int=0
5006fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005007fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005008echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5009echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5010cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005011#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005012_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005013
5014
Martin v. Löwis11437992002-04-12 09:54:03 +00005015echo "$as_me:$LINENO: checking for long" >&5
5016echo $ECHO_N "checking for long... $ECHO_C" >&6
5017if test "${ac_cv_type_long+set}" = set; then
5018 echo $ECHO_N "(cached) $ECHO_C" >&6
5019else
5020 cat >conftest.$ac_ext <<_ACEOF
5021#line $LINENO "configure"
5022#include "confdefs.h"
5023$ac_includes_default
5024#ifdef F77_DUMMY_MAIN
5025# ifdef __cplusplus
5026 extern "C"
5027# endif
5028 int F77_DUMMY_MAIN() { return 1; }
5029#endif
5030int
5031main ()
5032{
5033if ((long *) 0)
5034 return 0;
5035if (sizeof (long))
5036 return 0;
5037 ;
5038 return 0;
5039}
5040_ACEOF
5041rm -f conftest.$ac_objext
5042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5043 (eval $ac_compile) 2>&5
5044 ac_status=$?
5045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5046 (exit $ac_status); } &&
5047 { ac_try='test -s conftest.$ac_objext'
5048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5049 (eval $ac_try) 2>&5
5050 ac_status=$?
5051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5052 (exit $ac_status); }; }; then
5053 ac_cv_type_long=yes
5054else
5055 echo "$as_me: failed program was:" >&5
5056cat conftest.$ac_ext >&5
5057ac_cv_type_long=no
5058fi
5059rm -f conftest.$ac_objext conftest.$ac_ext
5060fi
5061echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5062echo "${ECHO_T}$ac_cv_type_long" >&6
5063
5064echo "$as_me:$LINENO: checking size of long" >&5
5065echo $ECHO_N "checking size of long... $ECHO_C" >&6
5066if test "${ac_cv_sizeof_long+set}" = set; then
5067 echo $ECHO_N "(cached) $ECHO_C" >&6
5068else
5069 if test "$ac_cv_type_long" = yes; then
5070 # The cast to unsigned long works around a bug in the HP C Compiler
5071 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5072 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5073 # This bug is HP SR number 8606223364.
5074 if test "$cross_compiling" = yes; then
5075 # Depending upon the size, compute the lo and hi bounds.
5076cat >conftest.$ac_ext <<_ACEOF
5077#line $LINENO "configure"
5078#include "confdefs.h"
5079$ac_includes_default
5080#ifdef F77_DUMMY_MAIN
5081# ifdef __cplusplus
5082 extern "C"
5083# endif
5084 int F77_DUMMY_MAIN() { return 1; }
5085#endif
5086int
5087main ()
5088{
5089static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5090test_array [0] = 0
5091
5092 ;
5093 return 0;
5094}
5095_ACEOF
5096rm -f conftest.$ac_objext
5097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5098 (eval $ac_compile) 2>&5
5099 ac_status=$?
5100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101 (exit $ac_status); } &&
5102 { ac_try='test -s conftest.$ac_objext'
5103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5104 (eval $ac_try) 2>&5
5105 ac_status=$?
5106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5107 (exit $ac_status); }; }; then
5108 ac_lo=0 ac_mid=0
5109 while :; do
5110 cat >conftest.$ac_ext <<_ACEOF
5111#line $LINENO "configure"
5112#include "confdefs.h"
5113$ac_includes_default
5114#ifdef F77_DUMMY_MAIN
5115# ifdef __cplusplus
5116 extern "C"
5117# endif
5118 int F77_DUMMY_MAIN() { return 1; }
5119#endif
5120int
5121main ()
5122{
5123static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5124test_array [0] = 0
5125
5126 ;
5127 return 0;
5128}
5129_ACEOF
5130rm -f conftest.$ac_objext
5131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5132 (eval $ac_compile) 2>&5
5133 ac_status=$?
5134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5135 (exit $ac_status); } &&
5136 { ac_try='test -s conftest.$ac_objext'
5137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5138 (eval $ac_try) 2>&5
5139 ac_status=$?
5140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5141 (exit $ac_status); }; }; then
5142 ac_hi=$ac_mid; break
5143else
5144 echo "$as_me: failed program was:" >&5
5145cat conftest.$ac_ext >&5
5146ac_lo=`expr $ac_mid + 1`
5147 if test $ac_lo -le $ac_mid; then
5148 ac_lo= ac_hi=
5149 break
5150 fi
5151 ac_mid=`expr 2 '*' $ac_mid + 1`
5152fi
5153rm -f conftest.$ac_objext conftest.$ac_ext
5154 done
5155else
5156 echo "$as_me: failed program was:" >&5
5157cat conftest.$ac_ext >&5
5158cat >conftest.$ac_ext <<_ACEOF
5159#line $LINENO "configure"
5160#include "confdefs.h"
5161$ac_includes_default
5162#ifdef F77_DUMMY_MAIN
5163# ifdef __cplusplus
5164 extern "C"
5165# endif
5166 int F77_DUMMY_MAIN() { return 1; }
5167#endif
5168int
5169main ()
5170{
5171static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5172test_array [0] = 0
5173
5174 ;
5175 return 0;
5176}
5177_ACEOF
5178rm -f conftest.$ac_objext
5179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5180 (eval $ac_compile) 2>&5
5181 ac_status=$?
5182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5183 (exit $ac_status); } &&
5184 { ac_try='test -s conftest.$ac_objext'
5185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5186 (eval $ac_try) 2>&5
5187 ac_status=$?
5188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5189 (exit $ac_status); }; }; then
5190 ac_hi=-1 ac_mid=-1
5191 while :; do
5192 cat >conftest.$ac_ext <<_ACEOF
5193#line $LINENO "configure"
5194#include "confdefs.h"
5195$ac_includes_default
5196#ifdef F77_DUMMY_MAIN
5197# ifdef __cplusplus
5198 extern "C"
5199# endif
5200 int F77_DUMMY_MAIN() { return 1; }
5201#endif
5202int
5203main ()
5204{
5205static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5206test_array [0] = 0
5207
5208 ;
5209 return 0;
5210}
5211_ACEOF
5212rm -f conftest.$ac_objext
5213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5214 (eval $ac_compile) 2>&5
5215 ac_status=$?
5216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5217 (exit $ac_status); } &&
5218 { ac_try='test -s conftest.$ac_objext'
5219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5220 (eval $ac_try) 2>&5
5221 ac_status=$?
5222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5223 (exit $ac_status); }; }; then
5224 ac_lo=$ac_mid; break
5225else
5226 echo "$as_me: failed program was:" >&5
5227cat conftest.$ac_ext >&5
5228ac_hi=`expr '(' $ac_mid ')' - 1`
5229 if test $ac_mid -le $ac_hi; then
5230 ac_lo= ac_hi=
5231 break
5232 fi
5233 ac_mid=`expr 2 '*' $ac_mid`
5234fi
5235rm -f conftest.$ac_objext conftest.$ac_ext
5236 done
5237else
5238 echo "$as_me: failed program was:" >&5
5239cat conftest.$ac_ext >&5
5240ac_lo= ac_hi=
5241fi
5242rm -f conftest.$ac_objext conftest.$ac_ext
5243fi
5244rm -f conftest.$ac_objext conftest.$ac_ext
5245# Binary search between lo and hi bounds.
5246while test "x$ac_lo" != "x$ac_hi"; do
5247 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5248 cat >conftest.$ac_ext <<_ACEOF
5249#line $LINENO "configure"
5250#include "confdefs.h"
5251$ac_includes_default
5252#ifdef F77_DUMMY_MAIN
5253# ifdef __cplusplus
5254 extern "C"
5255# endif
5256 int F77_DUMMY_MAIN() { return 1; }
5257#endif
5258int
5259main ()
5260{
5261static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5262test_array [0] = 0
5263
5264 ;
5265 return 0;
5266}
5267_ACEOF
5268rm -f conftest.$ac_objext
5269if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5270 (eval $ac_compile) 2>&5
5271 ac_status=$?
5272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5273 (exit $ac_status); } &&
5274 { ac_try='test -s conftest.$ac_objext'
5275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5276 (eval $ac_try) 2>&5
5277 ac_status=$?
5278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5279 (exit $ac_status); }; }; then
5280 ac_hi=$ac_mid
5281else
5282 echo "$as_me: failed program was:" >&5
5283cat conftest.$ac_ext >&5
5284ac_lo=`expr '(' $ac_mid ')' + 1`
5285fi
5286rm -f conftest.$ac_objext conftest.$ac_ext
5287done
5288case $ac_lo in
5289?*) ac_cv_sizeof_long=$ac_lo;;
5290'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5291echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5292 { (exit 1); exit 1; }; } ;;
5293esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005294else
5295 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005296 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5297echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5298 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005299else
Martin v. Löwis11437992002-04-12 09:54:03 +00005300 cat >conftest.$ac_ext <<_ACEOF
5301#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005302#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005303$ac_includes_default
5304long longval () { return (long) (sizeof (long)); }
5305unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005306#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005307#include <stdlib.h>
5308#ifdef F77_DUMMY_MAIN
5309# ifdef __cplusplus
5310 extern "C"
5311# endif
5312 int F77_DUMMY_MAIN() { return 1; }
5313#endif
5314int
5315main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005316{
Martin v. Löwis11437992002-04-12 09:54:03 +00005317
5318 FILE *f = fopen ("conftest.val", "w");
5319 if (! f)
5320 exit (1);
5321 if (((long) (sizeof (long))) < 0)
5322 {
5323 long i = longval ();
5324 if (i != ((long) (sizeof (long))))
5325 exit (1);
5326 fprintf (f, "%ld\n", i);
5327 }
5328 else
5329 {
5330 unsigned long i = ulongval ();
5331 if (i != ((long) (sizeof (long))))
5332 exit (1);
5333 fprintf (f, "%lu\n", i);
5334 }
5335 exit (ferror (f) || fclose (f) != 0);
5336
5337 ;
5338 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005339}
Martin v. Löwis11437992002-04-12 09:54:03 +00005340_ACEOF
5341rm -f conftest$ac_exeext
5342if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5343 (eval $ac_link) 2>&5
5344 ac_status=$?
5345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5346 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5348 (eval $ac_try) 2>&5
5349 ac_status=$?
5350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5351 (exit $ac_status); }; }; then
5352 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005353else
Martin v. Löwis11437992002-04-12 09:54:03 +00005354 echo "$as_me: program exited with status $ac_status" >&5
5355echo "$as_me: failed program was:" >&5
5356cat conftest.$ac_ext >&5
5357( exit $ac_status )
5358{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5359echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5360 { (exit 1); exit 1; }; }
5361fi
5362rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5363fi
5364fi
5365rm -f conftest.val
5366else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005367 ac_cv_sizeof_long=0
5368fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005369fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005370echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5371echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5372cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005373#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005374_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005375
5376
Martin v. Löwis11437992002-04-12 09:54:03 +00005377echo "$as_me:$LINENO: checking for void *" >&5
5378echo $ECHO_N "checking for void *... $ECHO_C" >&6
5379if test "${ac_cv_type_void_p+set}" = set; then
5380 echo $ECHO_N "(cached) $ECHO_C" >&6
5381else
5382 cat >conftest.$ac_ext <<_ACEOF
5383#line $LINENO "configure"
5384#include "confdefs.h"
5385$ac_includes_default
5386#ifdef F77_DUMMY_MAIN
5387# ifdef __cplusplus
5388 extern "C"
5389# endif
5390 int F77_DUMMY_MAIN() { return 1; }
5391#endif
5392int
5393main ()
5394{
5395if ((void * *) 0)
5396 return 0;
5397if (sizeof (void *))
5398 return 0;
5399 ;
5400 return 0;
5401}
5402_ACEOF
5403rm -f conftest.$ac_objext
5404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5405 (eval $ac_compile) 2>&5
5406 ac_status=$?
5407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5408 (exit $ac_status); } &&
5409 { ac_try='test -s conftest.$ac_objext'
5410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5411 (eval $ac_try) 2>&5
5412 ac_status=$?
5413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5414 (exit $ac_status); }; }; then
5415 ac_cv_type_void_p=yes
5416else
5417 echo "$as_me: failed program was:" >&5
5418cat conftest.$ac_ext >&5
5419ac_cv_type_void_p=no
5420fi
5421rm -f conftest.$ac_objext conftest.$ac_ext
5422fi
5423echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5424echo "${ECHO_T}$ac_cv_type_void_p" >&6
5425
5426echo "$as_me:$LINENO: checking size of void *" >&5
5427echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5428if test "${ac_cv_sizeof_void_p+set}" = set; then
5429 echo $ECHO_N "(cached) $ECHO_C" >&6
5430else
5431 if test "$ac_cv_type_void_p" = yes; then
5432 # The cast to unsigned long works around a bug in the HP C Compiler
5433 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5434 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5435 # This bug is HP SR number 8606223364.
5436 if test "$cross_compiling" = yes; then
5437 # Depending upon the size, compute the lo and hi bounds.
5438cat >conftest.$ac_ext <<_ACEOF
5439#line $LINENO "configure"
5440#include "confdefs.h"
5441$ac_includes_default
5442#ifdef F77_DUMMY_MAIN
5443# ifdef __cplusplus
5444 extern "C"
5445# endif
5446 int F77_DUMMY_MAIN() { return 1; }
5447#endif
5448int
5449main ()
5450{
5451static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5452test_array [0] = 0
5453
5454 ;
5455 return 0;
5456}
5457_ACEOF
5458rm -f conftest.$ac_objext
5459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5460 (eval $ac_compile) 2>&5
5461 ac_status=$?
5462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5463 (exit $ac_status); } &&
5464 { ac_try='test -s conftest.$ac_objext'
5465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5466 (eval $ac_try) 2>&5
5467 ac_status=$?
5468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5469 (exit $ac_status); }; }; then
5470 ac_lo=0 ac_mid=0
5471 while :; do
5472 cat >conftest.$ac_ext <<_ACEOF
5473#line $LINENO "configure"
5474#include "confdefs.h"
5475$ac_includes_default
5476#ifdef F77_DUMMY_MAIN
5477# ifdef __cplusplus
5478 extern "C"
5479# endif
5480 int F77_DUMMY_MAIN() { return 1; }
5481#endif
5482int
5483main ()
5484{
5485static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5486test_array [0] = 0
5487
5488 ;
5489 return 0;
5490}
5491_ACEOF
5492rm -f conftest.$ac_objext
5493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5494 (eval $ac_compile) 2>&5
5495 ac_status=$?
5496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5497 (exit $ac_status); } &&
5498 { ac_try='test -s conftest.$ac_objext'
5499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5500 (eval $ac_try) 2>&5
5501 ac_status=$?
5502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5503 (exit $ac_status); }; }; then
5504 ac_hi=$ac_mid; break
5505else
5506 echo "$as_me: failed program was:" >&5
5507cat conftest.$ac_ext >&5
5508ac_lo=`expr $ac_mid + 1`
5509 if test $ac_lo -le $ac_mid; then
5510 ac_lo= ac_hi=
5511 break
5512 fi
5513 ac_mid=`expr 2 '*' $ac_mid + 1`
5514fi
5515rm -f conftest.$ac_objext conftest.$ac_ext
5516 done
5517else
5518 echo "$as_me: failed program was:" >&5
5519cat conftest.$ac_ext >&5
5520cat >conftest.$ac_ext <<_ACEOF
5521#line $LINENO "configure"
5522#include "confdefs.h"
5523$ac_includes_default
5524#ifdef F77_DUMMY_MAIN
5525# ifdef __cplusplus
5526 extern "C"
5527# endif
5528 int F77_DUMMY_MAIN() { return 1; }
5529#endif
5530int
5531main ()
5532{
5533static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5534test_array [0] = 0
5535
5536 ;
5537 return 0;
5538}
5539_ACEOF
5540rm -f conftest.$ac_objext
5541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5542 (eval $ac_compile) 2>&5
5543 ac_status=$?
5544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5545 (exit $ac_status); } &&
5546 { ac_try='test -s conftest.$ac_objext'
5547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5548 (eval $ac_try) 2>&5
5549 ac_status=$?
5550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5551 (exit $ac_status); }; }; then
5552 ac_hi=-1 ac_mid=-1
5553 while :; do
5554 cat >conftest.$ac_ext <<_ACEOF
5555#line $LINENO "configure"
5556#include "confdefs.h"
5557$ac_includes_default
5558#ifdef F77_DUMMY_MAIN
5559# ifdef __cplusplus
5560 extern "C"
5561# endif
5562 int F77_DUMMY_MAIN() { return 1; }
5563#endif
5564int
5565main ()
5566{
5567static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5568test_array [0] = 0
5569
5570 ;
5571 return 0;
5572}
5573_ACEOF
5574rm -f conftest.$ac_objext
5575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5576 (eval $ac_compile) 2>&5
5577 ac_status=$?
5578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5579 (exit $ac_status); } &&
5580 { ac_try='test -s conftest.$ac_objext'
5581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5582 (eval $ac_try) 2>&5
5583 ac_status=$?
5584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5585 (exit $ac_status); }; }; then
5586 ac_lo=$ac_mid; break
5587else
5588 echo "$as_me: failed program was:" >&5
5589cat conftest.$ac_ext >&5
5590ac_hi=`expr '(' $ac_mid ')' - 1`
5591 if test $ac_mid -le $ac_hi; then
5592 ac_lo= ac_hi=
5593 break
5594 fi
5595 ac_mid=`expr 2 '*' $ac_mid`
5596fi
5597rm -f conftest.$ac_objext conftest.$ac_ext
5598 done
5599else
5600 echo "$as_me: failed program was:" >&5
5601cat conftest.$ac_ext >&5
5602ac_lo= ac_hi=
5603fi
5604rm -f conftest.$ac_objext conftest.$ac_ext
5605fi
5606rm -f conftest.$ac_objext conftest.$ac_ext
5607# Binary search between lo and hi bounds.
5608while test "x$ac_lo" != "x$ac_hi"; do
5609 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5610 cat >conftest.$ac_ext <<_ACEOF
5611#line $LINENO "configure"
5612#include "confdefs.h"
5613$ac_includes_default
5614#ifdef F77_DUMMY_MAIN
5615# ifdef __cplusplus
5616 extern "C"
5617# endif
5618 int F77_DUMMY_MAIN() { return 1; }
5619#endif
5620int
5621main ()
5622{
5623static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5624test_array [0] = 0
5625
5626 ;
5627 return 0;
5628}
5629_ACEOF
5630rm -f conftest.$ac_objext
5631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5632 (eval $ac_compile) 2>&5
5633 ac_status=$?
5634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5635 (exit $ac_status); } &&
5636 { ac_try='test -s conftest.$ac_objext'
5637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5638 (eval $ac_try) 2>&5
5639 ac_status=$?
5640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5641 (exit $ac_status); }; }; then
5642 ac_hi=$ac_mid
5643else
5644 echo "$as_me: failed program was:" >&5
5645cat conftest.$ac_ext >&5
5646ac_lo=`expr '(' $ac_mid ')' + 1`
5647fi
5648rm -f conftest.$ac_objext conftest.$ac_ext
5649done
5650case $ac_lo in
5651?*) ac_cv_sizeof_void_p=$ac_lo;;
5652'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5653echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5654 { (exit 1); exit 1; }; } ;;
5655esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005656else
5657 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005658 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5659echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5660 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005661else
Martin v. Löwis11437992002-04-12 09:54:03 +00005662 cat >conftest.$ac_ext <<_ACEOF
5663#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005664#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005665$ac_includes_default
5666long longval () { return (long) (sizeof (void *)); }
5667unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005668#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005669#include <stdlib.h>
5670#ifdef F77_DUMMY_MAIN
5671# ifdef __cplusplus
5672 extern "C"
5673# endif
5674 int F77_DUMMY_MAIN() { return 1; }
5675#endif
5676int
5677main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005678{
Martin v. Löwis11437992002-04-12 09:54:03 +00005679
5680 FILE *f = fopen ("conftest.val", "w");
5681 if (! f)
5682 exit (1);
5683 if (((long) (sizeof (void *))) < 0)
5684 {
5685 long i = longval ();
5686 if (i != ((long) (sizeof (void *))))
5687 exit (1);
5688 fprintf (f, "%ld\n", i);
5689 }
5690 else
5691 {
5692 unsigned long i = ulongval ();
5693 if (i != ((long) (sizeof (void *))))
5694 exit (1);
5695 fprintf (f, "%lu\n", i);
5696 }
5697 exit (ferror (f) || fclose (f) != 0);
5698
5699 ;
5700 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005701}
Martin v. Löwis11437992002-04-12 09:54:03 +00005702_ACEOF
5703rm -f conftest$ac_exeext
5704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5705 (eval $ac_link) 2>&5
5706 ac_status=$?
5707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5708 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5710 (eval $ac_try) 2>&5
5711 ac_status=$?
5712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5713 (exit $ac_status); }; }; then
5714 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005715else
Martin v. Löwis11437992002-04-12 09:54:03 +00005716 echo "$as_me: program exited with status $ac_status" >&5
5717echo "$as_me: failed program was:" >&5
5718cat conftest.$ac_ext >&5
5719( exit $ac_status )
5720{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5721echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5722 { (exit 1); exit 1; }; }
5723fi
5724rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5725fi
5726fi
5727rm -f conftest.val
5728else
Guido van Rossumad678af1998-10-02 14:42:15 +00005729 ac_cv_sizeof_void_p=0
5730fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005731fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005732echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5733echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5734cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005735#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005736_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005737
5738
Martin v. Löwis11437992002-04-12 09:54:03 +00005739echo "$as_me:$LINENO: checking for char" >&5
5740echo $ECHO_N "checking for char... $ECHO_C" >&6
5741if test "${ac_cv_type_char+set}" = set; then
5742 echo $ECHO_N "(cached) $ECHO_C" >&6
5743else
5744 cat >conftest.$ac_ext <<_ACEOF
5745#line $LINENO "configure"
5746#include "confdefs.h"
5747$ac_includes_default
5748#ifdef F77_DUMMY_MAIN
5749# ifdef __cplusplus
5750 extern "C"
5751# endif
5752 int F77_DUMMY_MAIN() { return 1; }
5753#endif
5754int
5755main ()
5756{
5757if ((char *) 0)
5758 return 0;
5759if (sizeof (char))
5760 return 0;
5761 ;
5762 return 0;
5763}
5764_ACEOF
5765rm -f conftest.$ac_objext
5766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5767 (eval $ac_compile) 2>&5
5768 ac_status=$?
5769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5770 (exit $ac_status); } &&
5771 { ac_try='test -s conftest.$ac_objext'
5772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5773 (eval $ac_try) 2>&5
5774 ac_status=$?
5775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5776 (exit $ac_status); }; }; then
5777 ac_cv_type_char=yes
5778else
5779 echo "$as_me: failed program was:" >&5
5780cat conftest.$ac_ext >&5
5781ac_cv_type_char=no
5782fi
5783rm -f conftest.$ac_objext conftest.$ac_ext
5784fi
5785echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5786echo "${ECHO_T}$ac_cv_type_char" >&6
5787
5788echo "$as_me:$LINENO: checking size of char" >&5
5789echo $ECHO_N "checking size of char... $ECHO_C" >&6
5790if test "${ac_cv_sizeof_char+set}" = set; then
5791 echo $ECHO_N "(cached) $ECHO_C" >&6
5792else
5793 if test "$ac_cv_type_char" = yes; then
5794 # The cast to unsigned long works around a bug in the HP C Compiler
5795 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5796 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5797 # This bug is HP SR number 8606223364.
5798 if test "$cross_compiling" = yes; then
5799 # Depending upon the size, compute the lo and hi bounds.
5800cat >conftest.$ac_ext <<_ACEOF
5801#line $LINENO "configure"
5802#include "confdefs.h"
5803$ac_includes_default
5804#ifdef F77_DUMMY_MAIN
5805# ifdef __cplusplus
5806 extern "C"
5807# endif
5808 int F77_DUMMY_MAIN() { return 1; }
5809#endif
5810int
5811main ()
5812{
5813static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5814test_array [0] = 0
5815
5816 ;
5817 return 0;
5818}
5819_ACEOF
5820rm -f conftest.$ac_objext
5821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5822 (eval $ac_compile) 2>&5
5823 ac_status=$?
5824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5825 (exit $ac_status); } &&
5826 { ac_try='test -s conftest.$ac_objext'
5827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5828 (eval $ac_try) 2>&5
5829 ac_status=$?
5830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5831 (exit $ac_status); }; }; then
5832 ac_lo=0 ac_mid=0
5833 while :; do
5834 cat >conftest.$ac_ext <<_ACEOF
5835#line $LINENO "configure"
5836#include "confdefs.h"
5837$ac_includes_default
5838#ifdef F77_DUMMY_MAIN
5839# ifdef __cplusplus
5840 extern "C"
5841# endif
5842 int F77_DUMMY_MAIN() { return 1; }
5843#endif
5844int
5845main ()
5846{
5847static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5848test_array [0] = 0
5849
5850 ;
5851 return 0;
5852}
5853_ACEOF
5854rm -f conftest.$ac_objext
5855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5856 (eval $ac_compile) 2>&5
5857 ac_status=$?
5858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5859 (exit $ac_status); } &&
5860 { ac_try='test -s conftest.$ac_objext'
5861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5862 (eval $ac_try) 2>&5
5863 ac_status=$?
5864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5865 (exit $ac_status); }; }; then
5866 ac_hi=$ac_mid; break
5867else
5868 echo "$as_me: failed program was:" >&5
5869cat conftest.$ac_ext >&5
5870ac_lo=`expr $ac_mid + 1`
5871 if test $ac_lo -le $ac_mid; then
5872 ac_lo= ac_hi=
5873 break
5874 fi
5875 ac_mid=`expr 2 '*' $ac_mid + 1`
5876fi
5877rm -f conftest.$ac_objext conftest.$ac_ext
5878 done
5879else
5880 echo "$as_me: failed program was:" >&5
5881cat conftest.$ac_ext >&5
5882cat >conftest.$ac_ext <<_ACEOF
5883#line $LINENO "configure"
5884#include "confdefs.h"
5885$ac_includes_default
5886#ifdef F77_DUMMY_MAIN
5887# ifdef __cplusplus
5888 extern "C"
5889# endif
5890 int F77_DUMMY_MAIN() { return 1; }
5891#endif
5892int
5893main ()
5894{
5895static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5896test_array [0] = 0
5897
5898 ;
5899 return 0;
5900}
5901_ACEOF
5902rm -f conftest.$ac_objext
5903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5904 (eval $ac_compile) 2>&5
5905 ac_status=$?
5906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907 (exit $ac_status); } &&
5908 { ac_try='test -s conftest.$ac_objext'
5909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5910 (eval $ac_try) 2>&5
5911 ac_status=$?
5912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5913 (exit $ac_status); }; }; then
5914 ac_hi=-1 ac_mid=-1
5915 while :; do
5916 cat >conftest.$ac_ext <<_ACEOF
5917#line $LINENO "configure"
5918#include "confdefs.h"
5919$ac_includes_default
5920#ifdef F77_DUMMY_MAIN
5921# ifdef __cplusplus
5922 extern "C"
5923# endif
5924 int F77_DUMMY_MAIN() { return 1; }
5925#endif
5926int
5927main ()
5928{
5929static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5930test_array [0] = 0
5931
5932 ;
5933 return 0;
5934}
5935_ACEOF
5936rm -f conftest.$ac_objext
5937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5938 (eval $ac_compile) 2>&5
5939 ac_status=$?
5940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5941 (exit $ac_status); } &&
5942 { ac_try='test -s conftest.$ac_objext'
5943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5944 (eval $ac_try) 2>&5
5945 ac_status=$?
5946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5947 (exit $ac_status); }; }; then
5948 ac_lo=$ac_mid; break
5949else
5950 echo "$as_me: failed program was:" >&5
5951cat conftest.$ac_ext >&5
5952ac_hi=`expr '(' $ac_mid ')' - 1`
5953 if test $ac_mid -le $ac_hi; then
5954 ac_lo= ac_hi=
5955 break
5956 fi
5957 ac_mid=`expr 2 '*' $ac_mid`
5958fi
5959rm -f conftest.$ac_objext conftest.$ac_ext
5960 done
5961else
5962 echo "$as_me: failed program was:" >&5
5963cat conftest.$ac_ext >&5
5964ac_lo= ac_hi=
5965fi
5966rm -f conftest.$ac_objext conftest.$ac_ext
5967fi
5968rm -f conftest.$ac_objext conftest.$ac_ext
5969# Binary search between lo and hi bounds.
5970while test "x$ac_lo" != "x$ac_hi"; do
5971 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5972 cat >conftest.$ac_ext <<_ACEOF
5973#line $LINENO "configure"
5974#include "confdefs.h"
5975$ac_includes_default
5976#ifdef F77_DUMMY_MAIN
5977# ifdef __cplusplus
5978 extern "C"
5979# endif
5980 int F77_DUMMY_MAIN() { return 1; }
5981#endif
5982int
5983main ()
5984{
5985static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5986test_array [0] = 0
5987
5988 ;
5989 return 0;
5990}
5991_ACEOF
5992rm -f conftest.$ac_objext
5993if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5994 (eval $ac_compile) 2>&5
5995 ac_status=$?
5996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5997 (exit $ac_status); } &&
5998 { ac_try='test -s conftest.$ac_objext'
5999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6000 (eval $ac_try) 2>&5
6001 ac_status=$?
6002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6003 (exit $ac_status); }; }; then
6004 ac_hi=$ac_mid
6005else
6006 echo "$as_me: failed program was:" >&5
6007cat conftest.$ac_ext >&5
6008ac_lo=`expr '(' $ac_mid ')' + 1`
6009fi
6010rm -f conftest.$ac_objext conftest.$ac_ext
6011done
6012case $ac_lo in
6013?*) ac_cv_sizeof_char=$ac_lo;;
6014'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6015echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6016 { (exit 1); exit 1; }; } ;;
6017esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006018else
6019 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006020 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6021echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6022 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006023else
Martin v. Löwis11437992002-04-12 09:54:03 +00006024 cat >conftest.$ac_ext <<_ACEOF
6025#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006026#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006027$ac_includes_default
6028long longval () { return (long) (sizeof (char)); }
6029unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006030#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006031#include <stdlib.h>
6032#ifdef F77_DUMMY_MAIN
6033# ifdef __cplusplus
6034 extern "C"
6035# endif
6036 int F77_DUMMY_MAIN() { return 1; }
6037#endif
6038int
6039main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006040{
Martin v. Löwis11437992002-04-12 09:54:03 +00006041
6042 FILE *f = fopen ("conftest.val", "w");
6043 if (! f)
6044 exit (1);
6045 if (((long) (sizeof (char))) < 0)
6046 {
6047 long i = longval ();
6048 if (i != ((long) (sizeof (char))))
6049 exit (1);
6050 fprintf (f, "%ld\n", i);
6051 }
6052 else
6053 {
6054 unsigned long i = ulongval ();
6055 if (i != ((long) (sizeof (char))))
6056 exit (1);
6057 fprintf (f, "%lu\n", i);
6058 }
6059 exit (ferror (f) || fclose (f) != 0);
6060
6061 ;
6062 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006063}
Martin v. Löwis11437992002-04-12 09:54:03 +00006064_ACEOF
6065rm -f conftest$ac_exeext
6066if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6067 (eval $ac_link) 2>&5
6068 ac_status=$?
6069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6070 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6072 (eval $ac_try) 2>&5
6073 ac_status=$?
6074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6075 (exit $ac_status); }; }; then
6076 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006077else
Martin v. Löwis11437992002-04-12 09:54:03 +00006078 echo "$as_me: program exited with status $ac_status" >&5
6079echo "$as_me: failed program was:" >&5
6080cat conftest.$ac_ext >&5
6081( exit $ac_status )
6082{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6083echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6084 { (exit 1); exit 1; }; }
6085fi
6086rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6087fi
6088fi
6089rm -f conftest.val
6090else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006091 ac_cv_sizeof_char=0
6092fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006093fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006094echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6095echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6096cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006097#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006098_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006099
6100
Martin v. Löwis11437992002-04-12 09:54:03 +00006101echo "$as_me:$LINENO: checking for short" >&5
6102echo $ECHO_N "checking for short... $ECHO_C" >&6
6103if test "${ac_cv_type_short+set}" = set; then
6104 echo $ECHO_N "(cached) $ECHO_C" >&6
6105else
6106 cat >conftest.$ac_ext <<_ACEOF
6107#line $LINENO "configure"
6108#include "confdefs.h"
6109$ac_includes_default
6110#ifdef F77_DUMMY_MAIN
6111# ifdef __cplusplus
6112 extern "C"
6113# endif
6114 int F77_DUMMY_MAIN() { return 1; }
6115#endif
6116int
6117main ()
6118{
6119if ((short *) 0)
6120 return 0;
6121if (sizeof (short))
6122 return 0;
6123 ;
6124 return 0;
6125}
6126_ACEOF
6127rm -f conftest.$ac_objext
6128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6129 (eval $ac_compile) 2>&5
6130 ac_status=$?
6131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6132 (exit $ac_status); } &&
6133 { ac_try='test -s conftest.$ac_objext'
6134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6135 (eval $ac_try) 2>&5
6136 ac_status=$?
6137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6138 (exit $ac_status); }; }; then
6139 ac_cv_type_short=yes
6140else
6141 echo "$as_me: failed program was:" >&5
6142cat conftest.$ac_ext >&5
6143ac_cv_type_short=no
6144fi
6145rm -f conftest.$ac_objext conftest.$ac_ext
6146fi
6147echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6148echo "${ECHO_T}$ac_cv_type_short" >&6
6149
6150echo "$as_me:$LINENO: checking size of short" >&5
6151echo $ECHO_N "checking size of short... $ECHO_C" >&6
6152if test "${ac_cv_sizeof_short+set}" = set; then
6153 echo $ECHO_N "(cached) $ECHO_C" >&6
6154else
6155 if test "$ac_cv_type_short" = yes; then
6156 # The cast to unsigned long works around a bug in the HP C Compiler
6157 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6158 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6159 # This bug is HP SR number 8606223364.
6160 if test "$cross_compiling" = yes; then
6161 # Depending upon the size, compute the lo and hi bounds.
6162cat >conftest.$ac_ext <<_ACEOF
6163#line $LINENO "configure"
6164#include "confdefs.h"
6165$ac_includes_default
6166#ifdef F77_DUMMY_MAIN
6167# ifdef __cplusplus
6168 extern "C"
6169# endif
6170 int F77_DUMMY_MAIN() { return 1; }
6171#endif
6172int
6173main ()
6174{
6175static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6176test_array [0] = 0
6177
6178 ;
6179 return 0;
6180}
6181_ACEOF
6182rm -f conftest.$ac_objext
6183if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6184 (eval $ac_compile) 2>&5
6185 ac_status=$?
6186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187 (exit $ac_status); } &&
6188 { ac_try='test -s conftest.$ac_objext'
6189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6190 (eval $ac_try) 2>&5
6191 ac_status=$?
6192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6193 (exit $ac_status); }; }; then
6194 ac_lo=0 ac_mid=0
6195 while :; do
6196 cat >conftest.$ac_ext <<_ACEOF
6197#line $LINENO "configure"
6198#include "confdefs.h"
6199$ac_includes_default
6200#ifdef F77_DUMMY_MAIN
6201# ifdef __cplusplus
6202 extern "C"
6203# endif
6204 int F77_DUMMY_MAIN() { return 1; }
6205#endif
6206int
6207main ()
6208{
6209static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6210test_array [0] = 0
6211
6212 ;
6213 return 0;
6214}
6215_ACEOF
6216rm -f conftest.$ac_objext
6217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6218 (eval $ac_compile) 2>&5
6219 ac_status=$?
6220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6221 (exit $ac_status); } &&
6222 { ac_try='test -s conftest.$ac_objext'
6223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6224 (eval $ac_try) 2>&5
6225 ac_status=$?
6226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6227 (exit $ac_status); }; }; then
6228 ac_hi=$ac_mid; break
6229else
6230 echo "$as_me: failed program was:" >&5
6231cat conftest.$ac_ext >&5
6232ac_lo=`expr $ac_mid + 1`
6233 if test $ac_lo -le $ac_mid; then
6234 ac_lo= ac_hi=
6235 break
6236 fi
6237 ac_mid=`expr 2 '*' $ac_mid + 1`
6238fi
6239rm -f conftest.$ac_objext conftest.$ac_ext
6240 done
6241else
6242 echo "$as_me: failed program was:" >&5
6243cat conftest.$ac_ext >&5
6244cat >conftest.$ac_ext <<_ACEOF
6245#line $LINENO "configure"
6246#include "confdefs.h"
6247$ac_includes_default
6248#ifdef F77_DUMMY_MAIN
6249# ifdef __cplusplus
6250 extern "C"
6251# endif
6252 int F77_DUMMY_MAIN() { return 1; }
6253#endif
6254int
6255main ()
6256{
6257static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6258test_array [0] = 0
6259
6260 ;
6261 return 0;
6262}
6263_ACEOF
6264rm -f conftest.$ac_objext
6265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6266 (eval $ac_compile) 2>&5
6267 ac_status=$?
6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6269 (exit $ac_status); } &&
6270 { ac_try='test -s conftest.$ac_objext'
6271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6272 (eval $ac_try) 2>&5
6273 ac_status=$?
6274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6275 (exit $ac_status); }; }; then
6276 ac_hi=-1 ac_mid=-1
6277 while :; do
6278 cat >conftest.$ac_ext <<_ACEOF
6279#line $LINENO "configure"
6280#include "confdefs.h"
6281$ac_includes_default
6282#ifdef F77_DUMMY_MAIN
6283# ifdef __cplusplus
6284 extern "C"
6285# endif
6286 int F77_DUMMY_MAIN() { return 1; }
6287#endif
6288int
6289main ()
6290{
6291static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6292test_array [0] = 0
6293
6294 ;
6295 return 0;
6296}
6297_ACEOF
6298rm -f conftest.$ac_objext
6299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6300 (eval $ac_compile) 2>&5
6301 ac_status=$?
6302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6303 (exit $ac_status); } &&
6304 { ac_try='test -s conftest.$ac_objext'
6305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6306 (eval $ac_try) 2>&5
6307 ac_status=$?
6308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6309 (exit $ac_status); }; }; then
6310 ac_lo=$ac_mid; break
6311else
6312 echo "$as_me: failed program was:" >&5
6313cat conftest.$ac_ext >&5
6314ac_hi=`expr '(' $ac_mid ')' - 1`
6315 if test $ac_mid -le $ac_hi; then
6316 ac_lo= ac_hi=
6317 break
6318 fi
6319 ac_mid=`expr 2 '*' $ac_mid`
6320fi
6321rm -f conftest.$ac_objext conftest.$ac_ext
6322 done
6323else
6324 echo "$as_me: failed program was:" >&5
6325cat conftest.$ac_ext >&5
6326ac_lo= ac_hi=
6327fi
6328rm -f conftest.$ac_objext conftest.$ac_ext
6329fi
6330rm -f conftest.$ac_objext conftest.$ac_ext
6331# Binary search between lo and hi bounds.
6332while test "x$ac_lo" != "x$ac_hi"; do
6333 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6334 cat >conftest.$ac_ext <<_ACEOF
6335#line $LINENO "configure"
6336#include "confdefs.h"
6337$ac_includes_default
6338#ifdef F77_DUMMY_MAIN
6339# ifdef __cplusplus
6340 extern "C"
6341# endif
6342 int F77_DUMMY_MAIN() { return 1; }
6343#endif
6344int
6345main ()
6346{
6347static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6348test_array [0] = 0
6349
6350 ;
6351 return 0;
6352}
6353_ACEOF
6354rm -f conftest.$ac_objext
6355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6356 (eval $ac_compile) 2>&5
6357 ac_status=$?
6358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6359 (exit $ac_status); } &&
6360 { ac_try='test -s conftest.$ac_objext'
6361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6362 (eval $ac_try) 2>&5
6363 ac_status=$?
6364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6365 (exit $ac_status); }; }; then
6366 ac_hi=$ac_mid
6367else
6368 echo "$as_me: failed program was:" >&5
6369cat conftest.$ac_ext >&5
6370ac_lo=`expr '(' $ac_mid ')' + 1`
6371fi
6372rm -f conftest.$ac_objext conftest.$ac_ext
6373done
6374case $ac_lo in
6375?*) ac_cv_sizeof_short=$ac_lo;;
6376'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6377echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6378 { (exit 1); exit 1; }; } ;;
6379esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006380else
6381 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006382 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6383echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6384 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006385else
Martin v. Löwis11437992002-04-12 09:54:03 +00006386 cat >conftest.$ac_ext <<_ACEOF
6387#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006388#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006389$ac_includes_default
6390long longval () { return (long) (sizeof (short)); }
6391unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006392#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006393#include <stdlib.h>
6394#ifdef F77_DUMMY_MAIN
6395# ifdef __cplusplus
6396 extern "C"
6397# endif
6398 int F77_DUMMY_MAIN() { return 1; }
6399#endif
6400int
6401main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006402{
Martin v. Löwis11437992002-04-12 09:54:03 +00006403
6404 FILE *f = fopen ("conftest.val", "w");
6405 if (! f)
6406 exit (1);
6407 if (((long) (sizeof (short))) < 0)
6408 {
6409 long i = longval ();
6410 if (i != ((long) (sizeof (short))))
6411 exit (1);
6412 fprintf (f, "%ld\n", i);
6413 }
6414 else
6415 {
6416 unsigned long i = ulongval ();
6417 if (i != ((long) (sizeof (short))))
6418 exit (1);
6419 fprintf (f, "%lu\n", i);
6420 }
6421 exit (ferror (f) || fclose (f) != 0);
6422
6423 ;
6424 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006425}
Martin v. Löwis11437992002-04-12 09:54:03 +00006426_ACEOF
6427rm -f conftest$ac_exeext
6428if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6429 (eval $ac_link) 2>&5
6430 ac_status=$?
6431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6432 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6434 (eval $ac_try) 2>&5
6435 ac_status=$?
6436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6437 (exit $ac_status); }; }; then
6438 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006439else
Martin v. Löwis11437992002-04-12 09:54:03 +00006440 echo "$as_me: program exited with status $ac_status" >&5
6441echo "$as_me: failed program was:" >&5
6442cat conftest.$ac_ext >&5
6443( exit $ac_status )
6444{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6445echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6446 { (exit 1); exit 1; }; }
6447fi
6448rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6449fi
6450fi
6451rm -f conftest.val
6452else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006453 ac_cv_sizeof_short=0
6454fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006455fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006456echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6457echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6458cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006459#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006460_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006461
6462
Martin v. Löwis11437992002-04-12 09:54:03 +00006463echo "$as_me:$LINENO: checking for float" >&5
6464echo $ECHO_N "checking for float... $ECHO_C" >&6
6465if test "${ac_cv_type_float+set}" = set; then
6466 echo $ECHO_N "(cached) $ECHO_C" >&6
6467else
6468 cat >conftest.$ac_ext <<_ACEOF
6469#line $LINENO "configure"
6470#include "confdefs.h"
6471$ac_includes_default
6472#ifdef F77_DUMMY_MAIN
6473# ifdef __cplusplus
6474 extern "C"
6475# endif
6476 int F77_DUMMY_MAIN() { return 1; }
6477#endif
6478int
6479main ()
6480{
6481if ((float *) 0)
6482 return 0;
6483if (sizeof (float))
6484 return 0;
6485 ;
6486 return 0;
6487}
6488_ACEOF
6489rm -f conftest.$ac_objext
6490if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6491 (eval $ac_compile) 2>&5
6492 ac_status=$?
6493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6494 (exit $ac_status); } &&
6495 { ac_try='test -s conftest.$ac_objext'
6496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6497 (eval $ac_try) 2>&5
6498 ac_status=$?
6499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6500 (exit $ac_status); }; }; then
6501 ac_cv_type_float=yes
6502else
6503 echo "$as_me: failed program was:" >&5
6504cat conftest.$ac_ext >&5
6505ac_cv_type_float=no
6506fi
6507rm -f conftest.$ac_objext conftest.$ac_ext
6508fi
6509echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6510echo "${ECHO_T}$ac_cv_type_float" >&6
6511
6512echo "$as_me:$LINENO: checking size of float" >&5
6513echo $ECHO_N "checking size of float... $ECHO_C" >&6
6514if test "${ac_cv_sizeof_float+set}" = set; then
6515 echo $ECHO_N "(cached) $ECHO_C" >&6
6516else
6517 if test "$ac_cv_type_float" = yes; then
6518 # The cast to unsigned long works around a bug in the HP C Compiler
6519 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6520 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6521 # This bug is HP SR number 8606223364.
6522 if test "$cross_compiling" = yes; then
6523 # Depending upon the size, compute the lo and hi bounds.
6524cat >conftest.$ac_ext <<_ACEOF
6525#line $LINENO "configure"
6526#include "confdefs.h"
6527$ac_includes_default
6528#ifdef F77_DUMMY_MAIN
6529# ifdef __cplusplus
6530 extern "C"
6531# endif
6532 int F77_DUMMY_MAIN() { return 1; }
6533#endif
6534int
6535main ()
6536{
6537static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6538test_array [0] = 0
6539
6540 ;
6541 return 0;
6542}
6543_ACEOF
6544rm -f conftest.$ac_objext
6545if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6546 (eval $ac_compile) 2>&5
6547 ac_status=$?
6548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6549 (exit $ac_status); } &&
6550 { ac_try='test -s conftest.$ac_objext'
6551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6552 (eval $ac_try) 2>&5
6553 ac_status=$?
6554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6555 (exit $ac_status); }; }; then
6556 ac_lo=0 ac_mid=0
6557 while :; do
6558 cat >conftest.$ac_ext <<_ACEOF
6559#line $LINENO "configure"
6560#include "confdefs.h"
6561$ac_includes_default
6562#ifdef F77_DUMMY_MAIN
6563# ifdef __cplusplus
6564 extern "C"
6565# endif
6566 int F77_DUMMY_MAIN() { return 1; }
6567#endif
6568int
6569main ()
6570{
6571static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6572test_array [0] = 0
6573
6574 ;
6575 return 0;
6576}
6577_ACEOF
6578rm -f conftest.$ac_objext
6579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6580 (eval $ac_compile) 2>&5
6581 ac_status=$?
6582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6583 (exit $ac_status); } &&
6584 { ac_try='test -s conftest.$ac_objext'
6585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6586 (eval $ac_try) 2>&5
6587 ac_status=$?
6588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6589 (exit $ac_status); }; }; then
6590 ac_hi=$ac_mid; break
6591else
6592 echo "$as_me: failed program was:" >&5
6593cat conftest.$ac_ext >&5
6594ac_lo=`expr $ac_mid + 1`
6595 if test $ac_lo -le $ac_mid; then
6596 ac_lo= ac_hi=
6597 break
6598 fi
6599 ac_mid=`expr 2 '*' $ac_mid + 1`
6600fi
6601rm -f conftest.$ac_objext conftest.$ac_ext
6602 done
6603else
6604 echo "$as_me: failed program was:" >&5
6605cat conftest.$ac_ext >&5
6606cat >conftest.$ac_ext <<_ACEOF
6607#line $LINENO "configure"
6608#include "confdefs.h"
6609$ac_includes_default
6610#ifdef F77_DUMMY_MAIN
6611# ifdef __cplusplus
6612 extern "C"
6613# endif
6614 int F77_DUMMY_MAIN() { return 1; }
6615#endif
6616int
6617main ()
6618{
6619static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6620test_array [0] = 0
6621
6622 ;
6623 return 0;
6624}
6625_ACEOF
6626rm -f conftest.$ac_objext
6627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6628 (eval $ac_compile) 2>&5
6629 ac_status=$?
6630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6631 (exit $ac_status); } &&
6632 { ac_try='test -s conftest.$ac_objext'
6633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6634 (eval $ac_try) 2>&5
6635 ac_status=$?
6636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6637 (exit $ac_status); }; }; then
6638 ac_hi=-1 ac_mid=-1
6639 while :; do
6640 cat >conftest.$ac_ext <<_ACEOF
6641#line $LINENO "configure"
6642#include "confdefs.h"
6643$ac_includes_default
6644#ifdef F77_DUMMY_MAIN
6645# ifdef __cplusplus
6646 extern "C"
6647# endif
6648 int F77_DUMMY_MAIN() { return 1; }
6649#endif
6650int
6651main ()
6652{
6653static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6654test_array [0] = 0
6655
6656 ;
6657 return 0;
6658}
6659_ACEOF
6660rm -f conftest.$ac_objext
6661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6662 (eval $ac_compile) 2>&5
6663 ac_status=$?
6664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6665 (exit $ac_status); } &&
6666 { ac_try='test -s conftest.$ac_objext'
6667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6668 (eval $ac_try) 2>&5
6669 ac_status=$?
6670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6671 (exit $ac_status); }; }; then
6672 ac_lo=$ac_mid; break
6673else
6674 echo "$as_me: failed program was:" >&5
6675cat conftest.$ac_ext >&5
6676ac_hi=`expr '(' $ac_mid ')' - 1`
6677 if test $ac_mid -le $ac_hi; then
6678 ac_lo= ac_hi=
6679 break
6680 fi
6681 ac_mid=`expr 2 '*' $ac_mid`
6682fi
6683rm -f conftest.$ac_objext conftest.$ac_ext
6684 done
6685else
6686 echo "$as_me: failed program was:" >&5
6687cat conftest.$ac_ext >&5
6688ac_lo= ac_hi=
6689fi
6690rm -f conftest.$ac_objext conftest.$ac_ext
6691fi
6692rm -f conftest.$ac_objext conftest.$ac_ext
6693# Binary search between lo and hi bounds.
6694while test "x$ac_lo" != "x$ac_hi"; do
6695 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6696 cat >conftest.$ac_ext <<_ACEOF
6697#line $LINENO "configure"
6698#include "confdefs.h"
6699$ac_includes_default
6700#ifdef F77_DUMMY_MAIN
6701# ifdef __cplusplus
6702 extern "C"
6703# endif
6704 int F77_DUMMY_MAIN() { return 1; }
6705#endif
6706int
6707main ()
6708{
6709static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6710test_array [0] = 0
6711
6712 ;
6713 return 0;
6714}
6715_ACEOF
6716rm -f conftest.$ac_objext
6717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6718 (eval $ac_compile) 2>&5
6719 ac_status=$?
6720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6721 (exit $ac_status); } &&
6722 { ac_try='test -s conftest.$ac_objext'
6723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6724 (eval $ac_try) 2>&5
6725 ac_status=$?
6726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6727 (exit $ac_status); }; }; then
6728 ac_hi=$ac_mid
6729else
6730 echo "$as_me: failed program was:" >&5
6731cat conftest.$ac_ext >&5
6732ac_lo=`expr '(' $ac_mid ')' + 1`
6733fi
6734rm -f conftest.$ac_objext conftest.$ac_ext
6735done
6736case $ac_lo in
6737?*) ac_cv_sizeof_float=$ac_lo;;
6738'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6739echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6740 { (exit 1); exit 1; }; } ;;
6741esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006742else
6743 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006744 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6745echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6746 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006747else
Martin v. Löwis11437992002-04-12 09:54:03 +00006748 cat >conftest.$ac_ext <<_ACEOF
6749#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006750#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006751$ac_includes_default
6752long longval () { return (long) (sizeof (float)); }
6753unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006754#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006755#include <stdlib.h>
6756#ifdef F77_DUMMY_MAIN
6757# ifdef __cplusplus
6758 extern "C"
6759# endif
6760 int F77_DUMMY_MAIN() { return 1; }
6761#endif
6762int
6763main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006764{
Martin v. Löwis11437992002-04-12 09:54:03 +00006765
6766 FILE *f = fopen ("conftest.val", "w");
6767 if (! f)
6768 exit (1);
6769 if (((long) (sizeof (float))) < 0)
6770 {
6771 long i = longval ();
6772 if (i != ((long) (sizeof (float))))
6773 exit (1);
6774 fprintf (f, "%ld\n", i);
6775 }
6776 else
6777 {
6778 unsigned long i = ulongval ();
6779 if (i != ((long) (sizeof (float))))
6780 exit (1);
6781 fprintf (f, "%lu\n", i);
6782 }
6783 exit (ferror (f) || fclose (f) != 0);
6784
6785 ;
6786 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006787}
Martin v. Löwis11437992002-04-12 09:54:03 +00006788_ACEOF
6789rm -f conftest$ac_exeext
6790if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6791 (eval $ac_link) 2>&5
6792 ac_status=$?
6793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6794 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6796 (eval $ac_try) 2>&5
6797 ac_status=$?
6798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6799 (exit $ac_status); }; }; then
6800 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006801else
Martin v. Löwis11437992002-04-12 09:54:03 +00006802 echo "$as_me: program exited with status $ac_status" >&5
6803echo "$as_me: failed program was:" >&5
6804cat conftest.$ac_ext >&5
6805( exit $ac_status )
6806{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6807echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6808 { (exit 1); exit 1; }; }
6809fi
6810rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6811fi
6812fi
6813rm -f conftest.val
6814else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006815 ac_cv_sizeof_float=0
6816fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006817fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006818echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6819echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6820cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006821#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006822_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006823
6824
Martin v. Löwis11437992002-04-12 09:54:03 +00006825echo "$as_me:$LINENO: checking for double" >&5
6826echo $ECHO_N "checking for double... $ECHO_C" >&6
6827if test "${ac_cv_type_double+set}" = set; then
6828 echo $ECHO_N "(cached) $ECHO_C" >&6
6829else
6830 cat >conftest.$ac_ext <<_ACEOF
6831#line $LINENO "configure"
6832#include "confdefs.h"
6833$ac_includes_default
6834#ifdef F77_DUMMY_MAIN
6835# ifdef __cplusplus
6836 extern "C"
6837# endif
6838 int F77_DUMMY_MAIN() { return 1; }
6839#endif
6840int
6841main ()
6842{
6843if ((double *) 0)
6844 return 0;
6845if (sizeof (double))
6846 return 0;
6847 ;
6848 return 0;
6849}
6850_ACEOF
6851rm -f conftest.$ac_objext
6852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6853 (eval $ac_compile) 2>&5
6854 ac_status=$?
6855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6856 (exit $ac_status); } &&
6857 { ac_try='test -s conftest.$ac_objext'
6858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6859 (eval $ac_try) 2>&5
6860 ac_status=$?
6861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6862 (exit $ac_status); }; }; then
6863 ac_cv_type_double=yes
6864else
6865 echo "$as_me: failed program was:" >&5
6866cat conftest.$ac_ext >&5
6867ac_cv_type_double=no
6868fi
6869rm -f conftest.$ac_objext conftest.$ac_ext
6870fi
6871echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6872echo "${ECHO_T}$ac_cv_type_double" >&6
6873
6874echo "$as_me:$LINENO: checking size of double" >&5
6875echo $ECHO_N "checking size of double... $ECHO_C" >&6
6876if test "${ac_cv_sizeof_double+set}" = set; then
6877 echo $ECHO_N "(cached) $ECHO_C" >&6
6878else
6879 if test "$ac_cv_type_double" = yes; then
6880 # The cast to unsigned long works around a bug in the HP C Compiler
6881 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6882 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6883 # This bug is HP SR number 8606223364.
6884 if test "$cross_compiling" = yes; then
6885 # Depending upon the size, compute the lo and hi bounds.
6886cat >conftest.$ac_ext <<_ACEOF
6887#line $LINENO "configure"
6888#include "confdefs.h"
6889$ac_includes_default
6890#ifdef F77_DUMMY_MAIN
6891# ifdef __cplusplus
6892 extern "C"
6893# endif
6894 int F77_DUMMY_MAIN() { return 1; }
6895#endif
6896int
6897main ()
6898{
6899static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6900test_array [0] = 0
6901
6902 ;
6903 return 0;
6904}
6905_ACEOF
6906rm -f conftest.$ac_objext
6907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6908 (eval $ac_compile) 2>&5
6909 ac_status=$?
6910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6911 (exit $ac_status); } &&
6912 { ac_try='test -s conftest.$ac_objext'
6913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6914 (eval $ac_try) 2>&5
6915 ac_status=$?
6916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6917 (exit $ac_status); }; }; then
6918 ac_lo=0 ac_mid=0
6919 while :; do
6920 cat >conftest.$ac_ext <<_ACEOF
6921#line $LINENO "configure"
6922#include "confdefs.h"
6923$ac_includes_default
6924#ifdef F77_DUMMY_MAIN
6925# ifdef __cplusplus
6926 extern "C"
6927# endif
6928 int F77_DUMMY_MAIN() { return 1; }
6929#endif
6930int
6931main ()
6932{
6933static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6934test_array [0] = 0
6935
6936 ;
6937 return 0;
6938}
6939_ACEOF
6940rm -f conftest.$ac_objext
6941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6942 (eval $ac_compile) 2>&5
6943 ac_status=$?
6944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6945 (exit $ac_status); } &&
6946 { ac_try='test -s conftest.$ac_objext'
6947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6948 (eval $ac_try) 2>&5
6949 ac_status=$?
6950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6951 (exit $ac_status); }; }; then
6952 ac_hi=$ac_mid; break
6953else
6954 echo "$as_me: failed program was:" >&5
6955cat conftest.$ac_ext >&5
6956ac_lo=`expr $ac_mid + 1`
6957 if test $ac_lo -le $ac_mid; then
6958 ac_lo= ac_hi=
6959 break
6960 fi
6961 ac_mid=`expr 2 '*' $ac_mid + 1`
6962fi
6963rm -f conftest.$ac_objext conftest.$ac_ext
6964 done
6965else
6966 echo "$as_me: failed program was:" >&5
6967cat conftest.$ac_ext >&5
6968cat >conftest.$ac_ext <<_ACEOF
6969#line $LINENO "configure"
6970#include "confdefs.h"
6971$ac_includes_default
6972#ifdef F77_DUMMY_MAIN
6973# ifdef __cplusplus
6974 extern "C"
6975# endif
6976 int F77_DUMMY_MAIN() { return 1; }
6977#endif
6978int
6979main ()
6980{
6981static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6982test_array [0] = 0
6983
6984 ;
6985 return 0;
6986}
6987_ACEOF
6988rm -f conftest.$ac_objext
6989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6990 (eval $ac_compile) 2>&5
6991 ac_status=$?
6992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6993 (exit $ac_status); } &&
6994 { ac_try='test -s conftest.$ac_objext'
6995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6996 (eval $ac_try) 2>&5
6997 ac_status=$?
6998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6999 (exit $ac_status); }; }; then
7000 ac_hi=-1 ac_mid=-1
7001 while :; do
7002 cat >conftest.$ac_ext <<_ACEOF
7003#line $LINENO "configure"
7004#include "confdefs.h"
7005$ac_includes_default
7006#ifdef F77_DUMMY_MAIN
7007# ifdef __cplusplus
7008 extern "C"
7009# endif
7010 int F77_DUMMY_MAIN() { return 1; }
7011#endif
7012int
7013main ()
7014{
7015static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7016test_array [0] = 0
7017
7018 ;
7019 return 0;
7020}
7021_ACEOF
7022rm -f conftest.$ac_objext
7023if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7024 (eval $ac_compile) 2>&5
7025 ac_status=$?
7026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7027 (exit $ac_status); } &&
7028 { ac_try='test -s conftest.$ac_objext'
7029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7030 (eval $ac_try) 2>&5
7031 ac_status=$?
7032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7033 (exit $ac_status); }; }; then
7034 ac_lo=$ac_mid; break
7035else
7036 echo "$as_me: failed program was:" >&5
7037cat conftest.$ac_ext >&5
7038ac_hi=`expr '(' $ac_mid ')' - 1`
7039 if test $ac_mid -le $ac_hi; then
7040 ac_lo= ac_hi=
7041 break
7042 fi
7043 ac_mid=`expr 2 '*' $ac_mid`
7044fi
7045rm -f conftest.$ac_objext conftest.$ac_ext
7046 done
7047else
7048 echo "$as_me: failed program was:" >&5
7049cat conftest.$ac_ext >&5
7050ac_lo= ac_hi=
7051fi
7052rm -f conftest.$ac_objext conftest.$ac_ext
7053fi
7054rm -f conftest.$ac_objext conftest.$ac_ext
7055# Binary search between lo and hi bounds.
7056while test "x$ac_lo" != "x$ac_hi"; do
7057 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7058 cat >conftest.$ac_ext <<_ACEOF
7059#line $LINENO "configure"
7060#include "confdefs.h"
7061$ac_includes_default
7062#ifdef F77_DUMMY_MAIN
7063# ifdef __cplusplus
7064 extern "C"
7065# endif
7066 int F77_DUMMY_MAIN() { return 1; }
7067#endif
7068int
7069main ()
7070{
7071static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7072test_array [0] = 0
7073
7074 ;
7075 return 0;
7076}
7077_ACEOF
7078rm -f conftest.$ac_objext
7079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7080 (eval $ac_compile) 2>&5
7081 ac_status=$?
7082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7083 (exit $ac_status); } &&
7084 { ac_try='test -s conftest.$ac_objext'
7085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7086 (eval $ac_try) 2>&5
7087 ac_status=$?
7088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7089 (exit $ac_status); }; }; then
7090 ac_hi=$ac_mid
7091else
7092 echo "$as_me: failed program was:" >&5
7093cat conftest.$ac_ext >&5
7094ac_lo=`expr '(' $ac_mid ')' + 1`
7095fi
7096rm -f conftest.$ac_objext conftest.$ac_ext
7097done
7098case $ac_lo in
7099?*) ac_cv_sizeof_double=$ac_lo;;
7100'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7101echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7102 { (exit 1); exit 1; }; } ;;
7103esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007104else
7105 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007106 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7107echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7108 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007109else
Martin v. Löwis11437992002-04-12 09:54:03 +00007110 cat >conftest.$ac_ext <<_ACEOF
7111#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007112#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007113$ac_includes_default
7114long longval () { return (long) (sizeof (double)); }
7115unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007116#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007117#include <stdlib.h>
7118#ifdef F77_DUMMY_MAIN
7119# ifdef __cplusplus
7120 extern "C"
7121# endif
7122 int F77_DUMMY_MAIN() { return 1; }
7123#endif
7124int
7125main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007126{
Martin v. Löwis11437992002-04-12 09:54:03 +00007127
7128 FILE *f = fopen ("conftest.val", "w");
7129 if (! f)
7130 exit (1);
7131 if (((long) (sizeof (double))) < 0)
7132 {
7133 long i = longval ();
7134 if (i != ((long) (sizeof (double))))
7135 exit (1);
7136 fprintf (f, "%ld\n", i);
7137 }
7138 else
7139 {
7140 unsigned long i = ulongval ();
7141 if (i != ((long) (sizeof (double))))
7142 exit (1);
7143 fprintf (f, "%lu\n", i);
7144 }
7145 exit (ferror (f) || fclose (f) != 0);
7146
7147 ;
7148 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007149}
Martin v. Löwis11437992002-04-12 09:54:03 +00007150_ACEOF
7151rm -f conftest$ac_exeext
7152if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7153 (eval $ac_link) 2>&5
7154 ac_status=$?
7155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7156 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7158 (eval $ac_try) 2>&5
7159 ac_status=$?
7160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7161 (exit $ac_status); }; }; then
7162 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007163else
Martin v. Löwis11437992002-04-12 09:54:03 +00007164 echo "$as_me: program exited with status $ac_status" >&5
7165echo "$as_me: failed program was:" >&5
7166cat conftest.$ac_ext >&5
7167( exit $ac_status )
7168{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7169echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7170 { (exit 1); exit 1; }; }
7171fi
7172rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7173fi
7174fi
7175rm -f conftest.val
7176else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007177 ac_cv_sizeof_double=0
7178fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007179fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007180echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7181echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7182cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007183#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007184_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007185
7186
Martin v. Löwis11437992002-04-12 09:54:03 +00007187echo "$as_me:$LINENO: checking for fpos_t" >&5
7188echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7189if test "${ac_cv_type_fpos_t+set}" = set; then
7190 echo $ECHO_N "(cached) $ECHO_C" >&6
7191else
7192 cat >conftest.$ac_ext <<_ACEOF
7193#line $LINENO "configure"
7194#include "confdefs.h"
7195$ac_includes_default
7196#ifdef F77_DUMMY_MAIN
7197# ifdef __cplusplus
7198 extern "C"
7199# endif
7200 int F77_DUMMY_MAIN() { return 1; }
7201#endif
7202int
7203main ()
7204{
7205if ((fpos_t *) 0)
7206 return 0;
7207if (sizeof (fpos_t))
7208 return 0;
7209 ;
7210 return 0;
7211}
7212_ACEOF
7213rm -f conftest.$ac_objext
7214if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7215 (eval $ac_compile) 2>&5
7216 ac_status=$?
7217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7218 (exit $ac_status); } &&
7219 { ac_try='test -s conftest.$ac_objext'
7220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7221 (eval $ac_try) 2>&5
7222 ac_status=$?
7223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7224 (exit $ac_status); }; }; then
7225 ac_cv_type_fpos_t=yes
7226else
7227 echo "$as_me: failed program was:" >&5
7228cat conftest.$ac_ext >&5
7229ac_cv_type_fpos_t=no
7230fi
7231rm -f conftest.$ac_objext conftest.$ac_ext
7232fi
7233echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7234echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7235
7236echo "$as_me:$LINENO: checking size of fpos_t" >&5
7237echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7238if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7239 echo $ECHO_N "(cached) $ECHO_C" >&6
7240else
7241 if test "$ac_cv_type_fpos_t" = yes; then
7242 # The cast to unsigned long works around a bug in the HP C Compiler
7243 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7244 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7245 # This bug is HP SR number 8606223364.
7246 if test "$cross_compiling" = yes; then
7247 # Depending upon the size, compute the lo and hi bounds.
7248cat >conftest.$ac_ext <<_ACEOF
7249#line $LINENO "configure"
7250#include "confdefs.h"
7251$ac_includes_default
7252#ifdef F77_DUMMY_MAIN
7253# ifdef __cplusplus
7254 extern "C"
7255# endif
7256 int F77_DUMMY_MAIN() { return 1; }
7257#endif
7258int
7259main ()
7260{
7261static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7262test_array [0] = 0
7263
7264 ;
7265 return 0;
7266}
7267_ACEOF
7268rm -f conftest.$ac_objext
7269if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7270 (eval $ac_compile) 2>&5
7271 ac_status=$?
7272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7273 (exit $ac_status); } &&
7274 { ac_try='test -s conftest.$ac_objext'
7275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7276 (eval $ac_try) 2>&5
7277 ac_status=$?
7278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7279 (exit $ac_status); }; }; then
7280 ac_lo=0 ac_mid=0
7281 while :; do
7282 cat >conftest.$ac_ext <<_ACEOF
7283#line $LINENO "configure"
7284#include "confdefs.h"
7285$ac_includes_default
7286#ifdef F77_DUMMY_MAIN
7287# ifdef __cplusplus
7288 extern "C"
7289# endif
7290 int F77_DUMMY_MAIN() { return 1; }
7291#endif
7292int
7293main ()
7294{
7295static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7296test_array [0] = 0
7297
7298 ;
7299 return 0;
7300}
7301_ACEOF
7302rm -f conftest.$ac_objext
7303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7304 (eval $ac_compile) 2>&5
7305 ac_status=$?
7306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7307 (exit $ac_status); } &&
7308 { ac_try='test -s conftest.$ac_objext'
7309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7310 (eval $ac_try) 2>&5
7311 ac_status=$?
7312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7313 (exit $ac_status); }; }; then
7314 ac_hi=$ac_mid; break
7315else
7316 echo "$as_me: failed program was:" >&5
7317cat conftest.$ac_ext >&5
7318ac_lo=`expr $ac_mid + 1`
7319 if test $ac_lo -le $ac_mid; then
7320 ac_lo= ac_hi=
7321 break
7322 fi
7323 ac_mid=`expr 2 '*' $ac_mid + 1`
7324fi
7325rm -f conftest.$ac_objext conftest.$ac_ext
7326 done
7327else
7328 echo "$as_me: failed program was:" >&5
7329cat conftest.$ac_ext >&5
7330cat >conftest.$ac_ext <<_ACEOF
7331#line $LINENO "configure"
7332#include "confdefs.h"
7333$ac_includes_default
7334#ifdef F77_DUMMY_MAIN
7335# ifdef __cplusplus
7336 extern "C"
7337# endif
7338 int F77_DUMMY_MAIN() { return 1; }
7339#endif
7340int
7341main ()
7342{
7343static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7344test_array [0] = 0
7345
7346 ;
7347 return 0;
7348}
7349_ACEOF
7350rm -f conftest.$ac_objext
7351if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7352 (eval $ac_compile) 2>&5
7353 ac_status=$?
7354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7355 (exit $ac_status); } &&
7356 { ac_try='test -s conftest.$ac_objext'
7357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7358 (eval $ac_try) 2>&5
7359 ac_status=$?
7360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7361 (exit $ac_status); }; }; then
7362 ac_hi=-1 ac_mid=-1
7363 while :; do
7364 cat >conftest.$ac_ext <<_ACEOF
7365#line $LINENO "configure"
7366#include "confdefs.h"
7367$ac_includes_default
7368#ifdef F77_DUMMY_MAIN
7369# ifdef __cplusplus
7370 extern "C"
7371# endif
7372 int F77_DUMMY_MAIN() { return 1; }
7373#endif
7374int
7375main ()
7376{
7377static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7378test_array [0] = 0
7379
7380 ;
7381 return 0;
7382}
7383_ACEOF
7384rm -f conftest.$ac_objext
7385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7386 (eval $ac_compile) 2>&5
7387 ac_status=$?
7388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7389 (exit $ac_status); } &&
7390 { ac_try='test -s conftest.$ac_objext'
7391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7392 (eval $ac_try) 2>&5
7393 ac_status=$?
7394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7395 (exit $ac_status); }; }; then
7396 ac_lo=$ac_mid; break
7397else
7398 echo "$as_me: failed program was:" >&5
7399cat conftest.$ac_ext >&5
7400ac_hi=`expr '(' $ac_mid ')' - 1`
7401 if test $ac_mid -le $ac_hi; then
7402 ac_lo= ac_hi=
7403 break
7404 fi
7405 ac_mid=`expr 2 '*' $ac_mid`
7406fi
7407rm -f conftest.$ac_objext conftest.$ac_ext
7408 done
7409else
7410 echo "$as_me: failed program was:" >&5
7411cat conftest.$ac_ext >&5
7412ac_lo= ac_hi=
7413fi
7414rm -f conftest.$ac_objext conftest.$ac_ext
7415fi
7416rm -f conftest.$ac_objext conftest.$ac_ext
7417# Binary search between lo and hi bounds.
7418while test "x$ac_lo" != "x$ac_hi"; do
7419 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7420 cat >conftest.$ac_ext <<_ACEOF
7421#line $LINENO "configure"
7422#include "confdefs.h"
7423$ac_includes_default
7424#ifdef F77_DUMMY_MAIN
7425# ifdef __cplusplus
7426 extern "C"
7427# endif
7428 int F77_DUMMY_MAIN() { return 1; }
7429#endif
7430int
7431main ()
7432{
7433static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7434test_array [0] = 0
7435
7436 ;
7437 return 0;
7438}
7439_ACEOF
7440rm -f conftest.$ac_objext
7441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7442 (eval $ac_compile) 2>&5
7443 ac_status=$?
7444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445 (exit $ac_status); } &&
7446 { ac_try='test -s conftest.$ac_objext'
7447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7448 (eval $ac_try) 2>&5
7449 ac_status=$?
7450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7451 (exit $ac_status); }; }; then
7452 ac_hi=$ac_mid
7453else
7454 echo "$as_me: failed program was:" >&5
7455cat conftest.$ac_ext >&5
7456ac_lo=`expr '(' $ac_mid ')' + 1`
7457fi
7458rm -f conftest.$ac_objext conftest.$ac_ext
7459done
7460case $ac_lo in
7461?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7462'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7463echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7464 { (exit 1); exit 1; }; } ;;
7465esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007466else
7467 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007468 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7469echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7470 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007471else
Martin v. Löwis11437992002-04-12 09:54:03 +00007472 cat >conftest.$ac_ext <<_ACEOF
7473#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007474#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007475$ac_includes_default
7476long longval () { return (long) (sizeof (fpos_t)); }
7477unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007478#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007479#include <stdlib.h>
7480#ifdef F77_DUMMY_MAIN
7481# ifdef __cplusplus
7482 extern "C"
7483# endif
7484 int F77_DUMMY_MAIN() { return 1; }
7485#endif
7486int
7487main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007488{
Martin v. Löwis11437992002-04-12 09:54:03 +00007489
7490 FILE *f = fopen ("conftest.val", "w");
7491 if (! f)
7492 exit (1);
7493 if (((long) (sizeof (fpos_t))) < 0)
7494 {
7495 long i = longval ();
7496 if (i != ((long) (sizeof (fpos_t))))
7497 exit (1);
7498 fprintf (f, "%ld\n", i);
7499 }
7500 else
7501 {
7502 unsigned long i = ulongval ();
7503 if (i != ((long) (sizeof (fpos_t))))
7504 exit (1);
7505 fprintf (f, "%lu\n", i);
7506 }
7507 exit (ferror (f) || fclose (f) != 0);
7508
7509 ;
7510 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007511}
Martin v. Löwis11437992002-04-12 09:54:03 +00007512_ACEOF
7513rm -f conftest$ac_exeext
7514if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7515 (eval $ac_link) 2>&5
7516 ac_status=$?
7517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7518 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7520 (eval $ac_try) 2>&5
7521 ac_status=$?
7522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7523 (exit $ac_status); }; }; then
7524 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007525else
Martin v. Löwis11437992002-04-12 09:54:03 +00007526 echo "$as_me: program exited with status $ac_status" >&5
7527echo "$as_me: failed program was:" >&5
7528cat conftest.$ac_ext >&5
7529( exit $ac_status )
7530{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7531echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7532 { (exit 1); exit 1; }; }
7533fi
7534rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7535fi
7536fi
7537rm -f conftest.val
7538else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007539 ac_cv_sizeof_fpos_t=0
7540fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007541fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007542echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7543echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7544cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007545#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007546_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007547
Michael W. Hudson54241132001-12-07 15:38:26 +00007548
7549
Martin v. Löwis11437992002-04-12 09:54:03 +00007550echo "$as_me:$LINENO: checking for long long support" >&5
7551echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007552have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007553cat >conftest.$ac_ext <<_ACEOF
7554#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007555#include "confdefs.h"
7556
Martin v. Löwis11437992002-04-12 09:54:03 +00007557#ifdef F77_DUMMY_MAIN
7558# ifdef __cplusplus
7559 extern "C"
7560# endif
7561 int F77_DUMMY_MAIN() { return 1; }
7562#endif
7563int
7564main ()
7565{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007566long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007567 ;
7568 return 0;
7569}
7570_ACEOF
7571rm -f conftest.$ac_objext
7572if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7573 (eval $ac_compile) 2>&5
7574 ac_status=$?
7575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7576 (exit $ac_status); } &&
7577 { ac_try='test -s conftest.$ac_objext'
7578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7579 (eval $ac_try) 2>&5
7580 ac_status=$?
7581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7582 (exit $ac_status); }; }; then
7583
7584
7585cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007586#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007587_ACEOF
7588
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007589 have_long_long=yes
7590
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007591else
Martin v. Löwis11437992002-04-12 09:54:03 +00007592 echo "$as_me: failed program was:" >&5
7593cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007595rm -f conftest.$ac_objext conftest.$ac_ext
7596echo "$as_me:$LINENO: result: $have_long_long" >&5
7597echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007598if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007599echo "$as_me:$LINENO: checking for long long" >&5
7600echo $ECHO_N "checking for long long... $ECHO_C" >&6
7601if test "${ac_cv_type_long_long+set}" = set; then
7602 echo $ECHO_N "(cached) $ECHO_C" >&6
7603else
7604 cat >conftest.$ac_ext <<_ACEOF
7605#line $LINENO "configure"
7606#include "confdefs.h"
7607$ac_includes_default
7608#ifdef F77_DUMMY_MAIN
7609# ifdef __cplusplus
7610 extern "C"
7611# endif
7612 int F77_DUMMY_MAIN() { return 1; }
7613#endif
7614int
7615main ()
7616{
7617if ((long long *) 0)
7618 return 0;
7619if (sizeof (long long))
7620 return 0;
7621 ;
7622 return 0;
7623}
7624_ACEOF
7625rm -f conftest.$ac_objext
7626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7627 (eval $ac_compile) 2>&5
7628 ac_status=$?
7629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7630 (exit $ac_status); } &&
7631 { ac_try='test -s conftest.$ac_objext'
7632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7633 (eval $ac_try) 2>&5
7634 ac_status=$?
7635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7636 (exit $ac_status); }; }; then
7637 ac_cv_type_long_long=yes
7638else
7639 echo "$as_me: failed program was:" >&5
7640cat conftest.$ac_ext >&5
7641ac_cv_type_long_long=no
7642fi
7643rm -f conftest.$ac_objext conftest.$ac_ext
7644fi
7645echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7646echo "${ECHO_T}$ac_cv_type_long_long" >&6
7647
7648echo "$as_me:$LINENO: checking size of long long" >&5
7649echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7650if test "${ac_cv_sizeof_long_long+set}" = set; then
7651 echo $ECHO_N "(cached) $ECHO_C" >&6
7652else
7653 if test "$ac_cv_type_long_long" = yes; then
7654 # The cast to unsigned long works around a bug in the HP C Compiler
7655 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7656 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7657 # This bug is HP SR number 8606223364.
7658 if test "$cross_compiling" = yes; then
7659 # Depending upon the size, compute the lo and hi bounds.
7660cat >conftest.$ac_ext <<_ACEOF
7661#line $LINENO "configure"
7662#include "confdefs.h"
7663$ac_includes_default
7664#ifdef F77_DUMMY_MAIN
7665# ifdef __cplusplus
7666 extern "C"
7667# endif
7668 int F77_DUMMY_MAIN() { return 1; }
7669#endif
7670int
7671main ()
7672{
7673static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7674test_array [0] = 0
7675
7676 ;
7677 return 0;
7678}
7679_ACEOF
7680rm -f conftest.$ac_objext
7681if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7682 (eval $ac_compile) 2>&5
7683 ac_status=$?
7684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7685 (exit $ac_status); } &&
7686 { ac_try='test -s conftest.$ac_objext'
7687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7688 (eval $ac_try) 2>&5
7689 ac_status=$?
7690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7691 (exit $ac_status); }; }; then
7692 ac_lo=0 ac_mid=0
7693 while :; do
7694 cat >conftest.$ac_ext <<_ACEOF
7695#line $LINENO "configure"
7696#include "confdefs.h"
7697$ac_includes_default
7698#ifdef F77_DUMMY_MAIN
7699# ifdef __cplusplus
7700 extern "C"
7701# endif
7702 int F77_DUMMY_MAIN() { return 1; }
7703#endif
7704int
7705main ()
7706{
7707static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7708test_array [0] = 0
7709
7710 ;
7711 return 0;
7712}
7713_ACEOF
7714rm -f conftest.$ac_objext
7715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7716 (eval $ac_compile) 2>&5
7717 ac_status=$?
7718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7719 (exit $ac_status); } &&
7720 { ac_try='test -s conftest.$ac_objext'
7721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7722 (eval $ac_try) 2>&5
7723 ac_status=$?
7724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7725 (exit $ac_status); }; }; then
7726 ac_hi=$ac_mid; break
7727else
7728 echo "$as_me: failed program was:" >&5
7729cat conftest.$ac_ext >&5
7730ac_lo=`expr $ac_mid + 1`
7731 if test $ac_lo -le $ac_mid; then
7732 ac_lo= ac_hi=
7733 break
7734 fi
7735 ac_mid=`expr 2 '*' $ac_mid + 1`
7736fi
7737rm -f conftest.$ac_objext conftest.$ac_ext
7738 done
7739else
7740 echo "$as_me: failed program was:" >&5
7741cat conftest.$ac_ext >&5
7742cat >conftest.$ac_ext <<_ACEOF
7743#line $LINENO "configure"
7744#include "confdefs.h"
7745$ac_includes_default
7746#ifdef F77_DUMMY_MAIN
7747# ifdef __cplusplus
7748 extern "C"
7749# endif
7750 int F77_DUMMY_MAIN() { return 1; }
7751#endif
7752int
7753main ()
7754{
7755static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7756test_array [0] = 0
7757
7758 ;
7759 return 0;
7760}
7761_ACEOF
7762rm -f conftest.$ac_objext
7763if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7764 (eval $ac_compile) 2>&5
7765 ac_status=$?
7766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7767 (exit $ac_status); } &&
7768 { ac_try='test -s conftest.$ac_objext'
7769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7770 (eval $ac_try) 2>&5
7771 ac_status=$?
7772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7773 (exit $ac_status); }; }; then
7774 ac_hi=-1 ac_mid=-1
7775 while :; do
7776 cat >conftest.$ac_ext <<_ACEOF
7777#line $LINENO "configure"
7778#include "confdefs.h"
7779$ac_includes_default
7780#ifdef F77_DUMMY_MAIN
7781# ifdef __cplusplus
7782 extern "C"
7783# endif
7784 int F77_DUMMY_MAIN() { return 1; }
7785#endif
7786int
7787main ()
7788{
7789static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7790test_array [0] = 0
7791
7792 ;
7793 return 0;
7794}
7795_ACEOF
7796rm -f conftest.$ac_objext
7797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7798 (eval $ac_compile) 2>&5
7799 ac_status=$?
7800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7801 (exit $ac_status); } &&
7802 { ac_try='test -s conftest.$ac_objext'
7803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7804 (eval $ac_try) 2>&5
7805 ac_status=$?
7806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7807 (exit $ac_status); }; }; then
7808 ac_lo=$ac_mid; break
7809else
7810 echo "$as_me: failed program was:" >&5
7811cat conftest.$ac_ext >&5
7812ac_hi=`expr '(' $ac_mid ')' - 1`
7813 if test $ac_mid -le $ac_hi; then
7814 ac_lo= ac_hi=
7815 break
7816 fi
7817 ac_mid=`expr 2 '*' $ac_mid`
7818fi
7819rm -f conftest.$ac_objext conftest.$ac_ext
7820 done
7821else
7822 echo "$as_me: failed program was:" >&5
7823cat conftest.$ac_ext >&5
7824ac_lo= ac_hi=
7825fi
7826rm -f conftest.$ac_objext conftest.$ac_ext
7827fi
7828rm -f conftest.$ac_objext conftest.$ac_ext
7829# Binary search between lo and hi bounds.
7830while test "x$ac_lo" != "x$ac_hi"; do
7831 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7832 cat >conftest.$ac_ext <<_ACEOF
7833#line $LINENO "configure"
7834#include "confdefs.h"
7835$ac_includes_default
7836#ifdef F77_DUMMY_MAIN
7837# ifdef __cplusplus
7838 extern "C"
7839# endif
7840 int F77_DUMMY_MAIN() { return 1; }
7841#endif
7842int
7843main ()
7844{
7845static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7846test_array [0] = 0
7847
7848 ;
7849 return 0;
7850}
7851_ACEOF
7852rm -f conftest.$ac_objext
7853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7854 (eval $ac_compile) 2>&5
7855 ac_status=$?
7856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7857 (exit $ac_status); } &&
7858 { ac_try='test -s conftest.$ac_objext'
7859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7860 (eval $ac_try) 2>&5
7861 ac_status=$?
7862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7863 (exit $ac_status); }; }; then
7864 ac_hi=$ac_mid
7865else
7866 echo "$as_me: failed program was:" >&5
7867cat conftest.$ac_ext >&5
7868ac_lo=`expr '(' $ac_mid ')' + 1`
7869fi
7870rm -f conftest.$ac_objext conftest.$ac_ext
7871done
7872case $ac_lo in
7873?*) ac_cv_sizeof_long_long=$ac_lo;;
7874'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7875echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7876 { (exit 1); exit 1; }; } ;;
7877esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007878else
7879 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007880 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7881echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7882 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007883else
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 cat >conftest.$ac_ext <<_ACEOF
7885#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007886#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007887$ac_includes_default
7888long longval () { return (long) (sizeof (long long)); }
7889unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007890#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007891#include <stdlib.h>
7892#ifdef F77_DUMMY_MAIN
7893# ifdef __cplusplus
7894 extern "C"
7895# endif
7896 int F77_DUMMY_MAIN() { return 1; }
7897#endif
7898int
7899main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007900{
Martin v. Löwis11437992002-04-12 09:54:03 +00007901
7902 FILE *f = fopen ("conftest.val", "w");
7903 if (! f)
7904 exit (1);
7905 if (((long) (sizeof (long long))) < 0)
7906 {
7907 long i = longval ();
7908 if (i != ((long) (sizeof (long long))))
7909 exit (1);
7910 fprintf (f, "%ld\n", i);
7911 }
7912 else
7913 {
7914 unsigned long i = ulongval ();
7915 if (i != ((long) (sizeof (long long))))
7916 exit (1);
7917 fprintf (f, "%lu\n", i);
7918 }
7919 exit (ferror (f) || fclose (f) != 0);
7920
7921 ;
7922 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007923}
Martin v. Löwis11437992002-04-12 09:54:03 +00007924_ACEOF
7925rm -f conftest$ac_exeext
7926if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7927 (eval $ac_link) 2>&5
7928 ac_status=$?
7929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7930 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7932 (eval $ac_try) 2>&5
7933 ac_status=$?
7934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7935 (exit $ac_status); }; }; then
7936 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007937else
Martin v. Löwis11437992002-04-12 09:54:03 +00007938 echo "$as_me: program exited with status $ac_status" >&5
7939echo "$as_me: failed program was:" >&5
7940cat conftest.$ac_ext >&5
7941( exit $ac_status )
7942{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7943echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7944 { (exit 1); exit 1; }; }
7945fi
7946rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7947fi
7948fi
7949rm -f conftest.val
7950else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007951 ac_cv_sizeof_long_long=0
7952fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007953fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007954echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7955echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7956cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007957#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007958_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007959
Michael W. Hudson54241132001-12-07 15:38:26 +00007960
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007961fi
7962
Martin v. Löwis11437992002-04-12 09:54:03 +00007963echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7964echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007965have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007966cat >conftest.$ac_ext <<_ACEOF
7967#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007968#include "confdefs.h"
7969
Martin v. Löwis11437992002-04-12 09:54:03 +00007970#ifdef F77_DUMMY_MAIN
7971# ifdef __cplusplus
7972 extern "C"
7973# endif
7974 int F77_DUMMY_MAIN() { return 1; }
7975#endif
7976int
7977main ()
7978{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007979uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 ;
7981 return 0;
7982}
7983_ACEOF
7984rm -f conftest.$ac_objext
7985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7986 (eval $ac_compile) 2>&5
7987 ac_status=$?
7988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7989 (exit $ac_status); } &&
7990 { ac_try='test -s conftest.$ac_objext'
7991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7992 (eval $ac_try) 2>&5
7993 ac_status=$?
7994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7995 (exit $ac_status); }; }; then
7996
7997
7998cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007999#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008000_ACEOF
8001
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008002 have_uintptr_t=yes
8003
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008004else
Martin v. Löwis11437992002-04-12 09:54:03 +00008005 echo "$as_me: failed program was:" >&5
8006cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008007fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008008rm -f conftest.$ac_objext conftest.$ac_ext
8009echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8010echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008011if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008012echo "$as_me:$LINENO: checking for uintptr_t" >&5
8013echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8014if test "${ac_cv_type_uintptr_t+set}" = set; then
8015 echo $ECHO_N "(cached) $ECHO_C" >&6
8016else
8017 cat >conftest.$ac_ext <<_ACEOF
8018#line $LINENO "configure"
8019#include "confdefs.h"
8020$ac_includes_default
8021#ifdef F77_DUMMY_MAIN
8022# ifdef __cplusplus
8023 extern "C"
8024# endif
8025 int F77_DUMMY_MAIN() { return 1; }
8026#endif
8027int
8028main ()
8029{
8030if ((uintptr_t *) 0)
8031 return 0;
8032if (sizeof (uintptr_t))
8033 return 0;
8034 ;
8035 return 0;
8036}
8037_ACEOF
8038rm -f conftest.$ac_objext
8039if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8040 (eval $ac_compile) 2>&5
8041 ac_status=$?
8042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8043 (exit $ac_status); } &&
8044 { ac_try='test -s conftest.$ac_objext'
8045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8046 (eval $ac_try) 2>&5
8047 ac_status=$?
8048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8049 (exit $ac_status); }; }; then
8050 ac_cv_type_uintptr_t=yes
8051else
8052 echo "$as_me: failed program was:" >&5
8053cat conftest.$ac_ext >&5
8054ac_cv_type_uintptr_t=no
8055fi
8056rm -f conftest.$ac_objext conftest.$ac_ext
8057fi
8058echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8059echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8060
8061echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8062echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8063if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8064 echo $ECHO_N "(cached) $ECHO_C" >&6
8065else
8066 if test "$ac_cv_type_uintptr_t" = yes; then
8067 # The cast to unsigned long works around a bug in the HP C Compiler
8068 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8069 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8070 # This bug is HP SR number 8606223364.
8071 if test "$cross_compiling" = yes; then
8072 # Depending upon the size, compute the lo and hi bounds.
8073cat >conftest.$ac_ext <<_ACEOF
8074#line $LINENO "configure"
8075#include "confdefs.h"
8076$ac_includes_default
8077#ifdef F77_DUMMY_MAIN
8078# ifdef __cplusplus
8079 extern "C"
8080# endif
8081 int F77_DUMMY_MAIN() { return 1; }
8082#endif
8083int
8084main ()
8085{
8086static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8087test_array [0] = 0
8088
8089 ;
8090 return 0;
8091}
8092_ACEOF
8093rm -f conftest.$ac_objext
8094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8095 (eval $ac_compile) 2>&5
8096 ac_status=$?
8097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8098 (exit $ac_status); } &&
8099 { ac_try='test -s conftest.$ac_objext'
8100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8101 (eval $ac_try) 2>&5
8102 ac_status=$?
8103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8104 (exit $ac_status); }; }; then
8105 ac_lo=0 ac_mid=0
8106 while :; do
8107 cat >conftest.$ac_ext <<_ACEOF
8108#line $LINENO "configure"
8109#include "confdefs.h"
8110$ac_includes_default
8111#ifdef F77_DUMMY_MAIN
8112# ifdef __cplusplus
8113 extern "C"
8114# endif
8115 int F77_DUMMY_MAIN() { return 1; }
8116#endif
8117int
8118main ()
8119{
8120static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8121test_array [0] = 0
8122
8123 ;
8124 return 0;
8125}
8126_ACEOF
8127rm -f conftest.$ac_objext
8128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8129 (eval $ac_compile) 2>&5
8130 ac_status=$?
8131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8132 (exit $ac_status); } &&
8133 { ac_try='test -s conftest.$ac_objext'
8134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8135 (eval $ac_try) 2>&5
8136 ac_status=$?
8137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8138 (exit $ac_status); }; }; then
8139 ac_hi=$ac_mid; break
8140else
8141 echo "$as_me: failed program was:" >&5
8142cat conftest.$ac_ext >&5
8143ac_lo=`expr $ac_mid + 1`
8144 if test $ac_lo -le $ac_mid; then
8145 ac_lo= ac_hi=
8146 break
8147 fi
8148 ac_mid=`expr 2 '*' $ac_mid + 1`
8149fi
8150rm -f conftest.$ac_objext conftest.$ac_ext
8151 done
8152else
8153 echo "$as_me: failed program was:" >&5
8154cat conftest.$ac_ext >&5
8155cat >conftest.$ac_ext <<_ACEOF
8156#line $LINENO "configure"
8157#include "confdefs.h"
8158$ac_includes_default
8159#ifdef F77_DUMMY_MAIN
8160# ifdef __cplusplus
8161 extern "C"
8162# endif
8163 int F77_DUMMY_MAIN() { return 1; }
8164#endif
8165int
8166main ()
8167{
8168static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8169test_array [0] = 0
8170
8171 ;
8172 return 0;
8173}
8174_ACEOF
8175rm -f conftest.$ac_objext
8176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8177 (eval $ac_compile) 2>&5
8178 ac_status=$?
8179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8180 (exit $ac_status); } &&
8181 { ac_try='test -s conftest.$ac_objext'
8182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8183 (eval $ac_try) 2>&5
8184 ac_status=$?
8185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8186 (exit $ac_status); }; }; then
8187 ac_hi=-1 ac_mid=-1
8188 while :; do
8189 cat >conftest.$ac_ext <<_ACEOF
8190#line $LINENO "configure"
8191#include "confdefs.h"
8192$ac_includes_default
8193#ifdef F77_DUMMY_MAIN
8194# ifdef __cplusplus
8195 extern "C"
8196# endif
8197 int F77_DUMMY_MAIN() { return 1; }
8198#endif
8199int
8200main ()
8201{
8202static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8203test_array [0] = 0
8204
8205 ;
8206 return 0;
8207}
8208_ACEOF
8209rm -f conftest.$ac_objext
8210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8211 (eval $ac_compile) 2>&5
8212 ac_status=$?
8213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214 (exit $ac_status); } &&
8215 { ac_try='test -s conftest.$ac_objext'
8216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8217 (eval $ac_try) 2>&5
8218 ac_status=$?
8219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220 (exit $ac_status); }; }; then
8221 ac_lo=$ac_mid; break
8222else
8223 echo "$as_me: failed program was:" >&5
8224cat conftest.$ac_ext >&5
8225ac_hi=`expr '(' $ac_mid ')' - 1`
8226 if test $ac_mid -le $ac_hi; then
8227 ac_lo= ac_hi=
8228 break
8229 fi
8230 ac_mid=`expr 2 '*' $ac_mid`
8231fi
8232rm -f conftest.$ac_objext conftest.$ac_ext
8233 done
8234else
8235 echo "$as_me: failed program was:" >&5
8236cat conftest.$ac_ext >&5
8237ac_lo= ac_hi=
8238fi
8239rm -f conftest.$ac_objext conftest.$ac_ext
8240fi
8241rm -f conftest.$ac_objext conftest.$ac_ext
8242# Binary search between lo and hi bounds.
8243while test "x$ac_lo" != "x$ac_hi"; do
8244 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8245 cat >conftest.$ac_ext <<_ACEOF
8246#line $LINENO "configure"
8247#include "confdefs.h"
8248$ac_includes_default
8249#ifdef F77_DUMMY_MAIN
8250# ifdef __cplusplus
8251 extern "C"
8252# endif
8253 int F77_DUMMY_MAIN() { return 1; }
8254#endif
8255int
8256main ()
8257{
8258static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8259test_array [0] = 0
8260
8261 ;
8262 return 0;
8263}
8264_ACEOF
8265rm -f conftest.$ac_objext
8266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8267 (eval $ac_compile) 2>&5
8268 ac_status=$?
8269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8270 (exit $ac_status); } &&
8271 { ac_try='test -s conftest.$ac_objext'
8272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8273 (eval $ac_try) 2>&5
8274 ac_status=$?
8275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8276 (exit $ac_status); }; }; then
8277 ac_hi=$ac_mid
8278else
8279 echo "$as_me: failed program was:" >&5
8280cat conftest.$ac_ext >&5
8281ac_lo=`expr '(' $ac_mid ')' + 1`
8282fi
8283rm -f conftest.$ac_objext conftest.$ac_ext
8284done
8285case $ac_lo in
8286?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8287'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8288echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8289 { (exit 1); exit 1; }; } ;;
8290esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008291else
8292 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008293 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8294echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8295 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008296else
Martin v. Löwis11437992002-04-12 09:54:03 +00008297 cat >conftest.$ac_ext <<_ACEOF
8298#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008299#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008300$ac_includes_default
8301long longval () { return (long) (sizeof (uintptr_t)); }
8302unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008303#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008304#include <stdlib.h>
8305#ifdef F77_DUMMY_MAIN
8306# ifdef __cplusplus
8307 extern "C"
8308# endif
8309 int F77_DUMMY_MAIN() { return 1; }
8310#endif
8311int
8312main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008313{
Martin v. Löwis11437992002-04-12 09:54:03 +00008314
8315 FILE *f = fopen ("conftest.val", "w");
8316 if (! f)
8317 exit (1);
8318 if (((long) (sizeof (uintptr_t))) < 0)
8319 {
8320 long i = longval ();
8321 if (i != ((long) (sizeof (uintptr_t))))
8322 exit (1);
8323 fprintf (f, "%ld\n", i);
8324 }
8325 else
8326 {
8327 unsigned long i = ulongval ();
8328 if (i != ((long) (sizeof (uintptr_t))))
8329 exit (1);
8330 fprintf (f, "%lu\n", i);
8331 }
8332 exit (ferror (f) || fclose (f) != 0);
8333
8334 ;
8335 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008336}
Martin v. Löwis11437992002-04-12 09:54:03 +00008337_ACEOF
8338rm -f conftest$ac_exeext
8339if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8340 (eval $ac_link) 2>&5
8341 ac_status=$?
8342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8343 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8345 (eval $ac_try) 2>&5
8346 ac_status=$?
8347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8348 (exit $ac_status); }; }; then
8349 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008350else
Martin v. Löwis11437992002-04-12 09:54:03 +00008351 echo "$as_me: program exited with status $ac_status" >&5
8352echo "$as_me: failed program was:" >&5
8353cat conftest.$ac_ext >&5
8354( exit $ac_status )
8355{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8356echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8357 { (exit 1); exit 1; }; }
8358fi
8359rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8360fi
8361fi
8362rm -f conftest.val
8363else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008364 ac_cv_sizeof_uintptr_t=0
8365fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008366fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008367echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8368echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8369cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008370#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008371_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008372
Michael W. Hudson54241132001-12-07 15:38:26 +00008373
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008374fi
8375
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008376# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008377echo "$as_me:$LINENO: checking size of off_t" >&5
8378echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8379if test "${ac_cv_sizeof_off_t+set}" = set; then
8380 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008381else
8382 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008383 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008384else
Martin v. Löwis11437992002-04-12 09:54:03 +00008385 cat >conftest.$ac_ext <<_ACEOF
8386#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008387#include "confdefs.h"
8388#include <stdio.h>
8389#include <sys/types.h>
8390main()
8391{
8392 FILE *f=fopen("conftestval", "w");
8393 if (!f) exit(1);
8394 fprintf(f, "%d\n", sizeof(off_t));
8395 exit(0);
8396}
Martin v. Löwis11437992002-04-12 09:54:03 +00008397_ACEOF
8398rm -f conftest$ac_exeext
8399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8400 (eval $ac_link) 2>&5
8401 ac_status=$?
8402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8403 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8405 (eval $ac_try) 2>&5
8406 ac_status=$?
8407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8408 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008409 ac_cv_sizeof_off_t=`cat conftestval`
8410else
Martin v. Löwis11437992002-04-12 09:54:03 +00008411 echo "$as_me: program exited with status $ac_status" >&5
8412echo "$as_me: failed program was:" >&5
8413cat conftest.$ac_ext >&5
8414( exit $ac_status )
8415ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008416fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008417rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008418fi
8419
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008420fi
8421
Martin v. Löwis11437992002-04-12 09:54:03 +00008422echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8423echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8424
8425cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008426#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008427_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008428
Michael W. Hudson54241132001-12-07 15:38:26 +00008429
Martin v. Löwis11437992002-04-12 09:54:03 +00008430echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8431echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008432if test "$have_long_long" = yes -a \
8433 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8434 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008435
Martin v. Löwis11437992002-04-12 09:54:03 +00008436cat >>confdefs.h <<\_ACEOF
8437#define HAVE_LARGEFILE_SUPPORT 1
8438_ACEOF
8439
8440 echo "$as_me:$LINENO: result: yes" >&5
8441echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008442else
Martin v. Löwis11437992002-04-12 09:54:03 +00008443 echo "$as_me:$LINENO: result: no" >&5
8444echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008445fi
8446
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008447# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008448echo "$as_me:$LINENO: checking size of time_t" >&5
8449echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8450if test "${ac_cv_sizeof_time_t+set}" = set; then
8451 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008452else
8453 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008454 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008455else
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 cat >conftest.$ac_ext <<_ACEOF
8457#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008458#include "confdefs.h"
8459#include <stdio.h>
8460#include <time.h>
8461main()
8462{
8463 FILE *f=fopen("conftestval", "w");
8464 if (!f) exit(1);
8465 fprintf(f, "%d\n", sizeof(time_t));
8466 exit(0);
8467}
Martin v. Löwis11437992002-04-12 09:54:03 +00008468_ACEOF
8469rm -f conftest$ac_exeext
8470if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8471 (eval $ac_link) 2>&5
8472 ac_status=$?
8473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8474 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8476 (eval $ac_try) 2>&5
8477 ac_status=$?
8478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8479 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008480 ac_cv_sizeof_time_t=`cat conftestval`
8481else
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 echo "$as_me: program exited with status $ac_status" >&5
8483echo "$as_me: failed program was:" >&5
8484cat conftest.$ac_ext >&5
8485( exit $ac_status )
8486ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008488rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008489fi
8490
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008491fi
8492
Martin v. Löwis11437992002-04-12 09:54:03 +00008493echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8494echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8495
8496cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008497#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008498_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008499
Michael W. Hudson54241132001-12-07 15:38:26 +00008500
8501
Trent Mick635f6fb2000-08-23 21:33:05 +00008502# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008503ac_save_cc="$CC"
8504if test "$ac_cv_kpthread" = "yes"
8505then CC="$CC -Kpthread"
8506fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008507echo "$as_me:$LINENO: checking for pthread_t" >&5
8508echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008509have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008510cat >conftest.$ac_ext <<_ACEOF
8511#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008512#include "confdefs.h"
8513#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008514#ifdef F77_DUMMY_MAIN
8515# ifdef __cplusplus
8516 extern "C"
8517# endif
8518 int F77_DUMMY_MAIN() { return 1; }
8519#endif
8520int
8521main ()
8522{
Guido van Rossum12580492000-09-24 16:47:19 +00008523pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ;
8525 return 0;
8526}
8527_ACEOF
8528rm -f conftest.$ac_objext
8529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8530 (eval $ac_compile) 2>&5
8531 ac_status=$?
8532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8533 (exit $ac_status); } &&
8534 { ac_try='test -s conftest.$ac_objext'
8535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8536 (eval $ac_try) 2>&5
8537 ac_status=$?
8538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008540 have_pthread_t=yes
8541else
Martin v. Löwis11437992002-04-12 09:54:03 +00008542 echo "$as_me: failed program was:" >&5
8543cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008544fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008545rm -f conftest.$ac_objext conftest.$ac_ext
8546echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8547echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008548if test "$have_pthread_t" = yes ; then
8549 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008550 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8551echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8552 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8553 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008554else
8555 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008556 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008557else
Martin v. Löwis11437992002-04-12 09:54:03 +00008558 cat >conftest.$ac_ext <<_ACEOF
8559#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008560#include "confdefs.h"
8561#include <stdio.h>
8562 #include <pthread.h>
8563 main()
8564 {
8565 FILE *f=fopen("conftestval", "w");
8566 if (!f) exit(1);
8567 fprintf(f, "%d\n", sizeof(pthread_t));
8568 exit(0);
8569 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008570_ACEOF
8571rm -f conftest$ac_exeext
8572if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8573 (eval $ac_link) 2>&5
8574 ac_status=$?
8575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8576 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8578 (eval $ac_try) 2>&5
8579 ac_status=$?
8580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8581 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008582 ac_cv_sizeof_pthread_t=`cat conftestval`
8583else
Martin v. Löwis11437992002-04-12 09:54:03 +00008584 echo "$as_me: program exited with status $ac_status" >&5
8585echo "$as_me: failed program was:" >&5
8586cat conftest.$ac_ext >&5
8587( exit $ac_status )
8588ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008590rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008591fi
8592
Trent Mick635f6fb2000-08-23 21:33:05 +00008593fi
8594
Martin v. Löwis11437992002-04-12 09:54:03 +00008595 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8596echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8597
8598cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008599#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008600_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008601
8602fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008603CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008604
Martin v. Löwis11437992002-04-12 09:54:03 +00008605echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8606echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008607# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8608if test "${enable_toolbox_glue+set}" = set; then
8609 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611fi;
Jack Jansene578a632001-08-15 01:27:14 +00008612
8613if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008614then
Jack Jansene578a632001-08-15 01:27:14 +00008615 case $ac_sys_system/$ac_sys_release in
8616 Darwin/*)
8617 enable_toolbox_glue="yes";;
8618 *)
8619 enable_toolbox_glue="no";;
8620 esac
8621fi
8622case "$enable_toolbox_glue" in
8623yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008624 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008625 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008626 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008627
8628cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008629#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008630_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008631
8632 ;;
8633*)
8634 extra_frameworks=""
8635 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008636 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008637 ;;
8638esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008639echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8640echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008641
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008642
8643case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008644 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008645 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008646 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8647 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008648 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8649 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008650 Darwin/*)
8651 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008652 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8653 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008654 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8655 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008656esac
8657
Martin v. Löwis11437992002-04-12 09:54:03 +00008658echo "$as_me:$LINENO: checking for --enable-framework" >&5
8659echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008660if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008661then
Jack Jansenca06bc62001-08-03 15:32:23 +00008662 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008663 # -U __environ is needed since bundles don't have access
8664 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008666 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008667
Jack Jansena3891ea2001-09-07 14:25:12 +00008668 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008669 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8670 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008671 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008672
Martin v. Löwis11437992002-04-12 09:54:03 +00008673cat >>confdefs.h <<\_ACEOF
8674#define WITH_NEXT_FRAMEWORK 1
8675_ACEOF
8676
8677 echo "$as_me:$LINENO: result: yes" >&5
8678echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008679else
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 echo "$as_me:$LINENO: result: no" >&5
8681echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008682fi
8683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684echo "$as_me:$LINENO: checking for dyld" >&5
8685echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008686case $ac_sys_system/$ac_sys_release in
8687 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008688
Martin v. Löwis11437992002-04-12 09:54:03 +00008689cat >>confdefs.h <<\_ACEOF
8690#define WITH_DYLD 1
8691_ACEOF
8692
8693 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8694echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008695 ;;
8696 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008697 echo "$as_me:$LINENO: result: no" >&5
8698echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008699 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008700esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008701
Guido van Rossum0a516c91994-09-12 10:58:40 +00008702# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008703
Michael W. Hudson54241132001-12-07 15:38:26 +00008704
8705
8706
8707
Guido van Rossum0a516c91994-09-12 10:58:40 +00008708# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008709# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008710echo "$as_me:$LINENO: checking SO" >&5
8711echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008712if test -z "$SO"
8713then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008714 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008715 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008716 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008717 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008718 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008719fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008720echo "$as_me:$LINENO: result: $SO" >&5
8721echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008722# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008723# -- "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 +00008724# (Shared libraries in this instance are shared modules to be loaded into
8725# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008726echo "$as_me:$LINENO: checking LDSHARED" >&5
8727echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008728if test -z "$LDSHARED"
8729then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008730 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008731 AIX*)
8732 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008733 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008734 ;;
8735 BeOS*)
8736 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008737 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008738 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008739 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008740 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008741 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00008743 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008744 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008745 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00008746 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008747 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008748 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8749 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008750 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008751 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8752 if test "$enable_framework" ; then
8753 # Link against the framework. All externals should be defined.
8754 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8755 else
8756 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008757 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008758 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008759 Darwin/*)
8760 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8761 if test "$enable_framework" ; then
8762 # Link against the framework. All externals should be defined.
8763 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8764 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008765 # No framework, use the Python app as bundle-loader
8766 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8767 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008768 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008769 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008770 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008771 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008772 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008773 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008774 then
8775 LDSHARED="cc -shared ${LDFLAGS}"
8776 else
8777 LDSHARED="ld -Bshareable ${LDFLAGS}"
8778 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008779 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008780 if test "$GCC" = "yes"
8781 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008782 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008783 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008784 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008785 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008786 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008787 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008788 *) LDSHARED="ld";;
8789 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008790fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008791echo "$as_me:$LINENO: result: $LDSHARED" >&5
8792echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008793BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008794# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008795# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008796echo "$as_me:$LINENO: checking CCSHARED" >&5
8797echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008798if test -z "$CCSHARED"
8799then
Guido van Rossum07397971997-04-29 21:49:50 +00008800 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008801 SunOS*) if test "$GCC" = yes;
8802 then CCSHARED="-fPIC";
8803 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008804 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008805 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008806 else CCSHARED="+z";
8807 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008808 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008809 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008810 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008811 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008812 if test "$GCC" = "yes"
8813 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008814 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008815 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008816 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008817 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008818 IRIX*/6*) case $CC in
8819 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008820 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008821 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008822 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008823 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008824fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008825echo "$as_me:$LINENO: result: $CCSHARED" >&5
8826echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008827# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008828# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008829echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8830echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008831if test -z "$LINKFORSHARED"
8832then
Guido van Rossum07397971997-04-29 21:49:50 +00008833 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008834 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008835 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008836 LINKFORSHARED="-Wl,-E -Wl,+s";;
8837# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008838 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008839 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008840 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008842 # -u __dummy makes the linker aware of the objc runtime
8843 # in System.framework; otherwise, __objcInit (referenced in
8844 # crt1.o) gets erroneously defined as common, which breaks dynamic
8845 # loading of any modules which reference it in System.framework.
8846 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8847 # not used by the core itself but which needs to be in the core so
8848 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008849 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008850 if test "$enable_framework"
8851 then
8852 LINKFORSHARED="$LINKFORSHARED -framework Python"
8853 fi
8854 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008855 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008856 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008857 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008859 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8860 then
8861 LINKFORSHARED="-Wl,--export-dynamic"
8862 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008863 SunOS/5*) case $CC in
8864 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008865 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008866 then
8867 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008868 fi;;
8869 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008870 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008871fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008872echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8873echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008874
Michael W. Hudson54241132001-12-07 15:38:26 +00008875
Martin v. Löwis11437992002-04-12 09:54:03 +00008876echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8877echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008878if test ! "$LIBRARY" = "$LDLIBRARY"
8879then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008880 case $ac_sys_system in
8881 CYGWIN*)
8882 # Cygwin needs CCSHARED when building extension DLLs
8883 # but not when building the interpreter DLL.
8884 CFLAGSFORSHARED='';;
8885 *)
8886 CFLAGSFORSHARED='$(CCSHARED)'
8887 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008888fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008889echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8890echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008891
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008892# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8893# library (with --enable-shared).
8894# For platforms on which shared libraries are not allowed to have unresolved
8895# symbols, this must be set to $(LIBS) (expanded by make).
8896
8897echo "$as_me:$LINENO: checking SHLIBS" >&5
8898echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
8899case "$ac_sys_system" in
8900 atheos*)
8901 SHLIBS='$(LIBS)';;
8902 *)
8903 SHLIBS='';;
8904esac
8905echo "$as_me:$LINENO: result: $SHLIBS" >&5
8906echo "${ECHO_T}$SHLIBS" >&6
8907
8908
Guido van Rossum627b2d71993-12-24 10:39:16 +00008909# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008910
8911echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8912echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8913if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8914 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008915else
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008917LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008918cat >conftest.$ac_ext <<_ACEOF
8919#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008920#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008921
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008922/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008923#ifdef __cplusplus
8924extern "C"
8925#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008926/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008927 builtin and then its argument prototype would still apply. */
8928char dlopen ();
8929#ifdef F77_DUMMY_MAIN
8930# ifdef __cplusplus
8931 extern "C"
8932# endif
8933 int F77_DUMMY_MAIN() { return 1; }
8934#endif
8935int
8936main ()
8937{
8938dlopen ();
8939 ;
8940 return 0;
8941}
8942_ACEOF
8943rm -f conftest.$ac_objext conftest$ac_exeext
8944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8945 (eval $ac_link) 2>&5
8946 ac_status=$?
8947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8948 (exit $ac_status); } &&
8949 { ac_try='test -s conftest$ac_exeext'
8950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8951 (eval $ac_try) 2>&5
8952 ac_status=$?
8953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8954 (exit $ac_status); }; }; then
8955 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008956else
Martin v. Löwis11437992002-04-12 09:54:03 +00008957 echo "$as_me: failed program was:" >&5
8958cat conftest.$ac_ext >&5
8959ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008960fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008961rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8962LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008963fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008964echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8965echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8966if test $ac_cv_lib_dl_dlopen = yes; then
8967 cat >>confdefs.h <<_ACEOF
8968#define HAVE_LIBDL 1
8969_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008970
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008971 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008972
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008973fi
8974 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008975
8976echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8977echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8978if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8979 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008980else
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008982LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008983cat >conftest.$ac_ext <<_ACEOF
8984#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008985#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008986
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008987/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008988#ifdef __cplusplus
8989extern "C"
8990#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008991/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 builtin and then its argument prototype would still apply. */
8993char shl_load ();
8994#ifdef F77_DUMMY_MAIN
8995# ifdef __cplusplus
8996 extern "C"
8997# endif
8998 int F77_DUMMY_MAIN() { return 1; }
8999#endif
9000int
9001main ()
9002{
9003shl_load ();
9004 ;
9005 return 0;
9006}
9007_ACEOF
9008rm -f conftest.$ac_objext conftest$ac_exeext
9009if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9010 (eval $ac_link) 2>&5
9011 ac_status=$?
9012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9013 (exit $ac_status); } &&
9014 { ac_try='test -s conftest$ac_exeext'
9015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9016 (eval $ac_try) 2>&5
9017 ac_status=$?
9018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9019 (exit $ac_status); }; }; then
9020 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009021else
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 echo "$as_me: failed program was:" >&5
9023cat conftest.$ac_ext >&5
9024ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009025fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009026rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9027LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009028fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009029echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9030echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9031if test $ac_cv_lib_dld_shl_load = yes; then
9032 cat >>confdefs.h <<_ACEOF
9033#define HAVE_LIBDLD 1
9034_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009035
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009036 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009038fi
9039 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009040
9041echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9042echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9043if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9044 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009045else
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009047LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009048cat >conftest.$ac_ext <<_ACEOF
9049#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009050#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009051
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009052/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009053#ifdef __cplusplus
9054extern "C"
9055#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009056/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 builtin and then its argument prototype would still apply. */
9058char sem_init ();
9059#ifdef F77_DUMMY_MAIN
9060# ifdef __cplusplus
9061 extern "C"
9062# endif
9063 int F77_DUMMY_MAIN() { return 1; }
9064#endif
9065int
9066main ()
9067{
9068sem_init ();
9069 ;
9070 return 0;
9071}
9072_ACEOF
9073rm -f conftest.$ac_objext conftest$ac_exeext
9074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9075 (eval $ac_link) 2>&5
9076 ac_status=$?
9077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9078 (exit $ac_status); } &&
9079 { ac_try='test -s conftest$ac_exeext'
9080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9081 (eval $ac_try) 2>&5
9082 ac_status=$?
9083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9084 (exit $ac_status); }; }; then
9085 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009086else
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 echo "$as_me: failed program was:" >&5
9088cat conftest.$ac_ext >&5
9089ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009090fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009091rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9092LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009093fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009094echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9095echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9096if test $ac_cv_lib_rt_sem_init = yes; then
9097 cat >>confdefs.h <<_ACEOF
9098#define HAVE_LIBRT 1
9099_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009100
9101 LIBS="-lrt $LIBS"
9102
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009103fi
9104 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009105
9106# checks for system dependent C++ extensions support
9107case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9109echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9110 cat >conftest.$ac_ext <<_ACEOF
9111#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009112#include "confdefs.h"
9113#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009114#ifdef F77_DUMMY_MAIN
9115# ifdef __cplusplus
9116 extern "C"
9117# endif
9118 int F77_DUMMY_MAIN() { return 1; }
9119#endif
9120int
9121main ()
9122{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009123loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 ;
9125 return 0;
9126}
9127_ACEOF
9128rm -f conftest.$ac_objext conftest$ac_exeext
9129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9130 (eval $ac_link) 2>&5
9131 ac_status=$?
9132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9133 (exit $ac_status); } &&
9134 { ac_try='test -s conftest$ac_exeext'
9135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9136 (eval $ac_try) 2>&5
9137 ac_status=$?
9138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9139 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009140
Martin v. Löwis11437992002-04-12 09:54:03 +00009141cat >>confdefs.h <<\_ACEOF
9142#define AIX_GENUINE_CPLUSPLUS 1
9143_ACEOF
9144
9145 echo "$as_me:$LINENO: result: yes" >&5
9146echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009147else
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 echo "$as_me: failed program was:" >&5
9149cat conftest.$ac_ext >&5
9150echo "$as_me:$LINENO: result: no" >&5
9151echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009153rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009154 *) ;;
9155esac
9156
Guido van Rossum70c7f481998-03-26 18:44:10 +00009157# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9158# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009159# BeOS' sockets are stashed in libnet.
9160case "$ac_sys_system" in
9161IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009162*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009163echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9164echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9165if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9166 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009167else
Martin v. Löwis11437992002-04-12 09:54:03 +00009168 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009169LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009170cat >conftest.$ac_ext <<_ACEOF
9171#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009172#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009173
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009174/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009175#ifdef __cplusplus
9176extern "C"
9177#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009178/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 builtin and then its argument prototype would still apply. */
9180char t_open ();
9181#ifdef F77_DUMMY_MAIN
9182# ifdef __cplusplus
9183 extern "C"
9184# endif
9185 int F77_DUMMY_MAIN() { return 1; }
9186#endif
9187int
9188main ()
9189{
9190t_open ();
9191 ;
9192 return 0;
9193}
9194_ACEOF
9195rm -f conftest.$ac_objext conftest$ac_exeext
9196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9197 (eval $ac_link) 2>&5
9198 ac_status=$?
9199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9200 (exit $ac_status); } &&
9201 { ac_try='test -s conftest$ac_exeext'
9202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9203 (eval $ac_try) 2>&5
9204 ac_status=$?
9205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9206 (exit $ac_status); }; }; then
9207 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009208else
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 echo "$as_me: failed program was:" >&5
9210cat conftest.$ac_ext >&5
9211ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009213rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9214LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009216echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9217echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9218if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009219 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009220fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009221 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009222echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9223echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9224if test "${ac_cv_lib_socket_socket+set}" = set; then
9225 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009226else
Martin v. Löwis11437992002-04-12 09:54:03 +00009227 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009228LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009229cat >conftest.$ac_ext <<_ACEOF
9230#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009231#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009232
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009233/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009234#ifdef __cplusplus
9235extern "C"
9236#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009237/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 builtin and then its argument prototype would still apply. */
9239char socket ();
9240#ifdef F77_DUMMY_MAIN
9241# ifdef __cplusplus
9242 extern "C"
9243# endif
9244 int F77_DUMMY_MAIN() { return 1; }
9245#endif
9246int
9247main ()
9248{
9249socket ();
9250 ;
9251 return 0;
9252}
9253_ACEOF
9254rm -f conftest.$ac_objext conftest$ac_exeext
9255if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9256 (eval $ac_link) 2>&5
9257 ac_status=$?
9258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9259 (exit $ac_status); } &&
9260 { ac_try='test -s conftest$ac_exeext'
9261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9262 (eval $ac_try) 2>&5
9263 ac_status=$?
9264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9265 (exit $ac_status); }; }; then
9266 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009267else
Martin v. Löwis11437992002-04-12 09:54:03 +00009268 echo "$as_me: failed program was:" >&5
9269cat conftest.$ac_ext >&5
9270ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009271fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009272rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9273LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009274fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009275echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9276echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9277if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009278 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009279fi
9280 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009281;;
9282esac
9283case "$ac_sys_system" in
9284BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009285echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9286echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9287if test "${ac_cv_lib_net_socket+set}" = set; then
9288 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009289else
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009291LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009292cat >conftest.$ac_ext <<_ACEOF
9293#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009294#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009295
Guido van Rossumad678af1998-10-02 14:42:15 +00009296/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009297#ifdef __cplusplus
9298extern "C"
9299#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009300/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 builtin and then its argument prototype would still apply. */
9302char socket ();
9303#ifdef F77_DUMMY_MAIN
9304# ifdef __cplusplus
9305 extern "C"
9306# endif
9307 int F77_DUMMY_MAIN() { return 1; }
9308#endif
9309int
9310main ()
9311{
9312socket ();
9313 ;
9314 return 0;
9315}
9316_ACEOF
9317rm -f conftest.$ac_objext conftest$ac_exeext
9318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9319 (eval $ac_link) 2>&5
9320 ac_status=$?
9321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9322 (exit $ac_status); } &&
9323 { ac_try='test -s conftest$ac_exeext'
9324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9325 (eval $ac_try) 2>&5
9326 ac_status=$?
9327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9328 (exit $ac_status); }; }; then
9329 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009330else
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 echo "$as_me: failed program was:" >&5
9332cat conftest.$ac_ext >&5
9333ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009334fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009335rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9336LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009337fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009338echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9339echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9340if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009341 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009342fi
9343 # BeOS
9344;;
9345esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009346
Martin v. Löwis11437992002-04-12 09:54:03 +00009347echo "$as_me:$LINENO: checking for --with-libs" >&5
9348echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9349
Guido van Rossuma68acba1996-07-31 17:36:39 +00009350# Check whether --with-libs or --without-libs was given.
9351if test "${with_libs+set}" = set; then
9352 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009353
9354echo "$as_me:$LINENO: result: $withval" >&5
9355echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009356LIBS="$withval $LIBS"
9357
9358else
Martin v. Löwis11437992002-04-12 09:54:03 +00009359 echo "$as_me:$LINENO: result: no" >&5
9360echo "${ECHO_T}no" >&6
9361fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009362
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009363# Determine if signalmodule should be used.
9364
9365
Martin v. Löwis11437992002-04-12 09:54:03 +00009366echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9367echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9368
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009369# Check whether --with-signal-module or --without-signal-module was given.
9370if test "${with_signal_module+set}" = set; then
9371 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009372
Martin v. Löwis11437992002-04-12 09:54:03 +00009373fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009374
9375if test -z "$with_signal_module"
9376then with_signal_module="yes"
9377fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009378echo "$as_me:$LINENO: result: $with_signal_module" >&5
9379echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009380
9381if test "${with_signal_module}" = "yes"; then
9382 USE_SIGNAL_MODULE=""
9383 SIGNAL_OBJS=""
9384else
9385 USE_SIGNAL_MODULE="#"
9386 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9387fi
9388
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009389# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009390
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009391USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009392
Martin v. Löwis11437992002-04-12 09:54:03 +00009393echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9394echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9395
Guido van Rossumec2f0731997-01-22 20:54:01 +00009396
9397# Check whether --with-dec-threads or --without-dec-threads was given.
9398if test "${with_dec_threads+set}" = set; then
9399 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009400
9401echo "$as_me:$LINENO: result: $withval" >&5
9402echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009403LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009404if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009405 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009406fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009407else
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 echo "$as_me:$LINENO: result: no" >&5
9409echo "${ECHO_T}no" >&6
9410fi;
9411
9412# Templates for things AC_DEFINEd more than once.
9413# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009414
9415
Martin v. Löwis11437992002-04-12 09:54:03 +00009416
9417
9418
9419
9420
9421echo "$as_me:$LINENO: checking for --with-threads" >&5
9422echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9423
Guido van Rossumec2f0731997-01-22 20:54:01 +00009424# Check whether --with-threads or --without-threads was given.
9425if test "${with_threads+set}" = set; then
9426 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009427
Martin v. Löwis11437992002-04-12 09:54:03 +00009428fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009429
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009430# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009431
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009432# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009433if test "${with_thread+set}" = set; then
9434 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009435
Martin v. Löwis11437992002-04-12 09:54:03 +00009436with_threads=$with_thread
9437fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009438
9439if test -z "$with_threads"
9440then with_threads="yes"
9441fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009442echo "$as_me:$LINENO: result: $with_threads" >&5
9443echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009444
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009445
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009446if test "$with_threads" = "no"
9447then
9448 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009449elif test "$ac_cv_pthread_is_default" = yes
9450then
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009452#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009453_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009454
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009455 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009457#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009458_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009459
9460 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009461 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009462elif test "$ac_cv_kpthread" = "yes"
9463then
9464 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009466#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009467_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009468
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009469 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009470 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009471else
9472 if test ! -z "$with_threads" -a -d "$with_threads"
9473 then LDFLAGS="$LDFLAGS -L$with_threads"
9474 fi
9475 if test ! -z "$withval" -a -d "$withval"
9476 then LDFLAGS="$LDFLAGS -L$withval"
9477 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009478
9479 # According to the POSIX spec, a pthreads implementation must
9480 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9482echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9483 cat >conftest.$ac_ext <<_ACEOF
9484#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009485#include "confdefs.h"
9486#include <unistd.h>
9487 #ifdef _POSIX_THREADS
9488 yes
9489 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009490
9491_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9493 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009494 unistd_defines_pthreads=yes
9495else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009496 unistd_defines_pthreads=no
9497fi
9498rm -f conftest*
9499
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9501echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009502
Martin v. Löwis11437992002-04-12 09:54:03 +00009503 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009504#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009505_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009506
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 if test "${ac_cv_header_cthreads_h+set}" = set; then
9508 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9509echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9510if test "${ac_cv_header_cthreads_h+set}" = set; then
9511 echo $ECHO_N "(cached) $ECHO_C" >&6
9512fi
9513echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9514echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009515else
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 # Is the header compilable?
9517echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9518echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9519cat >conftest.$ac_ext <<_ACEOF
9520#line $LINENO "configure"
9521#include "confdefs.h"
9522$ac_includes_default
9523#include <cthreads.h>
9524_ACEOF
9525rm -f conftest.$ac_objext
9526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9527 (eval $ac_compile) 2>&5
9528 ac_status=$?
9529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9530 (exit $ac_status); } &&
9531 { ac_try='test -s conftest.$ac_objext'
9532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9533 (eval $ac_try) 2>&5
9534 ac_status=$?
9535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9536 (exit $ac_status); }; }; then
9537 ac_header_compiler=yes
9538else
9539 echo "$as_me: failed program was:" >&5
9540cat conftest.$ac_ext >&5
9541ac_header_compiler=no
9542fi
9543rm -f conftest.$ac_objext conftest.$ac_ext
9544echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9545echo "${ECHO_T}$ac_header_compiler" >&6
9546
9547# Is the header present?
9548echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9549echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9550cat >conftest.$ac_ext <<_ACEOF
9551#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009552#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009553#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009554_ACEOF
9555if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9556 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9557 ac_status=$?
9558 egrep -v '^ *\+' conftest.er1 >conftest.err
9559 rm -f conftest.er1
9560 cat conftest.err >&5
9561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9562 (exit $ac_status); } >/dev/null; then
9563 if test -s conftest.err; then
9564 ac_cpp_err=$ac_c_preproc_warn_flag
9565 else
9566 ac_cpp_err=
9567 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009568else
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_cpp_err=yes
9570fi
9571if test -z "$ac_cpp_err"; then
9572 ac_header_preproc=yes
9573else
9574 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009575 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009577fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009578rm -f conftest.err conftest.$ac_ext
9579echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9580echo "${ECHO_T}$ac_header_preproc" >&6
9581
9582# So? What about this header?
9583case $ac_header_compiler:$ac_header_preproc in
9584 yes:no )
9585 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9586echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9587 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9588echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9589 no:yes )
9590 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9591echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9592 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9593echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9594 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9595echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9596esac
9597echo "$as_me:$LINENO: checking for cthreads.h" >&5
9598echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9599if test "${ac_cv_header_cthreads_h+set}" = set; then
9600 echo $ECHO_N "(cached) $ECHO_C" >&6
9601else
9602 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009603fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009604echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9605echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9606
9607fi
9608if test $ac_cv_header_cthreads_h = yes; then
9609 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009610#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009611_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009612
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009614#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009615_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009616
Martin v. Löwis11437992002-04-12 09:54:03 +00009617
9618cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009619#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009620_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009621
9622 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009623 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009624else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009625
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9627 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9628echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9629if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9630 echo $ECHO_N "(cached) $ECHO_C" >&6
9631fi
9632echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9633echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009634else
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 # Is the header compilable?
9636echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9637echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9638cat >conftest.$ac_ext <<_ACEOF
9639#line $LINENO "configure"
9640#include "confdefs.h"
9641$ac_includes_default
9642#include <mach/cthreads.h>
9643_ACEOF
9644rm -f conftest.$ac_objext
9645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9646 (eval $ac_compile) 2>&5
9647 ac_status=$?
9648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9649 (exit $ac_status); } &&
9650 { ac_try='test -s conftest.$ac_objext'
9651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9652 (eval $ac_try) 2>&5
9653 ac_status=$?
9654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9655 (exit $ac_status); }; }; then
9656 ac_header_compiler=yes
9657else
9658 echo "$as_me: failed program was:" >&5
9659cat conftest.$ac_ext >&5
9660ac_header_compiler=no
9661fi
9662rm -f conftest.$ac_objext conftest.$ac_ext
9663echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9664echo "${ECHO_T}$ac_header_compiler" >&6
9665
9666# Is the header present?
9667echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9668echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9669cat >conftest.$ac_ext <<_ACEOF
9670#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009671#include "confdefs.h"
9672#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009673_ACEOF
9674if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9675 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9676 ac_status=$?
9677 egrep -v '^ *\+' conftest.er1 >conftest.err
9678 rm -f conftest.er1
9679 cat conftest.err >&5
9680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9681 (exit $ac_status); } >/dev/null; then
9682 if test -s conftest.err; then
9683 ac_cpp_err=$ac_c_preproc_warn_flag
9684 else
9685 ac_cpp_err=
9686 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009687else
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_cpp_err=yes
9689fi
9690if test -z "$ac_cpp_err"; then
9691 ac_header_preproc=yes
9692else
9693 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009694 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009696fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009697rm -f conftest.err conftest.$ac_ext
9698echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9699echo "${ECHO_T}$ac_header_preproc" >&6
9700
9701# So? What about this header?
9702case $ac_header_compiler:$ac_header_preproc in
9703 yes:no )
9704 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9705echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9706 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9707echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9708 no:yes )
9709 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9710echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9711 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9712echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9713 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9714echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9715esac
9716echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9717echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9718if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9719 echo $ECHO_N "(cached) $ECHO_C" >&6
9720else
9721 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009722fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009723echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9724echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9725
9726fi
9727if test $ac_cv_header_mach_cthreads_h = yes; then
9728 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009729#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009730_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009731
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009733#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009734_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009735
Martin v. Löwis11437992002-04-12 09:54:03 +00009736
9737cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009738#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009739_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009740
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009741 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009742else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009743
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 echo "$as_me:$LINENO: checking for --with-pth" >&5
9745echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9746
9747# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009748if test "${with_pth+set}" = set; then
9749 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009750
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 echo "$as_me:$LINENO: result: $withval" >&5
9752echo "${ECHO_T}$withval" >&6
9753 cat >>confdefs.h <<\_ACEOF
9754#define WITH_THREAD 1
9755_ACEOF
9756
9757
9758cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009759#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009760_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009761
Martin v. Löwis130fb172001-07-19 11:00:41 +00009762 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009763 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009764else
Martin v. Löwis11437992002-04-12 09:54:03 +00009765
9766 echo "$as_me:$LINENO: result: no" >&5
9767echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009768
9769 # Just looking for pthread_create in libpthread is not enough:
9770 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9771 # So we really have to include pthread.h, and then link.
9772 _libs=$LIBS
9773 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9775echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9776 cat >conftest.$ac_ext <<_ACEOF
9777#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009778#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009779#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009780
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009781void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009782#ifdef F77_DUMMY_MAIN
9783# ifdef __cplusplus
9784 extern "C"
9785# endif
9786 int F77_DUMMY_MAIN() { return 1; }
9787#endif
9788int
9789main ()
9790{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009791
9792pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 ;
9794 return 0;
9795}
9796_ACEOF
9797rm -f conftest.$ac_objext conftest$ac_exeext
9798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9799 (eval $ac_link) 2>&5
9800 ac_status=$?
9801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9802 (exit $ac_status); } &&
9803 { ac_try='test -s conftest$ac_exeext'
9804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9805 (eval $ac_try) 2>&5
9806 ac_status=$?
9807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9808 (exit $ac_status); }; }; then
9809
9810 echo "$as_me:$LINENO: result: yes" >&5
9811echo "${ECHO_T}yes" >&6
9812 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009813#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009814_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009815
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009816 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009817 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009818else
Martin v. Löwis11437992002-04-12 09:54:03 +00009819 echo "$as_me: failed program was:" >&5
9820cat conftest.$ac_ext >&5
9821
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009822 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009823 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9824echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9825if test "${ac_cv_func_pthread_detach+set}" = set; then
9826 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009827else
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 cat >conftest.$ac_ext <<_ACEOF
9829#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009830#include "confdefs.h"
9831/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009833#include <assert.h>
9834/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009835#ifdef __cplusplus
9836extern "C"
9837#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009838/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 builtin and then its argument prototype would still apply. */
9840char pthread_detach ();
9841char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009842
Martin v. Löwis11437992002-04-12 09:54:03 +00009843#ifdef F77_DUMMY_MAIN
9844# ifdef __cplusplus
9845 extern "C"
9846# endif
9847 int F77_DUMMY_MAIN() { return 1; }
9848#endif
9849int
9850main ()
9851{
Guido van Rossumad678af1998-10-02 14:42:15 +00009852/* The GNU C library defines this for functions which it implements
9853 to always fail with ENOSYS. Some functions are actually named
9854 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009855#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009856choke me
9857#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009858f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009859#endif
9860
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 ;
9862 return 0;
9863}
9864_ACEOF
9865rm -f conftest.$ac_objext conftest$ac_exeext
9866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9867 (eval $ac_link) 2>&5
9868 ac_status=$?
9869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9870 (exit $ac_status); } &&
9871 { ac_try='test -s conftest$ac_exeext'
9872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9873 (eval $ac_try) 2>&5
9874 ac_status=$?
9875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9876 (exit $ac_status); }; }; then
9877 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009878else
Martin v. Löwis11437992002-04-12 09:54:03 +00009879 echo "$as_me: failed program was:" >&5
9880cat conftest.$ac_ext >&5
9881ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009882fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009883rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009884fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009885echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9886echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9887if test $ac_cv_func_pthread_detach = yes; then
9888 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009889#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009890_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009891
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009892 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009893 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009894else
Guido van Rossumad678af1998-10-02 14:42:15 +00009895
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009896 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9897 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9898echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9899if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9900 echo $ECHO_N "(cached) $ECHO_C" >&6
9901fi
9902echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9903echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9904else
9905 # Is the header compilable?
9906echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
9907echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
9908cat >conftest.$ac_ext <<_ACEOF
9909#line $LINENO "configure"
9910#include "confdefs.h"
9911$ac_includes_default
9912#include <atheos/threads.h>
9913_ACEOF
9914rm -f conftest.$ac_objext
9915if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9916 (eval $ac_compile) 2>&5
9917 ac_status=$?
9918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9919 (exit $ac_status); } &&
9920 { ac_try='test -s conftest.$ac_objext'
9921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9922 (eval $ac_try) 2>&5
9923 ac_status=$?
9924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9925 (exit $ac_status); }; }; then
9926 ac_header_compiler=yes
9927else
9928 echo "$as_me: failed program was:" >&5
9929cat conftest.$ac_ext >&5
9930ac_header_compiler=no
9931fi
9932rm -f conftest.$ac_objext conftest.$ac_ext
9933echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9934echo "${ECHO_T}$ac_header_compiler" >&6
9935
9936# Is the header present?
9937echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
9938echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
9939cat >conftest.$ac_ext <<_ACEOF
9940#line $LINENO "configure"
9941#include "confdefs.h"
9942#include <atheos/threads.h>
9943_ACEOF
9944if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9945 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9946 ac_status=$?
9947 egrep -v '^ *\+' conftest.er1 >conftest.err
9948 rm -f conftest.er1
9949 cat conftest.err >&5
9950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9951 (exit $ac_status); } >/dev/null; then
9952 if test -s conftest.err; then
9953 ac_cpp_err=$ac_c_preproc_warn_flag
9954 else
9955 ac_cpp_err=
9956 fi
9957else
9958 ac_cpp_err=yes
9959fi
9960if test -z "$ac_cpp_err"; then
9961 ac_header_preproc=yes
9962else
9963 echo "$as_me: failed program was:" >&5
9964 cat conftest.$ac_ext >&5
9965 ac_header_preproc=no
9966fi
9967rm -f conftest.err conftest.$ac_ext
9968echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9969echo "${ECHO_T}$ac_header_preproc" >&6
9970
9971# So? What about this header?
9972case $ac_header_compiler:$ac_header_preproc in
9973 yes:no )
9974 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9975echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9976 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9977echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9978 no:yes )
9979 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
9980echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
9981 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
9982echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
9983 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
9984echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
9985esac
9986echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
9987echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
9988if test "${ac_cv_header_atheos_threads_h+set}" = set; then
9989 echo $ECHO_N "(cached) $ECHO_C" >&6
9990else
9991 ac_cv_header_atheos_threads_h=$ac_header_preproc
9992fi
9993echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
9994echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
9995
9996fi
9997if test $ac_cv_header_atheos_threads_h = yes; then
9998 cat >>confdefs.h <<\_ACEOF
9999#define WITH_THREAD 1
10000_ACEOF
10001
10002
10003cat >>confdefs.h <<\_ACEOF
10004#define ATHEOS_THREADS 1
10005_ACEOF
10006
10007 THREADOBJ="Python/thread.o"
10008else
10009
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10011 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10012echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10013if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10014 echo $ECHO_N "(cached) $ECHO_C" >&6
10015fi
10016echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10017echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010018else
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 # Is the header compilable?
10020echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10021echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10022cat >conftest.$ac_ext <<_ACEOF
10023#line $LINENO "configure"
10024#include "confdefs.h"
10025$ac_includes_default
10026#include <kernel/OS.h>
10027_ACEOF
10028rm -f conftest.$ac_objext
10029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10030 (eval $ac_compile) 2>&5
10031 ac_status=$?
10032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10033 (exit $ac_status); } &&
10034 { ac_try='test -s conftest.$ac_objext'
10035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10036 (eval $ac_try) 2>&5
10037 ac_status=$?
10038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10039 (exit $ac_status); }; }; then
10040 ac_header_compiler=yes
10041else
10042 echo "$as_me: failed program was:" >&5
10043cat conftest.$ac_ext >&5
10044ac_header_compiler=no
10045fi
10046rm -f conftest.$ac_objext conftest.$ac_ext
10047echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10048echo "${ECHO_T}$ac_header_compiler" >&6
10049
10050# Is the header present?
10051echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10052echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10053cat >conftest.$ac_ext <<_ACEOF
10054#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010055#include "confdefs.h"
10056#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010057_ACEOF
10058if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10059 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10060 ac_status=$?
10061 egrep -v '^ *\+' conftest.er1 >conftest.err
10062 rm -f conftest.er1
10063 cat conftest.err >&5
10064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10065 (exit $ac_status); } >/dev/null; then
10066 if test -s conftest.err; then
10067 ac_cpp_err=$ac_c_preproc_warn_flag
10068 else
10069 ac_cpp_err=
10070 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010071else
Martin v. Löwis11437992002-04-12 09:54:03 +000010072 ac_cpp_err=yes
10073fi
10074if test -z "$ac_cpp_err"; then
10075 ac_header_preproc=yes
10076else
10077 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010078 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010079 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010081rm -f conftest.err conftest.$ac_ext
10082echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10083echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010084
Martin v. Löwis11437992002-04-12 09:54:03 +000010085# So? What about this header?
10086case $ac_header_compiler:$ac_header_preproc in
10087 yes:no )
10088 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10089echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10090 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10091echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10092 no:yes )
10093 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10094echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10095 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10096echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10097 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10098echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10099esac
10100echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10101echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10102if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10103 echo $ECHO_N "(cached) $ECHO_C" >&6
10104else
10105 ac_cv_header_kernel_OS_h=$ac_header_preproc
10106fi
10107echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10108echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10109
10110fi
10111if test $ac_cv_header_kernel_OS_h = yes; then
10112 cat >>confdefs.h <<\_ACEOF
10113#define WITH_THREAD 1
10114_ACEOF
10115
10116
10117cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010118#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010119_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010120
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010121 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010122else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010123
Martin v. Löwis11437992002-04-12 09:54:03 +000010124 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10125echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10126if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10127 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010128else
Martin v. Löwis11437992002-04-12 09:54:03 +000010129 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010130LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010131cat >conftest.$ac_ext <<_ACEOF
10132#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010133#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010134
Greg Steinadf63d62000-07-05 10:38:09 +000010135/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010136#ifdef __cplusplus
10137extern "C"
10138#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010139/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 builtin and then its argument prototype would still apply. */
10141char pthread_create ();
10142#ifdef F77_DUMMY_MAIN
10143# ifdef __cplusplus
10144 extern "C"
10145# endif
10146 int F77_DUMMY_MAIN() { return 1; }
10147#endif
10148int
10149main ()
10150{
10151pthread_create ();
10152 ;
10153 return 0;
10154}
10155_ACEOF
10156rm -f conftest.$ac_objext conftest$ac_exeext
10157if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10158 (eval $ac_link) 2>&5
10159 ac_status=$?
10160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10161 (exit $ac_status); } &&
10162 { ac_try='test -s conftest$ac_exeext'
10163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10164 (eval $ac_try) 2>&5
10165 ac_status=$?
10166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10167 (exit $ac_status); }; }; then
10168 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010169else
Martin v. Löwis11437992002-04-12 09:54:03 +000010170 echo "$as_me: failed program was:" >&5
10171cat conftest.$ac_ext >&5
10172ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010174rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10175LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010176fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010177echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10178echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10179if test $ac_cv_lib_pthreads_pthread_create = yes; then
10180 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010181#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010182_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010183
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010184 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010185 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010186 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010187else
Greg Steinadf63d62000-07-05 10:38:09 +000010188
Martin v. Löwis11437992002-04-12 09:54:03 +000010189 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10190echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10191if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10192 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010193else
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010195LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010196cat >conftest.$ac_ext <<_ACEOF
10197#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010198#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010199
Guido van Rossum49545951997-12-02 19:28:29 +000010200/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010201#ifdef __cplusplus
10202extern "C"
10203#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010204/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010205 builtin and then its argument prototype would still apply. */
10206char pthread_create ();
10207#ifdef F77_DUMMY_MAIN
10208# ifdef __cplusplus
10209 extern "C"
10210# endif
10211 int F77_DUMMY_MAIN() { return 1; }
10212#endif
10213int
10214main ()
10215{
10216pthread_create ();
10217 ;
10218 return 0;
10219}
10220_ACEOF
10221rm -f conftest.$ac_objext conftest$ac_exeext
10222if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10223 (eval $ac_link) 2>&5
10224 ac_status=$?
10225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10226 (exit $ac_status); } &&
10227 { ac_try='test -s conftest$ac_exeext'
10228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10229 (eval $ac_try) 2>&5
10230 ac_status=$?
10231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10232 (exit $ac_status); }; }; then
10233 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010234else
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 echo "$as_me: failed program was:" >&5
10236cat conftest.$ac_ext >&5
10237ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010238fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010239rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10240LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010241fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010242echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10243echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10244if test $ac_cv_lib_c_r_pthread_create = yes; then
10245 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010246#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010247_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010248
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010249 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010250 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010251 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010252else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010253
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10255echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10256if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010258else
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010260LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010261cat >conftest.$ac_ext <<_ACEOF
10262#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010263#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010264
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010265/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010266#ifdef __cplusplus
10267extern "C"
10268#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010269/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 builtin and then its argument prototype would still apply. */
10271char __d6_pthread_create ();
10272#ifdef F77_DUMMY_MAIN
10273# ifdef __cplusplus
10274 extern "C"
10275# endif
10276 int F77_DUMMY_MAIN() { return 1; }
10277#endif
10278int
10279main ()
10280{
10281__d6_pthread_create ();
10282 ;
10283 return 0;
10284}
10285_ACEOF
10286rm -f conftest.$ac_objext conftest$ac_exeext
10287if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10288 (eval $ac_link) 2>&5
10289 ac_status=$?
10290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10291 (exit $ac_status); } &&
10292 { ac_try='test -s conftest$ac_exeext'
10293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10294 (eval $ac_try) 2>&5
10295 ac_status=$?
10296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10297 (exit $ac_status); }; }; then
10298 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010299else
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 echo "$as_me: failed program was:" >&5
10301cat conftest.$ac_ext >&5
10302ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010303fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010304rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10305LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010306fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010307echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10308echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10309if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10310 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010311#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010312_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010313
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010314 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010315 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010316 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010317else
Guido van Rossum49545951997-12-02 19:28:29 +000010318
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10320echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10321if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010323else
Martin v. Löwis11437992002-04-12 09:54:03 +000010324 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010325LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010326cat >conftest.$ac_ext <<_ACEOF
10327#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010328#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010329
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010330/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010331#ifdef __cplusplus
10332extern "C"
10333#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010334/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 builtin and then its argument prototype would still apply. */
10336char __pthread_create_system ();
10337#ifdef F77_DUMMY_MAIN
10338# ifdef __cplusplus
10339 extern "C"
10340# endif
10341 int F77_DUMMY_MAIN() { return 1; }
10342#endif
10343int
10344main ()
10345{
10346__pthread_create_system ();
10347 ;
10348 return 0;
10349}
10350_ACEOF
10351rm -f conftest.$ac_objext conftest$ac_exeext
10352if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10353 (eval $ac_link) 2>&5
10354 ac_status=$?
10355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10356 (exit $ac_status); } &&
10357 { ac_try='test -s conftest$ac_exeext'
10358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10359 (eval $ac_try) 2>&5
10360 ac_status=$?
10361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10362 (exit $ac_status); }; }; then
10363 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010364else
Martin v. Löwis11437992002-04-12 09:54:03 +000010365 echo "$as_me: failed program was:" >&5
10366cat conftest.$ac_ext >&5
10367ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010369rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10370LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010371fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010372echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10373echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10374if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10375 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010376#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010377_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010378
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010379 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010380 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010381 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010382else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010383
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10385echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10386if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10387 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010388else
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010390LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010391cat >conftest.$ac_ext <<_ACEOF
10392#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010393#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010394
Guido van Rossumb93a8621998-05-07 13:27:32 +000010395/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010396#ifdef __cplusplus
10397extern "C"
10398#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010399/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 builtin and then its argument prototype would still apply. */
10401char pthread_create ();
10402#ifdef F77_DUMMY_MAIN
10403# ifdef __cplusplus
10404 extern "C"
10405# endif
10406 int F77_DUMMY_MAIN() { return 1; }
10407#endif
10408int
10409main ()
10410{
10411pthread_create ();
10412 ;
10413 return 0;
10414}
10415_ACEOF
10416rm -f conftest.$ac_objext conftest$ac_exeext
10417if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10418 (eval $ac_link) 2>&5
10419 ac_status=$?
10420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10421 (exit $ac_status); } &&
10422 { ac_try='test -s conftest$ac_exeext'
10423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10424 (eval $ac_try) 2>&5
10425 ac_status=$?
10426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10427 (exit $ac_status); }; }; then
10428 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010429else
Martin v. Löwis11437992002-04-12 09:54:03 +000010430 echo "$as_me: failed program was:" >&5
10431cat conftest.$ac_ext >&5
10432ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010434rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10435LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010436fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010437echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10438echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10439if test $ac_cv_lib_cma_pthread_create = yes; then
10440 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010441#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010442_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010443
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010444 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010445 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010446 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010447else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010448
Martin v. Löwis130fb172001-07-19 11:00:41 +000010449 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010450fi
10451
Guido van Rossum627b2d71993-12-24 10:39:16 +000010452
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010453fi
10454
Guido van Rossum0be3e491997-05-22 20:33:33 +000010455fi
10456
Guido van Rossum49545951997-12-02 19:28:29 +000010457fi
10458
Guido van Rossumb93a8621998-05-07 13:27:32 +000010459fi
10460
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010461fi
10462
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010463
Michael W. Hudson54241132001-12-07 15:38:26 +000010464fi
10465
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010466
10467fi
10468
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010469fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010470rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10471fi;
10472fi
10473
10474
10475fi
10476
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010477
Michael W. Hudson54241132001-12-07 15:38:26 +000010478
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010479 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010480 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010481
10482cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010483#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010484_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010485
10486 fi
10487
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10489echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10490 if test "${ac_cv_pthread_system_supported+set}" = set; then
10491 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010492else
10493 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010494 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010495else
Martin v. Löwis11437992002-04-12 09:54:03 +000010496 cat >conftest.$ac_ext <<_ACEOF
10497#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010498#include "confdefs.h"
10499#include <pthread.h>
10500 void *foo(void *parm) {
10501 return NULL;
10502 }
10503 main() {
10504 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010505 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010506 if (pthread_attr_init(&attr)) exit(-1);
10507 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010508 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010509 exit(0);
10510 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010511_ACEOF
10512rm -f conftest$ac_exeext
10513if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10514 (eval $ac_link) 2>&5
10515 ac_status=$?
10516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10517 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10519 (eval $ac_try) 2>&5
10520 ac_status=$?
10521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10522 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010523 ac_cv_pthread_system_supported=yes
10524else
Martin v. Löwis11437992002-04-12 09:54:03 +000010525 echo "$as_me: program exited with status $ac_status" >&5
10526echo "$as_me: failed program was:" >&5
10527cat conftest.$ac_ext >&5
10528( exit $ac_status )
10529ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010530fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010531rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010532fi
10533
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010534fi
10535
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10537echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010538 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010539
10540cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010541#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010542_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010543
10544 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010545
10546for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010547do
Martin v. Löwis11437992002-04-12 09:54:03 +000010548as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10549echo "$as_me:$LINENO: checking for $ac_func" >&5
10550echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10551if eval "test \"\${$as_ac_var+set}\" = set"; then
10552 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010553else
Martin v. Löwis11437992002-04-12 09:54:03 +000010554 cat >conftest.$ac_ext <<_ACEOF
10555#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010556#include "confdefs.h"
10557/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010558 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010559#include <assert.h>
10560/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010561#ifdef __cplusplus
10562extern "C"
10563#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010564/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010565 builtin and then its argument prototype would still apply. */
10566char $ac_func ();
10567char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010568
Martin v. Löwis11437992002-04-12 09:54:03 +000010569#ifdef F77_DUMMY_MAIN
10570# ifdef __cplusplus
10571 extern "C"
10572# endif
10573 int F77_DUMMY_MAIN() { return 1; }
10574#endif
10575int
10576main ()
10577{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010578/* The GNU C library defines this for functions which it implements
10579 to always fail with ENOSYS. Some functions are actually named
10580 something starting with __ and the normal name is an alias. */
10581#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10582choke me
10583#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010584f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010585#endif
10586
Martin v. Löwis11437992002-04-12 09:54:03 +000010587 ;
10588 return 0;
10589}
10590_ACEOF
10591rm -f conftest.$ac_objext conftest$ac_exeext
10592if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10593 (eval $ac_link) 2>&5
10594 ac_status=$?
10595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10596 (exit $ac_status); } &&
10597 { ac_try='test -s conftest$ac_exeext'
10598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10599 (eval $ac_try) 2>&5
10600 ac_status=$?
10601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10602 (exit $ac_status); }; }; then
10603 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010604else
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 echo "$as_me: failed program was:" >&5
10606cat conftest.$ac_ext >&5
10607eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010608fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010609rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010610fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010611echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10612echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10613if test `eval echo '${'$as_ac_var'}'` = yes; then
10614 cat >>confdefs.h <<_ACEOF
10615#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10616_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010617
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010618fi
10619done
10620
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010621 fi
10622
Martin v. Löwis11437992002-04-12 09:54:03 +000010623 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10624echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10625if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10626 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010627else
Martin v. Löwis11437992002-04-12 09:54:03 +000010628 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010629LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010630cat >conftest.$ac_ext <<_ACEOF
10631#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010632#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010633
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010634/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010635#ifdef __cplusplus
10636extern "C"
10637#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010638/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010639 builtin and then its argument prototype would still apply. */
10640char usconfig ();
10641#ifdef F77_DUMMY_MAIN
10642# ifdef __cplusplus
10643 extern "C"
10644# endif
10645 int F77_DUMMY_MAIN() { return 1; }
10646#endif
10647int
10648main ()
10649{
10650usconfig ();
10651 ;
10652 return 0;
10653}
10654_ACEOF
10655rm -f conftest.$ac_objext conftest$ac_exeext
10656if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10657 (eval $ac_link) 2>&5
10658 ac_status=$?
10659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10660 (exit $ac_status); } &&
10661 { ac_try='test -s conftest$ac_exeext'
10662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10663 (eval $ac_try) 2>&5
10664 ac_status=$?
10665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666 (exit $ac_status); }; }; then
10667 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010668else
Martin v. Löwis11437992002-04-12 09:54:03 +000010669 echo "$as_me: failed program was:" >&5
10670cat conftest.$ac_ext >&5
10671ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010673rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10674LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010676echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10677echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10678if test $ac_cv_lib_mpc_usconfig = yes; then
10679 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010680#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010681_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010682
Martin v. Löwis130fb172001-07-19 11:00:41 +000010683 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010684 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010685 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010686fi
10687
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010688
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 if test $posix_threads != "yes"; then
10690 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10691echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10692if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10693 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010694else
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010696LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010697cat >conftest.$ac_ext <<_ACEOF
10698#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010699#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010700
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010701/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010702#ifdef __cplusplus
10703extern "C"
10704#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010705/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 builtin and then its argument prototype would still apply. */
10707char thr_create ();
10708#ifdef F77_DUMMY_MAIN
10709# ifdef __cplusplus
10710 extern "C"
10711# endif
10712 int F77_DUMMY_MAIN() { return 1; }
10713#endif
10714int
10715main ()
10716{
10717thr_create ();
10718 ;
10719 return 0;
10720}
10721_ACEOF
10722rm -f conftest.$ac_objext conftest$ac_exeext
10723if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10724 (eval $ac_link) 2>&5
10725 ac_status=$?
10726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10727 (exit $ac_status); } &&
10728 { ac_try='test -s conftest$ac_exeext'
10729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10730 (eval $ac_try) 2>&5
10731 ac_status=$?
10732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10733 (exit $ac_status); }; }; then
10734 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010735else
Martin v. Löwis11437992002-04-12 09:54:03 +000010736 echo "$as_me: failed program was:" >&5
10737cat conftest.$ac_ext >&5
10738ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010740rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10741LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010743echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10744echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10745if test $ac_cv_lib_thread_thr_create = yes; then
10746 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010747#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010748_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010749
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010750 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010751 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010752 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010753fi
10754
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010755 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010756
Martin v. Löwis130fb172001-07-19 11:00:41 +000010757 if test "$USE_THREAD_MODULE" != "#"
10758 then
10759 # If the above checks didn't disable threads, (at least) OSF1
10760 # needs this '-threads' argument during linking.
10761 case $ac_sys_system in
10762 OSF1) LDLAST=-threads;;
10763 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010764 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010765fi
10766
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010767# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010768
10769
10770echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10771echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772# Check whether --enable-ipv6 or --disable-ipv6 was given.
10773if test "${enable_ipv6+set}" = set; then
10774 enableval="$enable_ipv6"
10775 case "$enableval" in
10776 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 echo "$as_me:$LINENO: result: no" >&5
10778echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779 ipv6=no
10780 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010781 *) echo "$as_me:$LINENO: result: yes" >&5
10782echo "${ECHO_T}yes" >&6
10783 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010784#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010785_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786
10787 ipv6=yes
10788 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010789 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010790else
Martin v. Löwis11437992002-04-12 09:54:03 +000010791
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010793 echo "$as_me:$LINENO: result: no" >&5
10794echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 ipv6=no
10796
10797else
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 cat >conftest.$ac_ext <<_ACEOF
10799#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800#include "confdefs.h"
10801 /* AF_INET6 available check */
10802#include <sys/types.h>
10803#include <sys/socket.h>
10804main()
10805{
10806 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10807 exit(1);
10808 else
10809 exit(0);
10810}
10811
Martin v. Löwis11437992002-04-12 09:54:03 +000010812_ACEOF
10813rm -f conftest$ac_exeext
10814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10815 (eval $ac_link) 2>&5
10816 ac_status=$?
10817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10818 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10820 (eval $ac_try) 2>&5
10821 ac_status=$?
10822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10823 (exit $ac_status); }; }; then
10824 echo "$as_me:$LINENO: result: yes" >&5
10825echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010826 ipv6=yes
10827else
Martin v. Löwis11437992002-04-12 09:54:03 +000010828 echo "$as_me: program exited with status $ac_status" >&5
10829echo "$as_me: failed program was:" >&5
10830cat conftest.$ac_ext >&5
10831( exit $ac_status )
10832echo "$as_me:$LINENO: result: no" >&5
10833echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834 ipv6=no
10835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010836rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010837fi
10838
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010839if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010840 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10841echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10842 cat >conftest.$ac_ext <<_ACEOF
10843#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010844#include "confdefs.h"
10845#include <sys/types.h>
10846#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010847#ifdef F77_DUMMY_MAIN
10848# ifdef __cplusplus
10849 extern "C"
10850# endif
10851 int F77_DUMMY_MAIN() { return 1; }
10852#endif
10853int
10854main ()
10855{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010856struct sockaddr_in6 x;
10857x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010858 ;
10859 return 0;
10860}
10861_ACEOF
10862rm -f conftest.$ac_objext
10863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10864 (eval $ac_compile) 2>&5
10865 ac_status=$?
10866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10867 (exit $ac_status); } &&
10868 { ac_try='test -s conftest.$ac_objext'
10869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10870 (eval $ac_try) 2>&5
10871 ac_status=$?
10872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10873 (exit $ac_status); }; }; then
10874 echo "$as_me:$LINENO: result: yes" >&5
10875echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010876 ipv6=yes
10877else
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 echo "$as_me: failed program was:" >&5
10879cat conftest.$ac_ext >&5
10880echo "$as_me:$LINENO: result: no" >&5
10881echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010882 ipv6=no
10883fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010884rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010885fi
10886
10887if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010888 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010889#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010890_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010891
10892fi
10893
Martin v. Löwis11437992002-04-12 09:54:03 +000010894fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895
10896ipv6type=unknown
10897ipv6lib=none
10898ipv6trylibc=no
10899
10900if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010901 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10902echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010903 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10904 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905 case $i in
10906 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 cat >conftest.$ac_ext <<_ACEOF
10908#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010909#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911#include <netinet/in.h>
10912#ifdef IPV6_INRIA_VERSION
10913yes
10914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010915_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10917 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010918 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919fi
10920rm -f conftest*
10921
10922 ;;
10923 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010924 cat >conftest.$ac_ext <<_ACEOF
10925#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010927
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928#include <netinet/in.h>
10929#ifdef __KAME__
10930yes
10931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010932_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10934 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935 ipv6type=$i;
10936 ipv6lib=inet6
10937 ipv6libdir=/usr/local/v6/lib
10938 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010939fi
10940rm -f conftest*
10941
10942 ;;
10943 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 cat >conftest.$ac_ext <<_ACEOF
10945#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010947
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010948#include <features.h>
10949#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10950yes
10951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010952_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10954 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955 ipv6type=$i;
10956 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010957fi
10958rm -f conftest*
10959
10960 ;;
10961 linux-inet6)
10962 if test -d /usr/inet6; then
10963 ipv6type=$i
10964 ipv6lib=inet6
10965 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010966 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010967 fi
10968 ;;
10969 solaris)
10970 if test -f /etc/netconfig; then
10971 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10972 ipv6type=$i
10973 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010974 fi
10975 fi
10976 ;;
10977 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 cat >conftest.$ac_ext <<_ACEOF
10979#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010980#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010981
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010982#include <sys/param.h>
10983#ifdef _TOSHIBA_INET6
10984yes
10985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010986_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10988 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010989 ipv6type=$i;
10990 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010991 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010992fi
10993rm -f conftest*
10994
10995 ;;
10996 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010997 cat >conftest.$ac_ext <<_ACEOF
10998#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010999#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011000
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011001#include </usr/local/v6/include/sys/v6config.h>
11002#ifdef __V6D__
11003yes
11004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011005_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11007 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011008 ipv6type=$i;
11009 ipv6lib=v6;
11010 ipv6libdir=/usr/local/v6/lib;
11011 OPT="-I/usr/local/v6/include $OPT"
11012fi
11013rm -f conftest*
11014
11015 ;;
11016 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011017 cat >conftest.$ac_ext <<_ACEOF
11018#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011019#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011020
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011021#include <sys/param.h>
11022#ifdef _ZETA_MINAMI_INET6
11023yes
11024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011025_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11027 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011028 ipv6type=$i;
11029 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011030 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011031fi
11032rm -f conftest*
11033
11034 ;;
11035 esac
11036 if test "$ipv6type" != "unknown"; then
11037 break
11038 fi
11039 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011040 echo "$as_me:$LINENO: result: $ipv6type" >&5
11041echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011042fi
11043
11044if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11045 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11046 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11047 echo "using lib$ipv6lib"
11048 else
11049 if test $ipv6trylibc = "yes"; then
11050 echo "using libc"
11051 else
11052 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11053 echo "You need to fetch lib$ipv6lib.a from appropriate"
11054 echo 'ipv6 kit and compile beforehand.'
11055 exit 1
11056 fi
11057 fi
11058fi
11059
Jack Jansen7b8c7542002-04-14 20:12:41 +000011060# Check for universal newline support
11061echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
11062echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
11063
11064# Check whether --with-universal-newlines or --without-universal-newlines was given.
11065if test "${with_universal_newlines+set}" = set; then
11066 withval="$with_universal_newlines"
11067
11068fi;
11069
11070if test -z "$with_universal_newlines"
11071then with_universal_newlines="yes"
11072fi
11073if test "$with_universal_newlines" != "no"
11074then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011075
11076cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011077#define WITH_UNIVERSAL_NEWLINES 1
11078_ACEOF
11079
11080fi
11081echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11082echo "${ECHO_T}$with_universal_newlines" >&6
11083
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011084# Check for --with-doc-strings
11085echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11086echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11087
11088# Check whether --with-doc-strings or --without-doc-strings was given.
11089if test "${with_doc_strings+set}" = set; then
11090 withval="$with_doc_strings"
11091
11092fi;
11093
11094if test -z "$with_doc_strings"
11095then with_doc_strings="yes"
11096fi
11097if test "$with_doc_strings" != "no"
11098then
11099
11100cat >>confdefs.h <<\_ACEOF
11101#define WITH_DOC_STRINGS 1
11102_ACEOF
11103
11104fi
11105echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11106echo "${ECHO_T}$with_doc_strings" >&6
11107
Neil Schemenauera35c6882001-02-27 04:45:05 +000011108# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011109echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11110echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11111
Neil Schemenauera35c6882001-02-27 04:45:05 +000011112# Check whether --with-pymalloc or --without-pymalloc was given.
11113if test "${with_pymalloc+set}" = set; then
11114 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011115
Martin v. Löwis11437992002-04-12 09:54:03 +000011116fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011117
Neil Schemenauer16c22972002-03-22 15:34:49 +000011118if test -z "$with_pymalloc"
11119then with_pymalloc="yes"
11120fi
11121if test "$with_pymalloc" != "no"
11122then
Martin v. Löwis11437992002-04-12 09:54:03 +000011123
11124cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011125#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011126_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011127
11128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011129echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11130echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011131
Barry Warsawef82cd72000-06-30 16:21:01 +000011132# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011133echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11134echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11135
Barry Warsawef82cd72000-06-30 16:21:01 +000011136# Check whether --with-wctype-functions or --without-wctype-functions was given.
11137if test "${with_wctype_functions+set}" = set; then
11138 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011139
Barry Warsawef82cd72000-06-30 16:21:01 +000011140if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011141then
11142
11143cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011144#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011145_ACEOF
11146
11147 echo "$as_me:$LINENO: result: yes" >&5
11148echo "${ECHO_T}yes" >&6
11149else echo "$as_me:$LINENO: result: no" >&5
11150echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011151fi
11152else
Martin v. Löwis11437992002-04-12 09:54:03 +000011153 echo "$as_me:$LINENO: result: no" >&5
11154echo "${ECHO_T}no" >&6
11155fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011156
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011157# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011158
Guido van Rossum98935bf2001-09-05 19:13:16 +000011159DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011160
Martin v. Löwis11437992002-04-12 09:54:03 +000011161echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11162echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11163
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011164# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011165if test "${with_sgi_dl+set}" = set; then
11166 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011167
11168echo "$as_me:$LINENO: result: $withval" >&5
11169echo "${ECHO_T}$withval" >&6
11170
11171cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011172#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011173_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011174
Guido van Rossume97ee181999-12-20 21:27:22 +000011175DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011176dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011177if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011178then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011179else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11180echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11181 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011182fi
11183DLINCLDIR=${dldir}
11184LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011185else
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 echo "$as_me:$LINENO: result: no" >&5
11187echo "${ECHO_T}no" >&6
11188fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011189
Martin v. Löwis11437992002-04-12 09:54:03 +000011190echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11191echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011192
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011193# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011194if test "${with_dl_dld+set}" = set; then
11195 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011196
11197echo "$as_me:$LINENO: result: $withval" >&5
11198echo "${ECHO_T}$withval" >&6
11199
11200cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011201#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011202_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011203
Guido van Rossume97ee181999-12-20 21:27:22 +000011204DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011205dldir=`echo "$withval" | sed 's/,.*//'`
11206dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011207if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011208then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011209else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11210echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11211 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011212fi
11213DLINCLDIR=${dldir}
11214LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011215else
Martin v. Löwis11437992002-04-12 09:54:03 +000011216 echo "$as_me:$LINENO: result: no" >&5
11217echo "${ECHO_T}no" >&6
11218fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011219
Guido van Rossume97ee181999-12-20 21:27:22 +000011220# the dlopen() function means we might want to use dynload_shlib.o. some
11221# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011222
Thomas Wouters3a584202000-08-05 23:28:51 +000011223for ac_func in dlopen
11224do
Martin v. Löwis11437992002-04-12 09:54:03 +000011225as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11226echo "$as_me:$LINENO: checking for $ac_func" >&5
11227echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11228if eval "test \"\${$as_ac_var+set}\" = set"; then
11229 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011230else
Martin v. Löwis11437992002-04-12 09:54:03 +000011231 cat >conftest.$ac_ext <<_ACEOF
11232#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011233#include "confdefs.h"
11234/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011235 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011236#include <assert.h>
11237/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011238#ifdef __cplusplus
11239extern "C"
11240#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011241/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011242 builtin and then its argument prototype would still apply. */
11243char $ac_func ();
11244char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011245
Martin v. Löwis11437992002-04-12 09:54:03 +000011246#ifdef F77_DUMMY_MAIN
11247# ifdef __cplusplus
11248 extern "C"
11249# endif
11250 int F77_DUMMY_MAIN() { return 1; }
11251#endif
11252int
11253main ()
11254{
Guido van Rossume97ee181999-12-20 21:27:22 +000011255/* The GNU C library defines this for functions which it implements
11256 to always fail with ENOSYS. Some functions are actually named
11257 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011258#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011259choke me
11260#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011261f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011262#endif
11263
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 ;
11265 return 0;
11266}
11267_ACEOF
11268rm -f conftest.$ac_objext conftest$ac_exeext
11269if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11270 (eval $ac_link) 2>&5
11271 ac_status=$?
11272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11273 (exit $ac_status); } &&
11274 { ac_try='test -s conftest$ac_exeext'
11275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11276 (eval $ac_try) 2>&5
11277 ac_status=$?
11278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11279 (exit $ac_status); }; }; then
11280 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011281else
Martin v. Löwis11437992002-04-12 09:54:03 +000011282 echo "$as_me: failed program was:" >&5
11283cat conftest.$ac_ext >&5
11284eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011285fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011286rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011287fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011288echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11289echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11290if test `eval echo '${'$as_ac_var'}'` = yes; then
11291 cat >>confdefs.h <<_ACEOF
11292#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11293_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011294
Guido van Rossume97ee181999-12-20 21:27:22 +000011295fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011296done
Guido van Rossume97ee181999-12-20 21:27:22 +000011297
Michael W. Hudson54241132001-12-07 15:38:26 +000011298
Guido van Rossume97ee181999-12-20 21:27:22 +000011299# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11300# loading of modules.
11301
Martin v. Löwis11437992002-04-12 09:54:03 +000011302echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11303echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011304if test -z "$DYNLOADFILE"
11305then
11306 case $ac_sys_system/$ac_sys_release in
11307 AIX*) DYNLOADFILE="dynload_aix.o";;
11308 BeOS*) DYNLOADFILE="dynload_beos.o";;
11309 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011310 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011311 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011312 *)
11313 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11314 # out any dynamic loading
11315 if test "$ac_cv_func_dlopen" = yes
11316 then DYNLOADFILE="dynload_shlib.o"
11317 else DYNLOADFILE="dynload_stub.o"
11318 fi
11319 ;;
11320 esac
11321fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011322echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11323echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011324if test "$DYNLOADFILE" != "dynload_stub.o"
11325then
Martin v. Löwis11437992002-04-12 09:54:03 +000011326
11327cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011328#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011329_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011330
11331fi
11332
Neil Schemenauer4e425612001-06-19 15:44:15 +000011333# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11334
Michael W. Hudson54241132001-12-07 15:38:26 +000011335
Martin v. Löwis11437992002-04-12 09:54:03 +000011336echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11337echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011338if test -z "$MACHDEP_OBJS"
11339then
Jack Jansene578a632001-08-15 01:27:14 +000011340 MACHDEP_OBJS=$extra_machdep_objs
11341else
11342 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011344echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11345echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011346
Guido van Rossum627b2d71993-12-24 10:39:16 +000011347# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011421
Fred Drake6b3cc522002-04-15 19:20:27 +000011422
Jack Jansen0b06be72002-06-21 14:48:38 +000011423
Martin v. Löwis244edc82001-10-04 22:44:26 +000011424for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011425 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011426 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011427 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011428 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011429 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011430 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011431 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011432 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011433 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011434 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011435do
Martin v. Löwis11437992002-04-12 09:54:03 +000011436as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11437echo "$as_me:$LINENO: checking for $ac_func" >&5
11438echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11439if eval "test \"\${$as_ac_var+set}\" = set"; then
11440 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011441else
Martin v. Löwis11437992002-04-12 09:54:03 +000011442 cat >conftest.$ac_ext <<_ACEOF
11443#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011444#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011445/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011447#include <assert.h>
11448/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011449#ifdef __cplusplus
11450extern "C"
11451#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011452/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 builtin and then its argument prototype would still apply. */
11454char $ac_func ();
11455char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011456
Martin v. Löwis11437992002-04-12 09:54:03 +000011457#ifdef F77_DUMMY_MAIN
11458# ifdef __cplusplus
11459 extern "C"
11460# endif
11461 int F77_DUMMY_MAIN() { return 1; }
11462#endif
11463int
11464main ()
11465{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011466/* The GNU C library defines this for functions which it implements
11467 to always fail with ENOSYS. Some functions are actually named
11468 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011469#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011470choke me
11471#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011472f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011473#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011474
Martin v. Löwis11437992002-04-12 09:54:03 +000011475 ;
11476 return 0;
11477}
11478_ACEOF
11479rm -f conftest.$ac_objext conftest$ac_exeext
11480if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11481 (eval $ac_link) 2>&5
11482 ac_status=$?
11483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11484 (exit $ac_status); } &&
11485 { ac_try='test -s conftest$ac_exeext'
11486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11487 (eval $ac_try) 2>&5
11488 ac_status=$?
11489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11490 (exit $ac_status); }; }; then
11491 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011492else
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 echo "$as_me: failed program was:" >&5
11494cat conftest.$ac_ext >&5
11495eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011496fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011497rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011498fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011499echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11500echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11501if test `eval echo '${'$as_ac_var'}'` = yes; then
11502 cat >>confdefs.h <<_ACEOF
11503#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11504_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011505
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011506fi
11507done
11508
Michael W. Hudson54241132001-12-07 15:38:26 +000011509
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011510# check for openpty and forkpty
11511
Martin v. Löwis11437992002-04-12 09:54:03 +000011512
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011513for ac_func in openpty
11514do
Martin v. Löwis11437992002-04-12 09:54:03 +000011515as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11516echo "$as_me:$LINENO: checking for $ac_func" >&5
11517echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11518if eval "test \"\${$as_ac_var+set}\" = set"; then
11519 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011520else
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 cat >conftest.$ac_ext <<_ACEOF
11522#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011523#include "confdefs.h"
11524/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011526#include <assert.h>
11527/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011528#ifdef __cplusplus
11529extern "C"
11530#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011531/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011532 builtin and then its argument prototype would still apply. */
11533char $ac_func ();
11534char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011535
Martin v. Löwis11437992002-04-12 09:54:03 +000011536#ifdef F77_DUMMY_MAIN
11537# ifdef __cplusplus
11538 extern "C"
11539# endif
11540 int F77_DUMMY_MAIN() { return 1; }
11541#endif
11542int
11543main ()
11544{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011545/* The GNU C library defines this for functions which it implements
11546 to always fail with ENOSYS. Some functions are actually named
11547 something starting with __ and the normal name is an alias. */
11548#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11549choke me
11550#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011551f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011552#endif
11553
Martin v. Löwis11437992002-04-12 09:54:03 +000011554 ;
11555 return 0;
11556}
11557_ACEOF
11558rm -f conftest.$ac_objext conftest$ac_exeext
11559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11560 (eval $ac_link) 2>&5
11561 ac_status=$?
11562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11563 (exit $ac_status); } &&
11564 { ac_try='test -s conftest$ac_exeext'
11565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11566 (eval $ac_try) 2>&5
11567 ac_status=$?
11568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11569 (exit $ac_status); }; }; then
11570 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011571else
Martin v. Löwis11437992002-04-12 09:54:03 +000011572 echo "$as_me: failed program was:" >&5
11573cat conftest.$ac_ext >&5
11574eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011575fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011576rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011577fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011578echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11579echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11580if test `eval echo '${'$as_ac_var'}'` = yes; then
11581 cat >>confdefs.h <<_ACEOF
11582#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11583_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011584
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011585else
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11587echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11588if test "${ac_cv_lib_util_openpty+set}" = set; then
11589 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011590else
Martin v. Löwis11437992002-04-12 09:54:03 +000011591 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011592LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011593cat >conftest.$ac_ext <<_ACEOF
11594#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011595#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011596
Fred Drake8cef4cf2000-06-28 16:40:38 +000011597/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011598#ifdef __cplusplus
11599extern "C"
11600#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011601/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011602 builtin and then its argument prototype would still apply. */
11603char openpty ();
11604#ifdef F77_DUMMY_MAIN
11605# ifdef __cplusplus
11606 extern "C"
11607# endif
11608 int F77_DUMMY_MAIN() { return 1; }
11609#endif
11610int
11611main ()
11612{
11613openpty ();
11614 ;
11615 return 0;
11616}
11617_ACEOF
11618rm -f conftest.$ac_objext conftest$ac_exeext
11619if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11620 (eval $ac_link) 2>&5
11621 ac_status=$?
11622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11623 (exit $ac_status); } &&
11624 { ac_try='test -s conftest$ac_exeext'
11625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11626 (eval $ac_try) 2>&5
11627 ac_status=$?
11628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11629 (exit $ac_status); }; }; then
11630 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011631else
Martin v. Löwis11437992002-04-12 09:54:03 +000011632 echo "$as_me: failed program was:" >&5
11633cat conftest.$ac_ext >&5
11634ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011636rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11637LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011638fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011639echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11640echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11641if test $ac_cv_lib_util_openpty = yes; then
11642 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011643#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011644_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011645 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011646fi
11647
11648fi
11649done
11650
Martin v. Löwis11437992002-04-12 09:54:03 +000011651
Fred Drake8cef4cf2000-06-28 16:40:38 +000011652for ac_func in forkpty
11653do
Martin v. Löwis11437992002-04-12 09:54:03 +000011654as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11655echo "$as_me:$LINENO: checking for $ac_func" >&5
11656echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11657if eval "test \"\${$as_ac_var+set}\" = set"; then
11658 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011659else
Martin v. Löwis11437992002-04-12 09:54:03 +000011660 cat >conftest.$ac_ext <<_ACEOF
11661#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011662#include "confdefs.h"
11663/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011664 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011665#include <assert.h>
11666/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011667#ifdef __cplusplus
11668extern "C"
11669#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011670/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011671 builtin and then its argument prototype would still apply. */
11672char $ac_func ();
11673char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011674
Martin v. Löwis11437992002-04-12 09:54:03 +000011675#ifdef F77_DUMMY_MAIN
11676# ifdef __cplusplus
11677 extern "C"
11678# endif
11679 int F77_DUMMY_MAIN() { return 1; }
11680#endif
11681int
11682main ()
11683{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011684/* The GNU C library defines this for functions which it implements
11685 to always fail with ENOSYS. Some functions are actually named
11686 something starting with __ and the normal name is an alias. */
11687#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11688choke me
11689#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011690f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011691#endif
11692
Martin v. Löwis11437992002-04-12 09:54:03 +000011693 ;
11694 return 0;
11695}
11696_ACEOF
11697rm -f conftest.$ac_objext conftest$ac_exeext
11698if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11699 (eval $ac_link) 2>&5
11700 ac_status=$?
11701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11702 (exit $ac_status); } &&
11703 { ac_try='test -s conftest$ac_exeext'
11704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11705 (eval $ac_try) 2>&5
11706 ac_status=$?
11707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11708 (exit $ac_status); }; }; then
11709 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011710else
Martin v. Löwis11437992002-04-12 09:54:03 +000011711 echo "$as_me: failed program was:" >&5
11712cat conftest.$ac_ext >&5
11713eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011714fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011715rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011716fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011717echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11718echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11719if test `eval echo '${'$as_ac_var'}'` = yes; then
11720 cat >>confdefs.h <<_ACEOF
11721#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11722_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011723
Fred Drake8cef4cf2000-06-28 16:40:38 +000011724else
Martin v. Löwis11437992002-04-12 09:54:03 +000011725 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11726echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11727if test "${ac_cv_lib_util_forkpty+set}" = set; then
11728 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011729else
Martin v. Löwis11437992002-04-12 09:54:03 +000011730 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011731LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011732cat >conftest.$ac_ext <<_ACEOF
11733#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011734#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011735
Fred Drake8cef4cf2000-06-28 16:40:38 +000011736/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011737#ifdef __cplusplus
11738extern "C"
11739#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011740/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011741 builtin and then its argument prototype would still apply. */
11742char forkpty ();
11743#ifdef F77_DUMMY_MAIN
11744# ifdef __cplusplus
11745 extern "C"
11746# endif
11747 int F77_DUMMY_MAIN() { return 1; }
11748#endif
11749int
11750main ()
11751{
11752forkpty ();
11753 ;
11754 return 0;
11755}
11756_ACEOF
11757rm -f conftest.$ac_objext conftest$ac_exeext
11758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11759 (eval $ac_link) 2>&5
11760 ac_status=$?
11761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11762 (exit $ac_status); } &&
11763 { ac_try='test -s conftest$ac_exeext'
11764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11765 (eval $ac_try) 2>&5
11766 ac_status=$?
11767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11768 (exit $ac_status); }; }; then
11769 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011770else
Martin v. Löwis11437992002-04-12 09:54:03 +000011771 echo "$as_me: failed program was:" >&5
11772cat conftest.$ac_ext >&5
11773ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011774fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011775rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11776LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011777fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011778echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11779echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11780if test $ac_cv_lib_util_forkpty = yes; then
11781 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011782#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011783_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011784 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011785fi
11786
11787fi
11788done
11789
Jack Jansendd19cf82001-12-06 22:36:17 +000011790
Michael W. Hudson54241132001-12-07 15:38:26 +000011791# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011792
11793
11794
11795
11796
11797
Fred Drake8cef4cf2000-06-28 16:40:38 +000011798for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11799do
Martin v. Löwis11437992002-04-12 09:54:03 +000011800as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11801echo "$as_me:$LINENO: checking for $ac_func" >&5
11802echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11803if eval "test \"\${$as_ac_var+set}\" = set"; then
11804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011805else
Martin v. Löwis11437992002-04-12 09:54:03 +000011806 cat >conftest.$ac_ext <<_ACEOF
11807#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011808#include "confdefs.h"
11809/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011810 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011811#include <assert.h>
11812/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011813#ifdef __cplusplus
11814extern "C"
11815#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011816/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011817 builtin and then its argument prototype would still apply. */
11818char $ac_func ();
11819char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011820
Martin v. Löwis11437992002-04-12 09:54:03 +000011821#ifdef F77_DUMMY_MAIN
11822# ifdef __cplusplus
11823 extern "C"
11824# endif
11825 int F77_DUMMY_MAIN() { return 1; }
11826#endif
11827int
11828main ()
11829{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011830/* The GNU C library defines this for functions which it implements
11831 to always fail with ENOSYS. Some functions are actually named
11832 something starting with __ and the normal name is an alias. */
11833#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11834choke me
11835#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011836f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011837#endif
11838
Martin v. Löwis11437992002-04-12 09:54:03 +000011839 ;
11840 return 0;
11841}
11842_ACEOF
11843rm -f conftest.$ac_objext conftest$ac_exeext
11844if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11845 (eval $ac_link) 2>&5
11846 ac_status=$?
11847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11848 (exit $ac_status); } &&
11849 { ac_try='test -s conftest$ac_exeext'
11850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11851 (eval $ac_try) 2>&5
11852 ac_status=$?
11853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11854 (exit $ac_status); }; }; then
11855 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011856else
Martin v. Löwis11437992002-04-12 09:54:03 +000011857 echo "$as_me: failed program was:" >&5
11858cat conftest.$ac_ext >&5
11859eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011860fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011861rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011862fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011863echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11864echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11865if test `eval echo '${'$as_ac_var'}'` = yes; then
11866 cat >>confdefs.h <<_ACEOF
11867#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11868_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011869
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011870fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011871done
11872
Michael W. Hudson54241132001-12-07 15:38:26 +000011873
Martin v. Löwis11437992002-04-12 09:54:03 +000011874
11875
11876
11877
11878
Martin v. Löwis1142de32002-03-29 16:28:31 +000011879for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011880do
Martin v. Löwis11437992002-04-12 09:54:03 +000011881as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11882echo "$as_me:$LINENO: checking for $ac_func" >&5
11883echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11884if eval "test \"\${$as_ac_var+set}\" = set"; then
11885 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011886else
Martin v. Löwis11437992002-04-12 09:54:03 +000011887 cat >conftest.$ac_ext <<_ACEOF
11888#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011889#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011890/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011891 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011892#include <assert.h>
11893/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011894#ifdef __cplusplus
11895extern "C"
11896#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011897/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011898 builtin and then its argument prototype would still apply. */
11899char $ac_func ();
11900char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011901
Martin v. Löwis11437992002-04-12 09:54:03 +000011902#ifdef F77_DUMMY_MAIN
11903# ifdef __cplusplus
11904 extern "C"
11905# endif
11906 int F77_DUMMY_MAIN() { return 1; }
11907#endif
11908int
11909main ()
11910{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011911/* The GNU C library defines this for functions which it implements
11912 to always fail with ENOSYS. Some functions are actually named
11913 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011914#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011915choke me
11916#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011917f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011918#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011919
Martin v. Löwis11437992002-04-12 09:54:03 +000011920 ;
11921 return 0;
11922}
11923_ACEOF
11924rm -f conftest.$ac_objext conftest$ac_exeext
11925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11926 (eval $ac_link) 2>&5
11927 ac_status=$?
11928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11929 (exit $ac_status); } &&
11930 { ac_try='test -s conftest$ac_exeext'
11931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11932 (eval $ac_try) 2>&5
11933 ac_status=$?
11934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11935 (exit $ac_status); }; }; then
11936 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011937else
Martin v. Löwis11437992002-04-12 09:54:03 +000011938 echo "$as_me: failed program was:" >&5
11939cat conftest.$ac_ext >&5
11940eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011941fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011942rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011943fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011944echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11945echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11946if test `eval echo '${'$as_ac_var'}'` = yes; then
11947 cat >>confdefs.h <<_ACEOF
11948#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11949_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011950
Martin v. Löwis1142de32002-03-29 16:28:31 +000011951else
Martin v. Löwis11437992002-04-12 09:54:03 +000011952 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011953fi
11954done
11955
11956
Martin v. Löwis11437992002-04-12 09:54:03 +000011957
Martin v. Löwis1142de32002-03-29 16:28:31 +000011958for ac_func in getpgrp
11959do
Martin v. Löwis11437992002-04-12 09:54:03 +000011960as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11961echo "$as_me:$LINENO: checking for $ac_func" >&5
11962echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11963if eval "test \"\${$as_ac_var+set}\" = set"; then
11964 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011965else
Martin v. Löwis11437992002-04-12 09:54:03 +000011966 cat >conftest.$ac_ext <<_ACEOF
11967#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011968#include "confdefs.h"
11969/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011970 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011971#include <assert.h>
11972/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011973#ifdef __cplusplus
11974extern "C"
11975#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011976/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011977 builtin and then its argument prototype would still apply. */
11978char $ac_func ();
11979char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011980
Martin v. Löwis11437992002-04-12 09:54:03 +000011981#ifdef F77_DUMMY_MAIN
11982# ifdef __cplusplus
11983 extern "C"
11984# endif
11985 int F77_DUMMY_MAIN() { return 1; }
11986#endif
11987int
11988main ()
11989{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011990/* The GNU C library defines this for functions which it implements
11991 to always fail with ENOSYS. Some functions are actually named
11992 something starting with __ and the normal name is an alias. */
11993#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11994choke me
11995#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011996f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000011997#endif
11998
Martin v. Löwis11437992002-04-12 09:54:03 +000011999 ;
12000 return 0;
12001}
12002_ACEOF
12003rm -f conftest.$ac_objext conftest$ac_exeext
12004if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12005 (eval $ac_link) 2>&5
12006 ac_status=$?
12007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12008 (exit $ac_status); } &&
12009 { ac_try='test -s conftest$ac_exeext'
12010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12011 (eval $ac_try) 2>&5
12012 ac_status=$?
12013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12014 (exit $ac_status); }; }; then
12015 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012016else
Martin v. Löwis11437992002-04-12 09:54:03 +000012017 echo "$as_me: failed program was:" >&5
12018cat conftest.$ac_ext >&5
12019eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012020fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012021rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012022fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012023echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12024echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12025if test `eval echo '${'$as_ac_var'}'` = yes; then
12026 cat >>confdefs.h <<_ACEOF
12027#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12028_ACEOF
12029 cat >conftest.$ac_ext <<_ACEOF
12030#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012031#include "confdefs.h"
12032#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012033#ifdef F77_DUMMY_MAIN
12034# ifdef __cplusplus
12035 extern "C"
12036# endif
12037 int F77_DUMMY_MAIN() { return 1; }
12038#endif
12039int
12040main ()
12041{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012042getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012043 ;
12044 return 0;
12045}
12046_ACEOF
12047rm -f conftest.$ac_objext
12048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12049 (eval $ac_compile) 2>&5
12050 ac_status=$?
12051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12052 (exit $ac_status); } &&
12053 { ac_try='test -s conftest.$ac_objext'
12054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12055 (eval $ac_try) 2>&5
12056 ac_status=$?
12057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12058 (exit $ac_status); }; }; then
12059
12060cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012061#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012062_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012063
Martin v. Löwis11437992002-04-12 09:54:03 +000012064
Guido van Rossumf78abae1997-01-21 22:02:36 +000012065else
Martin v. Löwis11437992002-04-12 09:54:03 +000012066 echo "$as_me: failed program was:" >&5
12067cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012068fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012069rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012070
Guido van Rossum627b2d71993-12-24 10:39:16 +000012071fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012072done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012073
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012074echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12075echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12076if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012077 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012078else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012079 if test "$cross_compiling" = yes; then
12080 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12081echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12082 { (exit 1); exit 1; }; }
12083else
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 cat >conftest.$ac_ext <<_ACEOF
12085#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012086#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012087#if HAVE_UNISTD_H
12088# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012089#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012090
Martin v. Löwis11437992002-04-12 09:54:03 +000012091#ifdef F77_DUMMY_MAIN
12092# ifdef __cplusplus
12093 extern "C"
12094# endif
12095 int F77_DUMMY_MAIN() { return 1; }
12096#endif
12097int
12098main ()
12099{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012100/* If this system has a BSD-style setpgrp which takes arguments,
12101 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12102 exit successfully. */
12103 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012104 ;
12105 return 0;
12106}
12107_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012108rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012109if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12110 (eval $ac_link) 2>&5
12111 ac_status=$?
12112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012113 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12115 (eval $ac_try) 2>&5
12116 ac_status=$?
12117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12118 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012119 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012120else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012121 echo "$as_me: program exited with status $ac_status" >&5
12122echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012123cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012124( exit $ac_status )
12125ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012126fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012127rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012128fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012129fi
12130echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12131echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12132if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012133
12134cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012135#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012136_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012137
12138fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012139
Martin v. Löwis11437992002-04-12 09:54:03 +000012140
Thomas Wouters3a584202000-08-05 23:28:51 +000012141for ac_func in gettimeofday
12142do
Martin v. Löwis11437992002-04-12 09:54:03 +000012143as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12144echo "$as_me:$LINENO: checking for $ac_func" >&5
12145echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12146if eval "test \"\${$as_ac_var+set}\" = set"; then
12147 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012148else
Martin v. Löwis11437992002-04-12 09:54:03 +000012149 cat >conftest.$ac_ext <<_ACEOF
12150#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012151#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012152/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012154#include <assert.h>
12155/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012156#ifdef __cplusplus
12157extern "C"
12158#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012159/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 builtin and then its argument prototype would still apply. */
12161char $ac_func ();
12162char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012163
Martin v. Löwis11437992002-04-12 09:54:03 +000012164#ifdef F77_DUMMY_MAIN
12165# ifdef __cplusplus
12166 extern "C"
12167# endif
12168 int F77_DUMMY_MAIN() { return 1; }
12169#endif
12170int
12171main ()
12172{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012173/* The GNU C library defines this for functions which it implements
12174 to always fail with ENOSYS. Some functions are actually named
12175 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012176#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012177choke me
12178#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012179f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012180#endif
12181
Martin v. Löwis11437992002-04-12 09:54:03 +000012182 ;
12183 return 0;
12184}
12185_ACEOF
12186rm -f conftest.$ac_objext conftest$ac_exeext
12187if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12188 (eval $ac_link) 2>&5
12189 ac_status=$?
12190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12191 (exit $ac_status); } &&
12192 { ac_try='test -s conftest$ac_exeext'
12193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12194 (eval $ac_try) 2>&5
12195 ac_status=$?
12196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12197 (exit $ac_status); }; }; then
12198 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012199else
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 echo "$as_me: failed program was:" >&5
12201cat conftest.$ac_ext >&5
12202eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012203fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012204rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012206echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12207echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12208if test `eval echo '${'$as_ac_var'}'` = yes; then
12209 cat >>confdefs.h <<_ACEOF
12210#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12211_ACEOF
12212 cat >conftest.$ac_ext <<_ACEOF
12213#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012214#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012215#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012216#ifdef F77_DUMMY_MAIN
12217# ifdef __cplusplus
12218 extern "C"
12219# endif
12220 int F77_DUMMY_MAIN() { return 1; }
12221#endif
12222int
12223main ()
12224{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012225gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012226 ;
12227 return 0;
12228}
12229_ACEOF
12230rm -f conftest.$ac_objext
12231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12232 (eval $ac_compile) 2>&5
12233 ac_status=$?
12234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12235 (exit $ac_status); } &&
12236 { ac_try='test -s conftest.$ac_objext'
12237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12238 (eval $ac_try) 2>&5
12239 ac_status=$?
12240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12241 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012242 :
12243else
Martin v. Löwis11437992002-04-12 09:54:03 +000012244 echo "$as_me: failed program was:" >&5
12245cat conftest.$ac_ext >&5
12246
12247cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012248#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012249_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012250
Martin v. Löwis11437992002-04-12 09:54:03 +000012251
Guido van Rossum627b2d71993-12-24 10:39:16 +000012252fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012253rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012254
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012255fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012256done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012257
Michael W. Hudson54241132001-12-07 15:38:26 +000012258
12259
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012260# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012261# for [no]getaddrinfo in netdb.h.
12262echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12263echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12264cat >conftest.$ac_ext <<_ACEOF
12265#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012266#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012267
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012268#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012269#include <sys/socket.h>
12270#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012271#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012272
Martin v. Löwis11437992002-04-12 09:54:03 +000012273#ifdef F77_DUMMY_MAIN
12274# ifdef __cplusplus
12275 extern "C"
12276# endif
12277 int F77_DUMMY_MAIN() { return 1; }
12278#endif
12279int
12280main ()
12281{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012282
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012283getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012284
Martin v. Löwis11437992002-04-12 09:54:03 +000012285 ;
12286 return 0;
12287}
12288_ACEOF
12289rm -f conftest.$ac_objext conftest$ac_exeext
12290if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12291 (eval $ac_link) 2>&5
12292 ac_status=$?
12293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12294 (exit $ac_status); } &&
12295 { ac_try='test -s conftest$ac_exeext'
12296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12297 (eval $ac_try) 2>&5
12298 ac_status=$?
12299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12300 (exit $ac_status); }; }; then
12301
12302echo "$as_me:$LINENO: result: yes" >&5
12303echo "${ECHO_T}yes" >&6
12304echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12305echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012306if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012307 echo "$as_me:$LINENO: result: buggy" >&5
12308echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012309buggygetaddrinfo=yes
12310else
Martin v. Löwis11437992002-04-12 09:54:03 +000012311 cat >conftest.$ac_ext <<_ACEOF
12312#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012313#include "confdefs.h"
12314
12315#include <sys/types.h>
12316#include <netdb.h>
12317#include <string.h>
12318#include <sys/socket.h>
12319#include <netinet/in.h>
12320
12321main()
12322{
12323 int passive, gaierr, inet4 = 0, inet6 = 0;
12324 struct addrinfo hints, *ai, *aitop;
12325 char straddr[INET6_ADDRSTRLEN], strport[16];
12326
12327 for (passive = 0; passive <= 1; passive++) {
12328 memset(&hints, 0, sizeof(hints));
12329 hints.ai_family = AF_UNSPEC;
12330 hints.ai_flags = passive ? AI_PASSIVE : 0;
12331 hints.ai_socktype = SOCK_STREAM;
12332 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12333 (void)gai_strerror(gaierr);
12334 goto bad;
12335 }
12336 for (ai = aitop; ai; ai = ai->ai_next) {
12337 if (ai->ai_addr == NULL ||
12338 ai->ai_addrlen == 0 ||
12339 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12340 straddr, sizeof(straddr), strport, sizeof(strport),
12341 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12342 goto bad;
12343 }
12344 switch (ai->ai_family) {
12345 case AF_INET:
12346 if (strcmp(strport, "54321") != 0) {
12347 goto bad;
12348 }
12349 if (passive) {
12350 if (strcmp(straddr, "0.0.0.0") != 0) {
12351 goto bad;
12352 }
12353 } else {
12354 if (strcmp(straddr, "127.0.0.1") != 0) {
12355 goto bad;
12356 }
12357 }
12358 inet4++;
12359 break;
12360 case AF_INET6:
12361 if (strcmp(strport, "54321") != 0) {
12362 goto bad;
12363 }
12364 if (passive) {
12365 if (strcmp(straddr, "::") != 0) {
12366 goto bad;
12367 }
12368 } else {
12369 if (strcmp(straddr, "::1") != 0) {
12370 goto bad;
12371 }
12372 }
12373 inet6++;
12374 break;
12375 case AF_UNSPEC:
12376 goto bad;
12377 break;
12378 default:
12379 /* another family support? */
12380 break;
12381 }
12382 }
12383 }
12384
12385 if (!(inet4 == 0 || inet4 == 2))
12386 goto bad;
12387 if (!(inet6 == 0 || inet6 == 2))
12388 goto bad;
12389
12390 if (aitop)
12391 freeaddrinfo(aitop);
12392 exit(0);
12393
12394 bad:
12395 if (aitop)
12396 freeaddrinfo(aitop);
12397 exit(1);
12398}
12399
Martin v. Löwis11437992002-04-12 09:54:03 +000012400_ACEOF
12401rm -f conftest$ac_exeext
12402if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12403 (eval $ac_link) 2>&5
12404 ac_status=$?
12405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12406 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12408 (eval $ac_try) 2>&5
12409 ac_status=$?
12410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12411 (exit $ac_status); }; }; then
12412 echo "$as_me:$LINENO: result: good" >&5
12413echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012414buggygetaddrinfo=no
12415else
Martin v. Löwis11437992002-04-12 09:54:03 +000012416 echo "$as_me: program exited with status $ac_status" >&5
12417echo "$as_me: failed program was:" >&5
12418cat conftest.$ac_ext >&5
12419( exit $ac_status )
12420echo "$as_me:$LINENO: result: buggy" >&5
12421echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012422buggygetaddrinfo=yes
12423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012424rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012425fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012426else
Martin v. Löwis11437992002-04-12 09:54:03 +000012427 echo "$as_me: failed program was:" >&5
12428cat conftest.$ac_ext >&5
12429
12430echo "$as_me:$LINENO: result: no" >&5
12431echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012432buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012433
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012435rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012436
12437if test "$buggygetaddrinfo" = "yes"; then
12438 if test "$ipv6" = "yes"; then
12439 echo 'Fatal: You must get working getaddrinfo() function.'
12440 echo ' or you can specify "--disable-ipv6"'.
12441 exit 1
12442 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012443else
Martin v. Löwis11437992002-04-12 09:54:03 +000012444
12445cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012446#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012447_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012448
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012450
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012451for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012452do
Martin v. Löwis11437992002-04-12 09:54:03 +000012453as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12454echo "$as_me:$LINENO: checking for $ac_func" >&5
12455echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12456if eval "test \"\${$as_ac_var+set}\" = set"; then
12457 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012458else
Martin v. Löwis11437992002-04-12 09:54:03 +000012459 cat >conftest.$ac_ext <<_ACEOF
12460#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012461#include "confdefs.h"
12462/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012463 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012464#include <assert.h>
12465/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012466#ifdef __cplusplus
12467extern "C"
12468#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012469/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012470 builtin and then its argument prototype would still apply. */
12471char $ac_func ();
12472char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012473
Martin v. Löwis11437992002-04-12 09:54:03 +000012474#ifdef F77_DUMMY_MAIN
12475# ifdef __cplusplus
12476 extern "C"
12477# endif
12478 int F77_DUMMY_MAIN() { return 1; }
12479#endif
12480int
12481main ()
12482{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012483/* The GNU C library defines this for functions which it implements
12484 to always fail with ENOSYS. Some functions are actually named
12485 something starting with __ and the normal name is an alias. */
12486#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12487choke me
12488#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012489f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012490#endif
12491
Martin v. Löwis11437992002-04-12 09:54:03 +000012492 ;
12493 return 0;
12494}
12495_ACEOF
12496rm -f conftest.$ac_objext conftest$ac_exeext
12497if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12498 (eval $ac_link) 2>&5
12499 ac_status=$?
12500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12501 (exit $ac_status); } &&
12502 { ac_try='test -s conftest$ac_exeext'
12503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12504 (eval $ac_try) 2>&5
12505 ac_status=$?
12506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12507 (exit $ac_status); }; }; then
12508 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012509else
Martin v. Löwis11437992002-04-12 09:54:03 +000012510 echo "$as_me: failed program was:" >&5
12511cat conftest.$ac_ext >&5
12512eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012513fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012514rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012515fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012516echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12517echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12518if test `eval echo '${'$as_ac_var'}'` = yes; then
12519 cat >>confdefs.h <<_ACEOF
12520#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12521_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012522
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012523fi
12524done
12525
Michael W. Hudson54241132001-12-07 15:38:26 +000012526
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012527# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012528echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12529echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12530if test "${ac_cv_header_time+set}" = set; then
12531 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012532else
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 cat >conftest.$ac_ext <<_ACEOF
12534#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012535#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012536#include <sys/types.h>
12537#include <sys/time.h>
12538#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012539
12540#ifdef F77_DUMMY_MAIN
12541# ifdef __cplusplus
12542 extern "C"
12543# endif
12544 int F77_DUMMY_MAIN() { return 1; }
12545#endif
12546int
12547main ()
12548{
12549if ((struct tm *) 0)
12550return 0;
12551 ;
12552 return 0;
12553}
12554_ACEOF
12555rm -f conftest.$ac_objext
12556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12557 (eval $ac_compile) 2>&5
12558 ac_status=$?
12559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12560 (exit $ac_status); } &&
12561 { ac_try='test -s conftest.$ac_objext'
12562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12563 (eval $ac_try) 2>&5
12564 ac_status=$?
12565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12566 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012567 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012568else
Martin v. Löwis11437992002-04-12 09:54:03 +000012569 echo "$as_me: failed program was:" >&5
12570cat conftest.$ac_ext >&5
12571ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012572fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012573rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012574fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012575echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12576echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012577if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012578
12579cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012580#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012581_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012582
12583fi
12584
Martin v. Löwis11437992002-04-12 09:54:03 +000012585echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12586echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12587if test "${ac_cv_struct_tm+set}" = set; then
12588 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012589else
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 cat >conftest.$ac_ext <<_ACEOF
12591#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012592#include "confdefs.h"
12593#include <sys/types.h>
12594#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012595
12596#ifdef F77_DUMMY_MAIN
12597# ifdef __cplusplus
12598 extern "C"
12599# endif
12600 int F77_DUMMY_MAIN() { return 1; }
12601#endif
12602int
12603main ()
12604{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012605struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012606 ;
12607 return 0;
12608}
12609_ACEOF
12610rm -f conftest.$ac_objext
12611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12612 (eval $ac_compile) 2>&5
12613 ac_status=$?
12614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12615 (exit $ac_status); } &&
12616 { ac_try='test -s conftest.$ac_objext'
12617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12618 (eval $ac_try) 2>&5
12619 ac_status=$?
12620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12621 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012622 ac_cv_struct_tm=time.h
12623else
Martin v. Löwis11437992002-04-12 09:54:03 +000012624 echo "$as_me: failed program was:" >&5
12625cat conftest.$ac_ext >&5
12626ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012628rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012630echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12631echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012632if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012633
12634cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012635#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012636_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637
12638fi
12639
Martin v. Löwis11437992002-04-12 09:54:03 +000012640echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12641echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12642if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12643 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012644else
Martin v. Löwis11437992002-04-12 09:54:03 +000012645 cat >conftest.$ac_ext <<_ACEOF
12646#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012647#include "confdefs.h"
12648#include <sys/types.h>
12649#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012650
12651
12652#ifdef F77_DUMMY_MAIN
12653# ifdef __cplusplus
12654 extern "C"
12655# endif
12656 int F77_DUMMY_MAIN() { return 1; }
12657#endif
12658int
12659main ()
12660{
12661static struct tm ac_aggr;
12662if (ac_aggr.tm_zone)
12663return 0;
12664 ;
12665 return 0;
12666}
12667_ACEOF
12668rm -f conftest.$ac_objext
12669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12670 (eval $ac_compile) 2>&5
12671 ac_status=$?
12672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12673 (exit $ac_status); } &&
12674 { ac_try='test -s conftest.$ac_objext'
12675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12676 (eval $ac_try) 2>&5
12677 ac_status=$?
12678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12679 (exit $ac_status); }; }; then
12680 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012681else
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 echo "$as_me: failed program was:" >&5
12683cat conftest.$ac_ext >&5
12684ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012685fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012686rm -f conftest.$ac_objext conftest.$ac_ext
12687fi
12688echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12689echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12690if test $ac_cv_member_struct_tm_tm_zone = yes; then
12691
12692cat >>confdefs.h <<_ACEOF
12693#define HAVE_STRUCT_TM_TM_ZONE 1
12694_ACEOF
12695
12696
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012697fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012698
Martin v. Löwis11437992002-04-12 09:54:03 +000012699if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12700
12701cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012702#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012703_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012704
12705else
Martin v. Löwis11437992002-04-12 09:54:03 +000012706 echo "$as_me:$LINENO: checking for tzname" >&5
12707echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12708if test "${ac_cv_var_tzname+set}" = set; then
12709 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012710else
Martin v. Löwis11437992002-04-12 09:54:03 +000012711 cat >conftest.$ac_ext <<_ACEOF
12712#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012713#include "confdefs.h"
12714#include <time.h>
12715#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012716extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012718
12719#ifdef F77_DUMMY_MAIN
12720# ifdef __cplusplus
12721 extern "C"
12722# endif
12723 int F77_DUMMY_MAIN() { return 1; }
12724#endif
12725int
12726main ()
12727{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012728atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012729 ;
12730 return 0;
12731}
12732_ACEOF
12733rm -f conftest.$ac_objext conftest$ac_exeext
12734if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12735 (eval $ac_link) 2>&5
12736 ac_status=$?
12737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12738 (exit $ac_status); } &&
12739 { ac_try='test -s conftest$ac_exeext'
12740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12741 (eval $ac_try) 2>&5
12742 ac_status=$?
12743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12744 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012745 ac_cv_var_tzname=yes
12746else
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 echo "$as_me: failed program was:" >&5
12748cat conftest.$ac_ext >&5
12749ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012750fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012751rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012752fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012753echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12754echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012755 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
12757cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012758#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012759_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012760
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012761 fi
12762fi
12763
Jack Jansendd19cf82001-12-06 22:36:17 +000012764
Martin v. Löwis11437992002-04-12 09:54:03 +000012765echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12766echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12767if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12768 echo $ECHO_N "(cached) $ECHO_C" >&6
12769else
12770 cat >conftest.$ac_ext <<_ACEOF
12771#line $LINENO "configure"
12772#include "confdefs.h"
12773$ac_includes_default
12774#ifdef F77_DUMMY_MAIN
12775# ifdef __cplusplus
12776 extern "C"
12777# endif
12778 int F77_DUMMY_MAIN() { return 1; }
12779#endif
12780int
12781main ()
12782{
12783static struct stat ac_aggr;
12784if (ac_aggr.st_rdev)
12785return 0;
12786 ;
12787 return 0;
12788}
12789_ACEOF
12790rm -f conftest.$ac_objext
12791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12792 (eval $ac_compile) 2>&5
12793 ac_status=$?
12794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12795 (exit $ac_status); } &&
12796 { ac_try='test -s conftest.$ac_objext'
12797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12798 (eval $ac_try) 2>&5
12799 ac_status=$?
12800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12801 (exit $ac_status); }; }; then
12802 ac_cv_member_struct_stat_st_rdev=yes
12803else
12804 echo "$as_me: failed program was:" >&5
12805cat conftest.$ac_ext >&5
12806ac_cv_member_struct_stat_st_rdev=no
12807fi
12808rm -f conftest.$ac_objext conftest.$ac_ext
12809fi
12810echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12811echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12812if test $ac_cv_member_struct_stat_st_rdev = yes; then
12813
12814cat >>confdefs.h <<_ACEOF
12815#define HAVE_STRUCT_STAT_ST_RDEV 1
12816_ACEOF
12817
12818
12819cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012820#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012821_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012822
12823fi
12824
Martin v. Löwis11437992002-04-12 09:54:03 +000012825
12826
12827echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12828echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12829if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12830 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012831else
Martin v. Löwis11437992002-04-12 09:54:03 +000012832 cat >conftest.$ac_ext <<_ACEOF
12833#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012834#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012835$ac_includes_default
12836#ifdef F77_DUMMY_MAIN
12837# ifdef __cplusplus
12838 extern "C"
12839# endif
12840 int F77_DUMMY_MAIN() { return 1; }
12841#endif
12842int
12843main ()
12844{
12845static struct stat ac_aggr;
12846if (ac_aggr.st_blksize)
12847return 0;
12848 ;
12849 return 0;
12850}
12851_ACEOF
12852rm -f conftest.$ac_objext
12853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12854 (eval $ac_compile) 2>&5
12855 ac_status=$?
12856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12857 (exit $ac_status); } &&
12858 { ac_try='test -s conftest.$ac_objext'
12859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12860 (eval $ac_try) 2>&5
12861 ac_status=$?
12862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12863 (exit $ac_status); }; }; then
12864 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012865else
Martin v. Löwis11437992002-04-12 09:54:03 +000012866 echo "$as_me: failed program was:" >&5
12867cat conftest.$ac_ext >&5
12868ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012869fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012870rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012871fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012872echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12873echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12874if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012875
Martin v. Löwis11437992002-04-12 09:54:03 +000012876cat >>confdefs.h <<_ACEOF
12877#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12878_ACEOF
12879
12880
12881cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012882#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012883_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012884
12885fi
12886
Martin v. Löwis11437992002-04-12 09:54:03 +000012887
12888echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12889echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12890if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12891 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012892else
Martin v. Löwis11437992002-04-12 09:54:03 +000012893 cat >conftest.$ac_ext <<_ACEOF
12894#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012895#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012896$ac_includes_default
12897#ifdef F77_DUMMY_MAIN
12898# ifdef __cplusplus
12899 extern "C"
12900# endif
12901 int F77_DUMMY_MAIN() { return 1; }
12902#endif
12903int
12904main ()
12905{
12906static struct stat ac_aggr;
12907if (ac_aggr.st_blocks)
12908return 0;
12909 ;
12910 return 0;
12911}
12912_ACEOF
12913rm -f conftest.$ac_objext
12914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12915 (eval $ac_compile) 2>&5
12916 ac_status=$?
12917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12918 (exit $ac_status); } &&
12919 { ac_try='test -s conftest.$ac_objext'
12920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12921 (eval $ac_try) 2>&5
12922 ac_status=$?
12923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12924 (exit $ac_status); }; }; then
12925 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012926else
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 echo "$as_me: failed program was:" >&5
12928cat conftest.$ac_ext >&5
12929ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012930fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012931rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012932fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012933echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12934echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12935if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012936
Martin v. Löwis11437992002-04-12 09:54:03 +000012937cat >>confdefs.h <<_ACEOF
12938#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12939_ACEOF
12940
12941
12942cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012943#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012944_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012945
12946else
Martin v. Löwis11437992002-04-12 09:54:03 +000012947 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012948fi
12949
Michael W. Hudson54241132001-12-07 15:38:26 +000012950
Martin v. Löwis11437992002-04-12 09:54:03 +000012951
12952echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12953echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12954if test "${ac_cv_header_time_altzone+set}" = set; then
12955 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012956else
Martin v. Löwis11437992002-04-12 09:54:03 +000012957 cat >conftest.$ac_ext <<_ACEOF
12958#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012959#include "confdefs.h"
12960#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012961#ifdef F77_DUMMY_MAIN
12962# ifdef __cplusplus
12963 extern "C"
12964# endif
12965 int F77_DUMMY_MAIN() { return 1; }
12966#endif
12967int
12968main ()
12969{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012970return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012971 ;
12972 return 0;
12973}
12974_ACEOF
12975rm -f conftest.$ac_objext
12976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12977 (eval $ac_compile) 2>&5
12978 ac_status=$?
12979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12980 (exit $ac_status); } &&
12981 { ac_try='test -s conftest.$ac_objext'
12982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12983 (eval $ac_try) 2>&5
12984 ac_status=$?
12985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12986 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012987 ac_cv_header_time_altzone=yes
12988else
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 echo "$as_me: failed program was:" >&5
12990cat conftest.$ac_ext >&5
12991ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012992fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012993rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012994fi
12995
Martin v. Löwis11437992002-04-12 09:54:03 +000012996echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
12997echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012998if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012999
13000cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013001#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013002_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013003
13004fi
13005
Guido van Rossumda88dad1995-01-26 00:46:29 +000013006was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013007echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13008echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13009cat >conftest.$ac_ext <<_ACEOF
13010#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013011#include "confdefs.h"
13012
13013#include <sys/types.h>
13014#include <sys/select.h>
13015#include <sys/time.h>
13016
Martin v. Löwis11437992002-04-12 09:54:03 +000013017#ifdef F77_DUMMY_MAIN
13018# ifdef __cplusplus
13019 extern "C"
13020# endif
13021 int F77_DUMMY_MAIN() { return 1; }
13022#endif
13023int
13024main ()
13025{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013026;
Martin v. Löwis11437992002-04-12 09:54:03 +000013027 ;
13028 return 0;
13029}
13030_ACEOF
13031rm -f conftest.$ac_objext
13032if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13033 (eval $ac_compile) 2>&5
13034 ac_status=$?
13035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13036 (exit $ac_status); } &&
13037 { ac_try='test -s conftest.$ac_objext'
13038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13039 (eval $ac_try) 2>&5
13040 ac_status=$?
13041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13042 (exit $ac_status); }; }; then
13043
13044
13045cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013046#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013047_ACEOF
13048
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013049 was_it_defined=yes
13050
Guido van Rossumf78abae1997-01-21 22:02:36 +000013051else
Martin v. Löwis11437992002-04-12 09:54:03 +000013052 echo "$as_me: failed program was:" >&5
13053cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013054fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013055rm -f conftest.$ac_objext conftest.$ac_ext
13056echo "$as_me:$LINENO: result: $was_it_defined" >&5
13057echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013058
Martin v. Löwis11437992002-04-12 09:54:03 +000013059echo "$as_me:$LINENO: checking for addrinfo" >&5
13060echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13061if test "${ac_cv_struct_addrinfo+set}" = set; then
13062 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013063else
Martin v. Löwis11437992002-04-12 09:54:03 +000013064 cat >conftest.$ac_ext <<_ACEOF
13065#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013066#include "confdefs.h"
13067
13068# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013069#ifdef F77_DUMMY_MAIN
13070# ifdef __cplusplus
13071 extern "C"
13072# endif
13073 int F77_DUMMY_MAIN() { return 1; }
13074#endif
13075int
13076main ()
13077{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013078struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 ;
13080 return 0;
13081}
13082_ACEOF
13083rm -f conftest.$ac_objext
13084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13085 (eval $ac_compile) 2>&5
13086 ac_status=$?
13087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13088 (exit $ac_status); } &&
13089 { ac_try='test -s conftest.$ac_objext'
13090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13091 (eval $ac_try) 2>&5
13092 ac_status=$?
13093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13094 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013095 ac_cv_struct_addrinfo=yes
13096else
Martin v. Löwis11437992002-04-12 09:54:03 +000013097 echo "$as_me: failed program was:" >&5
13098cat conftest.$ac_ext >&5
13099ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013100fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013101rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013102fi
13103
Martin v. Löwis11437992002-04-12 09:54:03 +000013104echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13105echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013106if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013107
13108cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013109#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013110_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013111
13112fi
13113
Martin v. Löwis11437992002-04-12 09:54:03 +000013114echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13115echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13116if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13117 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013118else
Martin v. Löwis11437992002-04-12 09:54:03 +000013119 cat >conftest.$ac_ext <<_ACEOF
13120#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013121#include "confdefs.h"
13122
13123# include <sys/types.h>
13124# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013125#ifdef F77_DUMMY_MAIN
13126# ifdef __cplusplus
13127 extern "C"
13128# endif
13129 int F77_DUMMY_MAIN() { return 1; }
13130#endif
13131int
13132main ()
13133{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013134struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 ;
13136 return 0;
13137}
13138_ACEOF
13139rm -f conftest.$ac_objext
13140if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13141 (eval $ac_compile) 2>&5
13142 ac_status=$?
13143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13144 (exit $ac_status); } &&
13145 { ac_try='test -s conftest.$ac_objext'
13146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13147 (eval $ac_try) 2>&5
13148 ac_status=$?
13149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13150 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013151 ac_cv_struct_sockaddr_storage=yes
13152else
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 echo "$as_me: failed program was:" >&5
13154cat conftest.$ac_ext >&5
13155ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013156fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013157rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013158fi
13159
Martin v. Löwis11437992002-04-12 09:54:03 +000013160echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13161echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013162if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013163
13164cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013165#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013166_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013167
13168fi
13169
Guido van Rossum627b2d71993-12-24 10:39:16 +000013170# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013171
Michael W. Hudson54241132001-12-07 15:38:26 +000013172
Martin v. Löwis11437992002-04-12 09:54:03 +000013173echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13174echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13175if test "${ac_cv_c_char_unsigned+set}" = set; then
13176 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013177else
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 cat >conftest.$ac_ext <<_ACEOF
13179#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013180#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013181$ac_includes_default
13182#ifdef F77_DUMMY_MAIN
13183# ifdef __cplusplus
13184 extern "C"
13185# endif
13186 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013188int
13189main ()
13190{
13191static int test_array [1 - 2 * !(((char) -1) < 0)];
13192test_array [0] = 0
13193
13194 ;
13195 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013196}
Martin v. Löwis11437992002-04-12 09:54:03 +000013197_ACEOF
13198rm -f conftest.$ac_objext
13199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13200 (eval $ac_compile) 2>&5
13201 ac_status=$?
13202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13203 (exit $ac_status); } &&
13204 { ac_try='test -s conftest.$ac_objext'
13205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13206 (eval $ac_try) 2>&5
13207 ac_status=$?
13208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13209 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013210 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013211else
13212 echo "$as_me: failed program was:" >&5
13213cat conftest.$ac_ext >&5
13214ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013215fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013216rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013217fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013218echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13219echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013220if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013221 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013222#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013223_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013224
13225fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013226
Martin v. Löwis11437992002-04-12 09:54:03 +000013227echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13228echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13229if test "${ac_cv_prog_cc_stdc+set}" = set; then
13230 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013231else
Martin v. Löwis11437992002-04-12 09:54:03 +000013232 ac_cv_prog_cc_stdc=no
13233ac_save_CC=$CC
13234cat >conftest.$ac_ext <<_ACEOF
13235#line $LINENO "configure"
13236#include "confdefs.h"
13237#include <stdarg.h>
13238#include <stdio.h>
13239#include <sys/types.h>
13240#include <sys/stat.h>
13241/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13242struct buf { int x; };
13243FILE * (*rcsopen) (struct buf *, struct stat *, int);
13244static char *e (p, i)
13245 char **p;
13246 int i;
13247{
13248 return p[i];
13249}
13250static char *f (char * (*g) (char **, int), char **p, ...)
13251{
13252 char *s;
13253 va_list v;
13254 va_start (v,p);
13255 s = g (p, va_arg (v,int));
13256 va_end (v);
13257 return s;
13258}
13259int test (int i, double x);
13260struct s1 {int (*f) (int a);};
13261struct s2 {int (*f) (double a);};
13262int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13263int argc;
13264char **argv;
13265#ifdef F77_DUMMY_MAIN
13266# ifdef __cplusplus
13267 extern "C"
13268# endif
13269 int F77_DUMMY_MAIN() { return 1; }
13270#endif
13271int
13272main ()
13273{
13274return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13275 ;
13276 return 0;
13277}
13278_ACEOF
13279# Don't try gcc -ansi; that turns off useful extensions and
13280# breaks some systems' header files.
13281# AIX -qlanglvl=ansi
13282# Ultrix and OSF/1 -std1
13283# HP-UX 10.20 and later -Ae
13284# HP-UX older versions -Aa -D_HPUX_SOURCE
13285# SVR4 -Xc -D__EXTENSIONS__
13286for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13287do
13288 CC="$ac_save_CC $ac_arg"
13289 rm -f conftest.$ac_objext
13290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13291 (eval $ac_compile) 2>&5
13292 ac_status=$?
13293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13294 (exit $ac_status); } &&
13295 { ac_try='test -s conftest.$ac_objext'
13296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13297 (eval $ac_try) 2>&5
13298 ac_status=$?
13299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13300 (exit $ac_status); }; }; then
13301 ac_cv_prog_cc_stdc=$ac_arg
13302break
13303else
13304 echo "$as_me: failed program was:" >&5
13305cat conftest.$ac_ext >&5
13306fi
13307rm -f conftest.$ac_objext
13308done
13309rm -f conftest.$ac_ext conftest.$ac_objext
13310CC=$ac_save_CC
13311
13312fi
13313
13314case "x$ac_cv_prog_cc_stdc" in
13315 x|xno)
13316 echo "$as_me:$LINENO: result: none needed" >&5
13317echo "${ECHO_T}none needed" >&6 ;;
13318 *)
13319 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13320echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13321 CC="$CC $ac_cv_prog_cc_stdc" ;;
13322esac
13323
13324echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13325echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13326if test "${ac_cv_c_const+set}" = set; then
13327 echo $ECHO_N "(cached) $ECHO_C" >&6
13328else
13329 cat >conftest.$ac_ext <<_ACEOF
13330#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013331#include "confdefs.h"
13332
Martin v. Löwis11437992002-04-12 09:54:03 +000013333#ifdef F77_DUMMY_MAIN
13334# ifdef __cplusplus
13335 extern "C"
13336# endif
13337 int F77_DUMMY_MAIN() { return 1; }
13338#endif
13339int
13340main ()
13341{
13342/* FIXME: Include the comments suggested by Paul. */
13343#ifndef __cplusplus
13344 /* Ultrix mips cc rejects this. */
13345 typedef int charset[2];
13346 const charset x;
13347 /* SunOS 4.1.1 cc rejects this. */
13348 char const *const *ccp;
13349 char **p;
13350 /* NEC SVR4.0.2 mips cc rejects this. */
13351 struct point {int x, y;};
13352 static struct point const zero = {0,0};
13353 /* AIX XL C 1.02.0.0 rejects this.
13354 It does not let you subtract one const X* pointer from another in
13355 an arm of an if-expression whose if-part is not a constant
13356 expression */
13357 const char *g = "string";
13358 ccp = &g + (g ? g-g : 0);
13359 /* HPUX 7.0 cc rejects these. */
13360 ++ccp;
13361 p = (char**) ccp;
13362 ccp = (char const *const *) p;
13363 { /* SCO 3.2v4 cc rejects this. */
13364 char *t;
13365 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367 *t++ = 0;
13368 }
13369 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13370 int x[] = {25, 17};
13371 const int *foo = &x[0];
13372 ++foo;
13373 }
13374 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13375 typedef const int *iptr;
13376 iptr p = 0;
13377 ++p;
13378 }
13379 { /* AIX XL C 1.02.0.0 rejects this saying
13380 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13381 struct s { int j; const int *ap[3]; };
13382 struct s *b; b->j = 5;
13383 }
13384 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13385 const int foo = 10;
13386 }
13387#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013388
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 ;
13390 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013391}
Martin v. Löwis11437992002-04-12 09:54:03 +000013392_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 Rossum76be6ed1995-01-02 18:33:54 +000013405 ac_cv_c_const=yes
13406else
Martin v. Löwis11437992002-04-12 09:54:03 +000013407 echo "$as_me: failed program was:" >&5
13408cat conftest.$ac_ext >&5
13409ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013410fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013411rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013413echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13414echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013415if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013416
13417cat >>confdefs.h <<\_ACEOF
13418#define const
13419_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013420
13421fi
13422
Michael W. Hudson54241132001-12-07 15:38:26 +000013423
Guido van Rossumda88dad1995-01-26 00:46:29 +000013424works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013425echo "$as_me:$LINENO: checking for working volatile" >&5
13426echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13427cat >conftest.$ac_ext <<_ACEOF
13428#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013429#include "confdefs.h"
13430
Martin v. Löwis11437992002-04-12 09:54:03 +000013431#ifdef F77_DUMMY_MAIN
13432# ifdef __cplusplus
13433 extern "C"
13434# endif
13435 int F77_DUMMY_MAIN() { return 1; }
13436#endif
13437int
13438main ()
13439{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013440volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 ;
13442 return 0;
13443}
13444_ACEOF
13445rm -f conftest.$ac_objext
13446if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13447 (eval $ac_compile) 2>&5
13448 ac_status=$?
13449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13450 (exit $ac_status); } &&
13451 { ac_try='test -s conftest.$ac_objext'
13452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13453 (eval $ac_try) 2>&5
13454 ac_status=$?
13455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13456 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013457 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013458else
Martin v. Löwis11437992002-04-12 09:54:03 +000013459 echo "$as_me: failed program was:" >&5
13460cat conftest.$ac_ext >&5
13461
13462cat >>confdefs.h <<\_ACEOF
13463#define volatile
13464_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013465
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013466
Guido van Rossum627b2d71993-12-24 10:39:16 +000013467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013468rm -f conftest.$ac_objext conftest.$ac_ext
13469echo "$as_me:$LINENO: result: $works" >&5
13470echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013471
Guido van Rossumda88dad1995-01-26 00:46:29 +000013472works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013473echo "$as_me:$LINENO: checking for working signed char" >&5
13474echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13475cat >conftest.$ac_ext <<_ACEOF
13476#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013477#include "confdefs.h"
13478
Martin v. Löwis11437992002-04-12 09:54:03 +000013479#ifdef F77_DUMMY_MAIN
13480# ifdef __cplusplus
13481 extern "C"
13482# endif
13483 int F77_DUMMY_MAIN() { return 1; }
13484#endif
13485int
13486main ()
13487{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013488signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013489 ;
13490 return 0;
13491}
13492_ACEOF
13493rm -f conftest.$ac_objext
13494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13495 (eval $ac_compile) 2>&5
13496 ac_status=$?
13497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13498 (exit $ac_status); } &&
13499 { ac_try='test -s conftest.$ac_objext'
13500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13501 (eval $ac_try) 2>&5
13502 ac_status=$?
13503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13504 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013505 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013506else
Martin v. Löwis11437992002-04-12 09:54:03 +000013507 echo "$as_me: failed program was:" >&5
13508cat conftest.$ac_ext >&5
13509
13510cat >>confdefs.h <<\_ACEOF
13511#define signed
13512_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013513
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013514
Guido van Rossum7f43da71994-08-01 12:15:30 +000013515fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013516rm -f conftest.$ac_objext conftest.$ac_ext
13517echo "$as_me:$LINENO: result: $works" >&5
13518echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013519
Guido van Rossumda88dad1995-01-26 00:46:29 +000013520have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013521echo "$as_me:$LINENO: checking for prototypes" >&5
13522echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13523cat >conftest.$ac_ext <<_ACEOF
13524#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013525#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013526int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013527#ifdef F77_DUMMY_MAIN
13528# ifdef __cplusplus
13529 extern "C"
13530# endif
13531 int F77_DUMMY_MAIN() { return 1; }
13532#endif
13533int
13534main ()
13535{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013536return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013537 ;
13538 return 0;
13539}
13540_ACEOF
13541rm -f conftest.$ac_objext
13542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13543 (eval $ac_compile) 2>&5
13544 ac_status=$?
13545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13546 (exit $ac_status); } &&
13547 { ac_try='test -s conftest.$ac_objext'
13548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13549 (eval $ac_try) 2>&5
13550 ac_status=$?
13551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13552 (exit $ac_status); }; }; then
13553
13554
13555cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013556#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013557_ACEOF
13558
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013559 have_prototypes=yes
13560
Guido van Rossumf78abae1997-01-21 22:02:36 +000013561else
Martin v. Löwis11437992002-04-12 09:54:03 +000013562 echo "$as_me: failed program was:" >&5
13563cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013565rm -f conftest.$ac_objext conftest.$ac_ext
13566echo "$as_me:$LINENO: result: $have_prototypes" >&5
13567echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013568
Guido van Rossumda88dad1995-01-26 00:46:29 +000013569works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013570echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13571echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13572cat >conftest.$ac_ext <<_ACEOF
13573#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013574#include "confdefs.h"
13575
13576#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013577int foo(int x, ...) {
13578 va_list va;
13579 va_start(va, x);
13580 va_arg(va, int);
13581 va_arg(va, char *);
13582 va_arg(va, double);
13583 return 0;
13584}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013585
Martin v. Löwis11437992002-04-12 09:54:03 +000013586#ifdef F77_DUMMY_MAIN
13587# ifdef __cplusplus
13588 extern "C"
13589# endif
13590 int F77_DUMMY_MAIN() { return 1; }
13591#endif
13592int
13593main ()
13594{
Guido van Rossum90eea071996-08-30 20:58:57 +000013595return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013596 ;
13597 return 0;
13598}
13599_ACEOF
13600rm -f conftest.$ac_objext
13601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13602 (eval $ac_compile) 2>&5
13603 ac_status=$?
13604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13605 (exit $ac_status); } &&
13606 { ac_try='test -s conftest.$ac_objext'
13607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13608 (eval $ac_try) 2>&5
13609 ac_status=$?
13610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13611 (exit $ac_status); }; }; then
13612
13613
13614cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013615#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013616_ACEOF
13617
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013618 works=yes
13619
Guido van Rossumf78abae1997-01-21 22:02:36 +000013620else
Martin v. Löwis11437992002-04-12 09:54:03 +000013621 echo "$as_me: failed program was:" >&5
13622cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013623fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013624rm -f conftest.$ac_objext conftest.$ac_ext
13625echo "$as_me:$LINENO: result: $works" >&5
13626echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013627
Guido van Rossumda88dad1995-01-26 00:46:29 +000013628if test "$have_prototypes" = yes; then
13629bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013630echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13631echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13632cat >conftest.$ac_ext <<_ACEOF
13633#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013634#include "confdefs.h"
13635#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013636#ifdef F77_DUMMY_MAIN
13637# ifdef __cplusplus
13638 extern "C"
13639# endif
13640 int F77_DUMMY_MAIN() { return 1; }
13641#endif
13642int
13643main ()
13644{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013645char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 ;
13647 return 0;
13648}
13649_ACEOF
13650rm -f conftest.$ac_objext
13651if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13652 (eval $ac_compile) 2>&5
13653 ac_status=$?
13654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13655 (exit $ac_status); } &&
13656 { ac_try='test -s conftest.$ac_objext'
13657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13658 (eval $ac_try) 2>&5
13659 ac_status=$?
13660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13661 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013662 :
13663else
Martin v. Löwis11437992002-04-12 09:54:03 +000013664 echo "$as_me: failed program was:" >&5
13665cat conftest.$ac_ext >&5
13666
13667cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013668#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013669_ACEOF
13670
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013671 bad_prototypes=yes
13672
Guido van Rossum627b2d71993-12-24 10:39:16 +000013673fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013674rm -f conftest.$ac_objext conftest.$ac_ext
13675echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13676echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013677fi
13678
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013679# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013680echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13681echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13682cat >conftest.$ac_ext <<_ACEOF
13683#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013684#include "confdefs.h"
13685#include <sys/types.h>
13686#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013687#ifdef F77_DUMMY_MAIN
13688# ifdef __cplusplus
13689 extern "C"
13690# endif
13691 int F77_DUMMY_MAIN() { return 1; }
13692#endif
13693int
13694main ()
13695{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013696struct sockaddr x;
13697x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013698 ;
13699 return 0;
13700}
13701_ACEOF
13702rm -f conftest.$ac_objext
13703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13704 (eval $ac_compile) 2>&5
13705 ac_status=$?
13706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13707 (exit $ac_status); } &&
13708 { ac_try='test -s conftest.$ac_objext'
13709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13710 (eval $ac_try) 2>&5
13711 ac_status=$?
13712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13713 (exit $ac_status); }; }; then
13714 echo "$as_me:$LINENO: result: yes" >&5
13715echo "${ECHO_T}yes" >&6
13716
13717cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013718#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013719_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013720
13721else
Martin v. Löwis11437992002-04-12 09:54:03 +000013722 echo "$as_me: failed program was:" >&5
13723cat conftest.$ac_ext >&5
13724echo "$as_me:$LINENO: result: no" >&5
13725echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013726fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013727rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013728
Guido van Rossumda88dad1995-01-26 00:46:29 +000013729va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013730echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13731echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13732cat >conftest.$ac_ext <<_ACEOF
13733#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013734#include "confdefs.h"
13735
13736#ifdef HAVE_STDARG_PROTOTYPES
13737#include <stdarg.h>
13738#else
13739#include <varargs.h>
13740#endif
13741
Martin v. Löwis11437992002-04-12 09:54:03 +000013742#ifdef F77_DUMMY_MAIN
13743# ifdef __cplusplus
13744 extern "C"
13745# endif
13746 int F77_DUMMY_MAIN() { return 1; }
13747#endif
13748int
13749main ()
13750{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013751va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013752 ;
13753 return 0;
13754}
13755_ACEOF
13756rm -f conftest.$ac_objext
13757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13758 (eval $ac_compile) 2>&5
13759 ac_status=$?
13760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13761 (exit $ac_status); } &&
13762 { ac_try='test -s conftest.$ac_objext'
13763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13764 (eval $ac_try) 2>&5
13765 ac_status=$?
13766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13767 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013768 :
13769else
Martin v. Löwis11437992002-04-12 09:54:03 +000013770 echo "$as_me: failed program was:" >&5
13771cat conftest.$ac_ext >&5
13772
13773
13774cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013775#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013776_ACEOF
13777
Guido van Rossumda88dad1995-01-26 00:46:29 +000013778 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013779
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013780fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013781rm -f conftest.$ac_objext conftest.$ac_ext
13782echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13783echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013784
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013785# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013786
13787
13788
13789echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13790echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13791if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13792 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013793else
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 cat >conftest.$ac_ext <<_ACEOF
13795#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013796#include "confdefs.h"
13797/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013798 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013799#include <assert.h>
13800/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013801#ifdef __cplusplus
13802extern "C"
13803#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013804/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013805 builtin and then its argument prototype would still apply. */
13806char gethostbyname_r ();
13807char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013808
Martin v. Löwis11437992002-04-12 09:54:03 +000013809#ifdef F77_DUMMY_MAIN
13810# ifdef __cplusplus
13811 extern "C"
13812# endif
13813 int F77_DUMMY_MAIN() { return 1; }
13814#endif
13815int
13816main ()
13817{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013818/* The GNU C library defines this for functions which it implements
13819 to always fail with ENOSYS. Some functions are actually named
13820 something starting with __ and the normal name is an alias. */
13821#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13822choke me
13823#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013824f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013825#endif
13826
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 ;
13828 return 0;
13829}
13830_ACEOF
13831rm -f conftest.$ac_objext conftest$ac_exeext
13832if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13833 (eval $ac_link) 2>&5
13834 ac_status=$?
13835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13836 (exit $ac_status); } &&
13837 { ac_try='test -s conftest$ac_exeext'
13838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13839 (eval $ac_try) 2>&5
13840 ac_status=$?
13841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13842 (exit $ac_status); }; }; then
13843 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013844else
Martin v. Löwis11437992002-04-12 09:54:03 +000013845 echo "$as_me: failed program was:" >&5
13846cat conftest.$ac_ext >&5
13847ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013848fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013849rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013850fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013851echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13852echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13853if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013854
Martin v. Löwis11437992002-04-12 09:54:03 +000013855 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013856#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013857_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013858
Martin v. Löwis11437992002-04-12 09:54:03 +000013859 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13860echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013861 OLD_CFLAGS=$CFLAGS
13862 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013863 cat >conftest.$ac_ext <<_ACEOF
13864#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013865#include "confdefs.h"
13866
13867# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013868
13869#ifdef F77_DUMMY_MAIN
13870# ifdef __cplusplus
13871 extern "C"
13872# endif
13873 int F77_DUMMY_MAIN() { return 1; }
13874#endif
13875int
13876main ()
13877{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013878
13879 char *name;
13880 struct hostent *he, *res;
13881 char buffer[2048];
13882 int buflen = 2048;
13883 int h_errnop;
13884
13885 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013886
13887 ;
13888 return 0;
13889}
13890_ACEOF
13891rm -f conftest.$ac_objext
13892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13893 (eval $ac_compile) 2>&5
13894 ac_status=$?
13895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13896 (exit $ac_status); } &&
13897 { ac_try='test -s conftest.$ac_objext'
13898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13899 (eval $ac_try) 2>&5
13900 ac_status=$?
13901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13902 (exit $ac_status); }; }; then
13903
13904 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013905#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013906_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013907
Martin v. Löwis11437992002-04-12 09:54:03 +000013908
13909cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013910#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013911_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013912
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 echo "$as_me:$LINENO: result: yes" >&5
13914echo "${ECHO_T}yes" >&6
13915
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013916else
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 echo "$as_me: failed program was:" >&5
13918cat conftest.$ac_ext >&5
13919
13920 echo "$as_me:$LINENO: result: no" >&5
13921echo "${ECHO_T}no" >&6
13922 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13923echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13924 cat >conftest.$ac_ext <<_ACEOF
13925#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013926#include "confdefs.h"
13927
13928# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013929
13930#ifdef F77_DUMMY_MAIN
13931# ifdef __cplusplus
13932 extern "C"
13933# endif
13934 int F77_DUMMY_MAIN() { return 1; }
13935#endif
13936int
13937main ()
13938{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013939
13940 char *name;
13941 struct hostent *he;
13942 char buffer[2048];
13943 int buflen = 2048;
13944 int h_errnop;
13945
13946 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013947
13948 ;
13949 return 0;
13950}
13951_ACEOF
13952rm -f conftest.$ac_objext
13953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13954 (eval $ac_compile) 2>&5
13955 ac_status=$?
13956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13957 (exit $ac_status); } &&
13958 { ac_try='test -s conftest.$ac_objext'
13959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13960 (eval $ac_try) 2>&5
13961 ac_status=$?
13962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13963 (exit $ac_status); }; }; then
13964
13965 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013966#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013967_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013968
Martin v. Löwis11437992002-04-12 09:54:03 +000013969
13970cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013971#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013972_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013973
Martin v. Löwis11437992002-04-12 09:54:03 +000013974 echo "$as_me:$LINENO: result: yes" >&5
13975echo "${ECHO_T}yes" >&6
13976
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013977else
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 echo "$as_me: failed program was:" >&5
13979cat conftest.$ac_ext >&5
13980
13981 echo "$as_me:$LINENO: result: no" >&5
13982echo "${ECHO_T}no" >&6
13983 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
13984echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
13985 cat >conftest.$ac_ext <<_ACEOF
13986#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013987#include "confdefs.h"
13988
13989# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013990
13991#ifdef F77_DUMMY_MAIN
13992# ifdef __cplusplus
13993 extern "C"
13994# endif
13995 int F77_DUMMY_MAIN() { return 1; }
13996#endif
13997int
13998main ()
13999{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014000
14001 char *name;
14002 struct hostent *he;
14003 struct hostent_data data;
14004
14005 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014006
14007 ;
14008 return 0;
14009}
14010_ACEOF
14011rm -f conftest.$ac_objext
14012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14013 (eval $ac_compile) 2>&5
14014 ac_status=$?
14015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14016 (exit $ac_status); } &&
14017 { ac_try='test -s conftest.$ac_objext'
14018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14019 (eval $ac_try) 2>&5
14020 ac_status=$?
14021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14022 (exit $ac_status); }; }; then
14023
14024 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014025#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014026_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014027
Martin v. Löwis11437992002-04-12 09:54:03 +000014028
14029cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014030#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014031_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014032
Martin v. Löwis11437992002-04-12 09:54:03 +000014033 echo "$as_me:$LINENO: result: yes" >&5
14034echo "${ECHO_T}yes" >&6
14035
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014036else
Martin v. Löwis11437992002-04-12 09:54:03 +000014037 echo "$as_me: failed program was:" >&5
14038cat conftest.$ac_ext >&5
14039
14040 echo "$as_me:$LINENO: result: no" >&5
14041echo "${ECHO_T}no" >&6
14042
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014044rm -f conftest.$ac_objext conftest.$ac_ext
14045
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014046fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014047rm -f conftest.$ac_objext conftest.$ac_ext
14048
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014049fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014050rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014051 CFLAGS=$OLD_CFLAGS
14052
14053else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014054
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
14056for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014057do
Martin v. Löwis11437992002-04-12 09:54:03 +000014058as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14059echo "$as_me:$LINENO: checking for $ac_func" >&5
14060echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14061if eval "test \"\${$as_ac_var+set}\" = set"; then
14062 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014063else
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 cat >conftest.$ac_ext <<_ACEOF
14065#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014066#include "confdefs.h"
14067/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014069#include <assert.h>
14070/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014071#ifdef __cplusplus
14072extern "C"
14073#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014074/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014075 builtin and then its argument prototype would still apply. */
14076char $ac_func ();
14077char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014078
Martin v. Löwis11437992002-04-12 09:54:03 +000014079#ifdef F77_DUMMY_MAIN
14080# ifdef __cplusplus
14081 extern "C"
14082# endif
14083 int F77_DUMMY_MAIN() { return 1; }
14084#endif
14085int
14086main ()
14087{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014088/* The GNU C library defines this for functions which it implements
14089 to always fail with ENOSYS. Some functions are actually named
14090 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014091#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014092choke me
14093#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014094f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014095#endif
14096
Martin v. Löwis11437992002-04-12 09:54:03 +000014097 ;
14098 return 0;
14099}
14100_ACEOF
14101rm -f conftest.$ac_objext conftest$ac_exeext
14102if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14103 (eval $ac_link) 2>&5
14104 ac_status=$?
14105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14106 (exit $ac_status); } &&
14107 { ac_try='test -s conftest$ac_exeext'
14108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14109 (eval $ac_try) 2>&5
14110 ac_status=$?
14111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14112 (exit $ac_status); }; }; then
14113 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014114else
Martin v. Löwis11437992002-04-12 09:54:03 +000014115 echo "$as_me: failed program was:" >&5
14116cat conftest.$ac_ext >&5
14117eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014119rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014120fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014121echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14122echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14123if test `eval echo '${'$as_ac_var'}'` = yes; then
14124 cat >>confdefs.h <<_ACEOF
14125#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14126_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014127
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014128fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014129done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014130
Michael W. Hudson54241132001-12-07 15:38:26 +000014131
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014132fi
14133
Michael W. Hudson54241132001-12-07 15:38:26 +000014134
14135
14136
14137
14138
14139
Guido van Rossum627b2d71993-12-24 10:39:16 +000014140# checks for system services
14141# (none yet)
14142
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014143# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014144echo "$as_me:$LINENO: checking for __fpu_control" >&5
14145echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14146if test "${ac_cv_func___fpu_control+set}" = set; then
14147 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014148else
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 cat >conftest.$ac_ext <<_ACEOF
14150#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014151#include "confdefs.h"
14152/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014153 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014154#include <assert.h>
14155/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014156#ifdef __cplusplus
14157extern "C"
14158#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014159/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 builtin and then its argument prototype would still apply. */
14161char __fpu_control ();
14162char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014163
Martin v. Löwis11437992002-04-12 09:54:03 +000014164#ifdef F77_DUMMY_MAIN
14165# ifdef __cplusplus
14166 extern "C"
14167# endif
14168 int F77_DUMMY_MAIN() { return 1; }
14169#endif
14170int
14171main ()
14172{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014173/* The GNU C library defines this for functions which it implements
14174 to always fail with ENOSYS. Some functions are actually named
14175 something starting with __ and the normal name is an alias. */
14176#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14177choke me
14178#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014179f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014180#endif
14181
Martin v. Löwis11437992002-04-12 09:54:03 +000014182 ;
14183 return 0;
14184}
14185_ACEOF
14186rm -f conftest.$ac_objext conftest$ac_exeext
14187if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14188 (eval $ac_link) 2>&5
14189 ac_status=$?
14190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14191 (exit $ac_status); } &&
14192 { ac_try='test -s conftest$ac_exeext'
14193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14194 (eval $ac_try) 2>&5
14195 ac_status=$?
14196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14197 (exit $ac_status); }; }; then
14198 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014199else
Martin v. Löwis11437992002-04-12 09:54:03 +000014200 echo "$as_me: failed program was:" >&5
14201cat conftest.$ac_ext >&5
14202ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014203fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014204rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014206echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14207echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14208if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014209 :
14210else
Martin v. Löwis11437992002-04-12 09:54:03 +000014211
14212echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14213echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14214if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14215 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014216else
Martin v. Löwis11437992002-04-12 09:54:03 +000014217 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014218LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014219cat >conftest.$ac_ext <<_ACEOF
14220#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014221#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014222
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014223/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014224#ifdef __cplusplus
14225extern "C"
14226#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014227/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014228 builtin and then its argument prototype would still apply. */
14229char __fpu_control ();
14230#ifdef F77_DUMMY_MAIN
14231# ifdef __cplusplus
14232 extern "C"
14233# endif
14234 int F77_DUMMY_MAIN() { return 1; }
14235#endif
14236int
14237main ()
14238{
14239__fpu_control ();
14240 ;
14241 return 0;
14242}
14243_ACEOF
14244rm -f conftest.$ac_objext conftest$ac_exeext
14245if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14246 (eval $ac_link) 2>&5
14247 ac_status=$?
14248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14249 (exit $ac_status); } &&
14250 { ac_try='test -s conftest$ac_exeext'
14251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14252 (eval $ac_try) 2>&5
14253 ac_status=$?
14254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14255 (exit $ac_status); }; }; then
14256 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014257else
Martin v. Löwis11437992002-04-12 09:54:03 +000014258 echo "$as_me: failed program was:" >&5
14259cat conftest.$ac_ext >&5
14260ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014261fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014262rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14263LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014264fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014265echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14266echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14267if test $ac_cv_lib_ieee___fpu_control = yes; then
14268 cat >>confdefs.h <<_ACEOF
14269#define HAVE_LIBIEEE 1
14270_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014271
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014272 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014273
Guido van Rossum627b2d71993-12-24 10:39:16 +000014274fi
14275
Michael W. Hudson54241132001-12-07 15:38:26 +000014276
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014277fi
14278
Michael W. Hudson54241132001-12-07 15:38:26 +000014279
Guido van Rossum7f253911997-05-09 02:42:48 +000014280# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014281echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14282echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14283
Guido van Rossum7f253911997-05-09 02:42:48 +000014284# Check whether --with-fpectl or --without-fpectl was given.
14285if test "${with_fpectl+set}" = set; then
14286 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014287
Guido van Rossum7f253911997-05-09 02:42:48 +000014288if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014289then
14290
14291cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014292#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014293_ACEOF
14294
14295 echo "$as_me:$LINENO: result: yes" >&5
14296echo "${ECHO_T}yes" >&6
14297else echo "$as_me:$LINENO: result: no" >&5
14298echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014299fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014300else
Martin v. Löwis11437992002-04-12 09:54:03 +000014301 echo "$as_me:$LINENO: result: no" >&5
14302echo "${ECHO_T}no" >&6
14303fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014304
Guido van Rossum7f43da71994-08-01 12:15:30 +000014305# check for --with-libm=...
14306
Guido van Rossum563e7081996-09-10 18:20:48 +000014307case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014308Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014309BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014310*) LIBM=-lm
14311esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014312echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14313echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14314
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014315# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014316if test "${with_libm+set}" = set; then
14317 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014318
Guido van Rossum7f253911997-05-09 02:42:48 +000014319if test "$withval" = no
14320then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014321 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14322echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014323elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014324then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014325 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14326echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14327else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14328echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14329 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014330fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014331else
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14333echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14334fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014335
14336# check for --with-libc=...
14337
Martin v. Löwis11437992002-04-12 09:54:03 +000014338echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14339echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14340
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014341# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014342if test "${with_libc+set}" = set; then
14343 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014344
Guido van Rossum7f253911997-05-09 02:42:48 +000014345if test "$withval" = no
14346then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014347 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14348echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014349elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014350then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014351 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14352echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14353else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14354echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14355 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014356fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014357else
Martin v. Löwis11437992002-04-12 09:54:03 +000014358 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14359echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14360fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014361
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014362# check for hypot() in math library
14363LIBS_SAVE=$LIBS
14364LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014365
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014366for ac_func in hypot
14367do
Martin v. Löwis11437992002-04-12 09:54:03 +000014368as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14369echo "$as_me:$LINENO: checking for $ac_func" >&5
14370echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14371if eval "test \"\${$as_ac_var+set}\" = set"; then
14372 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014373else
Martin v. Löwis11437992002-04-12 09:54:03 +000014374 cat >conftest.$ac_ext <<_ACEOF
14375#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014376#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014377/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014378 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014379#include <assert.h>
14380/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014381#ifdef __cplusplus
14382extern "C"
14383#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014384/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 builtin and then its argument prototype would still apply. */
14386char $ac_func ();
14387char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014388
Martin v. Löwis11437992002-04-12 09:54:03 +000014389#ifdef F77_DUMMY_MAIN
14390# ifdef __cplusplus
14391 extern "C"
14392# endif
14393 int F77_DUMMY_MAIN() { return 1; }
14394#endif
14395int
14396main ()
14397{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014398/* The GNU C library defines this for functions which it implements
14399 to always fail with ENOSYS. Some functions are actually named
14400 something starting with __ and the normal name is an alias. */
14401#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14402choke me
14403#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014404f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014405#endif
14406
Martin v. Löwis11437992002-04-12 09:54:03 +000014407 ;
14408 return 0;
14409}
14410_ACEOF
14411rm -f conftest.$ac_objext conftest$ac_exeext
14412if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14413 (eval $ac_link) 2>&5
14414 ac_status=$?
14415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14416 (exit $ac_status); } &&
14417 { ac_try='test -s conftest$ac_exeext'
14418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14419 (eval $ac_try) 2>&5
14420 ac_status=$?
14421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14422 (exit $ac_status); }; }; then
14423 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014424else
Martin v. Löwis11437992002-04-12 09:54:03 +000014425 echo "$as_me: failed program was:" >&5
14426cat conftest.$ac_ext >&5
14427eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014428fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014429rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014431echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14432echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14433if test `eval echo '${'$as_ac_var'}'` = yes; then
14434 cat >>confdefs.h <<_ACEOF
14435#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14436_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014437
Michael W. Hudson54241132001-12-07 15:38:26 +000014438else
Martin v. Löwis11437992002-04-12 09:54:03 +000014439 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014440fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014441done
14442
Michael W. Hudson54241132001-12-07 15:38:26 +000014443
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014444LIBS=$LIBS_SAVE
14445
Guido van Rossumad713701997-07-10 22:42:38 +000014446# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014447echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14448echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14449if test "${ac_cv_malloc_zero+set}" = set; then
14450 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014451else
14452 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014453 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014454else
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 cat >conftest.$ac_ext <<_ACEOF
14456#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014457#include "confdefs.h"
14458#include <stdio.h>
14459#ifdef HAVE_STDLIB
14460#include <stdlib.h>
14461#else
14462char *malloc(), *realloc();
14463int *free();
14464#endif
14465main() {
14466 char *p;
14467 p = malloc(0);
14468 if (p == NULL) exit(1);
14469 p = realloc(p, 0);
14470 if (p == NULL) exit(1);
14471 free(p);
14472 exit(0);
14473}
Martin v. Löwis11437992002-04-12 09:54:03 +000014474_ACEOF
14475rm -f conftest$ac_exeext
14476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14477 (eval $ac_link) 2>&5
14478 ac_status=$?
14479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14482 (eval $ac_try) 2>&5
14483 ac_status=$?
14484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14485 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014486 ac_cv_malloc_zero=nonnull
14487else
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 echo "$as_me: program exited with status $ac_status" >&5
14489echo "$as_me: failed program was:" >&5
14490cat conftest.$ac_ext >&5
14491( exit $ac_status )
14492ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014493fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014494rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014495fi
Guido van Rossumad713701997-07-10 22:42:38 +000014496fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014497 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014498echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14499echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014500if test "$ac_cv_malloc_zero" = null
14501then
Martin v. Löwis11437992002-04-12 09:54:03 +000014502
14503cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014504#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014505_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014506
14507fi
14508
Guido van Rossumef2255b2000-03-10 22:30:29 +000014509# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014510if test "${ac_cv_header_wchar_h+set}" = set; then
14511 echo "$as_me:$LINENO: checking for wchar.h" >&5
14512echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14513if test "${ac_cv_header_wchar_h+set}" = set; then
14514 echo $ECHO_N "(cached) $ECHO_C" >&6
14515fi
14516echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14517echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014518else
Martin v. Löwis11437992002-04-12 09:54:03 +000014519 # Is the header compilable?
14520echo "$as_me:$LINENO: checking wchar.h usability" >&5
14521echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14522cat >conftest.$ac_ext <<_ACEOF
14523#line $LINENO "configure"
14524#include "confdefs.h"
14525$ac_includes_default
14526#include <wchar.h>
14527_ACEOF
14528rm -f conftest.$ac_objext
14529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14530 (eval $ac_compile) 2>&5
14531 ac_status=$?
14532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14533 (exit $ac_status); } &&
14534 { ac_try='test -s conftest.$ac_objext'
14535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14536 (eval $ac_try) 2>&5
14537 ac_status=$?
14538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14539 (exit $ac_status); }; }; then
14540 ac_header_compiler=yes
14541else
14542 echo "$as_me: failed program was:" >&5
14543cat conftest.$ac_ext >&5
14544ac_header_compiler=no
14545fi
14546rm -f conftest.$ac_objext conftest.$ac_ext
14547echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14548echo "${ECHO_T}$ac_header_compiler" >&6
14549
14550# Is the header present?
14551echo "$as_me:$LINENO: checking wchar.h presence" >&5
14552echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14553cat >conftest.$ac_ext <<_ACEOF
14554#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014555#include "confdefs.h"
14556#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014557_ACEOF
14558if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14559 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14560 ac_status=$?
14561 egrep -v '^ *\+' conftest.er1 >conftest.err
14562 rm -f conftest.er1
14563 cat conftest.err >&5
14564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14565 (exit $ac_status); } >/dev/null; then
14566 if test -s conftest.err; then
14567 ac_cpp_err=$ac_c_preproc_warn_flag
14568 else
14569 ac_cpp_err=
14570 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014571else
Martin v. Löwis11437992002-04-12 09:54:03 +000014572 ac_cpp_err=yes
14573fi
14574if test -z "$ac_cpp_err"; then
14575 ac_header_preproc=yes
14576else
14577 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014578 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014579 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014580fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014581rm -f conftest.err conftest.$ac_ext
14582echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14583echo "${ECHO_T}$ac_header_preproc" >&6
14584
14585# So? What about this header?
14586case $ac_header_compiler:$ac_header_preproc in
14587 yes:no )
14588 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14589echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14590 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14591echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14592 no:yes )
14593 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14594echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14595 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14596echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14597 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14598echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14599esac
14600echo "$as_me:$LINENO: checking for wchar.h" >&5
14601echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14602if test "${ac_cv_header_wchar_h+set}" = set; then
14603 echo $ECHO_N "(cached) $ECHO_C" >&6
14604else
14605 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014606fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014607echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14608echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14609
14610fi
14611if test $ac_cv_header_wchar_h = yes; then
14612
14613
14614cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014615#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014616_ACEOF
14617
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014618 wchar_h="yes"
14619
Guido van Rossumef2255b2000-03-10 22:30:29 +000014620else
Martin v. Löwis11437992002-04-12 09:54:03 +000014621 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014622
14623fi
14624
Michael W. Hudson54241132001-12-07 15:38:26 +000014625
Martin v. Löwis11437992002-04-12 09:54:03 +000014626
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014627# determine wchar_t size
14628if test "$wchar_h" = yes
14629then
Martin v. Löwis11437992002-04-12 09:54:03 +000014630 echo "$as_me:$LINENO: checking for wchar_t" >&5
14631echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14632if test "${ac_cv_type_wchar_t+set}" = set; then
14633 echo $ECHO_N "(cached) $ECHO_C" >&6
14634else
14635 cat >conftest.$ac_ext <<_ACEOF
14636#line $LINENO "configure"
14637#include "confdefs.h"
14638#include <wchar.h>
14639
14640#ifdef F77_DUMMY_MAIN
14641# ifdef __cplusplus
14642 extern "C"
14643# endif
14644 int F77_DUMMY_MAIN() { return 1; }
14645#endif
14646int
14647main ()
14648{
14649if ((wchar_t *) 0)
14650 return 0;
14651if (sizeof (wchar_t))
14652 return 0;
14653 ;
14654 return 0;
14655}
14656_ACEOF
14657rm -f conftest.$ac_objext
14658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14659 (eval $ac_compile) 2>&5
14660 ac_status=$?
14661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14662 (exit $ac_status); } &&
14663 { ac_try='test -s conftest.$ac_objext'
14664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14665 (eval $ac_try) 2>&5
14666 ac_status=$?
14667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14668 (exit $ac_status); }; }; then
14669 ac_cv_type_wchar_t=yes
14670else
14671 echo "$as_me: failed program was:" >&5
14672cat conftest.$ac_ext >&5
14673ac_cv_type_wchar_t=no
14674fi
14675rm -f conftest.$ac_objext conftest.$ac_ext
14676fi
14677echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14678echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14679
14680echo "$as_me:$LINENO: checking size of wchar_t" >&5
14681echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14682if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14683 echo $ECHO_N "(cached) $ECHO_C" >&6
14684else
14685 if test "$ac_cv_type_wchar_t" = yes; then
14686 # The cast to unsigned long works around a bug in the HP C Compiler
14687 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14688 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14689 # This bug is HP SR number 8606223364.
14690 if test "$cross_compiling" = yes; then
14691 # Depending upon the size, compute the lo and hi bounds.
14692cat >conftest.$ac_ext <<_ACEOF
14693#line $LINENO "configure"
14694#include "confdefs.h"
14695#include <wchar.h>
14696
14697#ifdef F77_DUMMY_MAIN
14698# ifdef __cplusplus
14699 extern "C"
14700# endif
14701 int F77_DUMMY_MAIN() { return 1; }
14702#endif
14703int
14704main ()
14705{
14706static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14707test_array [0] = 0
14708
14709 ;
14710 return 0;
14711}
14712_ACEOF
14713rm -f conftest.$ac_objext
14714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14715 (eval $ac_compile) 2>&5
14716 ac_status=$?
14717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14718 (exit $ac_status); } &&
14719 { ac_try='test -s conftest.$ac_objext'
14720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14721 (eval $ac_try) 2>&5
14722 ac_status=$?
14723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14724 (exit $ac_status); }; }; then
14725 ac_lo=0 ac_mid=0
14726 while :; do
14727 cat >conftest.$ac_ext <<_ACEOF
14728#line $LINENO "configure"
14729#include "confdefs.h"
14730#include <wchar.h>
14731
14732#ifdef F77_DUMMY_MAIN
14733# ifdef __cplusplus
14734 extern "C"
14735# endif
14736 int F77_DUMMY_MAIN() { return 1; }
14737#endif
14738int
14739main ()
14740{
14741static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14742test_array [0] = 0
14743
14744 ;
14745 return 0;
14746}
14747_ACEOF
14748rm -f conftest.$ac_objext
14749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14750 (eval $ac_compile) 2>&5
14751 ac_status=$?
14752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14753 (exit $ac_status); } &&
14754 { ac_try='test -s conftest.$ac_objext'
14755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14756 (eval $ac_try) 2>&5
14757 ac_status=$?
14758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14759 (exit $ac_status); }; }; then
14760 ac_hi=$ac_mid; break
14761else
14762 echo "$as_me: failed program was:" >&5
14763cat conftest.$ac_ext >&5
14764ac_lo=`expr $ac_mid + 1`
14765 if test $ac_lo -le $ac_mid; then
14766 ac_lo= ac_hi=
14767 break
14768 fi
14769 ac_mid=`expr 2 '*' $ac_mid + 1`
14770fi
14771rm -f conftest.$ac_objext conftest.$ac_ext
14772 done
14773else
14774 echo "$as_me: failed program was:" >&5
14775cat conftest.$ac_ext >&5
14776cat >conftest.$ac_ext <<_ACEOF
14777#line $LINENO "configure"
14778#include "confdefs.h"
14779#include <wchar.h>
14780
14781#ifdef F77_DUMMY_MAIN
14782# ifdef __cplusplus
14783 extern "C"
14784# endif
14785 int F77_DUMMY_MAIN() { return 1; }
14786#endif
14787int
14788main ()
14789{
14790static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14791test_array [0] = 0
14792
14793 ;
14794 return 0;
14795}
14796_ACEOF
14797rm -f conftest.$ac_objext
14798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14799 (eval $ac_compile) 2>&5
14800 ac_status=$?
14801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802 (exit $ac_status); } &&
14803 { ac_try='test -s conftest.$ac_objext'
14804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14805 (eval $ac_try) 2>&5
14806 ac_status=$?
14807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14808 (exit $ac_status); }; }; then
14809 ac_hi=-1 ac_mid=-1
14810 while :; do
14811 cat >conftest.$ac_ext <<_ACEOF
14812#line $LINENO "configure"
14813#include "confdefs.h"
14814#include <wchar.h>
14815
14816#ifdef F77_DUMMY_MAIN
14817# ifdef __cplusplus
14818 extern "C"
14819# endif
14820 int F77_DUMMY_MAIN() { return 1; }
14821#endif
14822int
14823main ()
14824{
14825static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14826test_array [0] = 0
14827
14828 ;
14829 return 0;
14830}
14831_ACEOF
14832rm -f conftest.$ac_objext
14833if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14834 (eval $ac_compile) 2>&5
14835 ac_status=$?
14836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14837 (exit $ac_status); } &&
14838 { ac_try='test -s conftest.$ac_objext'
14839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14840 (eval $ac_try) 2>&5
14841 ac_status=$?
14842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14843 (exit $ac_status); }; }; then
14844 ac_lo=$ac_mid; break
14845else
14846 echo "$as_me: failed program was:" >&5
14847cat conftest.$ac_ext >&5
14848ac_hi=`expr '(' $ac_mid ')' - 1`
14849 if test $ac_mid -le $ac_hi; then
14850 ac_lo= ac_hi=
14851 break
14852 fi
14853 ac_mid=`expr 2 '*' $ac_mid`
14854fi
14855rm -f conftest.$ac_objext conftest.$ac_ext
14856 done
14857else
14858 echo "$as_me: failed program was:" >&5
14859cat conftest.$ac_ext >&5
14860ac_lo= ac_hi=
14861fi
14862rm -f conftest.$ac_objext conftest.$ac_ext
14863fi
14864rm -f conftest.$ac_objext conftest.$ac_ext
14865# Binary search between lo and hi bounds.
14866while test "x$ac_lo" != "x$ac_hi"; do
14867 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14868 cat >conftest.$ac_ext <<_ACEOF
14869#line $LINENO "configure"
14870#include "confdefs.h"
14871#include <wchar.h>
14872
14873#ifdef F77_DUMMY_MAIN
14874# ifdef __cplusplus
14875 extern "C"
14876# endif
14877 int F77_DUMMY_MAIN() { return 1; }
14878#endif
14879int
14880main ()
14881{
14882static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14883test_array [0] = 0
14884
14885 ;
14886 return 0;
14887}
14888_ACEOF
14889rm -f conftest.$ac_objext
14890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14891 (eval $ac_compile) 2>&5
14892 ac_status=$?
14893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14894 (exit $ac_status); } &&
14895 { ac_try='test -s conftest.$ac_objext'
14896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14897 (eval $ac_try) 2>&5
14898 ac_status=$?
14899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14900 (exit $ac_status); }; }; then
14901 ac_hi=$ac_mid
14902else
14903 echo "$as_me: failed program was:" >&5
14904cat conftest.$ac_ext >&5
14905ac_lo=`expr '(' $ac_mid ')' + 1`
14906fi
14907rm -f conftest.$ac_objext conftest.$ac_ext
14908done
14909case $ac_lo in
14910?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14911'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14912echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14913 { (exit 1); exit 1; }; } ;;
14914esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014915else
14916 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014917 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14918echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14919 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014920else
Martin v. Löwis11437992002-04-12 09:54:03 +000014921 cat >conftest.$ac_ext <<_ACEOF
14922#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014923#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014924#include <wchar.h>
14925
14926long longval () { return (long) (sizeof (wchar_t)); }
14927unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014928#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014929#include <stdlib.h>
14930#ifdef F77_DUMMY_MAIN
14931# ifdef __cplusplus
14932 extern "C"
14933# endif
14934 int F77_DUMMY_MAIN() { return 1; }
14935#endif
14936int
14937main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014938{
Martin v. Löwis11437992002-04-12 09:54:03 +000014939
14940 FILE *f = fopen ("conftest.val", "w");
14941 if (! f)
14942 exit (1);
14943 if (((long) (sizeof (wchar_t))) < 0)
14944 {
14945 long i = longval ();
14946 if (i != ((long) (sizeof (wchar_t))))
14947 exit (1);
14948 fprintf (f, "%ld\n", i);
14949 }
14950 else
14951 {
14952 unsigned long i = ulongval ();
14953 if (i != ((long) (sizeof (wchar_t))))
14954 exit (1);
14955 fprintf (f, "%lu\n", i);
14956 }
14957 exit (ferror (f) || fclose (f) != 0);
14958
14959 ;
14960 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014961}
Martin v. Löwis11437992002-04-12 09:54:03 +000014962_ACEOF
14963rm -f conftest$ac_exeext
14964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14965 (eval $ac_link) 2>&5
14966 ac_status=$?
14967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14968 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14970 (eval $ac_try) 2>&5
14971 ac_status=$?
14972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14973 (exit $ac_status); }; }; then
14974 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014975else
Martin v. Löwis11437992002-04-12 09:54:03 +000014976 echo "$as_me: program exited with status $ac_status" >&5
14977echo "$as_me: failed program was:" >&5
14978cat conftest.$ac_ext >&5
14979( exit $ac_status )
14980{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14981echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14982 { (exit 1); exit 1; }; }
14983fi
14984rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14985fi
14986fi
14987rm -f conftest.val
14988else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014989 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000014990fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014991fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014992echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
14993echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
14994cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014995#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014996_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014997
Michael W. Hudson54241132001-12-07 15:38:26 +000014998
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014999fi
15000
Martin v. Löwis11437992002-04-12 09:54:03 +000015001echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15002echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015003# Check whether --enable-unicode or --disable-unicode was given.
15004if test "${enable_unicode+set}" = set; then
15005 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015006
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015007else
15008 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015009fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015010
15011if test $enable_unicode = yes
15012then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015013 # Without any arguments, Py_UNICODE defaults to two-byte mode
15014 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015015fi
15016
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015017
15018
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015019case "$enable_unicode" in
15020ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015022#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015023_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015024
15025 ;;
15026ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015028#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015029_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015030
15031 ;;
15032esac
15033
Michael W. Hudson54241132001-12-07 15:38:26 +000015034
Martin v. Löwis11437992002-04-12 09:54:03 +000015035
15036
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015037
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015038if test "$enable_unicode" = "no"
15039then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015040 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015041 echo "$as_me:$LINENO: result: not used" >&5
15042echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015043else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015044 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015045
15046cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015047#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015048_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015049
15050 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15051 then
15052 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015053
Martin v. Löwis11437992002-04-12 09:54:03 +000015054cat >>confdefs.h <<\_ACEOF
15055#define HAVE_USABLE_WCHAR_T 1
15056_ACEOF
15057
15058 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015059#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015060_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015061
15062 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15063 then
15064 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015065 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015066#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015067_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015068
15069 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15070 then
15071 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015072 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015073#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015074_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015075
15076 else
15077 PY_UNICODE_TYPE="no type found"
15078 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015079 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15080echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015081fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015082
15083# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015084echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15085echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15086if test "${ac_cv_c_bigendian+set}" = set; then
15087 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015088else
Martin v. Löwis11437992002-04-12 09:54:03 +000015089 # See if sys/param.h defines the BYTE_ORDER macro.
15090cat >conftest.$ac_ext <<_ACEOF
15091#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015092#include "confdefs.h"
15093#include <sys/types.h>
15094#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015095
Martin v. Löwis11437992002-04-12 09:54:03 +000015096#ifdef F77_DUMMY_MAIN
15097# ifdef __cplusplus
15098 extern "C"
15099# endif
15100 int F77_DUMMY_MAIN() { return 1; }
15101#endif
15102int
15103main ()
15104{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015105#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15106 bogus endian macros
15107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015108
15109 ;
15110 return 0;
15111}
15112_ACEOF
15113rm -f conftest.$ac_objext
15114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15115 (eval $ac_compile) 2>&5
15116 ac_status=$?
15117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15118 (exit $ac_status); } &&
15119 { ac_try='test -s conftest.$ac_objext'
15120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15121 (eval $ac_try) 2>&5
15122 ac_status=$?
15123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15124 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015125 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015126cat >conftest.$ac_ext <<_ACEOF
15127#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015128#include "confdefs.h"
15129#include <sys/types.h>
15130#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015131
Martin v. Löwis11437992002-04-12 09:54:03 +000015132#ifdef F77_DUMMY_MAIN
15133# ifdef __cplusplus
15134 extern "C"
15135# endif
15136 int F77_DUMMY_MAIN() { return 1; }
15137#endif
15138int
15139main ()
15140{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015141#if BYTE_ORDER != BIG_ENDIAN
15142 not big endian
15143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015144
15145 ;
15146 return 0;
15147}
15148_ACEOF
15149rm -f conftest.$ac_objext
15150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15151 (eval $ac_compile) 2>&5
15152 ac_status=$?
15153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15154 (exit $ac_status); } &&
15155 { ac_try='test -s conftest.$ac_objext'
15156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15157 (eval $ac_try) 2>&5
15158 ac_status=$?
15159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15160 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015161 ac_cv_c_bigendian=yes
15162else
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 echo "$as_me: failed program was:" >&5
15164cat conftest.$ac_ext >&5
15165ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015166fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015167rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015168else
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 echo "$as_me: failed program was:" >&5
15170cat conftest.$ac_ext >&5
15171# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015172if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 # try to guess the endianess by grep'ing values into an object file
15174 ac_cv_c_bigendian=unknown
15175 cat >conftest.$ac_ext <<_ACEOF
15176#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015177#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015178short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15179short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15180void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15181short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15182short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15183void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15184#ifdef F77_DUMMY_MAIN
15185# ifdef __cplusplus
15186 extern "C"
15187# endif
15188 int F77_DUMMY_MAIN() { return 1; }
15189#endif
15190int
15191main ()
15192{
15193 _ascii (); _ebcdic ();
15194 ;
15195 return 0;
15196}
15197_ACEOF
15198rm -f conftest.$ac_objext
15199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15200 (eval $ac_compile) 2>&5
15201 ac_status=$?
15202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15203 (exit $ac_status); } &&
15204 { ac_try='test -s conftest.$ac_objext'
15205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15206 (eval $ac_try) 2>&5
15207 ac_status=$?
15208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15209 (exit $ac_status); }; }; then
15210 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15211 ac_cv_c_bigendian=yes
15212fi
15213if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15214 if test "$ac_cv_c_bigendian" = unknown; then
15215 ac_cv_c_bigendian=no
15216 else
15217 # finding both strings is unlikely to happen, but who knows?
15218 ac_cv_c_bigendian=unknown
15219 fi
15220fi
15221else
15222 echo "$as_me: failed program was:" >&5
15223cat conftest.$ac_ext >&5
15224fi
15225rm -f conftest.$ac_objext conftest.$ac_ext
15226else
15227 cat >conftest.$ac_ext <<_ACEOF
15228#line $LINENO "configure"
15229#include "confdefs.h"
15230int
15231main ()
15232{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015233 /* Are we little or big endian? From Harbison&Steele. */
15234 union
15235 {
15236 long l;
15237 char c[sizeof (long)];
15238 } u;
15239 u.l = 1;
15240 exit (u.c[sizeof (long) - 1] == 1);
15241}
Martin v. Löwis11437992002-04-12 09:54:03 +000015242_ACEOF
15243rm -f conftest$ac_exeext
15244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15245 (eval $ac_link) 2>&5
15246 ac_status=$?
15247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15248 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15250 (eval $ac_try) 2>&5
15251 ac_status=$?
15252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15253 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015254 ac_cv_c_bigendian=no
15255else
Martin v. Löwis11437992002-04-12 09:54:03 +000015256 echo "$as_me: program exited with status $ac_status" >&5
15257echo "$as_me: failed program was:" >&5
15258cat conftest.$ac_ext >&5
15259( exit $ac_status )
15260ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015261fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015262rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015263fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015264fi
15265rm -f conftest.$ac_objext conftest.$ac_ext
15266fi
15267echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15268echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15269case $ac_cv_c_bigendian in
15270 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015271
Martin v. Löwis11437992002-04-12 09:54:03 +000015272cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015273#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015274_ACEOF
15275 ;;
15276 no)
15277 ;;
15278 *)
15279 { { echo "$as_me:$LINENO: error: unknown endianess
15280presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15281echo "$as_me: error: unknown endianess
15282presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15283 { (exit 1); exit 1; }; } ;;
15284esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015285
Michael W. Hudson54241132001-12-07 15:38:26 +000015286
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015287# Check whether right shifting a negative integer extends the sign bit
15288# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015289echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15290echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15291if test "${ac_cv_rshift_extends_sign+set}" = set; then
15292 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015293else
Martin v. Löwis11437992002-04-12 09:54:03 +000015294
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015295if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015296 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015297else
Martin v. Löwis11437992002-04-12 09:54:03 +000015298 cat >conftest.$ac_ext <<_ACEOF
15299#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015300#include "confdefs.h"
15301
15302int main()
15303{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015304 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015305}
15306
Martin v. Löwis11437992002-04-12 09:54:03 +000015307_ACEOF
15308rm -f conftest$ac_exeext
15309if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15310 (eval $ac_link) 2>&5
15311 ac_status=$?
15312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15313 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15315 (eval $ac_try) 2>&5
15316 ac_status=$?
15317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15318 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015319 ac_cv_rshift_extends_sign=yes
15320else
Martin v. Löwis11437992002-04-12 09:54:03 +000015321 echo "$as_me: program exited with status $ac_status" >&5
15322echo "$as_me: failed program was:" >&5
15323cat conftest.$ac_ext >&5
15324( exit $ac_status )
15325ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015326fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015327rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15328fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015329fi
15330
Martin v. Löwis11437992002-04-12 09:54:03 +000015331echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15332echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015333if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015334then
Martin v. Löwis11437992002-04-12 09:54:03 +000015335
15336cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015337#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015338_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015339
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015340fi
15341
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015342# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015343echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15344echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15345if test "${ac_cv_have_getc_unlocked+set}" = set; then
15346 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015347else
Martin v. Löwis11437992002-04-12 09:54:03 +000015348
15349cat >conftest.$ac_ext <<_ACEOF
15350#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015351#include "confdefs.h"
15352#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015353#ifdef F77_DUMMY_MAIN
15354# ifdef __cplusplus
15355 extern "C"
15356# endif
15357 int F77_DUMMY_MAIN() { return 1; }
15358#endif
15359int
15360main ()
15361{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015362
15363 FILE *f = fopen("/dev/null", "r");
15364 flockfile(f);
15365 getc_unlocked(f);
15366 funlockfile(f);
15367
Martin v. Löwis11437992002-04-12 09:54:03 +000015368 ;
15369 return 0;
15370}
15371_ACEOF
15372rm -f conftest.$ac_objext conftest$ac_exeext
15373if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15374 (eval $ac_link) 2>&5
15375 ac_status=$?
15376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15377 (exit $ac_status); } &&
15378 { ac_try='test -s conftest$ac_exeext'
15379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15380 (eval $ac_try) 2>&5
15381 ac_status=$?
15382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15383 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015384 ac_cv_have_getc_unlocked=yes
15385else
Martin v. Löwis11437992002-04-12 09:54:03 +000015386 echo "$as_me: failed program was:" >&5
15387cat conftest.$ac_ext >&5
15388ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015389fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015390rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015391fi
15392
Martin v. Löwis11437992002-04-12 09:54:03 +000015393echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15394echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015395if test "$ac_cv_have_getc_unlocked" = yes
15396then
Martin v. Löwis11437992002-04-12 09:54:03 +000015397
15398cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015399#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015400_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015401
15402fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015403
Martin v. Löwis0daad592001-09-30 21:09:59 +000015404# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015405echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15406echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15407if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15408 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015409else
Martin v. Löwis11437992002-04-12 09:54:03 +000015410 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015411LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015412cat >conftest.$ac_ext <<_ACEOF
15413#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015414#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015415
Guido van Rossum353ae582001-07-10 16:45:32 +000015416/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015417#ifdef __cplusplus
15418extern "C"
15419#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015420/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015421 builtin and then its argument prototype would still apply. */
15422char rl_pre_input_hook ();
15423#ifdef F77_DUMMY_MAIN
15424# ifdef __cplusplus
15425 extern "C"
15426# endif
15427 int F77_DUMMY_MAIN() { return 1; }
15428#endif
15429int
15430main ()
15431{
15432rl_pre_input_hook ();
15433 ;
15434 return 0;
15435}
15436_ACEOF
15437rm -f conftest.$ac_objext conftest$ac_exeext
15438if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15439 (eval $ac_link) 2>&5
15440 ac_status=$?
15441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15442 (exit $ac_status); } &&
15443 { ac_try='test -s conftest$ac_exeext'
15444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15445 (eval $ac_try) 2>&5
15446 ac_status=$?
15447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15448 (exit $ac_status); }; }; then
15449 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015450else
Martin v. Löwis11437992002-04-12 09:54:03 +000015451 echo "$as_me: failed program was:" >&5
15452cat conftest.$ac_ext >&5
15453ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015454fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015455rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15456LIBS=$ac_check_lib_save_LIBS
15457fi
15458echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15459echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15460if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015461
Martin v. Löwis11437992002-04-12 09:54:03 +000015462cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015463#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015464_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015465
Martin v. Löwis0daad592001-09-30 21:09:59 +000015466fi
15467
Michael W. Hudson54241132001-12-07 15:38:26 +000015468
Martin v. Löwis0daad592001-09-30 21:09:59 +000015469# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015470echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15471echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15472if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15473 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015474else
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015476LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015477cat >conftest.$ac_ext <<_ACEOF
15478#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015479#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015480
Martin v. Löwis0daad592001-09-30 21:09:59 +000015481/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015482#ifdef __cplusplus
15483extern "C"
15484#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015485/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 builtin and then its argument prototype would still apply. */
15487char rl_completion_matches ();
15488#ifdef F77_DUMMY_MAIN
15489# ifdef __cplusplus
15490 extern "C"
15491# endif
15492 int F77_DUMMY_MAIN() { return 1; }
15493#endif
15494int
15495main ()
15496{
15497rl_completion_matches ();
15498 ;
15499 return 0;
15500}
15501_ACEOF
15502rm -f conftest.$ac_objext conftest$ac_exeext
15503if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15504 (eval $ac_link) 2>&5
15505 ac_status=$?
15506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15507 (exit $ac_status); } &&
15508 { ac_try='test -s conftest$ac_exeext'
15509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15510 (eval $ac_try) 2>&5
15511 ac_status=$?
15512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513 (exit $ac_status); }; }; then
15514 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015515else
Martin v. Löwis11437992002-04-12 09:54:03 +000015516 echo "$as_me: failed program was:" >&5
15517cat conftest.$ac_ext >&5
15518ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015519fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15521LIBS=$ac_check_lib_save_LIBS
15522fi
15523echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15524echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15525if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015526
Martin v. Löwis11437992002-04-12 09:54:03 +000015527cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015528#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015529_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015530
Guido van Rossum353ae582001-07-10 16:45:32 +000015531fi
15532
Jack Jansendd19cf82001-12-06 22:36:17 +000015533
Martin v. Löwis11437992002-04-12 09:54:03 +000015534echo "$as_me:$LINENO: checking for broken nice()" >&5
15535echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15536if test "${ac_cv_broken_nice+set}" = set; then
15537 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015538else
Martin v. Löwis11437992002-04-12 09:54:03 +000015539
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015540if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015541 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015542else
Martin v. Löwis11437992002-04-12 09:54:03 +000015543 cat >conftest.$ac_ext <<_ACEOF
15544#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015545#include "confdefs.h"
15546
15547int main()
15548{
15549 int val1 = nice(1);
15550 if (val1 != -1 && val1 == nice(2))
15551 exit(0);
15552 exit(1);
15553}
15554
Martin v. Löwis11437992002-04-12 09:54:03 +000015555_ACEOF
15556rm -f conftest$ac_exeext
15557if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15558 (eval $ac_link) 2>&5
15559 ac_status=$?
15560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15561 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15563 (eval $ac_try) 2>&5
15564 ac_status=$?
15565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15566 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015567 ac_cv_broken_nice=yes
15568else
Martin v. Löwis11437992002-04-12 09:54:03 +000015569 echo "$as_me: program exited with status $ac_status" >&5
15570echo "$as_me: failed program was:" >&5
15571cat conftest.$ac_ext >&5
15572( exit $ac_status )
15573ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015574fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015575rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15576fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015577fi
15578
Martin v. Löwis11437992002-04-12 09:54:03 +000015579echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15580echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015581if test "$ac_cv_broken_nice" = yes
15582then
Martin v. Löwis11437992002-04-12 09:54:03 +000015583
15584cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015585#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015586_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015587
15588fi
15589
Jack Jansen666b1e72001-10-31 12:11:48 +000015590# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015591echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15592echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15593if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15594 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015595else
Martin v. Löwis11437992002-04-12 09:54:03 +000015596 cat >conftest.$ac_ext <<_ACEOF
15597#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015598#include "confdefs.h"
15599#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015600#ifdef F77_DUMMY_MAIN
15601# ifdef __cplusplus
15602 extern "C"
15603# endif
15604 int F77_DUMMY_MAIN() { return 1; }
15605#endif
15606int
15607main ()
15608{
Jack Jansen666b1e72001-10-31 12:11:48 +000015609
15610 int rtn;
15611 rtn = mvwdelch(0,0,0);
15612
Martin v. Löwis11437992002-04-12 09:54:03 +000015613 ;
15614 return 0;
15615}
15616_ACEOF
15617rm -f conftest.$ac_objext
15618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15619 (eval $ac_compile) 2>&5
15620 ac_status=$?
15621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15622 (exit $ac_status); } &&
15623 { ac_try='test -s conftest.$ac_objext'
15624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15625 (eval $ac_try) 2>&5
15626 ac_status=$?
15627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15628 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015629 ac_cv_mvwdelch_is_expression=yes
15630else
Martin v. Löwis11437992002-04-12 09:54:03 +000015631 echo "$as_me: failed program was:" >&5
15632cat conftest.$ac_ext >&5
15633ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015634fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015635rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015636fi
15637
Martin v. Löwis11437992002-04-12 09:54:03 +000015638echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15639echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015640
15641if test "$ac_cv_mvwdelch_is_expression" = yes
15642then
Martin v. Löwis11437992002-04-12 09:54:03 +000015643
15644cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015645#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015646_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015647
15648fi
15649
Martin v. Löwis11437992002-04-12 09:54:03 +000015650echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15651echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15652if test "${ac_cv_window_has_flags+set}" = set; then
15653 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015654else
Martin v. Löwis11437992002-04-12 09:54:03 +000015655 cat >conftest.$ac_ext <<_ACEOF
15656#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015657#include "confdefs.h"
15658#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015659#ifdef F77_DUMMY_MAIN
15660# ifdef __cplusplus
15661 extern "C"
15662# endif
15663 int F77_DUMMY_MAIN() { return 1; }
15664#endif
15665int
15666main ()
15667{
Jack Jansen666b1e72001-10-31 12:11:48 +000015668
15669 WINDOW *w;
15670 w->_flags = 0;
15671
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 ;
15673 return 0;
15674}
15675_ACEOF
15676rm -f conftest.$ac_objext
15677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15678 (eval $ac_compile) 2>&5
15679 ac_status=$?
15680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15681 (exit $ac_status); } &&
15682 { ac_try='test -s conftest.$ac_objext'
15683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15684 (eval $ac_try) 2>&5
15685 ac_status=$?
15686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15687 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015688 ac_cv_window_has_flags=yes
15689else
Martin v. Löwis11437992002-04-12 09:54:03 +000015690 echo "$as_me: failed program was:" >&5
15691cat conftest.$ac_ext >&5
15692ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015693fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015694rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015695fi
15696
Martin v. Löwis11437992002-04-12 09:54:03 +000015697echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15698echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015699
Jack Jansen666b1e72001-10-31 12:11:48 +000015700
15701if test "$ac_cv_window_has_flags" = yes
15702then
Martin v. Löwis11437992002-04-12 09:54:03 +000015703
15704cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015705#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015706_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015707
15708fi
15709
Guido van Rossum95713eb2000-05-18 20:53:31 +000015710# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15711# Add sys/socket.h to confdefs.h
15712cat >> confdefs.h <<\EOF
15713#ifdef HAVE_SYS_SOCKET_H
15714#include <sys/socket.h>
15715#endif
15716EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015717echo "$as_me:$LINENO: checking for socklen_t" >&5
15718echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15719if test "${ac_cv_type_socklen_t+set}" = set; then
15720 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015721else
Martin v. Löwis11437992002-04-12 09:54:03 +000015722 cat >conftest.$ac_ext <<_ACEOF
15723#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015724#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015725$ac_includes_default
15726#ifdef F77_DUMMY_MAIN
15727# ifdef __cplusplus
15728 extern "C"
15729# endif
15730 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015732int
15733main ()
15734{
15735if ((socklen_t *) 0)
15736 return 0;
15737if (sizeof (socklen_t))
15738 return 0;
15739 ;
15740 return 0;
15741}
15742_ACEOF
15743rm -f conftest.$ac_objext
15744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15745 (eval $ac_compile) 2>&5
15746 ac_status=$?
15747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15748 (exit $ac_status); } &&
15749 { ac_try='test -s conftest.$ac_objext'
15750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15751 (eval $ac_try) 2>&5
15752 ac_status=$?
15753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15754 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015755 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015756else
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 echo "$as_me: failed program was:" >&5
15758cat conftest.$ac_ext >&5
15759ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015760fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015761rm -f conftest.$ac_objext conftest.$ac_ext
15762fi
15763echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15764echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15765if test $ac_cv_type_socklen_t = yes; then
15766 :
15767else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015768
Martin v. Löwis11437992002-04-12 09:54:03 +000015769cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015770#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015771_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015772
15773fi
15774
Michael W. Hudson54241132001-12-07 15:38:26 +000015775
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015776#AC_MSG_CHECKING(for Modules/Setup)
15777#if test ! -f Modules/Setup ; then
15778# if test ! -d Modules ; then
15779# mkdir Modules
15780# fi
15781# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15782# AC_MSG_RESULT(creating)
15783#else
15784# AC_MSG_RESULT(already exists)
15785#fi
15786
Michael W. Hudson54241132001-12-07 15:38:26 +000015787
15788
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015789for h in `(cd $srcdir;echo Python/thread_*.h)`
15790do
15791 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15792done
15793
Michael W. Hudson54241132001-12-07 15:38:26 +000015794
Jack Jansen0b06be72002-06-21 14:48:38 +000015795SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000015796echo "$as_me:$LINENO: checking for build directories" >&5
15797echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015798for dir in $SRCDIRS; do
15799 if test ! -d $dir; then
15800 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015801 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015802done
Martin v. Löwis11437992002-04-12 09:54:03 +000015803echo "$as_me:$LINENO: result: done" >&5
15804echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015805
Guido van Rossum627b2d71993-12-24 10:39:16 +000015806# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015807ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15808cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015809# This file is a shell script that caches the results of configure
15810# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015811# scripts and configure runs, see configure's option --config-cache.
15812# It is not useful on other systems. If it contains results you don't
15813# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015814#
Martin v. Löwis11437992002-04-12 09:54:03 +000015815# config.status only pays attention to the cache file if you give it
15816# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015817#
Martin v. Löwis11437992002-04-12 09:54:03 +000015818# `ac_cv_env_foo' variables (set or unset) will be overriden when
15819# loading this file, other *unset* `ac_cv_foo' will be assigned the
15820# following values.
15821
15822_ACEOF
15823
Guido van Rossumf78abae1997-01-21 22:02:36 +000015824# The following way of writing the cache mishandles newlines in values,
15825# but we know of no workaround that is simple, portable, and efficient.
15826# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015827# Ultrix sh set writes to stderr and can't be redirected directly,
15828# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015829{
15830 (set) 2>&1 |
15831 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15832 *ac_space=\ *)
15833 # `set' does not quote correctly, so add quotes (double-quote
15834 # substitution turns \\\\ into \\, and sed turns \\ into \).
15835 sed -n \
15836 "s/'/'\\\\''/g;
15837 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15838 ;;
15839 *)
15840 # `set' quotes correctly as required by POSIX, so do not add quotes.
15841 sed -n \
15842 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15843 ;;
15844 esac;
15845} |
15846 sed '
15847 t clear
15848 : clear
15849 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15850 t end
15851 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15852 : end' >>confcache
15853if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015854 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15856 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015857 else
15858 echo "not updating unwritable cache $cache_file"
15859 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015860fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015861rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015862
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015863test "x$prefix" = xNONE && prefix=$ac_default_prefix
15864# Let make expand exec_prefix.
15865test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015866
Martin v. Löwis11437992002-04-12 09:54:03 +000015867# VPATH may cause trouble with some makes, so we remove $(srcdir),
15868# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15869# trailing colons and then remove the whole line if VPATH becomes empty
15870# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015871if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015872 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15873s/:*\$(srcdir):*/:/;
15874s/:*\${srcdir}:*/:/;
15875s/:*@srcdir@:*/:/;
15876s/^\([^=]*=[ ]*\):*/\1/;
15877s/:*$//;
15878s/^[^=]*=[ ]*$//;
15879}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015880fi
15881
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015882DEFS=-DHAVE_CONFIG_H
15883
Martin v. Löwis11437992002-04-12 09:54:03 +000015884
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015885: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015886ac_clean_files_save=$ac_clean_files
15887ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15888{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15889echo "$as_me: creating $CONFIG_STATUS" >&6;}
15890cat >$CONFIG_STATUS <<_ACEOF
15891#! $SHELL
15892# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015893# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015894# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015895# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015896
Martin v. Löwis11437992002-04-12 09:54:03 +000015897debug=false
15898SHELL=\${CONFIG_SHELL-$SHELL}
15899_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015900
Martin v. Löwis11437992002-04-12 09:54:03 +000015901cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015902
Martin v. Löwis11437992002-04-12 09:54:03 +000015903## --------------------- ##
15904## M4sh Initialization. ##
15905## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015906
Martin v. Löwis11437992002-04-12 09:54:03 +000015907# Be Bourne compatible
15908if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15909 emulate sh
15910 NULLCMD=:
15911elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15912 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015913fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015914
Martin v. Löwis11437992002-04-12 09:54:03 +000015915# NLS nuisances.
15916# Support unset when possible.
15917if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15918 as_unset=unset
15919else
15920 as_unset=false
15921fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015922
Martin v. Löwis11437992002-04-12 09:54:03 +000015923(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15924 { $as_unset LANG || test "${LANG+set}" != set; } ||
15925 { LANG=C; export LANG; }
15926(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15927 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15928 { LC_ALL=C; export LC_ALL; }
15929(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15930 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15931 { LC_TIME=C; export LC_TIME; }
15932(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15933 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15934 { LC_CTYPE=C; export LC_CTYPE; }
15935(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15936 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15937 { LANGUAGE=C; export LANGUAGE; }
15938(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15939 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15940 { LC_COLLATE=C; export LC_COLLATE; }
15941(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15942 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15943 { LC_NUMERIC=C; export LC_NUMERIC; }
15944(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15945 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15946 { LC_MESSAGES=C; export LC_MESSAGES; }
15947
15948
15949# Name of the executable.
15950as_me=`(basename "$0") 2>/dev/null ||
15951$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15952 X"$0" : 'X\(//\)$' \| \
15953 X"$0" : 'X\(/\)$' \| \
15954 . : '\(.\)' 2>/dev/null ||
15955echo X/"$0" |
15956 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15957 /^X\/\(\/\/\)$/{ s//\1/; q; }
15958 /^X\/\(\/\).*/{ s//\1/; q; }
15959 s/.*/./; q'`
15960
15961# PATH needs CR, and LINENO needs CR and PATH.
15962# Avoid depending upon Character Ranges.
15963as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15964as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15965as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15966as_cr_digits='0123456789'
15967as_cr_alnum=$as_cr_Letters$as_cr_digits
15968
15969# The user is always right.
15970if test "${PATH_SEPARATOR+set}" != set; then
15971 echo "#! /bin/sh" >conftest.sh
15972 echo "exit 0" >>conftest.sh
15973 chmod +x conftest.sh
15974 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15975 PATH_SEPARATOR=';'
15976 else
15977 PATH_SEPARATOR=:
15978 fi
15979 rm -f conftest.sh
15980fi
15981
15982
15983 as_lineno_1=$LINENO
15984 as_lineno_2=$LINENO
15985 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15986 test "x$as_lineno_1" != "x$as_lineno_2" &&
15987 test "x$as_lineno_3" = "x$as_lineno_2" || {
15988 # Find who we are. Look in the path if we contain no path at all
15989 # relative or not.
15990 case $0 in
15991 *[\\/]* ) as_myself=$0 ;;
15992 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15993for as_dir in $PATH
15994do
15995 IFS=$as_save_IFS
15996 test -z "$as_dir" && as_dir=.
15997 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15998done
15999
16000 ;;
16001 esac
16002 # We did not find ourselves, most probably we were run as `sh COMMAND'
16003 # in which case we are not to be found in the path.
16004 if test "x$as_myself" = x; then
16005 as_myself=$0
16006 fi
16007 if test ! -f "$as_myself"; then
16008 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16009echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16010 { (exit 1); exit 1; }; }
16011 fi
16012 case $CONFIG_SHELL in
16013 '')
16014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16015for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16016do
16017 IFS=$as_save_IFS
16018 test -z "$as_dir" && as_dir=.
16019 for as_base in sh bash ksh sh5; do
16020 case $as_dir in
16021 /*)
16022 if ("$as_dir/$as_base" -c '
16023 as_lineno_1=$LINENO
16024 as_lineno_2=$LINENO
16025 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16026 test "x$as_lineno_1" != "x$as_lineno_2" &&
16027 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16028 CONFIG_SHELL=$as_dir/$as_base
16029 export CONFIG_SHELL
16030 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16031 fi;;
16032 esac
16033 done
16034done
16035;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016036 esac
16037
Martin v. Löwis11437992002-04-12 09:54:03 +000016038 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16039 # uniformly replaced by the line number. The first 'sed' inserts a
16040 # line-number line before each line; the second 'sed' does the real
16041 # work. The second script uses 'N' to pair each line-number line
16042 # with the numbered line, and appends trailing '-' during
16043 # substitution so that $LINENO is not a special case at line end.
16044 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16045 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16046 sed '=' <$as_myself |
16047 sed '
16048 N
16049 s,$,-,
16050 : loop
16051 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16052 t loop
16053 s,-$,,
16054 s,^['$as_cr_digits']*\n,,
16055 ' >$as_me.lineno &&
16056 chmod +x $as_me.lineno ||
16057 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16058echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16059 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016060
Martin v. Löwis11437992002-04-12 09:54:03 +000016061 # Don't try to exec as it changes $[0], causing all sort of problems
16062 # (the dirname of $[0] is not the place where we might find the
16063 # original and so on. Autoconf is especially sensible to this).
16064 . ./$as_me.lineno
16065 # Exit status is that of the last command.
16066 exit
16067}
16068
16069
16070case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16071 *c*,-n*) ECHO_N= ECHO_C='
16072' ECHO_T=' ' ;;
16073 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16074 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16075esac
16076
16077if expr a : '\(a\)' >/dev/null 2>&1; then
16078 as_expr=expr
16079else
16080 as_expr=false
16081fi
16082
16083rm -f conf$$ conf$$.exe conf$$.file
16084echo >conf$$.file
16085if ln -s conf$$.file conf$$ 2>/dev/null; then
16086 # We could just check for DJGPP; but this test a) works b) is more generic
16087 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16088 if test -f conf$$.exe; then
16089 # Don't use ln at all; we don't have any links
16090 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016091 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 as_ln_s='ln -s'
16093 fi
16094elif ln conf$$.file conf$$ 2>/dev/null; then
16095 as_ln_s=ln
16096else
16097 as_ln_s='cp -p'
16098fi
16099rm -f conf$$ conf$$.exe conf$$.file
16100
16101as_executable_p="test -f"
16102
16103# Sed expression to map a string onto a valid CPP name.
16104as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16105
16106# Sed expression to map a string onto a valid variable name.
16107as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16108
16109
16110# IFS
16111# We need space, tab and new line, in precisely that order.
16112as_nl='
16113'
16114IFS=" $as_nl"
16115
16116# CDPATH.
16117$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16118
16119exec 6>&1
16120
16121# Open the log real soon, to keep \$[0] and so on meaningful, and to
16122# report actual input values of CONFIG_FILES etc. instead of their
16123# values after options handling. Logging --version etc. is OK.
16124exec 5>>config.log
16125{
16126 echo
16127 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16128## Running $as_me. ##
16129_ASBOX
16130} >&5
16131cat >&5 <<_CSEOF
16132
16133This file was extended by $as_me, which was
16134generated by GNU Autoconf 2.53. Invocation command line was
16135
16136 CONFIG_FILES = $CONFIG_FILES
16137 CONFIG_HEADERS = $CONFIG_HEADERS
16138 CONFIG_LINKS = $CONFIG_LINKS
16139 CONFIG_COMMANDS = $CONFIG_COMMANDS
16140 $ $0 $@
16141
16142_CSEOF
16143echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16144echo >&5
16145_ACEOF
16146
16147# Files that config.status was made for.
16148if test -n "$ac_config_files"; then
16149 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16150fi
16151
16152if test -n "$ac_config_headers"; then
16153 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16154fi
16155
16156if test -n "$ac_config_links"; then
16157 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16158fi
16159
16160if test -n "$ac_config_commands"; then
16161 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16162fi
16163
16164cat >>$CONFIG_STATUS <<\_ACEOF
16165
16166ac_cs_usage="\
16167\`$as_me' instantiates files from templates according to the
16168current configuration.
16169
16170Usage: $0 [OPTIONS] [FILE]...
16171
16172 -h, --help print this help, then exit
16173 -V, --version print version number, then exit
16174 -d, --debug don't remove temporary files
16175 --recheck update $as_me by reconfiguring in the same conditions
16176 --file=FILE[:TEMPLATE]
16177 instantiate the configuration file FILE
16178 --header=FILE[:TEMPLATE]
16179 instantiate the configuration header FILE
16180
16181Configuration files:
16182$config_files
16183
16184Configuration headers:
16185$config_headers
16186
16187Report bugs to <bug-autoconf@gnu.org>."
16188_ACEOF
16189
16190cat >>$CONFIG_STATUS <<_ACEOF
16191ac_cs_version="\\
16192config.status
16193configured by $0, generated by GNU Autoconf 2.53,
16194 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16195
16196Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16197Free Software Foundation, Inc.
16198This config.status script is free software; the Free Software Foundation
16199gives unlimited permission to copy, distribute and modify it."
16200srcdir=$srcdir
16201INSTALL="$INSTALL"
16202_ACEOF
16203
16204cat >>$CONFIG_STATUS <<\_ACEOF
16205# If no file are specified by the user, then we need to provide default
16206# value. By we need to know if files were specified by the user.
16207ac_need_defaults=:
16208while test $# != 0
16209do
16210 case $1 in
16211 --*=*)
16212 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16213 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16214 shift
16215 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16216 shift
16217 ;;
16218 -*);;
16219 *) # This is not an option, so the user has probably given explicit
16220 # arguments.
16221 ac_need_defaults=false;;
16222 esac
16223
16224 case $1 in
16225 # Handling of the options.
16226_ACEOF
16227cat >>$CONFIG_STATUS <<_ACEOF
16228 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16229 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16230 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16231_ACEOF
16232cat >>$CONFIG_STATUS <<\_ACEOF
16233 --version | --vers* | -V )
16234 echo "$ac_cs_version"; exit 0 ;;
16235 --he | --h)
16236 # Conflict between --help and --header
16237 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16238Try \`$0 --help' for more information." >&5
16239echo "$as_me: error: ambiguous option: $1
16240Try \`$0 --help' for more information." >&2;}
16241 { (exit 1); exit 1; }; };;
16242 --help | --hel | -h )
16243 echo "$ac_cs_usage"; exit 0 ;;
16244 --debug | --d* | -d )
16245 debug=: ;;
16246 --file | --fil | --fi | --f )
16247 shift
16248 CONFIG_FILES="$CONFIG_FILES $1"
16249 ac_need_defaults=false;;
16250 --header | --heade | --head | --hea )
16251 shift
16252 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16253 ac_need_defaults=false;;
16254
16255 # This is an error.
16256 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16257Try \`$0 --help' for more information." >&5
16258echo "$as_me: error: unrecognized option: $1
16259Try \`$0 --help' for more information." >&2;}
16260 { (exit 1); exit 1; }; } ;;
16261
16262 *) ac_config_targets="$ac_config_targets $1" ;;
16263
16264 esac
16265 shift
16266done
16267
16268_ACEOF
16269
16270
16271
16272
16273
16274cat >>$CONFIG_STATUS <<\_ACEOF
16275for ac_config_target in $ac_config_targets
16276do
16277 case "$ac_config_target" in
16278 # Handling of arguments.
16279 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16280 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16281 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16282 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16283echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16284 { (exit 1); exit 1; }; };;
16285 esac
16286done
16287
16288# If the user did not use the arguments to specify the items to instantiate,
16289# then the envvar interface is used. Set only those that are not.
16290# We use the long form for the default assignment because of an extremely
16291# bizarre bug on SunOS 4.1.3.
16292if $ac_need_defaults; then
16293 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16294 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16295fi
16296
16297# Create a temporary directory, and hook for its removal unless debugging.
16298$debug ||
16299{
16300 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16301 trap '{ (exit 1); exit 1; }' 1 2 13 15
16302}
16303
16304# Create a (secure) tmp directory for tmp files.
16305: ${TMPDIR=/tmp}
16306{
16307 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16308 test -n "$tmp" && test -d "$tmp"
16309} ||
16310{
16311 tmp=$TMPDIR/cs$$-$RANDOM
16312 (umask 077 && mkdir $tmp)
16313} ||
16314{
16315 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16316 { (exit 1); exit 1; }
16317}
16318
16319_ACEOF
16320
16321cat >>$CONFIG_STATUS <<_ACEOF
16322
16323#
16324# CONFIG_FILES section.
16325#
16326
16327# No need to generate the scripts if there are no CONFIG_FILES.
16328# This happens for instance when ./config.status config.h
16329if test -n "\$CONFIG_FILES"; then
16330 # Protect against being on the right side of a sed subst in config.status.
16331 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16332 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16333s,@SHELL@,$SHELL,;t t
16334s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16335s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16336s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16337s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16338s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16339s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16340s,@exec_prefix@,$exec_prefix,;t t
16341s,@prefix@,$prefix,;t t
16342s,@program_transform_name@,$program_transform_name,;t t
16343s,@bindir@,$bindir,;t t
16344s,@sbindir@,$sbindir,;t t
16345s,@libexecdir@,$libexecdir,;t t
16346s,@datadir@,$datadir,;t t
16347s,@sysconfdir@,$sysconfdir,;t t
16348s,@sharedstatedir@,$sharedstatedir,;t t
16349s,@localstatedir@,$localstatedir,;t t
16350s,@libdir@,$libdir,;t t
16351s,@includedir@,$includedir,;t t
16352s,@oldincludedir@,$oldincludedir,;t t
16353s,@infodir@,$infodir,;t t
16354s,@mandir@,$mandir,;t t
16355s,@build_alias@,$build_alias,;t t
16356s,@host_alias@,$host_alias,;t t
16357s,@target_alias@,$target_alias,;t t
16358s,@DEFS@,$DEFS,;t t
16359s,@ECHO_C@,$ECHO_C,;t t
16360s,@ECHO_N@,$ECHO_N,;t t
16361s,@ECHO_T@,$ECHO_T,;t t
16362s,@LIBS@,$LIBS,;t t
16363s,@VERSION@,$VERSION,;t t
16364s,@SOVERSION@,$SOVERSION,;t t
16365s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16366s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16367s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16368s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16369s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16370s,@MACHDEP@,$MACHDEP,;t t
16371s,@SGI_ABI@,$SGI_ABI,;t t
16372s,@CXX@,$CXX,;t t
16373s,@MAINOBJ@,$MAINOBJ,;t t
16374s,@EXEEXT@,$EXEEXT,;t t
16375s,@CC@,$CC,;t t
16376s,@CFLAGS@,$CFLAGS,;t t
16377s,@LDFLAGS@,$LDFLAGS,;t t
16378s,@CPPFLAGS@,$CPPFLAGS,;t t
16379s,@ac_ct_CC@,$ac_ct_CC,;t t
16380s,@OBJEXT@,$OBJEXT,;t t
16381s,@CPP@,$CPP,;t t
16382s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16383s,@LIBRARY@,$LIBRARY,;t t
16384s,@LDLIBRARY@,$LDLIBRARY,;t t
16385s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16386s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16387s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16388s,@INSTSONAME@,$INSTSONAME,;t t
16389s,@RUNSHARED@,$RUNSHARED,;t t
16390s,@LINKCC@,$LINKCC,;t t
16391s,@RANLIB@,$RANLIB,;t t
16392s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16393s,@AR@,$AR,;t t
16394s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16395s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16396s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16397s,@LN@,$LN,;t t
16398s,@OPT@,$OPT,;t t
16399s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16400s,@SO@,$SO,;t t
16401s,@LDSHARED@,$LDSHARED,;t t
16402s,@BLDSHARED@,$BLDSHARED,;t t
16403s,@CCSHARED@,$CCSHARED,;t t
16404s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16405s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016406s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016407s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16408s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16409s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16410s,@LDLAST@,$LDLAST,;t t
16411s,@THREADOBJ@,$THREADOBJ,;t t
16412s,@DLINCLDIR@,$DLINCLDIR,;t t
16413s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16414s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16415s,@LIBOBJS@,$LIBOBJS,;t t
16416s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16417s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16418s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16419s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16420s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16421s,@LIBM@,$LIBM,;t t
16422s,@LIBC@,$LIBC,;t t
16423s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16424s,@THREADHEADERS@,$THREADHEADERS,;t t
16425s,@SRCDIRS@,$SRCDIRS,;t t
16426CEOF
16427
16428_ACEOF
16429
16430 cat >>$CONFIG_STATUS <<\_ACEOF
16431 # Split the substitutions into bite-sized pieces for seds with
16432 # small command number limits, like on Digital OSF/1 and HP-UX.
16433 ac_max_sed_lines=48
16434 ac_sed_frag=1 # Number of current file.
16435 ac_beg=1 # First line for current file.
16436 ac_end=$ac_max_sed_lines # Line after last line for current file.
16437 ac_more_lines=:
16438 ac_sed_cmds=
16439 while $ac_more_lines; do
16440 if test $ac_beg -gt 1; then
16441 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16442 else
16443 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16444 fi
16445 if test ! -s $tmp/subs.frag; then
16446 ac_more_lines=false
16447 else
16448 # The purpose of the label and of the branching condition is to
16449 # speed up the sed processing (if there are no `@' at all, there
16450 # is no need to browse any of the substitutions).
16451 # These are the two extra sed commands mentioned above.
16452 (echo ':t
16453 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16454 if test -z "$ac_sed_cmds"; then
16455 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16456 else
16457 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16458 fi
16459 ac_sed_frag=`expr $ac_sed_frag + 1`
16460 ac_beg=$ac_end
16461 ac_end=`expr $ac_end + $ac_max_sed_lines`
16462 fi
16463 done
16464 if test -z "$ac_sed_cmds"; then
16465 ac_sed_cmds=cat
16466 fi
16467fi # test -n "$CONFIG_FILES"
16468
16469_ACEOF
16470cat >>$CONFIG_STATUS <<\_ACEOF
16471for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16472 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16473 case $ac_file in
16474 - | *:- | *:-:* ) # input from stdin
16475 cat >$tmp/stdin
16476 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16477 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16478 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16479 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16480 * ) ac_file_in=$ac_file.in ;;
16481 esac
16482
16483 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16484 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16485$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16486 X"$ac_file" : 'X\(//\)[^/]' \| \
16487 X"$ac_file" : 'X\(//\)$' \| \
16488 X"$ac_file" : 'X\(/\)' \| \
16489 . : '\(.\)' 2>/dev/null ||
16490echo X"$ac_file" |
16491 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16492 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16493 /^X\(\/\/\)$/{ s//\1/; q; }
16494 /^X\(\/\).*/{ s//\1/; q; }
16495 s/.*/./; q'`
16496 { case "$ac_dir" in
16497 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16498 *) as_incr_dir=.;;
16499esac
16500as_dummy="$ac_dir"
16501for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16502 case $as_mkdir_dir in
16503 # Skip DOS drivespec
16504 ?:) as_incr_dir=$as_mkdir_dir ;;
16505 *)
16506 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16507 test -d "$as_incr_dir" ||
16508 mkdir "$as_incr_dir" ||
16509 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16510echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16511 { (exit 1); exit 1; }; }
16512 ;;
16513 esac
16514done; }
16515
16516 ac_builddir=.
16517
16518if test "$ac_dir" != .; then
16519 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16520 # A "../" for each directory in $ac_dir_suffix.
16521 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16522else
16523 ac_dir_suffix= ac_top_builddir=
16524fi
16525
16526case $srcdir in
16527 .) # No --srcdir option. We are building in place.
16528 ac_srcdir=.
16529 if test -z "$ac_top_builddir"; then
16530 ac_top_srcdir=.
16531 else
16532 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16533 fi ;;
16534 [\\/]* | ?:[\\/]* ) # Absolute path.
16535 ac_srcdir=$srcdir$ac_dir_suffix;
16536 ac_top_srcdir=$srcdir ;;
16537 *) # Relative path.
16538 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16539 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16540esac
16541# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16542# absolute.
16543ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16544ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16545ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16546ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16547
16548
16549 case $INSTALL in
16550 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16551 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16552 esac
16553
16554 if test x"$ac_file" != x-; then
16555 { echo "$as_me:$LINENO: creating $ac_file" >&5
16556echo "$as_me: creating $ac_file" >&6;}
16557 rm -f "$ac_file"
16558 fi
16559 # Let's still pretend it is `configure' which instantiates (i.e., don't
16560 # use $as_me), people would be surprised to read:
16561 # /* config.h. Generated by config.status. */
16562 if test x"$ac_file" = x-; then
16563 configure_input=
16564 else
16565 configure_input="$ac_file. "
16566 fi
16567 configure_input=$configure_input"Generated from `echo $ac_file_in |
16568 sed 's,.*/,,'` by configure."
16569
16570 # First look for the input files in the build tree, otherwise in the
16571 # src tree.
16572 ac_file_inputs=`IFS=:
16573 for f in $ac_file_in; do
16574 case $f in
16575 -) echo $tmp/stdin ;;
16576 [\\/$]*)
16577 # Absolute (can't be DOS-style, as IFS=:)
16578 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16579echo "$as_me: error: cannot find input file: $f" >&2;}
16580 { (exit 1); exit 1; }; }
16581 echo $f;;
16582 *) # Relative
16583 if test -f "$f"; then
16584 # Build tree
16585 echo $f
16586 elif test -f "$srcdir/$f"; then
16587 # Source tree
16588 echo $srcdir/$f
16589 else
16590 # /dev/null tree
16591 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16592echo "$as_me: error: cannot find input file: $f" >&2;}
16593 { (exit 1); exit 1; }; }
16594 fi;;
16595 esac
16596 done` || { (exit 1); exit 1; }
16597_ACEOF
16598cat >>$CONFIG_STATUS <<_ACEOF
16599 sed "$ac_vpsub
16600$extrasub
16601_ACEOF
16602cat >>$CONFIG_STATUS <<\_ACEOF
16603:t
16604/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16605s,@configure_input@,$configure_input,;t t
16606s,@srcdir@,$ac_srcdir,;t t
16607s,@abs_srcdir@,$ac_abs_srcdir,;t t
16608s,@top_srcdir@,$ac_top_srcdir,;t t
16609s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16610s,@builddir@,$ac_builddir,;t t
16611s,@abs_builddir@,$ac_abs_builddir,;t t
16612s,@top_builddir@,$ac_top_builddir,;t t
16613s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16614s,@INSTALL@,$ac_INSTALL,;t t
16615" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16616 rm -f $tmp/stdin
16617 if test x"$ac_file" != x-; then
16618 mv $tmp/out $ac_file
16619 else
16620 cat $tmp/out
16621 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016622 fi
16623
Martin v. Löwis11437992002-04-12 09:54:03 +000016624done
16625_ACEOF
16626cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016627
Martin v. Löwis11437992002-04-12 09:54:03 +000016628#
16629# CONFIG_HEADER section.
16630#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016631
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016632# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16633# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016634#
16635# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016636ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16637ac_dB='[ ].*$,\1#\2'
16638ac_dC=' '
16639ac_dD=',;t'
16640# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16641ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16642ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016643ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016644ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016645
Martin v. Löwis11437992002-04-12 09:54:03 +000016646for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016647 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 case $ac_file in
16649 - | *:- | *:-:* ) # input from stdin
16650 cat >$tmp/stdin
16651 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16652 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16653 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16654 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16655 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016656 esac
16657
Martin v. Löwis11437992002-04-12 09:54:03 +000016658 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16659echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016660
Martin v. Löwis11437992002-04-12 09:54:03 +000016661 # First look for the input files in the build tree, otherwise in the
16662 # src tree.
16663 ac_file_inputs=`IFS=:
16664 for f in $ac_file_in; do
16665 case $f in
16666 -) echo $tmp/stdin ;;
16667 [\\/$]*)
16668 # Absolute (can't be DOS-style, as IFS=:)
16669 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16670echo "$as_me: error: cannot find input file: $f" >&2;}
16671 { (exit 1); exit 1; }; }
16672 echo $f;;
16673 *) # Relative
16674 if test -f "$f"; then
16675 # Build tree
16676 echo $f
16677 elif test -f "$srcdir/$f"; then
16678 # Source tree
16679 echo $srcdir/$f
16680 else
16681 # /dev/null tree
16682 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16683echo "$as_me: error: cannot find input file: $f" >&2;}
16684 { (exit 1); exit 1; }; }
16685 fi;;
16686 esac
16687 done` || { (exit 1); exit 1; }
16688 # Remove the trailing spaces.
16689 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016690
Martin v. Löwis11437992002-04-12 09:54:03 +000016691_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016692
Martin v. Löwis11437992002-04-12 09:54:03 +000016693# Transform confdefs.h into two sed scripts, `conftest.defines' and
16694# `conftest.undefs', that substitutes the proper values into
16695# config.h.in to produce config.h. The first handles `#define'
16696# templates, and the second `#undef' templates.
16697# And first: Protect against being on the right side of a sed subst in
16698# config.status. Protect against being in an unquoted here document
16699# in config.status.
16700rm -f conftest.defines conftest.undefs
16701# Using a here document instead of a string reduces the quoting nightmare.
16702# Putting comments in sed scripts is not portable.
16703#
16704# `end' is used to avoid that the second main sed command (meant for
16705# 0-ary CPP macros) applies to n-ary macro definitions.
16706# See the Autoconf documentation for `clear'.
16707cat >confdef2sed.sed <<\_ACEOF
16708s/[\\&,]/\\&/g
16709s,[\\$`],\\&,g
16710t clear
16711: clear
16712s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16713t end
16714s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16715: end
16716_ACEOF
16717# If some macros were called several times there might be several times
16718# the same #defines, which is useless. Nevertheless, we may not want to
16719# sort them, since we want the *last* AC-DEFINE to be honored.
16720uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16721sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16722rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016723
16724# This sed command replaces #undef with comments. This is necessary, for
16725# example, in the case of _POSIX_SOURCE, which is predefined and required
16726# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016727cat >>conftest.undefs <<\_ACEOF
16728s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16729_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016730
Martin v. Löwis11437992002-04-12 09:54:03 +000016731# Break up conftest.defines because some shells have a limit on the size
16732# of here documents, and old seds have small limits too (100 cmds).
16733echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16734echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16735echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16736echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016737rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016738while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016739do
Martin v. Löwis11437992002-04-12 09:54:03 +000016740 # Write a limited-size here document to $tmp/defines.sed.
16741 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16742 # Speed up: don't consider the non `#define' lines.
16743 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16744 # Work around the forget-to-reset-the-flag bug.
16745 echo 't clr' >>$CONFIG_STATUS
16746 echo ': clr' >>$CONFIG_STATUS
16747 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016748 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016749 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16750 rm -f $tmp/in
16751 mv $tmp/out $tmp/in
16752' >>$CONFIG_STATUS
16753 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16754 rm -f conftest.defines
16755 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016756done
Martin v. Löwis11437992002-04-12 09:54:03 +000016757rm -f conftest.defines
16758echo ' fi # egrep' >>$CONFIG_STATUS
16759echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016760
Martin v. Löwis11437992002-04-12 09:54:03 +000016761# Break up conftest.undefs because some shells have a limit on the size
16762# of here documents, and old seds have small limits too (100 cmds).
16763echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16764rm -f conftest.tail
16765while grep . conftest.undefs >/dev/null
16766do
16767 # Write a limited-size here document to $tmp/undefs.sed.
16768 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16769 # Speed up: don't consider the non `#undef'
16770 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16771 # Work around the forget-to-reset-the-flag bug.
16772 echo 't clr' >>$CONFIG_STATUS
16773 echo ': clr' >>$CONFIG_STATUS
16774 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16775 echo 'CEOF
16776 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16777 rm -f $tmp/in
16778 mv $tmp/out $tmp/in
16779' >>$CONFIG_STATUS
16780 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16781 rm -f conftest.undefs
16782 mv conftest.tail conftest.undefs
16783done
16784rm -f conftest.undefs
16785
16786cat >>$CONFIG_STATUS <<\_ACEOF
16787 # Let's still pretend it is `configure' which instantiates (i.e., don't
16788 # use $as_me), people would be surprised to read:
16789 # /* config.h. Generated by config.status. */
16790 if test x"$ac_file" = x-; then
16791 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016792 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016793 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016794 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016795 cat $tmp/in >>$tmp/config.h
16796 rm -f $tmp/in
16797 if test x"$ac_file" != x-; then
16798 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16799 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16800echo "$as_me: $ac_file is unchanged" >&6;}
16801 else
16802 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16803$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16804 X"$ac_file" : 'X\(//\)[^/]' \| \
16805 X"$ac_file" : 'X\(//\)$' \| \
16806 X"$ac_file" : 'X\(/\)' \| \
16807 . : '\(.\)' 2>/dev/null ||
16808echo X"$ac_file" |
16809 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16810 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16811 /^X\(\/\/\)$/{ s//\1/; q; }
16812 /^X\(\/\).*/{ s//\1/; q; }
16813 s/.*/./; q'`
16814 { case "$ac_dir" in
16815 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16816 *) as_incr_dir=.;;
16817esac
16818as_dummy="$ac_dir"
16819for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16820 case $as_mkdir_dir in
16821 # Skip DOS drivespec
16822 ?:) as_incr_dir=$as_mkdir_dir ;;
16823 *)
16824 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16825 test -d "$as_incr_dir" ||
16826 mkdir "$as_incr_dir" ||
16827 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16828echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16829 { (exit 1); exit 1; }; }
16830 ;;
16831 esac
16832done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016833
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 rm -f $ac_file
16835 mv $tmp/config.h $ac_file
16836 fi
16837 else
16838 cat $tmp/config.h
16839 rm -f $tmp/config.h
16840 fi
16841done
16842_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016843
Martin v. Löwis11437992002-04-12 09:54:03 +000016844cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016845
Martin v. Löwis11437992002-04-12 09:54:03 +000016846{ (exit 0); exit 0; }
16847_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016848chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016849ac_clean_files=$ac_clean_files_save
16850
16851
16852# configure is writing to config.log, and then calls config.status.
16853# config.status does its own redirection, appending to config.log.
16854# Unfortunately, on DOS this fails, as config.log is still kept open
16855# by configure, so config.status won't be able to write to it; its
16856# output is simply discarded. So we exec the FD to /dev/null,
16857# effectively closing config.log, so it can be properly (re)opened and
16858# appended to by config.status. When coming back to configure, we
16859# need to make the FD available again.
16860if test "$no_create" != yes; then
16861 ac_cs_success=:
16862 exec 5>/dev/null
16863 $SHELL $CONFIG_STATUS || ac_cs_success=false
16864 exec 5>>config.log
16865 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16866 # would make configure fail if this is the last instruction.
16867 $ac_cs_success || { (exit 1); exit 1; }
16868fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016869
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016870
16871echo "creating Setup"
16872if test ! -f Modules/Setup
16873then
16874 cp $srcdir/Modules/Setup.dist Modules/Setup
16875fi
16876
16877echo "creating Setup.local"
16878if test ! -f Modules/Setup.local
16879then
16880 echo "# Edit this file for local setup changes" >Modules/Setup.local
16881fi
16882
16883echo "creating Makefile"
16884$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16885 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016886 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016887mv config.c Modules