blob: ddd86dbf8bed23bcad0c8ed6a9924a76977afbe2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis09bdf722002-05-08 08:51:29 +00002# From configure.in Revision: 1.314 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis11437992002-04-12 09:54:03 +00004# Generated by GNU Autoconf 2.53.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
30# NLS nuisances.
31# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
38(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
256PACKAGE_NAME=
257PACKAGE_TARNAME=
258PACKAGE_VERSION=
259PACKAGE_STRING=
260PACKAGE_BUGREPORT=
261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
764\`configure' configures this package to adapt to many kinds of systems.
765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
820
821 cat <<\_ACEOF
822
823Optional Features:
824 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
825 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
826 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
827 --enable-shared disable/enable building shared python library
828 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
829 --enable-ipv6 Enable ipv6 (with ipv4) support
830 --disable-ipv6 Disable ipv6 support
831 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
832
833Optional Packages:
834 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
835 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
836 --without-gcc never use gcc
837 --with-cxx=<compiler> enable C++ support
838 --with-suffix=.exe set executable suffix
839 --with-pydebug build with Py_DEBUG defined
840 --with-libs='lib1 ...' link against additional libs
841 --with-signal-module disable/enable signal module
842 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
843 --with(out)-threads=DIRECTORY disable/enable thread support
844 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
845 --with-pth use GNU pth threading libraries
846 --with(out)-cycle-gc disable/enable garbage collection
Jack Jansen7b8c7542002-04-14 20:12:41 +0000847 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 --with(out)-pymalloc disable/enable specialized mallocs
849 --with-wctype-functions use wctype.h functions
850 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
851 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
852 --with-fpectl enable SIGFPE catching
853 --with-libm=STRING math library
854 --with-libc=STRING C library
855
856Some influential environment variables:
857 CC C compiler command
858 CFLAGS C compiler flags
859 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
860 nonstandard directory <lib dir>
861 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
862 headers in a nonstandard directory <include dir>
863 CPP C preprocessor
864
865Use these variables to override the choices made by `configure' or to help
866it to find libraries and programs with nonstandard names/locations.
867
868_ACEOF
869fi
870
871if test "$ac_init_help" = "recursive"; then
872 # If there are subdirs, report their specific --help.
873 ac_popdir=`pwd`
874 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
875 test -d $ac_dir || continue
876 ac_builddir=.
877
878if test "$ac_dir" != .; then
879 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
880 # A "../" for each directory in $ac_dir_suffix.
881 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
882else
883 ac_dir_suffix= ac_top_builddir=
884fi
885
886case $srcdir in
887 .) # No --srcdir option. We are building in place.
888 ac_srcdir=.
889 if test -z "$ac_top_builddir"; then
890 ac_top_srcdir=.
891 else
892 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
893 fi ;;
894 [\\/]* | ?:[\\/]* ) # Absolute path.
895 ac_srcdir=$srcdir$ac_dir_suffix;
896 ac_top_srcdir=$srcdir ;;
897 *) # Relative path.
898 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
899 ac_top_srcdir=$ac_top_builddir$srcdir ;;
900esac
901# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
902# absolute.
903ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
904ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
905ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
906ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
907
908 cd $ac_dir
909 # Check for guested configure; otherwise get Cygnus style configure.
910 if test -f $ac_srcdir/configure.gnu; then
911 echo
912 $SHELL $ac_srcdir/configure.gnu --help=recursive
913 elif test -f $ac_srcdir/configure; then
914 echo
915 $SHELL $ac_srcdir/configure --help=recursive
916 elif test -f $ac_srcdir/configure.ac ||
917 test -f $ac_srcdir/configure.in; then
918 echo
919 $ac_configure --help
920 else
921 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
922 fi
923 cd $ac_popdir
924 done
925fi
926
927test -n "$ac_init_help" && exit 0
928if $ac_init_version; then
929 cat <<\_ACEOF
930
931Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
932Free Software Foundation, Inc.
933This configure script is free software; the Free Software Foundation
934gives unlimited permission to copy, distribute and modify it.
935_ACEOF
936 exit 0
937fi
938exec 5>config.log
939cat >&5 <<_ACEOF
940This file contains any messages produced by compilers while
941running configure, to aid debugging if configure makes a mistake.
942
943It was created by $as_me, which was
944generated by GNU Autoconf 2.53. Invocation command line was
945
946 $ $0 $@
947
948_ACEOF
949{
950cat <<_ASUNAME
951## --------- ##
952## Platform. ##
953## --------- ##
954
955hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
956uname -m = `(uname -m) 2>/dev/null || echo unknown`
957uname -r = `(uname -r) 2>/dev/null || echo unknown`
958uname -s = `(uname -s) 2>/dev/null || echo unknown`
959uname -v = `(uname -v) 2>/dev/null || echo unknown`
960
961/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
962/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
963
964/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
965/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
966/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
967hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
968/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
969/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
970/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
971
972_ASUNAME
973
974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
975for as_dir in $PATH
976do
977 IFS=$as_save_IFS
978 test -z "$as_dir" && as_dir=.
979 echo "PATH: $as_dir"
980done
981
982} >&5
983
984cat >&5 <<_ACEOF
985
986
987## ----------- ##
988## Core tests. ##
989## ----------- ##
990
991_ACEOF
992
993
994# Keep a trace of the command line.
995# Strip out --no-create and --no-recursion so they do not pile up.
996# Also quote any args containing shell meta-characters.
997ac_configure_args=
998ac_sep=
999for ac_arg
1000do
1001 case $ac_arg in
1002 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003 | --no-cr | --no-c | -n ) continue ;;
1004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 continue ;;
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1009 esac
1010 case " $ac_configure_args " in
1011 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1012 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1013 ac_sep=" " ;;
1014 esac
1015 # Get rid of the leading space.
1016done
1017
1018# When interrupted or exit'd, cleanup temporary files, and complete
1019# config.log. We remove comments because anyway the quotes in there
1020# would cause problems or look ugly.
1021# WARNING: Be sure not to use single quotes in there, as some shells,
1022# such as our DU 5.0 friend, will then `close' the trap.
1023trap 'exit_status=$?
1024 # Save into config.log some information that might help in debugging.
1025 {
1026 echo
1027 cat <<\_ASBOX
1028## ---------------- ##
1029## Cache variables. ##
1030## ---------------- ##
1031_ASBOX
1032 echo
1033 # The following way of writing the cache mishandles newlines in values,
1034{
1035 (set) 2>&1 |
1036 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1037 *ac_space=\ *)
1038 sed -n \
1039 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1040 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1041 ;;
1042 *)
1043 sed -n \
1044 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1045 ;;
1046 esac;
1047}
1048 echo
1049 if test -s confdefs.h; then
1050 cat <<\_ASBOX
1051## ----------- ##
1052## confdefs.h. ##
1053## ----------- ##
1054_ASBOX
1055 echo
1056 sed "/^$/d" confdefs.h
1057 echo
1058 fi
1059 test "$ac_signal" != 0 &&
1060 echo "$as_me: caught signal $ac_signal"
1061 echo "$as_me: exit $exit_status"
1062 } >&5
1063 rm -f core core.* *.core &&
1064 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1065 exit $exit_status
1066 ' 0
1067for ac_signal in 1 2 13 15; do
1068 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1069done
1070ac_signal=0
1071
1072# confdefs.h avoids OS command line length limits that DEFS can exceed.
1073rm -rf conftest* confdefs.h
1074# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1075echo >confdefs.h
1076
1077# Predefined preprocessor variables.
1078
1079cat >>confdefs.h <<_ACEOF
1080#define PACKAGE_NAME "$PACKAGE_NAME"
1081_ACEOF
1082
1083
1084cat >>confdefs.h <<_ACEOF
1085#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1086_ACEOF
1087
1088
1089cat >>confdefs.h <<_ACEOF
1090#define PACKAGE_VERSION "$PACKAGE_VERSION"
1091_ACEOF
1092
1093
1094cat >>confdefs.h <<_ACEOF
1095#define PACKAGE_STRING "$PACKAGE_STRING"
1096_ACEOF
1097
1098
1099cat >>confdefs.h <<_ACEOF
1100#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1101_ACEOF
1102
1103
1104# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105# Prefer explicitly selected file to automatically selected ones.
1106if test -z "$CONFIG_SITE"; then
1107 if test "x$prefix" != xNONE; then
1108 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1109 else
1110 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1111 fi
1112fi
1113for ac_site_file in $CONFIG_SITE; do
1114 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1116echo "$as_me: loading site script $ac_site_file" >&6;}
1117 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 . "$ac_site_file"
1119 fi
1120done
1121
1122if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # Some versions of bash will fail to source /dev/null (special
1124 # files actually), so we avoid doing that.
1125 if test -f "$cache_file"; then
1126 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1127echo "$as_me: loading cache $cache_file" >&6;}
1128 case $cache_file in
1129 [\\/]* | ?:[\\/]* ) . $cache_file;;
1130 *) . ./$cache_file;;
1131 esac
1132 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133else
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1135echo "$as_me: creating cache $cache_file" >&6;}
1136 >$cache_file
1137fi
1138
1139# Check that the precious variables saved in the cache have kept the same
1140# value.
1141ac_cache_corrupted=false
1142for ac_var in `(set) 2>&1 |
1143 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1144 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1145 eval ac_new_set=\$ac_env_${ac_var}_set
1146 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1147 eval ac_new_val="\$ac_env_${ac_var}_value"
1148 case $ac_old_set,$ac_new_set in
1149 set,)
1150 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1151echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1152 ac_cache_corrupted=: ;;
1153 ,set)
1154 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1155echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1156 ac_cache_corrupted=: ;;
1157 ,);;
1158 *)
1159 if test "x$ac_old_val" != "x$ac_new_val"; then
1160 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1161echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1162 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1163echo "$as_me: former value: $ac_old_val" >&2;}
1164 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1165echo "$as_me: current value: $ac_new_val" >&2;}
1166 ac_cache_corrupted=:
1167 fi;;
1168 esac
1169 # Pass precious variables to config.status.
1170 if test "$ac_new_set" = set; then
1171 case $ac_new_val in
1172 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1173 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1174 *) ac_arg=$ac_var=$ac_new_val ;;
1175 esac
1176 case " $ac_configure_args " in
1177 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1178 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1179 esac
1180 fi
1181done
1182if $ac_cache_corrupted; then
1183 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1184echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1185 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1186echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1187 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188fi
1189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1194ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196
Michael W. Hudson54241132001-12-07 15:38:26 +00001197
1198
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213ac_config_headers="$ac_config_headers pyconfig.h"
1214
1215
1216# This is for stuff that absolutely must end up in pyconfig.h.
1217# Please use pyport.h instead, if possible.
1218
1219
1220
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001221# Set VERSION so we only need to edit in one place (i.e., here)
1222
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001223VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001224
Martin v. Löwis1142de32002-03-29 16:28:31 +00001225
1226SOVERSION=1.0
1227
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001228# Arguments passed to configure.
1229
1230CONFIG_ARGS="$ac_configure_args"
1231
Michael W. Hudson54241132001-12-07 15:38:26 +00001232
Jack Jansene578a632001-08-15 01:27:14 +00001233# Check whether --enable-framework or --disable-framework was given.
1234if test "${enable_framework+set}" = set; then
1235 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001236
Jack Jansene578a632001-08-15 01:27:14 +00001237 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001239 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001240 esac
1241 case $enableval in
1242 no)
1243 PYTHONFRAMEWORK=
1244 PYTHONFRAMEWORKDIR=no-framework
1245 PYTHONFRAMEWORKPREFIX=
1246 PYTHONFRAMEWORKINSTALLDIR=
1247 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001248 ;;
1249 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001250 PYTHONFRAMEWORK=Python
1251 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001252 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001253 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1254 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001255 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001256
Guido van Rossum563e7081996-09-10 18:20:48 +00001257else
Martin v. Löwis11437992002-04-12 09:54:03 +00001258
Jack Jansene578a632001-08-15 01:27:14 +00001259 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001260 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001261 PYTHONFRAMEWORKPREFIX=
1262 PYTHONFRAMEWORKINSTALLDIR=
1263 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001264
Martin v. Löwis11437992002-04-12 09:54:03 +00001265fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001266
1267
1268
1269
Jack Jansene578a632001-08-15 01:27:14 +00001270
1271##AC_ARG_WITH(dyld,
1272##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1273##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001274# Set name for machine-dependent library files
1275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276echo "$as_me:$LINENO: checking MACHDEP" >&5
1277echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001278if test -z "$MACHDEP"
1279then
Guido van Rossum563e7081996-09-10 18:20:48 +00001280 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001281 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001282 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001284 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001285 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001286 ac_md_system=`echo $ac_sys_system |
1287 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1288 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001289 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001290 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001291
Guido van Rossum07397971997-04-29 21:49:50 +00001292 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001293 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001294 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001295 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001296 esac
1297fi
Guido van Rossum91922671997-10-09 20:24:13 +00001298
1299#
1300# SGI compilers allow the specification of the both the ABI and the
1301# ISA on the command line. Depending on the values of these switches,
1302# different and often incompatable code will be generated.
1303#
1304# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1305# thus supply support for various ABI/ISA combinations. The MACHDEP
1306# variable is also adjusted.
1307#
1308
1309if test ! -z "$SGI_ABI"
1310then
1311 CC="cc $SGI_ABI"
1312 LDFLAGS="$SGI_ABI $LDFLAGS"
1313 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1314fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001315echo "$as_me:$LINENO: result: $MACHDEP" >&5
1316echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001317
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001319echo "$as_me:$LINENO: checking for --without-gcc" >&5
1320echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1321
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001322# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001323if test "${with_gcc+set}" = set; then
1324 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001325
Guido van Rossum7f43da71994-08-01 12:15:30 +00001326 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001327 no) CC=cc
1328 without_gcc=yes;;
1329 yes) CC=gcc
1330 without_gcc=no;;
1331 *) CC=$withval
1332 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001334else
Martin v. Löwis11437992002-04-12 09:54:03 +00001335
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001336 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001337 AIX*) CC=cc_r
1338 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001339 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001340 case $BE_HOST_CPU in
1341 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001342 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001343 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +00001344 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001345 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001346 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001347 ;;
1348 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001349 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001350 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001351 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001352 ;;
1353 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001354 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1355echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1356 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001357 ;;
1358 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001359 AR="\$(srcdir)/Modules/ar_beos"
1360 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001361 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001362 Monterey*)
1363 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001364 without_gcc=;;
1365 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001366 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001367fi;
1368echo "$as_me:$LINENO: result: $without_gcc" >&5
1369echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001370
1371
Guido van Rossum95012191999-12-16 17:50:52 +00001372
Fred Drakea1a84e72001-03-06 05:52:16 +00001373MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001374echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1375echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1376
Guido van Rossum95012191999-12-16 17:50:52 +00001377# Check whether --with-cxx or --without-cxx was given.
1378if test "${with_cxx+set}" = set; then
1379 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001380
Martin v. Löwis22352952000-12-13 17:37:02 +00001381 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001382 case $withval in
1383 no) CXX=
1384 with_cxx=no;;
1385 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001386 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001387 with_cxx=$withval;;
1388 esac
1389else
Martin v. Löwis11437992002-04-12 09:54:03 +00001390
Guido van Rossum95012191999-12-16 17:50:52 +00001391 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001392 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394fi;
1395echo "$as_me:$LINENO: result: $with_cxx" >&5
1396echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001397
1398if test "$with_cxx" = "yes"
1399then
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1401echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1402 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001403fi
1404
1405
1406
1407
Martin v. Löwis11437992002-04-12 09:54:03 +00001408if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001409then
1410 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1411do
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001413set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001414echo "$as_me:$LINENO: checking for $ac_word" >&5
1415echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1416if test "${ac_cv_prog_CXX+set}" = set; then
1417 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001418else
1419 if test -n "$CXX"; then
1420 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1421else
Martin v. Löwis11437992002-04-12 09:54:03 +00001422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1423for as_dir in $PATH
1424do
1425 IFS=$as_save_IFS
1426 test -z "$as_dir" && as_dir=.
1427 for ac_exec_ext in '' $ac_executable_extensions; do
1428 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1429 ac_cv_prog_CXX="$ac_prog"
1430 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1431 break 2
1432 fi
1433done
1434done
1435
Martin v. Löwis22352952000-12-13 17:37:02 +00001436fi
1437fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001438CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001439if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 echo "$as_me:$LINENO: result: $CXX" >&5
1441echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001442else
Martin v. Löwis11437992002-04-12 09:54:03 +00001443 echo "$as_me:$LINENO: result: no" >&5
1444echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001445fi
1446
Martin v. Löwis11437992002-04-12 09:54:03 +00001447 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001448done
1449test -n "$CXX" || CXX="notfound"
1450
1451 if test "$CXX" = "notfound"
1452 then
1453 CXX=
1454 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001455 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001456ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1460 cat >conftest.$ac_ext <<_ACEOF
1461#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001462#include "confdefs.h"
1463
Martin v. Löwis11437992002-04-12 09:54:03 +00001464#ifdef F77_DUMMY_MAIN
1465# ifdef __cplusplus
1466 extern "C"
1467# endif
1468 int F77_DUMMY_MAIN() { return 1; }
1469#endif
1470int
1471main ()
1472{
Michael W. Hudson54241132001-12-07 15:38:26 +00001473
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 ;
1475 return 0;
1476}
1477_ACEOF
1478ac_clean_files_save=$ac_clean_files
1479ac_clean_files="$ac_clean_files a.out a.exe"
1480# Try to create an executable without -o first, disregard a.out.
1481# It will help us diagnose broken compilers, and finding out an intuition
1482# of exeext.
1483echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1484echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1485ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1486if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1487 (eval $ac_link_default) 2>&5
1488 ac_status=$?
1489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1490 (exit $ac_status); }; then
1491 # Find the output, starting from the most likely. This scheme is
1492# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1493# resort.
1494
1495# Be careful to initialize this variable, since it used to be cached.
1496# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1497ac_cv_exeext=
1498for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1499 ls a.out conftest 2>/dev/null;
1500 ls a.* conftest.* 2>/dev/null`; do
1501 case $ac_file in
1502 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1503 a.out ) # We found the default executable, but exeext='' is most
1504 # certainly right.
1505 break;;
1506 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1507 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1508 export ac_cv_exeext
1509 break;;
1510 * ) break;;
1511 esac
1512done
1513else
1514 echo "$as_me: failed program was:" >&5
1515cat conftest.$ac_ext >&5
1516{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1517echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1518 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001519fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001520
1521ac_exeext=$ac_cv_exeext
1522echo "$as_me:$LINENO: result: $ac_file" >&5
1523echo "${ECHO_T}$ac_file" >&6
1524
1525# Check the compiler produces executables we can run. If not, either
1526# the compiler is broken, or we cross compile.
1527echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1528echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1529# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1530# If not cross compiling, check that we can run a simple program.
1531if test "$cross_compiling" != yes; then
1532 if { ac_try='./$ac_file'
1533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1534 (eval $ac_try) 2>&5
1535 ac_status=$?
1536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1537 (exit $ac_status); }; }; then
1538 cross_compiling=no
1539 else
1540 if test "$cross_compiling" = maybe; then
1541 cross_compiling=yes
1542 else
1543 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1544If you meant to cross compile, use \`--host'." >&5
1545echo "$as_me: error: cannot run C++ compiled programs.
1546If you meant to cross compile, use \`--host'." >&2;}
1547 { (exit 1); exit 1; }; }
1548 fi
1549 fi
1550fi
1551echo "$as_me:$LINENO: result: yes" >&5
1552echo "${ECHO_T}yes" >&6
1553
1554rm -f a.out a.exe conftest$ac_cv_exeext
1555ac_clean_files=$ac_clean_files_save
1556# Check the compiler produces executables we can run. If not, either
1557# the compiler is broken, or we cross compile.
1558echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1559echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1560echo "$as_me:$LINENO: result: $cross_compiling" >&5
1561echo "${ECHO_T}$cross_compiling" >&6
1562
1563echo "$as_me:$LINENO: checking for suffix of executables" >&5
1564echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1565if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1566 (eval $ac_link) 2>&5
1567 ac_status=$?
1568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1569 (exit $ac_status); }; then
1570 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1571# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1572# work properly (i.e., refer to `conftest.exe'), while it won't with
1573# `rm'.
1574for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1575 case $ac_file in
1576 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1577 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1578 export ac_cv_exeext
1579 break;;
1580 * ) break;;
1581 esac
1582done
1583else
1584 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1585echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1586 { (exit 1); exit 1; }; }
1587fi
1588
1589rm -f conftest$ac_cv_exeext
1590echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1591echo "${ECHO_T}$ac_cv_exeext" >&6
1592
1593rm -f conftest.$ac_ext
1594EXEEXT=$ac_cv_exeext
1595ac_exeext=$EXEEXT
1596
1597 ac_ext=c
1598ac_cpp='$CPP $CPPFLAGS'
1599ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1600ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1601ac_compiler_gnu=$ac_cv_c_compiler_gnu
1602
1603
Martin v. Löwis22352952000-12-13 17:37:02 +00001604
1605 fi
1606fi
1607
Guido van Rossum8b131c51995-03-09 14:10:13 +00001608# If the user switches compilers, we can't believe the cache
1609if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1610then
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1612(it is also a good idea to do 'make clean' before compiling)" >&5
1613echo "$as_me: error: cached CC is different -- throw away $cache_file
1614(it is also a good idea to do 'make clean' before compiling)" >&2;}
1615 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001616fi
1617
Martin v. Löwis11437992002-04-12 09:54:03 +00001618ac_ext=c
1619ac_cpp='$CPP $CPPFLAGS'
1620ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1621ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1622ac_compiler_gnu=$ac_cv_c_compiler_gnu
1623if test -n "$ac_tool_prefix"; then
1624 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1625set dummy ${ac_tool_prefix}gcc; ac_word=$2
1626echo "$as_me:$LINENO: checking for $ac_word" >&5
1627echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1628if test "${ac_cv_prog_CC+set}" = set; then
1629 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001630else
1631 if test -n "$CC"; then
1632 ac_cv_prog_CC="$CC" # Let the user override the test.
1633else
Martin v. Löwis11437992002-04-12 09:54:03 +00001634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1635for as_dir in $PATH
1636do
1637 IFS=$as_save_IFS
1638 test -z "$as_dir" && as_dir=.
1639 for ac_exec_ext in '' $ac_executable_extensions; do
1640 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1641 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1642 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1643 break 2
1644 fi
1645done
1646done
1647
Jack Jansendd19cf82001-12-06 22:36:17 +00001648fi
1649fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001650CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001651if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001652 echo "$as_me:$LINENO: result: $CC" >&5
1653echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001654else
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 echo "$as_me:$LINENO: result: no" >&5
1656echo "${ECHO_T}no" >&6
1657fi
1658
1659fi
1660if test -z "$ac_cv_prog_CC"; then
1661 ac_ct_CC=$CC
1662 # Extract the first word of "gcc", so it can be a program name with args.
1663set dummy gcc; ac_word=$2
1664echo "$as_me:$LINENO: checking for $ac_word" >&5
1665echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1666if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1667 echo $ECHO_N "(cached) $ECHO_C" >&6
1668else
1669 if test -n "$ac_ct_CC"; then
1670 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1671else
1672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1673for as_dir in $PATH
1674do
1675 IFS=$as_save_IFS
1676 test -z "$as_dir" && as_dir=.
1677 for ac_exec_ext in '' $ac_executable_extensions; do
1678 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1679 ac_cv_prog_ac_ct_CC="gcc"
1680 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1681 break 2
1682 fi
1683done
1684done
1685
1686fi
1687fi
1688ac_ct_CC=$ac_cv_prog_ac_ct_CC
1689if test -n "$ac_ct_CC"; then
1690 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1691echo "${ECHO_T}$ac_ct_CC" >&6
1692else
1693 echo "$as_me:$LINENO: result: no" >&5
1694echo "${ECHO_T}no" >&6
1695fi
1696
1697 CC=$ac_ct_CC
1698else
1699 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001700fi
1701
Jack Jansendd19cf82001-12-06 22:36:17 +00001702if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001703 if test -n "$ac_tool_prefix"; then
1704 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1705set dummy ${ac_tool_prefix}cc; ac_word=$2
1706echo "$as_me:$LINENO: checking for $ac_word" >&5
1707echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1708if test "${ac_cv_prog_CC+set}" = set; then
1709 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001710else
1711 if test -n "$CC"; then
1712 ac_cv_prog_CC="$CC" # Let the user override the test.
1713else
Martin v. Löwis11437992002-04-12 09:54:03 +00001714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1715for as_dir in $PATH
1716do
1717 IFS=$as_save_IFS
1718 test -z "$as_dir" && as_dir=.
1719 for ac_exec_ext in '' $ac_executable_extensions; do
1720 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1721 ac_cv_prog_CC="${ac_tool_prefix}cc"
1722 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1723 break 2
1724 fi
1725done
1726done
1727
1728fi
1729fi
1730CC=$ac_cv_prog_CC
1731if test -n "$CC"; then
1732 echo "$as_me:$LINENO: result: $CC" >&5
1733echo "${ECHO_T}$CC" >&6
1734else
1735 echo "$as_me:$LINENO: result: no" >&5
1736echo "${ECHO_T}no" >&6
1737fi
1738
1739fi
1740if test -z "$ac_cv_prog_CC"; then
1741 ac_ct_CC=$CC
1742 # Extract the first word of "cc", so it can be a program name with args.
1743set dummy cc; ac_word=$2
1744echo "$as_me:$LINENO: checking for $ac_word" >&5
1745echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1746if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1747 echo $ECHO_N "(cached) $ECHO_C" >&6
1748else
1749 if test -n "$ac_ct_CC"; then
1750 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1751else
1752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1753for as_dir in $PATH
1754do
1755 IFS=$as_save_IFS
1756 test -z "$as_dir" && as_dir=.
1757 for ac_exec_ext in '' $ac_executable_extensions; do
1758 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1759 ac_cv_prog_ac_ct_CC="cc"
1760 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1761 break 2
1762 fi
1763done
1764done
1765
1766fi
1767fi
1768ac_ct_CC=$ac_cv_prog_ac_ct_CC
1769if test -n "$ac_ct_CC"; then
1770 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1771echo "${ECHO_T}$ac_ct_CC" >&6
1772else
1773 echo "$as_me:$LINENO: result: no" >&5
1774echo "${ECHO_T}no" >&6
1775fi
1776
1777 CC=$ac_ct_CC
1778else
1779 CC="$ac_cv_prog_CC"
1780fi
1781
1782fi
1783if test -z "$CC"; then
1784 # Extract the first word of "cc", so it can be a program name with args.
1785set dummy cc; ac_word=$2
1786echo "$as_me:$LINENO: checking for $ac_word" >&5
1787echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1788if test "${ac_cv_prog_CC+set}" = set; then
1789 echo $ECHO_N "(cached) $ECHO_C" >&6
1790else
1791 if test -n "$CC"; then
1792 ac_cv_prog_CC="$CC" # Let the user override the test.
1793else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001794 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1796for as_dir in $PATH
1797do
1798 IFS=$as_save_IFS
1799 test -z "$as_dir" && as_dir=.
1800 for ac_exec_ext in '' $ac_executable_extensions; do
1801 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1802 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1803 ac_prog_rejected=yes
1804 continue
1805 fi
1806 ac_cv_prog_CC="cc"
1807 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1808 break 2
1809 fi
1810done
1811done
1812
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001813if test $ac_prog_rejected = yes; then
1814 # We found a bogon in the path, so make sure we never use it.
1815 set dummy $ac_cv_prog_CC
1816 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001817 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001818 # We chose a different compiler from the bogus one.
1819 # However, it has the same basename, so the bogon will be chosen
1820 # first if we set CC to just the basename; use the full file name.
1821 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001822 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001823 shift
1824 ac_cv_prog_CC="$@"
1825 fi
1826fi
1827fi
1828fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001829CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001830if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001831 echo "$as_me:$LINENO: result: $CC" >&5
1832echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001833else
Martin v. Löwis11437992002-04-12 09:54:03 +00001834 echo "$as_me:$LINENO: result: no" >&5
1835echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001836fi
1837
Martin v. Löwis11437992002-04-12 09:54:03 +00001838fi
1839if test -z "$CC"; then
1840 if test -n "$ac_tool_prefix"; then
1841 for ac_prog in cl
1842 do
1843 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1844set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1845echo "$as_me:$LINENO: checking for $ac_word" >&5
1846echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1847if test "${ac_cv_prog_CC+set}" = set; then
1848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001849else
1850 if test -n "$CC"; then
1851 ac_cv_prog_CC="$CC" # Let the user override the test.
1852else
Martin v. Löwis11437992002-04-12 09:54:03 +00001853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1854for as_dir in $PATH
1855do
1856 IFS=$as_save_IFS
1857 test -z "$as_dir" && as_dir=.
1858 for ac_exec_ext in '' $ac_executable_extensions; do
1859 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1860 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1861 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1862 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001864done
1865done
1866
1867fi
1868fi
1869CC=$ac_cv_prog_CC
1870if test -n "$CC"; then
1871 echo "$as_me:$LINENO: result: $CC" >&5
1872echo "${ECHO_T}$CC" >&6
1873else
1874 echo "$as_me:$LINENO: result: no" >&5
1875echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001876fi
1877
Martin v. Löwis11437992002-04-12 09:54:03 +00001878 test -n "$CC" && break
1879 done
1880fi
1881if test -z "$CC"; then
1882 ac_ct_CC=$CC
1883 for ac_prog in cl
1884do
1885 # Extract the first word of "$ac_prog", so it can be a program name with args.
1886set dummy $ac_prog; ac_word=$2
1887echo "$as_me:$LINENO: checking for $ac_word" >&5
1888echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1889if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1890 echo $ECHO_N "(cached) $ECHO_C" >&6
1891else
1892 if test -n "$ac_ct_CC"; then
1893 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1894else
1895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1896for as_dir in $PATH
1897do
1898 IFS=$as_save_IFS
1899 test -z "$as_dir" && as_dir=.
1900 for ac_exec_ext in '' $ac_executable_extensions; do
1901 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1902 ac_cv_prog_ac_ct_CC="$ac_prog"
1903 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1904 break 2
1905 fi
1906done
1907done
Jack Jansendd19cf82001-12-06 22:36:17 +00001908
Martin v. Löwis11437992002-04-12 09:54:03 +00001909fi
1910fi
1911ac_ct_CC=$ac_cv_prog_ac_ct_CC
1912if test -n "$ac_ct_CC"; then
1913 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1914echo "${ECHO_T}$ac_ct_CC" >&6
1915else
1916 echo "$as_me:$LINENO: result: no" >&5
1917echo "${ECHO_T}no" >&6
1918fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001919
Martin v. Löwis11437992002-04-12 09:54:03 +00001920 test -n "$ac_ct_CC" && break
1921done
Michael W. Hudson54241132001-12-07 15:38:26 +00001922
Martin v. Löwis11437992002-04-12 09:54:03 +00001923 CC=$ac_ct_CC
1924fi
1925
1926fi
1927
1928
1929test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1930echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1931 { (exit 1); exit 1; }; }
1932
1933# Provide some information about the compiler.
1934echo "$as_me:$LINENO:" \
1935 "checking for C compiler version" >&5
1936ac_compiler=`set X $ac_compile; echo $2`
1937{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1938 (eval $ac_compiler --version </dev/null >&5) 2>&5
1939 ac_status=$?
1940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1941 (exit $ac_status); }
1942{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1943 (eval $ac_compiler -v </dev/null >&5) 2>&5
1944 ac_status=$?
1945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1946 (exit $ac_status); }
1947{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1948 (eval $ac_compiler -V </dev/null >&5) 2>&5
1949 ac_status=$?
1950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1951 (exit $ac_status); }
1952
1953cat >conftest.$ac_ext <<_ACEOF
1954#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001955#include "confdefs.h"
1956
Martin v. Löwis11437992002-04-12 09:54:03 +00001957#ifdef F77_DUMMY_MAIN
1958# ifdef __cplusplus
1959 extern "C"
1960# endif
1961 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001963int
1964main ()
1965{
1966
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971ac_clean_files_save=$ac_clean_files
1972ac_clean_files="$ac_clean_files a.out a.exe"
1973# Try to create an executable without -o first, disregard a.out.
1974# It will help us diagnose broken compilers, and finding out an intuition
1975# of exeext.
1976echo "$as_me:$LINENO: checking for C compiler default output" >&5
1977echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1978ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1979if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1980 (eval $ac_link_default) 2>&5
1981 ac_status=$?
1982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1983 (exit $ac_status); }; then
1984 # Find the output, starting from the most likely. This scheme is
1985# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1986# resort.
1987
1988# Be careful to initialize this variable, since it used to be cached.
1989# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1990ac_cv_exeext=
1991for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1992 ls a.out conftest 2>/dev/null;
1993 ls a.* conftest.* 2>/dev/null`; do
1994 case $ac_file in
1995 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1996 a.out ) # We found the default executable, but exeext='' is most
1997 # certainly right.
1998 break;;
1999 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2000 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2001 export ac_cv_exeext
2002 break;;
2003 * ) break;;
2004 esac
2005done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002006else
Martin v. Löwis11437992002-04-12 09:54:03 +00002007 echo "$as_me: failed program was:" >&5
2008cat conftest.$ac_ext >&5
2009{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2010echo "$as_me: error: C compiler cannot create executables" >&2;}
2011 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002012fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002013
Martin v. Löwis11437992002-04-12 09:54:03 +00002014ac_exeext=$ac_cv_exeext
2015echo "$as_me:$LINENO: result: $ac_file" >&5
2016echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002017
Martin v. Löwis11437992002-04-12 09:54:03 +00002018# Check the compiler produces executables we can run. If not, either
2019# the compiler is broken, or we cross compile.
2020echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2021echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2022# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2023# If not cross compiling, check that we can run a simple program.
2024if test "$cross_compiling" != yes; then
2025 if { ac_try='./$ac_file'
2026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2027 (eval $ac_try) 2>&5
2028 ac_status=$?
2029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2030 (exit $ac_status); }; }; then
2031 cross_compiling=no
2032 else
2033 if test "$cross_compiling" = maybe; then
2034 cross_compiling=yes
2035 else
2036 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2037If you meant to cross compile, use \`--host'." >&5
2038echo "$as_me: error: cannot run C compiled programs.
2039If you meant to cross compile, use \`--host'." >&2;}
2040 { (exit 1); exit 1; }; }
2041 fi
2042 fi
2043fi
2044echo "$as_me:$LINENO: result: yes" >&5
2045echo "${ECHO_T}yes" >&6
2046
2047rm -f a.out a.exe conftest$ac_cv_exeext
2048ac_clean_files=$ac_clean_files_save
2049# Check the compiler produces executables we can run. If not, either
2050# the compiler is broken, or we cross compile.
2051echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2052echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2053echo "$as_me:$LINENO: result: $cross_compiling" >&5
2054echo "${ECHO_T}$cross_compiling" >&6
2055
2056echo "$as_me:$LINENO: checking for suffix of executables" >&5
2057echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2059 (eval $ac_link) 2>&5
2060 ac_status=$?
2061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2062 (exit $ac_status); }; then
2063 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2064# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2065# work properly (i.e., refer to `conftest.exe'), while it won't with
2066# `rm'.
2067for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2068 case $ac_file in
2069 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2070 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2071 export ac_cv_exeext
2072 break;;
2073 * ) break;;
2074 esac
2075done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002076else
Martin v. Löwis11437992002-04-12 09:54:03 +00002077 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2078echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2079 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002080fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002081
Martin v. Löwis11437992002-04-12 09:54:03 +00002082rm -f conftest$ac_cv_exeext
2083echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2084echo "${ECHO_T}$ac_cv_exeext" >&6
2085
2086rm -f conftest.$ac_ext
2087EXEEXT=$ac_cv_exeext
2088ac_exeext=$EXEEXT
2089echo "$as_me:$LINENO: checking for suffix of object files" >&5
2090echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2091if test "${ac_cv_objext+set}" = set; then
2092 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002093else
Martin v. Löwis11437992002-04-12 09:54:03 +00002094 cat >conftest.$ac_ext <<_ACEOF
2095#line $LINENO "configure"
2096#include "confdefs.h"
2097
2098#ifdef F77_DUMMY_MAIN
2099# ifdef __cplusplus
2100 extern "C"
2101# endif
2102 int F77_DUMMY_MAIN() { return 1; }
2103#endif
2104int
2105main ()
2106{
2107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112rm -f conftest.o conftest.obj
2113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2114 (eval $ac_compile) 2>&5
2115 ac_status=$?
2116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2117 (exit $ac_status); }; then
2118 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2119 case $ac_file in
2120 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2121 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2122 break;;
2123 esac
2124done
2125else
2126 echo "$as_me: failed program was:" >&5
2127cat conftest.$ac_ext >&5
2128{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2129echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2130 { (exit 1); exit 1; }; }
2131fi
2132
2133rm -f conftest.$ac_cv_objext conftest.$ac_ext
2134fi
2135echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2136echo "${ECHO_T}$ac_cv_objext" >&6
2137OBJEXT=$ac_cv_objext
2138ac_objext=$OBJEXT
2139echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2140echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2141if test "${ac_cv_c_compiler_gnu+set}" = set; then
2142 echo $ECHO_N "(cached) $ECHO_C" >&6
2143else
2144 cat >conftest.$ac_ext <<_ACEOF
2145#line $LINENO "configure"
2146#include "confdefs.h"
2147
2148#ifdef F77_DUMMY_MAIN
2149# ifdef __cplusplus
2150 extern "C"
2151# endif
2152 int F77_DUMMY_MAIN() { return 1; }
2153#endif
2154int
2155main ()
2156{
2157#ifndef __GNUC__
2158 choke me
2159#endif
2160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165rm -f conftest.$ac_objext
2166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2167 (eval $ac_compile) 2>&5
2168 ac_status=$?
2169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2170 (exit $ac_status); } &&
2171 { ac_try='test -s conftest.$ac_objext'
2172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2173 (eval $ac_try) 2>&5
2174 ac_status=$?
2175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2176 (exit $ac_status); }; }; then
2177 ac_compiler_gnu=yes
2178else
2179 echo "$as_me: failed program was:" >&5
2180cat conftest.$ac_ext >&5
2181ac_compiler_gnu=no
2182fi
2183rm -f conftest.$ac_objext conftest.$ac_ext
2184ac_cv_c_compiler_gnu=$ac_compiler_gnu
2185
2186fi
2187echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2188echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2189GCC=`test $ac_compiler_gnu = yes && echo yes`
2190ac_test_CFLAGS=${CFLAGS+set}
2191ac_save_CFLAGS=$CFLAGS
2192CFLAGS="-g"
2193echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2194echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2195if test "${ac_cv_prog_cc_g+set}" = set; then
2196 echo $ECHO_N "(cached) $ECHO_C" >&6
2197else
2198 cat >conftest.$ac_ext <<_ACEOF
2199#line $LINENO "configure"
2200#include "confdefs.h"
2201
2202#ifdef F77_DUMMY_MAIN
2203# ifdef __cplusplus
2204 extern "C"
2205# endif
2206 int F77_DUMMY_MAIN() { return 1; }
2207#endif
2208int
2209main ()
2210{
2211
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216rm -f conftest.$ac_objext
2217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2218 (eval $ac_compile) 2>&5
2219 ac_status=$?
2220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2221 (exit $ac_status); } &&
2222 { ac_try='test -s conftest.$ac_objext'
2223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2224 (eval $ac_try) 2>&5
2225 ac_status=$?
2226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2227 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002228 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002229else
Martin v. Löwis11437992002-04-12 09:54:03 +00002230 echo "$as_me: failed program was:" >&5
2231cat conftest.$ac_ext >&5
2232ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002234rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002235fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002236echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2237echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002238if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002239 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002240elif test $ac_cv_prog_cc_g = yes; then
2241 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002242 CFLAGS="-g -O2"
2243 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002244 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002245 fi
2246else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002247 if test "$GCC" = yes; then
2248 CFLAGS="-O2"
2249 else
2250 CFLAGS=
2251 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002252fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002253# Some people use a C++ compiler to compile C. Since we use `exit',
2254# in C++ we need to declare it. In case someone uses the same compiler
2255# for both compiling C and C++ we need to have the C++ compiler decide
2256# the declaration of exit, since it's the most demanding environment.
2257cat >conftest.$ac_ext <<_ACEOF
2258#ifndef __cplusplus
2259 choke me
2260#endif
2261_ACEOF
2262rm -f conftest.$ac_objext
2263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2264 (eval $ac_compile) 2>&5
2265 ac_status=$?
2266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2267 (exit $ac_status); } &&
2268 { ac_try='test -s conftest.$ac_objext'
2269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2270 (eval $ac_try) 2>&5
2271 ac_status=$?
2272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2273 (exit $ac_status); }; }; then
2274 for ac_declaration in \
2275 ''\
2276 '#include <stdlib.h>' \
2277 'extern "C" void std::exit (int) throw (); using std::exit;' \
2278 'extern "C" void std::exit (int); using std::exit;' \
2279 'extern "C" void exit (int) throw ();' \
2280 'extern "C" void exit (int);' \
2281 'void exit (int);'
2282do
2283 cat >conftest.$ac_ext <<_ACEOF
2284#line $LINENO "configure"
2285#include "confdefs.h"
2286#include <stdlib.h>
2287$ac_declaration
2288#ifdef F77_DUMMY_MAIN
2289# ifdef __cplusplus
2290 extern "C"
2291# endif
2292 int F77_DUMMY_MAIN() { return 1; }
2293#endif
2294int
2295main ()
2296{
2297exit (42);
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302rm -f conftest.$ac_objext
2303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2304 (eval $ac_compile) 2>&5
2305 ac_status=$?
2306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2307 (exit $ac_status); } &&
2308 { ac_try='test -s conftest.$ac_objext'
2309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2310 (eval $ac_try) 2>&5
2311 ac_status=$?
2312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2313 (exit $ac_status); }; }; then
2314 :
2315else
2316 echo "$as_me: failed program was:" >&5
2317cat conftest.$ac_ext >&5
2318continue
2319fi
2320rm -f conftest.$ac_objext conftest.$ac_ext
2321 cat >conftest.$ac_ext <<_ACEOF
2322#line $LINENO "configure"
2323#include "confdefs.h"
2324$ac_declaration
2325#ifdef F77_DUMMY_MAIN
2326# ifdef __cplusplus
2327 extern "C"
2328# endif
2329 int F77_DUMMY_MAIN() { return 1; }
2330#endif
2331int
2332main ()
2333{
2334exit (42);
2335 ;
2336 return 0;
2337}
2338_ACEOF
2339rm -f conftest.$ac_objext
2340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2341 (eval $ac_compile) 2>&5
2342 ac_status=$?
2343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2344 (exit $ac_status); } &&
2345 { ac_try='test -s conftest.$ac_objext'
2346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2347 (eval $ac_try) 2>&5
2348 ac_status=$?
2349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2350 (exit $ac_status); }; }; then
2351 break
2352else
2353 echo "$as_me: failed program was:" >&5
2354cat conftest.$ac_ext >&5
2355fi
2356rm -f conftest.$ac_objext conftest.$ac_ext
2357done
2358rm -f conftest*
2359if test -n "$ac_declaration"; then
2360 echo '#ifdef __cplusplus' >>confdefs.h
2361 echo $ac_declaration >>confdefs.h
2362 echo '#endif' >>confdefs.h
2363fi
2364
2365else
2366 echo "$as_me: failed program was:" >&5
2367cat conftest.$ac_ext >&5
2368fi
2369rm -f conftest.$ac_objext conftest.$ac_ext
2370ac_ext=c
2371ac_cpp='$CPP $CPPFLAGS'
2372ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2373ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2374ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002375
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002376
2377# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379ac_ext=c
2380ac_cpp='$CPP $CPPFLAGS'
2381ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2382ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2383ac_compiler_gnu=$ac_cv_c_compiler_gnu
2384echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2385echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002386# On Suns, sometimes $CPP names a directory.
2387if test -n "$CPP" && test -d "$CPP"; then
2388 CPP=
2389fi
2390if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002391 if test "${ac_cv_prog_CPP+set}" = set; then
2392 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002393else
Martin v. Löwis11437992002-04-12 09:54:03 +00002394 # Double quotes because CPP needs to be expanded
2395 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2396 do
2397 ac_preproc_ok=false
2398for ac_c_preproc_warn_flag in '' yes
2399do
2400 # Use a header file that comes with gcc, so configuring glibc
2401 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002402 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002403 # not just through cpp. "Syntax error" is here to catch this case.
2404 cat >conftest.$ac_ext <<_ACEOF
2405#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002406#include "confdefs.h"
2407#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002408 Syntax error
2409_ACEOF
2410if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2411 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2412 ac_status=$?
2413 egrep -v '^ *\+' conftest.er1 >conftest.err
2414 rm -f conftest.er1
2415 cat conftest.err >&5
2416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2417 (exit $ac_status); } >/dev/null; then
2418 if test -s conftest.err; then
2419 ac_cpp_err=$ac_c_preproc_warn_flag
2420 else
2421 ac_cpp_err=
2422 fi
2423else
2424 ac_cpp_err=yes
2425fi
2426if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002427 :
2428else
Martin v. Löwis11437992002-04-12 09:54:03 +00002429 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002430 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 # Broken: fails on valid input.
2432continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002434rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002435
Martin v. Löwis11437992002-04-12 09:54:03 +00002436 # OK, works on sane cases. Now check whether non-existent headers
2437 # can be detected and how.
2438 cat >conftest.$ac_ext <<_ACEOF
2439#line $LINENO "configure"
2440#include "confdefs.h"
2441#include <ac_nonexistent.h>
2442_ACEOF
2443if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2444 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2445 ac_status=$?
2446 egrep -v '^ *\+' conftest.er1 >conftest.err
2447 rm -f conftest.er1
2448 cat conftest.err >&5
2449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2450 (exit $ac_status); } >/dev/null; then
2451 if test -s conftest.err; then
2452 ac_cpp_err=$ac_c_preproc_warn_flag
2453 else
2454 ac_cpp_err=
2455 fi
2456else
2457 ac_cpp_err=yes
2458fi
2459if test -z "$ac_cpp_err"; then
2460 # Broken: success on invalid input.
2461continue
2462else
2463 echo "$as_me: failed program was:" >&5
2464 cat conftest.$ac_ext >&5
2465 # Passes both tests.
2466ac_preproc_ok=:
2467break
2468fi
2469rm -f conftest.err conftest.$ac_ext
2470
2471done
2472# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2473rm -f conftest.err conftest.$ac_ext
2474if $ac_preproc_ok; then
2475 break
2476fi
2477
2478 done
2479 ac_cv_prog_CPP=$CPP
2480
2481fi
2482 CPP=$ac_cv_prog_CPP
2483else
2484 ac_cv_prog_CPP=$CPP
2485fi
2486echo "$as_me:$LINENO: result: $CPP" >&5
2487echo "${ECHO_T}$CPP" >&6
2488ac_preproc_ok=false
2489for ac_c_preproc_warn_flag in '' yes
2490do
2491 # Use a header file that comes with gcc, so configuring glibc
2492 # with a fresh cross-compiler works.
2493 # On the NeXT, cc -E runs the code through the compiler's parser,
2494 # not just through cpp. "Syntax error" is here to catch this case.
2495 cat >conftest.$ac_ext <<_ACEOF
2496#line $LINENO "configure"
2497#include "confdefs.h"
2498#include <assert.h>
2499 Syntax error
2500_ACEOF
2501if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2502 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2503 ac_status=$?
2504 egrep -v '^ *\+' conftest.er1 >conftest.err
2505 rm -f conftest.er1
2506 cat conftest.err >&5
2507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2508 (exit $ac_status); } >/dev/null; then
2509 if test -s conftest.err; then
2510 ac_cpp_err=$ac_c_preproc_warn_flag
2511 else
2512 ac_cpp_err=
2513 fi
2514else
2515 ac_cpp_err=yes
2516fi
2517if test -z "$ac_cpp_err"; then
2518 :
2519else
2520 echo "$as_me: failed program was:" >&5
2521 cat conftest.$ac_ext >&5
2522 # Broken: fails on valid input.
2523continue
2524fi
2525rm -f conftest.err conftest.$ac_ext
2526
2527 # OK, works on sane cases. Now check whether non-existent headers
2528 # can be detected and how.
2529 cat >conftest.$ac_ext <<_ACEOF
2530#line $LINENO "configure"
2531#include "confdefs.h"
2532#include <ac_nonexistent.h>
2533_ACEOF
2534if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2535 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2536 ac_status=$?
2537 egrep -v '^ *\+' conftest.er1 >conftest.err
2538 rm -f conftest.er1
2539 cat conftest.err >&5
2540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2541 (exit $ac_status); } >/dev/null; then
2542 if test -s conftest.err; then
2543 ac_cpp_err=$ac_c_preproc_warn_flag
2544 else
2545 ac_cpp_err=
2546 fi
2547else
2548 ac_cpp_err=yes
2549fi
2550if test -z "$ac_cpp_err"; then
2551 # Broken: success on invalid input.
2552continue
2553else
2554 echo "$as_me: failed program was:" >&5
2555 cat conftest.$ac_ext >&5
2556 # Passes both tests.
2557ac_preproc_ok=:
2558break
2559fi
2560rm -f conftest.err conftest.$ac_ext
2561
2562done
2563# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2564rm -f conftest.err conftest.$ac_ext
2565if $ac_preproc_ok; then
2566 :
2567else
2568 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2569echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2570 { (exit 1); exit 1; }; }
2571fi
2572
2573ac_ext=c
2574ac_cpp='$CPP $CPPFLAGS'
2575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2577ac_compiler_gnu=$ac_cv_c_compiler_gnu
2578
2579
2580
2581echo "$as_me:$LINENO: checking for AIX" >&5
2582echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2583cat >conftest.$ac_ext <<_ACEOF
2584#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002585#include "confdefs.h"
2586#ifdef _AIX
2587 yes
2588#endif
2589
Martin v. Löwis11437992002-04-12 09:54:03 +00002590_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002591if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2592 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 echo "$as_me:$LINENO: result: yes" >&5
2594echo "${ECHO_T}yes" >&6
2595cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002596#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002597_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002598
2599else
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 echo "$as_me:$LINENO: result: no" >&5
2601echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002602fi
2603rm -f conftest*
2604
Michael W. Hudson54241132001-12-07 15:38:26 +00002605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2607echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2608if test "${ac_cv_header_stdc+set}" = set; then
2609 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002610else
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 cat >conftest.$ac_ext <<_ACEOF
2612#line $LINENO "configure"
2613#include "confdefs.h"
2614#include <stdlib.h>
2615#include <stdarg.h>
2616#include <string.h>
2617#include <float.h>
2618
2619_ACEOF
2620if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2621 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2622 ac_status=$?
2623 egrep -v '^ *\+' conftest.er1 >conftest.err
2624 rm -f conftest.er1
2625 cat conftest.err >&5
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); } >/dev/null; then
2628 if test -s conftest.err; then
2629 ac_cpp_err=$ac_c_preproc_warn_flag
2630 else
2631 ac_cpp_err=
2632 fi
2633else
2634 ac_cpp_err=yes
2635fi
2636if test -z "$ac_cpp_err"; then
2637 ac_cv_header_stdc=yes
2638else
2639 echo "$as_me: failed program was:" >&5
2640 cat conftest.$ac_ext >&5
2641 ac_cv_header_stdc=no
2642fi
2643rm -f conftest.err conftest.$ac_ext
2644
2645if test $ac_cv_header_stdc = yes; then
2646 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2647 cat >conftest.$ac_ext <<_ACEOF
2648#line $LINENO "configure"
2649#include "confdefs.h"
2650#include <string.h>
2651
2652_ACEOF
2653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2654 egrep "memchr" >/dev/null 2>&1; then
2655 :
2656else
2657 ac_cv_header_stdc=no
2658fi
2659rm -f conftest*
2660
2661fi
2662
2663if test $ac_cv_header_stdc = yes; then
2664 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2665 cat >conftest.$ac_ext <<_ACEOF
2666#line $LINENO "configure"
2667#include "confdefs.h"
2668#include <stdlib.h>
2669
2670_ACEOF
2671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2672 egrep "free" >/dev/null 2>&1; then
2673 :
2674else
2675 ac_cv_header_stdc=no
2676fi
2677rm -f conftest*
2678
2679fi
2680
2681if test $ac_cv_header_stdc = yes; then
2682 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2683 if test "$cross_compiling" = yes; then
2684 :
2685else
2686 cat >conftest.$ac_ext <<_ACEOF
2687#line $LINENO "configure"
2688#include "confdefs.h"
2689#include <ctype.h>
2690#if ((' ' & 0x0FF) == 0x020)
2691# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2692# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2693#else
2694# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2695 || ('j' <= (c) && (c) <= 'r') \
2696 || ('s' <= (c) && (c) <= 'z'))
2697# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2698#endif
2699
2700#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2701int
2702main ()
2703{
2704 int i;
2705 for (i = 0; i < 256; i++)
2706 if (XOR (islower (i), ISLOWER (i))
2707 || toupper (i) != TOUPPER (i))
2708 exit(2);
2709 exit (0);
2710}
2711_ACEOF
2712rm -f conftest$ac_exeext
2713if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2714 (eval $ac_link) 2>&5
2715 ac_status=$?
2716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2717 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2719 (eval $ac_try) 2>&5
2720 ac_status=$?
2721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2722 (exit $ac_status); }; }; then
2723 :
2724else
2725 echo "$as_me: program exited with status $ac_status" >&5
2726echo "$as_me: failed program was:" >&5
2727cat conftest.$ac_ext >&5
2728( exit $ac_status )
2729ac_cv_header_stdc=no
2730fi
2731rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2732fi
2733fi
2734fi
2735echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2736echo "${ECHO_T}$ac_cv_header_stdc" >&6
2737if test $ac_cv_header_stdc = yes; then
2738
2739cat >>confdefs.h <<\_ACEOF
2740#define STDC_HEADERS 1
2741_ACEOF
2742
2743fi
2744
2745# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2756 inttypes.h stdint.h unistd.h
2757do
2758as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2759echo "$as_me:$LINENO: checking for $ac_header" >&5
2760echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2761if eval "test \"\${$as_ac_Header+set}\" = set"; then
2762 echo $ECHO_N "(cached) $ECHO_C" >&6
2763else
2764 cat >conftest.$ac_ext <<_ACEOF
2765#line $LINENO "configure"
2766#include "confdefs.h"
2767$ac_includes_default
2768
2769#include <$ac_header>
2770_ACEOF
2771rm -f conftest.$ac_objext
2772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2773 (eval $ac_compile) 2>&5
2774 ac_status=$?
2775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2776 (exit $ac_status); } &&
2777 { ac_try='test -s conftest.$ac_objext'
2778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2779 (eval $ac_try) 2>&5
2780 ac_status=$?
2781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2782 (exit $ac_status); }; }; then
2783 eval "$as_ac_Header=yes"
2784else
2785 echo "$as_me: failed program was:" >&5
2786cat conftest.$ac_ext >&5
2787eval "$as_ac_Header=no"
2788fi
2789rm -f conftest.$ac_objext conftest.$ac_ext
2790fi
2791echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2792echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2793if test `eval echo '${'$as_ac_Header'}'` = yes; then
2794 cat >>confdefs.h <<_ACEOF
2795#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2796_ACEOF
2797
2798fi
2799
2800done
2801
2802
2803if test "${ac_cv_header_minix_config_h+set}" = set; then
2804 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2805echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2806if test "${ac_cv_header_minix_config_h+set}" = set; then
2807 echo $ECHO_N "(cached) $ECHO_C" >&6
2808fi
2809echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2810echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2811else
2812 # Is the header compilable?
2813echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2814echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2815cat >conftest.$ac_ext <<_ACEOF
2816#line $LINENO "configure"
2817#include "confdefs.h"
2818$ac_includes_default
2819#include <minix/config.h>
2820_ACEOF
2821rm -f conftest.$ac_objext
2822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2823 (eval $ac_compile) 2>&5
2824 ac_status=$?
2825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2826 (exit $ac_status); } &&
2827 { ac_try='test -s conftest.$ac_objext'
2828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2829 (eval $ac_try) 2>&5
2830 ac_status=$?
2831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2832 (exit $ac_status); }; }; then
2833 ac_header_compiler=yes
2834else
2835 echo "$as_me: failed program was:" >&5
2836cat conftest.$ac_ext >&5
2837ac_header_compiler=no
2838fi
2839rm -f conftest.$ac_objext conftest.$ac_ext
2840echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2841echo "${ECHO_T}$ac_header_compiler" >&6
2842
2843# Is the header present?
2844echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2845echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2846cat >conftest.$ac_ext <<_ACEOF
2847#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002848#include "confdefs.h"
2849#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002850_ACEOF
2851if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2852 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2853 ac_status=$?
2854 egrep -v '^ *\+' conftest.er1 >conftest.err
2855 rm -f conftest.er1
2856 cat conftest.err >&5
2857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2858 (exit $ac_status); } >/dev/null; then
2859 if test -s conftest.err; then
2860 ac_cpp_err=$ac_c_preproc_warn_flag
2861 else
2862 ac_cpp_err=
2863 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002864else
Martin v. Löwis11437992002-04-12 09:54:03 +00002865 ac_cpp_err=yes
2866fi
2867if test -z "$ac_cpp_err"; then
2868 ac_header_preproc=yes
2869else
2870 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002871 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002872 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002873fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002874rm -f conftest.err conftest.$ac_ext
2875echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2876echo "${ECHO_T}$ac_header_preproc" >&6
2877
2878# So? What about this header?
2879case $ac_header_compiler:$ac_header_preproc in
2880 yes:no )
2881 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2882echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2883 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2884echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2885 no:yes )
2886 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2887echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2888 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2889echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2890 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2891echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2892esac
2893echo "$as_me:$LINENO: checking for minix/config.h" >&5
2894echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2895if test "${ac_cv_header_minix_config_h+set}" = set; then
2896 echo $ECHO_N "(cached) $ECHO_C" >&6
2897else
2898 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002899fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002900echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2901echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2902
2903fi
2904if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002905 MINIX=yes
2906else
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002908fi
2909
Martin v. Löwis11437992002-04-12 09:54:03 +00002910
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002911if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002912
2913cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002914#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002915_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002916
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
2918cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002919#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002920_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002921
Martin v. Löwis11437992002-04-12 09:54:03 +00002922
2923cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002924#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002925_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002926
2927fi
2928
2929
Michael W. Hudson54241132001-12-07 15:38:26 +00002930
Martin v. Löwis11437992002-04-12 09:54:03 +00002931echo "$as_me:$LINENO: checking for --with-suffix" >&5
2932echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002933
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002934# Check whether --with-suffix or --without-suffix was given.
2935if test "${with_suffix+set}" = set; then
2936 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002938 case $withval in
2939 no) EXEEXT=;;
2940 yes) EXEEXT=.exe;;
2941 *) EXEEXT=$withval;;
2942 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002943fi;
2944echo "$as_me:$LINENO: result: $EXEEXT" >&5
2945echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002946
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002947# Test whether we're running on a non-case-sensitive system, in which
2948# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2951echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002952if test -d "python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002953then
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 echo "$as_me:$LINENO: result: yes" >&5
2955echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002956 BUILDEXEEXT=.exe
2957else
Martin v. Löwis11437992002-04-12 09:54:03 +00002958 echo "$as_me:$LINENO: result: no" >&5
2959echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002960 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002961fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002962
Guido van Rossumdd997f71998-10-07 19:58:26 +00002963case $MACHDEP in
2964bsdos*)
2965 case $CC in
2966 gcc) CC="$CC -D_HAVE_BSDI";;
2967 esac;;
2968esac
2969
Guido van Rossum24b1e751997-08-21 02:29:16 +00002970case $ac_sys_system in
2971hp*|HP*)
2972 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002973 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002974 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002975Monterey*)
2976 case $CC in
2977 cc) CC="$CC -Wl,-Bexport";;
2978 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002979SunOS*)
2980 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002981
2982cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002983#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002984_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002985
2986 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002987esac
2988
Michael W. Hudson54241132001-12-07 15:38:26 +00002989
2990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991echo "$as_me:$LINENO: checking LIBRARY" >&5
2992echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002993if test -z "$LIBRARY"
2994then
2995 LIBRARY='libpython$(VERSION).a'
2996fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002997echo "$as_me:$LINENO: result: $LIBRARY" >&5
2998echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002999
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003000# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003001# name of the library into which to insert object files). BLDLIBRARY is also
3002# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3003# is blank as the main program is not linked directly against LDLIBRARY.
3004# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3005# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3006# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3007# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003008#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003009# RUNSHARED is used to run shared python without installed libraries
3010#
3011# INSTSONAME is the name of the shared library that will be use to install
3012# on the system - some systems like version suffix, others don't
3013
3014
Michael W. Hudson54241132001-12-07 15:38:26 +00003015
3016
3017
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003018
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003019LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003020BLDLIBRARY='$(LDLIBRARY)'
Martin v. Lö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
3040 echo 'int main(){return 0;}' > conftest.$ac_ext
3041 $CXX -c conftest.$ac_ext 2>&5
3042 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3043 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3044 then
3045 LINKCC="\$(PURIFY) \$(CC)"
3046 else
3047 LINKCC="\$(PURIFY) \$(CXX)"
3048 fi
3049 rm -fr conftest*
3050 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003051 case $ac_sys_system in
3052 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003053 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003054 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003055 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003056 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003057 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003058 esac
3059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003060echo "$as_me:$LINENO: result: $LINKCC" >&5
3061echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003062
Martin v. Löwis11437992002-04-12 09:54:03 +00003063echo "$as_me:$LINENO: checking for --enable-shared" >&5
3064echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003065# Check whether --enable-shared or --disable-shared was given.
3066if test "${enable_shared+set}" = set; then
3067 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003068
Martin v. Löwis11437992002-04-12 09:54:03 +00003069fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003070
3071if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003072then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003073 case $ac_sys_system in
3074 CYGWIN*)
3075 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
3104 case $ac_sys_system in
3105 BeOS*)
3106 LDLIBRARY='libpython$(VERSION).so'
3107 ;;
3108 CYGWIN*)
3109 LDLIBRARY='libpython$(VERSION).dll.a'
3110 DLLLIBRARY='libpython$(VERSION).dll'
3111 ;;
3112 SunOS*)
3113 LDLIBRARY='libpython$(VERSION).so'
3114 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3115 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3116 ;;
3117 Linux*)
3118 LDLIBRARY='libpython$(VERSION).so'
3119 BLDLIBRARY='-L. -lpython$(VERSION)'
3120 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3121 INSTSONAME="$LDLIBRARY".$SOVERSION
3122 ;;
3123 hp*|HP*)
3124 LDLIBRARY='libpython$(VERSION).sl'
3125 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3126 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3127 ;;
3128 OSF*)
3129 LDLIBRARY='libpython$(VERSION).so'
3130 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3131 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3132 ;;
3133 esac
3134 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3135 case $MACHDEP in
3136 dguxR4)
3137 LDLIBRARY='libpython$(VERSION).so'
3138 OPT="$OPT -pic"
3139 ;;
3140 esac
3141fi
3142
Martin v. Löwis11437992002-04-12 09:54:03 +00003143echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3144echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003145
Martin v. Löwis11437992002-04-12 09:54:03 +00003146if test -n "$ac_tool_prefix"; then
3147 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3148set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3149echo "$as_me:$LINENO: checking for $ac_word" >&5
3150echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3151if test "${ac_cv_prog_RANLIB+set}" = set; then
3152 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003153else
3154 if test -n "$RANLIB"; then
3155 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3156else
Martin v. Löwis11437992002-04-12 09:54:03 +00003157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3158for as_dir in $PATH
3159do
3160 IFS=$as_save_IFS
3161 test -z "$as_dir" && as_dir=.
3162 for ac_exec_ext in '' $ac_executable_extensions; do
3163 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3164 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3165 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3166 break 2
3167 fi
3168done
3169done
3170
Guido van Rossum627b2d71993-12-24 10:39:16 +00003171fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003172fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003173RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003174if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003175 echo "$as_me:$LINENO: result: $RANLIB" >&5
3176echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003177else
Martin v. Löwis11437992002-04-12 09:54:03 +00003178 echo "$as_me:$LINENO: result: no" >&5
3179echo "${ECHO_T}no" >&6
3180fi
3181
3182fi
3183if test -z "$ac_cv_prog_RANLIB"; then
3184 ac_ct_RANLIB=$RANLIB
3185 # Extract the first word of "ranlib", so it can be a program name with args.
3186set dummy ranlib; ac_word=$2
3187echo "$as_me:$LINENO: checking for $ac_word" >&5
3188echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3189if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3190 echo $ECHO_N "(cached) $ECHO_C" >&6
3191else
3192 if test -n "$ac_ct_RANLIB"; then
3193 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3194else
3195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3196for as_dir in $PATH
3197do
3198 IFS=$as_save_IFS
3199 test -z "$as_dir" && as_dir=.
3200 for ac_exec_ext in '' $ac_executable_extensions; do
3201 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3202 ac_cv_prog_ac_ct_RANLIB="ranlib"
3203 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3204 break 2
3205 fi
3206done
3207done
3208
3209 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3210fi
3211fi
3212ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3213if test -n "$ac_ct_RANLIB"; then
3214 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3215echo "${ECHO_T}$ac_ct_RANLIB" >&6
3216else
3217 echo "$as_me:$LINENO: result: no" >&5
3218echo "${ECHO_T}no" >&6
3219fi
3220
3221 RANLIB=$ac_ct_RANLIB
3222else
3223 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003224fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003225
3226
Guido van Rossum7f43da71994-08-01 12:15:30 +00003227for ac_prog in ar aal
3228do
Martin v. Löwis11437992002-04-12 09:54:03 +00003229 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003230set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003231echo "$as_me:$LINENO: checking for $ac_word" >&5
3232echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3233if test "${ac_cv_prog_AR+set}" = set; then
3234 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003235else
3236 if test -n "$AR"; then
3237 ac_cv_prog_AR="$AR" # Let the user override the test.
3238else
Martin v. Löwis11437992002-04-12 09:54:03 +00003239as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3240for as_dir in $PATH
3241do
3242 IFS=$as_save_IFS
3243 test -z "$as_dir" && as_dir=.
3244 for ac_exec_ext in '' $ac_executable_extensions; do
3245 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3246 ac_cv_prog_AR="$ac_prog"
3247 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3248 break 2
3249 fi
3250done
3251done
3252
Guido van Rossum7f43da71994-08-01 12:15:30 +00003253fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003254fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003255AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003256if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003257 echo "$as_me:$LINENO: result: $AR" >&5
3258echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003259else
Martin v. Löwis11437992002-04-12 09:54:03 +00003260 echo "$as_me:$LINENO: result: no" >&5
3261echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003262fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003263
Martin v. Löwis11437992002-04-12 09:54:03 +00003264 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003265done
3266test -n "$AR" || AR="ar"
3267
Michael W. Hudson54241132001-12-07 15:38:26 +00003268
Neil Schemenauera42c8272001-03-31 00:01:55 +00003269case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003270bsdos*|hp*|HP*)
3271 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003272 if test -z "$INSTALL"
3273 then
3274 INSTALL="${srcdir}/install-sh -c"
3275 fi
3276esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003277ac_aux_dir=
3278for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3279 if test -f $ac_dir/install-sh; then
3280 ac_aux_dir=$ac_dir
3281 ac_install_sh="$ac_aux_dir/install-sh -c"
3282 break
3283 elif test -f $ac_dir/install.sh; then
3284 ac_aux_dir=$ac_dir
3285 ac_install_sh="$ac_aux_dir/install.sh -c"
3286 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003287 elif test -f $ac_dir/shtool; then
3288 ac_aux_dir=$ac_dir
3289 ac_install_sh="$ac_aux_dir/shtool install -c"
3290 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003291 fi
3292done
3293if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003294 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3295echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3296 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003297fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003298ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3299ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3300ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003301
3302# Find a good install program. We prefer a C program (faster),
3303# so one script is as good as another. But avoid the broken or
3304# incompatible versions:
3305# SysV /etc/install, /usr/sbin/install
3306# SunOS /usr/etc/install
3307# IRIX /sbin/install
3308# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003309# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003310# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3311# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3312# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3313# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003314echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3315echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003316if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003317if test "${ac_cv_path_install+set}" = set; then
3318 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003319else
Martin v. Löwis11437992002-04-12 09:54:03 +00003320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3321for as_dir in $PATH
3322do
3323 IFS=$as_save_IFS
3324 test -z "$as_dir" && as_dir=.
3325 # Account for people who put trailing slashes in PATH elements.
3326case $as_dir/ in
3327 ./ | .// | /cC/* | \
3328 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3329 /usr/ucb/* ) ;;
3330 *)
3331 # OSF1 and SCO ODT 3.0 have their own names for install.
3332 # Don't use installbsd from OSF since it installs stuff as root
3333 # by default.
3334 for ac_prog in ginstall scoinst install; do
3335 for ac_exec_ext in '' $ac_executable_extensions; do
3336 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3337 if test $ac_prog = install &&
3338 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3339 # AIX install. It has an incompatible calling convention.
3340 :
3341 elif test $ac_prog = install &&
3342 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3343 # program-specific install script used by HP pwplus--don't use.
3344 :
3345 else
3346 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3347 break 3
3348 fi
3349 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003350 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003351 done
3352 ;;
3353esac
3354done
3355
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003356
3357fi
3358 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003359 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003360 else
3361 # As a last resort, use the slow shell script. We don't cache a
3362 # path for INSTALL within a source directory, because that will
3363 # break other packages using the cache if that directory is
3364 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003365 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003366 fi
3367fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003368echo "$as_me:$LINENO: result: $INSTALL" >&5
3369echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003370
3371# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3372# It thinks the first close brace ends the variable substitution.
3373test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3374
Martin v. Löwis11437992002-04-12 09:54:03 +00003375test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003376
3377test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3378
Michael W. Hudson54241132001-12-07 15:38:26 +00003379
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003380# Not every filesystem supports hard links
3381
3382if test -z "$LN" ; then
3383 case $ac_sys_system in
3384 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003385 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003386 *) LN=ln;;
3387 esac
3388fi
3389
Fred Drake109d9862001-07-11 06:27:56 +00003390# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003391echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3392echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3393
Fred Drake109d9862001-07-11 06:27:56 +00003394# Check whether --with-pydebug or --without-pydebug was given.
3395if test "${with_pydebug+set}" = set; then
3396 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003397
Fred Drake109d9862001-07-11 06:27:56 +00003398if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003399then
3400
3401cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003402#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003403_ACEOF
3404
3405 echo "$as_me:$LINENO: result: yes" >&5
3406echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003407 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003408else echo "$as_me:$LINENO: result: no" >&5
3409echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003410fi
3411else
Martin v. Löwis11437992002-04-12 09:54:03 +00003412 echo "$as_me:$LINENO: result: no" >&5
3413echo "${ECHO_T}no" >&6
3414fi;
Fred Drake109d9862001-07-11 06:27:56 +00003415
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003416# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003417
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003418if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003419then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003420 case $GCC in
3421 yes)
3422 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003423 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003424 if test "$Py_DEBUG" = 'true' ; then
3425 # Optimization messes up debuggers, so turn it off for
3426 # debug builds.
3427 OPT="-g -Wall -Wstrict-prototypes"
3428 else
3429 OPT="-g -O3 -Wall -Wstrict-prototypes"
3430 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003431 *)
Fred Drake109d9862001-07-11 06:27:56 +00003432 OPT="-O3 -Wall -Wstrict-prototypes";;
3433 esac
3434 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003435 *)
3436 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003437 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003438 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3439 *)
3440 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003441 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003442 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003443 case $ac_sys_system in
3444 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003445 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003446 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003447fi
3448
Fred Drakee1ceaa02001-12-04 20:55:47 +00003449if test "$Py_DEBUG" = 'true'; then
3450 :
3451else
3452 OPT="-DNDEBUG $OPT"
3453fi
3454
Trent Mick635f6fb2000-08-23 21:33:05 +00003455# The current (beta) Monterey compiler dies with optimizations
3456case $ac_sys_system in
3457Monterey*) OPT="";;
3458esac
3459
Guido van Rossum563e7081996-09-10 18:20:48 +00003460if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003461then
3462 OPT="$OPT $ac_arch_flags"
3463fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003464
Martin v. Löwis11437992002-04-12 09:54:03 +00003465echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3466echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3467if test "${ac_cv_opt_olimit_ok+set}" = set; then
3468 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003469else
3470 ac_save_cc="$CC"
3471CC="$CC -OPT:Olimit=0"
3472if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003473 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003474else
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 cat >conftest.$ac_ext <<_ACEOF
3476#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003477#include "confdefs.h"
3478int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003479_ACEOF
3480rm -f conftest$ac_exeext
3481if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3482 (eval $ac_link) 2>&5
3483 ac_status=$?
3484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3485 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3487 (eval $ac_try) 2>&5
3488 ac_status=$?
3489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3490 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003491 ac_cv_opt_olimit_ok=yes
3492else
Martin v. Löwis11437992002-04-12 09:54:03 +00003493 echo "$as_me: program exited with status $ac_status" >&5
3494echo "$as_me: failed program was:" >&5
3495cat conftest.$ac_ext >&5
3496( exit $ac_status )
3497ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003498fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003499rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003500fi
Guido van Rossum91922671997-10-09 20:24:13 +00003501CC="$ac_save_cc"
3502fi
3503
Martin v. Löwis11437992002-04-12 09:54:03 +00003504echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3505echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003506if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003507 case $ac_sys_system in
3508 Darwin*) OPT="$OPT" ;;
3509 *) OPT="$OPT -OPT:Olimit=0";;
3510 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003511else
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3513echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3514 if test "${ac_cv_olimit_ok+set}" = set; then
3515 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003516else
3517 ac_save_cc="$CC"
3518 CC="$CC -Olimit 1500"
3519 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003520 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003521else
Martin v. Löwis11437992002-04-12 09:54:03 +00003522 cat >conftest.$ac_ext <<_ACEOF
3523#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003524#include "confdefs.h"
3525int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003526_ACEOF
3527rm -f conftest$ac_exeext
3528if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3529 (eval $ac_link) 2>&5
3530 ac_status=$?
3531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3532 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3534 (eval $ac_try) 2>&5
3535 ac_status=$?
3536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3537 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003538 ac_cv_olimit_ok=yes
3539else
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 echo "$as_me: program exited with status $ac_status" >&5
3541echo "$as_me: failed program was:" >&5
3542cat conftest.$ac_ext >&5
3543( exit $ac_status )
3544ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003545fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003546rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003547fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003548 CC="$ac_save_cc"
3549fi
3550
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3552echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003553 if test $ac_cv_olimit_ok = yes; then
3554 OPT="$OPT -Olimit 1500"
3555 fi
3556fi
3557
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003558# On some compilers, pthreads are available without further options
3559# (e.g. MacOS X). On some of these systems, the compiler will not
3560# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3561# So we have to see first whether pthreads are available without
3562# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003563echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3564echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3565if test "${ac_cv_pthread_is_default+set}" = set; then
3566 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003567else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003568 if test "$cross_compiling" = yes; then
3569 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003570else
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 cat >conftest.$ac_ext <<_ACEOF
3572#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003573#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003574
Martin v. Löwis130fb172001-07-19 11:00:41 +00003575#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003576
3577void* routine(void* p){return NULL;}
3578
3579int main(){
3580 pthread_t p;
3581 if(pthread_create(&p,NULL,routine,NULL)!=0)
3582 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003583 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003584 return 0;
3585}
3586
Martin v. Löwis11437992002-04-12 09:54:03 +00003587_ACEOF
3588rm -f conftest$ac_exeext
3589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3590 (eval $ac_link) 2>&5
3591 ac_status=$?
3592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3595 (eval $ac_try) 2>&5
3596 ac_status=$?
3597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3598 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003599 ac_cv_pthread_is_default=yes
3600else
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 echo "$as_me: program exited with status $ac_status" >&5
3602echo "$as_me: failed program was:" >&5
3603cat conftest.$ac_ext >&5
3604( exit $ac_status )
3605ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003607rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003608fi
3609
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003610fi
3611
Martin v. Löwis11437992002-04-12 09:54:03 +00003612echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3613echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003614
Michael W. Hudson54241132001-12-07 15:38:26 +00003615
Martin v. Löwis11437992002-04-12 09:54:03 +00003616if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003617then
3618 ac_cv_kpthread=no
3619else
3620# -Kpthread, if available, provides the right #defines
3621# and linker options to make pthread_create available
3622# Some compilers won't report that they do not support -Kpthread,
3623# so we need to run a program to see whether it really made the
3624# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003625echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3626echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3627if test "${ac_cv_kpthread+set}" = set; then
3628 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003629else
3630 ac_save_cc="$CC"
3631CC="$CC -Kpthread"
3632if test "$cross_compiling" = yes; then
3633 ac_cv_kpthread=no
3634else
Martin v. Löwis11437992002-04-12 09:54:03 +00003635 cat >conftest.$ac_ext <<_ACEOF
3636#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003637#include "confdefs.h"
3638
3639#include <pthread.h>
3640
3641void* routine(void* p){return NULL;}
3642
3643int main(){
3644 pthread_t p;
3645 if(pthread_create(&p,NULL,routine,NULL)!=0)
3646 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003647 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003648 return 0;
3649}
3650
Martin v. Löwis11437992002-04-12 09:54:03 +00003651_ACEOF
3652rm -f conftest$ac_exeext
3653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3654 (eval $ac_link) 2>&5
3655 ac_status=$?
3656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3657 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3659 (eval $ac_try) 2>&5
3660 ac_status=$?
3661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3662 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003663 ac_cv_kpthread=yes
3664else
Martin v. Löwis11437992002-04-12 09:54:03 +00003665 echo "$as_me: program exited with status $ac_status" >&5
3666echo "$as_me: failed program was:" >&5
3667cat conftest.$ac_ext >&5
3668( exit $ac_status )
3669ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003670fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003671rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003672fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003673CC="$ac_save_cc"
3674fi
3675
Martin v. Löwis11437992002-04-12 09:54:03 +00003676echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3677echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003678fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003679
Michael W. Hudson54241132001-12-07 15:38:26 +00003680
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003681# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003682echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3683echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3684if test "${ac_cv_header_stdc+set}" = set; then
3685 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003686else
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 cat >conftest.$ac_ext <<_ACEOF
3688#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003689#include "confdefs.h"
3690#include <stdlib.h>
3691#include <stdarg.h>
3692#include <string.h>
3693#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003694
3695_ACEOF
3696if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3697 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3698 ac_status=$?
3699 egrep -v '^ *\+' conftest.er1 >conftest.err
3700 rm -f conftest.er1
3701 cat conftest.err >&5
3702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3703 (exit $ac_status); } >/dev/null; then
3704 if test -s conftest.err; then
3705 ac_cpp_err=$ac_c_preproc_warn_flag
3706 else
3707 ac_cpp_err=
3708 fi
3709else
3710 ac_cpp_err=yes
3711fi
3712if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003713 ac_cv_header_stdc=yes
3714else
Martin v. Löwis11437992002-04-12 09:54:03 +00003715 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003716 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003717 ac_cv_header_stdc=no
3718fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003719rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003720
3721if test $ac_cv_header_stdc = yes; then
3722 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 cat >conftest.$ac_ext <<_ACEOF
3724#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003725#include "confdefs.h"
3726#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003727
3728_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003729if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3730 egrep "memchr" >/dev/null 2>&1; then
3731 :
3732else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003733 ac_cv_header_stdc=no
3734fi
3735rm -f conftest*
3736
3737fi
3738
3739if test $ac_cv_header_stdc = yes; then
3740 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 cat >conftest.$ac_ext <<_ACEOF
3742#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003743#include "confdefs.h"
3744#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003745
3746_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3748 egrep "free" >/dev/null 2>&1; then
3749 :
3750else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003751 ac_cv_header_stdc=no
3752fi
3753rm -f conftest*
3754
3755fi
3756
3757if test $ac_cv_header_stdc = yes; then
3758 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003759 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003761else
Martin v. Löwis11437992002-04-12 09:54:03 +00003762 cat >conftest.$ac_ext <<_ACEOF
3763#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003764#include "confdefs.h"
3765#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003766#if ((' ' & 0x0FF) == 0x020)
3767# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3768# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3769#else
3770# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3771 || ('j' <= (c) && (c) <= 'r') \
3772 || ('s' <= (c) && (c) <= 'z'))
3773# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3774#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003775
Martin v. Löwis11437992002-04-12 09:54:03 +00003776#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3777int
3778main ()
3779{
3780 int i;
3781 for (i = 0; i < 256; i++)
3782 if (XOR (islower (i), ISLOWER (i))
3783 || toupper (i) != TOUPPER (i))
3784 exit(2);
3785 exit (0);
3786}
3787_ACEOF
3788rm -f conftest$ac_exeext
3789if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3790 (eval $ac_link) 2>&5
3791 ac_status=$?
3792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3793 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3795 (eval $ac_try) 2>&5
3796 ac_status=$?
3797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3798 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003799 :
3800else
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 echo "$as_me: program exited with status $ac_status" >&5
3802echo "$as_me: failed program was:" >&5
3803cat conftest.$ac_ext >&5
3804( exit $ac_status )
3805ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003806fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003807rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003808fi
3809fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003810fi
3811echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3812echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003813if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003814
3815cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003816#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003817_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003818
3819fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003820
Martin v. Löwis11437992002-04-12 09:54:03 +00003821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
Neal Norwitz3d949422002-04-20 13:46:43 +00003862
Martin v. Löwis11437992002-04-12 09:54:03 +00003863for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003864libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003865signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Neal Norwitz3d949422002-04-20 13:46:43 +00003866sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003867sys/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 +00003868sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00003869ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003870do
Martin v. Löwis11437992002-04-12 09:54:03 +00003871as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3872if eval "test \"\${$as_ac_Header+set}\" = set"; then
3873 echo "$as_me:$LINENO: checking for $ac_header" >&5
3874echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3875if eval "test \"\${$as_ac_Header+set}\" = set"; then
3876 echo $ECHO_N "(cached) $ECHO_C" >&6
3877fi
3878echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3879echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003880else
Martin v. Löwis11437992002-04-12 09:54:03 +00003881 # Is the header compilable?
3882echo "$as_me:$LINENO: checking $ac_header usability" >&5
3883echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3884cat >conftest.$ac_ext <<_ACEOF
3885#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003886#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003887$ac_includes_default
3888#include <$ac_header>
3889_ACEOF
3890rm -f conftest.$ac_objext
3891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3892 (eval $ac_compile) 2>&5
3893 ac_status=$?
3894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3895 (exit $ac_status); } &&
3896 { ac_try='test -s conftest.$ac_objext'
3897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3898 (eval $ac_try) 2>&5
3899 ac_status=$?
3900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3901 (exit $ac_status); }; }; then
3902 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003903else
Martin v. Löwis11437992002-04-12 09:54:03 +00003904 echo "$as_me: failed program was:" >&5
3905cat conftest.$ac_ext >&5
3906ac_header_compiler=no
3907fi
3908rm -f conftest.$ac_objext conftest.$ac_ext
3909echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3910echo "${ECHO_T}$ac_header_compiler" >&6
3911
3912# Is the header present?
3913echo "$as_me:$LINENO: checking $ac_header presence" >&5
3914echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3915cat >conftest.$ac_ext <<_ACEOF
3916#line $LINENO "configure"
3917#include "confdefs.h"
3918#include <$ac_header>
3919_ACEOF
3920if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3921 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3922 ac_status=$?
3923 egrep -v '^ *\+' conftest.er1 >conftest.err
3924 rm -f conftest.er1
3925 cat conftest.err >&5
3926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3927 (exit $ac_status); } >/dev/null; then
3928 if test -s conftest.err; then
3929 ac_cpp_err=$ac_c_preproc_warn_flag
3930 else
3931 ac_cpp_err=
3932 fi
3933else
3934 ac_cpp_err=yes
3935fi
3936if test -z "$ac_cpp_err"; then
3937 ac_header_preproc=yes
3938else
3939 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003940 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003941 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003942fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003943rm -f conftest.err conftest.$ac_ext
3944echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3945echo "${ECHO_T}$ac_header_preproc" >&6
3946
3947# So? What about this header?
3948case $ac_header_compiler:$ac_header_preproc in
3949 yes:no )
3950 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3951echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3952 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3953echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3954 no:yes )
3955 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3956echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3957 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3958echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3959 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3960echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3961esac
3962echo "$as_me:$LINENO: checking for $ac_header" >&5
3963echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3964if eval "test \"\${$as_ac_Header+set}\" = set"; then
3965 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003966else
Martin v. Löwis11437992002-04-12 09:54:03 +00003967 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003968fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003969echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3970echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3971
3972fi
3973if test `eval echo '${'$as_ac_Header'}'` = yes; then
3974 cat >>confdefs.h <<_ACEOF
3975#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3976_ACEOF
3977
3978fi
3979
Guido van Rossum627b2d71993-12-24 10:39:16 +00003980done
3981
Martin v. Löwis11437992002-04-12 09:54:03 +00003982
3983
3984
3985
3986
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003987ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003988for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3989 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3990echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3991echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3992if eval "test \"\${$as_ac_Header+set}\" = set"; then
3993 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003994else
Martin v. Löwis11437992002-04-12 09:54:03 +00003995 cat >conftest.$ac_ext <<_ACEOF
3996#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003997#include "confdefs.h"
3998#include <sys/types.h>
3999#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004000
4001#ifdef F77_DUMMY_MAIN
4002# ifdef __cplusplus
4003 extern "C"
4004# endif
4005 int F77_DUMMY_MAIN() { return 1; }
4006#endif
4007int
4008main ()
4009{
4010if ((DIR *) 0)
4011return 0;
4012 ;
4013 return 0;
4014}
4015_ACEOF
4016rm -f conftest.$ac_objext
4017if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4018 (eval $ac_compile) 2>&5
4019 ac_status=$?
4020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4021 (exit $ac_status); } &&
4022 { ac_try='test -s conftest.$ac_objext'
4023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4024 (eval $ac_try) 2>&5
4025 ac_status=$?
4026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4027 (exit $ac_status); }; }; then
4028 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004029else
Martin v. Löwis11437992002-04-12 09:54:03 +00004030 echo "$as_me: failed program was:" >&5
4031cat conftest.$ac_ext >&5
4032eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004033fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004034rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004035fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004036echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4037echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4038if test `eval echo '${'$as_ac_Header'}'` = yes; then
4039 cat >>confdefs.h <<_ACEOF
4040#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4041_ACEOF
4042
4043ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004044fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004045
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004046done
4047# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4048if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004049 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4050echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4051if test "${ac_cv_search_opendir+set}" = set; then
4052 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004053else
Martin v. Löwis11437992002-04-12 09:54:03 +00004054 ac_func_search_save_LIBS=$LIBS
4055ac_cv_search_opendir=no
4056cat >conftest.$ac_ext <<_ACEOF
4057#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004059
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004060/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004061#ifdef __cplusplus
4062extern "C"
4063#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004064/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004065 builtin and then its argument prototype would still apply. */
4066char opendir ();
4067#ifdef F77_DUMMY_MAIN
4068# ifdef __cplusplus
4069 extern "C"
4070# endif
4071 int F77_DUMMY_MAIN() { return 1; }
4072#endif
4073int
4074main ()
4075{
4076opendir ();
4077 ;
4078 return 0;
4079}
4080_ACEOF
4081rm -f conftest.$ac_objext conftest$ac_exeext
4082if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4083 (eval $ac_link) 2>&5
4084 ac_status=$?
4085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4086 (exit $ac_status); } &&
4087 { ac_try='test -s conftest$ac_exeext'
4088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4089 (eval $ac_try) 2>&5
4090 ac_status=$?
4091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4092 (exit $ac_status); }; }; then
4093 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004094else
Martin v. Löwis11437992002-04-12 09:54:03 +00004095 echo "$as_me: failed program was:" >&5
4096cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004097fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004098rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4099if test "$ac_cv_search_opendir" = no; then
4100 for ac_lib in dir; do
4101 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4102 cat >conftest.$ac_ext <<_ACEOF
4103#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004104#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004105
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004106/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004107#ifdef __cplusplus
4108extern "C"
4109#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004110/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004111 builtin and then its argument prototype would still apply. */
4112char opendir ();
4113#ifdef F77_DUMMY_MAIN
4114# ifdef __cplusplus
4115 extern "C"
4116# endif
4117 int F77_DUMMY_MAIN() { return 1; }
4118#endif
4119int
4120main ()
4121{
4122opendir ();
4123 ;
4124 return 0;
4125}
4126_ACEOF
4127rm -f conftest.$ac_objext conftest$ac_exeext
4128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4129 (eval $ac_link) 2>&5
4130 ac_status=$?
4131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4132 (exit $ac_status); } &&
4133 { ac_try='test -s conftest$ac_exeext'
4134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4135 (eval $ac_try) 2>&5
4136 ac_status=$?
4137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4138 (exit $ac_status); }; }; then
4139 ac_cv_search_opendir="-l$ac_lib"
4140break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004141else
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 echo "$as_me: failed program was:" >&5
4143cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004144fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004145rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4146 done
4147fi
4148LIBS=$ac_func_search_save_LIBS
4149fi
4150echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4151echo "${ECHO_T}$ac_cv_search_opendir" >&6
4152if test "$ac_cv_search_opendir" != no; then
4153 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004154
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004155fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004156
Michael W. Hudson54241132001-12-07 15:38:26 +00004157else
Martin v. Löwis11437992002-04-12 09:54:03 +00004158 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4159echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4160if test "${ac_cv_search_opendir+set}" = set; then
4161 echo $ECHO_N "(cached) $ECHO_C" >&6
4162else
4163 ac_func_search_save_LIBS=$LIBS
4164ac_cv_search_opendir=no
4165cat >conftest.$ac_ext <<_ACEOF
4166#line $LINENO "configure"
4167#include "confdefs.h"
4168
4169/* Override any gcc2 internal prototype to avoid an error. */
4170#ifdef __cplusplus
4171extern "C"
4172#endif
4173/* We use char because int might match the return type of a gcc2
4174 builtin and then its argument prototype would still apply. */
4175char opendir ();
4176#ifdef F77_DUMMY_MAIN
4177# ifdef __cplusplus
4178 extern "C"
4179# endif
4180 int F77_DUMMY_MAIN() { return 1; }
4181#endif
4182int
4183main ()
4184{
4185opendir ();
4186 ;
4187 return 0;
4188}
4189_ACEOF
4190rm -f conftest.$ac_objext conftest$ac_exeext
4191if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4192 (eval $ac_link) 2>&5
4193 ac_status=$?
4194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195 (exit $ac_status); } &&
4196 { ac_try='test -s conftest$ac_exeext'
4197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4198 (eval $ac_try) 2>&5
4199 ac_status=$?
4200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4201 (exit $ac_status); }; }; then
4202 ac_cv_search_opendir="none required"
4203else
4204 echo "$as_me: failed program was:" >&5
4205cat conftest.$ac_ext >&5
4206fi
4207rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4208if test "$ac_cv_search_opendir" = no; then
4209 for ac_lib in x; do
4210 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4211 cat >conftest.$ac_ext <<_ACEOF
4212#line $LINENO "configure"
4213#include "confdefs.h"
4214
4215/* Override any gcc2 internal prototype to avoid an error. */
4216#ifdef __cplusplus
4217extern "C"
4218#endif
4219/* We use char because int might match the return type of a gcc2
4220 builtin and then its argument prototype would still apply. */
4221char opendir ();
4222#ifdef F77_DUMMY_MAIN
4223# ifdef __cplusplus
4224 extern "C"
4225# endif
4226 int F77_DUMMY_MAIN() { return 1; }
4227#endif
4228int
4229main ()
4230{
4231opendir ();
4232 ;
4233 return 0;
4234}
4235_ACEOF
4236rm -f conftest.$ac_objext conftest$ac_exeext
4237if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4238 (eval $ac_link) 2>&5
4239 ac_status=$?
4240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4241 (exit $ac_status); } &&
4242 { ac_try='test -s conftest$ac_exeext'
4243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4244 (eval $ac_try) 2>&5
4245 ac_status=$?
4246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4247 (exit $ac_status); }; }; then
4248 ac_cv_search_opendir="-l$ac_lib"
4249break
4250else
4251 echo "$as_me: failed program was:" >&5
4252cat conftest.$ac_ext >&5
4253fi
4254rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4255 done
4256fi
4257LIBS=$ac_func_search_save_LIBS
4258fi
4259echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4260echo "${ECHO_T}$ac_cv_search_opendir" >&6
4261if test "$ac_cv_search_opendir" != no; then
4262 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4263
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004264fi
4265
4266fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004267
Michael W. Hudson54241132001-12-07 15:38:26 +00004268
Guido van Rossum627b2d71993-12-24 10:39:16 +00004269# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004270was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004271echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4272echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4273cat >conftest.$ac_ext <<_ACEOF
4274#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275#include "confdefs.h"
4276#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004277
4278_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004279if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4280 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004281 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004282else
Martin v. Löwis11437992002-04-12 09:54:03 +00004283
4284
4285cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004286#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004287_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004288
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004289
Guido van Rossum627b2d71993-12-24 10:39:16 +00004290fi
4291rm -f conftest*
4292
Martin v. Löwis11437992002-04-12 09:54:03 +00004293echo "$as_me:$LINENO: result: $was_it_defined" >&5
4294echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004295
Guido van Rossum810cc512001-09-09 23:51:39 +00004296# Two defines needed to enable largefile support on various platforms
4297# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004298
Martin v. Löwis11437992002-04-12 09:54:03 +00004299cat >>confdefs.h <<\_ACEOF
4300#define _LARGEFILE_SOURCE 1
4301_ACEOF
4302
4303
4304cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004305#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004306_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004307
Michael W. Hudson54241132001-12-07 15:38:26 +00004308
Guido van Rossum84e7b241996-08-19 21:59:00 +00004309# Add some code to confdefs.h so that the test for off_t works on SCO
4310cat >> confdefs.h <<\EOF
4311#if defined(SCO_DS)
4312#undef _OFF_T
4313#endif
4314EOF
4315
Guido van Rossumef2255b2000-03-10 22:30:29 +00004316# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004317echo "$as_me:$LINENO: checking for mode_t" >&5
4318echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4319if test "${ac_cv_type_mode_t+set}" = set; then
4320 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004321else
Martin v. Löwis11437992002-04-12 09:54:03 +00004322 cat >conftest.$ac_ext <<_ACEOF
4323#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004324#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004325$ac_includes_default
4326#ifdef F77_DUMMY_MAIN
4327# ifdef __cplusplus
4328 extern "C"
4329# endif
4330 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004332int
4333main ()
4334{
4335if ((mode_t *) 0)
4336 return 0;
4337if (sizeof (mode_t))
4338 return 0;
4339 ;
4340 return 0;
4341}
4342_ACEOF
4343rm -f conftest.$ac_objext
4344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4345 (eval $ac_compile) 2>&5
4346 ac_status=$?
4347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4348 (exit $ac_status); } &&
4349 { ac_try='test -s conftest.$ac_objext'
4350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4351 (eval $ac_try) 2>&5
4352 ac_status=$?
4353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4354 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004355 ac_cv_type_mode_t=yes
4356else
Martin v. Löwis11437992002-04-12 09:54:03 +00004357 echo "$as_me: failed program was:" >&5
4358cat conftest.$ac_ext >&5
4359ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004361rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004363echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4364echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4365if test $ac_cv_type_mode_t = yes; then
4366 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367else
Martin v. Löwis11437992002-04-12 09:54:03 +00004368
4369cat >>confdefs.h <<_ACEOF
4370#define mode_t int
4371_ACEOF
4372
4373fi
4374
4375echo "$as_me:$LINENO: checking for off_t" >&5
4376echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4377if test "${ac_cv_type_off_t+set}" = set; then
4378 echo $ECHO_N "(cached) $ECHO_C" >&6
4379else
4380 cat >conftest.$ac_ext <<_ACEOF
4381#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004382#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004383$ac_includes_default
4384#ifdef F77_DUMMY_MAIN
4385# ifdef __cplusplus
4386 extern "C"
4387# endif
4388 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004390int
4391main ()
4392{
4393if ((off_t *) 0)
4394 return 0;
4395if (sizeof (off_t))
4396 return 0;
4397 ;
4398 return 0;
4399}
4400_ACEOF
4401rm -f conftest.$ac_objext
4402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4403 (eval $ac_compile) 2>&5
4404 ac_status=$?
4405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4406 (exit $ac_status); } &&
4407 { ac_try='test -s conftest.$ac_objext'
4408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4409 (eval $ac_try) 2>&5
4410 ac_status=$?
4411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4412 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004413 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004414else
Martin v. Löwis11437992002-04-12 09:54:03 +00004415 echo "$as_me: failed program was:" >&5
4416cat conftest.$ac_ext >&5
4417ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004418fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004419rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004421echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4422echo "${ECHO_T}$ac_cv_type_off_t" >&6
4423if test $ac_cv_type_off_t = yes; then
4424 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004425else
Martin v. Löwis11437992002-04-12 09:54:03 +00004426
4427cat >>confdefs.h <<_ACEOF
4428#define off_t long
4429_ACEOF
4430
4431fi
4432
4433echo "$as_me:$LINENO: checking for pid_t" >&5
4434echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4435if test "${ac_cv_type_pid_t+set}" = set; then
4436 echo $ECHO_N "(cached) $ECHO_C" >&6
4437else
4438 cat >conftest.$ac_ext <<_ACEOF
4439#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004440#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004441$ac_includes_default
4442#ifdef F77_DUMMY_MAIN
4443# ifdef __cplusplus
4444 extern "C"
4445# endif
4446 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004448int
4449main ()
4450{
4451if ((pid_t *) 0)
4452 return 0;
4453if (sizeof (pid_t))
4454 return 0;
4455 ;
4456 return 0;
4457}
4458_ACEOF
4459rm -f conftest.$ac_objext
4460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4461 (eval $ac_compile) 2>&5
4462 ac_status=$?
4463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4464 (exit $ac_status); } &&
4465 { ac_try='test -s conftest.$ac_objext'
4466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4467 (eval $ac_try) 2>&5
4468 ac_status=$?
4469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4470 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004471 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004472else
Martin v. Löwis11437992002-04-12 09:54:03 +00004473 echo "$as_me: failed program was:" >&5
4474cat conftest.$ac_ext >&5
4475ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004476fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004477rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004479echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4480echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4481if test $ac_cv_type_pid_t = yes; then
4482 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004483else
Martin v. Löwis11437992002-04-12 09:54:03 +00004484
4485cat >>confdefs.h <<_ACEOF
4486#define pid_t int
4487_ACEOF
4488
4489fi
4490
4491echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4492echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4493if test "${ac_cv_type_signal+set}" = set; then
4494 echo $ECHO_N "(cached) $ECHO_C" >&6
4495else
4496 cat >conftest.$ac_ext <<_ACEOF
4497#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004498#include "confdefs.h"
4499#include <sys/types.h>
4500#include <signal.h>
4501#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004502# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004503#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004504#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004505extern "C" void (*signal (int, void (*)(int)))(int);
4506#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004507void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004508#endif
4509
Martin v. Löwis11437992002-04-12 09:54:03 +00004510#ifdef F77_DUMMY_MAIN
4511# ifdef __cplusplus
4512 extern "C"
4513# endif
4514 int F77_DUMMY_MAIN() { return 1; }
4515#endif
4516int
4517main ()
4518{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004519int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004520 ;
4521 return 0;
4522}
4523_ACEOF
4524rm -f conftest.$ac_objext
4525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4526 (eval $ac_compile) 2>&5
4527 ac_status=$?
4528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4529 (exit $ac_status); } &&
4530 { ac_try='test -s conftest.$ac_objext'
4531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4532 (eval $ac_try) 2>&5
4533 ac_status=$?
4534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4535 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004536 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004537else
Martin v. Löwis11437992002-04-12 09:54:03 +00004538 echo "$as_me: failed program was:" >&5
4539cat conftest.$ac_ext >&5
4540ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004541fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004542rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004544echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4545echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004546
Martin v. Löwis11437992002-04-12 09:54:03 +00004547cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004548#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004549_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004550
Michael W. Hudson54241132001-12-07 15:38:26 +00004551
Martin v. Löwis11437992002-04-12 09:54:03 +00004552echo "$as_me:$LINENO: checking for size_t" >&5
4553echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4554if test "${ac_cv_type_size_t+set}" = set; then
4555 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004556else
Martin v. Löwis11437992002-04-12 09:54:03 +00004557 cat >conftest.$ac_ext <<_ACEOF
4558#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004559#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004560$ac_includes_default
4561#ifdef F77_DUMMY_MAIN
4562# ifdef __cplusplus
4563 extern "C"
4564# endif
4565 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004566#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004567int
4568main ()
4569{
4570if ((size_t *) 0)
4571 return 0;
4572if (sizeof (size_t))
4573 return 0;
4574 ;
4575 return 0;
4576}
4577_ACEOF
4578rm -f conftest.$ac_objext
4579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4580 (eval $ac_compile) 2>&5
4581 ac_status=$?
4582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4583 (exit $ac_status); } &&
4584 { ac_try='test -s conftest.$ac_objext'
4585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4586 (eval $ac_try) 2>&5
4587 ac_status=$?
4588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4589 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004590 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004591else
Martin v. Löwis11437992002-04-12 09:54:03 +00004592 echo "$as_me: failed program was:" >&5
4593cat conftest.$ac_ext >&5
4594ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004595fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004596rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004597fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004598echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4599echo "${ECHO_T}$ac_cv_type_size_t" >&6
4600if test $ac_cv_type_size_t = yes; then
4601 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004602else
Martin v. Löwis11437992002-04-12 09:54:03 +00004603
4604cat >>confdefs.h <<_ACEOF
4605#define size_t unsigned
4606_ACEOF
4607
4608fi
4609
4610echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4611echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4612if test "${ac_cv_type_uid_t+set}" = set; then
4613 echo $ECHO_N "(cached) $ECHO_C" >&6
4614else
4615 cat >conftest.$ac_ext <<_ACEOF
4616#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004617#include "confdefs.h"
4618#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004619
4620_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004621if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4622 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004623 ac_cv_type_uid_t=yes
4624else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004625 ac_cv_type_uid_t=no
4626fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004627rm -f conftest*
4628
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004629fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004630echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4631echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004632if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633
Martin v. Löwis11437992002-04-12 09:54:03 +00004634cat >>confdefs.h <<\_ACEOF
4635#define uid_t int
4636_ACEOF
4637
4638
4639cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004640#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004641_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004642
4643fi
4644
Jack Jansendd19cf82001-12-06 22:36:17 +00004645
Michael W. Hudson54241132001-12-07 15:38:26 +00004646# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004647echo "$as_me:$LINENO: checking for int" >&5
4648echo $ECHO_N "checking for int... $ECHO_C" >&6
4649if test "${ac_cv_type_int+set}" = set; then
4650 echo $ECHO_N "(cached) $ECHO_C" >&6
4651else
4652 cat >conftest.$ac_ext <<_ACEOF
4653#line $LINENO "configure"
4654#include "confdefs.h"
4655$ac_includes_default
4656#ifdef F77_DUMMY_MAIN
4657# ifdef __cplusplus
4658 extern "C"
4659# endif
4660 int F77_DUMMY_MAIN() { return 1; }
4661#endif
4662int
4663main ()
4664{
4665if ((int *) 0)
4666 return 0;
4667if (sizeof (int))
4668 return 0;
4669 ;
4670 return 0;
4671}
4672_ACEOF
4673rm -f conftest.$ac_objext
4674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4675 (eval $ac_compile) 2>&5
4676 ac_status=$?
4677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4678 (exit $ac_status); } &&
4679 { ac_try='test -s conftest.$ac_objext'
4680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4681 (eval $ac_try) 2>&5
4682 ac_status=$?
4683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4684 (exit $ac_status); }; }; then
4685 ac_cv_type_int=yes
4686else
4687 echo "$as_me: failed program was:" >&5
4688cat conftest.$ac_ext >&5
4689ac_cv_type_int=no
4690fi
4691rm -f conftest.$ac_objext conftest.$ac_ext
4692fi
4693echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4694echo "${ECHO_T}$ac_cv_type_int" >&6
4695
4696echo "$as_me:$LINENO: checking size of int" >&5
4697echo $ECHO_N "checking size of int... $ECHO_C" >&6
4698if test "${ac_cv_sizeof_int+set}" = set; then
4699 echo $ECHO_N "(cached) $ECHO_C" >&6
4700else
4701 if test "$ac_cv_type_int" = yes; then
4702 # The cast to unsigned long works around a bug in the HP C Compiler
4703 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4704 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4705 # This bug is HP SR number 8606223364.
4706 if test "$cross_compiling" = yes; then
4707 # Depending upon the size, compute the lo and hi bounds.
4708cat >conftest.$ac_ext <<_ACEOF
4709#line $LINENO "configure"
4710#include "confdefs.h"
4711$ac_includes_default
4712#ifdef F77_DUMMY_MAIN
4713# ifdef __cplusplus
4714 extern "C"
4715# endif
4716 int F77_DUMMY_MAIN() { return 1; }
4717#endif
4718int
4719main ()
4720{
4721static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4722test_array [0] = 0
4723
4724 ;
4725 return 0;
4726}
4727_ACEOF
4728rm -f conftest.$ac_objext
4729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4730 (eval $ac_compile) 2>&5
4731 ac_status=$?
4732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4733 (exit $ac_status); } &&
4734 { ac_try='test -s conftest.$ac_objext'
4735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4736 (eval $ac_try) 2>&5
4737 ac_status=$?
4738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4739 (exit $ac_status); }; }; then
4740 ac_lo=0 ac_mid=0
4741 while :; do
4742 cat >conftest.$ac_ext <<_ACEOF
4743#line $LINENO "configure"
4744#include "confdefs.h"
4745$ac_includes_default
4746#ifdef F77_DUMMY_MAIN
4747# ifdef __cplusplus
4748 extern "C"
4749# endif
4750 int F77_DUMMY_MAIN() { return 1; }
4751#endif
4752int
4753main ()
4754{
4755static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4756test_array [0] = 0
4757
4758 ;
4759 return 0;
4760}
4761_ACEOF
4762rm -f conftest.$ac_objext
4763if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4764 (eval $ac_compile) 2>&5
4765 ac_status=$?
4766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4767 (exit $ac_status); } &&
4768 { ac_try='test -s conftest.$ac_objext'
4769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4770 (eval $ac_try) 2>&5
4771 ac_status=$?
4772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4773 (exit $ac_status); }; }; then
4774 ac_hi=$ac_mid; break
4775else
4776 echo "$as_me: failed program was:" >&5
4777cat conftest.$ac_ext >&5
4778ac_lo=`expr $ac_mid + 1`
4779 if test $ac_lo -le $ac_mid; then
4780 ac_lo= ac_hi=
4781 break
4782 fi
4783 ac_mid=`expr 2 '*' $ac_mid + 1`
4784fi
4785rm -f conftest.$ac_objext conftest.$ac_ext
4786 done
4787else
4788 echo "$as_me: failed program was:" >&5
4789cat conftest.$ac_ext >&5
4790cat >conftest.$ac_ext <<_ACEOF
4791#line $LINENO "configure"
4792#include "confdefs.h"
4793$ac_includes_default
4794#ifdef F77_DUMMY_MAIN
4795# ifdef __cplusplus
4796 extern "C"
4797# endif
4798 int F77_DUMMY_MAIN() { return 1; }
4799#endif
4800int
4801main ()
4802{
4803static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4804test_array [0] = 0
4805
4806 ;
4807 return 0;
4808}
4809_ACEOF
4810rm -f conftest.$ac_objext
4811if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4812 (eval $ac_compile) 2>&5
4813 ac_status=$?
4814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815 (exit $ac_status); } &&
4816 { ac_try='test -s conftest.$ac_objext'
4817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4818 (eval $ac_try) 2>&5
4819 ac_status=$?
4820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4821 (exit $ac_status); }; }; then
4822 ac_hi=-1 ac_mid=-1
4823 while :; do
4824 cat >conftest.$ac_ext <<_ACEOF
4825#line $LINENO "configure"
4826#include "confdefs.h"
4827$ac_includes_default
4828#ifdef F77_DUMMY_MAIN
4829# ifdef __cplusplus
4830 extern "C"
4831# endif
4832 int F77_DUMMY_MAIN() { return 1; }
4833#endif
4834int
4835main ()
4836{
4837static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4838test_array [0] = 0
4839
4840 ;
4841 return 0;
4842}
4843_ACEOF
4844rm -f conftest.$ac_objext
4845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4846 (eval $ac_compile) 2>&5
4847 ac_status=$?
4848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4849 (exit $ac_status); } &&
4850 { ac_try='test -s conftest.$ac_objext'
4851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4852 (eval $ac_try) 2>&5
4853 ac_status=$?
4854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4855 (exit $ac_status); }; }; then
4856 ac_lo=$ac_mid; break
4857else
4858 echo "$as_me: failed program was:" >&5
4859cat conftest.$ac_ext >&5
4860ac_hi=`expr '(' $ac_mid ')' - 1`
4861 if test $ac_mid -le $ac_hi; then
4862 ac_lo= ac_hi=
4863 break
4864 fi
4865 ac_mid=`expr 2 '*' $ac_mid`
4866fi
4867rm -f conftest.$ac_objext conftest.$ac_ext
4868 done
4869else
4870 echo "$as_me: failed program was:" >&5
4871cat conftest.$ac_ext >&5
4872ac_lo= ac_hi=
4873fi
4874rm -f conftest.$ac_objext conftest.$ac_ext
4875fi
4876rm -f conftest.$ac_objext conftest.$ac_ext
4877# Binary search between lo and hi bounds.
4878while test "x$ac_lo" != "x$ac_hi"; do
4879 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4880 cat >conftest.$ac_ext <<_ACEOF
4881#line $LINENO "configure"
4882#include "confdefs.h"
4883$ac_includes_default
4884#ifdef F77_DUMMY_MAIN
4885# ifdef __cplusplus
4886 extern "C"
4887# endif
4888 int F77_DUMMY_MAIN() { return 1; }
4889#endif
4890int
4891main ()
4892{
4893static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4894test_array [0] = 0
4895
4896 ;
4897 return 0;
4898}
4899_ACEOF
4900rm -f conftest.$ac_objext
4901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4902 (eval $ac_compile) 2>&5
4903 ac_status=$?
4904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4905 (exit $ac_status); } &&
4906 { ac_try='test -s conftest.$ac_objext'
4907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4908 (eval $ac_try) 2>&5
4909 ac_status=$?
4910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4911 (exit $ac_status); }; }; then
4912 ac_hi=$ac_mid
4913else
4914 echo "$as_me: failed program was:" >&5
4915cat conftest.$ac_ext >&5
4916ac_lo=`expr '(' $ac_mid ')' + 1`
4917fi
4918rm -f conftest.$ac_objext conftest.$ac_ext
4919done
4920case $ac_lo in
4921?*) ac_cv_sizeof_int=$ac_lo;;
4922'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4923echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4924 { (exit 1); exit 1; }; } ;;
4925esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004926else
4927 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004928 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4929echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4930 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004931else
Martin v. Löwis11437992002-04-12 09:54:03 +00004932 cat >conftest.$ac_ext <<_ACEOF
4933#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004934#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004935$ac_includes_default
4936long longval () { return (long) (sizeof (int)); }
4937unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004938#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004939#include <stdlib.h>
4940#ifdef F77_DUMMY_MAIN
4941# ifdef __cplusplus
4942 extern "C"
4943# endif
4944 int F77_DUMMY_MAIN() { return 1; }
4945#endif
4946int
4947main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004948{
Martin v. Löwis11437992002-04-12 09:54:03 +00004949
4950 FILE *f = fopen ("conftest.val", "w");
4951 if (! f)
4952 exit (1);
4953 if (((long) (sizeof (int))) < 0)
4954 {
4955 long i = longval ();
4956 if (i != ((long) (sizeof (int))))
4957 exit (1);
4958 fprintf (f, "%ld\n", i);
4959 }
4960 else
4961 {
4962 unsigned long i = ulongval ();
4963 if (i != ((long) (sizeof (int))))
4964 exit (1);
4965 fprintf (f, "%lu\n", i);
4966 }
4967 exit (ferror (f) || fclose (f) != 0);
4968
4969 ;
4970 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004971}
Martin v. Löwis11437992002-04-12 09:54:03 +00004972_ACEOF
4973rm -f conftest$ac_exeext
4974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4975 (eval $ac_link) 2>&5
4976 ac_status=$?
4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4980 (eval $ac_try) 2>&5
4981 ac_status=$?
4982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4983 (exit $ac_status); }; }; then
4984 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004985else
Martin v. Löwis11437992002-04-12 09:54:03 +00004986 echo "$as_me: program exited with status $ac_status" >&5
4987echo "$as_me: failed program was:" >&5
4988cat conftest.$ac_ext >&5
4989( exit $ac_status )
4990{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4991echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4992 { (exit 1); exit 1; }; }
4993fi
4994rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4995fi
4996fi
4997rm -f conftest.val
4998else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004999 ac_cv_sizeof_int=0
5000fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005002echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5003echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5004cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005005#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005006_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005007
5008
Martin v. Löwis11437992002-04-12 09:54:03 +00005009echo "$as_me:$LINENO: checking for long" >&5
5010echo $ECHO_N "checking for long... $ECHO_C" >&6
5011if test "${ac_cv_type_long+set}" = set; then
5012 echo $ECHO_N "(cached) $ECHO_C" >&6
5013else
5014 cat >conftest.$ac_ext <<_ACEOF
5015#line $LINENO "configure"
5016#include "confdefs.h"
5017$ac_includes_default
5018#ifdef F77_DUMMY_MAIN
5019# ifdef __cplusplus
5020 extern "C"
5021# endif
5022 int F77_DUMMY_MAIN() { return 1; }
5023#endif
5024int
5025main ()
5026{
5027if ((long *) 0)
5028 return 0;
5029if (sizeof (long))
5030 return 0;
5031 ;
5032 return 0;
5033}
5034_ACEOF
5035rm -f conftest.$ac_objext
5036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5037 (eval $ac_compile) 2>&5
5038 ac_status=$?
5039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5040 (exit $ac_status); } &&
5041 { ac_try='test -s conftest.$ac_objext'
5042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5043 (eval $ac_try) 2>&5
5044 ac_status=$?
5045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5046 (exit $ac_status); }; }; then
5047 ac_cv_type_long=yes
5048else
5049 echo "$as_me: failed program was:" >&5
5050cat conftest.$ac_ext >&5
5051ac_cv_type_long=no
5052fi
5053rm -f conftest.$ac_objext conftest.$ac_ext
5054fi
5055echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5056echo "${ECHO_T}$ac_cv_type_long" >&6
5057
5058echo "$as_me:$LINENO: checking size of long" >&5
5059echo $ECHO_N "checking size of long... $ECHO_C" >&6
5060if test "${ac_cv_sizeof_long+set}" = set; then
5061 echo $ECHO_N "(cached) $ECHO_C" >&6
5062else
5063 if test "$ac_cv_type_long" = yes; then
5064 # The cast to unsigned long works around a bug in the HP C Compiler
5065 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5066 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5067 # This bug is HP SR number 8606223364.
5068 if test "$cross_compiling" = yes; then
5069 # Depending upon the size, compute the lo and hi bounds.
5070cat >conftest.$ac_ext <<_ACEOF
5071#line $LINENO "configure"
5072#include "confdefs.h"
5073$ac_includes_default
5074#ifdef F77_DUMMY_MAIN
5075# ifdef __cplusplus
5076 extern "C"
5077# endif
5078 int F77_DUMMY_MAIN() { return 1; }
5079#endif
5080int
5081main ()
5082{
5083static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5084test_array [0] = 0
5085
5086 ;
5087 return 0;
5088}
5089_ACEOF
5090rm -f conftest.$ac_objext
5091if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5092 (eval $ac_compile) 2>&5
5093 ac_status=$?
5094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5095 (exit $ac_status); } &&
5096 { ac_try='test -s conftest.$ac_objext'
5097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5098 (eval $ac_try) 2>&5
5099 ac_status=$?
5100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101 (exit $ac_status); }; }; then
5102 ac_lo=0 ac_mid=0
5103 while :; do
5104 cat >conftest.$ac_ext <<_ACEOF
5105#line $LINENO "configure"
5106#include "confdefs.h"
5107$ac_includes_default
5108#ifdef F77_DUMMY_MAIN
5109# ifdef __cplusplus
5110 extern "C"
5111# endif
5112 int F77_DUMMY_MAIN() { return 1; }
5113#endif
5114int
5115main ()
5116{
5117static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5118test_array [0] = 0
5119
5120 ;
5121 return 0;
5122}
5123_ACEOF
5124rm -f conftest.$ac_objext
5125if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5126 (eval $ac_compile) 2>&5
5127 ac_status=$?
5128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5129 (exit $ac_status); } &&
5130 { ac_try='test -s conftest.$ac_objext'
5131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5132 (eval $ac_try) 2>&5
5133 ac_status=$?
5134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5135 (exit $ac_status); }; }; then
5136 ac_hi=$ac_mid; break
5137else
5138 echo "$as_me: failed program was:" >&5
5139cat conftest.$ac_ext >&5
5140ac_lo=`expr $ac_mid + 1`
5141 if test $ac_lo -le $ac_mid; then
5142 ac_lo= ac_hi=
5143 break
5144 fi
5145 ac_mid=`expr 2 '*' $ac_mid + 1`
5146fi
5147rm -f conftest.$ac_objext conftest.$ac_ext
5148 done
5149else
5150 echo "$as_me: failed program was:" >&5
5151cat conftest.$ac_ext >&5
5152cat >conftest.$ac_ext <<_ACEOF
5153#line $LINENO "configure"
5154#include "confdefs.h"
5155$ac_includes_default
5156#ifdef F77_DUMMY_MAIN
5157# ifdef __cplusplus
5158 extern "C"
5159# endif
5160 int F77_DUMMY_MAIN() { return 1; }
5161#endif
5162int
5163main ()
5164{
5165static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5166test_array [0] = 0
5167
5168 ;
5169 return 0;
5170}
5171_ACEOF
5172rm -f conftest.$ac_objext
5173if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5174 (eval $ac_compile) 2>&5
5175 ac_status=$?
5176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5177 (exit $ac_status); } &&
5178 { ac_try='test -s conftest.$ac_objext'
5179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5180 (eval $ac_try) 2>&5
5181 ac_status=$?
5182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5183 (exit $ac_status); }; }; then
5184 ac_hi=-1 ac_mid=-1
5185 while :; do
5186 cat >conftest.$ac_ext <<_ACEOF
5187#line $LINENO "configure"
5188#include "confdefs.h"
5189$ac_includes_default
5190#ifdef F77_DUMMY_MAIN
5191# ifdef __cplusplus
5192 extern "C"
5193# endif
5194 int F77_DUMMY_MAIN() { return 1; }
5195#endif
5196int
5197main ()
5198{
5199static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5200test_array [0] = 0
5201
5202 ;
5203 return 0;
5204}
5205_ACEOF
5206rm -f conftest.$ac_objext
5207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5208 (eval $ac_compile) 2>&5
5209 ac_status=$?
5210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5211 (exit $ac_status); } &&
5212 { ac_try='test -s conftest.$ac_objext'
5213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5214 (eval $ac_try) 2>&5
5215 ac_status=$?
5216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5217 (exit $ac_status); }; }; then
5218 ac_lo=$ac_mid; break
5219else
5220 echo "$as_me: failed program was:" >&5
5221cat conftest.$ac_ext >&5
5222ac_hi=`expr '(' $ac_mid ')' - 1`
5223 if test $ac_mid -le $ac_hi; then
5224 ac_lo= ac_hi=
5225 break
5226 fi
5227 ac_mid=`expr 2 '*' $ac_mid`
5228fi
5229rm -f conftest.$ac_objext conftest.$ac_ext
5230 done
5231else
5232 echo "$as_me: failed program was:" >&5
5233cat conftest.$ac_ext >&5
5234ac_lo= ac_hi=
5235fi
5236rm -f conftest.$ac_objext conftest.$ac_ext
5237fi
5238rm -f conftest.$ac_objext conftest.$ac_ext
5239# Binary search between lo and hi bounds.
5240while test "x$ac_lo" != "x$ac_hi"; do
5241 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5242 cat >conftest.$ac_ext <<_ACEOF
5243#line $LINENO "configure"
5244#include "confdefs.h"
5245$ac_includes_default
5246#ifdef F77_DUMMY_MAIN
5247# ifdef __cplusplus
5248 extern "C"
5249# endif
5250 int F77_DUMMY_MAIN() { return 1; }
5251#endif
5252int
5253main ()
5254{
5255static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5256test_array [0] = 0
5257
5258 ;
5259 return 0;
5260}
5261_ACEOF
5262rm -f conftest.$ac_objext
5263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5264 (eval $ac_compile) 2>&5
5265 ac_status=$?
5266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267 (exit $ac_status); } &&
5268 { ac_try='test -s conftest.$ac_objext'
5269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5270 (eval $ac_try) 2>&5
5271 ac_status=$?
5272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5273 (exit $ac_status); }; }; then
5274 ac_hi=$ac_mid
5275else
5276 echo "$as_me: failed program was:" >&5
5277cat conftest.$ac_ext >&5
5278ac_lo=`expr '(' $ac_mid ')' + 1`
5279fi
5280rm -f conftest.$ac_objext conftest.$ac_ext
5281done
5282case $ac_lo in
5283?*) ac_cv_sizeof_long=$ac_lo;;
5284'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5285echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5286 { (exit 1); exit 1; }; } ;;
5287esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005288else
5289 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005290 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5291echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5292 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005293else
Martin v. Löwis11437992002-04-12 09:54:03 +00005294 cat >conftest.$ac_ext <<_ACEOF
5295#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005296#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005297$ac_includes_default
5298long longval () { return (long) (sizeof (long)); }
5299unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005300#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005301#include <stdlib.h>
5302#ifdef F77_DUMMY_MAIN
5303# ifdef __cplusplus
5304 extern "C"
5305# endif
5306 int F77_DUMMY_MAIN() { return 1; }
5307#endif
5308int
5309main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005310{
Martin v. Löwis11437992002-04-12 09:54:03 +00005311
5312 FILE *f = fopen ("conftest.val", "w");
5313 if (! f)
5314 exit (1);
5315 if (((long) (sizeof (long))) < 0)
5316 {
5317 long i = longval ();
5318 if (i != ((long) (sizeof (long))))
5319 exit (1);
5320 fprintf (f, "%ld\n", i);
5321 }
5322 else
5323 {
5324 unsigned long i = ulongval ();
5325 if (i != ((long) (sizeof (long))))
5326 exit (1);
5327 fprintf (f, "%lu\n", i);
5328 }
5329 exit (ferror (f) || fclose (f) != 0);
5330
5331 ;
5332 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005333}
Martin v. Löwis11437992002-04-12 09:54:03 +00005334_ACEOF
5335rm -f conftest$ac_exeext
5336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5337 (eval $ac_link) 2>&5
5338 ac_status=$?
5339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5340 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5342 (eval $ac_try) 2>&5
5343 ac_status=$?
5344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5345 (exit $ac_status); }; }; then
5346 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005347else
Martin v. Löwis11437992002-04-12 09:54:03 +00005348 echo "$as_me: program exited with status $ac_status" >&5
5349echo "$as_me: failed program was:" >&5
5350cat conftest.$ac_ext >&5
5351( exit $ac_status )
5352{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5353echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5354 { (exit 1); exit 1; }; }
5355fi
5356rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5357fi
5358fi
5359rm -f conftest.val
5360else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005361 ac_cv_sizeof_long=0
5362fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005363fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005364echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5365echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5366cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005367#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005368_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005369
5370
Martin v. Löwis11437992002-04-12 09:54:03 +00005371echo "$as_me:$LINENO: checking for void *" >&5
5372echo $ECHO_N "checking for void *... $ECHO_C" >&6
5373if test "${ac_cv_type_void_p+set}" = set; then
5374 echo $ECHO_N "(cached) $ECHO_C" >&6
5375else
5376 cat >conftest.$ac_ext <<_ACEOF
5377#line $LINENO "configure"
5378#include "confdefs.h"
5379$ac_includes_default
5380#ifdef F77_DUMMY_MAIN
5381# ifdef __cplusplus
5382 extern "C"
5383# endif
5384 int F77_DUMMY_MAIN() { return 1; }
5385#endif
5386int
5387main ()
5388{
5389if ((void * *) 0)
5390 return 0;
5391if (sizeof (void *))
5392 return 0;
5393 ;
5394 return 0;
5395}
5396_ACEOF
5397rm -f conftest.$ac_objext
5398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5399 (eval $ac_compile) 2>&5
5400 ac_status=$?
5401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5402 (exit $ac_status); } &&
5403 { ac_try='test -s conftest.$ac_objext'
5404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5405 (eval $ac_try) 2>&5
5406 ac_status=$?
5407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5408 (exit $ac_status); }; }; then
5409 ac_cv_type_void_p=yes
5410else
5411 echo "$as_me: failed program was:" >&5
5412cat conftest.$ac_ext >&5
5413ac_cv_type_void_p=no
5414fi
5415rm -f conftest.$ac_objext conftest.$ac_ext
5416fi
5417echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5418echo "${ECHO_T}$ac_cv_type_void_p" >&6
5419
5420echo "$as_me:$LINENO: checking size of void *" >&5
5421echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5422if test "${ac_cv_sizeof_void_p+set}" = set; then
5423 echo $ECHO_N "(cached) $ECHO_C" >&6
5424else
5425 if test "$ac_cv_type_void_p" = yes; then
5426 # The cast to unsigned long works around a bug in the HP C Compiler
5427 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5428 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5429 # This bug is HP SR number 8606223364.
5430 if test "$cross_compiling" = yes; then
5431 # Depending upon the size, compute the lo and hi bounds.
5432cat >conftest.$ac_ext <<_ACEOF
5433#line $LINENO "configure"
5434#include "confdefs.h"
5435$ac_includes_default
5436#ifdef F77_DUMMY_MAIN
5437# ifdef __cplusplus
5438 extern "C"
5439# endif
5440 int F77_DUMMY_MAIN() { return 1; }
5441#endif
5442int
5443main ()
5444{
5445static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5446test_array [0] = 0
5447
5448 ;
5449 return 0;
5450}
5451_ACEOF
5452rm -f conftest.$ac_objext
5453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5454 (eval $ac_compile) 2>&5
5455 ac_status=$?
5456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5457 (exit $ac_status); } &&
5458 { ac_try='test -s conftest.$ac_objext'
5459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5460 (eval $ac_try) 2>&5
5461 ac_status=$?
5462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5463 (exit $ac_status); }; }; then
5464 ac_lo=0 ac_mid=0
5465 while :; do
5466 cat >conftest.$ac_ext <<_ACEOF
5467#line $LINENO "configure"
5468#include "confdefs.h"
5469$ac_includes_default
5470#ifdef F77_DUMMY_MAIN
5471# ifdef __cplusplus
5472 extern "C"
5473# endif
5474 int F77_DUMMY_MAIN() { return 1; }
5475#endif
5476int
5477main ()
5478{
5479static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5480test_array [0] = 0
5481
5482 ;
5483 return 0;
5484}
5485_ACEOF
5486rm -f conftest.$ac_objext
5487if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5488 (eval $ac_compile) 2>&5
5489 ac_status=$?
5490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5491 (exit $ac_status); } &&
5492 { ac_try='test -s conftest.$ac_objext'
5493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5494 (eval $ac_try) 2>&5
5495 ac_status=$?
5496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5497 (exit $ac_status); }; }; then
5498 ac_hi=$ac_mid; break
5499else
5500 echo "$as_me: failed program was:" >&5
5501cat conftest.$ac_ext >&5
5502ac_lo=`expr $ac_mid + 1`
5503 if test $ac_lo -le $ac_mid; then
5504 ac_lo= ac_hi=
5505 break
5506 fi
5507 ac_mid=`expr 2 '*' $ac_mid + 1`
5508fi
5509rm -f conftest.$ac_objext conftest.$ac_ext
5510 done
5511else
5512 echo "$as_me: failed program was:" >&5
5513cat conftest.$ac_ext >&5
5514cat >conftest.$ac_ext <<_ACEOF
5515#line $LINENO "configure"
5516#include "confdefs.h"
5517$ac_includes_default
5518#ifdef F77_DUMMY_MAIN
5519# ifdef __cplusplus
5520 extern "C"
5521# endif
5522 int F77_DUMMY_MAIN() { return 1; }
5523#endif
5524int
5525main ()
5526{
5527static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5528test_array [0] = 0
5529
5530 ;
5531 return 0;
5532}
5533_ACEOF
5534rm -f conftest.$ac_objext
5535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5536 (eval $ac_compile) 2>&5
5537 ac_status=$?
5538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5539 (exit $ac_status); } &&
5540 { ac_try='test -s conftest.$ac_objext'
5541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5542 (eval $ac_try) 2>&5
5543 ac_status=$?
5544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5545 (exit $ac_status); }; }; then
5546 ac_hi=-1 ac_mid=-1
5547 while :; do
5548 cat >conftest.$ac_ext <<_ACEOF
5549#line $LINENO "configure"
5550#include "confdefs.h"
5551$ac_includes_default
5552#ifdef F77_DUMMY_MAIN
5553# ifdef __cplusplus
5554 extern "C"
5555# endif
5556 int F77_DUMMY_MAIN() { return 1; }
5557#endif
5558int
5559main ()
5560{
5561static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5562test_array [0] = 0
5563
5564 ;
5565 return 0;
5566}
5567_ACEOF
5568rm -f conftest.$ac_objext
5569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5570 (eval $ac_compile) 2>&5
5571 ac_status=$?
5572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5573 (exit $ac_status); } &&
5574 { ac_try='test -s conftest.$ac_objext'
5575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5576 (eval $ac_try) 2>&5
5577 ac_status=$?
5578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5579 (exit $ac_status); }; }; then
5580 ac_lo=$ac_mid; break
5581else
5582 echo "$as_me: failed program was:" >&5
5583cat conftest.$ac_ext >&5
5584ac_hi=`expr '(' $ac_mid ')' - 1`
5585 if test $ac_mid -le $ac_hi; then
5586 ac_lo= ac_hi=
5587 break
5588 fi
5589 ac_mid=`expr 2 '*' $ac_mid`
5590fi
5591rm -f conftest.$ac_objext conftest.$ac_ext
5592 done
5593else
5594 echo "$as_me: failed program was:" >&5
5595cat conftest.$ac_ext >&5
5596ac_lo= ac_hi=
5597fi
5598rm -f conftest.$ac_objext conftest.$ac_ext
5599fi
5600rm -f conftest.$ac_objext conftest.$ac_ext
5601# Binary search between lo and hi bounds.
5602while test "x$ac_lo" != "x$ac_hi"; do
5603 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5604 cat >conftest.$ac_ext <<_ACEOF
5605#line $LINENO "configure"
5606#include "confdefs.h"
5607$ac_includes_default
5608#ifdef F77_DUMMY_MAIN
5609# ifdef __cplusplus
5610 extern "C"
5611# endif
5612 int F77_DUMMY_MAIN() { return 1; }
5613#endif
5614int
5615main ()
5616{
5617static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5618test_array [0] = 0
5619
5620 ;
5621 return 0;
5622}
5623_ACEOF
5624rm -f conftest.$ac_objext
5625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5626 (eval $ac_compile) 2>&5
5627 ac_status=$?
5628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5629 (exit $ac_status); } &&
5630 { ac_try='test -s conftest.$ac_objext'
5631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5632 (eval $ac_try) 2>&5
5633 ac_status=$?
5634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5635 (exit $ac_status); }; }; then
5636 ac_hi=$ac_mid
5637else
5638 echo "$as_me: failed program was:" >&5
5639cat conftest.$ac_ext >&5
5640ac_lo=`expr '(' $ac_mid ')' + 1`
5641fi
5642rm -f conftest.$ac_objext conftest.$ac_ext
5643done
5644case $ac_lo in
5645?*) ac_cv_sizeof_void_p=$ac_lo;;
5646'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5647echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5648 { (exit 1); exit 1; }; } ;;
5649esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005650else
5651 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005652 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5653echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5654 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005655else
Martin v. Löwis11437992002-04-12 09:54:03 +00005656 cat >conftest.$ac_ext <<_ACEOF
5657#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005658#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005659$ac_includes_default
5660long longval () { return (long) (sizeof (void *)); }
5661unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005662#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005663#include <stdlib.h>
5664#ifdef F77_DUMMY_MAIN
5665# ifdef __cplusplus
5666 extern "C"
5667# endif
5668 int F77_DUMMY_MAIN() { return 1; }
5669#endif
5670int
5671main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005672{
Martin v. Löwis11437992002-04-12 09:54:03 +00005673
5674 FILE *f = fopen ("conftest.val", "w");
5675 if (! f)
5676 exit (1);
5677 if (((long) (sizeof (void *))) < 0)
5678 {
5679 long i = longval ();
5680 if (i != ((long) (sizeof (void *))))
5681 exit (1);
5682 fprintf (f, "%ld\n", i);
5683 }
5684 else
5685 {
5686 unsigned long i = ulongval ();
5687 if (i != ((long) (sizeof (void *))))
5688 exit (1);
5689 fprintf (f, "%lu\n", i);
5690 }
5691 exit (ferror (f) || fclose (f) != 0);
5692
5693 ;
5694 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005695}
Martin v. Löwis11437992002-04-12 09:54:03 +00005696_ACEOF
5697rm -f conftest$ac_exeext
5698if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5699 (eval $ac_link) 2>&5
5700 ac_status=$?
5701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5702 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5704 (eval $ac_try) 2>&5
5705 ac_status=$?
5706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5707 (exit $ac_status); }; }; then
5708 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005709else
Martin v. Löwis11437992002-04-12 09:54:03 +00005710 echo "$as_me: program exited with status $ac_status" >&5
5711echo "$as_me: failed program was:" >&5
5712cat conftest.$ac_ext >&5
5713( exit $ac_status )
5714{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5715echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5716 { (exit 1); exit 1; }; }
5717fi
5718rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5719fi
5720fi
5721rm -f conftest.val
5722else
Guido van Rossumad678af1998-10-02 14:42:15 +00005723 ac_cv_sizeof_void_p=0
5724fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005726echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5727echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5728cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005729#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005730_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005731
5732
Martin v. Löwis11437992002-04-12 09:54:03 +00005733echo "$as_me:$LINENO: checking for char" >&5
5734echo $ECHO_N "checking for char... $ECHO_C" >&6
5735if test "${ac_cv_type_char+set}" = set; then
5736 echo $ECHO_N "(cached) $ECHO_C" >&6
5737else
5738 cat >conftest.$ac_ext <<_ACEOF
5739#line $LINENO "configure"
5740#include "confdefs.h"
5741$ac_includes_default
5742#ifdef F77_DUMMY_MAIN
5743# ifdef __cplusplus
5744 extern "C"
5745# endif
5746 int F77_DUMMY_MAIN() { return 1; }
5747#endif
5748int
5749main ()
5750{
5751if ((char *) 0)
5752 return 0;
5753if (sizeof (char))
5754 return 0;
5755 ;
5756 return 0;
5757}
5758_ACEOF
5759rm -f conftest.$ac_objext
5760if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5761 (eval $ac_compile) 2>&5
5762 ac_status=$?
5763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764 (exit $ac_status); } &&
5765 { ac_try='test -s conftest.$ac_objext'
5766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5767 (eval $ac_try) 2>&5
5768 ac_status=$?
5769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5770 (exit $ac_status); }; }; then
5771 ac_cv_type_char=yes
5772else
5773 echo "$as_me: failed program was:" >&5
5774cat conftest.$ac_ext >&5
5775ac_cv_type_char=no
5776fi
5777rm -f conftest.$ac_objext conftest.$ac_ext
5778fi
5779echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5780echo "${ECHO_T}$ac_cv_type_char" >&6
5781
5782echo "$as_me:$LINENO: checking size of char" >&5
5783echo $ECHO_N "checking size of char... $ECHO_C" >&6
5784if test "${ac_cv_sizeof_char+set}" = set; then
5785 echo $ECHO_N "(cached) $ECHO_C" >&6
5786else
5787 if test "$ac_cv_type_char" = yes; then
5788 # The cast to unsigned long works around a bug in the HP C Compiler
5789 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5790 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5791 # This bug is HP SR number 8606223364.
5792 if test "$cross_compiling" = yes; then
5793 # Depending upon the size, compute the lo and hi bounds.
5794cat >conftest.$ac_ext <<_ACEOF
5795#line $LINENO "configure"
5796#include "confdefs.h"
5797$ac_includes_default
5798#ifdef F77_DUMMY_MAIN
5799# ifdef __cplusplus
5800 extern "C"
5801# endif
5802 int F77_DUMMY_MAIN() { return 1; }
5803#endif
5804int
5805main ()
5806{
5807static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5808test_array [0] = 0
5809
5810 ;
5811 return 0;
5812}
5813_ACEOF
5814rm -f conftest.$ac_objext
5815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5816 (eval $ac_compile) 2>&5
5817 ac_status=$?
5818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5819 (exit $ac_status); } &&
5820 { ac_try='test -s conftest.$ac_objext'
5821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5822 (eval $ac_try) 2>&5
5823 ac_status=$?
5824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5825 (exit $ac_status); }; }; then
5826 ac_lo=0 ac_mid=0
5827 while :; do
5828 cat >conftest.$ac_ext <<_ACEOF
5829#line $LINENO "configure"
5830#include "confdefs.h"
5831$ac_includes_default
5832#ifdef F77_DUMMY_MAIN
5833# ifdef __cplusplus
5834 extern "C"
5835# endif
5836 int F77_DUMMY_MAIN() { return 1; }
5837#endif
5838int
5839main ()
5840{
5841static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5842test_array [0] = 0
5843
5844 ;
5845 return 0;
5846}
5847_ACEOF
5848rm -f conftest.$ac_objext
5849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5850 (eval $ac_compile) 2>&5
5851 ac_status=$?
5852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5853 (exit $ac_status); } &&
5854 { ac_try='test -s conftest.$ac_objext'
5855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5856 (eval $ac_try) 2>&5
5857 ac_status=$?
5858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5859 (exit $ac_status); }; }; then
5860 ac_hi=$ac_mid; break
5861else
5862 echo "$as_me: failed program was:" >&5
5863cat conftest.$ac_ext >&5
5864ac_lo=`expr $ac_mid + 1`
5865 if test $ac_lo -le $ac_mid; then
5866 ac_lo= ac_hi=
5867 break
5868 fi
5869 ac_mid=`expr 2 '*' $ac_mid + 1`
5870fi
5871rm -f conftest.$ac_objext conftest.$ac_ext
5872 done
5873else
5874 echo "$as_me: failed program was:" >&5
5875cat conftest.$ac_ext >&5
5876cat >conftest.$ac_ext <<_ACEOF
5877#line $LINENO "configure"
5878#include "confdefs.h"
5879$ac_includes_default
5880#ifdef F77_DUMMY_MAIN
5881# ifdef __cplusplus
5882 extern "C"
5883# endif
5884 int F77_DUMMY_MAIN() { return 1; }
5885#endif
5886int
5887main ()
5888{
5889static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5890test_array [0] = 0
5891
5892 ;
5893 return 0;
5894}
5895_ACEOF
5896rm -f conftest.$ac_objext
5897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5898 (eval $ac_compile) 2>&5
5899 ac_status=$?
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5901 (exit $ac_status); } &&
5902 { ac_try='test -s conftest.$ac_objext'
5903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5904 (eval $ac_try) 2>&5
5905 ac_status=$?
5906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907 (exit $ac_status); }; }; then
5908 ac_hi=-1 ac_mid=-1
5909 while :; do
5910 cat >conftest.$ac_ext <<_ACEOF
5911#line $LINENO "configure"
5912#include "confdefs.h"
5913$ac_includes_default
5914#ifdef F77_DUMMY_MAIN
5915# ifdef __cplusplus
5916 extern "C"
5917# endif
5918 int F77_DUMMY_MAIN() { return 1; }
5919#endif
5920int
5921main ()
5922{
5923static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5924test_array [0] = 0
5925
5926 ;
5927 return 0;
5928}
5929_ACEOF
5930rm -f conftest.$ac_objext
5931if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5932 (eval $ac_compile) 2>&5
5933 ac_status=$?
5934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5935 (exit $ac_status); } &&
5936 { ac_try='test -s conftest.$ac_objext'
5937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5938 (eval $ac_try) 2>&5
5939 ac_status=$?
5940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5941 (exit $ac_status); }; }; then
5942 ac_lo=$ac_mid; break
5943else
5944 echo "$as_me: failed program was:" >&5
5945cat conftest.$ac_ext >&5
5946ac_hi=`expr '(' $ac_mid ')' - 1`
5947 if test $ac_mid -le $ac_hi; then
5948 ac_lo= ac_hi=
5949 break
5950 fi
5951 ac_mid=`expr 2 '*' $ac_mid`
5952fi
5953rm -f conftest.$ac_objext conftest.$ac_ext
5954 done
5955else
5956 echo "$as_me: failed program was:" >&5
5957cat conftest.$ac_ext >&5
5958ac_lo= ac_hi=
5959fi
5960rm -f conftest.$ac_objext conftest.$ac_ext
5961fi
5962rm -f conftest.$ac_objext conftest.$ac_ext
5963# Binary search between lo and hi bounds.
5964while test "x$ac_lo" != "x$ac_hi"; do
5965 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5966 cat >conftest.$ac_ext <<_ACEOF
5967#line $LINENO "configure"
5968#include "confdefs.h"
5969$ac_includes_default
5970#ifdef F77_DUMMY_MAIN
5971# ifdef __cplusplus
5972 extern "C"
5973# endif
5974 int F77_DUMMY_MAIN() { return 1; }
5975#endif
5976int
5977main ()
5978{
5979static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5980test_array [0] = 0
5981
5982 ;
5983 return 0;
5984}
5985_ACEOF
5986rm -f conftest.$ac_objext
5987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5988 (eval $ac_compile) 2>&5
5989 ac_status=$?
5990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5991 (exit $ac_status); } &&
5992 { ac_try='test -s conftest.$ac_objext'
5993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5994 (eval $ac_try) 2>&5
5995 ac_status=$?
5996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5997 (exit $ac_status); }; }; then
5998 ac_hi=$ac_mid
5999else
6000 echo "$as_me: failed program was:" >&5
6001cat conftest.$ac_ext >&5
6002ac_lo=`expr '(' $ac_mid ')' + 1`
6003fi
6004rm -f conftest.$ac_objext conftest.$ac_ext
6005done
6006case $ac_lo in
6007?*) ac_cv_sizeof_char=$ac_lo;;
6008'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6009echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6010 { (exit 1); exit 1; }; } ;;
6011esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006012else
6013 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006014 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6015echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6016 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006017else
Martin v. Löwis11437992002-04-12 09:54:03 +00006018 cat >conftest.$ac_ext <<_ACEOF
6019#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006020#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006021$ac_includes_default
6022long longval () { return (long) (sizeof (char)); }
6023unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006024#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006025#include <stdlib.h>
6026#ifdef F77_DUMMY_MAIN
6027# ifdef __cplusplus
6028 extern "C"
6029# endif
6030 int F77_DUMMY_MAIN() { return 1; }
6031#endif
6032int
6033main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006034{
Martin v. Löwis11437992002-04-12 09:54:03 +00006035
6036 FILE *f = fopen ("conftest.val", "w");
6037 if (! f)
6038 exit (1);
6039 if (((long) (sizeof (char))) < 0)
6040 {
6041 long i = longval ();
6042 if (i != ((long) (sizeof (char))))
6043 exit (1);
6044 fprintf (f, "%ld\n", i);
6045 }
6046 else
6047 {
6048 unsigned long i = ulongval ();
6049 if (i != ((long) (sizeof (char))))
6050 exit (1);
6051 fprintf (f, "%lu\n", i);
6052 }
6053 exit (ferror (f) || fclose (f) != 0);
6054
6055 ;
6056 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006057}
Martin v. Löwis11437992002-04-12 09:54:03 +00006058_ACEOF
6059rm -f conftest$ac_exeext
6060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6061 (eval $ac_link) 2>&5
6062 ac_status=$?
6063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6066 (eval $ac_try) 2>&5
6067 ac_status=$?
6068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6069 (exit $ac_status); }; }; then
6070 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006071else
Martin v. Löwis11437992002-04-12 09:54:03 +00006072 echo "$as_me: program exited with status $ac_status" >&5
6073echo "$as_me: failed program was:" >&5
6074cat conftest.$ac_ext >&5
6075( exit $ac_status )
6076{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6077echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6078 { (exit 1); exit 1; }; }
6079fi
6080rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6081fi
6082fi
6083rm -f conftest.val
6084else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006085 ac_cv_sizeof_char=0
6086fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006087fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006088echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6089echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6090cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006091#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006092_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006093
6094
Martin v. Löwis11437992002-04-12 09:54:03 +00006095echo "$as_me:$LINENO: checking for short" >&5
6096echo $ECHO_N "checking for short... $ECHO_C" >&6
6097if test "${ac_cv_type_short+set}" = set; then
6098 echo $ECHO_N "(cached) $ECHO_C" >&6
6099else
6100 cat >conftest.$ac_ext <<_ACEOF
6101#line $LINENO "configure"
6102#include "confdefs.h"
6103$ac_includes_default
6104#ifdef F77_DUMMY_MAIN
6105# ifdef __cplusplus
6106 extern "C"
6107# endif
6108 int F77_DUMMY_MAIN() { return 1; }
6109#endif
6110int
6111main ()
6112{
6113if ((short *) 0)
6114 return 0;
6115if (sizeof (short))
6116 return 0;
6117 ;
6118 return 0;
6119}
6120_ACEOF
6121rm -f conftest.$ac_objext
6122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6123 (eval $ac_compile) 2>&5
6124 ac_status=$?
6125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6126 (exit $ac_status); } &&
6127 { ac_try='test -s conftest.$ac_objext'
6128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6129 (eval $ac_try) 2>&5
6130 ac_status=$?
6131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6132 (exit $ac_status); }; }; then
6133 ac_cv_type_short=yes
6134else
6135 echo "$as_me: failed program was:" >&5
6136cat conftest.$ac_ext >&5
6137ac_cv_type_short=no
6138fi
6139rm -f conftest.$ac_objext conftest.$ac_ext
6140fi
6141echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6142echo "${ECHO_T}$ac_cv_type_short" >&6
6143
6144echo "$as_me:$LINENO: checking size of short" >&5
6145echo $ECHO_N "checking size of short... $ECHO_C" >&6
6146if test "${ac_cv_sizeof_short+set}" = set; then
6147 echo $ECHO_N "(cached) $ECHO_C" >&6
6148else
6149 if test "$ac_cv_type_short" = yes; then
6150 # The cast to unsigned long works around a bug in the HP C Compiler
6151 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6152 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6153 # This bug is HP SR number 8606223364.
6154 if test "$cross_compiling" = yes; then
6155 # Depending upon the size, compute the lo and hi bounds.
6156cat >conftest.$ac_ext <<_ACEOF
6157#line $LINENO "configure"
6158#include "confdefs.h"
6159$ac_includes_default
6160#ifdef F77_DUMMY_MAIN
6161# ifdef __cplusplus
6162 extern "C"
6163# endif
6164 int F77_DUMMY_MAIN() { return 1; }
6165#endif
6166int
6167main ()
6168{
6169static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6170test_array [0] = 0
6171
6172 ;
6173 return 0;
6174}
6175_ACEOF
6176rm -f conftest.$ac_objext
6177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6178 (eval $ac_compile) 2>&5
6179 ac_status=$?
6180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6181 (exit $ac_status); } &&
6182 { ac_try='test -s conftest.$ac_objext'
6183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6184 (eval $ac_try) 2>&5
6185 ac_status=$?
6186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187 (exit $ac_status); }; }; then
6188 ac_lo=0 ac_mid=0
6189 while :; do
6190 cat >conftest.$ac_ext <<_ACEOF
6191#line $LINENO "configure"
6192#include "confdefs.h"
6193$ac_includes_default
6194#ifdef F77_DUMMY_MAIN
6195# ifdef __cplusplus
6196 extern "C"
6197# endif
6198 int F77_DUMMY_MAIN() { return 1; }
6199#endif
6200int
6201main ()
6202{
6203static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6204test_array [0] = 0
6205
6206 ;
6207 return 0;
6208}
6209_ACEOF
6210rm -f conftest.$ac_objext
6211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6212 (eval $ac_compile) 2>&5
6213 ac_status=$?
6214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6215 (exit $ac_status); } &&
6216 { ac_try='test -s conftest.$ac_objext'
6217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6218 (eval $ac_try) 2>&5
6219 ac_status=$?
6220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6221 (exit $ac_status); }; }; then
6222 ac_hi=$ac_mid; break
6223else
6224 echo "$as_me: failed program was:" >&5
6225cat conftest.$ac_ext >&5
6226ac_lo=`expr $ac_mid + 1`
6227 if test $ac_lo -le $ac_mid; then
6228 ac_lo= ac_hi=
6229 break
6230 fi
6231 ac_mid=`expr 2 '*' $ac_mid + 1`
6232fi
6233rm -f conftest.$ac_objext conftest.$ac_ext
6234 done
6235else
6236 echo "$as_me: failed program was:" >&5
6237cat conftest.$ac_ext >&5
6238cat >conftest.$ac_ext <<_ACEOF
6239#line $LINENO "configure"
6240#include "confdefs.h"
6241$ac_includes_default
6242#ifdef F77_DUMMY_MAIN
6243# ifdef __cplusplus
6244 extern "C"
6245# endif
6246 int F77_DUMMY_MAIN() { return 1; }
6247#endif
6248int
6249main ()
6250{
6251static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6252test_array [0] = 0
6253
6254 ;
6255 return 0;
6256}
6257_ACEOF
6258rm -f conftest.$ac_objext
6259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6260 (eval $ac_compile) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); } &&
6264 { ac_try='test -s conftest.$ac_objext'
6265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6266 (eval $ac_try) 2>&5
6267 ac_status=$?
6268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6269 (exit $ac_status); }; }; then
6270 ac_hi=-1 ac_mid=-1
6271 while :; do
6272 cat >conftest.$ac_ext <<_ACEOF
6273#line $LINENO "configure"
6274#include "confdefs.h"
6275$ac_includes_default
6276#ifdef F77_DUMMY_MAIN
6277# ifdef __cplusplus
6278 extern "C"
6279# endif
6280 int F77_DUMMY_MAIN() { return 1; }
6281#endif
6282int
6283main ()
6284{
6285static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6286test_array [0] = 0
6287
6288 ;
6289 return 0;
6290}
6291_ACEOF
6292rm -f conftest.$ac_objext
6293if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6294 (eval $ac_compile) 2>&5
6295 ac_status=$?
6296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6297 (exit $ac_status); } &&
6298 { ac_try='test -s conftest.$ac_objext'
6299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6300 (eval $ac_try) 2>&5
6301 ac_status=$?
6302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6303 (exit $ac_status); }; }; then
6304 ac_lo=$ac_mid; break
6305else
6306 echo "$as_me: failed program was:" >&5
6307cat conftest.$ac_ext >&5
6308ac_hi=`expr '(' $ac_mid ')' - 1`
6309 if test $ac_mid -le $ac_hi; then
6310 ac_lo= ac_hi=
6311 break
6312 fi
6313 ac_mid=`expr 2 '*' $ac_mid`
6314fi
6315rm -f conftest.$ac_objext conftest.$ac_ext
6316 done
6317else
6318 echo "$as_me: failed program was:" >&5
6319cat conftest.$ac_ext >&5
6320ac_lo= ac_hi=
6321fi
6322rm -f conftest.$ac_objext conftest.$ac_ext
6323fi
6324rm -f conftest.$ac_objext conftest.$ac_ext
6325# Binary search between lo and hi bounds.
6326while test "x$ac_lo" != "x$ac_hi"; do
6327 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6328 cat >conftest.$ac_ext <<_ACEOF
6329#line $LINENO "configure"
6330#include "confdefs.h"
6331$ac_includes_default
6332#ifdef F77_DUMMY_MAIN
6333# ifdef __cplusplus
6334 extern "C"
6335# endif
6336 int F77_DUMMY_MAIN() { return 1; }
6337#endif
6338int
6339main ()
6340{
6341static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6342test_array [0] = 0
6343
6344 ;
6345 return 0;
6346}
6347_ACEOF
6348rm -f conftest.$ac_objext
6349if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6350 (eval $ac_compile) 2>&5
6351 ac_status=$?
6352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6353 (exit $ac_status); } &&
6354 { ac_try='test -s conftest.$ac_objext'
6355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6356 (eval $ac_try) 2>&5
6357 ac_status=$?
6358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6359 (exit $ac_status); }; }; then
6360 ac_hi=$ac_mid
6361else
6362 echo "$as_me: failed program was:" >&5
6363cat conftest.$ac_ext >&5
6364ac_lo=`expr '(' $ac_mid ')' + 1`
6365fi
6366rm -f conftest.$ac_objext conftest.$ac_ext
6367done
6368case $ac_lo in
6369?*) ac_cv_sizeof_short=$ac_lo;;
6370'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6371echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6372 { (exit 1); exit 1; }; } ;;
6373esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006374else
6375 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006376 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6377echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6378 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006379else
Martin v. Löwis11437992002-04-12 09:54:03 +00006380 cat >conftest.$ac_ext <<_ACEOF
6381#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006382#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006383$ac_includes_default
6384long longval () { return (long) (sizeof (short)); }
6385unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006386#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006387#include <stdlib.h>
6388#ifdef F77_DUMMY_MAIN
6389# ifdef __cplusplus
6390 extern "C"
6391# endif
6392 int F77_DUMMY_MAIN() { return 1; }
6393#endif
6394int
6395main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006396{
Martin v. Löwis11437992002-04-12 09:54:03 +00006397
6398 FILE *f = fopen ("conftest.val", "w");
6399 if (! f)
6400 exit (1);
6401 if (((long) (sizeof (short))) < 0)
6402 {
6403 long i = longval ();
6404 if (i != ((long) (sizeof (short))))
6405 exit (1);
6406 fprintf (f, "%ld\n", i);
6407 }
6408 else
6409 {
6410 unsigned long i = ulongval ();
6411 if (i != ((long) (sizeof (short))))
6412 exit (1);
6413 fprintf (f, "%lu\n", i);
6414 }
6415 exit (ferror (f) || fclose (f) != 0);
6416
6417 ;
6418 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006419}
Martin v. Löwis11437992002-04-12 09:54:03 +00006420_ACEOF
6421rm -f conftest$ac_exeext
6422if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6423 (eval $ac_link) 2>&5
6424 ac_status=$?
6425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6426 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6428 (eval $ac_try) 2>&5
6429 ac_status=$?
6430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6431 (exit $ac_status); }; }; then
6432 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006433else
Martin v. Löwis11437992002-04-12 09:54:03 +00006434 echo "$as_me: program exited with status $ac_status" >&5
6435echo "$as_me: failed program was:" >&5
6436cat conftest.$ac_ext >&5
6437( exit $ac_status )
6438{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6439echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6440 { (exit 1); exit 1; }; }
6441fi
6442rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6443fi
6444fi
6445rm -f conftest.val
6446else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006447 ac_cv_sizeof_short=0
6448fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006449fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006450echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6451echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6452cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006453#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006454_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006455
6456
Martin v. Löwis11437992002-04-12 09:54:03 +00006457echo "$as_me:$LINENO: checking for float" >&5
6458echo $ECHO_N "checking for float... $ECHO_C" >&6
6459if test "${ac_cv_type_float+set}" = set; then
6460 echo $ECHO_N "(cached) $ECHO_C" >&6
6461else
6462 cat >conftest.$ac_ext <<_ACEOF
6463#line $LINENO "configure"
6464#include "confdefs.h"
6465$ac_includes_default
6466#ifdef F77_DUMMY_MAIN
6467# ifdef __cplusplus
6468 extern "C"
6469# endif
6470 int F77_DUMMY_MAIN() { return 1; }
6471#endif
6472int
6473main ()
6474{
6475if ((float *) 0)
6476 return 0;
6477if (sizeof (float))
6478 return 0;
6479 ;
6480 return 0;
6481}
6482_ACEOF
6483rm -f conftest.$ac_objext
6484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6485 (eval $ac_compile) 2>&5
6486 ac_status=$?
6487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6488 (exit $ac_status); } &&
6489 { ac_try='test -s conftest.$ac_objext'
6490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6491 (eval $ac_try) 2>&5
6492 ac_status=$?
6493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6494 (exit $ac_status); }; }; then
6495 ac_cv_type_float=yes
6496else
6497 echo "$as_me: failed program was:" >&5
6498cat conftest.$ac_ext >&5
6499ac_cv_type_float=no
6500fi
6501rm -f conftest.$ac_objext conftest.$ac_ext
6502fi
6503echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6504echo "${ECHO_T}$ac_cv_type_float" >&6
6505
6506echo "$as_me:$LINENO: checking size of float" >&5
6507echo $ECHO_N "checking size of float... $ECHO_C" >&6
6508if test "${ac_cv_sizeof_float+set}" = set; then
6509 echo $ECHO_N "(cached) $ECHO_C" >&6
6510else
6511 if test "$ac_cv_type_float" = yes; then
6512 # The cast to unsigned long works around a bug in the HP C Compiler
6513 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6514 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6515 # This bug is HP SR number 8606223364.
6516 if test "$cross_compiling" = yes; then
6517 # Depending upon the size, compute the lo and hi bounds.
6518cat >conftest.$ac_ext <<_ACEOF
6519#line $LINENO "configure"
6520#include "confdefs.h"
6521$ac_includes_default
6522#ifdef F77_DUMMY_MAIN
6523# ifdef __cplusplus
6524 extern "C"
6525# endif
6526 int F77_DUMMY_MAIN() { return 1; }
6527#endif
6528int
6529main ()
6530{
6531static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6532test_array [0] = 0
6533
6534 ;
6535 return 0;
6536}
6537_ACEOF
6538rm -f conftest.$ac_objext
6539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6540 (eval $ac_compile) 2>&5
6541 ac_status=$?
6542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6543 (exit $ac_status); } &&
6544 { ac_try='test -s conftest.$ac_objext'
6545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6546 (eval $ac_try) 2>&5
6547 ac_status=$?
6548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6549 (exit $ac_status); }; }; then
6550 ac_lo=0 ac_mid=0
6551 while :; do
6552 cat >conftest.$ac_ext <<_ACEOF
6553#line $LINENO "configure"
6554#include "confdefs.h"
6555$ac_includes_default
6556#ifdef F77_DUMMY_MAIN
6557# ifdef __cplusplus
6558 extern "C"
6559# endif
6560 int F77_DUMMY_MAIN() { return 1; }
6561#endif
6562int
6563main ()
6564{
6565static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6566test_array [0] = 0
6567
6568 ;
6569 return 0;
6570}
6571_ACEOF
6572rm -f conftest.$ac_objext
6573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6574 (eval $ac_compile) 2>&5
6575 ac_status=$?
6576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6577 (exit $ac_status); } &&
6578 { ac_try='test -s conftest.$ac_objext'
6579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6580 (eval $ac_try) 2>&5
6581 ac_status=$?
6582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6583 (exit $ac_status); }; }; then
6584 ac_hi=$ac_mid; break
6585else
6586 echo "$as_me: failed program was:" >&5
6587cat conftest.$ac_ext >&5
6588ac_lo=`expr $ac_mid + 1`
6589 if test $ac_lo -le $ac_mid; then
6590 ac_lo= ac_hi=
6591 break
6592 fi
6593 ac_mid=`expr 2 '*' $ac_mid + 1`
6594fi
6595rm -f conftest.$ac_objext conftest.$ac_ext
6596 done
6597else
6598 echo "$as_me: failed program was:" >&5
6599cat conftest.$ac_ext >&5
6600cat >conftest.$ac_ext <<_ACEOF
6601#line $LINENO "configure"
6602#include "confdefs.h"
6603$ac_includes_default
6604#ifdef F77_DUMMY_MAIN
6605# ifdef __cplusplus
6606 extern "C"
6607# endif
6608 int F77_DUMMY_MAIN() { return 1; }
6609#endif
6610int
6611main ()
6612{
6613static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6614test_array [0] = 0
6615
6616 ;
6617 return 0;
6618}
6619_ACEOF
6620rm -f conftest.$ac_objext
6621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6622 (eval $ac_compile) 2>&5
6623 ac_status=$?
6624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6625 (exit $ac_status); } &&
6626 { ac_try='test -s conftest.$ac_objext'
6627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6628 (eval $ac_try) 2>&5
6629 ac_status=$?
6630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6631 (exit $ac_status); }; }; then
6632 ac_hi=-1 ac_mid=-1
6633 while :; do
6634 cat >conftest.$ac_ext <<_ACEOF
6635#line $LINENO "configure"
6636#include "confdefs.h"
6637$ac_includes_default
6638#ifdef F77_DUMMY_MAIN
6639# ifdef __cplusplus
6640 extern "C"
6641# endif
6642 int F77_DUMMY_MAIN() { return 1; }
6643#endif
6644int
6645main ()
6646{
6647static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6648test_array [0] = 0
6649
6650 ;
6651 return 0;
6652}
6653_ACEOF
6654rm -f conftest.$ac_objext
6655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6656 (eval $ac_compile) 2>&5
6657 ac_status=$?
6658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6659 (exit $ac_status); } &&
6660 { ac_try='test -s conftest.$ac_objext'
6661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6662 (eval $ac_try) 2>&5
6663 ac_status=$?
6664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6665 (exit $ac_status); }; }; then
6666 ac_lo=$ac_mid; break
6667else
6668 echo "$as_me: failed program was:" >&5
6669cat conftest.$ac_ext >&5
6670ac_hi=`expr '(' $ac_mid ')' - 1`
6671 if test $ac_mid -le $ac_hi; then
6672 ac_lo= ac_hi=
6673 break
6674 fi
6675 ac_mid=`expr 2 '*' $ac_mid`
6676fi
6677rm -f conftest.$ac_objext conftest.$ac_ext
6678 done
6679else
6680 echo "$as_me: failed program was:" >&5
6681cat conftest.$ac_ext >&5
6682ac_lo= ac_hi=
6683fi
6684rm -f conftest.$ac_objext conftest.$ac_ext
6685fi
6686rm -f conftest.$ac_objext conftest.$ac_ext
6687# Binary search between lo and hi bounds.
6688while test "x$ac_lo" != "x$ac_hi"; do
6689 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6690 cat >conftest.$ac_ext <<_ACEOF
6691#line $LINENO "configure"
6692#include "confdefs.h"
6693$ac_includes_default
6694#ifdef F77_DUMMY_MAIN
6695# ifdef __cplusplus
6696 extern "C"
6697# endif
6698 int F77_DUMMY_MAIN() { return 1; }
6699#endif
6700int
6701main ()
6702{
6703static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6704test_array [0] = 0
6705
6706 ;
6707 return 0;
6708}
6709_ACEOF
6710rm -f conftest.$ac_objext
6711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6712 (eval $ac_compile) 2>&5
6713 ac_status=$?
6714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715 (exit $ac_status); } &&
6716 { ac_try='test -s conftest.$ac_objext'
6717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6718 (eval $ac_try) 2>&5
6719 ac_status=$?
6720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6721 (exit $ac_status); }; }; then
6722 ac_hi=$ac_mid
6723else
6724 echo "$as_me: failed program was:" >&5
6725cat conftest.$ac_ext >&5
6726ac_lo=`expr '(' $ac_mid ')' + 1`
6727fi
6728rm -f conftest.$ac_objext conftest.$ac_ext
6729done
6730case $ac_lo in
6731?*) ac_cv_sizeof_float=$ac_lo;;
6732'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6733echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6734 { (exit 1); exit 1; }; } ;;
6735esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006736else
6737 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006738 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6739echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6740 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006741else
Martin v. Löwis11437992002-04-12 09:54:03 +00006742 cat >conftest.$ac_ext <<_ACEOF
6743#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006744#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006745$ac_includes_default
6746long longval () { return (long) (sizeof (float)); }
6747unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006748#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006749#include <stdlib.h>
6750#ifdef F77_DUMMY_MAIN
6751# ifdef __cplusplus
6752 extern "C"
6753# endif
6754 int F77_DUMMY_MAIN() { return 1; }
6755#endif
6756int
6757main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006758{
Martin v. Löwis11437992002-04-12 09:54:03 +00006759
6760 FILE *f = fopen ("conftest.val", "w");
6761 if (! f)
6762 exit (1);
6763 if (((long) (sizeof (float))) < 0)
6764 {
6765 long i = longval ();
6766 if (i != ((long) (sizeof (float))))
6767 exit (1);
6768 fprintf (f, "%ld\n", i);
6769 }
6770 else
6771 {
6772 unsigned long i = ulongval ();
6773 if (i != ((long) (sizeof (float))))
6774 exit (1);
6775 fprintf (f, "%lu\n", i);
6776 }
6777 exit (ferror (f) || fclose (f) != 0);
6778
6779 ;
6780 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006781}
Martin v. Löwis11437992002-04-12 09:54:03 +00006782_ACEOF
6783rm -f conftest$ac_exeext
6784if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6785 (eval $ac_link) 2>&5
6786 ac_status=$?
6787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6788 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6790 (eval $ac_try) 2>&5
6791 ac_status=$?
6792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6793 (exit $ac_status); }; }; then
6794 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006795else
Martin v. Löwis11437992002-04-12 09:54:03 +00006796 echo "$as_me: program exited with status $ac_status" >&5
6797echo "$as_me: failed program was:" >&5
6798cat conftest.$ac_ext >&5
6799( exit $ac_status )
6800{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6801echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6802 { (exit 1); exit 1; }; }
6803fi
6804rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6805fi
6806fi
6807rm -f conftest.val
6808else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006809 ac_cv_sizeof_float=0
6810fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006811fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006812echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6813echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6814cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006815#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006816_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006817
6818
Martin v. Löwis11437992002-04-12 09:54:03 +00006819echo "$as_me:$LINENO: checking for double" >&5
6820echo $ECHO_N "checking for double... $ECHO_C" >&6
6821if test "${ac_cv_type_double+set}" = set; then
6822 echo $ECHO_N "(cached) $ECHO_C" >&6
6823else
6824 cat >conftest.$ac_ext <<_ACEOF
6825#line $LINENO "configure"
6826#include "confdefs.h"
6827$ac_includes_default
6828#ifdef F77_DUMMY_MAIN
6829# ifdef __cplusplus
6830 extern "C"
6831# endif
6832 int F77_DUMMY_MAIN() { return 1; }
6833#endif
6834int
6835main ()
6836{
6837if ((double *) 0)
6838 return 0;
6839if (sizeof (double))
6840 return 0;
6841 ;
6842 return 0;
6843}
6844_ACEOF
6845rm -f conftest.$ac_objext
6846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6847 (eval $ac_compile) 2>&5
6848 ac_status=$?
6849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6850 (exit $ac_status); } &&
6851 { ac_try='test -s conftest.$ac_objext'
6852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6853 (eval $ac_try) 2>&5
6854 ac_status=$?
6855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6856 (exit $ac_status); }; }; then
6857 ac_cv_type_double=yes
6858else
6859 echo "$as_me: failed program was:" >&5
6860cat conftest.$ac_ext >&5
6861ac_cv_type_double=no
6862fi
6863rm -f conftest.$ac_objext conftest.$ac_ext
6864fi
6865echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6866echo "${ECHO_T}$ac_cv_type_double" >&6
6867
6868echo "$as_me:$LINENO: checking size of double" >&5
6869echo $ECHO_N "checking size of double... $ECHO_C" >&6
6870if test "${ac_cv_sizeof_double+set}" = set; then
6871 echo $ECHO_N "(cached) $ECHO_C" >&6
6872else
6873 if test "$ac_cv_type_double" = yes; then
6874 # The cast to unsigned long works around a bug in the HP C Compiler
6875 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6876 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6877 # This bug is HP SR number 8606223364.
6878 if test "$cross_compiling" = yes; then
6879 # Depending upon the size, compute the lo and hi bounds.
6880cat >conftest.$ac_ext <<_ACEOF
6881#line $LINENO "configure"
6882#include "confdefs.h"
6883$ac_includes_default
6884#ifdef F77_DUMMY_MAIN
6885# ifdef __cplusplus
6886 extern "C"
6887# endif
6888 int F77_DUMMY_MAIN() { return 1; }
6889#endif
6890int
6891main ()
6892{
6893static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6894test_array [0] = 0
6895
6896 ;
6897 return 0;
6898}
6899_ACEOF
6900rm -f conftest.$ac_objext
6901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6902 (eval $ac_compile) 2>&5
6903 ac_status=$?
6904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6905 (exit $ac_status); } &&
6906 { ac_try='test -s conftest.$ac_objext'
6907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6908 (eval $ac_try) 2>&5
6909 ac_status=$?
6910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6911 (exit $ac_status); }; }; then
6912 ac_lo=0 ac_mid=0
6913 while :; do
6914 cat >conftest.$ac_ext <<_ACEOF
6915#line $LINENO "configure"
6916#include "confdefs.h"
6917$ac_includes_default
6918#ifdef F77_DUMMY_MAIN
6919# ifdef __cplusplus
6920 extern "C"
6921# endif
6922 int F77_DUMMY_MAIN() { return 1; }
6923#endif
6924int
6925main ()
6926{
6927static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6928test_array [0] = 0
6929
6930 ;
6931 return 0;
6932}
6933_ACEOF
6934rm -f conftest.$ac_objext
6935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6936 (eval $ac_compile) 2>&5
6937 ac_status=$?
6938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6939 (exit $ac_status); } &&
6940 { ac_try='test -s conftest.$ac_objext'
6941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6942 (eval $ac_try) 2>&5
6943 ac_status=$?
6944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6945 (exit $ac_status); }; }; then
6946 ac_hi=$ac_mid; break
6947else
6948 echo "$as_me: failed program was:" >&5
6949cat conftest.$ac_ext >&5
6950ac_lo=`expr $ac_mid + 1`
6951 if test $ac_lo -le $ac_mid; then
6952 ac_lo= ac_hi=
6953 break
6954 fi
6955 ac_mid=`expr 2 '*' $ac_mid + 1`
6956fi
6957rm -f conftest.$ac_objext conftest.$ac_ext
6958 done
6959else
6960 echo "$as_me: failed program was:" >&5
6961cat conftest.$ac_ext >&5
6962cat >conftest.$ac_ext <<_ACEOF
6963#line $LINENO "configure"
6964#include "confdefs.h"
6965$ac_includes_default
6966#ifdef F77_DUMMY_MAIN
6967# ifdef __cplusplus
6968 extern "C"
6969# endif
6970 int F77_DUMMY_MAIN() { return 1; }
6971#endif
6972int
6973main ()
6974{
6975static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6976test_array [0] = 0
6977
6978 ;
6979 return 0;
6980}
6981_ACEOF
6982rm -f conftest.$ac_objext
6983if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6984 (eval $ac_compile) 2>&5
6985 ac_status=$?
6986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6987 (exit $ac_status); } &&
6988 { ac_try='test -s conftest.$ac_objext'
6989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6990 (eval $ac_try) 2>&5
6991 ac_status=$?
6992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6993 (exit $ac_status); }; }; then
6994 ac_hi=-1 ac_mid=-1
6995 while :; do
6996 cat >conftest.$ac_ext <<_ACEOF
6997#line $LINENO "configure"
6998#include "confdefs.h"
6999$ac_includes_default
7000#ifdef F77_DUMMY_MAIN
7001# ifdef __cplusplus
7002 extern "C"
7003# endif
7004 int F77_DUMMY_MAIN() { return 1; }
7005#endif
7006int
7007main ()
7008{
7009static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7010test_array [0] = 0
7011
7012 ;
7013 return 0;
7014}
7015_ACEOF
7016rm -f conftest.$ac_objext
7017if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7018 (eval $ac_compile) 2>&5
7019 ac_status=$?
7020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7021 (exit $ac_status); } &&
7022 { ac_try='test -s conftest.$ac_objext'
7023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7024 (eval $ac_try) 2>&5
7025 ac_status=$?
7026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7027 (exit $ac_status); }; }; then
7028 ac_lo=$ac_mid; break
7029else
7030 echo "$as_me: failed program was:" >&5
7031cat conftest.$ac_ext >&5
7032ac_hi=`expr '(' $ac_mid ')' - 1`
7033 if test $ac_mid -le $ac_hi; then
7034 ac_lo= ac_hi=
7035 break
7036 fi
7037 ac_mid=`expr 2 '*' $ac_mid`
7038fi
7039rm -f conftest.$ac_objext conftest.$ac_ext
7040 done
7041else
7042 echo "$as_me: failed program was:" >&5
7043cat conftest.$ac_ext >&5
7044ac_lo= ac_hi=
7045fi
7046rm -f conftest.$ac_objext conftest.$ac_ext
7047fi
7048rm -f conftest.$ac_objext conftest.$ac_ext
7049# Binary search between lo and hi bounds.
7050while test "x$ac_lo" != "x$ac_hi"; do
7051 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7052 cat >conftest.$ac_ext <<_ACEOF
7053#line $LINENO "configure"
7054#include "confdefs.h"
7055$ac_includes_default
7056#ifdef F77_DUMMY_MAIN
7057# ifdef __cplusplus
7058 extern "C"
7059# endif
7060 int F77_DUMMY_MAIN() { return 1; }
7061#endif
7062int
7063main ()
7064{
7065static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7066test_array [0] = 0
7067
7068 ;
7069 return 0;
7070}
7071_ACEOF
7072rm -f conftest.$ac_objext
7073if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7074 (eval $ac_compile) 2>&5
7075 ac_status=$?
7076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7077 (exit $ac_status); } &&
7078 { ac_try='test -s conftest.$ac_objext'
7079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7080 (eval $ac_try) 2>&5
7081 ac_status=$?
7082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7083 (exit $ac_status); }; }; then
7084 ac_hi=$ac_mid
7085else
7086 echo "$as_me: failed program was:" >&5
7087cat conftest.$ac_ext >&5
7088ac_lo=`expr '(' $ac_mid ')' + 1`
7089fi
7090rm -f conftest.$ac_objext conftest.$ac_ext
7091done
7092case $ac_lo in
7093?*) ac_cv_sizeof_double=$ac_lo;;
7094'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7095echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7096 { (exit 1); exit 1; }; } ;;
7097esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007098else
7099 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007100 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7101echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7102 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007103else
Martin v. Löwis11437992002-04-12 09:54:03 +00007104 cat >conftest.$ac_ext <<_ACEOF
7105#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007106#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007107$ac_includes_default
7108long longval () { return (long) (sizeof (double)); }
7109unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007110#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007111#include <stdlib.h>
7112#ifdef F77_DUMMY_MAIN
7113# ifdef __cplusplus
7114 extern "C"
7115# endif
7116 int F77_DUMMY_MAIN() { return 1; }
7117#endif
7118int
7119main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007120{
Martin v. Löwis11437992002-04-12 09:54:03 +00007121
7122 FILE *f = fopen ("conftest.val", "w");
7123 if (! f)
7124 exit (1);
7125 if (((long) (sizeof (double))) < 0)
7126 {
7127 long i = longval ();
7128 if (i != ((long) (sizeof (double))))
7129 exit (1);
7130 fprintf (f, "%ld\n", i);
7131 }
7132 else
7133 {
7134 unsigned long i = ulongval ();
7135 if (i != ((long) (sizeof (double))))
7136 exit (1);
7137 fprintf (f, "%lu\n", i);
7138 }
7139 exit (ferror (f) || fclose (f) != 0);
7140
7141 ;
7142 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007143}
Martin v. Löwis11437992002-04-12 09:54:03 +00007144_ACEOF
7145rm -f conftest$ac_exeext
7146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7147 (eval $ac_link) 2>&5
7148 ac_status=$?
7149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7150 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7152 (eval $ac_try) 2>&5
7153 ac_status=$?
7154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7155 (exit $ac_status); }; }; then
7156 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007157else
Martin v. Löwis11437992002-04-12 09:54:03 +00007158 echo "$as_me: program exited with status $ac_status" >&5
7159echo "$as_me: failed program was:" >&5
7160cat conftest.$ac_ext >&5
7161( exit $ac_status )
7162{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7163echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7164 { (exit 1); exit 1; }; }
7165fi
7166rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7167fi
7168fi
7169rm -f conftest.val
7170else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007171 ac_cv_sizeof_double=0
7172fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007174echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7175echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7176cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007177#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007178_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007179
7180
Martin v. Löwis11437992002-04-12 09:54:03 +00007181echo "$as_me:$LINENO: checking for fpos_t" >&5
7182echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7183if test "${ac_cv_type_fpos_t+set}" = set; then
7184 echo $ECHO_N "(cached) $ECHO_C" >&6
7185else
7186 cat >conftest.$ac_ext <<_ACEOF
7187#line $LINENO "configure"
7188#include "confdefs.h"
7189$ac_includes_default
7190#ifdef F77_DUMMY_MAIN
7191# ifdef __cplusplus
7192 extern "C"
7193# endif
7194 int F77_DUMMY_MAIN() { return 1; }
7195#endif
7196int
7197main ()
7198{
7199if ((fpos_t *) 0)
7200 return 0;
7201if (sizeof (fpos_t))
7202 return 0;
7203 ;
7204 return 0;
7205}
7206_ACEOF
7207rm -f conftest.$ac_objext
7208if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7209 (eval $ac_compile) 2>&5
7210 ac_status=$?
7211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7212 (exit $ac_status); } &&
7213 { ac_try='test -s conftest.$ac_objext'
7214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7215 (eval $ac_try) 2>&5
7216 ac_status=$?
7217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7218 (exit $ac_status); }; }; then
7219 ac_cv_type_fpos_t=yes
7220else
7221 echo "$as_me: failed program was:" >&5
7222cat conftest.$ac_ext >&5
7223ac_cv_type_fpos_t=no
7224fi
7225rm -f conftest.$ac_objext conftest.$ac_ext
7226fi
7227echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7228echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7229
7230echo "$as_me:$LINENO: checking size of fpos_t" >&5
7231echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7232if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7233 echo $ECHO_N "(cached) $ECHO_C" >&6
7234else
7235 if test "$ac_cv_type_fpos_t" = yes; then
7236 # The cast to unsigned long works around a bug in the HP C Compiler
7237 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7238 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7239 # This bug is HP SR number 8606223364.
7240 if test "$cross_compiling" = yes; then
7241 # Depending upon the size, compute the lo and hi bounds.
7242cat >conftest.$ac_ext <<_ACEOF
7243#line $LINENO "configure"
7244#include "confdefs.h"
7245$ac_includes_default
7246#ifdef F77_DUMMY_MAIN
7247# ifdef __cplusplus
7248 extern "C"
7249# endif
7250 int F77_DUMMY_MAIN() { return 1; }
7251#endif
7252int
7253main ()
7254{
7255static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7256test_array [0] = 0
7257
7258 ;
7259 return 0;
7260}
7261_ACEOF
7262rm -f conftest.$ac_objext
7263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7264 (eval $ac_compile) 2>&5
7265 ac_status=$?
7266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7267 (exit $ac_status); } &&
7268 { ac_try='test -s conftest.$ac_objext'
7269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7270 (eval $ac_try) 2>&5
7271 ac_status=$?
7272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7273 (exit $ac_status); }; }; then
7274 ac_lo=0 ac_mid=0
7275 while :; do
7276 cat >conftest.$ac_ext <<_ACEOF
7277#line $LINENO "configure"
7278#include "confdefs.h"
7279$ac_includes_default
7280#ifdef F77_DUMMY_MAIN
7281# ifdef __cplusplus
7282 extern "C"
7283# endif
7284 int F77_DUMMY_MAIN() { return 1; }
7285#endif
7286int
7287main ()
7288{
7289static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7290test_array [0] = 0
7291
7292 ;
7293 return 0;
7294}
7295_ACEOF
7296rm -f conftest.$ac_objext
7297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7298 (eval $ac_compile) 2>&5
7299 ac_status=$?
7300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7301 (exit $ac_status); } &&
7302 { ac_try='test -s conftest.$ac_objext'
7303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7304 (eval $ac_try) 2>&5
7305 ac_status=$?
7306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7307 (exit $ac_status); }; }; then
7308 ac_hi=$ac_mid; break
7309else
7310 echo "$as_me: failed program was:" >&5
7311cat conftest.$ac_ext >&5
7312ac_lo=`expr $ac_mid + 1`
7313 if test $ac_lo -le $ac_mid; then
7314 ac_lo= ac_hi=
7315 break
7316 fi
7317 ac_mid=`expr 2 '*' $ac_mid + 1`
7318fi
7319rm -f conftest.$ac_objext conftest.$ac_ext
7320 done
7321else
7322 echo "$as_me: failed program was:" >&5
7323cat conftest.$ac_ext >&5
7324cat >conftest.$ac_ext <<_ACEOF
7325#line $LINENO "configure"
7326#include "confdefs.h"
7327$ac_includes_default
7328#ifdef F77_DUMMY_MAIN
7329# ifdef __cplusplus
7330 extern "C"
7331# endif
7332 int F77_DUMMY_MAIN() { return 1; }
7333#endif
7334int
7335main ()
7336{
7337static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7338test_array [0] = 0
7339
7340 ;
7341 return 0;
7342}
7343_ACEOF
7344rm -f conftest.$ac_objext
7345if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7346 (eval $ac_compile) 2>&5
7347 ac_status=$?
7348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7349 (exit $ac_status); } &&
7350 { ac_try='test -s conftest.$ac_objext'
7351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7352 (eval $ac_try) 2>&5
7353 ac_status=$?
7354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7355 (exit $ac_status); }; }; then
7356 ac_hi=-1 ac_mid=-1
7357 while :; do
7358 cat >conftest.$ac_ext <<_ACEOF
7359#line $LINENO "configure"
7360#include "confdefs.h"
7361$ac_includes_default
7362#ifdef F77_DUMMY_MAIN
7363# ifdef __cplusplus
7364 extern "C"
7365# endif
7366 int F77_DUMMY_MAIN() { return 1; }
7367#endif
7368int
7369main ()
7370{
7371static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7372test_array [0] = 0
7373
7374 ;
7375 return 0;
7376}
7377_ACEOF
7378rm -f conftest.$ac_objext
7379if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7380 (eval $ac_compile) 2>&5
7381 ac_status=$?
7382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7383 (exit $ac_status); } &&
7384 { ac_try='test -s conftest.$ac_objext'
7385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7386 (eval $ac_try) 2>&5
7387 ac_status=$?
7388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7389 (exit $ac_status); }; }; then
7390 ac_lo=$ac_mid; break
7391else
7392 echo "$as_me: failed program was:" >&5
7393cat conftest.$ac_ext >&5
7394ac_hi=`expr '(' $ac_mid ')' - 1`
7395 if test $ac_mid -le $ac_hi; then
7396 ac_lo= ac_hi=
7397 break
7398 fi
7399 ac_mid=`expr 2 '*' $ac_mid`
7400fi
7401rm -f conftest.$ac_objext conftest.$ac_ext
7402 done
7403else
7404 echo "$as_me: failed program was:" >&5
7405cat conftest.$ac_ext >&5
7406ac_lo= ac_hi=
7407fi
7408rm -f conftest.$ac_objext conftest.$ac_ext
7409fi
7410rm -f conftest.$ac_objext conftest.$ac_ext
7411# Binary search between lo and hi bounds.
7412while test "x$ac_lo" != "x$ac_hi"; do
7413 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7414 cat >conftest.$ac_ext <<_ACEOF
7415#line $LINENO "configure"
7416#include "confdefs.h"
7417$ac_includes_default
7418#ifdef F77_DUMMY_MAIN
7419# ifdef __cplusplus
7420 extern "C"
7421# endif
7422 int F77_DUMMY_MAIN() { return 1; }
7423#endif
7424int
7425main ()
7426{
7427static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7428test_array [0] = 0
7429
7430 ;
7431 return 0;
7432}
7433_ACEOF
7434rm -f conftest.$ac_objext
7435if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7436 (eval $ac_compile) 2>&5
7437 ac_status=$?
7438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439 (exit $ac_status); } &&
7440 { ac_try='test -s conftest.$ac_objext'
7441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7442 (eval $ac_try) 2>&5
7443 ac_status=$?
7444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445 (exit $ac_status); }; }; then
7446 ac_hi=$ac_mid
7447else
7448 echo "$as_me: failed program was:" >&5
7449cat conftest.$ac_ext >&5
7450ac_lo=`expr '(' $ac_mid ')' + 1`
7451fi
7452rm -f conftest.$ac_objext conftest.$ac_ext
7453done
7454case $ac_lo in
7455?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7456'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7457echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7458 { (exit 1); exit 1; }; } ;;
7459esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007460else
7461 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007462 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7463echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7464 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007465else
Martin v. Löwis11437992002-04-12 09:54:03 +00007466 cat >conftest.$ac_ext <<_ACEOF
7467#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007468#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007469$ac_includes_default
7470long longval () { return (long) (sizeof (fpos_t)); }
7471unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007472#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007473#include <stdlib.h>
7474#ifdef F77_DUMMY_MAIN
7475# ifdef __cplusplus
7476 extern "C"
7477# endif
7478 int F77_DUMMY_MAIN() { return 1; }
7479#endif
7480int
7481main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007482{
Martin v. Löwis11437992002-04-12 09:54:03 +00007483
7484 FILE *f = fopen ("conftest.val", "w");
7485 if (! f)
7486 exit (1);
7487 if (((long) (sizeof (fpos_t))) < 0)
7488 {
7489 long i = longval ();
7490 if (i != ((long) (sizeof (fpos_t))))
7491 exit (1);
7492 fprintf (f, "%ld\n", i);
7493 }
7494 else
7495 {
7496 unsigned long i = ulongval ();
7497 if (i != ((long) (sizeof (fpos_t))))
7498 exit (1);
7499 fprintf (f, "%lu\n", i);
7500 }
7501 exit (ferror (f) || fclose (f) != 0);
7502
7503 ;
7504 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007505}
Martin v. Löwis11437992002-04-12 09:54:03 +00007506_ACEOF
7507rm -f conftest$ac_exeext
7508if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7509 (eval $ac_link) 2>&5
7510 ac_status=$?
7511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7514 (eval $ac_try) 2>&5
7515 ac_status=$?
7516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7517 (exit $ac_status); }; }; then
7518 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007519else
Martin v. Löwis11437992002-04-12 09:54:03 +00007520 echo "$as_me: program exited with status $ac_status" >&5
7521echo "$as_me: failed program was:" >&5
7522cat conftest.$ac_ext >&5
7523( exit $ac_status )
7524{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7525echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7526 { (exit 1); exit 1; }; }
7527fi
7528rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7529fi
7530fi
7531rm -f conftest.val
7532else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007533 ac_cv_sizeof_fpos_t=0
7534fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007535fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007536echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7537echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7538cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007539#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007540_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007541
Michael W. Hudson54241132001-12-07 15:38:26 +00007542
7543
Martin v. Löwis11437992002-04-12 09:54:03 +00007544echo "$as_me:$LINENO: checking for long long support" >&5
7545echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007546have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007547cat >conftest.$ac_ext <<_ACEOF
7548#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007549#include "confdefs.h"
7550
Martin v. Löwis11437992002-04-12 09:54:03 +00007551#ifdef F77_DUMMY_MAIN
7552# ifdef __cplusplus
7553 extern "C"
7554# endif
7555 int F77_DUMMY_MAIN() { return 1; }
7556#endif
7557int
7558main ()
7559{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007560long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007561 ;
7562 return 0;
7563}
7564_ACEOF
7565rm -f conftest.$ac_objext
7566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7567 (eval $ac_compile) 2>&5
7568 ac_status=$?
7569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7570 (exit $ac_status); } &&
7571 { ac_try='test -s conftest.$ac_objext'
7572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7573 (eval $ac_try) 2>&5
7574 ac_status=$?
7575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7576 (exit $ac_status); }; }; then
7577
7578
7579cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007580#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007581_ACEOF
7582
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007583 have_long_long=yes
7584
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007585else
Martin v. Löwis11437992002-04-12 09:54:03 +00007586 echo "$as_me: failed program was:" >&5
7587cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007589rm -f conftest.$ac_objext conftest.$ac_ext
7590echo "$as_me:$LINENO: result: $have_long_long" >&5
7591echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007592if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007593echo "$as_me:$LINENO: checking for long long" >&5
7594echo $ECHO_N "checking for long long... $ECHO_C" >&6
7595if test "${ac_cv_type_long_long+set}" = set; then
7596 echo $ECHO_N "(cached) $ECHO_C" >&6
7597else
7598 cat >conftest.$ac_ext <<_ACEOF
7599#line $LINENO "configure"
7600#include "confdefs.h"
7601$ac_includes_default
7602#ifdef F77_DUMMY_MAIN
7603# ifdef __cplusplus
7604 extern "C"
7605# endif
7606 int F77_DUMMY_MAIN() { return 1; }
7607#endif
7608int
7609main ()
7610{
7611if ((long long *) 0)
7612 return 0;
7613if (sizeof (long long))
7614 return 0;
7615 ;
7616 return 0;
7617}
7618_ACEOF
7619rm -f conftest.$ac_objext
7620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7621 (eval $ac_compile) 2>&5
7622 ac_status=$?
7623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624 (exit $ac_status); } &&
7625 { ac_try='test -s conftest.$ac_objext'
7626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7627 (eval $ac_try) 2>&5
7628 ac_status=$?
7629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7630 (exit $ac_status); }; }; then
7631 ac_cv_type_long_long=yes
7632else
7633 echo "$as_me: failed program was:" >&5
7634cat conftest.$ac_ext >&5
7635ac_cv_type_long_long=no
7636fi
7637rm -f conftest.$ac_objext conftest.$ac_ext
7638fi
7639echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7640echo "${ECHO_T}$ac_cv_type_long_long" >&6
7641
7642echo "$as_me:$LINENO: checking size of long long" >&5
7643echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7644if test "${ac_cv_sizeof_long_long+set}" = set; then
7645 echo $ECHO_N "(cached) $ECHO_C" >&6
7646else
7647 if test "$ac_cv_type_long_long" = yes; then
7648 # The cast to unsigned long works around a bug in the HP C Compiler
7649 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7650 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7651 # This bug is HP SR number 8606223364.
7652 if test "$cross_compiling" = yes; then
7653 # Depending upon the size, compute the lo and hi bounds.
7654cat >conftest.$ac_ext <<_ACEOF
7655#line $LINENO "configure"
7656#include "confdefs.h"
7657$ac_includes_default
7658#ifdef F77_DUMMY_MAIN
7659# ifdef __cplusplus
7660 extern "C"
7661# endif
7662 int F77_DUMMY_MAIN() { return 1; }
7663#endif
7664int
7665main ()
7666{
7667static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7668test_array [0] = 0
7669
7670 ;
7671 return 0;
7672}
7673_ACEOF
7674rm -f conftest.$ac_objext
7675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7676 (eval $ac_compile) 2>&5
7677 ac_status=$?
7678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679 (exit $ac_status); } &&
7680 { ac_try='test -s conftest.$ac_objext'
7681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7682 (eval $ac_try) 2>&5
7683 ac_status=$?
7684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7685 (exit $ac_status); }; }; then
7686 ac_lo=0 ac_mid=0
7687 while :; do
7688 cat >conftest.$ac_ext <<_ACEOF
7689#line $LINENO "configure"
7690#include "confdefs.h"
7691$ac_includes_default
7692#ifdef F77_DUMMY_MAIN
7693# ifdef __cplusplus
7694 extern "C"
7695# endif
7696 int F77_DUMMY_MAIN() { return 1; }
7697#endif
7698int
7699main ()
7700{
7701static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7702test_array [0] = 0
7703
7704 ;
7705 return 0;
7706}
7707_ACEOF
7708rm -f conftest.$ac_objext
7709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7710 (eval $ac_compile) 2>&5
7711 ac_status=$?
7712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7713 (exit $ac_status); } &&
7714 { ac_try='test -s conftest.$ac_objext'
7715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7716 (eval $ac_try) 2>&5
7717 ac_status=$?
7718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7719 (exit $ac_status); }; }; then
7720 ac_hi=$ac_mid; break
7721else
7722 echo "$as_me: failed program was:" >&5
7723cat conftest.$ac_ext >&5
7724ac_lo=`expr $ac_mid + 1`
7725 if test $ac_lo -le $ac_mid; then
7726 ac_lo= ac_hi=
7727 break
7728 fi
7729 ac_mid=`expr 2 '*' $ac_mid + 1`
7730fi
7731rm -f conftest.$ac_objext conftest.$ac_ext
7732 done
7733else
7734 echo "$as_me: failed program was:" >&5
7735cat conftest.$ac_ext >&5
7736cat >conftest.$ac_ext <<_ACEOF
7737#line $LINENO "configure"
7738#include "confdefs.h"
7739$ac_includes_default
7740#ifdef F77_DUMMY_MAIN
7741# ifdef __cplusplus
7742 extern "C"
7743# endif
7744 int F77_DUMMY_MAIN() { return 1; }
7745#endif
7746int
7747main ()
7748{
7749static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7750test_array [0] = 0
7751
7752 ;
7753 return 0;
7754}
7755_ACEOF
7756rm -f conftest.$ac_objext
7757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7758 (eval $ac_compile) 2>&5
7759 ac_status=$?
7760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7761 (exit $ac_status); } &&
7762 { ac_try='test -s conftest.$ac_objext'
7763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7764 (eval $ac_try) 2>&5
7765 ac_status=$?
7766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7767 (exit $ac_status); }; }; then
7768 ac_hi=-1 ac_mid=-1
7769 while :; do
7770 cat >conftest.$ac_ext <<_ACEOF
7771#line $LINENO "configure"
7772#include "confdefs.h"
7773$ac_includes_default
7774#ifdef F77_DUMMY_MAIN
7775# ifdef __cplusplus
7776 extern "C"
7777# endif
7778 int F77_DUMMY_MAIN() { return 1; }
7779#endif
7780int
7781main ()
7782{
7783static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7784test_array [0] = 0
7785
7786 ;
7787 return 0;
7788}
7789_ACEOF
7790rm -f conftest.$ac_objext
7791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7792 (eval $ac_compile) 2>&5
7793 ac_status=$?
7794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7795 (exit $ac_status); } &&
7796 { ac_try='test -s conftest.$ac_objext'
7797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7798 (eval $ac_try) 2>&5
7799 ac_status=$?
7800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7801 (exit $ac_status); }; }; then
7802 ac_lo=$ac_mid; break
7803else
7804 echo "$as_me: failed program was:" >&5
7805cat conftest.$ac_ext >&5
7806ac_hi=`expr '(' $ac_mid ')' - 1`
7807 if test $ac_mid -le $ac_hi; then
7808 ac_lo= ac_hi=
7809 break
7810 fi
7811 ac_mid=`expr 2 '*' $ac_mid`
7812fi
7813rm -f conftest.$ac_objext conftest.$ac_ext
7814 done
7815else
7816 echo "$as_me: failed program was:" >&5
7817cat conftest.$ac_ext >&5
7818ac_lo= ac_hi=
7819fi
7820rm -f conftest.$ac_objext conftest.$ac_ext
7821fi
7822rm -f conftest.$ac_objext conftest.$ac_ext
7823# Binary search between lo and hi bounds.
7824while test "x$ac_lo" != "x$ac_hi"; do
7825 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7826 cat >conftest.$ac_ext <<_ACEOF
7827#line $LINENO "configure"
7828#include "confdefs.h"
7829$ac_includes_default
7830#ifdef F77_DUMMY_MAIN
7831# ifdef __cplusplus
7832 extern "C"
7833# endif
7834 int F77_DUMMY_MAIN() { return 1; }
7835#endif
7836int
7837main ()
7838{
7839static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7840test_array [0] = 0
7841
7842 ;
7843 return 0;
7844}
7845_ACEOF
7846rm -f conftest.$ac_objext
7847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7848 (eval $ac_compile) 2>&5
7849 ac_status=$?
7850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7851 (exit $ac_status); } &&
7852 { ac_try='test -s conftest.$ac_objext'
7853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7854 (eval $ac_try) 2>&5
7855 ac_status=$?
7856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7857 (exit $ac_status); }; }; then
7858 ac_hi=$ac_mid
7859else
7860 echo "$as_me: failed program was:" >&5
7861cat conftest.$ac_ext >&5
7862ac_lo=`expr '(' $ac_mid ')' + 1`
7863fi
7864rm -f conftest.$ac_objext conftest.$ac_ext
7865done
7866case $ac_lo in
7867?*) ac_cv_sizeof_long_long=$ac_lo;;
7868'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7869echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7870 { (exit 1); exit 1; }; } ;;
7871esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007872else
7873 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007874 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7875echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7876 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007877else
Martin v. Löwis11437992002-04-12 09:54:03 +00007878 cat >conftest.$ac_ext <<_ACEOF
7879#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007880#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007881$ac_includes_default
7882long longval () { return (long) (sizeof (long long)); }
7883unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007884#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007885#include <stdlib.h>
7886#ifdef F77_DUMMY_MAIN
7887# ifdef __cplusplus
7888 extern "C"
7889# endif
7890 int F77_DUMMY_MAIN() { return 1; }
7891#endif
7892int
7893main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007894{
Martin v. Löwis11437992002-04-12 09:54:03 +00007895
7896 FILE *f = fopen ("conftest.val", "w");
7897 if (! f)
7898 exit (1);
7899 if (((long) (sizeof (long long))) < 0)
7900 {
7901 long i = longval ();
7902 if (i != ((long) (sizeof (long long))))
7903 exit (1);
7904 fprintf (f, "%ld\n", i);
7905 }
7906 else
7907 {
7908 unsigned long i = ulongval ();
7909 if (i != ((long) (sizeof (long long))))
7910 exit (1);
7911 fprintf (f, "%lu\n", i);
7912 }
7913 exit (ferror (f) || fclose (f) != 0);
7914
7915 ;
7916 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007917}
Martin v. Löwis11437992002-04-12 09:54:03 +00007918_ACEOF
7919rm -f conftest$ac_exeext
7920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7921 (eval $ac_link) 2>&5
7922 ac_status=$?
7923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7924 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7926 (eval $ac_try) 2>&5
7927 ac_status=$?
7928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7929 (exit $ac_status); }; }; then
7930 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007931else
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 echo "$as_me: program exited with status $ac_status" >&5
7933echo "$as_me: failed program was:" >&5
7934cat conftest.$ac_ext >&5
7935( exit $ac_status )
7936{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7937echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7938 { (exit 1); exit 1; }; }
7939fi
7940rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7941fi
7942fi
7943rm -f conftest.val
7944else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007945 ac_cv_sizeof_long_long=0
7946fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007947fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007948echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7949echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7950cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007951#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007952_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007953
Michael W. Hudson54241132001-12-07 15:38:26 +00007954
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007955fi
7956
Martin v. Löwis11437992002-04-12 09:54:03 +00007957echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7958echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007959have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007960cat >conftest.$ac_ext <<_ACEOF
7961#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007962#include "confdefs.h"
7963
Martin v. Löwis11437992002-04-12 09:54:03 +00007964#ifdef F77_DUMMY_MAIN
7965# ifdef __cplusplus
7966 extern "C"
7967# endif
7968 int F77_DUMMY_MAIN() { return 1; }
7969#endif
7970int
7971main ()
7972{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007973uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 ;
7975 return 0;
7976}
7977_ACEOF
7978rm -f conftest.$ac_objext
7979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7980 (eval $ac_compile) 2>&5
7981 ac_status=$?
7982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7983 (exit $ac_status); } &&
7984 { ac_try='test -s conftest.$ac_objext'
7985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7986 (eval $ac_try) 2>&5
7987 ac_status=$?
7988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7989 (exit $ac_status); }; }; then
7990
7991
7992cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007993#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007994_ACEOF
7995
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007996 have_uintptr_t=yes
7997
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007998else
Martin v. Löwis11437992002-04-12 09:54:03 +00007999 echo "$as_me: failed program was:" >&5
8000cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008002rm -f conftest.$ac_objext conftest.$ac_ext
8003echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8004echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008005if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008006echo "$as_me:$LINENO: checking for uintptr_t" >&5
8007echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8008if test "${ac_cv_type_uintptr_t+set}" = set; then
8009 echo $ECHO_N "(cached) $ECHO_C" >&6
8010else
8011 cat >conftest.$ac_ext <<_ACEOF
8012#line $LINENO "configure"
8013#include "confdefs.h"
8014$ac_includes_default
8015#ifdef F77_DUMMY_MAIN
8016# ifdef __cplusplus
8017 extern "C"
8018# endif
8019 int F77_DUMMY_MAIN() { return 1; }
8020#endif
8021int
8022main ()
8023{
8024if ((uintptr_t *) 0)
8025 return 0;
8026if (sizeof (uintptr_t))
8027 return 0;
8028 ;
8029 return 0;
8030}
8031_ACEOF
8032rm -f conftest.$ac_objext
8033if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8034 (eval $ac_compile) 2>&5
8035 ac_status=$?
8036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8037 (exit $ac_status); } &&
8038 { ac_try='test -s conftest.$ac_objext'
8039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8040 (eval $ac_try) 2>&5
8041 ac_status=$?
8042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8043 (exit $ac_status); }; }; then
8044 ac_cv_type_uintptr_t=yes
8045else
8046 echo "$as_me: failed program was:" >&5
8047cat conftest.$ac_ext >&5
8048ac_cv_type_uintptr_t=no
8049fi
8050rm -f conftest.$ac_objext conftest.$ac_ext
8051fi
8052echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8053echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8054
8055echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8056echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8057if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8058 echo $ECHO_N "(cached) $ECHO_C" >&6
8059else
8060 if test "$ac_cv_type_uintptr_t" = yes; then
8061 # The cast to unsigned long works around a bug in the HP C Compiler
8062 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8063 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8064 # This bug is HP SR number 8606223364.
8065 if test "$cross_compiling" = yes; then
8066 # Depending upon the size, compute the lo and hi bounds.
8067cat >conftest.$ac_ext <<_ACEOF
8068#line $LINENO "configure"
8069#include "confdefs.h"
8070$ac_includes_default
8071#ifdef F77_DUMMY_MAIN
8072# ifdef __cplusplus
8073 extern "C"
8074# endif
8075 int F77_DUMMY_MAIN() { return 1; }
8076#endif
8077int
8078main ()
8079{
8080static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8081test_array [0] = 0
8082
8083 ;
8084 return 0;
8085}
8086_ACEOF
8087rm -f conftest.$ac_objext
8088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8089 (eval $ac_compile) 2>&5
8090 ac_status=$?
8091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8092 (exit $ac_status); } &&
8093 { ac_try='test -s conftest.$ac_objext'
8094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8095 (eval $ac_try) 2>&5
8096 ac_status=$?
8097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8098 (exit $ac_status); }; }; then
8099 ac_lo=0 ac_mid=0
8100 while :; do
8101 cat >conftest.$ac_ext <<_ACEOF
8102#line $LINENO "configure"
8103#include "confdefs.h"
8104$ac_includes_default
8105#ifdef F77_DUMMY_MAIN
8106# ifdef __cplusplus
8107 extern "C"
8108# endif
8109 int F77_DUMMY_MAIN() { return 1; }
8110#endif
8111int
8112main ()
8113{
8114static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8115test_array [0] = 0
8116
8117 ;
8118 return 0;
8119}
8120_ACEOF
8121rm -f conftest.$ac_objext
8122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8123 (eval $ac_compile) 2>&5
8124 ac_status=$?
8125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8126 (exit $ac_status); } &&
8127 { ac_try='test -s conftest.$ac_objext'
8128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8129 (eval $ac_try) 2>&5
8130 ac_status=$?
8131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8132 (exit $ac_status); }; }; then
8133 ac_hi=$ac_mid; break
8134else
8135 echo "$as_me: failed program was:" >&5
8136cat conftest.$ac_ext >&5
8137ac_lo=`expr $ac_mid + 1`
8138 if test $ac_lo -le $ac_mid; then
8139 ac_lo= ac_hi=
8140 break
8141 fi
8142 ac_mid=`expr 2 '*' $ac_mid + 1`
8143fi
8144rm -f conftest.$ac_objext conftest.$ac_ext
8145 done
8146else
8147 echo "$as_me: failed program was:" >&5
8148cat conftest.$ac_ext >&5
8149cat >conftest.$ac_ext <<_ACEOF
8150#line $LINENO "configure"
8151#include "confdefs.h"
8152$ac_includes_default
8153#ifdef F77_DUMMY_MAIN
8154# ifdef __cplusplus
8155 extern "C"
8156# endif
8157 int F77_DUMMY_MAIN() { return 1; }
8158#endif
8159int
8160main ()
8161{
8162static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8163test_array [0] = 0
8164
8165 ;
8166 return 0;
8167}
8168_ACEOF
8169rm -f conftest.$ac_objext
8170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8171 (eval $ac_compile) 2>&5
8172 ac_status=$?
8173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8174 (exit $ac_status); } &&
8175 { ac_try='test -s conftest.$ac_objext'
8176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8177 (eval $ac_try) 2>&5
8178 ac_status=$?
8179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8180 (exit $ac_status); }; }; then
8181 ac_hi=-1 ac_mid=-1
8182 while :; do
8183 cat >conftest.$ac_ext <<_ACEOF
8184#line $LINENO "configure"
8185#include "confdefs.h"
8186$ac_includes_default
8187#ifdef F77_DUMMY_MAIN
8188# ifdef __cplusplus
8189 extern "C"
8190# endif
8191 int F77_DUMMY_MAIN() { return 1; }
8192#endif
8193int
8194main ()
8195{
8196static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8197test_array [0] = 0
8198
8199 ;
8200 return 0;
8201}
8202_ACEOF
8203rm -f conftest.$ac_objext
8204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8205 (eval $ac_compile) 2>&5
8206 ac_status=$?
8207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8208 (exit $ac_status); } &&
8209 { ac_try='test -s conftest.$ac_objext'
8210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8211 (eval $ac_try) 2>&5
8212 ac_status=$?
8213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214 (exit $ac_status); }; }; then
8215 ac_lo=$ac_mid; break
8216else
8217 echo "$as_me: failed program was:" >&5
8218cat conftest.$ac_ext >&5
8219ac_hi=`expr '(' $ac_mid ')' - 1`
8220 if test $ac_mid -le $ac_hi; then
8221 ac_lo= ac_hi=
8222 break
8223 fi
8224 ac_mid=`expr 2 '*' $ac_mid`
8225fi
8226rm -f conftest.$ac_objext conftest.$ac_ext
8227 done
8228else
8229 echo "$as_me: failed program was:" >&5
8230cat conftest.$ac_ext >&5
8231ac_lo= ac_hi=
8232fi
8233rm -f conftest.$ac_objext conftest.$ac_ext
8234fi
8235rm -f conftest.$ac_objext conftest.$ac_ext
8236# Binary search between lo and hi bounds.
8237while test "x$ac_lo" != "x$ac_hi"; do
8238 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8239 cat >conftest.$ac_ext <<_ACEOF
8240#line $LINENO "configure"
8241#include "confdefs.h"
8242$ac_includes_default
8243#ifdef F77_DUMMY_MAIN
8244# ifdef __cplusplus
8245 extern "C"
8246# endif
8247 int F77_DUMMY_MAIN() { return 1; }
8248#endif
8249int
8250main ()
8251{
8252static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8253test_array [0] = 0
8254
8255 ;
8256 return 0;
8257}
8258_ACEOF
8259rm -f conftest.$ac_objext
8260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8261 (eval $ac_compile) 2>&5
8262 ac_status=$?
8263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8264 (exit $ac_status); } &&
8265 { ac_try='test -s conftest.$ac_objext'
8266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8267 (eval $ac_try) 2>&5
8268 ac_status=$?
8269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8270 (exit $ac_status); }; }; then
8271 ac_hi=$ac_mid
8272else
8273 echo "$as_me: failed program was:" >&5
8274cat conftest.$ac_ext >&5
8275ac_lo=`expr '(' $ac_mid ')' + 1`
8276fi
8277rm -f conftest.$ac_objext conftest.$ac_ext
8278done
8279case $ac_lo in
8280?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8281'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8282echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8283 { (exit 1); exit 1; }; } ;;
8284esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008285else
8286 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008287 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8288echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8289 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008290else
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 cat >conftest.$ac_ext <<_ACEOF
8292#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008293#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008294$ac_includes_default
8295long longval () { return (long) (sizeof (uintptr_t)); }
8296unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008297#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008298#include <stdlib.h>
8299#ifdef F77_DUMMY_MAIN
8300# ifdef __cplusplus
8301 extern "C"
8302# endif
8303 int F77_DUMMY_MAIN() { return 1; }
8304#endif
8305int
8306main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008307{
Martin v. Löwis11437992002-04-12 09:54:03 +00008308
8309 FILE *f = fopen ("conftest.val", "w");
8310 if (! f)
8311 exit (1);
8312 if (((long) (sizeof (uintptr_t))) < 0)
8313 {
8314 long i = longval ();
8315 if (i != ((long) (sizeof (uintptr_t))))
8316 exit (1);
8317 fprintf (f, "%ld\n", i);
8318 }
8319 else
8320 {
8321 unsigned long i = ulongval ();
8322 if (i != ((long) (sizeof (uintptr_t))))
8323 exit (1);
8324 fprintf (f, "%lu\n", i);
8325 }
8326 exit (ferror (f) || fclose (f) != 0);
8327
8328 ;
8329 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008330}
Martin v. Löwis11437992002-04-12 09:54:03 +00008331_ACEOF
8332rm -f conftest$ac_exeext
8333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8334 (eval $ac_link) 2>&5
8335 ac_status=$?
8336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8339 (eval $ac_try) 2>&5
8340 ac_status=$?
8341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8342 (exit $ac_status); }; }; then
8343 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008344else
Martin v. Löwis11437992002-04-12 09:54:03 +00008345 echo "$as_me: program exited with status $ac_status" >&5
8346echo "$as_me: failed program was:" >&5
8347cat conftest.$ac_ext >&5
8348( exit $ac_status )
8349{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8350echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8351 { (exit 1); exit 1; }; }
8352fi
8353rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8354fi
8355fi
8356rm -f conftest.val
8357else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008358 ac_cv_sizeof_uintptr_t=0
8359fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008361echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8362echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8363cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008364#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008365_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008366
Michael W. Hudson54241132001-12-07 15:38:26 +00008367
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008368fi
8369
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008370# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008371echo "$as_me:$LINENO: checking size of off_t" >&5
8372echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8373if test "${ac_cv_sizeof_off_t+set}" = set; then
8374 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008375else
8376 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008377 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008378else
Martin v. Löwis11437992002-04-12 09:54:03 +00008379 cat >conftest.$ac_ext <<_ACEOF
8380#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008381#include "confdefs.h"
8382#include <stdio.h>
8383#include <sys/types.h>
8384main()
8385{
8386 FILE *f=fopen("conftestval", "w");
8387 if (!f) exit(1);
8388 fprintf(f, "%d\n", sizeof(off_t));
8389 exit(0);
8390}
Martin v. Löwis11437992002-04-12 09:54:03 +00008391_ACEOF
8392rm -f conftest$ac_exeext
8393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8394 (eval $ac_link) 2>&5
8395 ac_status=$?
8396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8397 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8399 (eval $ac_try) 2>&5
8400 ac_status=$?
8401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8402 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008403 ac_cv_sizeof_off_t=`cat conftestval`
8404else
Martin v. Löwis11437992002-04-12 09:54:03 +00008405 echo "$as_me: program exited with status $ac_status" >&5
8406echo "$as_me: failed program was:" >&5
8407cat conftest.$ac_ext >&5
8408( exit $ac_status )
8409ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008410fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008411rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008412fi
8413
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008414fi
8415
Martin v. Löwis11437992002-04-12 09:54:03 +00008416echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8417echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8418
8419cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008420#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008421_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008422
Michael W. Hudson54241132001-12-07 15:38:26 +00008423
Martin v. Löwis11437992002-04-12 09:54:03 +00008424echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8425echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008426if test "$have_long_long" = yes -a \
8427 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8428 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008429
Martin v. Löwis11437992002-04-12 09:54:03 +00008430cat >>confdefs.h <<\_ACEOF
8431#define HAVE_LARGEFILE_SUPPORT 1
8432_ACEOF
8433
8434 echo "$as_me:$LINENO: result: yes" >&5
8435echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008436else
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 echo "$as_me:$LINENO: result: no" >&5
8438echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008439fi
8440
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008441# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008442echo "$as_me:$LINENO: checking size of time_t" >&5
8443echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8444if test "${ac_cv_sizeof_time_t+set}" = set; then
8445 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008446else
8447 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008448 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008449else
Martin v. Löwis11437992002-04-12 09:54:03 +00008450 cat >conftest.$ac_ext <<_ACEOF
8451#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008452#include "confdefs.h"
8453#include <stdio.h>
8454#include <time.h>
8455main()
8456{
8457 FILE *f=fopen("conftestval", "w");
8458 if (!f) exit(1);
8459 fprintf(f, "%d\n", sizeof(time_t));
8460 exit(0);
8461}
Martin v. Löwis11437992002-04-12 09:54:03 +00008462_ACEOF
8463rm -f conftest$ac_exeext
8464if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8465 (eval $ac_link) 2>&5
8466 ac_status=$?
8467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8468 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8470 (eval $ac_try) 2>&5
8471 ac_status=$?
8472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8473 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008474 ac_cv_sizeof_time_t=`cat conftestval`
8475else
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 echo "$as_me: program exited with status $ac_status" >&5
8477echo "$as_me: failed program was:" >&5
8478cat conftest.$ac_ext >&5
8479( exit $ac_status )
8480ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008482rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008483fi
8484
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008485fi
8486
Martin v. Löwis11437992002-04-12 09:54:03 +00008487echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8488echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8489
8490cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008491#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008492_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008493
Michael W. Hudson54241132001-12-07 15:38:26 +00008494
8495
Trent Mick635f6fb2000-08-23 21:33:05 +00008496# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008497ac_save_cc="$CC"
8498if test "$ac_cv_kpthread" = "yes"
8499then CC="$CC -Kpthread"
8500fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008501echo "$as_me:$LINENO: checking for pthread_t" >&5
8502echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008503have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008504cat >conftest.$ac_ext <<_ACEOF
8505#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008506#include "confdefs.h"
8507#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008508#ifdef F77_DUMMY_MAIN
8509# ifdef __cplusplus
8510 extern "C"
8511# endif
8512 int F77_DUMMY_MAIN() { return 1; }
8513#endif
8514int
8515main ()
8516{
Guido van Rossum12580492000-09-24 16:47:19 +00008517pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008518 ;
8519 return 0;
8520}
8521_ACEOF
8522rm -f conftest.$ac_objext
8523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8524 (eval $ac_compile) 2>&5
8525 ac_status=$?
8526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8527 (exit $ac_status); } &&
8528 { ac_try='test -s conftest.$ac_objext'
8529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8530 (eval $ac_try) 2>&5
8531 ac_status=$?
8532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8533 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008534 have_pthread_t=yes
8535else
Martin v. Löwis11437992002-04-12 09:54:03 +00008536 echo "$as_me: failed program was:" >&5
8537cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008538fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008539rm -f conftest.$ac_objext conftest.$ac_ext
8540echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8541echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008542if test "$have_pthread_t" = yes ; then
8543 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008544 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8545echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8546 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8547 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008548else
8549 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008550 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008551else
Martin v. Löwis11437992002-04-12 09:54:03 +00008552 cat >conftest.$ac_ext <<_ACEOF
8553#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008554#include "confdefs.h"
8555#include <stdio.h>
8556 #include <pthread.h>
8557 main()
8558 {
8559 FILE *f=fopen("conftestval", "w");
8560 if (!f) exit(1);
8561 fprintf(f, "%d\n", sizeof(pthread_t));
8562 exit(0);
8563 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008564_ACEOF
8565rm -f conftest$ac_exeext
8566if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8567 (eval $ac_link) 2>&5
8568 ac_status=$?
8569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8572 (eval $ac_try) 2>&5
8573 ac_status=$?
8574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8575 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008576 ac_cv_sizeof_pthread_t=`cat conftestval`
8577else
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 echo "$as_me: program exited with status $ac_status" >&5
8579echo "$as_me: failed program was:" >&5
8580cat conftest.$ac_ext >&5
8581( exit $ac_status )
8582ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008583fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008584rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008585fi
8586
Trent Mick635f6fb2000-08-23 21:33:05 +00008587fi
8588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8590echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8591
8592cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008593#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008594_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008595
8596fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008597CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8600echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008601# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8602if test "${enable_toolbox_glue+set}" = set; then
8603 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008604
Martin v. Löwis11437992002-04-12 09:54:03 +00008605fi;
Jack Jansene578a632001-08-15 01:27:14 +00008606
8607if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008608then
Jack Jansene578a632001-08-15 01:27:14 +00008609 case $ac_sys_system/$ac_sys_release in
8610 Darwin/*)
8611 enable_toolbox_glue="yes";;
8612 *)
8613 enable_toolbox_glue="no";;
8614 esac
8615fi
8616case "$enable_toolbox_glue" in
8617yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008618 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008619 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008620 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008621
8622cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008623#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008624_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008625
8626 ;;
8627*)
8628 extra_frameworks=""
8629 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008630 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008631 ;;
8632esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008633echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8634echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008635
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008636
8637case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008638 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008639 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008640 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8641 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008642 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8643 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008644 Darwin/*)
8645 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008646 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8647 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008648 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8649 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008650esac
8651
Martin v. Löwis11437992002-04-12 09:54:03 +00008652echo "$as_me:$LINENO: checking for --enable-framework" >&5
8653echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008654if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008655then
Jack Jansenca06bc62001-08-03 15:32:23 +00008656 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008657 # -U __environ is needed since bundles don't have access
8658 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008660 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008661
Jack Jansena3891ea2001-09-07 14:25:12 +00008662 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008663 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8664 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008665 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008666
Martin v. Löwis11437992002-04-12 09:54:03 +00008667cat >>confdefs.h <<\_ACEOF
8668#define WITH_NEXT_FRAMEWORK 1
8669_ACEOF
8670
8671 echo "$as_me:$LINENO: result: yes" >&5
8672echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008673else
Martin v. Löwis11437992002-04-12 09:54:03 +00008674 echo "$as_me:$LINENO: result: no" >&5
8675echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008676fi
8677
Martin v. Löwis11437992002-04-12 09:54:03 +00008678echo "$as_me:$LINENO: checking for dyld" >&5
8679echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008680case $ac_sys_system/$ac_sys_release in
8681 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008682
Martin v. Löwis11437992002-04-12 09:54:03 +00008683cat >>confdefs.h <<\_ACEOF
8684#define WITH_DYLD 1
8685_ACEOF
8686
8687 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8688echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008689 ;;
8690 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 echo "$as_me:$LINENO: result: no" >&5
8692echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008693 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008694esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008695
Guido van Rossum0a516c91994-09-12 10:58:40 +00008696# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008697
Michael W. Hudson54241132001-12-07 15:38:26 +00008698
8699
8700
8701
Guido van Rossum0a516c91994-09-12 10:58:40 +00008702# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008703# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008704echo "$as_me:$LINENO: checking SO" >&5
8705echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008706if test -z "$SO"
8707then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008708 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008709 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008710 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008711 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008712 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008713fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008714echo "$as_me:$LINENO: result: $SO" >&5
8715echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008716# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008717# -- "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 +00008718# (Shared libraries in this instance are shared modules to be loaded into
8719# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008720echo "$as_me:$LINENO: checking LDSHARED" >&5
8721echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008722if test -z "$LDSHARED"
8723then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008724 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008725 AIX*)
8726 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008727 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008728 ;;
8729 BeOS*)
8730 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008731 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008732 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008733 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008734 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008735 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00008737 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008738 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008739 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00008740 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008741 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008742 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8743 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008744 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008745 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8746 if test "$enable_framework" ; then
8747 # Link against the framework. All externals should be defined.
8748 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8749 else
8750 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008751 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008752 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008753 Darwin/*)
8754 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8755 if test "$enable_framework" ; then
8756 # Link against the framework. All externals should be defined.
8757 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8758 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008759 # No framework, use the Python app as bundle-loader
8760 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8761 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008762 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008763 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008764 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008765 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008766 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008767 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008768 then
8769 LDSHARED="cc -shared ${LDFLAGS}"
8770 else
8771 LDSHARED="ld -Bshareable ${LDFLAGS}"
8772 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008773 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008774 if test "$GCC" = "yes"
8775 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008776 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008777 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008778 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008779 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008780 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008781 *) LDSHARED="ld";;
8782 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008783fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008784echo "$as_me:$LINENO: result: $LDSHARED" >&5
8785echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008786BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008787# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008788# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008789echo "$as_me:$LINENO: checking CCSHARED" >&5
8790echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008791if test -z "$CCSHARED"
8792then
Guido van Rossum07397971997-04-29 21:49:50 +00008793 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008794 SunOS*) if test "$GCC" = yes;
8795 then CCSHARED="-fPIC";
8796 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008797 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008798 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008799 else CCSHARED="+z";
8800 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008801 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008802 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008803 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008804 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008805 if test "$GCC" = "yes"
8806 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008807 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008808 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008809 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008810 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008811 IRIX*/6*) case $CC in
8812 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008813 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008814 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008815 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008816 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008817fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008818echo "$as_me:$LINENO: result: $CCSHARED" >&5
8819echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008820# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008821# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008822echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8823echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008824if test -z "$LINKFORSHARED"
8825then
Guido van Rossum07397971997-04-29 21:49:50 +00008826 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008827 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008828 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008829 LINKFORSHARED="-Wl,-E -Wl,+s";;
8830# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008831 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008832 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008833 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008835 # -u __dummy makes the linker aware of the objc runtime
8836 # in System.framework; otherwise, __objcInit (referenced in
8837 # crt1.o) gets erroneously defined as common, which breaks dynamic
8838 # loading of any modules which reference it in System.framework.
8839 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8840 # not used by the core itself but which needs to be in the core so
8841 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008842 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008843 if test "$enable_framework"
8844 then
8845 LINKFORSHARED="$LINKFORSHARED -framework Python"
8846 fi
8847 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008848 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008849 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008850 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008852 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8853 then
8854 LINKFORSHARED="-Wl,--export-dynamic"
8855 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008856 SunOS/5*) case $CC in
8857 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008858 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008859 then
8860 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008861 fi;;
8862 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008863 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008864fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008865echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8866echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008867
Michael W. Hudson54241132001-12-07 15:38:26 +00008868
Martin v. Löwis11437992002-04-12 09:54:03 +00008869echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8870echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008871if test ! "$LIBRARY" = "$LDLIBRARY"
8872then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008873 case $ac_sys_system in
8874 CYGWIN*)
8875 # Cygwin needs CCSHARED when building extension DLLs
8876 # but not when building the interpreter DLL.
8877 CFLAGSFORSHARED='';;
8878 *)
8879 CFLAGSFORSHARED='$(CCSHARED)'
8880 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008882echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8883echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008884
Guido van Rossum627b2d71993-12-24 10:39:16 +00008885# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008886
8887echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8888echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8889if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8890 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008891else
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008893LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008894cat >conftest.$ac_ext <<_ACEOF
8895#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008896#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008897
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008898/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008899#ifdef __cplusplus
8900extern "C"
8901#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008902/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 builtin and then its argument prototype would still apply. */
8904char dlopen ();
8905#ifdef F77_DUMMY_MAIN
8906# ifdef __cplusplus
8907 extern "C"
8908# endif
8909 int F77_DUMMY_MAIN() { return 1; }
8910#endif
8911int
8912main ()
8913{
8914dlopen ();
8915 ;
8916 return 0;
8917}
8918_ACEOF
8919rm -f conftest.$ac_objext conftest$ac_exeext
8920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8921 (eval $ac_link) 2>&5
8922 ac_status=$?
8923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8924 (exit $ac_status); } &&
8925 { ac_try='test -s conftest$ac_exeext'
8926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8927 (eval $ac_try) 2>&5
8928 ac_status=$?
8929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8930 (exit $ac_status); }; }; then
8931 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008932else
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 echo "$as_me: failed program was:" >&5
8934cat conftest.$ac_ext >&5
8935ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008936fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008937rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8938LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008939fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008940echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8941echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8942if test $ac_cv_lib_dl_dlopen = yes; then
8943 cat >>confdefs.h <<_ACEOF
8944#define HAVE_LIBDL 1
8945_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008946
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008947 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008948
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008949fi
8950 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008951
8952echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8953echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8954if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8955 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008956else
Martin v. Löwis11437992002-04-12 09:54:03 +00008957 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008958LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008959cat >conftest.$ac_ext <<_ACEOF
8960#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008961#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008962
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008963/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008964#ifdef __cplusplus
8965extern "C"
8966#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008967/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 builtin and then its argument prototype would still apply. */
8969char shl_load ();
8970#ifdef F77_DUMMY_MAIN
8971# ifdef __cplusplus
8972 extern "C"
8973# endif
8974 int F77_DUMMY_MAIN() { return 1; }
8975#endif
8976int
8977main ()
8978{
8979shl_load ();
8980 ;
8981 return 0;
8982}
8983_ACEOF
8984rm -f conftest.$ac_objext conftest$ac_exeext
8985if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8986 (eval $ac_link) 2>&5
8987 ac_status=$?
8988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8989 (exit $ac_status); } &&
8990 { ac_try='test -s conftest$ac_exeext'
8991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8992 (eval $ac_try) 2>&5
8993 ac_status=$?
8994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8995 (exit $ac_status); }; }; then
8996 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008997else
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 echo "$as_me: failed program was:" >&5
8999cat conftest.$ac_ext >&5
9000ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009001fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009002rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9003LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009004fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009005echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9006echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9007if test $ac_cv_lib_dld_shl_load = yes; then
9008 cat >>confdefs.h <<_ACEOF
9009#define HAVE_LIBDLD 1
9010_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009011
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009012 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009013
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009014fi
9015 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009016
9017echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9018echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9019if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9020 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009021else
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009023LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009024cat >conftest.$ac_ext <<_ACEOF
9025#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009026#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009027
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009028/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009029#ifdef __cplusplus
9030extern "C"
9031#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009032/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009033 builtin and then its argument prototype would still apply. */
9034char sem_init ();
9035#ifdef F77_DUMMY_MAIN
9036# ifdef __cplusplus
9037 extern "C"
9038# endif
9039 int F77_DUMMY_MAIN() { return 1; }
9040#endif
9041int
9042main ()
9043{
9044sem_init ();
9045 ;
9046 return 0;
9047}
9048_ACEOF
9049rm -f conftest.$ac_objext conftest$ac_exeext
9050if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9051 (eval $ac_link) 2>&5
9052 ac_status=$?
9053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9054 (exit $ac_status); } &&
9055 { ac_try='test -s conftest$ac_exeext'
9056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9057 (eval $ac_try) 2>&5
9058 ac_status=$?
9059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9060 (exit $ac_status); }; }; then
9061 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009062else
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 echo "$as_me: failed program was:" >&5
9064cat conftest.$ac_ext >&5
9065ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009066fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009067rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9068LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009069fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009070echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9071echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9072if test $ac_cv_lib_rt_sem_init = yes; then
9073 cat >>confdefs.h <<_ACEOF
9074#define HAVE_LIBRT 1
9075_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009076
9077 LIBS="-lrt $LIBS"
9078
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009079fi
9080 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009081
9082# checks for system dependent C++ extensions support
9083case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9085echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9086 cat >conftest.$ac_ext <<_ACEOF
9087#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009088#include "confdefs.h"
9089#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009090#ifdef F77_DUMMY_MAIN
9091# ifdef __cplusplus
9092 extern "C"
9093# endif
9094 int F77_DUMMY_MAIN() { return 1; }
9095#endif
9096int
9097main ()
9098{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009099loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009100 ;
9101 return 0;
9102}
9103_ACEOF
9104rm -f conftest.$ac_objext conftest$ac_exeext
9105if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9106 (eval $ac_link) 2>&5
9107 ac_status=$?
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); } &&
9110 { ac_try='test -s conftest$ac_exeext'
9111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9112 (eval $ac_try) 2>&5
9113 ac_status=$?
9114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9115 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009116
Martin v. Löwis11437992002-04-12 09:54:03 +00009117cat >>confdefs.h <<\_ACEOF
9118#define AIX_GENUINE_CPLUSPLUS 1
9119_ACEOF
9120
9121 echo "$as_me:$LINENO: result: yes" >&5
9122echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009123else
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 echo "$as_me: failed program was:" >&5
9125cat conftest.$ac_ext >&5
9126echo "$as_me:$LINENO: result: no" >&5
9127echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009129rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009130 *) ;;
9131esac
9132
Guido van Rossum70c7f481998-03-26 18:44:10 +00009133# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9134# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009135# BeOS' sockets are stashed in libnet.
9136case "$ac_sys_system" in
9137IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009138*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009139echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9140echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9141if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9142 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009143else
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009145LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009146cat >conftest.$ac_ext <<_ACEOF
9147#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009148#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009150/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009151#ifdef __cplusplus
9152extern "C"
9153#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009154/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 builtin and then its argument prototype would still apply. */
9156char t_open ();
9157#ifdef F77_DUMMY_MAIN
9158# ifdef __cplusplus
9159 extern "C"
9160# endif
9161 int F77_DUMMY_MAIN() { return 1; }
9162#endif
9163int
9164main ()
9165{
9166t_open ();
9167 ;
9168 return 0;
9169}
9170_ACEOF
9171rm -f conftest.$ac_objext conftest$ac_exeext
9172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9173 (eval $ac_link) 2>&5
9174 ac_status=$?
9175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); } &&
9177 { ac_try='test -s conftest$ac_exeext'
9178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9179 (eval $ac_try) 2>&5
9180 ac_status=$?
9181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9182 (exit $ac_status); }; }; then
9183 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009184else
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 echo "$as_me: failed program was:" >&5
9186cat conftest.$ac_ext >&5
9187ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009188fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009189rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9190LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009191fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009192echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9193echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9194if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009195 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009196fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009197 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009198echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9199echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9200if test "${ac_cv_lib_socket_socket+set}" = set; then
9201 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009202else
Martin v. Löwis11437992002-04-12 09:54:03 +00009203 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009204LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009205cat >conftest.$ac_ext <<_ACEOF
9206#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009207#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009208
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009209/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009210#ifdef __cplusplus
9211extern "C"
9212#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009213/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009214 builtin and then its argument prototype would still apply. */
9215char socket ();
9216#ifdef F77_DUMMY_MAIN
9217# ifdef __cplusplus
9218 extern "C"
9219# endif
9220 int F77_DUMMY_MAIN() { return 1; }
9221#endif
9222int
9223main ()
9224{
9225socket ();
9226 ;
9227 return 0;
9228}
9229_ACEOF
9230rm -f conftest.$ac_objext conftest$ac_exeext
9231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9232 (eval $ac_link) 2>&5
9233 ac_status=$?
9234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9235 (exit $ac_status); } &&
9236 { ac_try='test -s conftest$ac_exeext'
9237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9238 (eval $ac_try) 2>&5
9239 ac_status=$?
9240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9241 (exit $ac_status); }; }; then
9242 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009243else
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 echo "$as_me: failed program was:" >&5
9245cat conftest.$ac_ext >&5
9246ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009247fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009248rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9249LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009250fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009251echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9252echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9253if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009254 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009255fi
9256 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009257;;
9258esac
9259case "$ac_sys_system" in
9260BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009261echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9262echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9263if test "${ac_cv_lib_net_socket+set}" = set; then
9264 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009265else
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009267LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009268cat >conftest.$ac_ext <<_ACEOF
9269#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009270#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009271
Guido van Rossumad678af1998-10-02 14:42:15 +00009272/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009273#ifdef __cplusplus
9274extern "C"
9275#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009276/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 builtin and then its argument prototype would still apply. */
9278char socket ();
9279#ifdef F77_DUMMY_MAIN
9280# ifdef __cplusplus
9281 extern "C"
9282# endif
9283 int F77_DUMMY_MAIN() { return 1; }
9284#endif
9285int
9286main ()
9287{
9288socket ();
9289 ;
9290 return 0;
9291}
9292_ACEOF
9293rm -f conftest.$ac_objext conftest$ac_exeext
9294if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9295 (eval $ac_link) 2>&5
9296 ac_status=$?
9297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9298 (exit $ac_status); } &&
9299 { ac_try='test -s conftest$ac_exeext'
9300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9301 (eval $ac_try) 2>&5
9302 ac_status=$?
9303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9304 (exit $ac_status); }; }; then
9305 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009306else
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 echo "$as_me: failed program was:" >&5
9308cat conftest.$ac_ext >&5
9309ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009310fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009311rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9312LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009313fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009314echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9315echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9316if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009317 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009318fi
9319 # BeOS
9320;;
9321esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009322
Martin v. Löwis11437992002-04-12 09:54:03 +00009323echo "$as_me:$LINENO: checking for --with-libs" >&5
9324echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9325
Guido van Rossuma68acba1996-07-31 17:36:39 +00009326# Check whether --with-libs or --without-libs was given.
9327if test "${with_libs+set}" = set; then
9328 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009329
9330echo "$as_me:$LINENO: result: $withval" >&5
9331echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009332LIBS="$withval $LIBS"
9333
9334else
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 echo "$as_me:$LINENO: result: no" >&5
9336echo "${ECHO_T}no" >&6
9337fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009338
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009339# Determine if signalmodule should be used.
9340
9341
Martin v. Löwis11437992002-04-12 09:54:03 +00009342echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9343echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9344
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009345# Check whether --with-signal-module or --without-signal-module was given.
9346if test "${with_signal_module+set}" = set; then
9347 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009348
Martin v. Löwis11437992002-04-12 09:54:03 +00009349fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009350
9351if test -z "$with_signal_module"
9352then with_signal_module="yes"
9353fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009354echo "$as_me:$LINENO: result: $with_signal_module" >&5
9355echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009356
9357if test "${with_signal_module}" = "yes"; then
9358 USE_SIGNAL_MODULE=""
9359 SIGNAL_OBJS=""
9360else
9361 USE_SIGNAL_MODULE="#"
9362 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9363fi
9364
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009365# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009366
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009367USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009368
Martin v. Löwis11437992002-04-12 09:54:03 +00009369echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9370echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9371
Guido van Rossumec2f0731997-01-22 20:54:01 +00009372
9373# Check whether --with-dec-threads or --without-dec-threads was given.
9374if test "${with_dec_threads+set}" = set; then
9375 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009376
9377echo "$as_me:$LINENO: result: $withval" >&5
9378echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009379LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009380if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009381 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009382fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009383else
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 echo "$as_me:$LINENO: result: no" >&5
9385echo "${ECHO_T}no" >&6
9386fi;
9387
9388# Templates for things AC_DEFINEd more than once.
9389# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009390
9391
Martin v. Löwis11437992002-04-12 09:54:03 +00009392
9393
9394
9395
9396
9397echo "$as_me:$LINENO: checking for --with-threads" >&5
9398echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9399
Guido van Rossumec2f0731997-01-22 20:54:01 +00009400# Check whether --with-threads or --without-threads was given.
9401if test "${with_threads+set}" = set; then
9402 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009403
Martin v. Löwis11437992002-04-12 09:54:03 +00009404fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009405
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009406# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009407
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009408# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009409if test "${with_thread+set}" = set; then
9410 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009411
Martin v. Löwis11437992002-04-12 09:54:03 +00009412with_threads=$with_thread
9413fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009414
9415if test -z "$with_threads"
9416then with_threads="yes"
9417fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009418echo "$as_me:$LINENO: result: $with_threads" >&5
9419echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009420
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009421
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009422if test "$with_threads" = "no"
9423then
9424 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009425elif test "$ac_cv_pthread_is_default" = yes
9426then
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009428#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009429_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009430
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009431 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009433#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009434_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009435
9436 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009438elif test "$ac_cv_kpthread" = "yes"
9439then
9440 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009442#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009443_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009444
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009445 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009446 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009447else
9448 if test ! -z "$with_threads" -a -d "$with_threads"
9449 then LDFLAGS="$LDFLAGS -L$with_threads"
9450 fi
9451 if test ! -z "$withval" -a -d "$withval"
9452 then LDFLAGS="$LDFLAGS -L$withval"
9453 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009454
9455 # According to the POSIX spec, a pthreads implementation must
9456 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9458echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9459 cat >conftest.$ac_ext <<_ACEOF
9460#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009461#include "confdefs.h"
9462#include <unistd.h>
9463 #ifdef _POSIX_THREADS
9464 yes
9465 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009466
9467_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9469 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009470 unistd_defines_pthreads=yes
9471else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009472 unistd_defines_pthreads=no
9473fi
9474rm -f conftest*
9475
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9477echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009478
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009480#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009481_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009482
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 if test "${ac_cv_header_cthreads_h+set}" = set; then
9484 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9485echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9486if test "${ac_cv_header_cthreads_h+set}" = set; then
9487 echo $ECHO_N "(cached) $ECHO_C" >&6
9488fi
9489echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9490echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009491else
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 # Is the header compilable?
9493echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9494echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9495cat >conftest.$ac_ext <<_ACEOF
9496#line $LINENO "configure"
9497#include "confdefs.h"
9498$ac_includes_default
9499#include <cthreads.h>
9500_ACEOF
9501rm -f conftest.$ac_objext
9502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9503 (eval $ac_compile) 2>&5
9504 ac_status=$?
9505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9506 (exit $ac_status); } &&
9507 { ac_try='test -s conftest.$ac_objext'
9508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9509 (eval $ac_try) 2>&5
9510 ac_status=$?
9511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9512 (exit $ac_status); }; }; then
9513 ac_header_compiler=yes
9514else
9515 echo "$as_me: failed program was:" >&5
9516cat conftest.$ac_ext >&5
9517ac_header_compiler=no
9518fi
9519rm -f conftest.$ac_objext conftest.$ac_ext
9520echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9521echo "${ECHO_T}$ac_header_compiler" >&6
9522
9523# Is the header present?
9524echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9525echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9526cat >conftest.$ac_ext <<_ACEOF
9527#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009528#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009529#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009530_ACEOF
9531if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9532 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9533 ac_status=$?
9534 egrep -v '^ *\+' conftest.er1 >conftest.err
9535 rm -f conftest.er1
9536 cat conftest.err >&5
9537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9538 (exit $ac_status); } >/dev/null; then
9539 if test -s conftest.err; then
9540 ac_cpp_err=$ac_c_preproc_warn_flag
9541 else
9542 ac_cpp_err=
9543 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009544else
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ac_cpp_err=yes
9546fi
9547if test -z "$ac_cpp_err"; then
9548 ac_header_preproc=yes
9549else
9550 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009551 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009552 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009554rm -f conftest.err conftest.$ac_ext
9555echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9556echo "${ECHO_T}$ac_header_preproc" >&6
9557
9558# So? What about this header?
9559case $ac_header_compiler:$ac_header_preproc in
9560 yes:no )
9561 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9562echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9563 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9564echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9565 no:yes )
9566 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9567echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9568 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9569echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9570 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9571echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9572esac
9573echo "$as_me:$LINENO: checking for cthreads.h" >&5
9574echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9575if test "${ac_cv_header_cthreads_h+set}" = set; then
9576 echo $ECHO_N "(cached) $ECHO_C" >&6
9577else
9578 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009579fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009580echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9581echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9582
9583fi
9584if test $ac_cv_header_cthreads_h = yes; then
9585 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009586#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009587_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009588
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009590#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009591_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009592
Martin v. Löwis11437992002-04-12 09:54:03 +00009593
9594cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009595#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009596_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009597
9598 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009599 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009600else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009601
Martin v. Löwis11437992002-04-12 09:54:03 +00009602 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9603 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9604echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9605if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9606 echo $ECHO_N "(cached) $ECHO_C" >&6
9607fi
9608echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9609echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009610else
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 # Is the header compilable?
9612echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9613echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9614cat >conftest.$ac_ext <<_ACEOF
9615#line $LINENO "configure"
9616#include "confdefs.h"
9617$ac_includes_default
9618#include <mach/cthreads.h>
9619_ACEOF
9620rm -f conftest.$ac_objext
9621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9622 (eval $ac_compile) 2>&5
9623 ac_status=$?
9624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9625 (exit $ac_status); } &&
9626 { ac_try='test -s conftest.$ac_objext'
9627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9628 (eval $ac_try) 2>&5
9629 ac_status=$?
9630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9631 (exit $ac_status); }; }; then
9632 ac_header_compiler=yes
9633else
9634 echo "$as_me: failed program was:" >&5
9635cat conftest.$ac_ext >&5
9636ac_header_compiler=no
9637fi
9638rm -f conftest.$ac_objext conftest.$ac_ext
9639echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9640echo "${ECHO_T}$ac_header_compiler" >&6
9641
9642# Is the header present?
9643echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9644echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9645cat >conftest.$ac_ext <<_ACEOF
9646#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009647#include "confdefs.h"
9648#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009649_ACEOF
9650if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9651 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9652 ac_status=$?
9653 egrep -v '^ *\+' conftest.er1 >conftest.err
9654 rm -f conftest.er1
9655 cat conftest.err >&5
9656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9657 (exit $ac_status); } >/dev/null; then
9658 if test -s conftest.err; then
9659 ac_cpp_err=$ac_c_preproc_warn_flag
9660 else
9661 ac_cpp_err=
9662 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009663else
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 ac_cpp_err=yes
9665fi
9666if test -z "$ac_cpp_err"; then
9667 ac_header_preproc=yes
9668else
9669 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009670 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009672fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009673rm -f conftest.err conftest.$ac_ext
9674echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9675echo "${ECHO_T}$ac_header_preproc" >&6
9676
9677# So? What about this header?
9678case $ac_header_compiler:$ac_header_preproc in
9679 yes:no )
9680 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9681echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9682 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9683echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9684 no:yes )
9685 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9686echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9687 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9688echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9689 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9690echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9691esac
9692echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9693echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9694if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9695 echo $ECHO_N "(cached) $ECHO_C" >&6
9696else
9697 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009698fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009699echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9700echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9701
9702fi
9703if test $ac_cv_header_mach_cthreads_h = yes; then
9704 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009705#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009706_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009707
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009709#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009710_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009711
Martin v. Löwis11437992002-04-12 09:54:03 +00009712
9713cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009714#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009715_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009716
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009717 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009718else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009719
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 echo "$as_me:$LINENO: checking for --with-pth" >&5
9721echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9722
9723# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009724if test "${with_pth+set}" = set; then
9725 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009726
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 echo "$as_me:$LINENO: result: $withval" >&5
9728echo "${ECHO_T}$withval" >&6
9729 cat >>confdefs.h <<\_ACEOF
9730#define WITH_THREAD 1
9731_ACEOF
9732
9733
9734cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009735#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009736_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009737
Martin v. Löwis130fb172001-07-19 11:00:41 +00009738 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009739 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009740else
Martin v. Löwis11437992002-04-12 09:54:03 +00009741
9742 echo "$as_me:$LINENO: result: no" >&5
9743echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009744
9745 # Just looking for pthread_create in libpthread is not enough:
9746 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9747 # So we really have to include pthread.h, and then link.
9748 _libs=$LIBS
9749 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009750 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9751echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9752 cat >conftest.$ac_ext <<_ACEOF
9753#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009754#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009755#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009756
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009757void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009758#ifdef F77_DUMMY_MAIN
9759# ifdef __cplusplus
9760 extern "C"
9761# endif
9762 int F77_DUMMY_MAIN() { return 1; }
9763#endif
9764int
9765main ()
9766{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009767
9768pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 ;
9770 return 0;
9771}
9772_ACEOF
9773rm -f conftest.$ac_objext conftest$ac_exeext
9774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9775 (eval $ac_link) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); } &&
9779 { ac_try='test -s conftest$ac_exeext'
9780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9781 (eval $ac_try) 2>&5
9782 ac_status=$?
9783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9784 (exit $ac_status); }; }; then
9785
9786 echo "$as_me:$LINENO: result: yes" >&5
9787echo "${ECHO_T}yes" >&6
9788 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009789#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009790_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009791
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009792 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009793 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009794else
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 echo "$as_me: failed program was:" >&5
9796cat conftest.$ac_ext >&5
9797
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009798 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9800echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9801if test "${ac_cv_func_pthread_detach+set}" = set; then
9802 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 cat >conftest.$ac_ext <<_ACEOF
9805#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009806#include "confdefs.h"
9807/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009808 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009809#include <assert.h>
9810/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009811#ifdef __cplusplus
9812extern "C"
9813#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009814/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009815 builtin and then its argument prototype would still apply. */
9816char pthread_detach ();
9817char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009818
Martin v. Löwis11437992002-04-12 09:54:03 +00009819#ifdef F77_DUMMY_MAIN
9820# ifdef __cplusplus
9821 extern "C"
9822# endif
9823 int F77_DUMMY_MAIN() { return 1; }
9824#endif
9825int
9826main ()
9827{
Guido van Rossumad678af1998-10-02 14:42:15 +00009828/* The GNU C library defines this for functions which it implements
9829 to always fail with ENOSYS. Some functions are actually named
9830 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009831#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009832choke me
9833#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009834f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009835#endif
9836
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ;
9838 return 0;
9839}
9840_ACEOF
9841rm -f conftest.$ac_objext conftest$ac_exeext
9842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9843 (eval $ac_link) 2>&5
9844 ac_status=$?
9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846 (exit $ac_status); } &&
9847 { ac_try='test -s conftest$ac_exeext'
9848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9849 (eval $ac_try) 2>&5
9850 ac_status=$?
9851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9852 (exit $ac_status); }; }; then
9853 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009854else
Martin v. Löwis11437992002-04-12 09:54:03 +00009855 echo "$as_me: failed program was:" >&5
9856cat conftest.$ac_ext >&5
9857ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009858fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009859rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009860fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009861echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9862echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9863if test $ac_cv_func_pthread_detach = yes; then
9864 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009865#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009866_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009867
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009868 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009869 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009870else
Guido van Rossumad678af1998-10-02 14:42:15 +00009871
Martin v. Löwis11437992002-04-12 09:54:03 +00009872 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9873 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9874echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9875if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9876 echo $ECHO_N "(cached) $ECHO_C" >&6
9877fi
9878echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9879echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009880else
Martin v. Löwis11437992002-04-12 09:54:03 +00009881 # Is the header compilable?
9882echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
9883echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
9884cat >conftest.$ac_ext <<_ACEOF
9885#line $LINENO "configure"
9886#include "confdefs.h"
9887$ac_includes_default
9888#include <kernel/OS.h>
9889_ACEOF
9890rm -f conftest.$ac_objext
9891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9892 (eval $ac_compile) 2>&5
9893 ac_status=$?
9894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9895 (exit $ac_status); } &&
9896 { ac_try='test -s conftest.$ac_objext'
9897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9898 (eval $ac_try) 2>&5
9899 ac_status=$?
9900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9901 (exit $ac_status); }; }; then
9902 ac_header_compiler=yes
9903else
9904 echo "$as_me: failed program was:" >&5
9905cat conftest.$ac_ext >&5
9906ac_header_compiler=no
9907fi
9908rm -f conftest.$ac_objext conftest.$ac_ext
9909echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9910echo "${ECHO_T}$ac_header_compiler" >&6
9911
9912# Is the header present?
9913echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
9914echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
9915cat >conftest.$ac_ext <<_ACEOF
9916#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009917#include "confdefs.h"
9918#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009919_ACEOF
9920if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9921 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9922 ac_status=$?
9923 egrep -v '^ *\+' conftest.er1 >conftest.err
9924 rm -f conftest.er1
9925 cat conftest.err >&5
9926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9927 (exit $ac_status); } >/dev/null; then
9928 if test -s conftest.err; then
9929 ac_cpp_err=$ac_c_preproc_warn_flag
9930 else
9931 ac_cpp_err=
9932 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009933else
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 ac_cpp_err=yes
9935fi
9936if test -z "$ac_cpp_err"; then
9937 ac_header_preproc=yes
9938else
9939 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009940 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009941 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009942fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009943rm -f conftest.err conftest.$ac_ext
9944echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9945echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009946
Martin v. Löwis11437992002-04-12 09:54:03 +00009947# So? What about this header?
9948case $ac_header_compiler:$ac_header_preproc in
9949 yes:no )
9950 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
9951echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9952 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9953echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9954 no:yes )
9955 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
9956echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
9957 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
9958echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
9959 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9960echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9961esac
9962echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9963echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9964if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9965 echo $ECHO_N "(cached) $ECHO_C" >&6
9966else
9967 ac_cv_header_kernel_OS_h=$ac_header_preproc
9968fi
9969echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9970echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
9971
9972fi
9973if test $ac_cv_header_kernel_OS_h = yes; then
9974 cat >>confdefs.h <<\_ACEOF
9975#define WITH_THREAD 1
9976_ACEOF
9977
9978
9979cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009980#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009981_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009982
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009983 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009984else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009985
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
9987echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
9988if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
9989 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009990else
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009992LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009993cat >conftest.$ac_ext <<_ACEOF
9994#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00009995#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009996
Greg Steinadf63d62000-07-05 10:38:09 +00009997/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009998#ifdef __cplusplus
9999extern "C"
10000#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010001/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 builtin and then its argument prototype would still apply. */
10003char pthread_create ();
10004#ifdef F77_DUMMY_MAIN
10005# ifdef __cplusplus
10006 extern "C"
10007# endif
10008 int F77_DUMMY_MAIN() { return 1; }
10009#endif
10010int
10011main ()
10012{
10013pthread_create ();
10014 ;
10015 return 0;
10016}
10017_ACEOF
10018rm -f conftest.$ac_objext conftest$ac_exeext
10019if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10020 (eval $ac_link) 2>&5
10021 ac_status=$?
10022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10023 (exit $ac_status); } &&
10024 { ac_try='test -s conftest$ac_exeext'
10025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10026 (eval $ac_try) 2>&5
10027 ac_status=$?
10028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10029 (exit $ac_status); }; }; then
10030 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010031else
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 echo "$as_me: failed program was:" >&5
10033cat conftest.$ac_ext >&5
10034ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010036rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10037LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010038fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010039echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10040echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10041if test $ac_cv_lib_pthreads_pthread_create = yes; then
10042 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010043#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010044_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010045
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010046 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010047 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010048 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010049else
Greg Steinadf63d62000-07-05 10:38:09 +000010050
Martin v. Löwis11437992002-04-12 09:54:03 +000010051 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10052echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10053if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10054 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010055else
Martin v. Löwis11437992002-04-12 09:54:03 +000010056 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010057LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010058cat >conftest.$ac_ext <<_ACEOF
10059#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010060#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010061
Guido van Rossum49545951997-12-02 19:28:29 +000010062/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010063#ifdef __cplusplus
10064extern "C"
10065#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010066/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010067 builtin and then its argument prototype would still apply. */
10068char pthread_create ();
10069#ifdef F77_DUMMY_MAIN
10070# ifdef __cplusplus
10071 extern "C"
10072# endif
10073 int F77_DUMMY_MAIN() { return 1; }
10074#endif
10075int
10076main ()
10077{
10078pthread_create ();
10079 ;
10080 return 0;
10081}
10082_ACEOF
10083rm -f conftest.$ac_objext conftest$ac_exeext
10084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10085 (eval $ac_link) 2>&5
10086 ac_status=$?
10087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088 (exit $ac_status); } &&
10089 { ac_try='test -s conftest$ac_exeext'
10090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10091 (eval $ac_try) 2>&5
10092 ac_status=$?
10093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10094 (exit $ac_status); }; }; then
10095 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010096else
Martin v. Löwis11437992002-04-12 09:54:03 +000010097 echo "$as_me: failed program was:" >&5
10098cat conftest.$ac_ext >&5
10099ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010100fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010101rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10102LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010103fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010104echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10105echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10106if test $ac_cv_lib_c_r_pthread_create = yes; then
10107 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010108#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010109_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010110
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010111 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010112 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010113 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010114else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010115
Martin v. Löwis11437992002-04-12 09:54:03 +000010116 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10117echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10118if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10119 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010120else
Martin v. Löwis11437992002-04-12 09:54:03 +000010121 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010122LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010123cat >conftest.$ac_ext <<_ACEOF
10124#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010125#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010126
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010127/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010128#ifdef __cplusplus
10129extern "C"
10130#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010131/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 builtin and then its argument prototype would still apply. */
10133char __d6_pthread_create ();
10134#ifdef F77_DUMMY_MAIN
10135# ifdef __cplusplus
10136 extern "C"
10137# endif
10138 int F77_DUMMY_MAIN() { return 1; }
10139#endif
10140int
10141main ()
10142{
10143__d6_pthread_create ();
10144 ;
10145 return 0;
10146}
10147_ACEOF
10148rm -f conftest.$ac_objext conftest$ac_exeext
10149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10150 (eval $ac_link) 2>&5
10151 ac_status=$?
10152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153 (exit $ac_status); } &&
10154 { ac_try='test -s conftest$ac_exeext'
10155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10156 (eval $ac_try) 2>&5
10157 ac_status=$?
10158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10159 (exit $ac_status); }; }; then
10160 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010161else
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 echo "$as_me: failed program was:" >&5
10163cat conftest.$ac_ext >&5
10164ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010166rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10167LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010168fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010169echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10170echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10171if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10172 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010173#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010174_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010175
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010176 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010177 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010178 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010179else
Guido van Rossum49545951997-12-02 19:28:29 +000010180
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10182echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10183if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10184 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010185else
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010187LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010188cat >conftest.$ac_ext <<_ACEOF
10189#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010190#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010191
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010192/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010193#ifdef __cplusplus
10194extern "C"
10195#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010196/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 builtin and then its argument prototype would still apply. */
10198char __pthread_create_system ();
10199#ifdef F77_DUMMY_MAIN
10200# ifdef __cplusplus
10201 extern "C"
10202# endif
10203 int F77_DUMMY_MAIN() { return 1; }
10204#endif
10205int
10206main ()
10207{
10208__pthread_create_system ();
10209 ;
10210 return 0;
10211}
10212_ACEOF
10213rm -f conftest.$ac_objext conftest$ac_exeext
10214if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10215 (eval $ac_link) 2>&5
10216 ac_status=$?
10217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10218 (exit $ac_status); } &&
10219 { ac_try='test -s conftest$ac_exeext'
10220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10221 (eval $ac_try) 2>&5
10222 ac_status=$?
10223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10224 (exit $ac_status); }; }; then
10225 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010226else
Martin v. Löwis11437992002-04-12 09:54:03 +000010227 echo "$as_me: failed program was:" >&5
10228cat conftest.$ac_ext >&5
10229ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010231rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10232LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010233fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010234echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10235echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10236if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10237 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010238#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010239_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010240
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010241 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010242 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010243 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010244else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010245
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10247echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10248if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10249 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010250else
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010252LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010253cat >conftest.$ac_ext <<_ACEOF
10254#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010255#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010256
Guido van Rossumb93a8621998-05-07 13:27:32 +000010257/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010258#ifdef __cplusplus
10259extern "C"
10260#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010261/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 builtin and then its argument prototype would still apply. */
10263char pthread_create ();
10264#ifdef F77_DUMMY_MAIN
10265# ifdef __cplusplus
10266 extern "C"
10267# endif
10268 int F77_DUMMY_MAIN() { return 1; }
10269#endif
10270int
10271main ()
10272{
10273pthread_create ();
10274 ;
10275 return 0;
10276}
10277_ACEOF
10278rm -f conftest.$ac_objext conftest$ac_exeext
10279if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10280 (eval $ac_link) 2>&5
10281 ac_status=$?
10282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10283 (exit $ac_status); } &&
10284 { ac_try='test -s conftest$ac_exeext'
10285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10286 (eval $ac_try) 2>&5
10287 ac_status=$?
10288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10289 (exit $ac_status); }; }; then
10290 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010291else
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 echo "$as_me: failed program was:" >&5
10293cat conftest.$ac_ext >&5
10294ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010295fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010296rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10297LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010298fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010299echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10300echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10301if test $ac_cv_lib_cma_pthread_create = yes; then
10302 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010303#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010304_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010305
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010306 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010307 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010308 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010309else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010310
Martin v. Löwis130fb172001-07-19 11:00:41 +000010311 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010312fi
10313
Guido van Rossum627b2d71993-12-24 10:39:16 +000010314
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010315fi
10316
Guido van Rossum0be3e491997-05-22 20:33:33 +000010317fi
10318
Guido van Rossum49545951997-12-02 19:28:29 +000010319fi
10320
Guido van Rossumb93a8621998-05-07 13:27:32 +000010321fi
10322
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010323fi
10324
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010325
Michael W. Hudson54241132001-12-07 15:38:26 +000010326fi
10327
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010328fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010329rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10330fi;
10331fi
10332
10333
10334fi
10335
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010336
Michael W. Hudson54241132001-12-07 15:38:26 +000010337
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010338 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010339 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010340
10341cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010342#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010343_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010344
10345 fi
10346
Martin v. Löwis11437992002-04-12 09:54:03 +000010347 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10348echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10349 if test "${ac_cv_pthread_system_supported+set}" = set; then
10350 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010351else
10352 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010353 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010354else
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 cat >conftest.$ac_ext <<_ACEOF
10356#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010357#include "confdefs.h"
10358#include <pthread.h>
10359 void *foo(void *parm) {
10360 return NULL;
10361 }
10362 main() {
10363 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010364 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010365 if (pthread_attr_init(&attr)) exit(-1);
10366 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010367 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010368 exit(0);
10369 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010370_ACEOF
10371rm -f conftest$ac_exeext
10372if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10373 (eval $ac_link) 2>&5
10374 ac_status=$?
10375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10376 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10378 (eval $ac_try) 2>&5
10379 ac_status=$?
10380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10381 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010382 ac_cv_pthread_system_supported=yes
10383else
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 echo "$as_me: program exited with status $ac_status" >&5
10385echo "$as_me: failed program was:" >&5
10386cat conftest.$ac_ext >&5
10387( exit $ac_status )
10388ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010389fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010390rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010391fi
10392
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010393fi
10394
Martin v. Löwis11437992002-04-12 09:54:03 +000010395 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10396echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010397 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010398
10399cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010400#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010401_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010402
10403 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010404
10405for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010406do
Martin v. Löwis11437992002-04-12 09:54:03 +000010407as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10408echo "$as_me:$LINENO: checking for $ac_func" >&5
10409echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10410if eval "test \"\${$as_ac_var+set}\" = set"; then
10411 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010412else
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 cat >conftest.$ac_ext <<_ACEOF
10414#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010415#include "confdefs.h"
10416/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010418#include <assert.h>
10419/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010420#ifdef __cplusplus
10421extern "C"
10422#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010423/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010424 builtin and then its argument prototype would still apply. */
10425char $ac_func ();
10426char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010427
Martin v. Löwis11437992002-04-12 09:54:03 +000010428#ifdef F77_DUMMY_MAIN
10429# ifdef __cplusplus
10430 extern "C"
10431# endif
10432 int F77_DUMMY_MAIN() { return 1; }
10433#endif
10434int
10435main ()
10436{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010437/* The GNU C library defines this for functions which it implements
10438 to always fail with ENOSYS. Some functions are actually named
10439 something starting with __ and the normal name is an alias. */
10440#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10441choke me
10442#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010443f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010444#endif
10445
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 ;
10447 return 0;
10448}
10449_ACEOF
10450rm -f conftest.$ac_objext conftest$ac_exeext
10451if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10452 (eval $ac_link) 2>&5
10453 ac_status=$?
10454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10455 (exit $ac_status); } &&
10456 { ac_try='test -s conftest$ac_exeext'
10457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10458 (eval $ac_try) 2>&5
10459 ac_status=$?
10460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10461 (exit $ac_status); }; }; then
10462 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010463else
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 echo "$as_me: failed program was:" >&5
10465cat conftest.$ac_ext >&5
10466eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010467fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010468rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010469fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010470echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10471echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10472if test `eval echo '${'$as_ac_var'}'` = yes; then
10473 cat >>confdefs.h <<_ACEOF
10474#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10475_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010476
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010477fi
10478done
10479
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010480 fi
10481
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10483echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10484if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10485 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010486else
Martin v. Löwis11437992002-04-12 09:54:03 +000010487 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010488LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010489cat >conftest.$ac_ext <<_ACEOF
10490#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010491#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010492
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010493/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010494#ifdef __cplusplus
10495extern "C"
10496#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010497/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010498 builtin and then its argument prototype would still apply. */
10499char usconfig ();
10500#ifdef F77_DUMMY_MAIN
10501# ifdef __cplusplus
10502 extern "C"
10503# endif
10504 int F77_DUMMY_MAIN() { return 1; }
10505#endif
10506int
10507main ()
10508{
10509usconfig ();
10510 ;
10511 return 0;
10512}
10513_ACEOF
10514rm -f conftest.$ac_objext conftest$ac_exeext
10515if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10516 (eval $ac_link) 2>&5
10517 ac_status=$?
10518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10519 (exit $ac_status); } &&
10520 { ac_try='test -s conftest$ac_exeext'
10521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10522 (eval $ac_try) 2>&5
10523 ac_status=$?
10524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10525 (exit $ac_status); }; }; then
10526 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010527else
Martin v. Löwis11437992002-04-12 09:54:03 +000010528 echo "$as_me: failed program was:" >&5
10529cat conftest.$ac_ext >&5
10530ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010531fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010532rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10533LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010534fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010535echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10536echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10537if test $ac_cv_lib_mpc_usconfig = yes; then
10538 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010539#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010540_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010541
Martin v. Löwis130fb172001-07-19 11:00:41 +000010542 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010543 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010544 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010545fi
10546
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010547
Martin v. Löwis11437992002-04-12 09:54:03 +000010548 if test $posix_threads != "yes"; then
10549 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10550echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10551if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10552 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010553else
Martin v. Löwis11437992002-04-12 09:54:03 +000010554 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010555LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010556cat >conftest.$ac_ext <<_ACEOF
10557#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010558#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010559
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010560/* 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
Guido van Rossum48bdbfc1996-05-28 22:53:48 +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 thr_create ();
10567#ifdef F77_DUMMY_MAIN
10568# ifdef __cplusplus
10569 extern "C"
10570# endif
10571 int F77_DUMMY_MAIN() { return 1; }
10572#endif
10573int
10574main ()
10575{
10576thr_create ();
10577 ;
10578 return 0;
10579}
10580_ACEOF
10581rm -f conftest.$ac_objext conftest$ac_exeext
10582if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10583 (eval $ac_link) 2>&5
10584 ac_status=$?
10585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10586 (exit $ac_status); } &&
10587 { ac_try='test -s conftest$ac_exeext'
10588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10589 (eval $ac_try) 2>&5
10590 ac_status=$?
10591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10592 (exit $ac_status); }; }; then
10593 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010594else
Martin v. Löwis11437992002-04-12 09:54:03 +000010595 echo "$as_me: failed program was:" >&5
10596cat conftest.$ac_ext >&5
10597ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010598fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010599rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10600LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010601fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010602echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10603echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10604if test $ac_cv_lib_thread_thr_create = yes; then
10605 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010606#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010607_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010608
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010609 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010610 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010611 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010612fi
10613
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010614 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010615
Martin v. Löwis130fb172001-07-19 11:00:41 +000010616 if test "$USE_THREAD_MODULE" != "#"
10617 then
10618 # If the above checks didn't disable threads, (at least) OSF1
10619 # needs this '-threads' argument during linking.
10620 case $ac_sys_system in
10621 OSF1) LDLAST=-threads;;
10622 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010623 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010624fi
10625
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010626# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010627
10628
10629echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10630echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010631# Check whether --enable-ipv6 or --disable-ipv6 was given.
10632if test "${enable_ipv6+set}" = set; then
10633 enableval="$enable_ipv6"
10634 case "$enableval" in
10635 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 echo "$as_me:$LINENO: result: no" >&5
10637echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638 ipv6=no
10639 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010640 *) echo "$as_me:$LINENO: result: yes" >&5
10641echo "${ECHO_T}yes" >&6
10642 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010643#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010644_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010645
10646 ipv6=yes
10647 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010649else
Martin v. Löwis11437992002-04-12 09:54:03 +000010650
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010651 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 echo "$as_me:$LINENO: result: no" >&5
10653echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010654 ipv6=no
10655
10656else
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 cat >conftest.$ac_ext <<_ACEOF
10658#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010659#include "confdefs.h"
10660 /* AF_INET6 available check */
10661#include <sys/types.h>
10662#include <sys/socket.h>
10663main()
10664{
10665 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10666 exit(1);
10667 else
10668 exit(0);
10669}
10670
Martin v. Löwis11437992002-04-12 09:54:03 +000010671_ACEOF
10672rm -f conftest$ac_exeext
10673if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10674 (eval $ac_link) 2>&5
10675 ac_status=$?
10676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10677 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10679 (eval $ac_try) 2>&5
10680 ac_status=$?
10681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10682 (exit $ac_status); }; }; then
10683 echo "$as_me:$LINENO: result: yes" >&5
10684echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010685 ipv6=yes
10686else
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 echo "$as_me: program exited with status $ac_status" >&5
10688echo "$as_me: failed program was:" >&5
10689cat conftest.$ac_ext >&5
10690( exit $ac_status )
10691echo "$as_me:$LINENO: result: no" >&5
10692echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010693 ipv6=no
10694fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010695rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010696fi
10697
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010698if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010699 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10700echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10701 cat >conftest.$ac_ext <<_ACEOF
10702#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010703#include "confdefs.h"
10704#include <sys/types.h>
10705#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010706#ifdef F77_DUMMY_MAIN
10707# ifdef __cplusplus
10708 extern "C"
10709# endif
10710 int F77_DUMMY_MAIN() { return 1; }
10711#endif
10712int
10713main ()
10714{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010715struct sockaddr_in6 x;
10716x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 ;
10718 return 0;
10719}
10720_ACEOF
10721rm -f conftest.$ac_objext
10722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10723 (eval $ac_compile) 2>&5
10724 ac_status=$?
10725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10726 (exit $ac_status); } &&
10727 { ac_try='test -s conftest.$ac_objext'
10728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10729 (eval $ac_try) 2>&5
10730 ac_status=$?
10731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10732 (exit $ac_status); }; }; then
10733 echo "$as_me:$LINENO: result: yes" >&5
10734echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010735 ipv6=yes
10736else
Martin v. Löwis11437992002-04-12 09:54:03 +000010737 echo "$as_me: failed program was:" >&5
10738cat conftest.$ac_ext >&5
10739echo "$as_me:$LINENO: result: no" >&5
10740echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010741 ipv6=no
10742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010743rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010744fi
10745
10746if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010748#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010749_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010750
10751fi
10752
Martin v. Löwis11437992002-04-12 09:54:03 +000010753fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010754
10755ipv6type=unknown
10756ipv6lib=none
10757ipv6trylibc=no
10758
10759if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10761echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010762 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10763 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764 case $i in
10765 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010766 cat >conftest.$ac_ext <<_ACEOF
10767#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010768#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010769
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770#include <netinet/in.h>
10771#ifdef IPV6_INRIA_VERSION
10772yes
10773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010774_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010775if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10776 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010777 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778fi
10779rm -f conftest*
10780
10781 ;;
10782 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010783 cat >conftest.$ac_ext <<_ACEOF
10784#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010786
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787#include <netinet/in.h>
10788#ifdef __KAME__
10789yes
10790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010791_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10793 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010794 ipv6type=$i;
10795 ipv6lib=inet6
10796 ipv6libdir=/usr/local/v6/lib
10797 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798fi
10799rm -f conftest*
10800
10801 ;;
10802 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010803 cat >conftest.$ac_ext <<_ACEOF
10804#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010806
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807#include <features.h>
10808#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10809yes
10810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010811_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10813 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814 ipv6type=$i;
10815 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816fi
10817rm -f conftest*
10818
10819 ;;
10820 linux-inet6)
10821 if test -d /usr/inet6; then
10822 ipv6type=$i
10823 ipv6lib=inet6
10824 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010825 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010826 fi
10827 ;;
10828 solaris)
10829 if test -f /etc/netconfig; then
10830 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10831 ipv6type=$i
10832 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833 fi
10834 fi
10835 ;;
10836 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010837 cat >conftest.$ac_ext <<_ACEOF
10838#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841#include <sys/param.h>
10842#ifdef _TOSHIBA_INET6
10843yes
10844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010845_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10847 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848 ipv6type=$i;
10849 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010850 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851fi
10852rm -f conftest*
10853
10854 ;;
10855 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010856 cat >conftest.$ac_ext <<_ACEOF
10857#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010858#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010859
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860#include </usr/local/v6/include/sys/v6config.h>
10861#ifdef __V6D__
10862yes
10863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010864_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10866 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010867 ipv6type=$i;
10868 ipv6lib=v6;
10869 ipv6libdir=/usr/local/v6/lib;
10870 OPT="-I/usr/local/v6/include $OPT"
10871fi
10872rm -f conftest*
10873
10874 ;;
10875 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000010876 cat >conftest.$ac_ext <<_ACEOF
10877#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010878#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010879
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880#include <sys/param.h>
10881#ifdef _ZETA_MINAMI_INET6
10882yes
10883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010884_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10886 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010887 ipv6type=$i;
10888 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010889 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010890fi
10891rm -f conftest*
10892
10893 ;;
10894 esac
10895 if test "$ipv6type" != "unknown"; then
10896 break
10897 fi
10898 done
Martin v. Löwis11437992002-04-12 09:54:03 +000010899 echo "$as_me:$LINENO: result: $ipv6type" >&5
10900echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901fi
10902
10903if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10904 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10905 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10906 echo "using lib$ipv6lib"
10907 else
10908 if test $ipv6trylibc = "yes"; then
10909 echo "using libc"
10910 else
10911 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10912 echo "You need to fetch lib$ipv6lib.a from appropriate"
10913 echo 'ipv6 kit and compile beforehand.'
10914 exit 1
10915 fi
10916 fi
10917fi
10918
Barry Warsawef82cd72000-06-30 16:21:01 +000010919# Check for GC support
Martin v. Löwis11437992002-04-12 09:54:03 +000010920echo "$as_me:$LINENO: checking for --with-cycle-gc" >&5
10921echo $ECHO_N "checking for --with-cycle-gc... $ECHO_C" >&6
10922
Barry Warsawef82cd72000-06-30 16:21:01 +000010923# Check whether --with-cycle-gc or --without-cycle-gc was given.
10924if test "${with_cycle_gc+set}" = set; then
10925 withval="$with_cycle_gc"
Barry Warsawef82cd72000-06-30 16:21:01 +000010926
Martin v. Löwis11437992002-04-12 09:54:03 +000010927fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000010928
10929if test -z "$with_cycle_gc"
10930then with_cycle_gc="yes"
10931fi
Neil Schemenauercf229462001-08-29 23:58:47 +000010932if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +000010933then
Martin v. Löwis11437992002-04-12 09:54:03 +000010934
10935cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010936#define WITH_CYCLE_GC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010937_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010938
10939fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010940echo "$as_me:$LINENO: result: $with_cycle_gc" >&5
10941echo "${ECHO_T}$with_cycle_gc" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000010942
Jack Jansen7b8c7542002-04-14 20:12:41 +000010943# Check for universal newline support
10944echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
10945echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
10946
10947# Check whether --with-universal-newlines or --without-universal-newlines was given.
10948if test "${with_universal_newlines+set}" = set; then
10949 withval="$with_universal_newlines"
10950
10951fi;
10952
10953if test -z "$with_universal_newlines"
10954then with_universal_newlines="yes"
10955fi
10956if test "$with_universal_newlines" != "no"
10957then
Martin v. Löwise8aea582002-04-16 05:51:02 +000010958
10959cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000010960#define WITH_UNIVERSAL_NEWLINES 1
10961_ACEOF
10962
10963fi
10964echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
10965echo "${ECHO_T}$with_universal_newlines" >&6
10966
Neil Schemenauera35c6882001-02-27 04:45:05 +000010967# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000010968echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
10969echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
10970
Neil Schemenauera35c6882001-02-27 04:45:05 +000010971# Check whether --with-pymalloc or --without-pymalloc was given.
10972if test "${with_pymalloc+set}" = set; then
10973 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000010974
Martin v. Löwis11437992002-04-12 09:54:03 +000010975fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000010976
Neil Schemenauer16c22972002-03-22 15:34:49 +000010977if test -z "$with_pymalloc"
10978then with_pymalloc="yes"
10979fi
10980if test "$with_pymalloc" != "no"
10981then
Martin v. Löwis11437992002-04-12 09:54:03 +000010982
10983cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010984#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010985_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010986
10987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010988echo "$as_me:$LINENO: result: $with_pymalloc" >&5
10989echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000010990
Barry Warsawef82cd72000-06-30 16:21:01 +000010991# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000010992echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
10993echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
10994
Barry Warsawef82cd72000-06-30 16:21:01 +000010995# Check whether --with-wctype-functions or --without-wctype-functions was given.
10996if test "${with_wctype_functions+set}" = set; then
10997 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000010998
Barry Warsawef82cd72000-06-30 16:21:01 +000010999if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011000then
11001
11002cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011003#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011004_ACEOF
11005
11006 echo "$as_me:$LINENO: result: yes" >&5
11007echo "${ECHO_T}yes" >&6
11008else echo "$as_me:$LINENO: result: no" >&5
11009echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011010fi
11011else
Martin v. Löwis11437992002-04-12 09:54:03 +000011012 echo "$as_me:$LINENO: result: no" >&5
11013echo "${ECHO_T}no" >&6
11014fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011015
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011016# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011017
Guido van Rossum98935bf2001-09-05 19:13:16 +000011018DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011019
Martin v. Löwis11437992002-04-12 09:54:03 +000011020echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11021echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11022
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011023# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011024if test "${with_sgi_dl+set}" = set; then
11025 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011026
11027echo "$as_me:$LINENO: result: $withval" >&5
11028echo "${ECHO_T}$withval" >&6
11029
11030cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011031#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011032_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011033
Guido van Rossume97ee181999-12-20 21:27:22 +000011034DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011035dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011036if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011037then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011038else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11039echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11040 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011041fi
11042DLINCLDIR=${dldir}
11043LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011044else
Martin v. Löwis11437992002-04-12 09:54:03 +000011045 echo "$as_me:$LINENO: result: no" >&5
11046echo "${ECHO_T}no" >&6
11047fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011048
Martin v. Löwis11437992002-04-12 09:54:03 +000011049echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11050echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011051
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011052# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011053if test "${with_dl_dld+set}" = set; then
11054 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011055
11056echo "$as_me:$LINENO: result: $withval" >&5
11057echo "${ECHO_T}$withval" >&6
11058
11059cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011060#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011061_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011062
Guido van Rossume97ee181999-12-20 21:27:22 +000011063DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011064dldir=`echo "$withval" | sed 's/,.*//'`
11065dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011066if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011067then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011068else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11069echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11070 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011071fi
11072DLINCLDIR=${dldir}
11073LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011074else
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 echo "$as_me:$LINENO: result: no" >&5
11076echo "${ECHO_T}no" >&6
11077fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011078
Guido van Rossume97ee181999-12-20 21:27:22 +000011079# the dlopen() function means we might want to use dynload_shlib.o. some
11080# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011081
Thomas Wouters3a584202000-08-05 23:28:51 +000011082for ac_func in dlopen
11083do
Martin v. Löwis11437992002-04-12 09:54:03 +000011084as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11085echo "$as_me:$LINENO: checking for $ac_func" >&5
11086echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11087if eval "test \"\${$as_ac_var+set}\" = set"; then
11088 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011089else
Martin v. Löwis11437992002-04-12 09:54:03 +000011090 cat >conftest.$ac_ext <<_ACEOF
11091#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011092#include "confdefs.h"
11093/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011095#include <assert.h>
11096/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011097#ifdef __cplusplus
11098extern "C"
11099#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011100/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011101 builtin and then its argument prototype would still apply. */
11102char $ac_func ();
11103char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011104
Martin v. Löwis11437992002-04-12 09:54:03 +000011105#ifdef F77_DUMMY_MAIN
11106# ifdef __cplusplus
11107 extern "C"
11108# endif
11109 int F77_DUMMY_MAIN() { return 1; }
11110#endif
11111int
11112main ()
11113{
Guido van Rossume97ee181999-12-20 21:27:22 +000011114/* The GNU C library defines this for functions which it implements
11115 to always fail with ENOSYS. Some functions are actually named
11116 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011117#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011118choke me
11119#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011120f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011121#endif
11122
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 ;
11124 return 0;
11125}
11126_ACEOF
11127rm -f conftest.$ac_objext conftest$ac_exeext
11128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11129 (eval $ac_link) 2>&5
11130 ac_status=$?
11131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11132 (exit $ac_status); } &&
11133 { ac_try='test -s conftest$ac_exeext'
11134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11135 (eval $ac_try) 2>&5
11136 ac_status=$?
11137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11138 (exit $ac_status); }; }; then
11139 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011140else
Martin v. Löwis11437992002-04-12 09:54:03 +000011141 echo "$as_me: failed program was:" >&5
11142cat conftest.$ac_ext >&5
11143eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011144fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011145rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011146fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011147echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11148echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11149if test `eval echo '${'$as_ac_var'}'` = yes; then
11150 cat >>confdefs.h <<_ACEOF
11151#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11152_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011153
Guido van Rossume97ee181999-12-20 21:27:22 +000011154fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011155done
Guido van Rossume97ee181999-12-20 21:27:22 +000011156
Michael W. Hudson54241132001-12-07 15:38:26 +000011157
Guido van Rossume97ee181999-12-20 21:27:22 +000011158# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11159# loading of modules.
11160
Martin v. Löwis11437992002-04-12 09:54:03 +000011161echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11162echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011163if test -z "$DYNLOADFILE"
11164then
11165 case $ac_sys_system/$ac_sys_release in
11166 AIX*) DYNLOADFILE="dynload_aix.o";;
11167 BeOS*) DYNLOADFILE="dynload_beos.o";;
11168 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011169 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011170 *)
11171 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11172 # out any dynamic loading
11173 if test "$ac_cv_func_dlopen" = yes
11174 then DYNLOADFILE="dynload_shlib.o"
11175 else DYNLOADFILE="dynload_stub.o"
11176 fi
11177 ;;
11178 esac
11179fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011180echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11181echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011182if test "$DYNLOADFILE" != "dynload_stub.o"
11183then
Martin v. Löwis11437992002-04-12 09:54:03 +000011184
11185cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011186#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011187_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011188
11189fi
11190
Neil Schemenauer4e425612001-06-19 15:44:15 +000011191# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11192
Michael W. Hudson54241132001-12-07 15:38:26 +000011193
Martin v. Löwis11437992002-04-12 09:54:03 +000011194echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11195echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011196if test -z "$MACHDEP_OBJS"
11197then
Jack Jansene578a632001-08-15 01:27:14 +000011198 MACHDEP_OBJS=$extra_machdep_objs
11199else
11200 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011201fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011202echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11203echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011204
Guido van Rossum627b2d71993-12-24 10:39:16 +000011205# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011279
Fred Drake6b3cc522002-04-15 19:20:27 +000011280
Martin v. Löwis244edc82001-10-04 22:44:26 +000011281for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011282 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +000011283 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011284 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011285 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011286 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011287 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011288 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +000011289 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +000011290 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011291 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011292do
Martin v. Löwis11437992002-04-12 09:54:03 +000011293as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11294echo "$as_me:$LINENO: checking for $ac_func" >&5
11295echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11296if eval "test \"\${$as_ac_var+set}\" = set"; then
11297 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011298else
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 cat >conftest.$ac_ext <<_ACEOF
11300#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011301#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011302/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011303 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011304#include <assert.h>
11305/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011306#ifdef __cplusplus
11307extern "C"
11308#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011309/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011310 builtin and then its argument prototype would still apply. */
11311char $ac_func ();
11312char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011313
Martin v. Löwis11437992002-04-12 09:54:03 +000011314#ifdef F77_DUMMY_MAIN
11315# ifdef __cplusplus
11316 extern "C"
11317# endif
11318 int F77_DUMMY_MAIN() { return 1; }
11319#endif
11320int
11321main ()
11322{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011323/* The GNU C library defines this for functions which it implements
11324 to always fail with ENOSYS. Some functions are actually named
11325 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011326#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011327choke me
11328#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011329f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011330#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011331
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 ;
11333 return 0;
11334}
11335_ACEOF
11336rm -f conftest.$ac_objext conftest$ac_exeext
11337if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11338 (eval $ac_link) 2>&5
11339 ac_status=$?
11340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11341 (exit $ac_status); } &&
11342 { ac_try='test -s conftest$ac_exeext'
11343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11344 (eval $ac_try) 2>&5
11345 ac_status=$?
11346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11347 (exit $ac_status); }; }; then
11348 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011349else
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 echo "$as_me: failed program was:" >&5
11351cat conftest.$ac_ext >&5
11352eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011354rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011355fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011356echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11357echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11358if test `eval echo '${'$as_ac_var'}'` = yes; then
11359 cat >>confdefs.h <<_ACEOF
11360#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11361_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011362
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011363fi
11364done
11365
Michael W. Hudson54241132001-12-07 15:38:26 +000011366
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011367# check for openpty and forkpty
11368
Martin v. Löwis11437992002-04-12 09:54:03 +000011369
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011370for ac_func in openpty
11371do
Martin v. Löwis11437992002-04-12 09:54:03 +000011372as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11373echo "$as_me:$LINENO: checking for $ac_func" >&5
11374echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11375if eval "test \"\${$as_ac_var+set}\" = set"; then
11376 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011377else
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 cat >conftest.$ac_ext <<_ACEOF
11379#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011380#include "confdefs.h"
11381/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011383#include <assert.h>
11384/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011385#ifdef __cplusplus
11386extern "C"
11387#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011388/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011389 builtin and then its argument prototype would still apply. */
11390char $ac_func ();
11391char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011392
Martin v. Löwis11437992002-04-12 09:54:03 +000011393#ifdef F77_DUMMY_MAIN
11394# ifdef __cplusplus
11395 extern "C"
11396# endif
11397 int F77_DUMMY_MAIN() { return 1; }
11398#endif
11399int
11400main ()
11401{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011402/* The GNU C library defines this for functions which it implements
11403 to always fail with ENOSYS. Some functions are actually named
11404 something starting with __ and the normal name is an alias. */
11405#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11406choke me
11407#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011408f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011409#endif
11410
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 ;
11412 return 0;
11413}
11414_ACEOF
11415rm -f conftest.$ac_objext conftest$ac_exeext
11416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11417 (eval $ac_link) 2>&5
11418 ac_status=$?
11419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11420 (exit $ac_status); } &&
11421 { ac_try='test -s conftest$ac_exeext'
11422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11423 (eval $ac_try) 2>&5
11424 ac_status=$?
11425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11426 (exit $ac_status); }; }; then
11427 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011428else
Martin v. Löwis11437992002-04-12 09:54:03 +000011429 echo "$as_me: failed program was:" >&5
11430cat conftest.$ac_ext >&5
11431eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011433rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011435echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11436echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11437if test `eval echo '${'$as_ac_var'}'` = yes; then
11438 cat >>confdefs.h <<_ACEOF
11439#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11440_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011441
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011442else
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11444echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11445if test "${ac_cv_lib_util_openpty+set}" = set; then
11446 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011447else
Martin v. Löwis11437992002-04-12 09:54:03 +000011448 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011449LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011450cat >conftest.$ac_ext <<_ACEOF
11451#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011452#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011453
Fred Drake8cef4cf2000-06-28 16:40:38 +000011454/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011455#ifdef __cplusplus
11456extern "C"
11457#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011458/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011459 builtin and then its argument prototype would still apply. */
11460char openpty ();
11461#ifdef F77_DUMMY_MAIN
11462# ifdef __cplusplus
11463 extern "C"
11464# endif
11465 int F77_DUMMY_MAIN() { return 1; }
11466#endif
11467int
11468main ()
11469{
11470openpty ();
11471 ;
11472 return 0;
11473}
11474_ACEOF
11475rm -f conftest.$ac_objext conftest$ac_exeext
11476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11477 (eval $ac_link) 2>&5
11478 ac_status=$?
11479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11480 (exit $ac_status); } &&
11481 { ac_try='test -s conftest$ac_exeext'
11482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11483 (eval $ac_try) 2>&5
11484 ac_status=$?
11485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11486 (exit $ac_status); }; }; then
11487 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011488else
Martin v. Löwis11437992002-04-12 09:54:03 +000011489 echo "$as_me: failed program was:" >&5
11490cat conftest.$ac_ext >&5
11491ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011492fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011493rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11494LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011495fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011496echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11497echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11498if test $ac_cv_lib_util_openpty = yes; then
11499 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011500#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011501_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011502 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011503fi
11504
11505fi
11506done
11507
Martin v. Löwis11437992002-04-12 09:54:03 +000011508
Fred Drake8cef4cf2000-06-28 16:40:38 +000011509for ac_func in forkpty
11510do
Martin v. Löwis11437992002-04-12 09:54:03 +000011511as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11512echo "$as_me:$LINENO: checking for $ac_func" >&5
11513echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11514if eval "test \"\${$as_ac_var+set}\" = set"; then
11515 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011516else
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 cat >conftest.$ac_ext <<_ACEOF
11518#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011519#include "confdefs.h"
11520/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011522#include <assert.h>
11523/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011524#ifdef __cplusplus
11525extern "C"
11526#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011527/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 builtin and then its argument prototype would still apply. */
11529char $ac_func ();
11530char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011531
Martin v. Löwis11437992002-04-12 09:54:03 +000011532#ifdef F77_DUMMY_MAIN
11533# ifdef __cplusplus
11534 extern "C"
11535# endif
11536 int F77_DUMMY_MAIN() { return 1; }
11537#endif
11538int
11539main ()
11540{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011541/* The GNU C library defines this for functions which it implements
11542 to always fail with ENOSYS. Some functions are actually named
11543 something starting with __ and the normal name is an alias. */
11544#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11545choke me
11546#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011547f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011548#endif
11549
Martin v. Löwis11437992002-04-12 09:54:03 +000011550 ;
11551 return 0;
11552}
11553_ACEOF
11554rm -f conftest.$ac_objext conftest$ac_exeext
11555if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11556 (eval $ac_link) 2>&5
11557 ac_status=$?
11558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11559 (exit $ac_status); } &&
11560 { ac_try='test -s conftest$ac_exeext'
11561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11562 (eval $ac_try) 2>&5
11563 ac_status=$?
11564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11565 (exit $ac_status); }; }; then
11566 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011567else
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 echo "$as_me: failed program was:" >&5
11569cat conftest.$ac_ext >&5
11570eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011571fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011572rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011573fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011574echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11575echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11576if test `eval echo '${'$as_ac_var'}'` = yes; then
11577 cat >>confdefs.h <<_ACEOF
11578#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11579_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011580
Fred Drake8cef4cf2000-06-28 16:40:38 +000011581else
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11583echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11584if test "${ac_cv_lib_util_forkpty+set}" = set; then
11585 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011586else
Martin v. Löwis11437992002-04-12 09:54:03 +000011587 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011588LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011589cat >conftest.$ac_ext <<_ACEOF
11590#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011591#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011592
Fred Drake8cef4cf2000-06-28 16:40:38 +000011593/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011594#ifdef __cplusplus
11595extern "C"
11596#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011597/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 builtin and then its argument prototype would still apply. */
11599char forkpty ();
11600#ifdef F77_DUMMY_MAIN
11601# ifdef __cplusplus
11602 extern "C"
11603# endif
11604 int F77_DUMMY_MAIN() { return 1; }
11605#endif
11606int
11607main ()
11608{
11609forkpty ();
11610 ;
11611 return 0;
11612}
11613_ACEOF
11614rm -f conftest.$ac_objext conftest$ac_exeext
11615if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11616 (eval $ac_link) 2>&5
11617 ac_status=$?
11618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11619 (exit $ac_status); } &&
11620 { ac_try='test -s conftest$ac_exeext'
11621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11622 (eval $ac_try) 2>&5
11623 ac_status=$?
11624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11625 (exit $ac_status); }; }; then
11626 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011627else
Martin v. Löwis11437992002-04-12 09:54:03 +000011628 echo "$as_me: failed program was:" >&5
11629cat conftest.$ac_ext >&5
11630ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011631fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011632rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11633LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011634fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011635echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11636echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11637if test $ac_cv_lib_util_forkpty = yes; then
11638 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011639#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011640_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011641 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011642fi
11643
11644fi
11645done
11646
Jack Jansendd19cf82001-12-06 22:36:17 +000011647
Michael W. Hudson54241132001-12-07 15:38:26 +000011648# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011649
11650
11651
11652
11653
11654
Fred Drake8cef4cf2000-06-28 16:40:38 +000011655for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11656do
Martin v. Löwis11437992002-04-12 09:54:03 +000011657as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11658echo "$as_me:$LINENO: checking for $ac_func" >&5
11659echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11660if eval "test \"\${$as_ac_var+set}\" = set"; then
11661 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011662else
Martin v. Löwis11437992002-04-12 09:54:03 +000011663 cat >conftest.$ac_ext <<_ACEOF
11664#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011665#include "confdefs.h"
11666/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011667 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011668#include <assert.h>
11669/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011670#ifdef __cplusplus
11671extern "C"
11672#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011673/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011674 builtin and then its argument prototype would still apply. */
11675char $ac_func ();
11676char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011677
Martin v. Löwis11437992002-04-12 09:54:03 +000011678#ifdef F77_DUMMY_MAIN
11679# ifdef __cplusplus
11680 extern "C"
11681# endif
11682 int F77_DUMMY_MAIN() { return 1; }
11683#endif
11684int
11685main ()
11686{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011687/* The GNU C library defines this for functions which it implements
11688 to always fail with ENOSYS. Some functions are actually named
11689 something starting with __ and the normal name is an alias. */
11690#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11691choke me
11692#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011693f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011694#endif
11695
Martin v. Löwis11437992002-04-12 09:54:03 +000011696 ;
11697 return 0;
11698}
11699_ACEOF
11700rm -f conftest.$ac_objext conftest$ac_exeext
11701if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11702 (eval $ac_link) 2>&5
11703 ac_status=$?
11704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11705 (exit $ac_status); } &&
11706 { ac_try='test -s conftest$ac_exeext'
11707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11708 (eval $ac_try) 2>&5
11709 ac_status=$?
11710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11711 (exit $ac_status); }; }; then
11712 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011713else
Martin v. Löwis11437992002-04-12 09:54:03 +000011714 echo "$as_me: failed program was:" >&5
11715cat conftest.$ac_ext >&5
11716eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011717fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011718rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011719fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011720echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11721echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11722if test `eval echo '${'$as_ac_var'}'` = yes; then
11723 cat >>confdefs.h <<_ACEOF
11724#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11725_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011726
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011727fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011728done
11729
Michael W. Hudson54241132001-12-07 15:38:26 +000011730
Martin v. Löwis11437992002-04-12 09:54:03 +000011731
11732
11733
11734
11735
Martin v. Löwis1142de32002-03-29 16:28:31 +000011736for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011737do
Martin v. Löwis11437992002-04-12 09:54:03 +000011738as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11739echo "$as_me:$LINENO: checking for $ac_func" >&5
11740echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11741if eval "test \"\${$as_ac_var+set}\" = set"; then
11742 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011743else
Martin v. Löwis11437992002-04-12 09:54:03 +000011744 cat >conftest.$ac_ext <<_ACEOF
11745#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011746#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011747/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011749#include <assert.h>
11750/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011751#ifdef __cplusplus
11752extern "C"
11753#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011754/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011755 builtin and then its argument prototype would still apply. */
11756char $ac_func ();
11757char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011758
Martin v. Löwis11437992002-04-12 09:54:03 +000011759#ifdef F77_DUMMY_MAIN
11760# ifdef __cplusplus
11761 extern "C"
11762# endif
11763 int F77_DUMMY_MAIN() { return 1; }
11764#endif
11765int
11766main ()
11767{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011768/* The GNU C library defines this for functions which it implements
11769 to always fail with ENOSYS. Some functions are actually named
11770 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011771#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011772choke me
11773#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011774f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011775#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011776
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 ;
11778 return 0;
11779}
11780_ACEOF
11781rm -f conftest.$ac_objext conftest$ac_exeext
11782if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11783 (eval $ac_link) 2>&5
11784 ac_status=$?
11785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11786 (exit $ac_status); } &&
11787 { ac_try='test -s conftest$ac_exeext'
11788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11789 (eval $ac_try) 2>&5
11790 ac_status=$?
11791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11792 (exit $ac_status); }; }; then
11793 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011794else
Martin v. Löwis11437992002-04-12 09:54:03 +000011795 echo "$as_me: failed program was:" >&5
11796cat conftest.$ac_ext >&5
11797eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011798fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011799rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011800fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011801echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11802echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11803if test `eval echo '${'$as_ac_var'}'` = yes; then
11804 cat >>confdefs.h <<_ACEOF
11805#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11806_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011807
Martin v. Löwis1142de32002-03-29 16:28:31 +000011808else
Martin v. Löwis11437992002-04-12 09:54:03 +000011809 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011810fi
11811done
11812
11813
Martin v. Löwis11437992002-04-12 09:54:03 +000011814
Martin v. Löwis1142de32002-03-29 16:28:31 +000011815for ac_func in getpgrp
11816do
Martin v. Löwis11437992002-04-12 09:54:03 +000011817as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11818echo "$as_me:$LINENO: checking for $ac_func" >&5
11819echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11820if eval "test \"\${$as_ac_var+set}\" = set"; then
11821 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011822else
Martin v. Löwis11437992002-04-12 09:54:03 +000011823 cat >conftest.$ac_ext <<_ACEOF
11824#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011825#include "confdefs.h"
11826/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011827 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011828#include <assert.h>
11829/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011830#ifdef __cplusplus
11831extern "C"
11832#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011833/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011834 builtin and then its argument prototype would still apply. */
11835char $ac_func ();
11836char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011837
Martin v. Löwis11437992002-04-12 09:54:03 +000011838#ifdef F77_DUMMY_MAIN
11839# ifdef __cplusplus
11840 extern "C"
11841# endif
11842 int F77_DUMMY_MAIN() { return 1; }
11843#endif
11844int
11845main ()
11846{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011847/* The GNU C library defines this for functions which it implements
11848 to always fail with ENOSYS. Some functions are actually named
11849 something starting with __ and the normal name is an alias. */
11850#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11851choke me
11852#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011853f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000011854#endif
11855
Martin v. Löwis11437992002-04-12 09:54:03 +000011856 ;
11857 return 0;
11858}
11859_ACEOF
11860rm -f conftest.$ac_objext conftest$ac_exeext
11861if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11862 (eval $ac_link) 2>&5
11863 ac_status=$?
11864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11865 (exit $ac_status); } &&
11866 { ac_try='test -s conftest$ac_exeext'
11867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11868 (eval $ac_try) 2>&5
11869 ac_status=$?
11870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11871 (exit $ac_status); }; }; then
11872 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011873else
Martin v. Löwis11437992002-04-12 09:54:03 +000011874 echo "$as_me: failed program was:" >&5
11875cat conftest.$ac_ext >&5
11876eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011877fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011878rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011879fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011880echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11881echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11882if test `eval echo '${'$as_ac_var'}'` = yes; then
11883 cat >>confdefs.h <<_ACEOF
11884#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11885_ACEOF
11886 cat >conftest.$ac_ext <<_ACEOF
11887#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011888#include "confdefs.h"
11889#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011890#ifdef F77_DUMMY_MAIN
11891# ifdef __cplusplus
11892 extern "C"
11893# endif
11894 int F77_DUMMY_MAIN() { return 1; }
11895#endif
11896int
11897main ()
11898{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011899getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011900 ;
11901 return 0;
11902}
11903_ACEOF
11904rm -f conftest.$ac_objext
11905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11906 (eval $ac_compile) 2>&5
11907 ac_status=$?
11908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11909 (exit $ac_status); } &&
11910 { ac_try='test -s conftest.$ac_objext'
11911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11912 (eval $ac_try) 2>&5
11913 ac_status=$?
11914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11915 (exit $ac_status); }; }; then
11916
11917cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011918#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011919_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011920
Martin v. Löwis11437992002-04-12 09:54:03 +000011921
Guido van Rossumf78abae1997-01-21 22:02:36 +000011922else
Martin v. Löwis11437992002-04-12 09:54:03 +000011923 echo "$as_me: failed program was:" >&5
11924cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000011925fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011926rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011927
Guido van Rossum627b2d71993-12-24 10:39:16 +000011928fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011929done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011930
Martin v. Löwis11437992002-04-12 09:54:03 +000011931
Thomas Wouters3a584202000-08-05 23:28:51 +000011932for ac_func in setpgrp
11933do
Martin v. Löwis11437992002-04-12 09:54:03 +000011934as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11935echo "$as_me:$LINENO: checking for $ac_func" >&5
11936echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11937if eval "test \"\${$as_ac_var+set}\" = set"; then
11938 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011939else
Martin v. Löwis11437992002-04-12 09:54:03 +000011940 cat >conftest.$ac_ext <<_ACEOF
11941#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011942#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011943/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011944 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011945#include <assert.h>
11946/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011947#ifdef __cplusplus
11948extern "C"
11949#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011950/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011951 builtin and then its argument prototype would still apply. */
11952char $ac_func ();
11953char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011954
Martin v. Löwis11437992002-04-12 09:54:03 +000011955#ifdef F77_DUMMY_MAIN
11956# ifdef __cplusplus
11957 extern "C"
11958# endif
11959 int F77_DUMMY_MAIN() { return 1; }
11960#endif
11961int
11962main ()
11963{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011964/* The GNU C library defines this for functions which it implements
11965 to always fail with ENOSYS. Some functions are actually named
11966 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011967#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011968choke me
11969#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011970f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011971#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011972
Martin v. Löwis11437992002-04-12 09:54:03 +000011973 ;
11974 return 0;
11975}
11976_ACEOF
11977rm -f conftest.$ac_objext conftest$ac_exeext
11978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11979 (eval $ac_link) 2>&5
11980 ac_status=$?
11981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11982 (exit $ac_status); } &&
11983 { ac_try='test -s conftest$ac_exeext'
11984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11985 (eval $ac_try) 2>&5
11986 ac_status=$?
11987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11988 (exit $ac_status); }; }; then
11989 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011990else
Martin v. Löwis11437992002-04-12 09:54:03 +000011991 echo "$as_me: failed program was:" >&5
11992cat conftest.$ac_ext >&5
11993eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011994fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011995rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011996fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011997echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11998echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11999if test `eval echo '${'$as_ac_var'}'` = yes; then
12000 cat >>confdefs.h <<_ACEOF
12001#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12002_ACEOF
12003 cat >conftest.$ac_ext <<_ACEOF
12004#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012005#include "confdefs.h"
12006#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012007#ifdef F77_DUMMY_MAIN
12008# ifdef __cplusplus
12009 extern "C"
12010# endif
12011 int F77_DUMMY_MAIN() { return 1; }
12012#endif
12013int
12014main ()
12015{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012016setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012017 ;
12018 return 0;
12019}
12020_ACEOF
12021rm -f conftest.$ac_objext
12022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12023 (eval $ac_compile) 2>&5
12024 ac_status=$?
12025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12026 (exit $ac_status); } &&
12027 { ac_try='test -s conftest.$ac_objext'
12028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12029 (eval $ac_try) 2>&5
12030 ac_status=$?
12031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12032 (exit $ac_status); }; }; then
12033
12034cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012035#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012036_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012037
Martin v. Löwis11437992002-04-12 09:54:03 +000012038
Guido van Rossumf78abae1997-01-21 22:02:36 +000012039else
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 echo "$as_me: failed program was:" >&5
12041cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012043rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012044
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012045fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012046done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012047
Martin v. Löwis11437992002-04-12 09:54:03 +000012048
Thomas Wouters3a584202000-08-05 23:28:51 +000012049for ac_func in gettimeofday
12050do
Martin v. Löwis11437992002-04-12 09:54:03 +000012051as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12052echo "$as_me:$LINENO: checking for $ac_func" >&5
12053echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12054if eval "test \"\${$as_ac_var+set}\" = set"; then
12055 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012056else
Martin v. Löwis11437992002-04-12 09:54:03 +000012057 cat >conftest.$ac_ext <<_ACEOF
12058#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012059#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012060/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012061 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012062#include <assert.h>
12063/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012064#ifdef __cplusplus
12065extern "C"
12066#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012067/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 builtin and then its argument prototype would still apply. */
12069char $ac_func ();
12070char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012071
Martin v. Löwis11437992002-04-12 09:54:03 +000012072#ifdef F77_DUMMY_MAIN
12073# ifdef __cplusplus
12074 extern "C"
12075# endif
12076 int F77_DUMMY_MAIN() { return 1; }
12077#endif
12078int
12079main ()
12080{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012081/* The GNU C library defines this for functions which it implements
12082 to always fail with ENOSYS. Some functions are actually named
12083 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012084#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012085choke me
12086#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012087f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012088#endif
12089
Martin v. Löwis11437992002-04-12 09:54:03 +000012090 ;
12091 return 0;
12092}
12093_ACEOF
12094rm -f conftest.$ac_objext conftest$ac_exeext
12095if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12096 (eval $ac_link) 2>&5
12097 ac_status=$?
12098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12099 (exit $ac_status); } &&
12100 { ac_try='test -s conftest$ac_exeext'
12101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12102 (eval $ac_try) 2>&5
12103 ac_status=$?
12104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12105 (exit $ac_status); }; }; then
12106 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012107else
Martin v. Löwis11437992002-04-12 09:54:03 +000012108 echo "$as_me: failed program was:" >&5
12109cat conftest.$ac_ext >&5
12110eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012112rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012113fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012114echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12115echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12116if test `eval echo '${'$as_ac_var'}'` = yes; then
12117 cat >>confdefs.h <<_ACEOF
12118#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12119_ACEOF
12120 cat >conftest.$ac_ext <<_ACEOF
12121#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012122#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012123#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012124#ifdef F77_DUMMY_MAIN
12125# ifdef __cplusplus
12126 extern "C"
12127# endif
12128 int F77_DUMMY_MAIN() { return 1; }
12129#endif
12130int
12131main ()
12132{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012133gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 ;
12135 return 0;
12136}
12137_ACEOF
12138rm -f conftest.$ac_objext
12139if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12140 (eval $ac_compile) 2>&5
12141 ac_status=$?
12142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12143 (exit $ac_status); } &&
12144 { ac_try='test -s conftest.$ac_objext'
12145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12146 (eval $ac_try) 2>&5
12147 ac_status=$?
12148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12149 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012150 :
12151else
Martin v. Löwis11437992002-04-12 09:54:03 +000012152 echo "$as_me: failed program was:" >&5
12153cat conftest.$ac_ext >&5
12154
12155cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012157_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012158
Martin v. Löwis11437992002-04-12 09:54:03 +000012159
Guido van Rossum627b2d71993-12-24 10:39:16 +000012160fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012161rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012162
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012163fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012164done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012165
Michael W. Hudson54241132001-12-07 15:38:26 +000012166
12167
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012168# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012169# for [no]getaddrinfo in netdb.h.
12170echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12171echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12172cat >conftest.$ac_ext <<_ACEOF
12173#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012174#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012175
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012176#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012177#include <sys/socket.h>
12178#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012179#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012180
Martin v. Löwis11437992002-04-12 09:54:03 +000012181#ifdef F77_DUMMY_MAIN
12182# ifdef __cplusplus
12183 extern "C"
12184# endif
12185 int F77_DUMMY_MAIN() { return 1; }
12186#endif
12187int
12188main ()
12189{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012190
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012191getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012192
Martin v. Löwis11437992002-04-12 09:54:03 +000012193 ;
12194 return 0;
12195}
12196_ACEOF
12197rm -f conftest.$ac_objext conftest$ac_exeext
12198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12199 (eval $ac_link) 2>&5
12200 ac_status=$?
12201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12202 (exit $ac_status); } &&
12203 { ac_try='test -s conftest$ac_exeext'
12204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12205 (eval $ac_try) 2>&5
12206 ac_status=$?
12207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12208 (exit $ac_status); }; }; then
12209
12210echo "$as_me:$LINENO: result: yes" >&5
12211echo "${ECHO_T}yes" >&6
12212echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12213echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012214if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012215 echo "$as_me:$LINENO: result: buggy" >&5
12216echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012217buggygetaddrinfo=yes
12218else
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 cat >conftest.$ac_ext <<_ACEOF
12220#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012221#include "confdefs.h"
12222
12223#include <sys/types.h>
12224#include <netdb.h>
12225#include <string.h>
12226#include <sys/socket.h>
12227#include <netinet/in.h>
12228
12229main()
12230{
12231 int passive, gaierr, inet4 = 0, inet6 = 0;
12232 struct addrinfo hints, *ai, *aitop;
12233 char straddr[INET6_ADDRSTRLEN], strport[16];
12234
12235 for (passive = 0; passive <= 1; passive++) {
12236 memset(&hints, 0, sizeof(hints));
12237 hints.ai_family = AF_UNSPEC;
12238 hints.ai_flags = passive ? AI_PASSIVE : 0;
12239 hints.ai_socktype = SOCK_STREAM;
12240 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12241 (void)gai_strerror(gaierr);
12242 goto bad;
12243 }
12244 for (ai = aitop; ai; ai = ai->ai_next) {
12245 if (ai->ai_addr == NULL ||
12246 ai->ai_addrlen == 0 ||
12247 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12248 straddr, sizeof(straddr), strport, sizeof(strport),
12249 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12250 goto bad;
12251 }
12252 switch (ai->ai_family) {
12253 case AF_INET:
12254 if (strcmp(strport, "54321") != 0) {
12255 goto bad;
12256 }
12257 if (passive) {
12258 if (strcmp(straddr, "0.0.0.0") != 0) {
12259 goto bad;
12260 }
12261 } else {
12262 if (strcmp(straddr, "127.0.0.1") != 0) {
12263 goto bad;
12264 }
12265 }
12266 inet4++;
12267 break;
12268 case AF_INET6:
12269 if (strcmp(strport, "54321") != 0) {
12270 goto bad;
12271 }
12272 if (passive) {
12273 if (strcmp(straddr, "::") != 0) {
12274 goto bad;
12275 }
12276 } else {
12277 if (strcmp(straddr, "::1") != 0) {
12278 goto bad;
12279 }
12280 }
12281 inet6++;
12282 break;
12283 case AF_UNSPEC:
12284 goto bad;
12285 break;
12286 default:
12287 /* another family support? */
12288 break;
12289 }
12290 }
12291 }
12292
12293 if (!(inet4 == 0 || inet4 == 2))
12294 goto bad;
12295 if (!(inet6 == 0 || inet6 == 2))
12296 goto bad;
12297
12298 if (aitop)
12299 freeaddrinfo(aitop);
12300 exit(0);
12301
12302 bad:
12303 if (aitop)
12304 freeaddrinfo(aitop);
12305 exit(1);
12306}
12307
Martin v. Löwis11437992002-04-12 09:54:03 +000012308_ACEOF
12309rm -f conftest$ac_exeext
12310if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12311 (eval $ac_link) 2>&5
12312 ac_status=$?
12313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12314 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12316 (eval $ac_try) 2>&5
12317 ac_status=$?
12318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12319 (exit $ac_status); }; }; then
12320 echo "$as_me:$LINENO: result: good" >&5
12321echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012322buggygetaddrinfo=no
12323else
Martin v. Löwis11437992002-04-12 09:54:03 +000012324 echo "$as_me: program exited with status $ac_status" >&5
12325echo "$as_me: failed program was:" >&5
12326cat conftest.$ac_ext >&5
12327( exit $ac_status )
12328echo "$as_me:$LINENO: result: buggy" >&5
12329echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012330buggygetaddrinfo=yes
12331fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012332rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012333fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012334else
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 echo "$as_me: failed program was:" >&5
12336cat conftest.$ac_ext >&5
12337
12338echo "$as_me:$LINENO: result: no" >&5
12339echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012340buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012341
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012342fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012343rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012344
12345if test "$buggygetaddrinfo" = "yes"; then
12346 if test "$ipv6" = "yes"; then
12347 echo 'Fatal: You must get working getaddrinfo() function.'
12348 echo ' or you can specify "--disable-ipv6"'.
12349 exit 1
12350 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012351else
Martin v. Löwis11437992002-04-12 09:54:03 +000012352
12353cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012354#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012355_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012356
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012357fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012358
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012359for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012360do
Martin v. Löwis11437992002-04-12 09:54:03 +000012361as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12362echo "$as_me:$LINENO: checking for $ac_func" >&5
12363echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12364if eval "test \"\${$as_ac_var+set}\" = set"; then
12365 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012366else
Martin v. Löwis11437992002-04-12 09:54:03 +000012367 cat >conftest.$ac_ext <<_ACEOF
12368#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012369#include "confdefs.h"
12370/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012372#include <assert.h>
12373/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012374#ifdef __cplusplus
12375extern "C"
12376#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012377/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012378 builtin and then its argument prototype would still apply. */
12379char $ac_func ();
12380char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012381
Martin v. Löwis11437992002-04-12 09:54:03 +000012382#ifdef F77_DUMMY_MAIN
12383# ifdef __cplusplus
12384 extern "C"
12385# endif
12386 int F77_DUMMY_MAIN() { return 1; }
12387#endif
12388int
12389main ()
12390{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012391/* The GNU C library defines this for functions which it implements
12392 to always fail with ENOSYS. Some functions are actually named
12393 something starting with __ and the normal name is an alias. */
12394#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12395choke me
12396#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012397f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012398#endif
12399
Martin v. Löwis11437992002-04-12 09:54:03 +000012400 ;
12401 return 0;
12402}
12403_ACEOF
12404rm -f conftest.$ac_objext conftest$ac_exeext
12405if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12406 (eval $ac_link) 2>&5
12407 ac_status=$?
12408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12409 (exit $ac_status); } &&
12410 { ac_try='test -s conftest$ac_exeext'
12411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12412 (eval $ac_try) 2>&5
12413 ac_status=$?
12414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12415 (exit $ac_status); }; }; then
12416 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012417else
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 echo "$as_me: failed program was:" >&5
12419cat conftest.$ac_ext >&5
12420eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012421fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012422rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012424echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12425echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12426if test `eval echo '${'$as_ac_var'}'` = yes; then
12427 cat >>confdefs.h <<_ACEOF
12428#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12429_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012430
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012431fi
12432done
12433
Michael W. Hudson54241132001-12-07 15:38:26 +000012434
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012435# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012436echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12437echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12438if test "${ac_cv_header_time+set}" = set; then
12439 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012440else
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 cat >conftest.$ac_ext <<_ACEOF
12442#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012443#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012444#include <sys/types.h>
12445#include <sys/time.h>
12446#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
12448#ifdef F77_DUMMY_MAIN
12449# ifdef __cplusplus
12450 extern "C"
12451# endif
12452 int F77_DUMMY_MAIN() { return 1; }
12453#endif
12454int
12455main ()
12456{
12457if ((struct tm *) 0)
12458return 0;
12459 ;
12460 return 0;
12461}
12462_ACEOF
12463rm -f conftest.$ac_objext
12464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12465 (eval $ac_compile) 2>&5
12466 ac_status=$?
12467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12468 (exit $ac_status); } &&
12469 { ac_try='test -s conftest.$ac_objext'
12470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12471 (eval $ac_try) 2>&5
12472 ac_status=$?
12473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12474 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012475 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012476else
Martin v. Löwis11437992002-04-12 09:54:03 +000012477 echo "$as_me: failed program was:" >&5
12478cat conftest.$ac_ext >&5
12479ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012480fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012481rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012482fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012483echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12484echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012485if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
12487cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012488#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012489_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012490
12491fi
12492
Martin v. Löwis11437992002-04-12 09:54:03 +000012493echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12494echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12495if test "${ac_cv_struct_tm+set}" = set; then
12496 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012497else
Martin v. Löwis11437992002-04-12 09:54:03 +000012498 cat >conftest.$ac_ext <<_ACEOF
12499#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012500#include "confdefs.h"
12501#include <sys/types.h>
12502#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012503
12504#ifdef F77_DUMMY_MAIN
12505# ifdef __cplusplus
12506 extern "C"
12507# endif
12508 int F77_DUMMY_MAIN() { return 1; }
12509#endif
12510int
12511main ()
12512{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012513struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 ;
12515 return 0;
12516}
12517_ACEOF
12518rm -f conftest.$ac_objext
12519if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12520 (eval $ac_compile) 2>&5
12521 ac_status=$?
12522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12523 (exit $ac_status); } &&
12524 { ac_try='test -s conftest.$ac_objext'
12525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12526 (eval $ac_try) 2>&5
12527 ac_status=$?
12528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12529 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012530 ac_cv_struct_tm=time.h
12531else
Martin v. Löwis11437992002-04-12 09:54:03 +000012532 echo "$as_me: failed program was:" >&5
12533cat conftest.$ac_ext >&5
12534ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012535fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012536rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012537fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012538echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12539echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012540if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012541
12542cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012543#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012544_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012545
12546fi
12547
Martin v. Löwis11437992002-04-12 09:54:03 +000012548echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12549echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12550if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12551 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012552else
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 cat >conftest.$ac_ext <<_ACEOF
12554#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012555#include "confdefs.h"
12556#include <sys/types.h>
12557#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012558
12559
12560#ifdef F77_DUMMY_MAIN
12561# ifdef __cplusplus
12562 extern "C"
12563# endif
12564 int F77_DUMMY_MAIN() { return 1; }
12565#endif
12566int
12567main ()
12568{
12569static struct tm ac_aggr;
12570if (ac_aggr.tm_zone)
12571return 0;
12572 ;
12573 return 0;
12574}
12575_ACEOF
12576rm -f conftest.$ac_objext
12577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12578 (eval $ac_compile) 2>&5
12579 ac_status=$?
12580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581 (exit $ac_status); } &&
12582 { ac_try='test -s conftest.$ac_objext'
12583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12584 (eval $ac_try) 2>&5
12585 ac_status=$?
12586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12587 (exit $ac_status); }; }; then
12588 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012589else
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 echo "$as_me: failed program was:" >&5
12591cat conftest.$ac_ext >&5
12592ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012593fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012594rm -f conftest.$ac_objext conftest.$ac_ext
12595fi
12596echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12597echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12598if test $ac_cv_member_struct_tm_tm_zone = yes; then
12599
12600cat >>confdefs.h <<_ACEOF
12601#define HAVE_STRUCT_TM_TM_ZONE 1
12602_ACEOF
12603
12604
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012605fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012606
Martin v. Löwis11437992002-04-12 09:54:03 +000012607if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12608
12609cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012610#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012611_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012612
12613else
Martin v. Löwis11437992002-04-12 09:54:03 +000012614 echo "$as_me:$LINENO: checking for tzname" >&5
12615echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12616if test "${ac_cv_var_tzname+set}" = set; then
12617 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012618else
Martin v. Löwis11437992002-04-12 09:54:03 +000012619 cat >conftest.$ac_ext <<_ACEOF
12620#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012621#include "confdefs.h"
12622#include <time.h>
12623#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012624extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012626
12627#ifdef F77_DUMMY_MAIN
12628# ifdef __cplusplus
12629 extern "C"
12630# endif
12631 int F77_DUMMY_MAIN() { return 1; }
12632#endif
12633int
12634main ()
12635{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012636atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012637 ;
12638 return 0;
12639}
12640_ACEOF
12641rm -f conftest.$ac_objext conftest$ac_exeext
12642if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12643 (eval $ac_link) 2>&5
12644 ac_status=$?
12645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12646 (exit $ac_status); } &&
12647 { ac_try='test -s conftest$ac_exeext'
12648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12649 (eval $ac_try) 2>&5
12650 ac_status=$?
12651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12652 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012653 ac_cv_var_tzname=yes
12654else
Martin v. Löwis11437992002-04-12 09:54:03 +000012655 echo "$as_me: failed program was:" >&5
12656cat conftest.$ac_ext >&5
12657ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012658fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012659rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012660fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012661echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12662echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012663 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012664
12665cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012666#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012667_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012668
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012669 fi
12670fi
12671
Jack Jansendd19cf82001-12-06 22:36:17 +000012672
Martin v. Löwis11437992002-04-12 09:54:03 +000012673echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12674echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12675if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12676 echo $ECHO_N "(cached) $ECHO_C" >&6
12677else
12678 cat >conftest.$ac_ext <<_ACEOF
12679#line $LINENO "configure"
12680#include "confdefs.h"
12681$ac_includes_default
12682#ifdef F77_DUMMY_MAIN
12683# ifdef __cplusplus
12684 extern "C"
12685# endif
12686 int F77_DUMMY_MAIN() { return 1; }
12687#endif
12688int
12689main ()
12690{
12691static struct stat ac_aggr;
12692if (ac_aggr.st_rdev)
12693return 0;
12694 ;
12695 return 0;
12696}
12697_ACEOF
12698rm -f conftest.$ac_objext
12699if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12700 (eval $ac_compile) 2>&5
12701 ac_status=$?
12702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12703 (exit $ac_status); } &&
12704 { ac_try='test -s conftest.$ac_objext'
12705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12706 (eval $ac_try) 2>&5
12707 ac_status=$?
12708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12709 (exit $ac_status); }; }; then
12710 ac_cv_member_struct_stat_st_rdev=yes
12711else
12712 echo "$as_me: failed program was:" >&5
12713cat conftest.$ac_ext >&5
12714ac_cv_member_struct_stat_st_rdev=no
12715fi
12716rm -f conftest.$ac_objext conftest.$ac_ext
12717fi
12718echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12719echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12720if test $ac_cv_member_struct_stat_st_rdev = yes; then
12721
12722cat >>confdefs.h <<_ACEOF
12723#define HAVE_STRUCT_STAT_ST_RDEV 1
12724_ACEOF
12725
12726
12727cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012728#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012729_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012730
12731fi
12732
Martin v. Löwis11437992002-04-12 09:54:03 +000012733
12734
12735echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12736echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12737if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012739else
Martin v. Löwis11437992002-04-12 09:54:03 +000012740 cat >conftest.$ac_ext <<_ACEOF
12741#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012742#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012743$ac_includes_default
12744#ifdef F77_DUMMY_MAIN
12745# ifdef __cplusplus
12746 extern "C"
12747# endif
12748 int F77_DUMMY_MAIN() { return 1; }
12749#endif
12750int
12751main ()
12752{
12753static struct stat ac_aggr;
12754if (ac_aggr.st_blksize)
12755return 0;
12756 ;
12757 return 0;
12758}
12759_ACEOF
12760rm -f conftest.$ac_objext
12761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12762 (eval $ac_compile) 2>&5
12763 ac_status=$?
12764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12765 (exit $ac_status); } &&
12766 { ac_try='test -s conftest.$ac_objext'
12767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12768 (eval $ac_try) 2>&5
12769 ac_status=$?
12770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12771 (exit $ac_status); }; }; then
12772 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012773else
Martin v. Löwis11437992002-04-12 09:54:03 +000012774 echo "$as_me: failed program was:" >&5
12775cat conftest.$ac_ext >&5
12776ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012777fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012778rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012779fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012780echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12781echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12782if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012783
Martin v. Löwis11437992002-04-12 09:54:03 +000012784cat >>confdefs.h <<_ACEOF
12785#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12786_ACEOF
12787
12788
12789cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012790#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012791_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012792
12793fi
12794
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
12796echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12797echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12798if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012800else
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 cat >conftest.$ac_ext <<_ACEOF
12802#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012803#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012804$ac_includes_default
12805#ifdef F77_DUMMY_MAIN
12806# ifdef __cplusplus
12807 extern "C"
12808# endif
12809 int F77_DUMMY_MAIN() { return 1; }
12810#endif
12811int
12812main ()
12813{
12814static struct stat ac_aggr;
12815if (ac_aggr.st_blocks)
12816return 0;
12817 ;
12818 return 0;
12819}
12820_ACEOF
12821rm -f conftest.$ac_objext
12822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12823 (eval $ac_compile) 2>&5
12824 ac_status=$?
12825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12826 (exit $ac_status); } &&
12827 { ac_try='test -s conftest.$ac_objext'
12828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12829 (eval $ac_try) 2>&5
12830 ac_status=$?
12831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12832 (exit $ac_status); }; }; then
12833 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012834else
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 echo "$as_me: failed program was:" >&5
12836cat conftest.$ac_ext >&5
12837ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012839rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012840fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012841echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12842echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12843if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012844
Martin v. Löwis11437992002-04-12 09:54:03 +000012845cat >>confdefs.h <<_ACEOF
12846#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12847_ACEOF
12848
12849
12850cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012851#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012852_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012853
12854else
Martin v. Löwis11437992002-04-12 09:54:03 +000012855 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012856fi
12857
Michael W. Hudson54241132001-12-07 15:38:26 +000012858
Martin v. Löwis11437992002-04-12 09:54:03 +000012859
12860echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12861echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12862if test "${ac_cv_header_time_altzone+set}" = set; then
12863 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012864else
Martin v. Löwis11437992002-04-12 09:54:03 +000012865 cat >conftest.$ac_ext <<_ACEOF
12866#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012867#include "confdefs.h"
12868#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012869#ifdef F77_DUMMY_MAIN
12870# ifdef __cplusplus
12871 extern "C"
12872# endif
12873 int F77_DUMMY_MAIN() { return 1; }
12874#endif
12875int
12876main ()
12877{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012878return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 ;
12880 return 0;
12881}
12882_ACEOF
12883rm -f conftest.$ac_objext
12884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12885 (eval $ac_compile) 2>&5
12886 ac_status=$?
12887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12888 (exit $ac_status); } &&
12889 { ac_try='test -s conftest.$ac_objext'
12890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12891 (eval $ac_try) 2>&5
12892 ac_status=$?
12893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12894 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012895 ac_cv_header_time_altzone=yes
12896else
Martin v. Löwis11437992002-04-12 09:54:03 +000012897 echo "$as_me: failed program was:" >&5
12898cat conftest.$ac_ext >&5
12899ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012900fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012901rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012902fi
12903
Martin v. Löwis11437992002-04-12 09:54:03 +000012904echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
12905echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012906if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012907
12908cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012909#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012910_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012911
12912fi
12913
Guido van Rossumda88dad1995-01-26 00:46:29 +000012914was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012915echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
12916echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
12917cat >conftest.$ac_ext <<_ACEOF
12918#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012919#include "confdefs.h"
12920
12921#include <sys/types.h>
12922#include <sys/select.h>
12923#include <sys/time.h>
12924
Martin v. Löwis11437992002-04-12 09:54:03 +000012925#ifdef F77_DUMMY_MAIN
12926# ifdef __cplusplus
12927 extern "C"
12928# endif
12929 int F77_DUMMY_MAIN() { return 1; }
12930#endif
12931int
12932main ()
12933{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012934;
Martin v. Löwis11437992002-04-12 09:54:03 +000012935 ;
12936 return 0;
12937}
12938_ACEOF
12939rm -f conftest.$ac_objext
12940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12941 (eval $ac_compile) 2>&5
12942 ac_status=$?
12943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12944 (exit $ac_status); } &&
12945 { ac_try='test -s conftest.$ac_objext'
12946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12947 (eval $ac_try) 2>&5
12948 ac_status=$?
12949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12950 (exit $ac_status); }; }; then
12951
12952
12953cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012954#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012955_ACEOF
12956
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012957 was_it_defined=yes
12958
Guido van Rossumf78abae1997-01-21 22:02:36 +000012959else
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 echo "$as_me: failed program was:" >&5
12961cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012962fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012963rm -f conftest.$ac_objext conftest.$ac_ext
12964echo "$as_me:$LINENO: result: $was_it_defined" >&5
12965echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000012966
Martin v. Löwis11437992002-04-12 09:54:03 +000012967echo "$as_me:$LINENO: checking for addrinfo" >&5
12968echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
12969if test "${ac_cv_struct_addrinfo+set}" = set; then
12970 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012971else
Martin v. Löwis11437992002-04-12 09:54:03 +000012972 cat >conftest.$ac_ext <<_ACEOF
12973#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012974#include "confdefs.h"
12975
12976# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012977#ifdef F77_DUMMY_MAIN
12978# ifdef __cplusplus
12979 extern "C"
12980# endif
12981 int F77_DUMMY_MAIN() { return 1; }
12982#endif
12983int
12984main ()
12985{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012986struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012987 ;
12988 return 0;
12989}
12990_ACEOF
12991rm -f conftest.$ac_objext
12992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12993 (eval $ac_compile) 2>&5
12994 ac_status=$?
12995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12996 (exit $ac_status); } &&
12997 { ac_try='test -s conftest.$ac_objext'
12998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12999 (eval $ac_try) 2>&5
13000 ac_status=$?
13001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13002 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013003 ac_cv_struct_addrinfo=yes
13004else
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 echo "$as_me: failed program was:" >&5
13006cat conftest.$ac_ext >&5
13007ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013008fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013009rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013010fi
13011
Martin v. Löwis11437992002-04-12 09:54:03 +000013012echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13013echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013014if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013015
13016cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013017#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013018_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013019
13020fi
13021
Martin v. Löwis11437992002-04-12 09:54:03 +000013022echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13023echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13024if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13025 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013026else
Martin v. Löwis11437992002-04-12 09:54:03 +000013027 cat >conftest.$ac_ext <<_ACEOF
13028#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013029#include "confdefs.h"
13030
13031# include <sys/types.h>
13032# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013033#ifdef F77_DUMMY_MAIN
13034# ifdef __cplusplus
13035 extern "C"
13036# endif
13037 int F77_DUMMY_MAIN() { return 1; }
13038#endif
13039int
13040main ()
13041{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013042struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013043 ;
13044 return 0;
13045}
13046_ACEOF
13047rm -f conftest.$ac_objext
13048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13049 (eval $ac_compile) 2>&5
13050 ac_status=$?
13051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13052 (exit $ac_status); } &&
13053 { ac_try='test -s conftest.$ac_objext'
13054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13055 (eval $ac_try) 2>&5
13056 ac_status=$?
13057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13058 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013059 ac_cv_struct_sockaddr_storage=yes
13060else
Martin v. Löwis11437992002-04-12 09:54:03 +000013061 echo "$as_me: failed program was:" >&5
13062cat conftest.$ac_ext >&5
13063ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013064fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013065rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013066fi
13067
Martin v. Löwis11437992002-04-12 09:54:03 +000013068echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13069echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013070if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013071
13072cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013073#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013074_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013075
13076fi
13077
Guido van Rossum627b2d71993-12-24 10:39:16 +000013078# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013079
Michael W. Hudson54241132001-12-07 15:38:26 +000013080
Martin v. Löwis11437992002-04-12 09:54:03 +000013081echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13082echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13083if test "${ac_cv_c_char_unsigned+set}" = set; then
13084 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013085else
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 cat >conftest.$ac_ext <<_ACEOF
13087#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013088#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013089$ac_includes_default
13090#ifdef F77_DUMMY_MAIN
13091# ifdef __cplusplus
13092 extern "C"
13093# endif
13094 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013096int
13097main ()
13098{
13099static int test_array [1 - 2 * !(((char) -1) < 0)];
13100test_array [0] = 0
13101
13102 ;
13103 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013104}
Martin v. Löwis11437992002-04-12 09:54:03 +000013105_ACEOF
13106rm -f conftest.$ac_objext
13107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13108 (eval $ac_compile) 2>&5
13109 ac_status=$?
13110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13111 (exit $ac_status); } &&
13112 { ac_try='test -s conftest.$ac_objext'
13113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13114 (eval $ac_try) 2>&5
13115 ac_status=$?
13116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13117 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013118 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013119else
13120 echo "$as_me: failed program was:" >&5
13121cat conftest.$ac_ext >&5
13122ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013123fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013124rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013126echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13127echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013128if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013129 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013130#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013131_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013132
13133fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013134
Martin v. Löwis11437992002-04-12 09:54:03 +000013135echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13136echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13137if test "${ac_cv_prog_cc_stdc+set}" = set; then
13138 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013139else
Martin v. Löwis11437992002-04-12 09:54:03 +000013140 ac_cv_prog_cc_stdc=no
13141ac_save_CC=$CC
13142cat >conftest.$ac_ext <<_ACEOF
13143#line $LINENO "configure"
13144#include "confdefs.h"
13145#include <stdarg.h>
13146#include <stdio.h>
13147#include <sys/types.h>
13148#include <sys/stat.h>
13149/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13150struct buf { int x; };
13151FILE * (*rcsopen) (struct buf *, struct stat *, int);
13152static char *e (p, i)
13153 char **p;
13154 int i;
13155{
13156 return p[i];
13157}
13158static char *f (char * (*g) (char **, int), char **p, ...)
13159{
13160 char *s;
13161 va_list v;
13162 va_start (v,p);
13163 s = g (p, va_arg (v,int));
13164 va_end (v);
13165 return s;
13166}
13167int test (int i, double x);
13168struct s1 {int (*f) (int a);};
13169struct s2 {int (*f) (double a);};
13170int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13171int argc;
13172char **argv;
13173#ifdef F77_DUMMY_MAIN
13174# ifdef __cplusplus
13175 extern "C"
13176# endif
13177 int F77_DUMMY_MAIN() { return 1; }
13178#endif
13179int
13180main ()
13181{
13182return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13183 ;
13184 return 0;
13185}
13186_ACEOF
13187# Don't try gcc -ansi; that turns off useful extensions and
13188# breaks some systems' header files.
13189# AIX -qlanglvl=ansi
13190# Ultrix and OSF/1 -std1
13191# HP-UX 10.20 and later -Ae
13192# HP-UX older versions -Aa -D_HPUX_SOURCE
13193# SVR4 -Xc -D__EXTENSIONS__
13194for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13195do
13196 CC="$ac_save_CC $ac_arg"
13197 rm -f conftest.$ac_objext
13198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13199 (eval $ac_compile) 2>&5
13200 ac_status=$?
13201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13202 (exit $ac_status); } &&
13203 { ac_try='test -s conftest.$ac_objext'
13204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13205 (eval $ac_try) 2>&5
13206 ac_status=$?
13207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13208 (exit $ac_status); }; }; then
13209 ac_cv_prog_cc_stdc=$ac_arg
13210break
13211else
13212 echo "$as_me: failed program was:" >&5
13213cat conftest.$ac_ext >&5
13214fi
13215rm -f conftest.$ac_objext
13216done
13217rm -f conftest.$ac_ext conftest.$ac_objext
13218CC=$ac_save_CC
13219
13220fi
13221
13222case "x$ac_cv_prog_cc_stdc" in
13223 x|xno)
13224 echo "$as_me:$LINENO: result: none needed" >&5
13225echo "${ECHO_T}none needed" >&6 ;;
13226 *)
13227 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13228echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13229 CC="$CC $ac_cv_prog_cc_stdc" ;;
13230esac
13231
13232echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13233echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13234if test "${ac_cv_c_const+set}" = set; then
13235 echo $ECHO_N "(cached) $ECHO_C" >&6
13236else
13237 cat >conftest.$ac_ext <<_ACEOF
13238#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013239#include "confdefs.h"
13240
Martin v. Löwis11437992002-04-12 09:54:03 +000013241#ifdef F77_DUMMY_MAIN
13242# ifdef __cplusplus
13243 extern "C"
13244# endif
13245 int F77_DUMMY_MAIN() { return 1; }
13246#endif
13247int
13248main ()
13249{
13250/* FIXME: Include the comments suggested by Paul. */
13251#ifndef __cplusplus
13252 /* Ultrix mips cc rejects this. */
13253 typedef int charset[2];
13254 const charset x;
13255 /* SunOS 4.1.1 cc rejects this. */
13256 char const *const *ccp;
13257 char **p;
13258 /* NEC SVR4.0.2 mips cc rejects this. */
13259 struct point {int x, y;};
13260 static struct point const zero = {0,0};
13261 /* AIX XL C 1.02.0.0 rejects this.
13262 It does not let you subtract one const X* pointer from another in
13263 an arm of an if-expression whose if-part is not a constant
13264 expression */
13265 const char *g = "string";
13266 ccp = &g + (g ? g-g : 0);
13267 /* HPUX 7.0 cc rejects these. */
13268 ++ccp;
13269 p = (char**) ccp;
13270 ccp = (char const *const *) p;
13271 { /* SCO 3.2v4 cc rejects this. */
13272 char *t;
13273 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013274
Martin v. Löwis11437992002-04-12 09:54:03 +000013275 *t++ = 0;
13276 }
13277 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13278 int x[] = {25, 17};
13279 const int *foo = &x[0];
13280 ++foo;
13281 }
13282 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13283 typedef const int *iptr;
13284 iptr p = 0;
13285 ++p;
13286 }
13287 { /* AIX XL C 1.02.0.0 rejects this saying
13288 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13289 struct s { int j; const int *ap[3]; };
13290 struct s *b; b->j = 5;
13291 }
13292 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13293 const int foo = 10;
13294 }
13295#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013296
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 ;
13298 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013299}
Martin v. Löwis11437992002-04-12 09:54:03 +000013300_ACEOF
13301rm -f conftest.$ac_objext
13302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13303 (eval $ac_compile) 2>&5
13304 ac_status=$?
13305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13306 (exit $ac_status); } &&
13307 { ac_try='test -s conftest.$ac_objext'
13308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13309 (eval $ac_try) 2>&5
13310 ac_status=$?
13311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13312 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013313 ac_cv_c_const=yes
13314else
Martin v. Löwis11437992002-04-12 09:54:03 +000013315 echo "$as_me: failed program was:" >&5
13316cat conftest.$ac_ext >&5
13317ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013319rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013320fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013321echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13322echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013323if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013324
13325cat >>confdefs.h <<\_ACEOF
13326#define const
13327_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013328
13329fi
13330
Michael W. Hudson54241132001-12-07 15:38:26 +000013331
Guido van Rossumda88dad1995-01-26 00:46:29 +000013332works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013333echo "$as_me:$LINENO: checking for working volatile" >&5
13334echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13335cat >conftest.$ac_ext <<_ACEOF
13336#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013337#include "confdefs.h"
13338
Martin v. Löwis11437992002-04-12 09:54:03 +000013339#ifdef F77_DUMMY_MAIN
13340# ifdef __cplusplus
13341 extern "C"
13342# endif
13343 int F77_DUMMY_MAIN() { return 1; }
13344#endif
13345int
13346main ()
13347{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013348volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013349 ;
13350 return 0;
13351}
13352_ACEOF
13353rm -f conftest.$ac_objext
13354if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13355 (eval $ac_compile) 2>&5
13356 ac_status=$?
13357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13358 (exit $ac_status); } &&
13359 { ac_try='test -s conftest.$ac_objext'
13360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13361 (eval $ac_try) 2>&5
13362 ac_status=$?
13363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13364 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013365 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013366else
Martin v. Löwis11437992002-04-12 09:54:03 +000013367 echo "$as_me: failed program was:" >&5
13368cat conftest.$ac_ext >&5
13369
13370cat >>confdefs.h <<\_ACEOF
13371#define volatile
13372_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013373
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013374
Guido van Rossum627b2d71993-12-24 10:39:16 +000013375fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013376rm -f conftest.$ac_objext conftest.$ac_ext
13377echo "$as_me:$LINENO: result: $works" >&5
13378echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013379
Guido van Rossumda88dad1995-01-26 00:46:29 +000013380works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013381echo "$as_me:$LINENO: checking for working signed char" >&5
13382echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13383cat >conftest.$ac_ext <<_ACEOF
13384#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013385#include "confdefs.h"
13386
Martin v. Löwis11437992002-04-12 09:54:03 +000013387#ifdef F77_DUMMY_MAIN
13388# ifdef __cplusplus
13389 extern "C"
13390# endif
13391 int F77_DUMMY_MAIN() { return 1; }
13392#endif
13393int
13394main ()
13395{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013396signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013397 ;
13398 return 0;
13399}
13400_ACEOF
13401rm -f conftest.$ac_objext
13402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13403 (eval $ac_compile) 2>&5
13404 ac_status=$?
13405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13406 (exit $ac_status); } &&
13407 { ac_try='test -s conftest.$ac_objext'
13408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13409 (eval $ac_try) 2>&5
13410 ac_status=$?
13411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13412 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013413 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013414else
Martin v. Löwis11437992002-04-12 09:54:03 +000013415 echo "$as_me: failed program was:" >&5
13416cat conftest.$ac_ext >&5
13417
13418cat >>confdefs.h <<\_ACEOF
13419#define signed
13420_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013421
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013422
Guido van Rossum7f43da71994-08-01 12:15:30 +000013423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013424rm -f conftest.$ac_objext conftest.$ac_ext
13425echo "$as_me:$LINENO: result: $works" >&5
13426echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013427
Guido van Rossumda88dad1995-01-26 00:46:29 +000013428have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013429echo "$as_me:$LINENO: checking for prototypes" >&5
13430echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13431cat >conftest.$ac_ext <<_ACEOF
13432#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013433#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013434int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013435#ifdef F77_DUMMY_MAIN
13436# ifdef __cplusplus
13437 extern "C"
13438# endif
13439 int F77_DUMMY_MAIN() { return 1; }
13440#endif
13441int
13442main ()
13443{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013444return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 ;
13446 return 0;
13447}
13448_ACEOF
13449rm -f conftest.$ac_objext
13450if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13451 (eval $ac_compile) 2>&5
13452 ac_status=$?
13453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13454 (exit $ac_status); } &&
13455 { ac_try='test -s conftest.$ac_objext'
13456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13457 (eval $ac_try) 2>&5
13458 ac_status=$?
13459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13460 (exit $ac_status); }; }; then
13461
13462
13463cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013464#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013465_ACEOF
13466
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013467 have_prototypes=yes
13468
Guido van Rossumf78abae1997-01-21 22:02:36 +000013469else
Martin v. Löwis11437992002-04-12 09:54:03 +000013470 echo "$as_me: failed program was:" >&5
13471cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013472fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013473rm -f conftest.$ac_objext conftest.$ac_ext
13474echo "$as_me:$LINENO: result: $have_prototypes" >&5
13475echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013476
Guido van Rossumda88dad1995-01-26 00:46:29 +000013477works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013478echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13479echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13480cat >conftest.$ac_ext <<_ACEOF
13481#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013482#include "confdefs.h"
13483
13484#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013485int foo(int x, ...) {
13486 va_list va;
13487 va_start(va, x);
13488 va_arg(va, int);
13489 va_arg(va, char *);
13490 va_arg(va, double);
13491 return 0;
13492}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013493
Martin v. Löwis11437992002-04-12 09:54:03 +000013494#ifdef F77_DUMMY_MAIN
13495# ifdef __cplusplus
13496 extern "C"
13497# endif
13498 int F77_DUMMY_MAIN() { return 1; }
13499#endif
13500int
13501main ()
13502{
Guido van Rossum90eea071996-08-30 20:58:57 +000013503return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013504 ;
13505 return 0;
13506}
13507_ACEOF
13508rm -f conftest.$ac_objext
13509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13510 (eval $ac_compile) 2>&5
13511 ac_status=$?
13512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13513 (exit $ac_status); } &&
13514 { ac_try='test -s conftest.$ac_objext'
13515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13516 (eval $ac_try) 2>&5
13517 ac_status=$?
13518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13519 (exit $ac_status); }; }; then
13520
13521
13522cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013523#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013524_ACEOF
13525
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013526 works=yes
13527
Guido van Rossumf78abae1997-01-21 22:02:36 +000013528else
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 echo "$as_me: failed program was:" >&5
13530cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013531fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013532rm -f conftest.$ac_objext conftest.$ac_ext
13533echo "$as_me:$LINENO: result: $works" >&5
13534echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013535
Guido van Rossumda88dad1995-01-26 00:46:29 +000013536if test "$have_prototypes" = yes; then
13537bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013538echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13539echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13540cat >conftest.$ac_ext <<_ACEOF
13541#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013542#include "confdefs.h"
13543#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013544#ifdef F77_DUMMY_MAIN
13545# ifdef __cplusplus
13546 extern "C"
13547# endif
13548 int F77_DUMMY_MAIN() { return 1; }
13549#endif
13550int
13551main ()
13552{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013553char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013554 ;
13555 return 0;
13556}
13557_ACEOF
13558rm -f conftest.$ac_objext
13559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13560 (eval $ac_compile) 2>&5
13561 ac_status=$?
13562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13563 (exit $ac_status); } &&
13564 { ac_try='test -s conftest.$ac_objext'
13565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13566 (eval $ac_try) 2>&5
13567 ac_status=$?
13568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13569 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013570 :
13571else
Martin v. Löwis11437992002-04-12 09:54:03 +000013572 echo "$as_me: failed program was:" >&5
13573cat conftest.$ac_ext >&5
13574
13575cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013576#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013577_ACEOF
13578
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013579 bad_prototypes=yes
13580
Guido van Rossum627b2d71993-12-24 10:39:16 +000013581fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013582rm -f conftest.$ac_objext conftest.$ac_ext
13583echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13584echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013585fi
13586
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013587# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013588echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13589echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13590cat >conftest.$ac_ext <<_ACEOF
13591#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013592#include "confdefs.h"
13593#include <sys/types.h>
13594#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013595#ifdef F77_DUMMY_MAIN
13596# ifdef __cplusplus
13597 extern "C"
13598# endif
13599 int F77_DUMMY_MAIN() { return 1; }
13600#endif
13601int
13602main ()
13603{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013604struct sockaddr x;
13605x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013606 ;
13607 return 0;
13608}
13609_ACEOF
13610rm -f conftest.$ac_objext
13611if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13612 (eval $ac_compile) 2>&5
13613 ac_status=$?
13614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13615 (exit $ac_status); } &&
13616 { ac_try='test -s conftest.$ac_objext'
13617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13618 (eval $ac_try) 2>&5
13619 ac_status=$?
13620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13621 (exit $ac_status); }; }; then
13622 echo "$as_me:$LINENO: result: yes" >&5
13623echo "${ECHO_T}yes" >&6
13624
13625cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013626#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013627_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013628
13629else
Martin v. Löwis11437992002-04-12 09:54:03 +000013630 echo "$as_me: failed program was:" >&5
13631cat conftest.$ac_ext >&5
13632echo "$as_me:$LINENO: result: no" >&5
13633echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013634fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013635rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013636
Martin v. Löwis11437992002-04-12 09:54:03 +000013637echo "$as_me:$LINENO: checking for bad static forward" >&5
13638echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13639if test "${ac_cv_bad_static_forward+set}" = set; then
13640 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013641else
13642 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013643 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013644else
Martin v. Löwis11437992002-04-12 09:54:03 +000013645 cat >conftest.$ac_ext <<_ACEOF
13646#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013647#include "confdefs.h"
13648
13649struct s { int a; int b; };
13650static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013651int foobar() {
13652 static int random;
13653 random = (int) &foo;
13654 return random;
13655}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013656static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013657main() {
13658 exit(!((int)&foo == foobar()));
13659}
Martin v. Löwis11437992002-04-12 09:54:03 +000013660_ACEOF
13661rm -f conftest$ac_exeext
13662if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13663 (eval $ac_link) 2>&5
13664 ac_status=$?
13665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13666 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13668 (eval $ac_try) 2>&5
13669 ac_status=$?
13670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13671 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013672 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013673else
Martin v. Löwis11437992002-04-12 09:54:03 +000013674 echo "$as_me: program exited with status $ac_status" >&5
13675echo "$as_me: failed program was:" >&5
13676cat conftest.$ac_ext >&5
13677( exit $ac_status )
13678ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013679fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013680rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13681fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013682fi
13683
Martin v. Löwis11437992002-04-12 09:54:03 +000013684echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13685echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013686if test "$ac_cv_bad_static_forward" = yes
13687then
Martin v. Löwis11437992002-04-12 09:54:03 +000013688
13689cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013690#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013691_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013692
13693fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013694
Guido van Rossumda88dad1995-01-26 00:46:29 +000013695va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013696echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13697echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13698cat >conftest.$ac_ext <<_ACEOF
13699#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013700#include "confdefs.h"
13701
13702#ifdef HAVE_STDARG_PROTOTYPES
13703#include <stdarg.h>
13704#else
13705#include <varargs.h>
13706#endif
13707
Martin v. Löwis11437992002-04-12 09:54:03 +000013708#ifdef F77_DUMMY_MAIN
13709# ifdef __cplusplus
13710 extern "C"
13711# endif
13712 int F77_DUMMY_MAIN() { return 1; }
13713#endif
13714int
13715main ()
13716{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013717va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013718 ;
13719 return 0;
13720}
13721_ACEOF
13722rm -f conftest.$ac_objext
13723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13724 (eval $ac_compile) 2>&5
13725 ac_status=$?
13726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13727 (exit $ac_status); } &&
13728 { ac_try='test -s conftest.$ac_objext'
13729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13730 (eval $ac_try) 2>&5
13731 ac_status=$?
13732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13733 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013734 :
13735else
Martin v. Löwis11437992002-04-12 09:54:03 +000013736 echo "$as_me: failed program was:" >&5
13737cat conftest.$ac_ext >&5
13738
13739
13740cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013741#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013742_ACEOF
13743
Guido van Rossumda88dad1995-01-26 00:46:29 +000013744 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013745
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013746fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013747rm -f conftest.$ac_objext conftest.$ac_ext
13748echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13749echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013750
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013751# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013752
13753
13754
13755echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13756echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13757if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13758 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013759else
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 cat >conftest.$ac_ext <<_ACEOF
13761#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013762#include "confdefs.h"
13763/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013764 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013765#include <assert.h>
13766/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013767#ifdef __cplusplus
13768extern "C"
13769#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013770/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 builtin and then its argument prototype would still apply. */
13772char gethostbyname_r ();
13773char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013774
Martin v. Löwis11437992002-04-12 09:54:03 +000013775#ifdef F77_DUMMY_MAIN
13776# ifdef __cplusplus
13777 extern "C"
13778# endif
13779 int F77_DUMMY_MAIN() { return 1; }
13780#endif
13781int
13782main ()
13783{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013784/* The GNU C library defines this for functions which it implements
13785 to always fail with ENOSYS. Some functions are actually named
13786 something starting with __ and the normal name is an alias. */
13787#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13788choke me
13789#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013790f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013791#endif
13792
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 ;
13794 return 0;
13795}
13796_ACEOF
13797rm -f conftest.$ac_objext conftest$ac_exeext
13798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13799 (eval $ac_link) 2>&5
13800 ac_status=$?
13801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13802 (exit $ac_status); } &&
13803 { ac_try='test -s conftest$ac_exeext'
13804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13805 (eval $ac_try) 2>&5
13806 ac_status=$?
13807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13808 (exit $ac_status); }; }; then
13809 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013810else
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 echo "$as_me: failed program was:" >&5
13812cat conftest.$ac_ext >&5
13813ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013814fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013815rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013816fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013817echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13818echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13819if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013820
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013822#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013823_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013824
Martin v. Löwis11437992002-04-12 09:54:03 +000013825 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13826echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013827 OLD_CFLAGS=$CFLAGS
13828 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013829 cat >conftest.$ac_ext <<_ACEOF
13830#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013831#include "confdefs.h"
13832
13833# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013834
13835#ifdef F77_DUMMY_MAIN
13836# ifdef __cplusplus
13837 extern "C"
13838# endif
13839 int F77_DUMMY_MAIN() { return 1; }
13840#endif
13841int
13842main ()
13843{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013844
13845 char *name;
13846 struct hostent *he, *res;
13847 char buffer[2048];
13848 int buflen = 2048;
13849 int h_errnop;
13850
13851 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013852
13853 ;
13854 return 0;
13855}
13856_ACEOF
13857rm -f conftest.$ac_objext
13858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13859 (eval $ac_compile) 2>&5
13860 ac_status=$?
13861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13862 (exit $ac_status); } &&
13863 { ac_try='test -s conftest.$ac_objext'
13864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13865 (eval $ac_try) 2>&5
13866 ac_status=$?
13867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13868 (exit $ac_status); }; }; then
13869
13870 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013871#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013872_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013873
Martin v. Löwis11437992002-04-12 09:54:03 +000013874
13875cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013876#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013877_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013878
Martin v. Löwis11437992002-04-12 09:54:03 +000013879 echo "$as_me:$LINENO: result: yes" >&5
13880echo "${ECHO_T}yes" >&6
13881
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013882else
Martin v. Löwis11437992002-04-12 09:54:03 +000013883 echo "$as_me: failed program was:" >&5
13884cat conftest.$ac_ext >&5
13885
13886 echo "$as_me:$LINENO: result: no" >&5
13887echo "${ECHO_T}no" >&6
13888 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13889echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13890 cat >conftest.$ac_ext <<_ACEOF
13891#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013892#include "confdefs.h"
13893
13894# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013895
13896#ifdef F77_DUMMY_MAIN
13897# ifdef __cplusplus
13898 extern "C"
13899# endif
13900 int F77_DUMMY_MAIN() { return 1; }
13901#endif
13902int
13903main ()
13904{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013905
13906 char *name;
13907 struct hostent *he;
13908 char buffer[2048];
13909 int buflen = 2048;
13910 int h_errnop;
13911
13912 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013913
13914 ;
13915 return 0;
13916}
13917_ACEOF
13918rm -f conftest.$ac_objext
13919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13920 (eval $ac_compile) 2>&5
13921 ac_status=$?
13922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13923 (exit $ac_status); } &&
13924 { ac_try='test -s conftest.$ac_objext'
13925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13926 (eval $ac_try) 2>&5
13927 ac_status=$?
13928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13929 (exit $ac_status); }; }; then
13930
13931 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013932#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013933_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013934
Martin v. Löwis11437992002-04-12 09:54:03 +000013935
13936cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013937#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013938_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013939
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 echo "$as_me:$LINENO: result: yes" >&5
13941echo "${ECHO_T}yes" >&6
13942
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013943else
Martin v. Löwis11437992002-04-12 09:54:03 +000013944 echo "$as_me: failed program was:" >&5
13945cat conftest.$ac_ext >&5
13946
13947 echo "$as_me:$LINENO: result: no" >&5
13948echo "${ECHO_T}no" >&6
13949 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
13950echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
13951 cat >conftest.$ac_ext <<_ACEOF
13952#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013953#include "confdefs.h"
13954
13955# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013956
13957#ifdef F77_DUMMY_MAIN
13958# ifdef __cplusplus
13959 extern "C"
13960# endif
13961 int F77_DUMMY_MAIN() { return 1; }
13962#endif
13963int
13964main ()
13965{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013966
13967 char *name;
13968 struct hostent *he;
13969 struct hostent_data data;
13970
13971 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000013972
13973 ;
13974 return 0;
13975}
13976_ACEOF
13977rm -f conftest.$ac_objext
13978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13979 (eval $ac_compile) 2>&5
13980 ac_status=$?
13981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13982 (exit $ac_status); } &&
13983 { ac_try='test -s conftest.$ac_objext'
13984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13985 (eval $ac_try) 2>&5
13986 ac_status=$?
13987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13988 (exit $ac_status); }; }; then
13989
13990 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013991#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013992_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013993
Martin v. Löwis11437992002-04-12 09:54:03 +000013994
13995cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013996#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013997_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013998
Martin v. Löwis11437992002-04-12 09:54:03 +000013999 echo "$as_me:$LINENO: result: yes" >&5
14000echo "${ECHO_T}yes" >&6
14001
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014002else
Martin v. Löwis11437992002-04-12 09:54:03 +000014003 echo "$as_me: failed program was:" >&5
14004cat conftest.$ac_ext >&5
14005
14006 echo "$as_me:$LINENO: result: no" >&5
14007echo "${ECHO_T}no" >&6
14008
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014009fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014010rm -f conftest.$ac_objext conftest.$ac_ext
14011
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014012fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014013rm -f conftest.$ac_objext conftest.$ac_ext
14014
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014015fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014016rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014017 CFLAGS=$OLD_CFLAGS
14018
14019else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014020
Martin v. Löwis11437992002-04-12 09:54:03 +000014021
14022for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014023do
Martin v. Löwis11437992002-04-12 09:54:03 +000014024as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14025echo "$as_me:$LINENO: checking for $ac_func" >&5
14026echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14027if eval "test \"\${$as_ac_var+set}\" = set"; then
14028 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014029else
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 cat >conftest.$ac_ext <<_ACEOF
14031#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014032#include "confdefs.h"
14033/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014034 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014035#include <assert.h>
14036/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014037#ifdef __cplusplus
14038extern "C"
14039#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014040/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 builtin and then its argument prototype would still apply. */
14042char $ac_func ();
14043char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014044
Martin v. Löwis11437992002-04-12 09:54:03 +000014045#ifdef F77_DUMMY_MAIN
14046# ifdef __cplusplus
14047 extern "C"
14048# endif
14049 int F77_DUMMY_MAIN() { return 1; }
14050#endif
14051int
14052main ()
14053{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014054/* The GNU C library defines this for functions which it implements
14055 to always fail with ENOSYS. Some functions are actually named
14056 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014057#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014058choke me
14059#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014060f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014061#endif
14062
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 ;
14064 return 0;
14065}
14066_ACEOF
14067rm -f conftest.$ac_objext conftest$ac_exeext
14068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14069 (eval $ac_link) 2>&5
14070 ac_status=$?
14071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14072 (exit $ac_status); } &&
14073 { ac_try='test -s conftest$ac_exeext'
14074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14075 (eval $ac_try) 2>&5
14076 ac_status=$?
14077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14078 (exit $ac_status); }; }; then
14079 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014080else
Martin v. Löwis11437992002-04-12 09:54:03 +000014081 echo "$as_me: failed program was:" >&5
14082cat conftest.$ac_ext >&5
14083eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014085rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014086fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014087echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14088echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14089if test `eval echo '${'$as_ac_var'}'` = yes; then
14090 cat >>confdefs.h <<_ACEOF
14091#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14092_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014093
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014094fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014095done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014096
Michael W. Hudson54241132001-12-07 15:38:26 +000014097
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014098fi
14099
Michael W. Hudson54241132001-12-07 15:38:26 +000014100
14101
14102
14103
14104
14105
Guido van Rossum627b2d71993-12-24 10:39:16 +000014106# checks for system services
14107# (none yet)
14108
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014109# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014110echo "$as_me:$LINENO: checking for __fpu_control" >&5
14111echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14112if test "${ac_cv_func___fpu_control+set}" = set; then
14113 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014114else
Martin v. Löwis11437992002-04-12 09:54:03 +000014115 cat >conftest.$ac_ext <<_ACEOF
14116#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014117#include "confdefs.h"
14118/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014119 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014120#include <assert.h>
14121/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014122#ifdef __cplusplus
14123extern "C"
14124#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014125/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014126 builtin and then its argument prototype would still apply. */
14127char __fpu_control ();
14128char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014129
Martin v. Löwis11437992002-04-12 09:54:03 +000014130#ifdef F77_DUMMY_MAIN
14131# ifdef __cplusplus
14132 extern "C"
14133# endif
14134 int F77_DUMMY_MAIN() { return 1; }
14135#endif
14136int
14137main ()
14138{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014139/* The GNU C library defines this for functions which it implements
14140 to always fail with ENOSYS. Some functions are actually named
14141 something starting with __ and the normal name is an alias. */
14142#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14143choke me
14144#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014145f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014146#endif
14147
Martin v. Löwis11437992002-04-12 09:54:03 +000014148 ;
14149 return 0;
14150}
14151_ACEOF
14152rm -f conftest.$ac_objext conftest$ac_exeext
14153if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14154 (eval $ac_link) 2>&5
14155 ac_status=$?
14156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14157 (exit $ac_status); } &&
14158 { ac_try='test -s conftest$ac_exeext'
14159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14160 (eval $ac_try) 2>&5
14161 ac_status=$?
14162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14163 (exit $ac_status); }; }; then
14164 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014165else
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 echo "$as_me: failed program was:" >&5
14167cat conftest.$ac_ext >&5
14168ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014169fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014170rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014171fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014172echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14173echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14174if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014175 :
14176else
Martin v. Löwis11437992002-04-12 09:54:03 +000014177
14178echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14179echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14180if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14181 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014182else
Martin v. Löwis11437992002-04-12 09:54:03 +000014183 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014184LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014185cat >conftest.$ac_ext <<_ACEOF
14186#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014187#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014188
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014189/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014190#ifdef __cplusplus
14191extern "C"
14192#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014193/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014194 builtin and then its argument prototype would still apply. */
14195char __fpu_control ();
14196#ifdef F77_DUMMY_MAIN
14197# ifdef __cplusplus
14198 extern "C"
14199# endif
14200 int F77_DUMMY_MAIN() { return 1; }
14201#endif
14202int
14203main ()
14204{
14205__fpu_control ();
14206 ;
14207 return 0;
14208}
14209_ACEOF
14210rm -f conftest.$ac_objext conftest$ac_exeext
14211if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14212 (eval $ac_link) 2>&5
14213 ac_status=$?
14214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14215 (exit $ac_status); } &&
14216 { ac_try='test -s conftest$ac_exeext'
14217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14218 (eval $ac_try) 2>&5
14219 ac_status=$?
14220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14221 (exit $ac_status); }; }; then
14222 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014223else
Martin v. Löwis11437992002-04-12 09:54:03 +000014224 echo "$as_me: failed program was:" >&5
14225cat conftest.$ac_ext >&5
14226ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014227fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014228rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14229LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014231echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14232echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14233if test $ac_cv_lib_ieee___fpu_control = yes; then
14234 cat >>confdefs.h <<_ACEOF
14235#define HAVE_LIBIEEE 1
14236_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014237
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014238 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014239
Guido van Rossum627b2d71993-12-24 10:39:16 +000014240fi
14241
Michael W. Hudson54241132001-12-07 15:38:26 +000014242
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014243fi
14244
Michael W. Hudson54241132001-12-07 15:38:26 +000014245
Guido van Rossum7f253911997-05-09 02:42:48 +000014246# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014247echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14248echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14249
Guido van Rossum7f253911997-05-09 02:42:48 +000014250# Check whether --with-fpectl or --without-fpectl was given.
14251if test "${with_fpectl+set}" = set; then
14252 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014253
Guido van Rossum7f253911997-05-09 02:42:48 +000014254if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014255then
14256
14257cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014258#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014259_ACEOF
14260
14261 echo "$as_me:$LINENO: result: yes" >&5
14262echo "${ECHO_T}yes" >&6
14263else echo "$as_me:$LINENO: result: no" >&5
14264echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014265fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014266else
Martin v. Löwis11437992002-04-12 09:54:03 +000014267 echo "$as_me:$LINENO: result: no" >&5
14268echo "${ECHO_T}no" >&6
14269fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014270
Guido van Rossum7f43da71994-08-01 12:15:30 +000014271# check for --with-libm=...
14272
Guido van Rossum563e7081996-09-10 18:20:48 +000014273case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014274Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014275BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014276*) LIBM=-lm
14277esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014278echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14279echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14280
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014281# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014282if test "${with_libm+set}" = set; then
14283 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014284
Guido van Rossum7f253911997-05-09 02:42:48 +000014285if test "$withval" = no
14286then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014287 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14288echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014289elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014290then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014291 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14292echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14293else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14294echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14295 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014296fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014297else
Martin v. Löwis11437992002-04-12 09:54:03 +000014298 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14299echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14300fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014301
14302# check for --with-libc=...
14303
Martin v. Löwis11437992002-04-12 09:54:03 +000014304echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14305echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14306
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014307# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014308if test "${with_libc+set}" = set; then
14309 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014310
Guido van Rossum7f253911997-05-09 02:42:48 +000014311if test "$withval" = no
14312then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014313 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14314echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014315elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014316then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014317 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14318echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14319else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14320echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14321 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014322fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014323else
Martin v. Löwis11437992002-04-12 09:54:03 +000014324 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14325echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14326fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014327
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014328# check for hypot() in math library
14329LIBS_SAVE=$LIBS
14330LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014331
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014332for ac_func in hypot
14333do
Martin v. Löwis11437992002-04-12 09:54:03 +000014334as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14335echo "$as_me:$LINENO: checking for $ac_func" >&5
14336echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14337if eval "test \"\${$as_ac_var+set}\" = set"; then
14338 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014339else
Martin v. Löwis11437992002-04-12 09:54:03 +000014340 cat >conftest.$ac_ext <<_ACEOF
14341#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014342#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014343/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014344 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014345#include <assert.h>
14346/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014347#ifdef __cplusplus
14348extern "C"
14349#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014350/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014351 builtin and then its argument prototype would still apply. */
14352char $ac_func ();
14353char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014354
Martin v. Löwis11437992002-04-12 09:54:03 +000014355#ifdef F77_DUMMY_MAIN
14356# ifdef __cplusplus
14357 extern "C"
14358# endif
14359 int F77_DUMMY_MAIN() { return 1; }
14360#endif
14361int
14362main ()
14363{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014364/* The GNU C library defines this for functions which it implements
14365 to always fail with ENOSYS. Some functions are actually named
14366 something starting with __ and the normal name is an alias. */
14367#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14368choke me
14369#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014370f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014371#endif
14372
Martin v. Löwis11437992002-04-12 09:54:03 +000014373 ;
14374 return 0;
14375}
14376_ACEOF
14377rm -f conftest.$ac_objext conftest$ac_exeext
14378if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14379 (eval $ac_link) 2>&5
14380 ac_status=$?
14381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14382 (exit $ac_status); } &&
14383 { ac_try='test -s conftest$ac_exeext'
14384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14385 (eval $ac_try) 2>&5
14386 ac_status=$?
14387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14388 (exit $ac_status); }; }; then
14389 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014390else
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 echo "$as_me: failed program was:" >&5
14392cat conftest.$ac_ext >&5
14393eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014395rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014397echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14398echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14399if test `eval echo '${'$as_ac_var'}'` = yes; then
14400 cat >>confdefs.h <<_ACEOF
14401#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14402_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014403
Michael W. Hudson54241132001-12-07 15:38:26 +000014404else
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014406fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014407done
14408
Michael W. Hudson54241132001-12-07 15:38:26 +000014409
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014410LIBS=$LIBS_SAVE
14411
Guido van Rossumad713701997-07-10 22:42:38 +000014412# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014413echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14414echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14415if test "${ac_cv_malloc_zero+set}" = set; then
14416 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014417else
14418 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014419 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014420else
Martin v. Löwis11437992002-04-12 09:54:03 +000014421 cat >conftest.$ac_ext <<_ACEOF
14422#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014423#include "confdefs.h"
14424#include <stdio.h>
14425#ifdef HAVE_STDLIB
14426#include <stdlib.h>
14427#else
14428char *malloc(), *realloc();
14429int *free();
14430#endif
14431main() {
14432 char *p;
14433 p = malloc(0);
14434 if (p == NULL) exit(1);
14435 p = realloc(p, 0);
14436 if (p == NULL) exit(1);
14437 free(p);
14438 exit(0);
14439}
Martin v. Löwis11437992002-04-12 09:54:03 +000014440_ACEOF
14441rm -f conftest$ac_exeext
14442if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14443 (eval $ac_link) 2>&5
14444 ac_status=$?
14445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14446 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14448 (eval $ac_try) 2>&5
14449 ac_status=$?
14450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14451 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014452 ac_cv_malloc_zero=nonnull
14453else
Martin v. Löwis11437992002-04-12 09:54:03 +000014454 echo "$as_me: program exited with status $ac_status" >&5
14455echo "$as_me: failed program was:" >&5
14456cat conftest.$ac_ext >&5
14457( exit $ac_status )
14458ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014459fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014460rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014461fi
Guido van Rossumad713701997-07-10 22:42:38 +000014462fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014463 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014464echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14465echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014466if test "$ac_cv_malloc_zero" = null
14467then
Martin v. Löwis11437992002-04-12 09:54:03 +000014468
14469cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014470#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014471_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014472
14473fi
14474
Guido van Rossumef2255b2000-03-10 22:30:29 +000014475# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014476if test "${ac_cv_header_wchar_h+set}" = set; then
14477 echo "$as_me:$LINENO: checking for wchar.h" >&5
14478echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14479if test "${ac_cv_header_wchar_h+set}" = set; then
14480 echo $ECHO_N "(cached) $ECHO_C" >&6
14481fi
14482echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14483echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014484else
Martin v. Löwis11437992002-04-12 09:54:03 +000014485 # Is the header compilable?
14486echo "$as_me:$LINENO: checking wchar.h usability" >&5
14487echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14488cat >conftest.$ac_ext <<_ACEOF
14489#line $LINENO "configure"
14490#include "confdefs.h"
14491$ac_includes_default
14492#include <wchar.h>
14493_ACEOF
14494rm -f conftest.$ac_objext
14495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14496 (eval $ac_compile) 2>&5
14497 ac_status=$?
14498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14499 (exit $ac_status); } &&
14500 { ac_try='test -s conftest.$ac_objext'
14501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14502 (eval $ac_try) 2>&5
14503 ac_status=$?
14504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14505 (exit $ac_status); }; }; then
14506 ac_header_compiler=yes
14507else
14508 echo "$as_me: failed program was:" >&5
14509cat conftest.$ac_ext >&5
14510ac_header_compiler=no
14511fi
14512rm -f conftest.$ac_objext conftest.$ac_ext
14513echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14514echo "${ECHO_T}$ac_header_compiler" >&6
14515
14516# Is the header present?
14517echo "$as_me:$LINENO: checking wchar.h presence" >&5
14518echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14519cat >conftest.$ac_ext <<_ACEOF
14520#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014521#include "confdefs.h"
14522#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014523_ACEOF
14524if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14525 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14526 ac_status=$?
14527 egrep -v '^ *\+' conftest.er1 >conftest.err
14528 rm -f conftest.er1
14529 cat conftest.err >&5
14530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14531 (exit $ac_status); } >/dev/null; then
14532 if test -s conftest.err; then
14533 ac_cpp_err=$ac_c_preproc_warn_flag
14534 else
14535 ac_cpp_err=
14536 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014537else
Martin v. Löwis11437992002-04-12 09:54:03 +000014538 ac_cpp_err=yes
14539fi
14540if test -z "$ac_cpp_err"; then
14541 ac_header_preproc=yes
14542else
14543 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014544 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014545 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014546fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014547rm -f conftest.err conftest.$ac_ext
14548echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14549echo "${ECHO_T}$ac_header_preproc" >&6
14550
14551# So? What about this header?
14552case $ac_header_compiler:$ac_header_preproc in
14553 yes:no )
14554 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14555echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14556 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14557echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14558 no:yes )
14559 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14560echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14561 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14562echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14563 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14564echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14565esac
14566echo "$as_me:$LINENO: checking for wchar.h" >&5
14567echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14568if test "${ac_cv_header_wchar_h+set}" = set; then
14569 echo $ECHO_N "(cached) $ECHO_C" >&6
14570else
14571 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014572fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014573echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14574echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14575
14576fi
14577if test $ac_cv_header_wchar_h = yes; then
14578
14579
14580cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014581#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014582_ACEOF
14583
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014584 wchar_h="yes"
14585
Guido van Rossumef2255b2000-03-10 22:30:29 +000014586else
Martin v. Löwis11437992002-04-12 09:54:03 +000014587 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014588
14589fi
14590
Michael W. Hudson54241132001-12-07 15:38:26 +000014591
Martin v. Löwis11437992002-04-12 09:54:03 +000014592
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014593# determine wchar_t size
14594if test "$wchar_h" = yes
14595then
Martin v. Löwis11437992002-04-12 09:54:03 +000014596 echo "$as_me:$LINENO: checking for wchar_t" >&5
14597echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14598if test "${ac_cv_type_wchar_t+set}" = set; then
14599 echo $ECHO_N "(cached) $ECHO_C" >&6
14600else
14601 cat >conftest.$ac_ext <<_ACEOF
14602#line $LINENO "configure"
14603#include "confdefs.h"
14604#include <wchar.h>
14605
14606#ifdef F77_DUMMY_MAIN
14607# ifdef __cplusplus
14608 extern "C"
14609# endif
14610 int F77_DUMMY_MAIN() { return 1; }
14611#endif
14612int
14613main ()
14614{
14615if ((wchar_t *) 0)
14616 return 0;
14617if (sizeof (wchar_t))
14618 return 0;
14619 ;
14620 return 0;
14621}
14622_ACEOF
14623rm -f conftest.$ac_objext
14624if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14625 (eval $ac_compile) 2>&5
14626 ac_status=$?
14627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14628 (exit $ac_status); } &&
14629 { ac_try='test -s conftest.$ac_objext'
14630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14631 (eval $ac_try) 2>&5
14632 ac_status=$?
14633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14634 (exit $ac_status); }; }; then
14635 ac_cv_type_wchar_t=yes
14636else
14637 echo "$as_me: failed program was:" >&5
14638cat conftest.$ac_ext >&5
14639ac_cv_type_wchar_t=no
14640fi
14641rm -f conftest.$ac_objext conftest.$ac_ext
14642fi
14643echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14644echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14645
14646echo "$as_me:$LINENO: checking size of wchar_t" >&5
14647echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14648if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14649 echo $ECHO_N "(cached) $ECHO_C" >&6
14650else
14651 if test "$ac_cv_type_wchar_t" = yes; then
14652 # The cast to unsigned long works around a bug in the HP C Compiler
14653 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14654 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14655 # This bug is HP SR number 8606223364.
14656 if test "$cross_compiling" = yes; then
14657 # Depending upon the size, compute the lo and hi bounds.
14658cat >conftest.$ac_ext <<_ACEOF
14659#line $LINENO "configure"
14660#include "confdefs.h"
14661#include <wchar.h>
14662
14663#ifdef F77_DUMMY_MAIN
14664# ifdef __cplusplus
14665 extern "C"
14666# endif
14667 int F77_DUMMY_MAIN() { return 1; }
14668#endif
14669int
14670main ()
14671{
14672static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14673test_array [0] = 0
14674
14675 ;
14676 return 0;
14677}
14678_ACEOF
14679rm -f conftest.$ac_objext
14680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14681 (eval $ac_compile) 2>&5
14682 ac_status=$?
14683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14684 (exit $ac_status); } &&
14685 { ac_try='test -s conftest.$ac_objext'
14686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14687 (eval $ac_try) 2>&5
14688 ac_status=$?
14689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14690 (exit $ac_status); }; }; then
14691 ac_lo=0 ac_mid=0
14692 while :; do
14693 cat >conftest.$ac_ext <<_ACEOF
14694#line $LINENO "configure"
14695#include "confdefs.h"
14696#include <wchar.h>
14697
14698#ifdef F77_DUMMY_MAIN
14699# ifdef __cplusplus
14700 extern "C"
14701# endif
14702 int F77_DUMMY_MAIN() { return 1; }
14703#endif
14704int
14705main ()
14706{
14707static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14708test_array [0] = 0
14709
14710 ;
14711 return 0;
14712}
14713_ACEOF
14714rm -f conftest.$ac_objext
14715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14716 (eval $ac_compile) 2>&5
14717 ac_status=$?
14718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14719 (exit $ac_status); } &&
14720 { ac_try='test -s conftest.$ac_objext'
14721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14722 (eval $ac_try) 2>&5
14723 ac_status=$?
14724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14725 (exit $ac_status); }; }; then
14726 ac_hi=$ac_mid; break
14727else
14728 echo "$as_me: failed program was:" >&5
14729cat conftest.$ac_ext >&5
14730ac_lo=`expr $ac_mid + 1`
14731 if test $ac_lo -le $ac_mid; then
14732 ac_lo= ac_hi=
14733 break
14734 fi
14735 ac_mid=`expr 2 '*' $ac_mid + 1`
14736fi
14737rm -f conftest.$ac_objext conftest.$ac_ext
14738 done
14739else
14740 echo "$as_me: failed program was:" >&5
14741cat conftest.$ac_ext >&5
14742cat >conftest.$ac_ext <<_ACEOF
14743#line $LINENO "configure"
14744#include "confdefs.h"
14745#include <wchar.h>
14746
14747#ifdef F77_DUMMY_MAIN
14748# ifdef __cplusplus
14749 extern "C"
14750# endif
14751 int F77_DUMMY_MAIN() { return 1; }
14752#endif
14753int
14754main ()
14755{
14756static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14757test_array [0] = 0
14758
14759 ;
14760 return 0;
14761}
14762_ACEOF
14763rm -f conftest.$ac_objext
14764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14765 (eval $ac_compile) 2>&5
14766 ac_status=$?
14767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14768 (exit $ac_status); } &&
14769 { ac_try='test -s conftest.$ac_objext'
14770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14771 (eval $ac_try) 2>&5
14772 ac_status=$?
14773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14774 (exit $ac_status); }; }; then
14775 ac_hi=-1 ac_mid=-1
14776 while :; do
14777 cat >conftest.$ac_ext <<_ACEOF
14778#line $LINENO "configure"
14779#include "confdefs.h"
14780#include <wchar.h>
14781
14782#ifdef F77_DUMMY_MAIN
14783# ifdef __cplusplus
14784 extern "C"
14785# endif
14786 int F77_DUMMY_MAIN() { return 1; }
14787#endif
14788int
14789main ()
14790{
14791static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14792test_array [0] = 0
14793
14794 ;
14795 return 0;
14796}
14797_ACEOF
14798rm -f conftest.$ac_objext
14799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14800 (eval $ac_compile) 2>&5
14801 ac_status=$?
14802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14803 (exit $ac_status); } &&
14804 { ac_try='test -s conftest.$ac_objext'
14805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14806 (eval $ac_try) 2>&5
14807 ac_status=$?
14808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14809 (exit $ac_status); }; }; then
14810 ac_lo=$ac_mid; break
14811else
14812 echo "$as_me: failed program was:" >&5
14813cat conftest.$ac_ext >&5
14814ac_hi=`expr '(' $ac_mid ')' - 1`
14815 if test $ac_mid -le $ac_hi; then
14816 ac_lo= ac_hi=
14817 break
14818 fi
14819 ac_mid=`expr 2 '*' $ac_mid`
14820fi
14821rm -f conftest.$ac_objext conftest.$ac_ext
14822 done
14823else
14824 echo "$as_me: failed program was:" >&5
14825cat conftest.$ac_ext >&5
14826ac_lo= ac_hi=
14827fi
14828rm -f conftest.$ac_objext conftest.$ac_ext
14829fi
14830rm -f conftest.$ac_objext conftest.$ac_ext
14831# Binary search between lo and hi bounds.
14832while test "x$ac_lo" != "x$ac_hi"; do
14833 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14834 cat >conftest.$ac_ext <<_ACEOF
14835#line $LINENO "configure"
14836#include "confdefs.h"
14837#include <wchar.h>
14838
14839#ifdef F77_DUMMY_MAIN
14840# ifdef __cplusplus
14841 extern "C"
14842# endif
14843 int F77_DUMMY_MAIN() { return 1; }
14844#endif
14845int
14846main ()
14847{
14848static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14849test_array [0] = 0
14850
14851 ;
14852 return 0;
14853}
14854_ACEOF
14855rm -f conftest.$ac_objext
14856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14857 (eval $ac_compile) 2>&5
14858 ac_status=$?
14859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14860 (exit $ac_status); } &&
14861 { ac_try='test -s conftest.$ac_objext'
14862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14863 (eval $ac_try) 2>&5
14864 ac_status=$?
14865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14866 (exit $ac_status); }; }; then
14867 ac_hi=$ac_mid
14868else
14869 echo "$as_me: failed program was:" >&5
14870cat conftest.$ac_ext >&5
14871ac_lo=`expr '(' $ac_mid ')' + 1`
14872fi
14873rm -f conftest.$ac_objext conftest.$ac_ext
14874done
14875case $ac_lo in
14876?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14877'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14878echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14879 { (exit 1); exit 1; }; } ;;
14880esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014881else
14882 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014883 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14884echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14885 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014886else
Martin v. Löwis11437992002-04-12 09:54:03 +000014887 cat >conftest.$ac_ext <<_ACEOF
14888#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014889#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014890#include <wchar.h>
14891
14892long longval () { return (long) (sizeof (wchar_t)); }
14893unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014894#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014895#include <stdlib.h>
14896#ifdef F77_DUMMY_MAIN
14897# ifdef __cplusplus
14898 extern "C"
14899# endif
14900 int F77_DUMMY_MAIN() { return 1; }
14901#endif
14902int
14903main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014904{
Martin v. Löwis11437992002-04-12 09:54:03 +000014905
14906 FILE *f = fopen ("conftest.val", "w");
14907 if (! f)
14908 exit (1);
14909 if (((long) (sizeof (wchar_t))) < 0)
14910 {
14911 long i = longval ();
14912 if (i != ((long) (sizeof (wchar_t))))
14913 exit (1);
14914 fprintf (f, "%ld\n", i);
14915 }
14916 else
14917 {
14918 unsigned long i = ulongval ();
14919 if (i != ((long) (sizeof (wchar_t))))
14920 exit (1);
14921 fprintf (f, "%lu\n", i);
14922 }
14923 exit (ferror (f) || fclose (f) != 0);
14924
14925 ;
14926 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014927}
Martin v. Löwis11437992002-04-12 09:54:03 +000014928_ACEOF
14929rm -f conftest$ac_exeext
14930if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14931 (eval $ac_link) 2>&5
14932 ac_status=$?
14933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14934 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14936 (eval $ac_try) 2>&5
14937 ac_status=$?
14938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14939 (exit $ac_status); }; }; then
14940 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014941else
Martin v. Löwis11437992002-04-12 09:54:03 +000014942 echo "$as_me: program exited with status $ac_status" >&5
14943echo "$as_me: failed program was:" >&5
14944cat conftest.$ac_ext >&5
14945( exit $ac_status )
14946{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14947echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14948 { (exit 1); exit 1; }; }
14949fi
14950rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14951fi
14952fi
14953rm -f conftest.val
14954else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014955 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000014956fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014957fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014958echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
14959echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
14960cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014961#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014962_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014963
Michael W. Hudson54241132001-12-07 15:38:26 +000014964
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014965fi
14966
Martin v. Löwis11437992002-04-12 09:54:03 +000014967echo "$as_me:$LINENO: checking what type to use for unicode" >&5
14968echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014969# Check whether --enable-unicode or --disable-unicode was given.
14970if test "${enable_unicode+set}" = set; then
14971 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000014972
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014973else
14974 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014975fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014976
14977if test $enable_unicode = yes
14978then
Martin v. Löwisfd917792001-06-27 20:22:04 +000014979 # Without any arguments, Py_UNICODE defaults to two-byte mode
14980 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014981fi
14982
Martin v. Löwis0036cba2002-04-12 09:58:45 +000014983
14984
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014985case "$enable_unicode" in
14986ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014988#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000014989_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014990
14991 ;;
14992ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000014993 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014994#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000014995_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014996
14997 ;;
14998esac
14999
Michael W. Hudson54241132001-12-07 15:38:26 +000015000
Martin v. Löwis11437992002-04-12 09:54:03 +000015001
15002
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015003
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015004if test "$enable_unicode" = "no"
15005then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015006 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 echo "$as_me:$LINENO: result: not used" >&5
15008echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015009else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015010 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015011
15012cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015013#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015014_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015015
15016 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15017 then
15018 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015019
Martin v. Löwis11437992002-04-12 09:54:03 +000015020cat >>confdefs.h <<\_ACEOF
15021#define HAVE_USABLE_WCHAR_T 1
15022_ACEOF
15023
15024 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015025#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015026_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015027
15028 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15029 then
15030 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015031 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015032#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015033_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015034
15035 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15036 then
15037 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015039#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015040_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015041
15042 else
15043 PY_UNICODE_TYPE="no type found"
15044 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15046echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015047fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015048
15049# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015050echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15051echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15052if test "${ac_cv_c_bigendian+set}" = set; then
15053 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015054else
Martin v. Löwis11437992002-04-12 09:54:03 +000015055 # See if sys/param.h defines the BYTE_ORDER macro.
15056cat >conftest.$ac_ext <<_ACEOF
15057#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015058#include "confdefs.h"
15059#include <sys/types.h>
15060#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015061
Martin v. Löwis11437992002-04-12 09:54:03 +000015062#ifdef F77_DUMMY_MAIN
15063# ifdef __cplusplus
15064 extern "C"
15065# endif
15066 int F77_DUMMY_MAIN() { return 1; }
15067#endif
15068int
15069main ()
15070{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015071#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15072 bogus endian macros
15073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015074
15075 ;
15076 return 0;
15077}
15078_ACEOF
15079rm -f conftest.$ac_objext
15080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15081 (eval $ac_compile) 2>&5
15082 ac_status=$?
15083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15084 (exit $ac_status); } &&
15085 { ac_try='test -s conftest.$ac_objext'
15086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15087 (eval $ac_try) 2>&5
15088 ac_status=$?
15089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15090 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015091 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015092cat >conftest.$ac_ext <<_ACEOF
15093#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015094#include "confdefs.h"
15095#include <sys/types.h>
15096#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015097
Martin v. Löwis11437992002-04-12 09:54:03 +000015098#ifdef F77_DUMMY_MAIN
15099# ifdef __cplusplus
15100 extern "C"
15101# endif
15102 int F77_DUMMY_MAIN() { return 1; }
15103#endif
15104int
15105main ()
15106{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015107#if BYTE_ORDER != BIG_ENDIAN
15108 not big endian
15109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015110
15111 ;
15112 return 0;
15113}
15114_ACEOF
15115rm -f conftest.$ac_objext
15116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15117 (eval $ac_compile) 2>&5
15118 ac_status=$?
15119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120 (exit $ac_status); } &&
15121 { ac_try='test -s conftest.$ac_objext'
15122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15123 (eval $ac_try) 2>&5
15124 ac_status=$?
15125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15126 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015127 ac_cv_c_bigendian=yes
15128else
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 echo "$as_me: failed program was:" >&5
15130cat conftest.$ac_ext >&5
15131ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015132fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015133rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015134else
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 echo "$as_me: failed program was:" >&5
15136cat conftest.$ac_ext >&5
15137# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015138if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015139 # try to guess the endianess by grep'ing values into an object file
15140 ac_cv_c_bigendian=unknown
15141 cat >conftest.$ac_ext <<_ACEOF
15142#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015143#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015144short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15145short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15146void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15147short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15148short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15149void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15150#ifdef F77_DUMMY_MAIN
15151# ifdef __cplusplus
15152 extern "C"
15153# endif
15154 int F77_DUMMY_MAIN() { return 1; }
15155#endif
15156int
15157main ()
15158{
15159 _ascii (); _ebcdic ();
15160 ;
15161 return 0;
15162}
15163_ACEOF
15164rm -f conftest.$ac_objext
15165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15166 (eval $ac_compile) 2>&5
15167 ac_status=$?
15168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15169 (exit $ac_status); } &&
15170 { ac_try='test -s conftest.$ac_objext'
15171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15172 (eval $ac_try) 2>&5
15173 ac_status=$?
15174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15175 (exit $ac_status); }; }; then
15176 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15177 ac_cv_c_bigendian=yes
15178fi
15179if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15180 if test "$ac_cv_c_bigendian" = unknown; then
15181 ac_cv_c_bigendian=no
15182 else
15183 # finding both strings is unlikely to happen, but who knows?
15184 ac_cv_c_bigendian=unknown
15185 fi
15186fi
15187else
15188 echo "$as_me: failed program was:" >&5
15189cat conftest.$ac_ext >&5
15190fi
15191rm -f conftest.$ac_objext conftest.$ac_ext
15192else
15193 cat >conftest.$ac_ext <<_ACEOF
15194#line $LINENO "configure"
15195#include "confdefs.h"
15196int
15197main ()
15198{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015199 /* Are we little or big endian? From Harbison&Steele. */
15200 union
15201 {
15202 long l;
15203 char c[sizeof (long)];
15204 } u;
15205 u.l = 1;
15206 exit (u.c[sizeof (long) - 1] == 1);
15207}
Martin v. Löwis11437992002-04-12 09:54:03 +000015208_ACEOF
15209rm -f conftest$ac_exeext
15210if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15211 (eval $ac_link) 2>&5
15212 ac_status=$?
15213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15214 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15216 (eval $ac_try) 2>&5
15217 ac_status=$?
15218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15219 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015220 ac_cv_c_bigendian=no
15221else
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 echo "$as_me: program exited with status $ac_status" >&5
15223echo "$as_me: failed program was:" >&5
15224cat conftest.$ac_ext >&5
15225( exit $ac_status )
15226ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015227fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015228rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015229fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015230fi
15231rm -f conftest.$ac_objext conftest.$ac_ext
15232fi
15233echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15234echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15235case $ac_cv_c_bigendian in
15236 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015237
Martin v. Löwis11437992002-04-12 09:54:03 +000015238cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015239#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015240_ACEOF
15241 ;;
15242 no)
15243 ;;
15244 *)
15245 { { echo "$as_me:$LINENO: error: unknown endianess
15246presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15247echo "$as_me: error: unknown endianess
15248presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15249 { (exit 1); exit 1; }; } ;;
15250esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015251
Michael W. Hudson54241132001-12-07 15:38:26 +000015252
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015253# Check whether right shifting a negative integer extends the sign bit
15254# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015255echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15256echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15257if test "${ac_cv_rshift_extends_sign+set}" = set; then
15258 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015259else
Martin v. Löwis11437992002-04-12 09:54:03 +000015260
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015261if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015262 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015263else
Martin v. Löwis11437992002-04-12 09:54:03 +000015264 cat >conftest.$ac_ext <<_ACEOF
15265#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015266#include "confdefs.h"
15267
15268int main()
15269{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015270 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015271}
15272
Martin v. Löwis11437992002-04-12 09:54:03 +000015273_ACEOF
15274rm -f conftest$ac_exeext
15275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15276 (eval $ac_link) 2>&5
15277 ac_status=$?
15278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15279 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15281 (eval $ac_try) 2>&5
15282 ac_status=$?
15283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15284 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015285 ac_cv_rshift_extends_sign=yes
15286else
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 echo "$as_me: program exited with status $ac_status" >&5
15288echo "$as_me: failed program was:" >&5
15289cat conftest.$ac_ext >&5
15290( exit $ac_status )
15291ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015293rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15294fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015295fi
15296
Martin v. Löwis11437992002-04-12 09:54:03 +000015297echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15298echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015299if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015300then
Martin v. Löwis11437992002-04-12 09:54:03 +000015301
15302cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015303#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015304_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015305
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015306fi
15307
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015308# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015309echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15310echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15311if test "${ac_cv_have_getc_unlocked+set}" = set; then
15312 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015313else
Martin v. Löwis11437992002-04-12 09:54:03 +000015314
15315cat >conftest.$ac_ext <<_ACEOF
15316#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015317#include "confdefs.h"
15318#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015319#ifdef F77_DUMMY_MAIN
15320# ifdef __cplusplus
15321 extern "C"
15322# endif
15323 int F77_DUMMY_MAIN() { return 1; }
15324#endif
15325int
15326main ()
15327{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015328
15329 FILE *f = fopen("/dev/null", "r");
15330 flockfile(f);
15331 getc_unlocked(f);
15332 funlockfile(f);
15333
Martin v. Löwis11437992002-04-12 09:54:03 +000015334 ;
15335 return 0;
15336}
15337_ACEOF
15338rm -f conftest.$ac_objext conftest$ac_exeext
15339if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15340 (eval $ac_link) 2>&5
15341 ac_status=$?
15342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15343 (exit $ac_status); } &&
15344 { ac_try='test -s conftest$ac_exeext'
15345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15346 (eval $ac_try) 2>&5
15347 ac_status=$?
15348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15349 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015350 ac_cv_have_getc_unlocked=yes
15351else
Martin v. Löwis11437992002-04-12 09:54:03 +000015352 echo "$as_me: failed program was:" >&5
15353cat conftest.$ac_ext >&5
15354ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015355fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015356rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015357fi
15358
Martin v. Löwis11437992002-04-12 09:54:03 +000015359echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15360echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015361if test "$ac_cv_have_getc_unlocked" = yes
15362then
Martin v. Löwis11437992002-04-12 09:54:03 +000015363
15364cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015365#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015366_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015367
15368fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015369
Martin v. Löwis0daad592001-09-30 21:09:59 +000015370# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015371echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15372echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15373if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15374 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015375else
Martin v. Löwis11437992002-04-12 09:54:03 +000015376 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015377LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015378cat >conftest.$ac_ext <<_ACEOF
15379#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015380#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015381
Guido van Rossum353ae582001-07-10 16:45:32 +000015382/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015383#ifdef __cplusplus
15384extern "C"
15385#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015386/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015387 builtin and then its argument prototype would still apply. */
15388char rl_pre_input_hook ();
15389#ifdef F77_DUMMY_MAIN
15390# ifdef __cplusplus
15391 extern "C"
15392# endif
15393 int F77_DUMMY_MAIN() { return 1; }
15394#endif
15395int
15396main ()
15397{
15398rl_pre_input_hook ();
15399 ;
15400 return 0;
15401}
15402_ACEOF
15403rm -f conftest.$ac_objext conftest$ac_exeext
15404if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15405 (eval $ac_link) 2>&5
15406 ac_status=$?
15407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15408 (exit $ac_status); } &&
15409 { ac_try='test -s conftest$ac_exeext'
15410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15411 (eval $ac_try) 2>&5
15412 ac_status=$?
15413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15414 (exit $ac_status); }; }; then
15415 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015416else
Martin v. Löwis11437992002-04-12 09:54:03 +000015417 echo "$as_me: failed program was:" >&5
15418cat conftest.$ac_ext >&5
15419ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015420fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015421rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15422LIBS=$ac_check_lib_save_LIBS
15423fi
15424echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15425echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15426if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015427
Martin v. Löwis11437992002-04-12 09:54:03 +000015428cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015429#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015430_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015431
Martin v. Löwis0daad592001-09-30 21:09:59 +000015432fi
15433
Michael W. Hudson54241132001-12-07 15:38:26 +000015434
Martin v. Löwis0daad592001-09-30 21:09:59 +000015435# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015436echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15437echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15438if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15439 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015440else
Martin v. Löwis11437992002-04-12 09:54:03 +000015441 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015442LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015443cat >conftest.$ac_ext <<_ACEOF
15444#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015445#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015446
Martin v. Löwis0daad592001-09-30 21:09:59 +000015447/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015448#ifdef __cplusplus
15449extern "C"
15450#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015451/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015452 builtin and then its argument prototype would still apply. */
15453char rl_completion_matches ();
15454#ifdef F77_DUMMY_MAIN
15455# ifdef __cplusplus
15456 extern "C"
15457# endif
15458 int F77_DUMMY_MAIN() { return 1; }
15459#endif
15460int
15461main ()
15462{
15463rl_completion_matches ();
15464 ;
15465 return 0;
15466}
15467_ACEOF
15468rm -f conftest.$ac_objext conftest$ac_exeext
15469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15470 (eval $ac_link) 2>&5
15471 ac_status=$?
15472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15473 (exit $ac_status); } &&
15474 { ac_try='test -s conftest$ac_exeext'
15475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15476 (eval $ac_try) 2>&5
15477 ac_status=$?
15478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15479 (exit $ac_status); }; }; then
15480 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015481else
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 echo "$as_me: failed program was:" >&5
15483cat conftest.$ac_ext >&5
15484ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015486rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15487LIBS=$ac_check_lib_save_LIBS
15488fi
15489echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15490echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15491if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015492
Martin v. Löwis11437992002-04-12 09:54:03 +000015493cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015494#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015495_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015496
Guido van Rossum353ae582001-07-10 16:45:32 +000015497fi
15498
Jack Jansendd19cf82001-12-06 22:36:17 +000015499
Martin v. Löwis11437992002-04-12 09:54:03 +000015500echo "$as_me:$LINENO: checking for broken nice()" >&5
15501echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15502if test "${ac_cv_broken_nice+set}" = set; then
15503 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015504else
Martin v. Löwis11437992002-04-12 09:54:03 +000015505
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015506if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015507 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015508else
Martin v. Löwis11437992002-04-12 09:54:03 +000015509 cat >conftest.$ac_ext <<_ACEOF
15510#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015511#include "confdefs.h"
15512
15513int main()
15514{
15515 int val1 = nice(1);
15516 if (val1 != -1 && val1 == nice(2))
15517 exit(0);
15518 exit(1);
15519}
15520
Martin v. Löwis11437992002-04-12 09:54:03 +000015521_ACEOF
15522rm -f conftest$ac_exeext
15523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15524 (eval $ac_link) 2>&5
15525 ac_status=$?
15526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15529 (eval $ac_try) 2>&5
15530 ac_status=$?
15531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15532 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015533 ac_cv_broken_nice=yes
15534else
Martin v. Löwis11437992002-04-12 09:54:03 +000015535 echo "$as_me: program exited with status $ac_status" >&5
15536echo "$as_me: failed program was:" >&5
15537cat conftest.$ac_ext >&5
15538( exit $ac_status )
15539ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015540fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015541rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15542fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015543fi
15544
Martin v. Löwis11437992002-04-12 09:54:03 +000015545echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15546echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015547if test "$ac_cv_broken_nice" = yes
15548then
Martin v. Löwis11437992002-04-12 09:54:03 +000015549
15550cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015551#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015552_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015553
15554fi
15555
Jack Jansen666b1e72001-10-31 12:11:48 +000015556# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015557echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15558echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15559if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15560 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015561else
Martin v. Löwis11437992002-04-12 09:54:03 +000015562 cat >conftest.$ac_ext <<_ACEOF
15563#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015564#include "confdefs.h"
15565#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015566#ifdef F77_DUMMY_MAIN
15567# ifdef __cplusplus
15568 extern "C"
15569# endif
15570 int F77_DUMMY_MAIN() { return 1; }
15571#endif
15572int
15573main ()
15574{
Jack Jansen666b1e72001-10-31 12:11:48 +000015575
15576 int rtn;
15577 rtn = mvwdelch(0,0,0);
15578
Martin v. Löwis11437992002-04-12 09:54:03 +000015579 ;
15580 return 0;
15581}
15582_ACEOF
15583rm -f conftest.$ac_objext
15584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15585 (eval $ac_compile) 2>&5
15586 ac_status=$?
15587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15588 (exit $ac_status); } &&
15589 { ac_try='test -s conftest.$ac_objext'
15590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15591 (eval $ac_try) 2>&5
15592 ac_status=$?
15593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15594 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015595 ac_cv_mvwdelch_is_expression=yes
15596else
Martin v. Löwis11437992002-04-12 09:54:03 +000015597 echo "$as_me: failed program was:" >&5
15598cat conftest.$ac_ext >&5
15599ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015600fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015601rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015602fi
15603
Martin v. Löwis11437992002-04-12 09:54:03 +000015604echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15605echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015606
15607if test "$ac_cv_mvwdelch_is_expression" = yes
15608then
Martin v. Löwis11437992002-04-12 09:54:03 +000015609
15610cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015611#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015612_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015613
15614fi
15615
Martin v. Löwis11437992002-04-12 09:54:03 +000015616echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15617echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15618if test "${ac_cv_window_has_flags+set}" = set; then
15619 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015620else
Martin v. Löwis11437992002-04-12 09:54:03 +000015621 cat >conftest.$ac_ext <<_ACEOF
15622#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015623#include "confdefs.h"
15624#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015625#ifdef F77_DUMMY_MAIN
15626# ifdef __cplusplus
15627 extern "C"
15628# endif
15629 int F77_DUMMY_MAIN() { return 1; }
15630#endif
15631int
15632main ()
15633{
Jack Jansen666b1e72001-10-31 12:11:48 +000015634
15635 WINDOW *w;
15636 w->_flags = 0;
15637
Martin v. Löwis11437992002-04-12 09:54:03 +000015638 ;
15639 return 0;
15640}
15641_ACEOF
15642rm -f conftest.$ac_objext
15643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15644 (eval $ac_compile) 2>&5
15645 ac_status=$?
15646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15647 (exit $ac_status); } &&
15648 { ac_try='test -s conftest.$ac_objext'
15649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15650 (eval $ac_try) 2>&5
15651 ac_status=$?
15652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15653 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015654 ac_cv_window_has_flags=yes
15655else
Martin v. Löwis11437992002-04-12 09:54:03 +000015656 echo "$as_me: failed program was:" >&5
15657cat conftest.$ac_ext >&5
15658ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015660rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015661fi
15662
Martin v. Löwis11437992002-04-12 09:54:03 +000015663echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15664echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015665
Jack Jansen666b1e72001-10-31 12:11:48 +000015666
15667if test "$ac_cv_window_has_flags" = yes
15668then
Martin v. Löwis11437992002-04-12 09:54:03 +000015669
15670cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015671#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015672_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015673
15674fi
15675
Guido van Rossum95713eb2000-05-18 20:53:31 +000015676# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15677# Add sys/socket.h to confdefs.h
15678cat >> confdefs.h <<\EOF
15679#ifdef HAVE_SYS_SOCKET_H
15680#include <sys/socket.h>
15681#endif
15682EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015683echo "$as_me:$LINENO: checking for socklen_t" >&5
15684echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15685if test "${ac_cv_type_socklen_t+set}" = set; then
15686 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015687else
Martin v. Löwis11437992002-04-12 09:54:03 +000015688 cat >conftest.$ac_ext <<_ACEOF
15689#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015690#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015691$ac_includes_default
15692#ifdef F77_DUMMY_MAIN
15693# ifdef __cplusplus
15694 extern "C"
15695# endif
15696 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015697#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015698int
15699main ()
15700{
15701if ((socklen_t *) 0)
15702 return 0;
15703if (sizeof (socklen_t))
15704 return 0;
15705 ;
15706 return 0;
15707}
15708_ACEOF
15709rm -f conftest.$ac_objext
15710if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15711 (eval $ac_compile) 2>&5
15712 ac_status=$?
15713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15714 (exit $ac_status); } &&
15715 { ac_try='test -s conftest.$ac_objext'
15716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15717 (eval $ac_try) 2>&5
15718 ac_status=$?
15719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15720 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015721 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015722else
Martin v. Löwis11437992002-04-12 09:54:03 +000015723 echo "$as_me: failed program was:" >&5
15724cat conftest.$ac_ext >&5
15725ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015726fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015727rm -f conftest.$ac_objext conftest.$ac_ext
15728fi
15729echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15730echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15731if test $ac_cv_type_socklen_t = yes; then
15732 :
15733else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015734
Martin v. Löwis11437992002-04-12 09:54:03 +000015735cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015736#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015737_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015738
15739fi
15740
Michael W. Hudson54241132001-12-07 15:38:26 +000015741
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015742#AC_MSG_CHECKING(for Modules/Setup)
15743#if test ! -f Modules/Setup ; then
15744# if test ! -d Modules ; then
15745# mkdir Modules
15746# fi
15747# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15748# AC_MSG_RESULT(creating)
15749#else
15750# AC_MSG_RESULT(already exists)
15751#fi
15752
Michael W. Hudson54241132001-12-07 15:38:26 +000015753
15754
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015755for h in `(cd $srcdir;echo Python/thread_*.h)`
15756do
15757 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15758done
15759
Michael W. Hudson54241132001-12-07 15:38:26 +000015760
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +000015761SRCDIRS="Parser Grammar Objects Python Modules"
Martin v. Löwis11437992002-04-12 09:54:03 +000015762echo "$as_me:$LINENO: checking for build directories" >&5
15763echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015764for dir in $SRCDIRS; do
15765 if test ! -d $dir; then
15766 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015767 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015768done
Martin v. Löwis11437992002-04-12 09:54:03 +000015769echo "$as_me:$LINENO: result: done" >&5
15770echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015771
Guido van Rossum627b2d71993-12-24 10:39:16 +000015772# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015773ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15774cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015775# This file is a shell script that caches the results of configure
15776# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015777# scripts and configure runs, see configure's option --config-cache.
15778# It is not useful on other systems. If it contains results you don't
15779# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015780#
Martin v. Löwis11437992002-04-12 09:54:03 +000015781# config.status only pays attention to the cache file if you give it
15782# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015783#
Martin v. Löwis11437992002-04-12 09:54:03 +000015784# `ac_cv_env_foo' variables (set or unset) will be overriden when
15785# loading this file, other *unset* `ac_cv_foo' will be assigned the
15786# following values.
15787
15788_ACEOF
15789
Guido van Rossumf78abae1997-01-21 22:02:36 +000015790# The following way of writing the cache mishandles newlines in values,
15791# but we know of no workaround that is simple, portable, and efficient.
15792# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015793# Ultrix sh set writes to stderr and can't be redirected directly,
15794# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015795{
15796 (set) 2>&1 |
15797 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15798 *ac_space=\ *)
15799 # `set' does not quote correctly, so add quotes (double-quote
15800 # substitution turns \\\\ into \\, and sed turns \\ into \).
15801 sed -n \
15802 "s/'/'\\\\''/g;
15803 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15804 ;;
15805 *)
15806 # `set' quotes correctly as required by POSIX, so do not add quotes.
15807 sed -n \
15808 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15809 ;;
15810 esac;
15811} |
15812 sed '
15813 t clear
15814 : clear
15815 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15816 t end
15817 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15818 : end' >>confcache
15819if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015820 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015821 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15822 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015823 else
15824 echo "not updating unwritable cache $cache_file"
15825 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015826fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015827rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015828
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015829test "x$prefix" = xNONE && prefix=$ac_default_prefix
15830# Let make expand exec_prefix.
15831test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015832
Martin v. Löwis11437992002-04-12 09:54:03 +000015833# VPATH may cause trouble with some makes, so we remove $(srcdir),
15834# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15835# trailing colons and then remove the whole line if VPATH becomes empty
15836# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015837if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015838 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15839s/:*\$(srcdir):*/:/;
15840s/:*\${srcdir}:*/:/;
15841s/:*@srcdir@:*/:/;
15842s/^\([^=]*=[ ]*\):*/\1/;
15843s/:*$//;
15844s/^[^=]*=[ ]*$//;
15845}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015846fi
15847
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015848DEFS=-DHAVE_CONFIG_H
15849
Martin v. Löwis11437992002-04-12 09:54:03 +000015850
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015851: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015852ac_clean_files_save=$ac_clean_files
15853ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15854{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15855echo "$as_me: creating $CONFIG_STATUS" >&6;}
15856cat >$CONFIG_STATUS <<_ACEOF
15857#! $SHELL
15858# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015859# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015860# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015861# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015862
Martin v. Löwis11437992002-04-12 09:54:03 +000015863debug=false
15864SHELL=\${CONFIG_SHELL-$SHELL}
15865_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015866
Martin v. Löwis11437992002-04-12 09:54:03 +000015867cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015868
Martin v. Löwis11437992002-04-12 09:54:03 +000015869## --------------------- ##
15870## M4sh Initialization. ##
15871## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015872
Martin v. Löwis11437992002-04-12 09:54:03 +000015873# Be Bourne compatible
15874if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15875 emulate sh
15876 NULLCMD=:
15877elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15878 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015879fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015880
Martin v. Löwis11437992002-04-12 09:54:03 +000015881# NLS nuisances.
15882# Support unset when possible.
15883if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15884 as_unset=unset
15885else
15886 as_unset=false
15887fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015888
Martin v. Löwis11437992002-04-12 09:54:03 +000015889(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15890 { $as_unset LANG || test "${LANG+set}" != set; } ||
15891 { LANG=C; export LANG; }
15892(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15893 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15894 { LC_ALL=C; export LC_ALL; }
15895(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15896 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15897 { LC_TIME=C; export LC_TIME; }
15898(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15899 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15900 { LC_CTYPE=C; export LC_CTYPE; }
15901(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15902 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15903 { LANGUAGE=C; export LANGUAGE; }
15904(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15905 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15906 { LC_COLLATE=C; export LC_COLLATE; }
15907(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15908 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15909 { LC_NUMERIC=C; export LC_NUMERIC; }
15910(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15911 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15912 { LC_MESSAGES=C; export LC_MESSAGES; }
15913
15914
15915# Name of the executable.
15916as_me=`(basename "$0") 2>/dev/null ||
15917$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15918 X"$0" : 'X\(//\)$' \| \
15919 X"$0" : 'X\(/\)$' \| \
15920 . : '\(.\)' 2>/dev/null ||
15921echo X/"$0" |
15922 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15923 /^X\/\(\/\/\)$/{ s//\1/; q; }
15924 /^X\/\(\/\).*/{ s//\1/; q; }
15925 s/.*/./; q'`
15926
15927# PATH needs CR, and LINENO needs CR and PATH.
15928# Avoid depending upon Character Ranges.
15929as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15930as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15931as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15932as_cr_digits='0123456789'
15933as_cr_alnum=$as_cr_Letters$as_cr_digits
15934
15935# The user is always right.
15936if test "${PATH_SEPARATOR+set}" != set; then
15937 echo "#! /bin/sh" >conftest.sh
15938 echo "exit 0" >>conftest.sh
15939 chmod +x conftest.sh
15940 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15941 PATH_SEPARATOR=';'
15942 else
15943 PATH_SEPARATOR=:
15944 fi
15945 rm -f conftest.sh
15946fi
15947
15948
15949 as_lineno_1=$LINENO
15950 as_lineno_2=$LINENO
15951 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15952 test "x$as_lineno_1" != "x$as_lineno_2" &&
15953 test "x$as_lineno_3" = "x$as_lineno_2" || {
15954 # Find who we are. Look in the path if we contain no path at all
15955 # relative or not.
15956 case $0 in
15957 *[\\/]* ) as_myself=$0 ;;
15958 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15959for as_dir in $PATH
15960do
15961 IFS=$as_save_IFS
15962 test -z "$as_dir" && as_dir=.
15963 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15964done
15965
15966 ;;
15967 esac
15968 # We did not find ourselves, most probably we were run as `sh COMMAND'
15969 # in which case we are not to be found in the path.
15970 if test "x$as_myself" = x; then
15971 as_myself=$0
15972 fi
15973 if test ! -f "$as_myself"; then
15974 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15975echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15976 { (exit 1); exit 1; }; }
15977 fi
15978 case $CONFIG_SHELL in
15979 '')
15980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15981for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15982do
15983 IFS=$as_save_IFS
15984 test -z "$as_dir" && as_dir=.
15985 for as_base in sh bash ksh sh5; do
15986 case $as_dir in
15987 /*)
15988 if ("$as_dir/$as_base" -c '
15989 as_lineno_1=$LINENO
15990 as_lineno_2=$LINENO
15991 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15992 test "x$as_lineno_1" != "x$as_lineno_2" &&
15993 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
15994 CONFIG_SHELL=$as_dir/$as_base
15995 export CONFIG_SHELL
15996 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15997 fi;;
15998 esac
15999 done
16000done
16001;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016002 esac
16003
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16005 # uniformly replaced by the line number. The first 'sed' inserts a
16006 # line-number line before each line; the second 'sed' does the real
16007 # work. The second script uses 'N' to pair each line-number line
16008 # with the numbered line, and appends trailing '-' during
16009 # substitution so that $LINENO is not a special case at line end.
16010 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16011 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16012 sed '=' <$as_myself |
16013 sed '
16014 N
16015 s,$,-,
16016 : loop
16017 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16018 t loop
16019 s,-$,,
16020 s,^['$as_cr_digits']*\n,,
16021 ' >$as_me.lineno &&
16022 chmod +x $as_me.lineno ||
16023 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16024echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16025 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016026
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 # Don't try to exec as it changes $[0], causing all sort of problems
16028 # (the dirname of $[0] is not the place where we might find the
16029 # original and so on. Autoconf is especially sensible to this).
16030 . ./$as_me.lineno
16031 # Exit status is that of the last command.
16032 exit
16033}
16034
16035
16036case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16037 *c*,-n*) ECHO_N= ECHO_C='
16038' ECHO_T=' ' ;;
16039 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16040 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16041esac
16042
16043if expr a : '\(a\)' >/dev/null 2>&1; then
16044 as_expr=expr
16045else
16046 as_expr=false
16047fi
16048
16049rm -f conf$$ conf$$.exe conf$$.file
16050echo >conf$$.file
16051if ln -s conf$$.file conf$$ 2>/dev/null; then
16052 # We could just check for DJGPP; but this test a) works b) is more generic
16053 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16054 if test -f conf$$.exe; then
16055 # Don't use ln at all; we don't have any links
16056 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016057 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 as_ln_s='ln -s'
16059 fi
16060elif ln conf$$.file conf$$ 2>/dev/null; then
16061 as_ln_s=ln
16062else
16063 as_ln_s='cp -p'
16064fi
16065rm -f conf$$ conf$$.exe conf$$.file
16066
16067as_executable_p="test -f"
16068
16069# Sed expression to map a string onto a valid CPP name.
16070as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16071
16072# Sed expression to map a string onto a valid variable name.
16073as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16074
16075
16076# IFS
16077# We need space, tab and new line, in precisely that order.
16078as_nl='
16079'
16080IFS=" $as_nl"
16081
16082# CDPATH.
16083$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16084
16085exec 6>&1
16086
16087# Open the log real soon, to keep \$[0] and so on meaningful, and to
16088# report actual input values of CONFIG_FILES etc. instead of their
16089# values after options handling. Logging --version etc. is OK.
16090exec 5>>config.log
16091{
16092 echo
16093 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16094## Running $as_me. ##
16095_ASBOX
16096} >&5
16097cat >&5 <<_CSEOF
16098
16099This file was extended by $as_me, which was
16100generated by GNU Autoconf 2.53. Invocation command line was
16101
16102 CONFIG_FILES = $CONFIG_FILES
16103 CONFIG_HEADERS = $CONFIG_HEADERS
16104 CONFIG_LINKS = $CONFIG_LINKS
16105 CONFIG_COMMANDS = $CONFIG_COMMANDS
16106 $ $0 $@
16107
16108_CSEOF
16109echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16110echo >&5
16111_ACEOF
16112
16113# Files that config.status was made for.
16114if test -n "$ac_config_files"; then
16115 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16116fi
16117
16118if test -n "$ac_config_headers"; then
16119 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16120fi
16121
16122if test -n "$ac_config_links"; then
16123 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16124fi
16125
16126if test -n "$ac_config_commands"; then
16127 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16128fi
16129
16130cat >>$CONFIG_STATUS <<\_ACEOF
16131
16132ac_cs_usage="\
16133\`$as_me' instantiates files from templates according to the
16134current configuration.
16135
16136Usage: $0 [OPTIONS] [FILE]...
16137
16138 -h, --help print this help, then exit
16139 -V, --version print version number, then exit
16140 -d, --debug don't remove temporary files
16141 --recheck update $as_me by reconfiguring in the same conditions
16142 --file=FILE[:TEMPLATE]
16143 instantiate the configuration file FILE
16144 --header=FILE[:TEMPLATE]
16145 instantiate the configuration header FILE
16146
16147Configuration files:
16148$config_files
16149
16150Configuration headers:
16151$config_headers
16152
16153Report bugs to <bug-autoconf@gnu.org>."
16154_ACEOF
16155
16156cat >>$CONFIG_STATUS <<_ACEOF
16157ac_cs_version="\\
16158config.status
16159configured by $0, generated by GNU Autoconf 2.53,
16160 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16161
16162Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16163Free Software Foundation, Inc.
16164This config.status script is free software; the Free Software Foundation
16165gives unlimited permission to copy, distribute and modify it."
16166srcdir=$srcdir
16167INSTALL="$INSTALL"
16168_ACEOF
16169
16170cat >>$CONFIG_STATUS <<\_ACEOF
16171# If no file are specified by the user, then we need to provide default
16172# value. By we need to know if files were specified by the user.
16173ac_need_defaults=:
16174while test $# != 0
16175do
16176 case $1 in
16177 --*=*)
16178 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16179 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16180 shift
16181 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16182 shift
16183 ;;
16184 -*);;
16185 *) # This is not an option, so the user has probably given explicit
16186 # arguments.
16187 ac_need_defaults=false;;
16188 esac
16189
16190 case $1 in
16191 # Handling of the options.
16192_ACEOF
16193cat >>$CONFIG_STATUS <<_ACEOF
16194 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16195 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16196 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16197_ACEOF
16198cat >>$CONFIG_STATUS <<\_ACEOF
16199 --version | --vers* | -V )
16200 echo "$ac_cs_version"; exit 0 ;;
16201 --he | --h)
16202 # Conflict between --help and --header
16203 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16204Try \`$0 --help' for more information." >&5
16205echo "$as_me: error: ambiguous option: $1
16206Try \`$0 --help' for more information." >&2;}
16207 { (exit 1); exit 1; }; };;
16208 --help | --hel | -h )
16209 echo "$ac_cs_usage"; exit 0 ;;
16210 --debug | --d* | -d )
16211 debug=: ;;
16212 --file | --fil | --fi | --f )
16213 shift
16214 CONFIG_FILES="$CONFIG_FILES $1"
16215 ac_need_defaults=false;;
16216 --header | --heade | --head | --hea )
16217 shift
16218 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16219 ac_need_defaults=false;;
16220
16221 # This is an error.
16222 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16223Try \`$0 --help' for more information." >&5
16224echo "$as_me: error: unrecognized option: $1
16225Try \`$0 --help' for more information." >&2;}
16226 { (exit 1); exit 1; }; } ;;
16227
16228 *) ac_config_targets="$ac_config_targets $1" ;;
16229
16230 esac
16231 shift
16232done
16233
16234_ACEOF
16235
16236
16237
16238
16239
16240cat >>$CONFIG_STATUS <<\_ACEOF
16241for ac_config_target in $ac_config_targets
16242do
16243 case "$ac_config_target" in
16244 # Handling of arguments.
16245 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16246 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16247 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16248 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16249echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16250 { (exit 1); exit 1; }; };;
16251 esac
16252done
16253
16254# If the user did not use the arguments to specify the items to instantiate,
16255# then the envvar interface is used. Set only those that are not.
16256# We use the long form for the default assignment because of an extremely
16257# bizarre bug on SunOS 4.1.3.
16258if $ac_need_defaults; then
16259 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16260 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16261fi
16262
16263# Create a temporary directory, and hook for its removal unless debugging.
16264$debug ||
16265{
16266 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16267 trap '{ (exit 1); exit 1; }' 1 2 13 15
16268}
16269
16270# Create a (secure) tmp directory for tmp files.
16271: ${TMPDIR=/tmp}
16272{
16273 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16274 test -n "$tmp" && test -d "$tmp"
16275} ||
16276{
16277 tmp=$TMPDIR/cs$$-$RANDOM
16278 (umask 077 && mkdir $tmp)
16279} ||
16280{
16281 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16282 { (exit 1); exit 1; }
16283}
16284
16285_ACEOF
16286
16287cat >>$CONFIG_STATUS <<_ACEOF
16288
16289#
16290# CONFIG_FILES section.
16291#
16292
16293# No need to generate the scripts if there are no CONFIG_FILES.
16294# This happens for instance when ./config.status config.h
16295if test -n "\$CONFIG_FILES"; then
16296 # Protect against being on the right side of a sed subst in config.status.
16297 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16298 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16299s,@SHELL@,$SHELL,;t t
16300s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16301s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16302s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16303s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16304s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16305s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16306s,@exec_prefix@,$exec_prefix,;t t
16307s,@prefix@,$prefix,;t t
16308s,@program_transform_name@,$program_transform_name,;t t
16309s,@bindir@,$bindir,;t t
16310s,@sbindir@,$sbindir,;t t
16311s,@libexecdir@,$libexecdir,;t t
16312s,@datadir@,$datadir,;t t
16313s,@sysconfdir@,$sysconfdir,;t t
16314s,@sharedstatedir@,$sharedstatedir,;t t
16315s,@localstatedir@,$localstatedir,;t t
16316s,@libdir@,$libdir,;t t
16317s,@includedir@,$includedir,;t t
16318s,@oldincludedir@,$oldincludedir,;t t
16319s,@infodir@,$infodir,;t t
16320s,@mandir@,$mandir,;t t
16321s,@build_alias@,$build_alias,;t t
16322s,@host_alias@,$host_alias,;t t
16323s,@target_alias@,$target_alias,;t t
16324s,@DEFS@,$DEFS,;t t
16325s,@ECHO_C@,$ECHO_C,;t t
16326s,@ECHO_N@,$ECHO_N,;t t
16327s,@ECHO_T@,$ECHO_T,;t t
16328s,@LIBS@,$LIBS,;t t
16329s,@VERSION@,$VERSION,;t t
16330s,@SOVERSION@,$SOVERSION,;t t
16331s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16332s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16333s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16334s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16335s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16336s,@MACHDEP@,$MACHDEP,;t t
16337s,@SGI_ABI@,$SGI_ABI,;t t
16338s,@CXX@,$CXX,;t t
16339s,@MAINOBJ@,$MAINOBJ,;t t
16340s,@EXEEXT@,$EXEEXT,;t t
16341s,@CC@,$CC,;t t
16342s,@CFLAGS@,$CFLAGS,;t t
16343s,@LDFLAGS@,$LDFLAGS,;t t
16344s,@CPPFLAGS@,$CPPFLAGS,;t t
16345s,@ac_ct_CC@,$ac_ct_CC,;t t
16346s,@OBJEXT@,$OBJEXT,;t t
16347s,@CPP@,$CPP,;t t
16348s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16349s,@LIBRARY@,$LIBRARY,;t t
16350s,@LDLIBRARY@,$LDLIBRARY,;t t
16351s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16352s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16353s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16354s,@INSTSONAME@,$INSTSONAME,;t t
16355s,@RUNSHARED@,$RUNSHARED,;t t
16356s,@LINKCC@,$LINKCC,;t t
16357s,@RANLIB@,$RANLIB,;t t
16358s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16359s,@AR@,$AR,;t t
16360s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16361s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16362s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16363s,@LN@,$LN,;t t
16364s,@OPT@,$OPT,;t t
16365s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16366s,@SO@,$SO,;t t
16367s,@LDSHARED@,$LDSHARED,;t t
16368s,@BLDSHARED@,$BLDSHARED,;t t
16369s,@CCSHARED@,$CCSHARED,;t t
16370s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16371s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
16372s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16373s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16374s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16375s,@LDLAST@,$LDLAST,;t t
16376s,@THREADOBJ@,$THREADOBJ,;t t
16377s,@DLINCLDIR@,$DLINCLDIR,;t t
16378s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16379s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16380s,@LIBOBJS@,$LIBOBJS,;t t
16381s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16382s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16383s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16384s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16385s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16386s,@LIBM@,$LIBM,;t t
16387s,@LIBC@,$LIBC,;t t
16388s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16389s,@THREADHEADERS@,$THREADHEADERS,;t t
16390s,@SRCDIRS@,$SRCDIRS,;t t
16391CEOF
16392
16393_ACEOF
16394
16395 cat >>$CONFIG_STATUS <<\_ACEOF
16396 # Split the substitutions into bite-sized pieces for seds with
16397 # small command number limits, like on Digital OSF/1 and HP-UX.
16398 ac_max_sed_lines=48
16399 ac_sed_frag=1 # Number of current file.
16400 ac_beg=1 # First line for current file.
16401 ac_end=$ac_max_sed_lines # Line after last line for current file.
16402 ac_more_lines=:
16403 ac_sed_cmds=
16404 while $ac_more_lines; do
16405 if test $ac_beg -gt 1; then
16406 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16407 else
16408 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16409 fi
16410 if test ! -s $tmp/subs.frag; then
16411 ac_more_lines=false
16412 else
16413 # The purpose of the label and of the branching condition is to
16414 # speed up the sed processing (if there are no `@' at all, there
16415 # is no need to browse any of the substitutions).
16416 # These are the two extra sed commands mentioned above.
16417 (echo ':t
16418 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16419 if test -z "$ac_sed_cmds"; then
16420 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16421 else
16422 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16423 fi
16424 ac_sed_frag=`expr $ac_sed_frag + 1`
16425 ac_beg=$ac_end
16426 ac_end=`expr $ac_end + $ac_max_sed_lines`
16427 fi
16428 done
16429 if test -z "$ac_sed_cmds"; then
16430 ac_sed_cmds=cat
16431 fi
16432fi # test -n "$CONFIG_FILES"
16433
16434_ACEOF
16435cat >>$CONFIG_STATUS <<\_ACEOF
16436for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16437 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16438 case $ac_file in
16439 - | *:- | *:-:* ) # input from stdin
16440 cat >$tmp/stdin
16441 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16442 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16443 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16444 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16445 * ) ac_file_in=$ac_file.in ;;
16446 esac
16447
16448 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16449 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16450$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16451 X"$ac_file" : 'X\(//\)[^/]' \| \
16452 X"$ac_file" : 'X\(//\)$' \| \
16453 X"$ac_file" : 'X\(/\)' \| \
16454 . : '\(.\)' 2>/dev/null ||
16455echo X"$ac_file" |
16456 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16457 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16458 /^X\(\/\/\)$/{ s//\1/; q; }
16459 /^X\(\/\).*/{ s//\1/; q; }
16460 s/.*/./; q'`
16461 { case "$ac_dir" in
16462 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16463 *) as_incr_dir=.;;
16464esac
16465as_dummy="$ac_dir"
16466for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16467 case $as_mkdir_dir in
16468 # Skip DOS drivespec
16469 ?:) as_incr_dir=$as_mkdir_dir ;;
16470 *)
16471 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16472 test -d "$as_incr_dir" ||
16473 mkdir "$as_incr_dir" ||
16474 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16475echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16476 { (exit 1); exit 1; }; }
16477 ;;
16478 esac
16479done; }
16480
16481 ac_builddir=.
16482
16483if test "$ac_dir" != .; then
16484 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16485 # A "../" for each directory in $ac_dir_suffix.
16486 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16487else
16488 ac_dir_suffix= ac_top_builddir=
16489fi
16490
16491case $srcdir in
16492 .) # No --srcdir option. We are building in place.
16493 ac_srcdir=.
16494 if test -z "$ac_top_builddir"; then
16495 ac_top_srcdir=.
16496 else
16497 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16498 fi ;;
16499 [\\/]* | ?:[\\/]* ) # Absolute path.
16500 ac_srcdir=$srcdir$ac_dir_suffix;
16501 ac_top_srcdir=$srcdir ;;
16502 *) # Relative path.
16503 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16504 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16505esac
16506# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16507# absolute.
16508ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16509ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16510ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16511ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16512
16513
16514 case $INSTALL in
16515 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16516 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16517 esac
16518
16519 if test x"$ac_file" != x-; then
16520 { echo "$as_me:$LINENO: creating $ac_file" >&5
16521echo "$as_me: creating $ac_file" >&6;}
16522 rm -f "$ac_file"
16523 fi
16524 # Let's still pretend it is `configure' which instantiates (i.e., don't
16525 # use $as_me), people would be surprised to read:
16526 # /* config.h. Generated by config.status. */
16527 if test x"$ac_file" = x-; then
16528 configure_input=
16529 else
16530 configure_input="$ac_file. "
16531 fi
16532 configure_input=$configure_input"Generated from `echo $ac_file_in |
16533 sed 's,.*/,,'` by configure."
16534
16535 # First look for the input files in the build tree, otherwise in the
16536 # src tree.
16537 ac_file_inputs=`IFS=:
16538 for f in $ac_file_in; do
16539 case $f in
16540 -) echo $tmp/stdin ;;
16541 [\\/$]*)
16542 # Absolute (can't be DOS-style, as IFS=:)
16543 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16544echo "$as_me: error: cannot find input file: $f" >&2;}
16545 { (exit 1); exit 1; }; }
16546 echo $f;;
16547 *) # Relative
16548 if test -f "$f"; then
16549 # Build tree
16550 echo $f
16551 elif test -f "$srcdir/$f"; then
16552 # Source tree
16553 echo $srcdir/$f
16554 else
16555 # /dev/null tree
16556 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16557echo "$as_me: error: cannot find input file: $f" >&2;}
16558 { (exit 1); exit 1; }; }
16559 fi;;
16560 esac
16561 done` || { (exit 1); exit 1; }
16562_ACEOF
16563cat >>$CONFIG_STATUS <<_ACEOF
16564 sed "$ac_vpsub
16565$extrasub
16566_ACEOF
16567cat >>$CONFIG_STATUS <<\_ACEOF
16568:t
16569/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16570s,@configure_input@,$configure_input,;t t
16571s,@srcdir@,$ac_srcdir,;t t
16572s,@abs_srcdir@,$ac_abs_srcdir,;t t
16573s,@top_srcdir@,$ac_top_srcdir,;t t
16574s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16575s,@builddir@,$ac_builddir,;t t
16576s,@abs_builddir@,$ac_abs_builddir,;t t
16577s,@top_builddir@,$ac_top_builddir,;t t
16578s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16579s,@INSTALL@,$ac_INSTALL,;t t
16580" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16581 rm -f $tmp/stdin
16582 if test x"$ac_file" != x-; then
16583 mv $tmp/out $ac_file
16584 else
16585 cat $tmp/out
16586 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016587 fi
16588
Martin v. Löwis11437992002-04-12 09:54:03 +000016589done
16590_ACEOF
16591cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016592
Martin v. Löwis11437992002-04-12 09:54:03 +000016593#
16594# CONFIG_HEADER section.
16595#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016596
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016597# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16598# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016599#
16600# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016601ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16602ac_dB='[ ].*$,\1#\2'
16603ac_dC=' '
16604ac_dD=',;t'
16605# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16606ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16607ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016608ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016609ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016610
Martin v. Löwis11437992002-04-12 09:54:03 +000016611for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016612 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016613 case $ac_file in
16614 - | *:- | *:-:* ) # input from stdin
16615 cat >$tmp/stdin
16616 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16617 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16618 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16619 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16620 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016621 esac
16622
Martin v. Löwis11437992002-04-12 09:54:03 +000016623 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16624echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016625
Martin v. Löwis11437992002-04-12 09:54:03 +000016626 # First look for the input files in the build tree, otherwise in the
16627 # src tree.
16628 ac_file_inputs=`IFS=:
16629 for f in $ac_file_in; do
16630 case $f in
16631 -) echo $tmp/stdin ;;
16632 [\\/$]*)
16633 # Absolute (can't be DOS-style, as IFS=:)
16634 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16635echo "$as_me: error: cannot find input file: $f" >&2;}
16636 { (exit 1); exit 1; }; }
16637 echo $f;;
16638 *) # Relative
16639 if test -f "$f"; then
16640 # Build tree
16641 echo $f
16642 elif test -f "$srcdir/$f"; then
16643 # Source tree
16644 echo $srcdir/$f
16645 else
16646 # /dev/null tree
16647 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16648echo "$as_me: error: cannot find input file: $f" >&2;}
16649 { (exit 1); exit 1; }; }
16650 fi;;
16651 esac
16652 done` || { (exit 1); exit 1; }
16653 # Remove the trailing spaces.
16654 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016655
Martin v. Löwis11437992002-04-12 09:54:03 +000016656_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016657
Martin v. Löwis11437992002-04-12 09:54:03 +000016658# Transform confdefs.h into two sed scripts, `conftest.defines' and
16659# `conftest.undefs', that substitutes the proper values into
16660# config.h.in to produce config.h. The first handles `#define'
16661# templates, and the second `#undef' templates.
16662# And first: Protect against being on the right side of a sed subst in
16663# config.status. Protect against being in an unquoted here document
16664# in config.status.
16665rm -f conftest.defines conftest.undefs
16666# Using a here document instead of a string reduces the quoting nightmare.
16667# Putting comments in sed scripts is not portable.
16668#
16669# `end' is used to avoid that the second main sed command (meant for
16670# 0-ary CPP macros) applies to n-ary macro definitions.
16671# See the Autoconf documentation for `clear'.
16672cat >confdef2sed.sed <<\_ACEOF
16673s/[\\&,]/\\&/g
16674s,[\\$`],\\&,g
16675t clear
16676: clear
16677s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16678t end
16679s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16680: end
16681_ACEOF
16682# If some macros were called several times there might be several times
16683# the same #defines, which is useless. Nevertheless, we may not want to
16684# sort them, since we want the *last* AC-DEFINE to be honored.
16685uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16686sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16687rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016688
16689# This sed command replaces #undef with comments. This is necessary, for
16690# example, in the case of _POSIX_SOURCE, which is predefined and required
16691# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016692cat >>conftest.undefs <<\_ACEOF
16693s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16694_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016695
Martin v. Löwis11437992002-04-12 09:54:03 +000016696# Break up conftest.defines because some shells have a limit on the size
16697# of here documents, and old seds have small limits too (100 cmds).
16698echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16699echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16700echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16701echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016702rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016703while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016704do
Martin v. Löwis11437992002-04-12 09:54:03 +000016705 # Write a limited-size here document to $tmp/defines.sed.
16706 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16707 # Speed up: don't consider the non `#define' lines.
16708 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16709 # Work around the forget-to-reset-the-flag bug.
16710 echo 't clr' >>$CONFIG_STATUS
16711 echo ': clr' >>$CONFIG_STATUS
16712 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016713 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016714 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16715 rm -f $tmp/in
16716 mv $tmp/out $tmp/in
16717' >>$CONFIG_STATUS
16718 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16719 rm -f conftest.defines
16720 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016721done
Martin v. Löwis11437992002-04-12 09:54:03 +000016722rm -f conftest.defines
16723echo ' fi # egrep' >>$CONFIG_STATUS
16724echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016725
Martin v. Löwis11437992002-04-12 09:54:03 +000016726# Break up conftest.undefs because some shells have a limit on the size
16727# of here documents, and old seds have small limits too (100 cmds).
16728echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16729rm -f conftest.tail
16730while grep . conftest.undefs >/dev/null
16731do
16732 # Write a limited-size here document to $tmp/undefs.sed.
16733 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16734 # Speed up: don't consider the non `#undef'
16735 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16736 # Work around the forget-to-reset-the-flag bug.
16737 echo 't clr' >>$CONFIG_STATUS
16738 echo ': clr' >>$CONFIG_STATUS
16739 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16740 echo 'CEOF
16741 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16742 rm -f $tmp/in
16743 mv $tmp/out $tmp/in
16744' >>$CONFIG_STATUS
16745 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16746 rm -f conftest.undefs
16747 mv conftest.tail conftest.undefs
16748done
16749rm -f conftest.undefs
16750
16751cat >>$CONFIG_STATUS <<\_ACEOF
16752 # Let's still pretend it is `configure' which instantiates (i.e., don't
16753 # use $as_me), people would be surprised to read:
16754 # /* config.h. Generated by config.status. */
16755 if test x"$ac_file" = x-; then
16756 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016757 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016758 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016759 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016760 cat $tmp/in >>$tmp/config.h
16761 rm -f $tmp/in
16762 if test x"$ac_file" != x-; then
16763 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16764 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16765echo "$as_me: $ac_file is unchanged" >&6;}
16766 else
16767 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16768$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16769 X"$ac_file" : 'X\(//\)[^/]' \| \
16770 X"$ac_file" : 'X\(//\)$' \| \
16771 X"$ac_file" : 'X\(/\)' \| \
16772 . : '\(.\)' 2>/dev/null ||
16773echo X"$ac_file" |
16774 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16775 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16776 /^X\(\/\/\)$/{ s//\1/; q; }
16777 /^X\(\/\).*/{ s//\1/; q; }
16778 s/.*/./; q'`
16779 { case "$ac_dir" in
16780 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16781 *) as_incr_dir=.;;
16782esac
16783as_dummy="$ac_dir"
16784for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16785 case $as_mkdir_dir in
16786 # Skip DOS drivespec
16787 ?:) as_incr_dir=$as_mkdir_dir ;;
16788 *)
16789 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16790 test -d "$as_incr_dir" ||
16791 mkdir "$as_incr_dir" ||
16792 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16793echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16794 { (exit 1); exit 1; }; }
16795 ;;
16796 esac
16797done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016798
Martin v. Löwis11437992002-04-12 09:54:03 +000016799 rm -f $ac_file
16800 mv $tmp/config.h $ac_file
16801 fi
16802 else
16803 cat $tmp/config.h
16804 rm -f $tmp/config.h
16805 fi
16806done
16807_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016808
Martin v. Löwis11437992002-04-12 09:54:03 +000016809cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016810
Martin v. Löwis11437992002-04-12 09:54:03 +000016811{ (exit 0); exit 0; }
16812_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016813chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016814ac_clean_files=$ac_clean_files_save
16815
16816
16817# configure is writing to config.log, and then calls config.status.
16818# config.status does its own redirection, appending to config.log.
16819# Unfortunately, on DOS this fails, as config.log is still kept open
16820# by configure, so config.status won't be able to write to it; its
16821# output is simply discarded. So we exec the FD to /dev/null,
16822# effectively closing config.log, so it can be properly (re)opened and
16823# appended to by config.status. When coming back to configure, we
16824# need to make the FD available again.
16825if test "$no_create" != yes; then
16826 ac_cs_success=:
16827 exec 5>/dev/null
16828 $SHELL $CONFIG_STATUS || ac_cs_success=false
16829 exec 5>>config.log
16830 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16831 # would make configure fail if this is the last instruction.
16832 $ac_cs_success || { (exit 1); exit 1; }
16833fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016834
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016835
16836echo "creating Setup"
16837if test ! -f Modules/Setup
16838then
16839 cp $srcdir/Modules/Setup.dist Modules/Setup
16840fi
16841
16842echo "creating Setup.local"
16843if test ! -f Modules/Setup.local
16844then
16845 echo "# Edit this file for local setup changes" >Modules/Setup.local
16846fi
16847
16848echo "creating Makefile"
16849$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16850 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016851 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016852mv config.c Modules