blob: d010d5ee7073073e2b1ec94de4c41b57b0afd44a [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisa4548572002-04-18 14:51:36 +00002# From configure.in Revision: 1.311 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis11437992002-04-12 09:54:03 +00004# Generated by GNU Autoconf 2.53.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
30# NLS nuisances.
31# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
38(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
256PACKAGE_NAME=
257PACKAGE_TARNAME=
258PACKAGE_VERSION=
259PACKAGE_STRING=
260PACKAGE_BUGREPORT=
261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
764\`configure' configures this package to adapt to many kinds of systems.
765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
820
821 cat <<\_ACEOF
822
823Optional Features:
824 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
825 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
826 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
827 --enable-shared disable/enable building shared python library
828 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
829 --enable-ipv6 Enable ipv6 (with ipv4) support
830 --disable-ipv6 Disable ipv6 support
831 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
832
833Optional Packages:
834 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
835 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
836 --without-gcc never use gcc
837 --with-cxx=<compiler> enable C++ support
838 --with-suffix=.exe set executable suffix
839 --with-pydebug build with Py_DEBUG defined
840 --with-libs='lib1 ...' link against additional libs
841 --with-signal-module disable/enable signal module
842 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
843 --with(out)-threads=DIRECTORY disable/enable thread support
844 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
845 --with-pth use GNU pth threading libraries
846 --with(out)-cycle-gc disable/enable garbage collection
Jack Jansen7b8c7542002-04-14 20:12:41 +0000847 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 --with(out)-pymalloc disable/enable specialized mallocs
849 --with-wctype-functions use wctype.h functions
850 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
851 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
852 --with-fpectl enable SIGFPE catching
853 --with-libm=STRING math library
854 --with-libc=STRING C library
855
856Some influential environment variables:
857 CC C compiler command
858 CFLAGS C compiler flags
859 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
860 nonstandard directory <lib dir>
861 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
862 headers in a nonstandard directory <include dir>
863 CPP C preprocessor
864
865Use these variables to override the choices made by `configure' or to help
866it to find libraries and programs with nonstandard names/locations.
867
868_ACEOF
869fi
870
871if test "$ac_init_help" = "recursive"; then
872 # If there are subdirs, report their specific --help.
873 ac_popdir=`pwd`
874 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
875 test -d $ac_dir || continue
876 ac_builddir=.
877
878if test "$ac_dir" != .; then
879 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
880 # A "../" for each directory in $ac_dir_suffix.
881 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
882else
883 ac_dir_suffix= ac_top_builddir=
884fi
885
886case $srcdir in
887 .) # No --srcdir option. We are building in place.
888 ac_srcdir=.
889 if test -z "$ac_top_builddir"; then
890 ac_top_srcdir=.
891 else
892 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
893 fi ;;
894 [\\/]* | ?:[\\/]* ) # Absolute path.
895 ac_srcdir=$srcdir$ac_dir_suffix;
896 ac_top_srcdir=$srcdir ;;
897 *) # Relative path.
898 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
899 ac_top_srcdir=$ac_top_builddir$srcdir ;;
900esac
901# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
902# absolute.
903ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
904ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
905ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
906ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
907
908 cd $ac_dir
909 # Check for guested configure; otherwise get Cygnus style configure.
910 if test -f $ac_srcdir/configure.gnu; then
911 echo
912 $SHELL $ac_srcdir/configure.gnu --help=recursive
913 elif test -f $ac_srcdir/configure; then
914 echo
915 $SHELL $ac_srcdir/configure --help=recursive
916 elif test -f $ac_srcdir/configure.ac ||
917 test -f $ac_srcdir/configure.in; then
918 echo
919 $ac_configure --help
920 else
921 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
922 fi
923 cd $ac_popdir
924 done
925fi
926
927test -n "$ac_init_help" && exit 0
928if $ac_init_version; then
929 cat <<\_ACEOF
930
931Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
932Free Software Foundation, Inc.
933This configure script is free software; the Free Software Foundation
934gives unlimited permission to copy, distribute and modify it.
935_ACEOF
936 exit 0
937fi
938exec 5>config.log
939cat >&5 <<_ACEOF
940This file contains any messages produced by compilers while
941running configure, to aid debugging if configure makes a mistake.
942
943It was created by $as_me, which was
944generated by GNU Autoconf 2.53. Invocation command line was
945
946 $ $0 $@
947
948_ACEOF
949{
950cat <<_ASUNAME
951## --------- ##
952## Platform. ##
953## --------- ##
954
955hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
956uname -m = `(uname -m) 2>/dev/null || echo unknown`
957uname -r = `(uname -r) 2>/dev/null || echo unknown`
958uname -s = `(uname -s) 2>/dev/null || echo unknown`
959uname -v = `(uname -v) 2>/dev/null || echo unknown`
960
961/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
962/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
963
964/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
965/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
966/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
967hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
968/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
969/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
970/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
971
972_ASUNAME
973
974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
975for as_dir in $PATH
976do
977 IFS=$as_save_IFS
978 test -z "$as_dir" && as_dir=.
979 echo "PATH: $as_dir"
980done
981
982} >&5
983
984cat >&5 <<_ACEOF
985
986
987## ----------- ##
988## Core tests. ##
989## ----------- ##
990
991_ACEOF
992
993
994# Keep a trace of the command line.
995# Strip out --no-create and --no-recursion so they do not pile up.
996# Also quote any args containing shell meta-characters.
997ac_configure_args=
998ac_sep=
999for ac_arg
1000do
1001 case $ac_arg in
1002 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003 | --no-cr | --no-c | -n ) continue ;;
1004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 continue ;;
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1009 esac
1010 case " $ac_configure_args " in
1011 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1012 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1013 ac_sep=" " ;;
1014 esac
1015 # Get rid of the leading space.
1016done
1017
1018# When interrupted or exit'd, cleanup temporary files, and complete
1019# config.log. We remove comments because anyway the quotes in there
1020# would cause problems or look ugly.
1021# WARNING: Be sure not to use single quotes in there, as some shells,
1022# such as our DU 5.0 friend, will then `close' the trap.
1023trap 'exit_status=$?
1024 # Save into config.log some information that might help in debugging.
1025 {
1026 echo
1027 cat <<\_ASBOX
1028## ---------------- ##
1029## Cache variables. ##
1030## ---------------- ##
1031_ASBOX
1032 echo
1033 # The following way of writing the cache mishandles newlines in values,
1034{
1035 (set) 2>&1 |
1036 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1037 *ac_space=\ *)
1038 sed -n \
1039 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1040 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1041 ;;
1042 *)
1043 sed -n \
1044 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1045 ;;
1046 esac;
1047}
1048 echo
1049 if test -s confdefs.h; then
1050 cat <<\_ASBOX
1051## ----------- ##
1052## confdefs.h. ##
1053## ----------- ##
1054_ASBOX
1055 echo
1056 sed "/^$/d" confdefs.h
1057 echo
1058 fi
1059 test "$ac_signal" != 0 &&
1060 echo "$as_me: caught signal $ac_signal"
1061 echo "$as_me: exit $exit_status"
1062 } >&5
1063 rm -f core core.* *.core &&
1064 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1065 exit $exit_status
1066 ' 0
1067for ac_signal in 1 2 13 15; do
1068 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1069done
1070ac_signal=0
1071
1072# confdefs.h avoids OS command line length limits that DEFS can exceed.
1073rm -rf conftest* confdefs.h
1074# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1075echo >confdefs.h
1076
1077# Predefined preprocessor variables.
1078
1079cat >>confdefs.h <<_ACEOF
1080#define PACKAGE_NAME "$PACKAGE_NAME"
1081_ACEOF
1082
1083
1084cat >>confdefs.h <<_ACEOF
1085#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1086_ACEOF
1087
1088
1089cat >>confdefs.h <<_ACEOF
1090#define PACKAGE_VERSION "$PACKAGE_VERSION"
1091_ACEOF
1092
1093
1094cat >>confdefs.h <<_ACEOF
1095#define PACKAGE_STRING "$PACKAGE_STRING"
1096_ACEOF
1097
1098
1099cat >>confdefs.h <<_ACEOF
1100#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1101_ACEOF
1102
1103
1104# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105# Prefer explicitly selected file to automatically selected ones.
1106if test -z "$CONFIG_SITE"; then
1107 if test "x$prefix" != xNONE; then
1108 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1109 else
1110 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1111 fi
1112fi
1113for ac_site_file in $CONFIG_SITE; do
1114 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1116echo "$as_me: loading site script $ac_site_file" >&6;}
1117 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 . "$ac_site_file"
1119 fi
1120done
1121
1122if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # Some versions of bash will fail to source /dev/null (special
1124 # files actually), so we avoid doing that.
1125 if test -f "$cache_file"; then
1126 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1127echo "$as_me: loading cache $cache_file" >&6;}
1128 case $cache_file in
1129 [\\/]* | ?:[\\/]* ) . $cache_file;;
1130 *) . ./$cache_file;;
1131 esac
1132 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133else
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1135echo "$as_me: creating cache $cache_file" >&6;}
1136 >$cache_file
1137fi
1138
1139# Check that the precious variables saved in the cache have kept the same
1140# value.
1141ac_cache_corrupted=false
1142for ac_var in `(set) 2>&1 |
1143 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1144 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1145 eval ac_new_set=\$ac_env_${ac_var}_set
1146 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1147 eval ac_new_val="\$ac_env_${ac_var}_value"
1148 case $ac_old_set,$ac_new_set in
1149 set,)
1150 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1151echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1152 ac_cache_corrupted=: ;;
1153 ,set)
1154 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1155echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1156 ac_cache_corrupted=: ;;
1157 ,);;
1158 *)
1159 if test "x$ac_old_val" != "x$ac_new_val"; then
1160 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1161echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1162 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1163echo "$as_me: former value: $ac_old_val" >&2;}
1164 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1165echo "$as_me: current value: $ac_new_val" >&2;}
1166 ac_cache_corrupted=:
1167 fi;;
1168 esac
1169 # Pass precious variables to config.status.
1170 if test "$ac_new_set" = set; then
1171 case $ac_new_val in
1172 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1173 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1174 *) ac_arg=$ac_var=$ac_new_val ;;
1175 esac
1176 case " $ac_configure_args " in
1177 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1178 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1179 esac
1180 fi
1181done
1182if $ac_cache_corrupted; then
1183 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1184echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1185 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1186echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1187 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188fi
1189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1194ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196
Michael W. Hudson54241132001-12-07 15:38:26 +00001197
1198
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213ac_config_headers="$ac_config_headers pyconfig.h"
1214
1215
1216# This is for stuff that absolutely must end up in pyconfig.h.
1217# Please use pyport.h instead, if possible.
1218
1219
1220
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001221# Set VERSION so we only need to edit in one place (i.e., here)
1222
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001223VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001224
Martin v. Löwis1142de32002-03-29 16:28:31 +00001225
1226SOVERSION=1.0
1227
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001228# Arguments passed to configure.
1229
1230CONFIG_ARGS="$ac_configure_args"
1231
Michael W. Hudson54241132001-12-07 15:38:26 +00001232
Jack Jansene578a632001-08-15 01:27:14 +00001233# Check whether --enable-framework or --disable-framework was given.
1234if test "${enable_framework+set}" = set; then
1235 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001236
Jack Jansene578a632001-08-15 01:27:14 +00001237 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001239 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001240 esac
1241 case $enableval in
1242 no)
1243 PYTHONFRAMEWORK=
1244 PYTHONFRAMEWORKDIR=no-framework
1245 PYTHONFRAMEWORKPREFIX=
1246 PYTHONFRAMEWORKINSTALLDIR=
1247 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001248 ;;
1249 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001250 PYTHONFRAMEWORK=Python
1251 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001252 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001253 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1254 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001255 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001256
Guido van Rossum563e7081996-09-10 18:20:48 +00001257else
Martin v. Löwis11437992002-04-12 09:54:03 +00001258
Jack Jansene578a632001-08-15 01:27:14 +00001259 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001260 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001261 PYTHONFRAMEWORKPREFIX=
1262 PYTHONFRAMEWORKINSTALLDIR=
1263 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001264
Martin v. Löwis11437992002-04-12 09:54:03 +00001265fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001266
1267
1268
1269
Jack Jansene578a632001-08-15 01:27:14 +00001270
1271##AC_ARG_WITH(dyld,
1272##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1273##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001274# Set name for machine-dependent library files
1275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276echo "$as_me:$LINENO: checking MACHDEP" >&5
1277echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001278if test -z "$MACHDEP"
1279then
Guido van Rossum563e7081996-09-10 18:20:48 +00001280 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +00001281 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001282 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001284 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001285 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001286 ac_md_system=`echo $ac_sys_system |
1287 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1288 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001289 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001290 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001291
Guido van Rossum07397971997-04-29 21:49:50 +00001292 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001293 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001294 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001295 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001296 esac
1297fi
Guido van Rossum91922671997-10-09 20:24:13 +00001298
1299#
1300# SGI compilers allow the specification of the both the ABI and the
1301# ISA on the command line. Depending on the values of these switches,
1302# different and often incompatable code will be generated.
1303#
1304# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1305# thus supply support for various ABI/ISA combinations. The MACHDEP
1306# variable is also adjusted.
1307#
1308
1309if test ! -z "$SGI_ABI"
1310then
1311 CC="cc $SGI_ABI"
1312 LDFLAGS="$SGI_ABI $LDFLAGS"
1313 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1314fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001315echo "$as_me:$LINENO: result: $MACHDEP" >&5
1316echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001317
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001319echo "$as_me:$LINENO: checking for --without-gcc" >&5
1320echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1321
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001322# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001323if test "${with_gcc+set}" = set; then
1324 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001325
Guido van Rossum7f43da71994-08-01 12:15:30 +00001326 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001327 no) CC=cc
1328 without_gcc=yes;;
1329 yes) CC=gcc
1330 without_gcc=no;;
1331 *) CC=$withval
1332 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001334else
Martin v. Löwis11437992002-04-12 09:54:03 +00001335
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001336 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001337 AIX*) CC=cc_r
1338 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001339 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001340 case $BE_HOST_CPU in
1341 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001342 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001343 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +00001344 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001345 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001346 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001347 ;;
1348 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001349 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001350 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001351 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001352 ;;
1353 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001354 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1355echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1356 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001357 ;;
1358 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001359 AR="\$(srcdir)/Modules/ar_beos"
1360 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001361 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001362 Monterey*)
1363 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001364 without_gcc=;;
1365 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001366 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001367fi;
1368echo "$as_me:$LINENO: result: $without_gcc" >&5
1369echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001370
1371
Guido van Rossum95012191999-12-16 17:50:52 +00001372
Fred Drakea1a84e72001-03-06 05:52:16 +00001373MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001374echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1375echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1376
Guido van Rossum95012191999-12-16 17:50:52 +00001377# Check whether --with-cxx or --without-cxx was given.
1378if test "${with_cxx+set}" = set; then
1379 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001380
Martin v. Löwis22352952000-12-13 17:37:02 +00001381 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001382 case $withval in
1383 no) CXX=
1384 with_cxx=no;;
1385 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001386 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001387 with_cxx=$withval;;
1388 esac
1389else
Martin v. Löwis11437992002-04-12 09:54:03 +00001390
Guido van Rossum95012191999-12-16 17:50:52 +00001391 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001392 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394fi;
1395echo "$as_me:$LINENO: result: $with_cxx" >&5
1396echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001397
1398if test "$with_cxx" = "yes"
1399then
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1401echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1402 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001403fi
1404
1405
1406
1407
Martin v. Löwis11437992002-04-12 09:54:03 +00001408if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001409then
1410 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1411do
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001413set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001414echo "$as_me:$LINENO: checking for $ac_word" >&5
1415echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1416if test "${ac_cv_prog_CXX+set}" = set; then
1417 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001418else
1419 if test -n "$CXX"; then
1420 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1421else
Martin v. Löwis11437992002-04-12 09:54:03 +00001422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1423for as_dir in $PATH
1424do
1425 IFS=$as_save_IFS
1426 test -z "$as_dir" && as_dir=.
1427 for ac_exec_ext in '' $ac_executable_extensions; do
1428 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1429 ac_cv_prog_CXX="$ac_prog"
1430 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1431 break 2
1432 fi
1433done
1434done
1435
Martin v. Löwis22352952000-12-13 17:37:02 +00001436fi
1437fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001438CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001439if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 echo "$as_me:$LINENO: result: $CXX" >&5
1441echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001442else
Martin v. Löwis11437992002-04-12 09:54:03 +00001443 echo "$as_me:$LINENO: result: no" >&5
1444echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001445fi
1446
Martin v. Löwis11437992002-04-12 09:54:03 +00001447 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001448done
1449test -n "$CXX" || CXX="notfound"
1450
1451 if test "$CXX" = "notfound"
1452 then
1453 CXX=
1454 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001455 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001456ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1460 cat >conftest.$ac_ext <<_ACEOF
1461#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001462#include "confdefs.h"
1463
Martin v. Löwis11437992002-04-12 09:54:03 +00001464#ifdef F77_DUMMY_MAIN
1465# ifdef __cplusplus
1466 extern "C"
1467# endif
1468 int F77_DUMMY_MAIN() { return 1; }
1469#endif
1470int
1471main ()
1472{
Michael W. Hudson54241132001-12-07 15:38:26 +00001473
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 ;
1475 return 0;
1476}
1477_ACEOF
1478ac_clean_files_save=$ac_clean_files
1479ac_clean_files="$ac_clean_files a.out a.exe"
1480# Try to create an executable without -o first, disregard a.out.
1481# It will help us diagnose broken compilers, and finding out an intuition
1482# of exeext.
1483echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1484echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1485ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1486if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1487 (eval $ac_link_default) 2>&5
1488 ac_status=$?
1489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1490 (exit $ac_status); }; then
1491 # Find the output, starting from the most likely. This scheme is
1492# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1493# resort.
1494
1495# Be careful to initialize this variable, since it used to be cached.
1496# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1497ac_cv_exeext=
1498for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1499 ls a.out conftest 2>/dev/null;
1500 ls a.* conftest.* 2>/dev/null`; do
1501 case $ac_file in
1502 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1503 a.out ) # We found the default executable, but exeext='' is most
1504 # certainly right.
1505 break;;
1506 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1507 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1508 export ac_cv_exeext
1509 break;;
1510 * ) break;;
1511 esac
1512done
1513else
1514 echo "$as_me: failed program was:" >&5
1515cat conftest.$ac_ext >&5
1516{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1517echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1518 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001519fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001520
1521ac_exeext=$ac_cv_exeext
1522echo "$as_me:$LINENO: result: $ac_file" >&5
1523echo "${ECHO_T}$ac_file" >&6
1524
1525# Check the compiler produces executables we can run. If not, either
1526# the compiler is broken, or we cross compile.
1527echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1528echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1529# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1530# If not cross compiling, check that we can run a simple program.
1531if test "$cross_compiling" != yes; then
1532 if { ac_try='./$ac_file'
1533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1534 (eval $ac_try) 2>&5
1535 ac_status=$?
1536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1537 (exit $ac_status); }; }; then
1538 cross_compiling=no
1539 else
1540 if test "$cross_compiling" = maybe; then
1541 cross_compiling=yes
1542 else
1543 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1544If you meant to cross compile, use \`--host'." >&5
1545echo "$as_me: error: cannot run C++ compiled programs.
1546If you meant to cross compile, use \`--host'." >&2;}
1547 { (exit 1); exit 1; }; }
1548 fi
1549 fi
1550fi
1551echo "$as_me:$LINENO: result: yes" >&5
1552echo "${ECHO_T}yes" >&6
1553
1554rm -f a.out a.exe conftest$ac_cv_exeext
1555ac_clean_files=$ac_clean_files_save
1556# Check the compiler produces executables we can run. If not, either
1557# the compiler is broken, or we cross compile.
1558echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1559echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1560echo "$as_me:$LINENO: result: $cross_compiling" >&5
1561echo "${ECHO_T}$cross_compiling" >&6
1562
1563echo "$as_me:$LINENO: checking for suffix of executables" >&5
1564echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1565if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1566 (eval $ac_link) 2>&5
1567 ac_status=$?
1568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1569 (exit $ac_status); }; then
1570 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1571# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1572# work properly (i.e., refer to `conftest.exe'), while it won't with
1573# `rm'.
1574for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1575 case $ac_file in
1576 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1577 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1578 export ac_cv_exeext
1579 break;;
1580 * ) break;;
1581 esac
1582done
1583else
1584 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1585echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1586 { (exit 1); exit 1; }; }
1587fi
1588
1589rm -f conftest$ac_cv_exeext
1590echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1591echo "${ECHO_T}$ac_cv_exeext" >&6
1592
1593rm -f conftest.$ac_ext
1594EXEEXT=$ac_cv_exeext
1595ac_exeext=$EXEEXT
1596
1597 ac_ext=c
1598ac_cpp='$CPP $CPPFLAGS'
1599ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1600ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1601ac_compiler_gnu=$ac_cv_c_compiler_gnu
1602
1603
Martin v. Löwis22352952000-12-13 17:37:02 +00001604
1605 fi
1606fi
1607
Guido van Rossum8b131c51995-03-09 14:10:13 +00001608# If the user switches compilers, we can't believe the cache
1609if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1610then
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1612(it is also a good idea to do 'make clean' before compiling)" >&5
1613echo "$as_me: error: cached CC is different -- throw away $cache_file
1614(it is also a good idea to do 'make clean' before compiling)" >&2;}
1615 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001616fi
1617
Martin v. Löwis11437992002-04-12 09:54:03 +00001618ac_ext=c
1619ac_cpp='$CPP $CPPFLAGS'
1620ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1621ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1622ac_compiler_gnu=$ac_cv_c_compiler_gnu
1623if test -n "$ac_tool_prefix"; then
1624 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1625set dummy ${ac_tool_prefix}gcc; ac_word=$2
1626echo "$as_me:$LINENO: checking for $ac_word" >&5
1627echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1628if test "${ac_cv_prog_CC+set}" = set; then
1629 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001630else
1631 if test -n "$CC"; then
1632 ac_cv_prog_CC="$CC" # Let the user override the test.
1633else
Martin v. Löwis11437992002-04-12 09:54:03 +00001634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1635for as_dir in $PATH
1636do
1637 IFS=$as_save_IFS
1638 test -z "$as_dir" && as_dir=.
1639 for ac_exec_ext in '' $ac_executable_extensions; do
1640 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1641 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1642 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1643 break 2
1644 fi
1645done
1646done
1647
Jack Jansendd19cf82001-12-06 22:36:17 +00001648fi
1649fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001650CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001651if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001652 echo "$as_me:$LINENO: result: $CC" >&5
1653echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001654else
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 echo "$as_me:$LINENO: result: no" >&5
1656echo "${ECHO_T}no" >&6
1657fi
1658
1659fi
1660if test -z "$ac_cv_prog_CC"; then
1661 ac_ct_CC=$CC
1662 # Extract the first word of "gcc", so it can be a program name with args.
1663set dummy gcc; ac_word=$2
1664echo "$as_me:$LINENO: checking for $ac_word" >&5
1665echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1666if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1667 echo $ECHO_N "(cached) $ECHO_C" >&6
1668else
1669 if test -n "$ac_ct_CC"; then
1670 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1671else
1672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1673for as_dir in $PATH
1674do
1675 IFS=$as_save_IFS
1676 test -z "$as_dir" && as_dir=.
1677 for ac_exec_ext in '' $ac_executable_extensions; do
1678 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1679 ac_cv_prog_ac_ct_CC="gcc"
1680 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1681 break 2
1682 fi
1683done
1684done
1685
1686fi
1687fi
1688ac_ct_CC=$ac_cv_prog_ac_ct_CC
1689if test -n "$ac_ct_CC"; then
1690 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1691echo "${ECHO_T}$ac_ct_CC" >&6
1692else
1693 echo "$as_me:$LINENO: result: no" >&5
1694echo "${ECHO_T}no" >&6
1695fi
1696
1697 CC=$ac_ct_CC
1698else
1699 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001700fi
1701
Jack Jansendd19cf82001-12-06 22:36:17 +00001702if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001703 if test -n "$ac_tool_prefix"; then
1704 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1705set dummy ${ac_tool_prefix}cc; ac_word=$2
1706echo "$as_me:$LINENO: checking for $ac_word" >&5
1707echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1708if test "${ac_cv_prog_CC+set}" = set; then
1709 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001710else
1711 if test -n "$CC"; then
1712 ac_cv_prog_CC="$CC" # Let the user override the test.
1713else
Martin v. Löwis11437992002-04-12 09:54:03 +00001714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1715for as_dir in $PATH
1716do
1717 IFS=$as_save_IFS
1718 test -z "$as_dir" && as_dir=.
1719 for ac_exec_ext in '' $ac_executable_extensions; do
1720 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1721 ac_cv_prog_CC="${ac_tool_prefix}cc"
1722 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1723 break 2
1724 fi
1725done
1726done
1727
1728fi
1729fi
1730CC=$ac_cv_prog_CC
1731if test -n "$CC"; then
1732 echo "$as_me:$LINENO: result: $CC" >&5
1733echo "${ECHO_T}$CC" >&6
1734else
1735 echo "$as_me:$LINENO: result: no" >&5
1736echo "${ECHO_T}no" >&6
1737fi
1738
1739fi
1740if test -z "$ac_cv_prog_CC"; then
1741 ac_ct_CC=$CC
1742 # Extract the first word of "cc", so it can be a program name with args.
1743set dummy cc; ac_word=$2
1744echo "$as_me:$LINENO: checking for $ac_word" >&5
1745echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1746if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1747 echo $ECHO_N "(cached) $ECHO_C" >&6
1748else
1749 if test -n "$ac_ct_CC"; then
1750 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1751else
1752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1753for as_dir in $PATH
1754do
1755 IFS=$as_save_IFS
1756 test -z "$as_dir" && as_dir=.
1757 for ac_exec_ext in '' $ac_executable_extensions; do
1758 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1759 ac_cv_prog_ac_ct_CC="cc"
1760 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1761 break 2
1762 fi
1763done
1764done
1765
1766fi
1767fi
1768ac_ct_CC=$ac_cv_prog_ac_ct_CC
1769if test -n "$ac_ct_CC"; then
1770 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1771echo "${ECHO_T}$ac_ct_CC" >&6
1772else
1773 echo "$as_me:$LINENO: result: no" >&5
1774echo "${ECHO_T}no" >&6
1775fi
1776
1777 CC=$ac_ct_CC
1778else
1779 CC="$ac_cv_prog_CC"
1780fi
1781
1782fi
1783if test -z "$CC"; then
1784 # Extract the first word of "cc", so it can be a program name with args.
1785set dummy cc; ac_word=$2
1786echo "$as_me:$LINENO: checking for $ac_word" >&5
1787echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1788if test "${ac_cv_prog_CC+set}" = set; then
1789 echo $ECHO_N "(cached) $ECHO_C" >&6
1790else
1791 if test -n "$CC"; then
1792 ac_cv_prog_CC="$CC" # Let the user override the test.
1793else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001794 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1796for as_dir in $PATH
1797do
1798 IFS=$as_save_IFS
1799 test -z "$as_dir" && as_dir=.
1800 for ac_exec_ext in '' $ac_executable_extensions; do
1801 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1802 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1803 ac_prog_rejected=yes
1804 continue
1805 fi
1806 ac_cv_prog_CC="cc"
1807 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1808 break 2
1809 fi
1810done
1811done
1812
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001813if test $ac_prog_rejected = yes; then
1814 # We found a bogon in the path, so make sure we never use it.
1815 set dummy $ac_cv_prog_CC
1816 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001817 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001818 # We chose a different compiler from the bogus one.
1819 # However, it has the same basename, so the bogon will be chosen
1820 # first if we set CC to just the basename; use the full file name.
1821 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001822 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001823 shift
1824 ac_cv_prog_CC="$@"
1825 fi
1826fi
1827fi
1828fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001829CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001830if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001831 echo "$as_me:$LINENO: result: $CC" >&5
1832echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001833else
Martin v. Löwis11437992002-04-12 09:54:03 +00001834 echo "$as_me:$LINENO: result: no" >&5
1835echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001836fi
1837
Martin v. Löwis11437992002-04-12 09:54:03 +00001838fi
1839if test -z "$CC"; then
1840 if test -n "$ac_tool_prefix"; then
1841 for ac_prog in cl
1842 do
1843 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1844set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1845echo "$as_me:$LINENO: checking for $ac_word" >&5
1846echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1847if test "${ac_cv_prog_CC+set}" = set; then
1848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001849else
1850 if test -n "$CC"; then
1851 ac_cv_prog_CC="$CC" # Let the user override the test.
1852else
Martin v. Löwis11437992002-04-12 09:54:03 +00001853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1854for as_dir in $PATH
1855do
1856 IFS=$as_save_IFS
1857 test -z "$as_dir" && as_dir=.
1858 for ac_exec_ext in '' $ac_executable_extensions; do
1859 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1860 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1861 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1862 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001864done
1865done
1866
1867fi
1868fi
1869CC=$ac_cv_prog_CC
1870if test -n "$CC"; then
1871 echo "$as_me:$LINENO: result: $CC" >&5
1872echo "${ECHO_T}$CC" >&6
1873else
1874 echo "$as_me:$LINENO: result: no" >&5
1875echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001876fi
1877
Martin v. Löwis11437992002-04-12 09:54:03 +00001878 test -n "$CC" && break
1879 done
1880fi
1881if test -z "$CC"; then
1882 ac_ct_CC=$CC
1883 for ac_prog in cl
1884do
1885 # Extract the first word of "$ac_prog", so it can be a program name with args.
1886set dummy $ac_prog; ac_word=$2
1887echo "$as_me:$LINENO: checking for $ac_word" >&5
1888echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1889if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1890 echo $ECHO_N "(cached) $ECHO_C" >&6
1891else
1892 if test -n "$ac_ct_CC"; then
1893 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1894else
1895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1896for as_dir in $PATH
1897do
1898 IFS=$as_save_IFS
1899 test -z "$as_dir" && as_dir=.
1900 for ac_exec_ext in '' $ac_executable_extensions; do
1901 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1902 ac_cv_prog_ac_ct_CC="$ac_prog"
1903 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1904 break 2
1905 fi
1906done
1907done
Jack Jansendd19cf82001-12-06 22:36:17 +00001908
Martin v. Löwis11437992002-04-12 09:54:03 +00001909fi
1910fi
1911ac_ct_CC=$ac_cv_prog_ac_ct_CC
1912if test -n "$ac_ct_CC"; then
1913 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1914echo "${ECHO_T}$ac_ct_CC" >&6
1915else
1916 echo "$as_me:$LINENO: result: no" >&5
1917echo "${ECHO_T}no" >&6
1918fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001919
Martin v. Löwis11437992002-04-12 09:54:03 +00001920 test -n "$ac_ct_CC" && break
1921done
Michael W. Hudson54241132001-12-07 15:38:26 +00001922
Martin v. Löwis11437992002-04-12 09:54:03 +00001923 CC=$ac_ct_CC
1924fi
1925
1926fi
1927
1928
1929test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1930echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1931 { (exit 1); exit 1; }; }
1932
1933# Provide some information about the compiler.
1934echo "$as_me:$LINENO:" \
1935 "checking for C compiler version" >&5
1936ac_compiler=`set X $ac_compile; echo $2`
1937{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1938 (eval $ac_compiler --version </dev/null >&5) 2>&5
1939 ac_status=$?
1940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1941 (exit $ac_status); }
1942{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1943 (eval $ac_compiler -v </dev/null >&5) 2>&5
1944 ac_status=$?
1945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1946 (exit $ac_status); }
1947{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1948 (eval $ac_compiler -V </dev/null >&5) 2>&5
1949 ac_status=$?
1950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1951 (exit $ac_status); }
1952
1953cat >conftest.$ac_ext <<_ACEOF
1954#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001955#include "confdefs.h"
1956
Martin v. Löwis11437992002-04-12 09:54:03 +00001957#ifdef F77_DUMMY_MAIN
1958# ifdef __cplusplus
1959 extern "C"
1960# endif
1961 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001963int
1964main ()
1965{
1966
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971ac_clean_files_save=$ac_clean_files
1972ac_clean_files="$ac_clean_files a.out a.exe"
1973# Try to create an executable without -o first, disregard a.out.
1974# It will help us diagnose broken compilers, and finding out an intuition
1975# of exeext.
1976echo "$as_me:$LINENO: checking for C compiler default output" >&5
1977echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1978ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1979if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1980 (eval $ac_link_default) 2>&5
1981 ac_status=$?
1982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1983 (exit $ac_status); }; then
1984 # Find the output, starting from the most likely. This scheme is
1985# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1986# resort.
1987
1988# Be careful to initialize this variable, since it used to be cached.
1989# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1990ac_cv_exeext=
1991for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1992 ls a.out conftest 2>/dev/null;
1993 ls a.* conftest.* 2>/dev/null`; do
1994 case $ac_file in
1995 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1996 a.out ) # We found the default executable, but exeext='' is most
1997 # certainly right.
1998 break;;
1999 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2000 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2001 export ac_cv_exeext
2002 break;;
2003 * ) break;;
2004 esac
2005done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002006else
Martin v. Löwis11437992002-04-12 09:54:03 +00002007 echo "$as_me: failed program was:" >&5
2008cat conftest.$ac_ext >&5
2009{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2010echo "$as_me: error: C compiler cannot create executables" >&2;}
2011 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002012fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002013
Martin v. Löwis11437992002-04-12 09:54:03 +00002014ac_exeext=$ac_cv_exeext
2015echo "$as_me:$LINENO: result: $ac_file" >&5
2016echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002017
Martin v. Löwis11437992002-04-12 09:54:03 +00002018# Check the compiler produces executables we can run. If not, either
2019# the compiler is broken, or we cross compile.
2020echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2021echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2022# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2023# If not cross compiling, check that we can run a simple program.
2024if test "$cross_compiling" != yes; then
2025 if { ac_try='./$ac_file'
2026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2027 (eval $ac_try) 2>&5
2028 ac_status=$?
2029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2030 (exit $ac_status); }; }; then
2031 cross_compiling=no
2032 else
2033 if test "$cross_compiling" = maybe; then
2034 cross_compiling=yes
2035 else
2036 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2037If you meant to cross compile, use \`--host'." >&5
2038echo "$as_me: error: cannot run C compiled programs.
2039If you meant to cross compile, use \`--host'." >&2;}
2040 { (exit 1); exit 1; }; }
2041 fi
2042 fi
2043fi
2044echo "$as_me:$LINENO: result: yes" >&5
2045echo "${ECHO_T}yes" >&6
2046
2047rm -f a.out a.exe conftest$ac_cv_exeext
2048ac_clean_files=$ac_clean_files_save
2049# Check the compiler produces executables we can run. If not, either
2050# the compiler is broken, or we cross compile.
2051echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2052echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2053echo "$as_me:$LINENO: result: $cross_compiling" >&5
2054echo "${ECHO_T}$cross_compiling" >&6
2055
2056echo "$as_me:$LINENO: checking for suffix of executables" >&5
2057echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2059 (eval $ac_link) 2>&5
2060 ac_status=$?
2061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2062 (exit $ac_status); }; then
2063 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2064# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2065# work properly (i.e., refer to `conftest.exe'), while it won't with
2066# `rm'.
2067for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2068 case $ac_file in
2069 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2070 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2071 export ac_cv_exeext
2072 break;;
2073 * ) break;;
2074 esac
2075done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002076else
Martin v. Löwis11437992002-04-12 09:54:03 +00002077 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2078echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2079 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002080fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002081
Martin v. Löwis11437992002-04-12 09:54:03 +00002082rm -f conftest$ac_cv_exeext
2083echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2084echo "${ECHO_T}$ac_cv_exeext" >&6
2085
2086rm -f conftest.$ac_ext
2087EXEEXT=$ac_cv_exeext
2088ac_exeext=$EXEEXT
2089echo "$as_me:$LINENO: checking for suffix of object files" >&5
2090echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2091if test "${ac_cv_objext+set}" = set; then
2092 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002093else
Martin v. Löwis11437992002-04-12 09:54:03 +00002094 cat >conftest.$ac_ext <<_ACEOF
2095#line $LINENO "configure"
2096#include "confdefs.h"
2097
2098#ifdef F77_DUMMY_MAIN
2099# ifdef __cplusplus
2100 extern "C"
2101# endif
2102 int F77_DUMMY_MAIN() { return 1; }
2103#endif
2104int
2105main ()
2106{
2107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112rm -f conftest.o conftest.obj
2113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2114 (eval $ac_compile) 2>&5
2115 ac_status=$?
2116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2117 (exit $ac_status); }; then
2118 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2119 case $ac_file in
2120 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2121 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2122 break;;
2123 esac
2124done
2125else
2126 echo "$as_me: failed program was:" >&5
2127cat conftest.$ac_ext >&5
2128{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2129echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2130 { (exit 1); exit 1; }; }
2131fi
2132
2133rm -f conftest.$ac_cv_objext conftest.$ac_ext
2134fi
2135echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2136echo "${ECHO_T}$ac_cv_objext" >&6
2137OBJEXT=$ac_cv_objext
2138ac_objext=$OBJEXT
2139echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2140echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2141if test "${ac_cv_c_compiler_gnu+set}" = set; then
2142 echo $ECHO_N "(cached) $ECHO_C" >&6
2143else
2144 cat >conftest.$ac_ext <<_ACEOF
2145#line $LINENO "configure"
2146#include "confdefs.h"
2147
2148#ifdef F77_DUMMY_MAIN
2149# ifdef __cplusplus
2150 extern "C"
2151# endif
2152 int F77_DUMMY_MAIN() { return 1; }
2153#endif
2154int
2155main ()
2156{
2157#ifndef __GNUC__
2158 choke me
2159#endif
2160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165rm -f conftest.$ac_objext
2166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2167 (eval $ac_compile) 2>&5
2168 ac_status=$?
2169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2170 (exit $ac_status); } &&
2171 { ac_try='test -s conftest.$ac_objext'
2172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2173 (eval $ac_try) 2>&5
2174 ac_status=$?
2175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2176 (exit $ac_status); }; }; then
2177 ac_compiler_gnu=yes
2178else
2179 echo "$as_me: failed program was:" >&5
2180cat conftest.$ac_ext >&5
2181ac_compiler_gnu=no
2182fi
2183rm -f conftest.$ac_objext conftest.$ac_ext
2184ac_cv_c_compiler_gnu=$ac_compiler_gnu
2185
2186fi
2187echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2188echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2189GCC=`test $ac_compiler_gnu = yes && echo yes`
2190ac_test_CFLAGS=${CFLAGS+set}
2191ac_save_CFLAGS=$CFLAGS
2192CFLAGS="-g"
2193echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2194echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2195if test "${ac_cv_prog_cc_g+set}" = set; then
2196 echo $ECHO_N "(cached) $ECHO_C" >&6
2197else
2198 cat >conftest.$ac_ext <<_ACEOF
2199#line $LINENO "configure"
2200#include "confdefs.h"
2201
2202#ifdef F77_DUMMY_MAIN
2203# ifdef __cplusplus
2204 extern "C"
2205# endif
2206 int F77_DUMMY_MAIN() { return 1; }
2207#endif
2208int
2209main ()
2210{
2211
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216rm -f conftest.$ac_objext
2217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2218 (eval $ac_compile) 2>&5
2219 ac_status=$?
2220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2221 (exit $ac_status); } &&
2222 { ac_try='test -s conftest.$ac_objext'
2223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2224 (eval $ac_try) 2>&5
2225 ac_status=$?
2226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2227 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002228 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002229else
Martin v. Löwis11437992002-04-12 09:54:03 +00002230 echo "$as_me: failed program was:" >&5
2231cat conftest.$ac_ext >&5
2232ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002234rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002235fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002236echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2237echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002238if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002239 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002240elif test $ac_cv_prog_cc_g = yes; then
2241 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002242 CFLAGS="-g -O2"
2243 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002244 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002245 fi
2246else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002247 if test "$GCC" = yes; then
2248 CFLAGS="-O2"
2249 else
2250 CFLAGS=
2251 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002252fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002253# Some people use a C++ compiler to compile C. Since we use `exit',
2254# in C++ we need to declare it. In case someone uses the same compiler
2255# for both compiling C and C++ we need to have the C++ compiler decide
2256# the declaration of exit, since it's the most demanding environment.
2257cat >conftest.$ac_ext <<_ACEOF
2258#ifndef __cplusplus
2259 choke me
2260#endif
2261_ACEOF
2262rm -f conftest.$ac_objext
2263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2264 (eval $ac_compile) 2>&5
2265 ac_status=$?
2266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2267 (exit $ac_status); } &&
2268 { ac_try='test -s conftest.$ac_objext'
2269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2270 (eval $ac_try) 2>&5
2271 ac_status=$?
2272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2273 (exit $ac_status); }; }; then
2274 for ac_declaration in \
2275 ''\
2276 '#include <stdlib.h>' \
2277 'extern "C" void std::exit (int) throw (); using std::exit;' \
2278 'extern "C" void std::exit (int); using std::exit;' \
2279 'extern "C" void exit (int) throw ();' \
2280 'extern "C" void exit (int);' \
2281 'void exit (int);'
2282do
2283 cat >conftest.$ac_ext <<_ACEOF
2284#line $LINENO "configure"
2285#include "confdefs.h"
2286#include <stdlib.h>
2287$ac_declaration
2288#ifdef F77_DUMMY_MAIN
2289# ifdef __cplusplus
2290 extern "C"
2291# endif
2292 int F77_DUMMY_MAIN() { return 1; }
2293#endif
2294int
2295main ()
2296{
2297exit (42);
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302rm -f conftest.$ac_objext
2303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2304 (eval $ac_compile) 2>&5
2305 ac_status=$?
2306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2307 (exit $ac_status); } &&
2308 { ac_try='test -s conftest.$ac_objext'
2309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2310 (eval $ac_try) 2>&5
2311 ac_status=$?
2312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2313 (exit $ac_status); }; }; then
2314 :
2315else
2316 echo "$as_me: failed program was:" >&5
2317cat conftest.$ac_ext >&5
2318continue
2319fi
2320rm -f conftest.$ac_objext conftest.$ac_ext
2321 cat >conftest.$ac_ext <<_ACEOF
2322#line $LINENO "configure"
2323#include "confdefs.h"
2324$ac_declaration
2325#ifdef F77_DUMMY_MAIN
2326# ifdef __cplusplus
2327 extern "C"
2328# endif
2329 int F77_DUMMY_MAIN() { return 1; }
2330#endif
2331int
2332main ()
2333{
2334exit (42);
2335 ;
2336 return 0;
2337}
2338_ACEOF
2339rm -f conftest.$ac_objext
2340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2341 (eval $ac_compile) 2>&5
2342 ac_status=$?
2343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2344 (exit $ac_status); } &&
2345 { ac_try='test -s conftest.$ac_objext'
2346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2347 (eval $ac_try) 2>&5
2348 ac_status=$?
2349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2350 (exit $ac_status); }; }; then
2351 break
2352else
2353 echo "$as_me: failed program was:" >&5
2354cat conftest.$ac_ext >&5
2355fi
2356rm -f conftest.$ac_objext conftest.$ac_ext
2357done
2358rm -f conftest*
2359if test -n "$ac_declaration"; then
2360 echo '#ifdef __cplusplus' >>confdefs.h
2361 echo $ac_declaration >>confdefs.h
2362 echo '#endif' >>confdefs.h
2363fi
2364
2365else
2366 echo "$as_me: failed program was:" >&5
2367cat conftest.$ac_ext >&5
2368fi
2369rm -f conftest.$ac_objext conftest.$ac_ext
2370ac_ext=c
2371ac_cpp='$CPP $CPPFLAGS'
2372ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2373ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2374ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002375
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002376
2377# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379ac_ext=c
2380ac_cpp='$CPP $CPPFLAGS'
2381ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2382ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2383ac_compiler_gnu=$ac_cv_c_compiler_gnu
2384echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2385echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002386# On Suns, sometimes $CPP names a directory.
2387if test -n "$CPP" && test -d "$CPP"; then
2388 CPP=
2389fi
2390if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002391 if test "${ac_cv_prog_CPP+set}" = set; then
2392 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002393else
Martin v. Löwis11437992002-04-12 09:54:03 +00002394 # Double quotes because CPP needs to be expanded
2395 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2396 do
2397 ac_preproc_ok=false
2398for ac_c_preproc_warn_flag in '' yes
2399do
2400 # Use a header file that comes with gcc, so configuring glibc
2401 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002402 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002403 # not just through cpp. "Syntax error" is here to catch this case.
2404 cat >conftest.$ac_ext <<_ACEOF
2405#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002406#include "confdefs.h"
2407#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002408 Syntax error
2409_ACEOF
2410if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2411 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2412 ac_status=$?
2413 egrep -v '^ *\+' conftest.er1 >conftest.err
2414 rm -f conftest.er1
2415 cat conftest.err >&5
2416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2417 (exit $ac_status); } >/dev/null; then
2418 if test -s conftest.err; then
2419 ac_cpp_err=$ac_c_preproc_warn_flag
2420 else
2421 ac_cpp_err=
2422 fi
2423else
2424 ac_cpp_err=yes
2425fi
2426if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002427 :
2428else
Martin v. Löwis11437992002-04-12 09:54:03 +00002429 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002430 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 # Broken: fails on valid input.
2432continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002434rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002435
Martin v. Löwis11437992002-04-12 09:54:03 +00002436 # OK, works on sane cases. Now check whether non-existent headers
2437 # can be detected and how.
2438 cat >conftest.$ac_ext <<_ACEOF
2439#line $LINENO "configure"
2440#include "confdefs.h"
2441#include <ac_nonexistent.h>
2442_ACEOF
2443if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2444 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2445 ac_status=$?
2446 egrep -v '^ *\+' conftest.er1 >conftest.err
2447 rm -f conftest.er1
2448 cat conftest.err >&5
2449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2450 (exit $ac_status); } >/dev/null; then
2451 if test -s conftest.err; then
2452 ac_cpp_err=$ac_c_preproc_warn_flag
2453 else
2454 ac_cpp_err=
2455 fi
2456else
2457 ac_cpp_err=yes
2458fi
2459if test -z "$ac_cpp_err"; then
2460 # Broken: success on invalid input.
2461continue
2462else
2463 echo "$as_me: failed program was:" >&5
2464 cat conftest.$ac_ext >&5
2465 # Passes both tests.
2466ac_preproc_ok=:
2467break
2468fi
2469rm -f conftest.err conftest.$ac_ext
2470
2471done
2472# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2473rm -f conftest.err conftest.$ac_ext
2474if $ac_preproc_ok; then
2475 break
2476fi
2477
2478 done
2479 ac_cv_prog_CPP=$CPP
2480
2481fi
2482 CPP=$ac_cv_prog_CPP
2483else
2484 ac_cv_prog_CPP=$CPP
2485fi
2486echo "$as_me:$LINENO: result: $CPP" >&5
2487echo "${ECHO_T}$CPP" >&6
2488ac_preproc_ok=false
2489for ac_c_preproc_warn_flag in '' yes
2490do
2491 # Use a header file that comes with gcc, so configuring glibc
2492 # with a fresh cross-compiler works.
2493 # On the NeXT, cc -E runs the code through the compiler's parser,
2494 # not just through cpp. "Syntax error" is here to catch this case.
2495 cat >conftest.$ac_ext <<_ACEOF
2496#line $LINENO "configure"
2497#include "confdefs.h"
2498#include <assert.h>
2499 Syntax error
2500_ACEOF
2501if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2502 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2503 ac_status=$?
2504 egrep -v '^ *\+' conftest.er1 >conftest.err
2505 rm -f conftest.er1
2506 cat conftest.err >&5
2507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2508 (exit $ac_status); } >/dev/null; then
2509 if test -s conftest.err; then
2510 ac_cpp_err=$ac_c_preproc_warn_flag
2511 else
2512 ac_cpp_err=
2513 fi
2514else
2515 ac_cpp_err=yes
2516fi
2517if test -z "$ac_cpp_err"; then
2518 :
2519else
2520 echo "$as_me: failed program was:" >&5
2521 cat conftest.$ac_ext >&5
2522 # Broken: fails on valid input.
2523continue
2524fi
2525rm -f conftest.err conftest.$ac_ext
2526
2527 # OK, works on sane cases. Now check whether non-existent headers
2528 # can be detected and how.
2529 cat >conftest.$ac_ext <<_ACEOF
2530#line $LINENO "configure"
2531#include "confdefs.h"
2532#include <ac_nonexistent.h>
2533_ACEOF
2534if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2535 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2536 ac_status=$?
2537 egrep -v '^ *\+' conftest.er1 >conftest.err
2538 rm -f conftest.er1
2539 cat conftest.err >&5
2540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2541 (exit $ac_status); } >/dev/null; then
2542 if test -s conftest.err; then
2543 ac_cpp_err=$ac_c_preproc_warn_flag
2544 else
2545 ac_cpp_err=
2546 fi
2547else
2548 ac_cpp_err=yes
2549fi
2550if test -z "$ac_cpp_err"; then
2551 # Broken: success on invalid input.
2552continue
2553else
2554 echo "$as_me: failed program was:" >&5
2555 cat conftest.$ac_ext >&5
2556 # Passes both tests.
2557ac_preproc_ok=:
2558break
2559fi
2560rm -f conftest.err conftest.$ac_ext
2561
2562done
2563# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2564rm -f conftest.err conftest.$ac_ext
2565if $ac_preproc_ok; then
2566 :
2567else
2568 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2569echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2570 { (exit 1); exit 1; }; }
2571fi
2572
2573ac_ext=c
2574ac_cpp='$CPP $CPPFLAGS'
2575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2577ac_compiler_gnu=$ac_cv_c_compiler_gnu
2578
2579
2580
2581echo "$as_me:$LINENO: checking for AIX" >&5
2582echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2583cat >conftest.$ac_ext <<_ACEOF
2584#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002585#include "confdefs.h"
2586#ifdef _AIX
2587 yes
2588#endif
2589
Martin v. Löwis11437992002-04-12 09:54:03 +00002590_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002591if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2592 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 echo "$as_me:$LINENO: result: yes" >&5
2594echo "${ECHO_T}yes" >&6
2595cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002596#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002597_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002598
2599else
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 echo "$as_me:$LINENO: result: no" >&5
2601echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002602fi
2603rm -f conftest*
2604
Michael W. Hudson54241132001-12-07 15:38:26 +00002605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2607echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2608if test "${ac_cv_header_stdc+set}" = set; then
2609 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002610else
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 cat >conftest.$ac_ext <<_ACEOF
2612#line $LINENO "configure"
2613#include "confdefs.h"
2614#include <stdlib.h>
2615#include <stdarg.h>
2616#include <string.h>
2617#include <float.h>
2618
2619_ACEOF
2620if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2621 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2622 ac_status=$?
2623 egrep -v '^ *\+' conftest.er1 >conftest.err
2624 rm -f conftest.er1
2625 cat conftest.err >&5
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); } >/dev/null; then
2628 if test -s conftest.err; then
2629 ac_cpp_err=$ac_c_preproc_warn_flag
2630 else
2631 ac_cpp_err=
2632 fi
2633else
2634 ac_cpp_err=yes
2635fi
2636if test -z "$ac_cpp_err"; then
2637 ac_cv_header_stdc=yes
2638else
2639 echo "$as_me: failed program was:" >&5
2640 cat conftest.$ac_ext >&5
2641 ac_cv_header_stdc=no
2642fi
2643rm -f conftest.err conftest.$ac_ext
2644
2645if test $ac_cv_header_stdc = yes; then
2646 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2647 cat >conftest.$ac_ext <<_ACEOF
2648#line $LINENO "configure"
2649#include "confdefs.h"
2650#include <string.h>
2651
2652_ACEOF
2653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2654 egrep "memchr" >/dev/null 2>&1; then
2655 :
2656else
2657 ac_cv_header_stdc=no
2658fi
2659rm -f conftest*
2660
2661fi
2662
2663if test $ac_cv_header_stdc = yes; then
2664 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2665 cat >conftest.$ac_ext <<_ACEOF
2666#line $LINENO "configure"
2667#include "confdefs.h"
2668#include <stdlib.h>
2669
2670_ACEOF
2671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2672 egrep "free" >/dev/null 2>&1; then
2673 :
2674else
2675 ac_cv_header_stdc=no
2676fi
2677rm -f conftest*
2678
2679fi
2680
2681if test $ac_cv_header_stdc = yes; then
2682 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2683 if test "$cross_compiling" = yes; then
2684 :
2685else
2686 cat >conftest.$ac_ext <<_ACEOF
2687#line $LINENO "configure"
2688#include "confdefs.h"
2689#include <ctype.h>
2690#if ((' ' & 0x0FF) == 0x020)
2691# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2692# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2693#else
2694# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2695 || ('j' <= (c) && (c) <= 'r') \
2696 || ('s' <= (c) && (c) <= 'z'))
2697# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2698#endif
2699
2700#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2701int
2702main ()
2703{
2704 int i;
2705 for (i = 0; i < 256; i++)
2706 if (XOR (islower (i), ISLOWER (i))
2707 || toupper (i) != TOUPPER (i))
2708 exit(2);
2709 exit (0);
2710}
2711_ACEOF
2712rm -f conftest$ac_exeext
2713if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2714 (eval $ac_link) 2>&5
2715 ac_status=$?
2716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2717 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2719 (eval $ac_try) 2>&5
2720 ac_status=$?
2721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2722 (exit $ac_status); }; }; then
2723 :
2724else
2725 echo "$as_me: program exited with status $ac_status" >&5
2726echo "$as_me: failed program was:" >&5
2727cat conftest.$ac_ext >&5
2728( exit $ac_status )
2729ac_cv_header_stdc=no
2730fi
2731rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2732fi
2733fi
2734fi
2735echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2736echo "${ECHO_T}$ac_cv_header_stdc" >&6
2737if test $ac_cv_header_stdc = yes; then
2738
2739cat >>confdefs.h <<\_ACEOF
2740#define STDC_HEADERS 1
2741_ACEOF
2742
2743fi
2744
2745# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2756 inttypes.h stdint.h unistd.h
2757do
2758as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2759echo "$as_me:$LINENO: checking for $ac_header" >&5
2760echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2761if eval "test \"\${$as_ac_Header+set}\" = set"; then
2762 echo $ECHO_N "(cached) $ECHO_C" >&6
2763else
2764 cat >conftest.$ac_ext <<_ACEOF
2765#line $LINENO "configure"
2766#include "confdefs.h"
2767$ac_includes_default
2768
2769#include <$ac_header>
2770_ACEOF
2771rm -f conftest.$ac_objext
2772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2773 (eval $ac_compile) 2>&5
2774 ac_status=$?
2775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2776 (exit $ac_status); } &&
2777 { ac_try='test -s conftest.$ac_objext'
2778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2779 (eval $ac_try) 2>&5
2780 ac_status=$?
2781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2782 (exit $ac_status); }; }; then
2783 eval "$as_ac_Header=yes"
2784else
2785 echo "$as_me: failed program was:" >&5
2786cat conftest.$ac_ext >&5
2787eval "$as_ac_Header=no"
2788fi
2789rm -f conftest.$ac_objext conftest.$ac_ext
2790fi
2791echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2792echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2793if test `eval echo '${'$as_ac_Header'}'` = yes; then
2794 cat >>confdefs.h <<_ACEOF
2795#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2796_ACEOF
2797
2798fi
2799
2800done
2801
2802
2803if test "${ac_cv_header_minix_config_h+set}" = set; then
2804 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2805echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2806if test "${ac_cv_header_minix_config_h+set}" = set; then
2807 echo $ECHO_N "(cached) $ECHO_C" >&6
2808fi
2809echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2810echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2811else
2812 # Is the header compilable?
2813echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2814echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2815cat >conftest.$ac_ext <<_ACEOF
2816#line $LINENO "configure"
2817#include "confdefs.h"
2818$ac_includes_default
2819#include <minix/config.h>
2820_ACEOF
2821rm -f conftest.$ac_objext
2822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2823 (eval $ac_compile) 2>&5
2824 ac_status=$?
2825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2826 (exit $ac_status); } &&
2827 { ac_try='test -s conftest.$ac_objext'
2828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2829 (eval $ac_try) 2>&5
2830 ac_status=$?
2831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2832 (exit $ac_status); }; }; then
2833 ac_header_compiler=yes
2834else
2835 echo "$as_me: failed program was:" >&5
2836cat conftest.$ac_ext >&5
2837ac_header_compiler=no
2838fi
2839rm -f conftest.$ac_objext conftest.$ac_ext
2840echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2841echo "${ECHO_T}$ac_header_compiler" >&6
2842
2843# Is the header present?
2844echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2845echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2846cat >conftest.$ac_ext <<_ACEOF
2847#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002848#include "confdefs.h"
2849#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002850_ACEOF
2851if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2852 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2853 ac_status=$?
2854 egrep -v '^ *\+' conftest.er1 >conftest.err
2855 rm -f conftest.er1
2856 cat conftest.err >&5
2857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2858 (exit $ac_status); } >/dev/null; then
2859 if test -s conftest.err; then
2860 ac_cpp_err=$ac_c_preproc_warn_flag
2861 else
2862 ac_cpp_err=
2863 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002864else
Martin v. Löwis11437992002-04-12 09:54:03 +00002865 ac_cpp_err=yes
2866fi
2867if test -z "$ac_cpp_err"; then
2868 ac_header_preproc=yes
2869else
2870 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002871 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002872 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002873fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002874rm -f conftest.err conftest.$ac_ext
2875echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2876echo "${ECHO_T}$ac_header_preproc" >&6
2877
2878# So? What about this header?
2879case $ac_header_compiler:$ac_header_preproc in
2880 yes:no )
2881 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2882echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2883 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2884echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2885 no:yes )
2886 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2887echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2888 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2889echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2890 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2891echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2892esac
2893echo "$as_me:$LINENO: checking for minix/config.h" >&5
2894echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2895if test "${ac_cv_header_minix_config_h+set}" = set; then
2896 echo $ECHO_N "(cached) $ECHO_C" >&6
2897else
2898 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002899fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002900echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2901echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2902
2903fi
2904if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002905 MINIX=yes
2906else
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002908fi
2909
Martin v. Löwis11437992002-04-12 09:54:03 +00002910
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002911if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002912
2913cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002914#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002915_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002916
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
2918cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002919#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002920_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002921
Martin v. Löwis11437992002-04-12 09:54:03 +00002922
2923cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002924#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002925_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002926
2927fi
2928
2929
Michael W. Hudson54241132001-12-07 15:38:26 +00002930
Martin v. Löwis11437992002-04-12 09:54:03 +00002931echo "$as_me:$LINENO: checking for --with-suffix" >&5
2932echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002933
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002934# Check whether --with-suffix or --without-suffix was given.
2935if test "${with_suffix+set}" = set; then
2936 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002938 case $withval in
2939 no) EXEEXT=;;
2940 yes) EXEEXT=.exe;;
2941 *) EXEEXT=$withval;;
2942 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002943fi;
2944echo "$as_me:$LINENO: result: $EXEEXT" >&5
2945echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002946
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002947# Test whether we're running on a non-case-sensitive system, in which
2948# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2951echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002952if test -d "python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002953then
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 echo "$as_me:$LINENO: result: yes" >&5
2955echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002956 BUILDEXEEXT=.exe
2957else
Martin v. Löwis11437992002-04-12 09:54:03 +00002958 echo "$as_me:$LINENO: result: no" >&5
2959echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002960 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002961fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002962
Guido van Rossumdd997f71998-10-07 19:58:26 +00002963case $MACHDEP in
2964bsdos*)
2965 case $CC in
2966 gcc) CC="$CC -D_HAVE_BSDI";;
2967 esac;;
2968esac
2969
Guido van Rossum24b1e751997-08-21 02:29:16 +00002970case $ac_sys_system in
2971hp*|HP*)
2972 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002973 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002974 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002975Monterey*)
2976 case $CC in
2977 cc) CC="$CC -Wl,-Bexport";;
2978 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002979SunOS*)
2980 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002981
2982cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002983#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002984_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002985
2986 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002987esac
2988
Michael W. Hudson54241132001-12-07 15:38:26 +00002989
2990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991echo "$as_me:$LINENO: checking LIBRARY" >&5
2992echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002993if test -z "$LIBRARY"
2994then
2995 LIBRARY='libpython$(VERSION).a'
2996fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002997echo "$as_me:$LINENO: result: $LIBRARY" >&5
2998echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002999
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003000# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003001# name of the library into which to insert object files). BLDLIBRARY is also
3002# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3003# is blank as the main program is not linked directly against LDLIBRARY.
3004# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3005# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3006# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3007# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003008#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003009# RUNSHARED is used to run shared python without installed libraries
3010#
3011# INSTSONAME is the name of the shared library that will be use to install
3012# on the system - some systems like version suffix, others don't
3013
3014
Michael W. Hudson54241132001-12-07 15:38:26 +00003015
3016
3017
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003018
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003019LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003020BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis1142de32002-03-29 16:28:31 +00003021INSTSONMAE='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003022DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003023LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003024RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003025
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003026# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003027# If CXX is set, and if it is needed to link a main function that was
3028# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3029# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003030# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003031# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003032
Martin v. Löwis11437992002-04-12 09:54:03 +00003033echo "$as_me:$LINENO: checking LINKCC" >&5
3034echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003035if test -z "$LINKCC"
3036then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003037 if test -z "$CXX"; then
3038 LINKCC="\$(PURIFY) \$(CC)"
3039 else
3040 echo 'int main(){return 0;}' > conftest.$ac_ext
3041 $CXX -c conftest.$ac_ext 2>&5
3042 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3043 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3044 then
3045 LINKCC="\$(PURIFY) \$(CC)"
3046 else
3047 LINKCC="\$(PURIFY) \$(CXX)"
3048 fi
3049 rm -fr conftest*
3050 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003051 case $ac_sys_system in
3052 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003053 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003054 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003055 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003056 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003057 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003058 esac
3059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003060echo "$as_me:$LINENO: result: $LINKCC" >&5
3061echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003062
Martin v. Löwis11437992002-04-12 09:54:03 +00003063echo "$as_me:$LINENO: checking for --enable-shared" >&5
3064echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003065# Check whether --enable-shared or --disable-shared was given.
3066if test "${enable_shared+set}" = set; then
3067 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003068
Martin v. Löwis11437992002-04-12 09:54:03 +00003069fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003070
3071if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003072then
Martin v. Löwis1142de32002-03-29 16:28:31 +00003073 enable_shared="no"
3074fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003075echo "$as_me:$LINENO: result: $enable_shared" >&5
3076echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003077
3078
Martin v. Löwis11437992002-04-12 09:54:03 +00003079echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3080echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003081
Guido van Rossumb8552162001-09-05 14:58:11 +00003082# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3083# library that we build, but we do not want to link against it (we
3084# will find it with a -framework option). For this reason there is an
3085# extra variable BLDLIBRARY against which Python and the extension
3086# modules are linked, BLDLIBRARY. This is normally the same as
3087# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003088if test "$enable_framework"
3089then
3090 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3091 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3092 BLDLIBRARY=''
3093else
3094 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003095fi
Jack Jansene578a632001-08-15 01:27:14 +00003096
Martin v. Löwis1142de32002-03-29 16:28:31 +00003097# Other platforms follow
3098if test $enable_shared = "yes"; then
3099 case $ac_sys_system in
3100 BeOS*)
3101 LDLIBRARY='libpython$(VERSION).so'
3102 ;;
3103 CYGWIN*)
3104 LDLIBRARY='libpython$(VERSION).dll.a'
3105 DLLLIBRARY='libpython$(VERSION).dll'
3106 ;;
3107 SunOS*)
3108 LDLIBRARY='libpython$(VERSION).so'
3109 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3110 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3111 ;;
3112 Linux*)
3113 LDLIBRARY='libpython$(VERSION).so'
3114 BLDLIBRARY='-L. -lpython$(VERSION)'
3115 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3116 INSTSONAME="$LDLIBRARY".$SOVERSION
3117 ;;
3118 hp*|HP*)
3119 LDLIBRARY='libpython$(VERSION).sl'
3120 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3121 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3122 ;;
3123 OSF*)
3124 LDLIBRARY='libpython$(VERSION).so'
3125 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3126 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3127 ;;
3128 esac
3129 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3130 case $MACHDEP in
3131 dguxR4)
3132 LDLIBRARY='libpython$(VERSION).so'
3133 OPT="$OPT -pic"
3134 ;;
3135 esac
3136fi
3137
Martin v. Löwis11437992002-04-12 09:54:03 +00003138echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3139echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003140
Martin v. Löwis11437992002-04-12 09:54:03 +00003141if test -n "$ac_tool_prefix"; then
3142 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3143set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3144echo "$as_me:$LINENO: checking for $ac_word" >&5
3145echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3146if test "${ac_cv_prog_RANLIB+set}" = set; then
3147 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148else
3149 if test -n "$RANLIB"; then
3150 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3151else
Martin v. Löwis11437992002-04-12 09:54:03 +00003152as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3153for as_dir in $PATH
3154do
3155 IFS=$as_save_IFS
3156 test -z "$as_dir" && as_dir=.
3157 for ac_exec_ext in '' $ac_executable_extensions; do
3158 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3159 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3160 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3161 break 2
3162 fi
3163done
3164done
3165
Guido van Rossum627b2d71993-12-24 10:39:16 +00003166fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003168RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003169if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003170 echo "$as_me:$LINENO: result: $RANLIB" >&5
3171echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003172else
Martin v. Löwis11437992002-04-12 09:54:03 +00003173 echo "$as_me:$LINENO: result: no" >&5
3174echo "${ECHO_T}no" >&6
3175fi
3176
3177fi
3178if test -z "$ac_cv_prog_RANLIB"; then
3179 ac_ct_RANLIB=$RANLIB
3180 # Extract the first word of "ranlib", so it can be a program name with args.
3181set dummy ranlib; ac_word=$2
3182echo "$as_me:$LINENO: checking for $ac_word" >&5
3183echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3184if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3185 echo $ECHO_N "(cached) $ECHO_C" >&6
3186else
3187 if test -n "$ac_ct_RANLIB"; then
3188 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3189else
3190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3191for as_dir in $PATH
3192do
3193 IFS=$as_save_IFS
3194 test -z "$as_dir" && as_dir=.
3195 for ac_exec_ext in '' $ac_executable_extensions; do
3196 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3197 ac_cv_prog_ac_ct_RANLIB="ranlib"
3198 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3199 break 2
3200 fi
3201done
3202done
3203
3204 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3205fi
3206fi
3207ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3208if test -n "$ac_ct_RANLIB"; then
3209 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3210echo "${ECHO_T}$ac_ct_RANLIB" >&6
3211else
3212 echo "$as_me:$LINENO: result: no" >&5
3213echo "${ECHO_T}no" >&6
3214fi
3215
3216 RANLIB=$ac_ct_RANLIB
3217else
3218 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003219fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003220
3221
Guido van Rossum7f43da71994-08-01 12:15:30 +00003222for ac_prog in ar aal
3223do
Martin v. Löwis11437992002-04-12 09:54:03 +00003224 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003225set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003226echo "$as_me:$LINENO: checking for $ac_word" >&5
3227echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3228if test "${ac_cv_prog_AR+set}" = set; then
3229 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003230else
3231 if test -n "$AR"; then
3232 ac_cv_prog_AR="$AR" # Let the user override the test.
3233else
Martin v. Löwis11437992002-04-12 09:54:03 +00003234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3235for as_dir in $PATH
3236do
3237 IFS=$as_save_IFS
3238 test -z "$as_dir" && as_dir=.
3239 for ac_exec_ext in '' $ac_executable_extensions; do
3240 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3241 ac_cv_prog_AR="$ac_prog"
3242 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3243 break 2
3244 fi
3245done
3246done
3247
Guido van Rossum7f43da71994-08-01 12:15:30 +00003248fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003249fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003250AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003251if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003252 echo "$as_me:$LINENO: result: $AR" >&5
3253echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003254else
Martin v. Löwis11437992002-04-12 09:54:03 +00003255 echo "$as_me:$LINENO: result: no" >&5
3256echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003258
Martin v. Löwis11437992002-04-12 09:54:03 +00003259 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003260done
3261test -n "$AR" || AR="ar"
3262
Michael W. Hudson54241132001-12-07 15:38:26 +00003263
Neil Schemenauera42c8272001-03-31 00:01:55 +00003264case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003265bsdos*|hp*|HP*)
3266 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003267 if test -z "$INSTALL"
3268 then
3269 INSTALL="${srcdir}/install-sh -c"
3270 fi
3271esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003272ac_aux_dir=
3273for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3274 if test -f $ac_dir/install-sh; then
3275 ac_aux_dir=$ac_dir
3276 ac_install_sh="$ac_aux_dir/install-sh -c"
3277 break
3278 elif test -f $ac_dir/install.sh; then
3279 ac_aux_dir=$ac_dir
3280 ac_install_sh="$ac_aux_dir/install.sh -c"
3281 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003282 elif test -f $ac_dir/shtool; then
3283 ac_aux_dir=$ac_dir
3284 ac_install_sh="$ac_aux_dir/shtool install -c"
3285 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003286 fi
3287done
3288if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003289 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3290echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3291 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003292fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003293ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3294ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3295ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003296
3297# Find a good install program. We prefer a C program (faster),
3298# so one script is as good as another. But avoid the broken or
3299# incompatible versions:
3300# SysV /etc/install, /usr/sbin/install
3301# SunOS /usr/etc/install
3302# IRIX /sbin/install
3303# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003304# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003305# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3306# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3307# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3308# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003309echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3310echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003311if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003312if test "${ac_cv_path_install+set}" = set; then
3313 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003314else
Martin v. Löwis11437992002-04-12 09:54:03 +00003315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316for as_dir in $PATH
3317do
3318 IFS=$as_save_IFS
3319 test -z "$as_dir" && as_dir=.
3320 # Account for people who put trailing slashes in PATH elements.
3321case $as_dir/ in
3322 ./ | .// | /cC/* | \
3323 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3324 /usr/ucb/* ) ;;
3325 *)
3326 # OSF1 and SCO ODT 3.0 have their own names for install.
3327 # Don't use installbsd from OSF since it installs stuff as root
3328 # by default.
3329 for ac_prog in ginstall scoinst install; do
3330 for ac_exec_ext in '' $ac_executable_extensions; do
3331 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3332 if test $ac_prog = install &&
3333 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3334 # AIX install. It has an incompatible calling convention.
3335 :
3336 elif test $ac_prog = install &&
3337 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3338 # program-specific install script used by HP pwplus--don't use.
3339 :
3340 else
3341 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3342 break 3
3343 fi
3344 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003345 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003346 done
3347 ;;
3348esac
3349done
3350
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003351
3352fi
3353 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003354 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003355 else
3356 # As a last resort, use the slow shell script. We don't cache a
3357 # path for INSTALL within a source directory, because that will
3358 # break other packages using the cache if that directory is
3359 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003360 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003361 fi
3362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003363echo "$as_me:$LINENO: result: $INSTALL" >&5
3364echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003365
3366# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3367# It thinks the first close brace ends the variable substitution.
3368test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3369
Martin v. Löwis11437992002-04-12 09:54:03 +00003370test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003371
3372test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3373
Michael W. Hudson54241132001-12-07 15:38:26 +00003374
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003375# Not every filesystem supports hard links
3376
3377if test -z "$LN" ; then
3378 case $ac_sys_system in
3379 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003380 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003381 *) LN=ln;;
3382 esac
3383fi
3384
Fred Drake109d9862001-07-11 06:27:56 +00003385# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003386echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3387echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3388
Fred Drake109d9862001-07-11 06:27:56 +00003389# Check whether --with-pydebug or --without-pydebug was given.
3390if test "${with_pydebug+set}" = set; then
3391 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003392
Fred Drake109d9862001-07-11 06:27:56 +00003393if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003394then
3395
3396cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003397#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003398_ACEOF
3399
3400 echo "$as_me:$LINENO: result: yes" >&5
3401echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003402 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003403else echo "$as_me:$LINENO: result: no" >&5
3404echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003405fi
3406else
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 echo "$as_me:$LINENO: result: no" >&5
3408echo "${ECHO_T}no" >&6
3409fi;
Fred Drake109d9862001-07-11 06:27:56 +00003410
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003411# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003412
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003413if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003414then
Guido van Rossumedca74a1997-07-18 23:29:40 +00003415 case $GCC in
3416 yes)
3417 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003418 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003419 if test "$Py_DEBUG" = 'true' ; then
3420 # Optimization messes up debuggers, so turn it off for
3421 # debug builds.
3422 OPT="-g -Wall -Wstrict-prototypes"
3423 else
3424 OPT="-g -O3 -Wall -Wstrict-prototypes"
3425 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003426 *)
Fred Drake109d9862001-07-11 06:27:56 +00003427 OPT="-O3 -Wall -Wstrict-prototypes";;
3428 esac
3429 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003430 *)
3431 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003432 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003433 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
3434 *)
3435 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003436 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003437 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003438 case $ac_sys_system in
3439 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003440 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003441 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003442fi
3443
Fred Drakee1ceaa02001-12-04 20:55:47 +00003444if test "$Py_DEBUG" = 'true'; then
3445 :
3446else
3447 OPT="-DNDEBUG $OPT"
3448fi
3449
Trent Mick635f6fb2000-08-23 21:33:05 +00003450# The current (beta) Monterey compiler dies with optimizations
3451case $ac_sys_system in
3452Monterey*) OPT="";;
3453esac
3454
Guido van Rossum563e7081996-09-10 18:20:48 +00003455if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003456then
3457 OPT="$OPT $ac_arch_flags"
3458fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003459
Martin v. Löwis11437992002-04-12 09:54:03 +00003460echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3461echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3462if test "${ac_cv_opt_olimit_ok+set}" = set; then
3463 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003464else
3465 ac_save_cc="$CC"
3466CC="$CC -OPT:Olimit=0"
3467if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003468 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003469else
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 cat >conftest.$ac_ext <<_ACEOF
3471#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003472#include "confdefs.h"
3473int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003474_ACEOF
3475rm -f conftest$ac_exeext
3476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3477 (eval $ac_link) 2>&5
3478 ac_status=$?
3479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3482 (eval $ac_try) 2>&5
3483 ac_status=$?
3484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3485 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003486 ac_cv_opt_olimit_ok=yes
3487else
Martin v. Löwis11437992002-04-12 09:54:03 +00003488 echo "$as_me: program exited with status $ac_status" >&5
3489echo "$as_me: failed program was:" >&5
3490cat conftest.$ac_ext >&5
3491( exit $ac_status )
3492ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003494rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003495fi
Guido van Rossum91922671997-10-09 20:24:13 +00003496CC="$ac_save_cc"
3497fi
3498
Martin v. Löwis11437992002-04-12 09:54:03 +00003499echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3500echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003501if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003502 case $ac_sys_system in
3503 Darwin*) OPT="$OPT" ;;
3504 *) OPT="$OPT -OPT:Olimit=0";;
3505 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003506else
Martin v. Löwis11437992002-04-12 09:54:03 +00003507 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3508echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3509 if test "${ac_cv_olimit_ok+set}" = set; then
3510 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003511else
3512 ac_save_cc="$CC"
3513 CC="$CC -Olimit 1500"
3514 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003515 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003516else
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 cat >conftest.$ac_ext <<_ACEOF
3518#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003519#include "confdefs.h"
3520int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003521_ACEOF
3522rm -f conftest$ac_exeext
3523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3524 (eval $ac_link) 2>&5
3525 ac_status=$?
3526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3529 (eval $ac_try) 2>&5
3530 ac_status=$?
3531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3532 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003533 ac_cv_olimit_ok=yes
3534else
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 echo "$as_me: program exited with status $ac_status" >&5
3536echo "$as_me: failed program was:" >&5
3537cat conftest.$ac_ext >&5
3538( exit $ac_status )
3539ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003541rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003542fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003543 CC="$ac_save_cc"
3544fi
3545
Martin v. Löwis11437992002-04-12 09:54:03 +00003546 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3547echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003548 if test $ac_cv_olimit_ok = yes; then
3549 OPT="$OPT -Olimit 1500"
3550 fi
3551fi
3552
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003553# On some compilers, pthreads are available without further options
3554# (e.g. MacOS X). On some of these systems, the compiler will not
3555# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3556# So we have to see first whether pthreads are available without
3557# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003558echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3559echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3560if test "${ac_cv_pthread_is_default+set}" = set; then
3561 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003562else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003563 if test "$cross_compiling" = yes; then
3564 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003565else
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 cat >conftest.$ac_ext <<_ACEOF
3567#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003568#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003569
Martin v. Löwis130fb172001-07-19 11:00:41 +00003570#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003571
3572void* routine(void* p){return NULL;}
3573
3574int main(){
3575 pthread_t p;
3576 if(pthread_create(&p,NULL,routine,NULL)!=0)
3577 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003578 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003579 return 0;
3580}
3581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582_ACEOF
3583rm -f conftest$ac_exeext
3584if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3585 (eval $ac_link) 2>&5
3586 ac_status=$?
3587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3588 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3590 (eval $ac_try) 2>&5
3591 ac_status=$?
3592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3593 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003594 ac_cv_pthread_is_default=yes
3595else
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 echo "$as_me: program exited with status $ac_status" >&5
3597echo "$as_me: failed program was:" >&5
3598cat conftest.$ac_ext >&5
3599( exit $ac_status )
3600ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003601fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003602rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003603fi
3604
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003605fi
3606
Martin v. Löwis11437992002-04-12 09:54:03 +00003607echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3608echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003609
Michael W. Hudson54241132001-12-07 15:38:26 +00003610
Martin v. Löwis11437992002-04-12 09:54:03 +00003611if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003612then
3613 ac_cv_kpthread=no
3614else
3615# -Kpthread, if available, provides the right #defines
3616# and linker options to make pthread_create available
3617# Some compilers won't report that they do not support -Kpthread,
3618# so we need to run a program to see whether it really made the
3619# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003620echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3621echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3622if test "${ac_cv_kpthread+set}" = set; then
3623 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003624else
3625 ac_save_cc="$CC"
3626CC="$CC -Kpthread"
3627if test "$cross_compiling" = yes; then
3628 ac_cv_kpthread=no
3629else
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 cat >conftest.$ac_ext <<_ACEOF
3631#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003632#include "confdefs.h"
3633
3634#include <pthread.h>
3635
3636void* routine(void* p){return NULL;}
3637
3638int main(){
3639 pthread_t p;
3640 if(pthread_create(&p,NULL,routine,NULL)!=0)
3641 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003642 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003643 return 0;
3644}
3645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646_ACEOF
3647rm -f conftest$ac_exeext
3648if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3649 (eval $ac_link) 2>&5
3650 ac_status=$?
3651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3652 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3654 (eval $ac_try) 2>&5
3655 ac_status=$?
3656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3657 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003658 ac_cv_kpthread=yes
3659else
Martin v. Löwis11437992002-04-12 09:54:03 +00003660 echo "$as_me: program exited with status $ac_status" >&5
3661echo "$as_me: failed program was:" >&5
3662cat conftest.$ac_ext >&5
3663( exit $ac_status )
3664ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003665fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003666rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003667fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003668CC="$ac_save_cc"
3669fi
3670
Martin v. Löwis11437992002-04-12 09:54:03 +00003671echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3672echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003673fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003674
Michael W. Hudson54241132001-12-07 15:38:26 +00003675
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003676# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003677echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3678echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3679if test "${ac_cv_header_stdc+set}" = set; then
3680 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003681else
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 cat >conftest.$ac_ext <<_ACEOF
3683#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003684#include "confdefs.h"
3685#include <stdlib.h>
3686#include <stdarg.h>
3687#include <string.h>
3688#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003689
3690_ACEOF
3691if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3692 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3693 ac_status=$?
3694 egrep -v '^ *\+' conftest.er1 >conftest.err
3695 rm -f conftest.er1
3696 cat conftest.err >&5
3697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3698 (exit $ac_status); } >/dev/null; then
3699 if test -s conftest.err; then
3700 ac_cpp_err=$ac_c_preproc_warn_flag
3701 else
3702 ac_cpp_err=
3703 fi
3704else
3705 ac_cpp_err=yes
3706fi
3707if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003708 ac_cv_header_stdc=yes
3709else
Martin v. Löwis11437992002-04-12 09:54:03 +00003710 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003711 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003712 ac_cv_header_stdc=no
3713fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003714rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003715
3716if test $ac_cv_header_stdc = yes; then
3717 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 cat >conftest.$ac_ext <<_ACEOF
3719#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003720#include "confdefs.h"
3721#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003722
3723_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3725 egrep "memchr" >/dev/null 2>&1; then
3726 :
3727else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003728 ac_cv_header_stdc=no
3729fi
3730rm -f conftest*
3731
3732fi
3733
3734if test $ac_cv_header_stdc = yes; then
3735 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 cat >conftest.$ac_ext <<_ACEOF
3737#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003738#include "confdefs.h"
3739#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003740
3741_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3743 egrep "free" >/dev/null 2>&1; then
3744 :
3745else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003746 ac_cv_header_stdc=no
3747fi
3748rm -f conftest*
3749
3750fi
3751
3752if test $ac_cv_header_stdc = yes; then
3753 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003754 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003756else
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 cat >conftest.$ac_ext <<_ACEOF
3758#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003759#include "confdefs.h"
3760#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003761#if ((' ' & 0x0FF) == 0x020)
3762# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3763# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3764#else
3765# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3766 || ('j' <= (c) && (c) <= 'r') \
3767 || ('s' <= (c) && (c) <= 'z'))
3768# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3769#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003770
Martin v. Löwis11437992002-04-12 09:54:03 +00003771#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3772int
3773main ()
3774{
3775 int i;
3776 for (i = 0; i < 256; i++)
3777 if (XOR (islower (i), ISLOWER (i))
3778 || toupper (i) != TOUPPER (i))
3779 exit(2);
3780 exit (0);
3781}
3782_ACEOF
3783rm -f conftest$ac_exeext
3784if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3785 (eval $ac_link) 2>&5
3786 ac_status=$?
3787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3788 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3790 (eval $ac_try) 2>&5
3791 ac_status=$?
3792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3793 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003794 :
3795else
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 echo "$as_me: program exited with status $ac_status" >&5
3797echo "$as_me: failed program was:" >&5
3798cat conftest.$ac_ext >&5
3799( exit $ac_status )
3800ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003803fi
3804fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003805fi
3806echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3807echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003808if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003809
3810cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003811#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003812_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003813
3814fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003815
Martin v. Löwis11437992002-04-12 09:54:03 +00003816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003858libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003859signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00003860sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003861sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwis69532332001-10-13 09:12:41 +00003862sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00003863ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003864do
Martin v. Löwis11437992002-04-12 09:54:03 +00003865as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3866if eval "test \"\${$as_ac_Header+set}\" = set"; then
3867 echo "$as_me:$LINENO: checking for $ac_header" >&5
3868echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3869if eval "test \"\${$as_ac_Header+set}\" = set"; then
3870 echo $ECHO_N "(cached) $ECHO_C" >&6
3871fi
3872echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3873echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003874else
Martin v. Löwis11437992002-04-12 09:54:03 +00003875 # Is the header compilable?
3876echo "$as_me:$LINENO: checking $ac_header usability" >&5
3877echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3878cat >conftest.$ac_ext <<_ACEOF
3879#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003880#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003881$ac_includes_default
3882#include <$ac_header>
3883_ACEOF
3884rm -f conftest.$ac_objext
3885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3886 (eval $ac_compile) 2>&5
3887 ac_status=$?
3888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3889 (exit $ac_status); } &&
3890 { ac_try='test -s conftest.$ac_objext'
3891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3892 (eval $ac_try) 2>&5
3893 ac_status=$?
3894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3895 (exit $ac_status); }; }; then
3896 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003897else
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 echo "$as_me: failed program was:" >&5
3899cat conftest.$ac_ext >&5
3900ac_header_compiler=no
3901fi
3902rm -f conftest.$ac_objext conftest.$ac_ext
3903echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3904echo "${ECHO_T}$ac_header_compiler" >&6
3905
3906# Is the header present?
3907echo "$as_me:$LINENO: checking $ac_header presence" >&5
3908echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3909cat >conftest.$ac_ext <<_ACEOF
3910#line $LINENO "configure"
3911#include "confdefs.h"
3912#include <$ac_header>
3913_ACEOF
3914if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3915 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3916 ac_status=$?
3917 egrep -v '^ *\+' conftest.er1 >conftest.err
3918 rm -f conftest.er1
3919 cat conftest.err >&5
3920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3921 (exit $ac_status); } >/dev/null; then
3922 if test -s conftest.err; then
3923 ac_cpp_err=$ac_c_preproc_warn_flag
3924 else
3925 ac_cpp_err=
3926 fi
3927else
3928 ac_cpp_err=yes
3929fi
3930if test -z "$ac_cpp_err"; then
3931 ac_header_preproc=yes
3932else
3933 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003934 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003936fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003937rm -f conftest.err conftest.$ac_ext
3938echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3939echo "${ECHO_T}$ac_header_preproc" >&6
3940
3941# So? What about this header?
3942case $ac_header_compiler:$ac_header_preproc in
3943 yes:no )
3944 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3945echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3946 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3947echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3948 no:yes )
3949 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3950echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3951 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3952echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3953 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3954echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3955esac
3956echo "$as_me:$LINENO: checking for $ac_header" >&5
3957echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3958if eval "test \"\${$as_ac_Header+set}\" = set"; then
3959 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003960else
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003962fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003963echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3964echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3965
3966fi
3967if test `eval echo '${'$as_ac_Header'}'` = yes; then
3968 cat >>confdefs.h <<_ACEOF
3969#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3970_ACEOF
3971
3972fi
3973
Guido van Rossum627b2d71993-12-24 10:39:16 +00003974done
3975
Martin v. Löwis11437992002-04-12 09:54:03 +00003976
3977
3978
3979
3980
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003981ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003982for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
3983 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
3984echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
3985echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
3986if eval "test \"\${$as_ac_Header+set}\" = set"; then
3987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003988else
Martin v. Löwis11437992002-04-12 09:54:03 +00003989 cat >conftest.$ac_ext <<_ACEOF
3990#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003991#include "confdefs.h"
3992#include <sys/types.h>
3993#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00003994
3995#ifdef F77_DUMMY_MAIN
3996# ifdef __cplusplus
3997 extern "C"
3998# endif
3999 int F77_DUMMY_MAIN() { return 1; }
4000#endif
4001int
4002main ()
4003{
4004if ((DIR *) 0)
4005return 0;
4006 ;
4007 return 0;
4008}
4009_ACEOF
4010rm -f conftest.$ac_objext
4011if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4012 (eval $ac_compile) 2>&5
4013 ac_status=$?
4014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4015 (exit $ac_status); } &&
4016 { ac_try='test -s conftest.$ac_objext'
4017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4018 (eval $ac_try) 2>&5
4019 ac_status=$?
4020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4021 (exit $ac_status); }; }; then
4022 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004023else
Martin v. Löwis11437992002-04-12 09:54:03 +00004024 echo "$as_me: failed program was:" >&5
4025cat conftest.$ac_ext >&5
4026eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004028rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004029fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004030echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4031echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4032if test `eval echo '${'$as_ac_Header'}'` = yes; then
4033 cat >>confdefs.h <<_ACEOF
4034#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4035_ACEOF
4036
4037ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004038fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004040done
4041# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4042if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004043 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4044echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4045if test "${ac_cv_search_opendir+set}" = set; then
4046 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004047else
Martin v. Löwis11437992002-04-12 09:54:03 +00004048 ac_func_search_save_LIBS=$LIBS
4049ac_cv_search_opendir=no
4050cat >conftest.$ac_ext <<_ACEOF
4051#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004052#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004054/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004055#ifdef __cplusplus
4056extern "C"
4057#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004058/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004059 builtin and then its argument prototype would still apply. */
4060char opendir ();
4061#ifdef F77_DUMMY_MAIN
4062# ifdef __cplusplus
4063 extern "C"
4064# endif
4065 int F77_DUMMY_MAIN() { return 1; }
4066#endif
4067int
4068main ()
4069{
4070opendir ();
4071 ;
4072 return 0;
4073}
4074_ACEOF
4075rm -f conftest.$ac_objext conftest$ac_exeext
4076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4077 (eval $ac_link) 2>&5
4078 ac_status=$?
4079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4080 (exit $ac_status); } &&
4081 { ac_try='test -s conftest$ac_exeext'
4082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4083 (eval $ac_try) 2>&5
4084 ac_status=$?
4085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4086 (exit $ac_status); }; }; then
4087 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004088else
Martin v. Löwis11437992002-04-12 09:54:03 +00004089 echo "$as_me: failed program was:" >&5
4090cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004091fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004092rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4093if test "$ac_cv_search_opendir" = no; then
4094 for ac_lib in dir; do
4095 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4096 cat >conftest.$ac_ext <<_ACEOF
4097#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004098#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004099
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004100/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004101#ifdef __cplusplus
4102extern "C"
4103#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004104/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004105 builtin and then its argument prototype would still apply. */
4106char opendir ();
4107#ifdef F77_DUMMY_MAIN
4108# ifdef __cplusplus
4109 extern "C"
4110# endif
4111 int F77_DUMMY_MAIN() { return 1; }
4112#endif
4113int
4114main ()
4115{
4116opendir ();
4117 ;
4118 return 0;
4119}
4120_ACEOF
4121rm -f conftest.$ac_objext conftest$ac_exeext
4122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4123 (eval $ac_link) 2>&5
4124 ac_status=$?
4125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126 (exit $ac_status); } &&
4127 { ac_try='test -s conftest$ac_exeext'
4128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4129 (eval $ac_try) 2>&5
4130 ac_status=$?
4131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4132 (exit $ac_status); }; }; then
4133 ac_cv_search_opendir="-l$ac_lib"
4134break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004135else
Martin v. Löwis11437992002-04-12 09:54:03 +00004136 echo "$as_me: failed program was:" >&5
4137cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004138fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004139rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4140 done
4141fi
4142LIBS=$ac_func_search_save_LIBS
4143fi
4144echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4145echo "${ECHO_T}$ac_cv_search_opendir" >&6
4146if test "$ac_cv_search_opendir" != no; then
4147 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004150
Michael W. Hudson54241132001-12-07 15:38:26 +00004151else
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4153echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4154if test "${ac_cv_search_opendir+set}" = set; then
4155 echo $ECHO_N "(cached) $ECHO_C" >&6
4156else
4157 ac_func_search_save_LIBS=$LIBS
4158ac_cv_search_opendir=no
4159cat >conftest.$ac_ext <<_ACEOF
4160#line $LINENO "configure"
4161#include "confdefs.h"
4162
4163/* Override any gcc2 internal prototype to avoid an error. */
4164#ifdef __cplusplus
4165extern "C"
4166#endif
4167/* We use char because int might match the return type of a gcc2
4168 builtin and then its argument prototype would still apply. */
4169char opendir ();
4170#ifdef F77_DUMMY_MAIN
4171# ifdef __cplusplus
4172 extern "C"
4173# endif
4174 int F77_DUMMY_MAIN() { return 1; }
4175#endif
4176int
4177main ()
4178{
4179opendir ();
4180 ;
4181 return 0;
4182}
4183_ACEOF
4184rm -f conftest.$ac_objext conftest$ac_exeext
4185if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4186 (eval $ac_link) 2>&5
4187 ac_status=$?
4188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4189 (exit $ac_status); } &&
4190 { ac_try='test -s conftest$ac_exeext'
4191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4192 (eval $ac_try) 2>&5
4193 ac_status=$?
4194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195 (exit $ac_status); }; }; then
4196 ac_cv_search_opendir="none required"
4197else
4198 echo "$as_me: failed program was:" >&5
4199cat conftest.$ac_ext >&5
4200fi
4201rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4202if test "$ac_cv_search_opendir" = no; then
4203 for ac_lib in x; do
4204 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4205 cat >conftest.$ac_ext <<_ACEOF
4206#line $LINENO "configure"
4207#include "confdefs.h"
4208
4209/* Override any gcc2 internal prototype to avoid an error. */
4210#ifdef __cplusplus
4211extern "C"
4212#endif
4213/* We use char because int might match the return type of a gcc2
4214 builtin and then its argument prototype would still apply. */
4215char opendir ();
4216#ifdef F77_DUMMY_MAIN
4217# ifdef __cplusplus
4218 extern "C"
4219# endif
4220 int F77_DUMMY_MAIN() { return 1; }
4221#endif
4222int
4223main ()
4224{
4225opendir ();
4226 ;
4227 return 0;
4228}
4229_ACEOF
4230rm -f conftest.$ac_objext conftest$ac_exeext
4231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4232 (eval $ac_link) 2>&5
4233 ac_status=$?
4234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4235 (exit $ac_status); } &&
4236 { ac_try='test -s conftest$ac_exeext'
4237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4238 (eval $ac_try) 2>&5
4239 ac_status=$?
4240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4241 (exit $ac_status); }; }; then
4242 ac_cv_search_opendir="-l$ac_lib"
4243break
4244else
4245 echo "$as_me: failed program was:" >&5
4246cat conftest.$ac_ext >&5
4247fi
4248rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4249 done
4250fi
4251LIBS=$ac_func_search_save_LIBS
4252fi
4253echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4254echo "${ECHO_T}$ac_cv_search_opendir" >&6
4255if test "$ac_cv_search_opendir" != no; then
4256 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4257
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258fi
4259
4260fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004261
Michael W. Hudson54241132001-12-07 15:38:26 +00004262
Guido van Rossum627b2d71993-12-24 10:39:16 +00004263# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004264was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004265echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4266echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4267cat >conftest.$ac_ext <<_ACEOF
4268#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269#include "confdefs.h"
4270#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004271
4272_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4274 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004275 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004276else
Martin v. Löwis11437992002-04-12 09:54:03 +00004277
4278
4279cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004281_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004282
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004283
Guido van Rossum627b2d71993-12-24 10:39:16 +00004284fi
4285rm -f conftest*
4286
Martin v. Löwis11437992002-04-12 09:54:03 +00004287echo "$as_me:$LINENO: result: $was_it_defined" >&5
4288echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004289
Guido van Rossum810cc512001-09-09 23:51:39 +00004290# Two defines needed to enable largefile support on various platforms
4291# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004292
Martin v. Löwis11437992002-04-12 09:54:03 +00004293cat >>confdefs.h <<\_ACEOF
4294#define _LARGEFILE_SOURCE 1
4295_ACEOF
4296
4297
4298cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004299#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004300_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004301
Michael W. Hudson54241132001-12-07 15:38:26 +00004302
Guido van Rossum84e7b241996-08-19 21:59:00 +00004303# Add some code to confdefs.h so that the test for off_t works on SCO
4304cat >> confdefs.h <<\EOF
4305#if defined(SCO_DS)
4306#undef _OFF_T
4307#endif
4308EOF
4309
Guido van Rossumef2255b2000-03-10 22:30:29 +00004310# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004311echo "$as_me:$LINENO: checking for mode_t" >&5
4312echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4313if test "${ac_cv_type_mode_t+set}" = set; then
4314 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004315else
Martin v. Löwis11437992002-04-12 09:54:03 +00004316 cat >conftest.$ac_ext <<_ACEOF
4317#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004318#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004319$ac_includes_default
4320#ifdef F77_DUMMY_MAIN
4321# ifdef __cplusplus
4322 extern "C"
4323# endif
4324 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004325#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004326int
4327main ()
4328{
4329if ((mode_t *) 0)
4330 return 0;
4331if (sizeof (mode_t))
4332 return 0;
4333 ;
4334 return 0;
4335}
4336_ACEOF
4337rm -f conftest.$ac_objext
4338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4339 (eval $ac_compile) 2>&5
4340 ac_status=$?
4341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4342 (exit $ac_status); } &&
4343 { ac_try='test -s conftest.$ac_objext'
4344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4345 (eval $ac_try) 2>&5
4346 ac_status=$?
4347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4348 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004349 ac_cv_type_mode_t=yes
4350else
Martin v. Löwis11437992002-04-12 09:54:03 +00004351 echo "$as_me: failed program was:" >&5
4352cat conftest.$ac_ext >&5
4353ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004354fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004355rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004356fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004357echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4358echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4359if test $ac_cv_type_mode_t = yes; then
4360 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361else
Martin v. Löwis11437992002-04-12 09:54:03 +00004362
4363cat >>confdefs.h <<_ACEOF
4364#define mode_t int
4365_ACEOF
4366
4367fi
4368
4369echo "$as_me:$LINENO: checking for off_t" >&5
4370echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4371if test "${ac_cv_type_off_t+set}" = set; then
4372 echo $ECHO_N "(cached) $ECHO_C" >&6
4373else
4374 cat >conftest.$ac_ext <<_ACEOF
4375#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004376#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004377$ac_includes_default
4378#ifdef F77_DUMMY_MAIN
4379# ifdef __cplusplus
4380 extern "C"
4381# endif
4382 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004384int
4385main ()
4386{
4387if ((off_t *) 0)
4388 return 0;
4389if (sizeof (off_t))
4390 return 0;
4391 ;
4392 return 0;
4393}
4394_ACEOF
4395rm -f conftest.$ac_objext
4396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4397 (eval $ac_compile) 2>&5
4398 ac_status=$?
4399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4400 (exit $ac_status); } &&
4401 { ac_try='test -s conftest.$ac_objext'
4402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4403 (eval $ac_try) 2>&5
4404 ac_status=$?
4405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4406 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004407 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004408else
Martin v. Löwis11437992002-04-12 09:54:03 +00004409 echo "$as_me: failed program was:" >&5
4410cat conftest.$ac_ext >&5
4411ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004413rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004414fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004415echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4416echo "${ECHO_T}$ac_cv_type_off_t" >&6
4417if test $ac_cv_type_off_t = yes; then
4418 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004419else
Martin v. Löwis11437992002-04-12 09:54:03 +00004420
4421cat >>confdefs.h <<_ACEOF
4422#define off_t long
4423_ACEOF
4424
4425fi
4426
4427echo "$as_me:$LINENO: checking for pid_t" >&5
4428echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4429if test "${ac_cv_type_pid_t+set}" = set; then
4430 echo $ECHO_N "(cached) $ECHO_C" >&6
4431else
4432 cat >conftest.$ac_ext <<_ACEOF
4433#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004434#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004435$ac_includes_default
4436#ifdef F77_DUMMY_MAIN
4437# ifdef __cplusplus
4438 extern "C"
4439# endif
4440 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004442int
4443main ()
4444{
4445if ((pid_t *) 0)
4446 return 0;
4447if (sizeof (pid_t))
4448 return 0;
4449 ;
4450 return 0;
4451}
4452_ACEOF
4453rm -f conftest.$ac_objext
4454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4455 (eval $ac_compile) 2>&5
4456 ac_status=$?
4457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4458 (exit $ac_status); } &&
4459 { ac_try='test -s conftest.$ac_objext'
4460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4461 (eval $ac_try) 2>&5
4462 ac_status=$?
4463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4464 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004465 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004466else
Martin v. Löwis11437992002-04-12 09:54:03 +00004467 echo "$as_me: failed program was:" >&5
4468cat conftest.$ac_ext >&5
4469ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004470fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004471rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004472fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004473echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4474echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4475if test $ac_cv_type_pid_t = yes; then
4476 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004477else
Martin v. Löwis11437992002-04-12 09:54:03 +00004478
4479cat >>confdefs.h <<_ACEOF
4480#define pid_t int
4481_ACEOF
4482
4483fi
4484
4485echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4486echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4487if test "${ac_cv_type_signal+set}" = set; then
4488 echo $ECHO_N "(cached) $ECHO_C" >&6
4489else
4490 cat >conftest.$ac_ext <<_ACEOF
4491#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004492#include "confdefs.h"
4493#include <sys/types.h>
4494#include <signal.h>
4495#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004496# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004497#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004498#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004499extern "C" void (*signal (int, void (*)(int)))(int);
4500#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004501void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004502#endif
4503
Martin v. Löwis11437992002-04-12 09:54:03 +00004504#ifdef F77_DUMMY_MAIN
4505# ifdef __cplusplus
4506 extern "C"
4507# endif
4508 int F77_DUMMY_MAIN() { return 1; }
4509#endif
4510int
4511main ()
4512{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004513int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004514 ;
4515 return 0;
4516}
4517_ACEOF
4518rm -f conftest.$ac_objext
4519if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4520 (eval $ac_compile) 2>&5
4521 ac_status=$?
4522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4523 (exit $ac_status); } &&
4524 { ac_try='test -s conftest.$ac_objext'
4525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4526 (eval $ac_try) 2>&5
4527 ac_status=$?
4528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4529 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004530 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004531else
Martin v. Löwis11437992002-04-12 09:54:03 +00004532 echo "$as_me: failed program was:" >&5
4533cat conftest.$ac_ext >&5
4534ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00004535fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004536rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004537fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004538echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
4539echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004540
Martin v. Löwis11437992002-04-12 09:54:03 +00004541cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004542#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004543_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004544
Michael W. Hudson54241132001-12-07 15:38:26 +00004545
Martin v. Löwis11437992002-04-12 09:54:03 +00004546echo "$as_me:$LINENO: checking for size_t" >&5
4547echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4548if test "${ac_cv_type_size_t+set}" = set; then
4549 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004550else
Martin v. Löwis11437992002-04-12 09:54:03 +00004551 cat >conftest.$ac_ext <<_ACEOF
4552#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004553#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004554$ac_includes_default
4555#ifdef F77_DUMMY_MAIN
4556# ifdef __cplusplus
4557 extern "C"
4558# endif
4559 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004561int
4562main ()
4563{
4564if ((size_t *) 0)
4565 return 0;
4566if (sizeof (size_t))
4567 return 0;
4568 ;
4569 return 0;
4570}
4571_ACEOF
4572rm -f conftest.$ac_objext
4573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4574 (eval $ac_compile) 2>&5
4575 ac_status=$?
4576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4577 (exit $ac_status); } &&
4578 { ac_try='test -s conftest.$ac_objext'
4579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4580 (eval $ac_try) 2>&5
4581 ac_status=$?
4582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4583 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004584 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004585else
Martin v. Löwis11437992002-04-12 09:54:03 +00004586 echo "$as_me: failed program was:" >&5
4587cat conftest.$ac_ext >&5
4588ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004590rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004592echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
4593echo "${ECHO_T}$ac_cv_type_size_t" >&6
4594if test $ac_cv_type_size_t = yes; then
4595 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004596else
Martin v. Löwis11437992002-04-12 09:54:03 +00004597
4598cat >>confdefs.h <<_ACEOF
4599#define size_t unsigned
4600_ACEOF
4601
4602fi
4603
4604echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
4605echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4606if test "${ac_cv_type_uid_t+set}" = set; then
4607 echo $ECHO_N "(cached) $ECHO_C" >&6
4608else
4609 cat >conftest.$ac_ext <<_ACEOF
4610#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004611#include "confdefs.h"
4612#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004613
4614_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004615if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4616 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004617 ac_cv_type_uid_t=yes
4618else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004619 ac_cv_type_uid_t=no
4620fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004621rm -f conftest*
4622
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004623fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004624echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
4625echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004626if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004627
Martin v. Löwis11437992002-04-12 09:54:03 +00004628cat >>confdefs.h <<\_ACEOF
4629#define uid_t int
4630_ACEOF
4631
4632
4633cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004634#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00004635_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004636
4637fi
4638
Jack Jansendd19cf82001-12-06 22:36:17 +00004639
Michael W. Hudson54241132001-12-07 15:38:26 +00004640# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00004641echo "$as_me:$LINENO: checking for int" >&5
4642echo $ECHO_N "checking for int... $ECHO_C" >&6
4643if test "${ac_cv_type_int+set}" = set; then
4644 echo $ECHO_N "(cached) $ECHO_C" >&6
4645else
4646 cat >conftest.$ac_ext <<_ACEOF
4647#line $LINENO "configure"
4648#include "confdefs.h"
4649$ac_includes_default
4650#ifdef F77_DUMMY_MAIN
4651# ifdef __cplusplus
4652 extern "C"
4653# endif
4654 int F77_DUMMY_MAIN() { return 1; }
4655#endif
4656int
4657main ()
4658{
4659if ((int *) 0)
4660 return 0;
4661if (sizeof (int))
4662 return 0;
4663 ;
4664 return 0;
4665}
4666_ACEOF
4667rm -f conftest.$ac_objext
4668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4669 (eval $ac_compile) 2>&5
4670 ac_status=$?
4671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4672 (exit $ac_status); } &&
4673 { ac_try='test -s conftest.$ac_objext'
4674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4675 (eval $ac_try) 2>&5
4676 ac_status=$?
4677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4678 (exit $ac_status); }; }; then
4679 ac_cv_type_int=yes
4680else
4681 echo "$as_me: failed program was:" >&5
4682cat conftest.$ac_ext >&5
4683ac_cv_type_int=no
4684fi
4685rm -f conftest.$ac_objext conftest.$ac_ext
4686fi
4687echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
4688echo "${ECHO_T}$ac_cv_type_int" >&6
4689
4690echo "$as_me:$LINENO: checking size of int" >&5
4691echo $ECHO_N "checking size of int... $ECHO_C" >&6
4692if test "${ac_cv_sizeof_int+set}" = set; then
4693 echo $ECHO_N "(cached) $ECHO_C" >&6
4694else
4695 if test "$ac_cv_type_int" = yes; then
4696 # The cast to unsigned long works around a bug in the HP C Compiler
4697 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4698 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4699 # This bug is HP SR number 8606223364.
4700 if test "$cross_compiling" = yes; then
4701 # Depending upon the size, compute the lo and hi bounds.
4702cat >conftest.$ac_ext <<_ACEOF
4703#line $LINENO "configure"
4704#include "confdefs.h"
4705$ac_includes_default
4706#ifdef F77_DUMMY_MAIN
4707# ifdef __cplusplus
4708 extern "C"
4709# endif
4710 int F77_DUMMY_MAIN() { return 1; }
4711#endif
4712int
4713main ()
4714{
4715static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
4716test_array [0] = 0
4717
4718 ;
4719 return 0;
4720}
4721_ACEOF
4722rm -f conftest.$ac_objext
4723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4724 (eval $ac_compile) 2>&5
4725 ac_status=$?
4726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4727 (exit $ac_status); } &&
4728 { ac_try='test -s conftest.$ac_objext'
4729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4730 (eval $ac_try) 2>&5
4731 ac_status=$?
4732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4733 (exit $ac_status); }; }; then
4734 ac_lo=0 ac_mid=0
4735 while :; do
4736 cat >conftest.$ac_ext <<_ACEOF
4737#line $LINENO "configure"
4738#include "confdefs.h"
4739$ac_includes_default
4740#ifdef F77_DUMMY_MAIN
4741# ifdef __cplusplus
4742 extern "C"
4743# endif
4744 int F77_DUMMY_MAIN() { return 1; }
4745#endif
4746int
4747main ()
4748{
4749static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4750test_array [0] = 0
4751
4752 ;
4753 return 0;
4754}
4755_ACEOF
4756rm -f conftest.$ac_objext
4757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4758 (eval $ac_compile) 2>&5
4759 ac_status=$?
4760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4761 (exit $ac_status); } &&
4762 { ac_try='test -s conftest.$ac_objext'
4763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4764 (eval $ac_try) 2>&5
4765 ac_status=$?
4766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4767 (exit $ac_status); }; }; then
4768 ac_hi=$ac_mid; break
4769else
4770 echo "$as_me: failed program was:" >&5
4771cat conftest.$ac_ext >&5
4772ac_lo=`expr $ac_mid + 1`
4773 if test $ac_lo -le $ac_mid; then
4774 ac_lo= ac_hi=
4775 break
4776 fi
4777 ac_mid=`expr 2 '*' $ac_mid + 1`
4778fi
4779rm -f conftest.$ac_objext conftest.$ac_ext
4780 done
4781else
4782 echo "$as_me: failed program was:" >&5
4783cat conftest.$ac_ext >&5
4784cat >conftest.$ac_ext <<_ACEOF
4785#line $LINENO "configure"
4786#include "confdefs.h"
4787$ac_includes_default
4788#ifdef F77_DUMMY_MAIN
4789# ifdef __cplusplus
4790 extern "C"
4791# endif
4792 int F77_DUMMY_MAIN() { return 1; }
4793#endif
4794int
4795main ()
4796{
4797static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
4798test_array [0] = 0
4799
4800 ;
4801 return 0;
4802}
4803_ACEOF
4804rm -f conftest.$ac_objext
4805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4806 (eval $ac_compile) 2>&5
4807 ac_status=$?
4808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); } &&
4810 { ac_try='test -s conftest.$ac_objext'
4811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4812 (eval $ac_try) 2>&5
4813 ac_status=$?
4814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815 (exit $ac_status); }; }; then
4816 ac_hi=-1 ac_mid=-1
4817 while :; do
4818 cat >conftest.$ac_ext <<_ACEOF
4819#line $LINENO "configure"
4820#include "confdefs.h"
4821$ac_includes_default
4822#ifdef F77_DUMMY_MAIN
4823# ifdef __cplusplus
4824 extern "C"
4825# endif
4826 int F77_DUMMY_MAIN() { return 1; }
4827#endif
4828int
4829main ()
4830{
4831static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
4832test_array [0] = 0
4833
4834 ;
4835 return 0;
4836}
4837_ACEOF
4838rm -f conftest.$ac_objext
4839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4840 (eval $ac_compile) 2>&5
4841 ac_status=$?
4842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4843 (exit $ac_status); } &&
4844 { ac_try='test -s conftest.$ac_objext'
4845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4846 (eval $ac_try) 2>&5
4847 ac_status=$?
4848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4849 (exit $ac_status); }; }; then
4850 ac_lo=$ac_mid; break
4851else
4852 echo "$as_me: failed program was:" >&5
4853cat conftest.$ac_ext >&5
4854ac_hi=`expr '(' $ac_mid ')' - 1`
4855 if test $ac_mid -le $ac_hi; then
4856 ac_lo= ac_hi=
4857 break
4858 fi
4859 ac_mid=`expr 2 '*' $ac_mid`
4860fi
4861rm -f conftest.$ac_objext conftest.$ac_ext
4862 done
4863else
4864 echo "$as_me: failed program was:" >&5
4865cat conftest.$ac_ext >&5
4866ac_lo= ac_hi=
4867fi
4868rm -f conftest.$ac_objext conftest.$ac_ext
4869fi
4870rm -f conftest.$ac_objext conftest.$ac_ext
4871# Binary search between lo and hi bounds.
4872while test "x$ac_lo" != "x$ac_hi"; do
4873 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
4874 cat >conftest.$ac_ext <<_ACEOF
4875#line $LINENO "configure"
4876#include "confdefs.h"
4877$ac_includes_default
4878#ifdef F77_DUMMY_MAIN
4879# ifdef __cplusplus
4880 extern "C"
4881# endif
4882 int F77_DUMMY_MAIN() { return 1; }
4883#endif
4884int
4885main ()
4886{
4887static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
4888test_array [0] = 0
4889
4890 ;
4891 return 0;
4892}
4893_ACEOF
4894rm -f conftest.$ac_objext
4895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4896 (eval $ac_compile) 2>&5
4897 ac_status=$?
4898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4899 (exit $ac_status); } &&
4900 { ac_try='test -s conftest.$ac_objext'
4901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4902 (eval $ac_try) 2>&5
4903 ac_status=$?
4904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4905 (exit $ac_status); }; }; then
4906 ac_hi=$ac_mid
4907else
4908 echo "$as_me: failed program was:" >&5
4909cat conftest.$ac_ext >&5
4910ac_lo=`expr '(' $ac_mid ')' + 1`
4911fi
4912rm -f conftest.$ac_objext conftest.$ac_ext
4913done
4914case $ac_lo in
4915?*) ac_cv_sizeof_int=$ac_lo;;
4916'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4917echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4918 { (exit 1); exit 1; }; } ;;
4919esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004920else
4921 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004922 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
4923echo "$as_me: error: cannot run test program while cross compiling" >&2;}
4924 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004925else
Martin v. Löwis11437992002-04-12 09:54:03 +00004926 cat >conftest.$ac_ext <<_ACEOF
4927#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004928#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004929$ac_includes_default
4930long longval () { return (long) (sizeof (int)); }
4931unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00004932#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004933#include <stdlib.h>
4934#ifdef F77_DUMMY_MAIN
4935# ifdef __cplusplus
4936 extern "C"
4937# endif
4938 int F77_DUMMY_MAIN() { return 1; }
4939#endif
4940int
4941main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004942{
Martin v. Löwis11437992002-04-12 09:54:03 +00004943
4944 FILE *f = fopen ("conftest.val", "w");
4945 if (! f)
4946 exit (1);
4947 if (((long) (sizeof (int))) < 0)
4948 {
4949 long i = longval ();
4950 if (i != ((long) (sizeof (int))))
4951 exit (1);
4952 fprintf (f, "%ld\n", i);
4953 }
4954 else
4955 {
4956 unsigned long i = ulongval ();
4957 if (i != ((long) (sizeof (int))))
4958 exit (1);
4959 fprintf (f, "%lu\n", i);
4960 }
4961 exit (ferror (f) || fclose (f) != 0);
4962
4963 ;
4964 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004965}
Martin v. Löwis11437992002-04-12 09:54:03 +00004966_ACEOF
4967rm -f conftest$ac_exeext
4968if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4969 (eval $ac_link) 2>&5
4970 ac_status=$?
4971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4972 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4974 (eval $ac_try) 2>&5
4975 ac_status=$?
4976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977 (exit $ac_status); }; }; then
4978 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004979else
Martin v. Löwis11437992002-04-12 09:54:03 +00004980 echo "$as_me: program exited with status $ac_status" >&5
4981echo "$as_me: failed program was:" >&5
4982cat conftest.$ac_ext >&5
4983( exit $ac_status )
4984{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
4985echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
4986 { (exit 1); exit 1; }; }
4987fi
4988rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4989fi
4990fi
4991rm -f conftest.val
4992else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004993 ac_cv_sizeof_int=0
4994fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004995fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004996echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
4997echo "${ECHO_T}$ac_cv_sizeof_int" >&6
4998cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00004999#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005000_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005001
5002
Martin v. Löwis11437992002-04-12 09:54:03 +00005003echo "$as_me:$LINENO: checking for long" >&5
5004echo $ECHO_N "checking for long... $ECHO_C" >&6
5005if test "${ac_cv_type_long+set}" = set; then
5006 echo $ECHO_N "(cached) $ECHO_C" >&6
5007else
5008 cat >conftest.$ac_ext <<_ACEOF
5009#line $LINENO "configure"
5010#include "confdefs.h"
5011$ac_includes_default
5012#ifdef F77_DUMMY_MAIN
5013# ifdef __cplusplus
5014 extern "C"
5015# endif
5016 int F77_DUMMY_MAIN() { return 1; }
5017#endif
5018int
5019main ()
5020{
5021if ((long *) 0)
5022 return 0;
5023if (sizeof (long))
5024 return 0;
5025 ;
5026 return 0;
5027}
5028_ACEOF
5029rm -f conftest.$ac_objext
5030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5031 (eval $ac_compile) 2>&5
5032 ac_status=$?
5033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5034 (exit $ac_status); } &&
5035 { ac_try='test -s conftest.$ac_objext'
5036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5037 (eval $ac_try) 2>&5
5038 ac_status=$?
5039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5040 (exit $ac_status); }; }; then
5041 ac_cv_type_long=yes
5042else
5043 echo "$as_me: failed program was:" >&5
5044cat conftest.$ac_ext >&5
5045ac_cv_type_long=no
5046fi
5047rm -f conftest.$ac_objext conftest.$ac_ext
5048fi
5049echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5050echo "${ECHO_T}$ac_cv_type_long" >&6
5051
5052echo "$as_me:$LINENO: checking size of long" >&5
5053echo $ECHO_N "checking size of long... $ECHO_C" >&6
5054if test "${ac_cv_sizeof_long+set}" = set; then
5055 echo $ECHO_N "(cached) $ECHO_C" >&6
5056else
5057 if test "$ac_cv_type_long" = yes; then
5058 # The cast to unsigned long works around a bug in the HP C Compiler
5059 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5060 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5061 # This bug is HP SR number 8606223364.
5062 if test "$cross_compiling" = yes; then
5063 # Depending upon the size, compute the lo and hi bounds.
5064cat >conftest.$ac_ext <<_ACEOF
5065#line $LINENO "configure"
5066#include "confdefs.h"
5067$ac_includes_default
5068#ifdef F77_DUMMY_MAIN
5069# ifdef __cplusplus
5070 extern "C"
5071# endif
5072 int F77_DUMMY_MAIN() { return 1; }
5073#endif
5074int
5075main ()
5076{
5077static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5078test_array [0] = 0
5079
5080 ;
5081 return 0;
5082}
5083_ACEOF
5084rm -f conftest.$ac_objext
5085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5086 (eval $ac_compile) 2>&5
5087 ac_status=$?
5088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5089 (exit $ac_status); } &&
5090 { ac_try='test -s conftest.$ac_objext'
5091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5092 (eval $ac_try) 2>&5
5093 ac_status=$?
5094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5095 (exit $ac_status); }; }; then
5096 ac_lo=0 ac_mid=0
5097 while :; do
5098 cat >conftest.$ac_ext <<_ACEOF
5099#line $LINENO "configure"
5100#include "confdefs.h"
5101$ac_includes_default
5102#ifdef F77_DUMMY_MAIN
5103# ifdef __cplusplus
5104 extern "C"
5105# endif
5106 int F77_DUMMY_MAIN() { return 1; }
5107#endif
5108int
5109main ()
5110{
5111static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5112test_array [0] = 0
5113
5114 ;
5115 return 0;
5116}
5117_ACEOF
5118rm -f conftest.$ac_objext
5119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5120 (eval $ac_compile) 2>&5
5121 ac_status=$?
5122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5123 (exit $ac_status); } &&
5124 { ac_try='test -s conftest.$ac_objext'
5125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5126 (eval $ac_try) 2>&5
5127 ac_status=$?
5128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5129 (exit $ac_status); }; }; then
5130 ac_hi=$ac_mid; break
5131else
5132 echo "$as_me: failed program was:" >&5
5133cat conftest.$ac_ext >&5
5134ac_lo=`expr $ac_mid + 1`
5135 if test $ac_lo -le $ac_mid; then
5136 ac_lo= ac_hi=
5137 break
5138 fi
5139 ac_mid=`expr 2 '*' $ac_mid + 1`
5140fi
5141rm -f conftest.$ac_objext conftest.$ac_ext
5142 done
5143else
5144 echo "$as_me: failed program was:" >&5
5145cat conftest.$ac_ext >&5
5146cat >conftest.$ac_ext <<_ACEOF
5147#line $LINENO "configure"
5148#include "confdefs.h"
5149$ac_includes_default
5150#ifdef F77_DUMMY_MAIN
5151# ifdef __cplusplus
5152 extern "C"
5153# endif
5154 int F77_DUMMY_MAIN() { return 1; }
5155#endif
5156int
5157main ()
5158{
5159static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5160test_array [0] = 0
5161
5162 ;
5163 return 0;
5164}
5165_ACEOF
5166rm -f conftest.$ac_objext
5167if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5168 (eval $ac_compile) 2>&5
5169 ac_status=$?
5170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5171 (exit $ac_status); } &&
5172 { ac_try='test -s conftest.$ac_objext'
5173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5174 (eval $ac_try) 2>&5
5175 ac_status=$?
5176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5177 (exit $ac_status); }; }; then
5178 ac_hi=-1 ac_mid=-1
5179 while :; do
5180 cat >conftest.$ac_ext <<_ACEOF
5181#line $LINENO "configure"
5182#include "confdefs.h"
5183$ac_includes_default
5184#ifdef F77_DUMMY_MAIN
5185# ifdef __cplusplus
5186 extern "C"
5187# endif
5188 int F77_DUMMY_MAIN() { return 1; }
5189#endif
5190int
5191main ()
5192{
5193static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5194test_array [0] = 0
5195
5196 ;
5197 return 0;
5198}
5199_ACEOF
5200rm -f conftest.$ac_objext
5201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5202 (eval $ac_compile) 2>&5
5203 ac_status=$?
5204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5205 (exit $ac_status); } &&
5206 { ac_try='test -s conftest.$ac_objext'
5207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5208 (eval $ac_try) 2>&5
5209 ac_status=$?
5210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5211 (exit $ac_status); }; }; then
5212 ac_lo=$ac_mid; break
5213else
5214 echo "$as_me: failed program was:" >&5
5215cat conftest.$ac_ext >&5
5216ac_hi=`expr '(' $ac_mid ')' - 1`
5217 if test $ac_mid -le $ac_hi; then
5218 ac_lo= ac_hi=
5219 break
5220 fi
5221 ac_mid=`expr 2 '*' $ac_mid`
5222fi
5223rm -f conftest.$ac_objext conftest.$ac_ext
5224 done
5225else
5226 echo "$as_me: failed program was:" >&5
5227cat conftest.$ac_ext >&5
5228ac_lo= ac_hi=
5229fi
5230rm -f conftest.$ac_objext conftest.$ac_ext
5231fi
5232rm -f conftest.$ac_objext conftest.$ac_ext
5233# Binary search between lo and hi bounds.
5234while test "x$ac_lo" != "x$ac_hi"; do
5235 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5236 cat >conftest.$ac_ext <<_ACEOF
5237#line $LINENO "configure"
5238#include "confdefs.h"
5239$ac_includes_default
5240#ifdef F77_DUMMY_MAIN
5241# ifdef __cplusplus
5242 extern "C"
5243# endif
5244 int F77_DUMMY_MAIN() { return 1; }
5245#endif
5246int
5247main ()
5248{
5249static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5250test_array [0] = 0
5251
5252 ;
5253 return 0;
5254}
5255_ACEOF
5256rm -f conftest.$ac_objext
5257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5258 (eval $ac_compile) 2>&5
5259 ac_status=$?
5260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5261 (exit $ac_status); } &&
5262 { ac_try='test -s conftest.$ac_objext'
5263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5264 (eval $ac_try) 2>&5
5265 ac_status=$?
5266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267 (exit $ac_status); }; }; then
5268 ac_hi=$ac_mid
5269else
5270 echo "$as_me: failed program was:" >&5
5271cat conftest.$ac_ext >&5
5272ac_lo=`expr '(' $ac_mid ')' + 1`
5273fi
5274rm -f conftest.$ac_objext conftest.$ac_ext
5275done
5276case $ac_lo in
5277?*) ac_cv_sizeof_long=$ac_lo;;
5278'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5279echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5280 { (exit 1); exit 1; }; } ;;
5281esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005282else
5283 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005284 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5285echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5286 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005287else
Martin v. Löwis11437992002-04-12 09:54:03 +00005288 cat >conftest.$ac_ext <<_ACEOF
5289#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005290#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005291$ac_includes_default
5292long longval () { return (long) (sizeof (long)); }
5293unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005294#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005295#include <stdlib.h>
5296#ifdef F77_DUMMY_MAIN
5297# ifdef __cplusplus
5298 extern "C"
5299# endif
5300 int F77_DUMMY_MAIN() { return 1; }
5301#endif
5302int
5303main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005304{
Martin v. Löwis11437992002-04-12 09:54:03 +00005305
5306 FILE *f = fopen ("conftest.val", "w");
5307 if (! f)
5308 exit (1);
5309 if (((long) (sizeof (long))) < 0)
5310 {
5311 long i = longval ();
5312 if (i != ((long) (sizeof (long))))
5313 exit (1);
5314 fprintf (f, "%ld\n", i);
5315 }
5316 else
5317 {
5318 unsigned long i = ulongval ();
5319 if (i != ((long) (sizeof (long))))
5320 exit (1);
5321 fprintf (f, "%lu\n", i);
5322 }
5323 exit (ferror (f) || fclose (f) != 0);
5324
5325 ;
5326 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005327}
Martin v. Löwis11437992002-04-12 09:54:03 +00005328_ACEOF
5329rm -f conftest$ac_exeext
5330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5331 (eval $ac_link) 2>&5
5332 ac_status=$?
5333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5334 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5336 (eval $ac_try) 2>&5
5337 ac_status=$?
5338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5339 (exit $ac_status); }; }; then
5340 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005341else
Martin v. Löwis11437992002-04-12 09:54:03 +00005342 echo "$as_me: program exited with status $ac_status" >&5
5343echo "$as_me: failed program was:" >&5
5344cat conftest.$ac_ext >&5
5345( exit $ac_status )
5346{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5347echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5348 { (exit 1); exit 1; }; }
5349fi
5350rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5351fi
5352fi
5353rm -f conftest.val
5354else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005355 ac_cv_sizeof_long=0
5356fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005358echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5359echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5360cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005361#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005362_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005363
5364
Martin v. Löwis11437992002-04-12 09:54:03 +00005365echo "$as_me:$LINENO: checking for void *" >&5
5366echo $ECHO_N "checking for void *... $ECHO_C" >&6
5367if test "${ac_cv_type_void_p+set}" = set; then
5368 echo $ECHO_N "(cached) $ECHO_C" >&6
5369else
5370 cat >conftest.$ac_ext <<_ACEOF
5371#line $LINENO "configure"
5372#include "confdefs.h"
5373$ac_includes_default
5374#ifdef F77_DUMMY_MAIN
5375# ifdef __cplusplus
5376 extern "C"
5377# endif
5378 int F77_DUMMY_MAIN() { return 1; }
5379#endif
5380int
5381main ()
5382{
5383if ((void * *) 0)
5384 return 0;
5385if (sizeof (void *))
5386 return 0;
5387 ;
5388 return 0;
5389}
5390_ACEOF
5391rm -f conftest.$ac_objext
5392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5393 (eval $ac_compile) 2>&5
5394 ac_status=$?
5395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5396 (exit $ac_status); } &&
5397 { ac_try='test -s conftest.$ac_objext'
5398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5399 (eval $ac_try) 2>&5
5400 ac_status=$?
5401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5402 (exit $ac_status); }; }; then
5403 ac_cv_type_void_p=yes
5404else
5405 echo "$as_me: failed program was:" >&5
5406cat conftest.$ac_ext >&5
5407ac_cv_type_void_p=no
5408fi
5409rm -f conftest.$ac_objext conftest.$ac_ext
5410fi
5411echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5412echo "${ECHO_T}$ac_cv_type_void_p" >&6
5413
5414echo "$as_me:$LINENO: checking size of void *" >&5
5415echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5416if test "${ac_cv_sizeof_void_p+set}" = set; then
5417 echo $ECHO_N "(cached) $ECHO_C" >&6
5418else
5419 if test "$ac_cv_type_void_p" = yes; then
5420 # The cast to unsigned long works around a bug in the HP C Compiler
5421 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5422 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5423 # This bug is HP SR number 8606223364.
5424 if test "$cross_compiling" = yes; then
5425 # Depending upon the size, compute the lo and hi bounds.
5426cat >conftest.$ac_ext <<_ACEOF
5427#line $LINENO "configure"
5428#include "confdefs.h"
5429$ac_includes_default
5430#ifdef F77_DUMMY_MAIN
5431# ifdef __cplusplus
5432 extern "C"
5433# endif
5434 int F77_DUMMY_MAIN() { return 1; }
5435#endif
5436int
5437main ()
5438{
5439static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5440test_array [0] = 0
5441
5442 ;
5443 return 0;
5444}
5445_ACEOF
5446rm -f conftest.$ac_objext
5447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5448 (eval $ac_compile) 2>&5
5449 ac_status=$?
5450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5451 (exit $ac_status); } &&
5452 { ac_try='test -s conftest.$ac_objext'
5453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5454 (eval $ac_try) 2>&5
5455 ac_status=$?
5456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5457 (exit $ac_status); }; }; then
5458 ac_lo=0 ac_mid=0
5459 while :; do
5460 cat >conftest.$ac_ext <<_ACEOF
5461#line $LINENO "configure"
5462#include "confdefs.h"
5463$ac_includes_default
5464#ifdef F77_DUMMY_MAIN
5465# ifdef __cplusplus
5466 extern "C"
5467# endif
5468 int F77_DUMMY_MAIN() { return 1; }
5469#endif
5470int
5471main ()
5472{
5473static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5474test_array [0] = 0
5475
5476 ;
5477 return 0;
5478}
5479_ACEOF
5480rm -f conftest.$ac_objext
5481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5482 (eval $ac_compile) 2>&5
5483 ac_status=$?
5484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5485 (exit $ac_status); } &&
5486 { ac_try='test -s conftest.$ac_objext'
5487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5488 (eval $ac_try) 2>&5
5489 ac_status=$?
5490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5491 (exit $ac_status); }; }; then
5492 ac_hi=$ac_mid; break
5493else
5494 echo "$as_me: failed program was:" >&5
5495cat conftest.$ac_ext >&5
5496ac_lo=`expr $ac_mid + 1`
5497 if test $ac_lo -le $ac_mid; then
5498 ac_lo= ac_hi=
5499 break
5500 fi
5501 ac_mid=`expr 2 '*' $ac_mid + 1`
5502fi
5503rm -f conftest.$ac_objext conftest.$ac_ext
5504 done
5505else
5506 echo "$as_me: failed program was:" >&5
5507cat conftest.$ac_ext >&5
5508cat >conftest.$ac_ext <<_ACEOF
5509#line $LINENO "configure"
5510#include "confdefs.h"
5511$ac_includes_default
5512#ifdef F77_DUMMY_MAIN
5513# ifdef __cplusplus
5514 extern "C"
5515# endif
5516 int F77_DUMMY_MAIN() { return 1; }
5517#endif
5518int
5519main ()
5520{
5521static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5522test_array [0] = 0
5523
5524 ;
5525 return 0;
5526}
5527_ACEOF
5528rm -f conftest.$ac_objext
5529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5530 (eval $ac_compile) 2>&5
5531 ac_status=$?
5532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5533 (exit $ac_status); } &&
5534 { ac_try='test -s conftest.$ac_objext'
5535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5536 (eval $ac_try) 2>&5
5537 ac_status=$?
5538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5539 (exit $ac_status); }; }; then
5540 ac_hi=-1 ac_mid=-1
5541 while :; do
5542 cat >conftest.$ac_ext <<_ACEOF
5543#line $LINENO "configure"
5544#include "confdefs.h"
5545$ac_includes_default
5546#ifdef F77_DUMMY_MAIN
5547# ifdef __cplusplus
5548 extern "C"
5549# endif
5550 int F77_DUMMY_MAIN() { return 1; }
5551#endif
5552int
5553main ()
5554{
5555static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
5556test_array [0] = 0
5557
5558 ;
5559 return 0;
5560}
5561_ACEOF
5562rm -f conftest.$ac_objext
5563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5564 (eval $ac_compile) 2>&5
5565 ac_status=$?
5566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5567 (exit $ac_status); } &&
5568 { ac_try='test -s conftest.$ac_objext'
5569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5570 (eval $ac_try) 2>&5
5571 ac_status=$?
5572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5573 (exit $ac_status); }; }; then
5574 ac_lo=$ac_mid; break
5575else
5576 echo "$as_me: failed program was:" >&5
5577cat conftest.$ac_ext >&5
5578ac_hi=`expr '(' $ac_mid ')' - 1`
5579 if test $ac_mid -le $ac_hi; then
5580 ac_lo= ac_hi=
5581 break
5582 fi
5583 ac_mid=`expr 2 '*' $ac_mid`
5584fi
5585rm -f conftest.$ac_objext conftest.$ac_ext
5586 done
5587else
5588 echo "$as_me: failed program was:" >&5
5589cat conftest.$ac_ext >&5
5590ac_lo= ac_hi=
5591fi
5592rm -f conftest.$ac_objext conftest.$ac_ext
5593fi
5594rm -f conftest.$ac_objext conftest.$ac_ext
5595# Binary search between lo and hi bounds.
5596while test "x$ac_lo" != "x$ac_hi"; do
5597 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5598 cat >conftest.$ac_ext <<_ACEOF
5599#line $LINENO "configure"
5600#include "confdefs.h"
5601$ac_includes_default
5602#ifdef F77_DUMMY_MAIN
5603# ifdef __cplusplus
5604 extern "C"
5605# endif
5606 int F77_DUMMY_MAIN() { return 1; }
5607#endif
5608int
5609main ()
5610{
5611static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5612test_array [0] = 0
5613
5614 ;
5615 return 0;
5616}
5617_ACEOF
5618rm -f conftest.$ac_objext
5619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5620 (eval $ac_compile) 2>&5
5621 ac_status=$?
5622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5623 (exit $ac_status); } &&
5624 { ac_try='test -s conftest.$ac_objext'
5625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5626 (eval $ac_try) 2>&5
5627 ac_status=$?
5628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5629 (exit $ac_status); }; }; then
5630 ac_hi=$ac_mid
5631else
5632 echo "$as_me: failed program was:" >&5
5633cat conftest.$ac_ext >&5
5634ac_lo=`expr '(' $ac_mid ')' + 1`
5635fi
5636rm -f conftest.$ac_objext conftest.$ac_ext
5637done
5638case $ac_lo in
5639?*) ac_cv_sizeof_void_p=$ac_lo;;
5640'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5641echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5642 { (exit 1); exit 1; }; } ;;
5643esac
Guido van Rossumad678af1998-10-02 14:42:15 +00005644else
5645 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005646 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5647echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5648 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00005649else
Martin v. Löwis11437992002-04-12 09:54:03 +00005650 cat >conftest.$ac_ext <<_ACEOF
5651#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00005652#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005653$ac_includes_default
5654long longval () { return (long) (sizeof (void *)); }
5655unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005656#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005657#include <stdlib.h>
5658#ifdef F77_DUMMY_MAIN
5659# ifdef __cplusplus
5660 extern "C"
5661# endif
5662 int F77_DUMMY_MAIN() { return 1; }
5663#endif
5664int
5665main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00005666{
Martin v. Löwis11437992002-04-12 09:54:03 +00005667
5668 FILE *f = fopen ("conftest.val", "w");
5669 if (! f)
5670 exit (1);
5671 if (((long) (sizeof (void *))) < 0)
5672 {
5673 long i = longval ();
5674 if (i != ((long) (sizeof (void *))))
5675 exit (1);
5676 fprintf (f, "%ld\n", i);
5677 }
5678 else
5679 {
5680 unsigned long i = ulongval ();
5681 if (i != ((long) (sizeof (void *))))
5682 exit (1);
5683 fprintf (f, "%lu\n", i);
5684 }
5685 exit (ferror (f) || fclose (f) != 0);
5686
5687 ;
5688 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00005689}
Martin v. Löwis11437992002-04-12 09:54:03 +00005690_ACEOF
5691rm -f conftest$ac_exeext
5692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5693 (eval $ac_link) 2>&5
5694 ac_status=$?
5695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5698 (eval $ac_try) 2>&5
5699 ac_status=$?
5700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5701 (exit $ac_status); }; }; then
5702 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00005703else
Martin v. Löwis11437992002-04-12 09:54:03 +00005704 echo "$as_me: program exited with status $ac_status" >&5
5705echo "$as_me: failed program was:" >&5
5706cat conftest.$ac_ext >&5
5707( exit $ac_status )
5708{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
5709echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
5710 { (exit 1); exit 1; }; }
5711fi
5712rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5713fi
5714fi
5715rm -f conftest.val
5716else
Guido van Rossumad678af1998-10-02 14:42:15 +00005717 ac_cv_sizeof_void_p=0
5718fi
Guido van Rossumad678af1998-10-02 14:42:15 +00005719fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005720echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
5721echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
5722cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005723#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00005724_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00005725
5726
Martin v. Löwis11437992002-04-12 09:54:03 +00005727echo "$as_me:$LINENO: checking for char" >&5
5728echo $ECHO_N "checking for char... $ECHO_C" >&6
5729if test "${ac_cv_type_char+set}" = set; then
5730 echo $ECHO_N "(cached) $ECHO_C" >&6
5731else
5732 cat >conftest.$ac_ext <<_ACEOF
5733#line $LINENO "configure"
5734#include "confdefs.h"
5735$ac_includes_default
5736#ifdef F77_DUMMY_MAIN
5737# ifdef __cplusplus
5738 extern "C"
5739# endif
5740 int F77_DUMMY_MAIN() { return 1; }
5741#endif
5742int
5743main ()
5744{
5745if ((char *) 0)
5746 return 0;
5747if (sizeof (char))
5748 return 0;
5749 ;
5750 return 0;
5751}
5752_ACEOF
5753rm -f conftest.$ac_objext
5754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5755 (eval $ac_compile) 2>&5
5756 ac_status=$?
5757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5758 (exit $ac_status); } &&
5759 { ac_try='test -s conftest.$ac_objext'
5760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5761 (eval $ac_try) 2>&5
5762 ac_status=$?
5763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764 (exit $ac_status); }; }; then
5765 ac_cv_type_char=yes
5766else
5767 echo "$as_me: failed program was:" >&5
5768cat conftest.$ac_ext >&5
5769ac_cv_type_char=no
5770fi
5771rm -f conftest.$ac_objext conftest.$ac_ext
5772fi
5773echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
5774echo "${ECHO_T}$ac_cv_type_char" >&6
5775
5776echo "$as_me:$LINENO: checking size of char" >&5
5777echo $ECHO_N "checking size of char... $ECHO_C" >&6
5778if test "${ac_cv_sizeof_char+set}" = set; then
5779 echo $ECHO_N "(cached) $ECHO_C" >&6
5780else
5781 if test "$ac_cv_type_char" = yes; then
5782 # The cast to unsigned long works around a bug in the HP C Compiler
5783 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5784 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5785 # This bug is HP SR number 8606223364.
5786 if test "$cross_compiling" = yes; then
5787 # Depending upon the size, compute the lo and hi bounds.
5788cat >conftest.$ac_ext <<_ACEOF
5789#line $LINENO "configure"
5790#include "confdefs.h"
5791$ac_includes_default
5792#ifdef F77_DUMMY_MAIN
5793# ifdef __cplusplus
5794 extern "C"
5795# endif
5796 int F77_DUMMY_MAIN() { return 1; }
5797#endif
5798int
5799main ()
5800{
5801static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
5802test_array [0] = 0
5803
5804 ;
5805 return 0;
5806}
5807_ACEOF
5808rm -f conftest.$ac_objext
5809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5810 (eval $ac_compile) 2>&5
5811 ac_status=$?
5812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5813 (exit $ac_status); } &&
5814 { ac_try='test -s conftest.$ac_objext'
5815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5816 (eval $ac_try) 2>&5
5817 ac_status=$?
5818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5819 (exit $ac_status); }; }; then
5820 ac_lo=0 ac_mid=0
5821 while :; do
5822 cat >conftest.$ac_ext <<_ACEOF
5823#line $LINENO "configure"
5824#include "confdefs.h"
5825$ac_includes_default
5826#ifdef F77_DUMMY_MAIN
5827# ifdef __cplusplus
5828 extern "C"
5829# endif
5830 int F77_DUMMY_MAIN() { return 1; }
5831#endif
5832int
5833main ()
5834{
5835static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5836test_array [0] = 0
5837
5838 ;
5839 return 0;
5840}
5841_ACEOF
5842rm -f conftest.$ac_objext
5843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5844 (eval $ac_compile) 2>&5
5845 ac_status=$?
5846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5847 (exit $ac_status); } &&
5848 { ac_try='test -s conftest.$ac_objext'
5849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5850 (eval $ac_try) 2>&5
5851 ac_status=$?
5852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5853 (exit $ac_status); }; }; then
5854 ac_hi=$ac_mid; break
5855else
5856 echo "$as_me: failed program was:" >&5
5857cat conftest.$ac_ext >&5
5858ac_lo=`expr $ac_mid + 1`
5859 if test $ac_lo -le $ac_mid; then
5860 ac_lo= ac_hi=
5861 break
5862 fi
5863 ac_mid=`expr 2 '*' $ac_mid + 1`
5864fi
5865rm -f conftest.$ac_objext conftest.$ac_ext
5866 done
5867else
5868 echo "$as_me: failed program was:" >&5
5869cat conftest.$ac_ext >&5
5870cat >conftest.$ac_ext <<_ACEOF
5871#line $LINENO "configure"
5872#include "confdefs.h"
5873$ac_includes_default
5874#ifdef F77_DUMMY_MAIN
5875# ifdef __cplusplus
5876 extern "C"
5877# endif
5878 int F77_DUMMY_MAIN() { return 1; }
5879#endif
5880int
5881main ()
5882{
5883static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
5884test_array [0] = 0
5885
5886 ;
5887 return 0;
5888}
5889_ACEOF
5890rm -f conftest.$ac_objext
5891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5892 (eval $ac_compile) 2>&5
5893 ac_status=$?
5894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5895 (exit $ac_status); } &&
5896 { ac_try='test -s conftest.$ac_objext'
5897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5898 (eval $ac_try) 2>&5
5899 ac_status=$?
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5901 (exit $ac_status); }; }; then
5902 ac_hi=-1 ac_mid=-1
5903 while :; do
5904 cat >conftest.$ac_ext <<_ACEOF
5905#line $LINENO "configure"
5906#include "confdefs.h"
5907$ac_includes_default
5908#ifdef F77_DUMMY_MAIN
5909# ifdef __cplusplus
5910 extern "C"
5911# endif
5912 int F77_DUMMY_MAIN() { return 1; }
5913#endif
5914int
5915main ()
5916{
5917static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
5918test_array [0] = 0
5919
5920 ;
5921 return 0;
5922}
5923_ACEOF
5924rm -f conftest.$ac_objext
5925if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5926 (eval $ac_compile) 2>&5
5927 ac_status=$?
5928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5929 (exit $ac_status); } &&
5930 { ac_try='test -s conftest.$ac_objext'
5931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5932 (eval $ac_try) 2>&5
5933 ac_status=$?
5934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5935 (exit $ac_status); }; }; then
5936 ac_lo=$ac_mid; break
5937else
5938 echo "$as_me: failed program was:" >&5
5939cat conftest.$ac_ext >&5
5940ac_hi=`expr '(' $ac_mid ')' - 1`
5941 if test $ac_mid -le $ac_hi; then
5942 ac_lo= ac_hi=
5943 break
5944 fi
5945 ac_mid=`expr 2 '*' $ac_mid`
5946fi
5947rm -f conftest.$ac_objext conftest.$ac_ext
5948 done
5949else
5950 echo "$as_me: failed program was:" >&5
5951cat conftest.$ac_ext >&5
5952ac_lo= ac_hi=
5953fi
5954rm -f conftest.$ac_objext conftest.$ac_ext
5955fi
5956rm -f conftest.$ac_objext conftest.$ac_ext
5957# Binary search between lo and hi bounds.
5958while test "x$ac_lo" != "x$ac_hi"; do
5959 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5960 cat >conftest.$ac_ext <<_ACEOF
5961#line $LINENO "configure"
5962#include "confdefs.h"
5963$ac_includes_default
5964#ifdef F77_DUMMY_MAIN
5965# ifdef __cplusplus
5966 extern "C"
5967# endif
5968 int F77_DUMMY_MAIN() { return 1; }
5969#endif
5970int
5971main ()
5972{
5973static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
5974test_array [0] = 0
5975
5976 ;
5977 return 0;
5978}
5979_ACEOF
5980rm -f conftest.$ac_objext
5981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5982 (eval $ac_compile) 2>&5
5983 ac_status=$?
5984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5985 (exit $ac_status); } &&
5986 { ac_try='test -s conftest.$ac_objext'
5987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5988 (eval $ac_try) 2>&5
5989 ac_status=$?
5990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5991 (exit $ac_status); }; }; then
5992 ac_hi=$ac_mid
5993else
5994 echo "$as_me: failed program was:" >&5
5995cat conftest.$ac_ext >&5
5996ac_lo=`expr '(' $ac_mid ')' + 1`
5997fi
5998rm -f conftest.$ac_objext conftest.$ac_ext
5999done
6000case $ac_lo in
6001?*) ac_cv_sizeof_char=$ac_lo;;
6002'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6003echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6004 { (exit 1); exit 1; }; } ;;
6005esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006006else
6007 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006008 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6009echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6010 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006011else
Martin v. Löwis11437992002-04-12 09:54:03 +00006012 cat >conftest.$ac_ext <<_ACEOF
6013#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006014#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006015$ac_includes_default
6016long longval () { return (long) (sizeof (char)); }
6017unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006018#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006019#include <stdlib.h>
6020#ifdef F77_DUMMY_MAIN
6021# ifdef __cplusplus
6022 extern "C"
6023# endif
6024 int F77_DUMMY_MAIN() { return 1; }
6025#endif
6026int
6027main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006028{
Martin v. Löwis11437992002-04-12 09:54:03 +00006029
6030 FILE *f = fopen ("conftest.val", "w");
6031 if (! f)
6032 exit (1);
6033 if (((long) (sizeof (char))) < 0)
6034 {
6035 long i = longval ();
6036 if (i != ((long) (sizeof (char))))
6037 exit (1);
6038 fprintf (f, "%ld\n", i);
6039 }
6040 else
6041 {
6042 unsigned long i = ulongval ();
6043 if (i != ((long) (sizeof (char))))
6044 exit (1);
6045 fprintf (f, "%lu\n", i);
6046 }
6047 exit (ferror (f) || fclose (f) != 0);
6048
6049 ;
6050 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006051}
Martin v. Löwis11437992002-04-12 09:54:03 +00006052_ACEOF
6053rm -f conftest$ac_exeext
6054if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6055 (eval $ac_link) 2>&5
6056 ac_status=$?
6057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6058 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6060 (eval $ac_try) 2>&5
6061 ac_status=$?
6062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6063 (exit $ac_status); }; }; then
6064 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006065else
Martin v. Löwis11437992002-04-12 09:54:03 +00006066 echo "$as_me: program exited with status $ac_status" >&5
6067echo "$as_me: failed program was:" >&5
6068cat conftest.$ac_ext >&5
6069( exit $ac_status )
6070{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6071echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6072 { (exit 1); exit 1; }; }
6073fi
6074rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6075fi
6076fi
6077rm -f conftest.val
6078else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006079 ac_cv_sizeof_char=0
6080fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006081fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006082echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6083echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6084cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006085#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006086_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006087
6088
Martin v. Löwis11437992002-04-12 09:54:03 +00006089echo "$as_me:$LINENO: checking for short" >&5
6090echo $ECHO_N "checking for short... $ECHO_C" >&6
6091if test "${ac_cv_type_short+set}" = set; then
6092 echo $ECHO_N "(cached) $ECHO_C" >&6
6093else
6094 cat >conftest.$ac_ext <<_ACEOF
6095#line $LINENO "configure"
6096#include "confdefs.h"
6097$ac_includes_default
6098#ifdef F77_DUMMY_MAIN
6099# ifdef __cplusplus
6100 extern "C"
6101# endif
6102 int F77_DUMMY_MAIN() { return 1; }
6103#endif
6104int
6105main ()
6106{
6107if ((short *) 0)
6108 return 0;
6109if (sizeof (short))
6110 return 0;
6111 ;
6112 return 0;
6113}
6114_ACEOF
6115rm -f conftest.$ac_objext
6116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6117 (eval $ac_compile) 2>&5
6118 ac_status=$?
6119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6120 (exit $ac_status); } &&
6121 { ac_try='test -s conftest.$ac_objext'
6122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6123 (eval $ac_try) 2>&5
6124 ac_status=$?
6125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6126 (exit $ac_status); }; }; then
6127 ac_cv_type_short=yes
6128else
6129 echo "$as_me: failed program was:" >&5
6130cat conftest.$ac_ext >&5
6131ac_cv_type_short=no
6132fi
6133rm -f conftest.$ac_objext conftest.$ac_ext
6134fi
6135echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6136echo "${ECHO_T}$ac_cv_type_short" >&6
6137
6138echo "$as_me:$LINENO: checking size of short" >&5
6139echo $ECHO_N "checking size of short... $ECHO_C" >&6
6140if test "${ac_cv_sizeof_short+set}" = set; then
6141 echo $ECHO_N "(cached) $ECHO_C" >&6
6142else
6143 if test "$ac_cv_type_short" = yes; then
6144 # The cast to unsigned long works around a bug in the HP C Compiler
6145 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6146 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6147 # This bug is HP SR number 8606223364.
6148 if test "$cross_compiling" = yes; then
6149 # Depending upon the size, compute the lo and hi bounds.
6150cat >conftest.$ac_ext <<_ACEOF
6151#line $LINENO "configure"
6152#include "confdefs.h"
6153$ac_includes_default
6154#ifdef F77_DUMMY_MAIN
6155# ifdef __cplusplus
6156 extern "C"
6157# endif
6158 int F77_DUMMY_MAIN() { return 1; }
6159#endif
6160int
6161main ()
6162{
6163static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6164test_array [0] = 0
6165
6166 ;
6167 return 0;
6168}
6169_ACEOF
6170rm -f conftest.$ac_objext
6171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6172 (eval $ac_compile) 2>&5
6173 ac_status=$?
6174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6175 (exit $ac_status); } &&
6176 { ac_try='test -s conftest.$ac_objext'
6177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6178 (eval $ac_try) 2>&5
6179 ac_status=$?
6180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6181 (exit $ac_status); }; }; then
6182 ac_lo=0 ac_mid=0
6183 while :; do
6184 cat >conftest.$ac_ext <<_ACEOF
6185#line $LINENO "configure"
6186#include "confdefs.h"
6187$ac_includes_default
6188#ifdef F77_DUMMY_MAIN
6189# ifdef __cplusplus
6190 extern "C"
6191# endif
6192 int F77_DUMMY_MAIN() { return 1; }
6193#endif
6194int
6195main ()
6196{
6197static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6198test_array [0] = 0
6199
6200 ;
6201 return 0;
6202}
6203_ACEOF
6204rm -f conftest.$ac_objext
6205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6206 (eval $ac_compile) 2>&5
6207 ac_status=$?
6208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6209 (exit $ac_status); } &&
6210 { ac_try='test -s conftest.$ac_objext'
6211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6212 (eval $ac_try) 2>&5
6213 ac_status=$?
6214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6215 (exit $ac_status); }; }; then
6216 ac_hi=$ac_mid; break
6217else
6218 echo "$as_me: failed program was:" >&5
6219cat conftest.$ac_ext >&5
6220ac_lo=`expr $ac_mid + 1`
6221 if test $ac_lo -le $ac_mid; then
6222 ac_lo= ac_hi=
6223 break
6224 fi
6225 ac_mid=`expr 2 '*' $ac_mid + 1`
6226fi
6227rm -f conftest.$ac_objext conftest.$ac_ext
6228 done
6229else
6230 echo "$as_me: failed program was:" >&5
6231cat conftest.$ac_ext >&5
6232cat >conftest.$ac_ext <<_ACEOF
6233#line $LINENO "configure"
6234#include "confdefs.h"
6235$ac_includes_default
6236#ifdef F77_DUMMY_MAIN
6237# ifdef __cplusplus
6238 extern "C"
6239# endif
6240 int F77_DUMMY_MAIN() { return 1; }
6241#endif
6242int
6243main ()
6244{
6245static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6246test_array [0] = 0
6247
6248 ;
6249 return 0;
6250}
6251_ACEOF
6252rm -f conftest.$ac_objext
6253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6254 (eval $ac_compile) 2>&5
6255 ac_status=$?
6256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6257 (exit $ac_status); } &&
6258 { ac_try='test -s conftest.$ac_objext'
6259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6260 (eval $ac_try) 2>&5
6261 ac_status=$?
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6263 (exit $ac_status); }; }; then
6264 ac_hi=-1 ac_mid=-1
6265 while :; do
6266 cat >conftest.$ac_ext <<_ACEOF
6267#line $LINENO "configure"
6268#include "confdefs.h"
6269$ac_includes_default
6270#ifdef F77_DUMMY_MAIN
6271# ifdef __cplusplus
6272 extern "C"
6273# endif
6274 int F77_DUMMY_MAIN() { return 1; }
6275#endif
6276int
6277main ()
6278{
6279static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6280test_array [0] = 0
6281
6282 ;
6283 return 0;
6284}
6285_ACEOF
6286rm -f conftest.$ac_objext
6287if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6288 (eval $ac_compile) 2>&5
6289 ac_status=$?
6290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6291 (exit $ac_status); } &&
6292 { ac_try='test -s conftest.$ac_objext'
6293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6294 (eval $ac_try) 2>&5
6295 ac_status=$?
6296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6297 (exit $ac_status); }; }; then
6298 ac_lo=$ac_mid; break
6299else
6300 echo "$as_me: failed program was:" >&5
6301cat conftest.$ac_ext >&5
6302ac_hi=`expr '(' $ac_mid ')' - 1`
6303 if test $ac_mid -le $ac_hi; then
6304 ac_lo= ac_hi=
6305 break
6306 fi
6307 ac_mid=`expr 2 '*' $ac_mid`
6308fi
6309rm -f conftest.$ac_objext conftest.$ac_ext
6310 done
6311else
6312 echo "$as_me: failed program was:" >&5
6313cat conftest.$ac_ext >&5
6314ac_lo= ac_hi=
6315fi
6316rm -f conftest.$ac_objext conftest.$ac_ext
6317fi
6318rm -f conftest.$ac_objext conftest.$ac_ext
6319# Binary search between lo and hi bounds.
6320while test "x$ac_lo" != "x$ac_hi"; do
6321 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6322 cat >conftest.$ac_ext <<_ACEOF
6323#line $LINENO "configure"
6324#include "confdefs.h"
6325$ac_includes_default
6326#ifdef F77_DUMMY_MAIN
6327# ifdef __cplusplus
6328 extern "C"
6329# endif
6330 int F77_DUMMY_MAIN() { return 1; }
6331#endif
6332int
6333main ()
6334{
6335static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6336test_array [0] = 0
6337
6338 ;
6339 return 0;
6340}
6341_ACEOF
6342rm -f conftest.$ac_objext
6343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6344 (eval $ac_compile) 2>&5
6345 ac_status=$?
6346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6347 (exit $ac_status); } &&
6348 { ac_try='test -s conftest.$ac_objext'
6349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6350 (eval $ac_try) 2>&5
6351 ac_status=$?
6352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6353 (exit $ac_status); }; }; then
6354 ac_hi=$ac_mid
6355else
6356 echo "$as_me: failed program was:" >&5
6357cat conftest.$ac_ext >&5
6358ac_lo=`expr '(' $ac_mid ')' + 1`
6359fi
6360rm -f conftest.$ac_objext conftest.$ac_ext
6361done
6362case $ac_lo in
6363?*) ac_cv_sizeof_short=$ac_lo;;
6364'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6365echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6366 { (exit 1); exit 1; }; } ;;
6367esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006368else
6369 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006370 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6371echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6372 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006373else
Martin v. Löwis11437992002-04-12 09:54:03 +00006374 cat >conftest.$ac_ext <<_ACEOF
6375#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006376#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006377$ac_includes_default
6378long longval () { return (long) (sizeof (short)); }
6379unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006380#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006381#include <stdlib.h>
6382#ifdef F77_DUMMY_MAIN
6383# ifdef __cplusplus
6384 extern "C"
6385# endif
6386 int F77_DUMMY_MAIN() { return 1; }
6387#endif
6388int
6389main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006390{
Martin v. Löwis11437992002-04-12 09:54:03 +00006391
6392 FILE *f = fopen ("conftest.val", "w");
6393 if (! f)
6394 exit (1);
6395 if (((long) (sizeof (short))) < 0)
6396 {
6397 long i = longval ();
6398 if (i != ((long) (sizeof (short))))
6399 exit (1);
6400 fprintf (f, "%ld\n", i);
6401 }
6402 else
6403 {
6404 unsigned long i = ulongval ();
6405 if (i != ((long) (sizeof (short))))
6406 exit (1);
6407 fprintf (f, "%lu\n", i);
6408 }
6409 exit (ferror (f) || fclose (f) != 0);
6410
6411 ;
6412 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006413}
Martin v. Löwis11437992002-04-12 09:54:03 +00006414_ACEOF
6415rm -f conftest$ac_exeext
6416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6417 (eval $ac_link) 2>&5
6418 ac_status=$?
6419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6420 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6422 (eval $ac_try) 2>&5
6423 ac_status=$?
6424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6425 (exit $ac_status); }; }; then
6426 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006427else
Martin v. Löwis11437992002-04-12 09:54:03 +00006428 echo "$as_me: program exited with status $ac_status" >&5
6429echo "$as_me: failed program was:" >&5
6430cat conftest.$ac_ext >&5
6431( exit $ac_status )
6432{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6433echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6434 { (exit 1); exit 1; }; }
6435fi
6436rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6437fi
6438fi
6439rm -f conftest.val
6440else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006441 ac_cv_sizeof_short=0
6442fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006443fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006444echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6445echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6446cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006447#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006448_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006449
6450
Martin v. Löwis11437992002-04-12 09:54:03 +00006451echo "$as_me:$LINENO: checking for float" >&5
6452echo $ECHO_N "checking for float... $ECHO_C" >&6
6453if test "${ac_cv_type_float+set}" = set; then
6454 echo $ECHO_N "(cached) $ECHO_C" >&6
6455else
6456 cat >conftest.$ac_ext <<_ACEOF
6457#line $LINENO "configure"
6458#include "confdefs.h"
6459$ac_includes_default
6460#ifdef F77_DUMMY_MAIN
6461# ifdef __cplusplus
6462 extern "C"
6463# endif
6464 int F77_DUMMY_MAIN() { return 1; }
6465#endif
6466int
6467main ()
6468{
6469if ((float *) 0)
6470 return 0;
6471if (sizeof (float))
6472 return 0;
6473 ;
6474 return 0;
6475}
6476_ACEOF
6477rm -f conftest.$ac_objext
6478if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6479 (eval $ac_compile) 2>&5
6480 ac_status=$?
6481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6482 (exit $ac_status); } &&
6483 { ac_try='test -s conftest.$ac_objext'
6484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6485 (eval $ac_try) 2>&5
6486 ac_status=$?
6487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6488 (exit $ac_status); }; }; then
6489 ac_cv_type_float=yes
6490else
6491 echo "$as_me: failed program was:" >&5
6492cat conftest.$ac_ext >&5
6493ac_cv_type_float=no
6494fi
6495rm -f conftest.$ac_objext conftest.$ac_ext
6496fi
6497echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6498echo "${ECHO_T}$ac_cv_type_float" >&6
6499
6500echo "$as_me:$LINENO: checking size of float" >&5
6501echo $ECHO_N "checking size of float... $ECHO_C" >&6
6502if test "${ac_cv_sizeof_float+set}" = set; then
6503 echo $ECHO_N "(cached) $ECHO_C" >&6
6504else
6505 if test "$ac_cv_type_float" = yes; then
6506 # The cast to unsigned long works around a bug in the HP C Compiler
6507 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6508 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6509 # This bug is HP SR number 8606223364.
6510 if test "$cross_compiling" = yes; then
6511 # Depending upon the size, compute the lo and hi bounds.
6512cat >conftest.$ac_ext <<_ACEOF
6513#line $LINENO "configure"
6514#include "confdefs.h"
6515$ac_includes_default
6516#ifdef F77_DUMMY_MAIN
6517# ifdef __cplusplus
6518 extern "C"
6519# endif
6520 int F77_DUMMY_MAIN() { return 1; }
6521#endif
6522int
6523main ()
6524{
6525static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6526test_array [0] = 0
6527
6528 ;
6529 return 0;
6530}
6531_ACEOF
6532rm -f conftest.$ac_objext
6533if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6534 (eval $ac_compile) 2>&5
6535 ac_status=$?
6536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6537 (exit $ac_status); } &&
6538 { ac_try='test -s conftest.$ac_objext'
6539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6540 (eval $ac_try) 2>&5
6541 ac_status=$?
6542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6543 (exit $ac_status); }; }; then
6544 ac_lo=0 ac_mid=0
6545 while :; do
6546 cat >conftest.$ac_ext <<_ACEOF
6547#line $LINENO "configure"
6548#include "confdefs.h"
6549$ac_includes_default
6550#ifdef F77_DUMMY_MAIN
6551# ifdef __cplusplus
6552 extern "C"
6553# endif
6554 int F77_DUMMY_MAIN() { return 1; }
6555#endif
6556int
6557main ()
6558{
6559static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6560test_array [0] = 0
6561
6562 ;
6563 return 0;
6564}
6565_ACEOF
6566rm -f conftest.$ac_objext
6567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6568 (eval $ac_compile) 2>&5
6569 ac_status=$?
6570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6571 (exit $ac_status); } &&
6572 { ac_try='test -s conftest.$ac_objext'
6573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6574 (eval $ac_try) 2>&5
6575 ac_status=$?
6576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6577 (exit $ac_status); }; }; then
6578 ac_hi=$ac_mid; break
6579else
6580 echo "$as_me: failed program was:" >&5
6581cat conftest.$ac_ext >&5
6582ac_lo=`expr $ac_mid + 1`
6583 if test $ac_lo -le $ac_mid; then
6584 ac_lo= ac_hi=
6585 break
6586 fi
6587 ac_mid=`expr 2 '*' $ac_mid + 1`
6588fi
6589rm -f conftest.$ac_objext conftest.$ac_ext
6590 done
6591else
6592 echo "$as_me: failed program was:" >&5
6593cat conftest.$ac_ext >&5
6594cat >conftest.$ac_ext <<_ACEOF
6595#line $LINENO "configure"
6596#include "confdefs.h"
6597$ac_includes_default
6598#ifdef F77_DUMMY_MAIN
6599# ifdef __cplusplus
6600 extern "C"
6601# endif
6602 int F77_DUMMY_MAIN() { return 1; }
6603#endif
6604int
6605main ()
6606{
6607static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
6608test_array [0] = 0
6609
6610 ;
6611 return 0;
6612}
6613_ACEOF
6614rm -f conftest.$ac_objext
6615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6616 (eval $ac_compile) 2>&5
6617 ac_status=$?
6618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6619 (exit $ac_status); } &&
6620 { ac_try='test -s conftest.$ac_objext'
6621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6622 (eval $ac_try) 2>&5
6623 ac_status=$?
6624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6625 (exit $ac_status); }; }; then
6626 ac_hi=-1 ac_mid=-1
6627 while :; do
6628 cat >conftest.$ac_ext <<_ACEOF
6629#line $LINENO "configure"
6630#include "confdefs.h"
6631$ac_includes_default
6632#ifdef F77_DUMMY_MAIN
6633# ifdef __cplusplus
6634 extern "C"
6635# endif
6636 int F77_DUMMY_MAIN() { return 1; }
6637#endif
6638int
6639main ()
6640{
6641static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
6642test_array [0] = 0
6643
6644 ;
6645 return 0;
6646}
6647_ACEOF
6648rm -f conftest.$ac_objext
6649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6650 (eval $ac_compile) 2>&5
6651 ac_status=$?
6652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6653 (exit $ac_status); } &&
6654 { ac_try='test -s conftest.$ac_objext'
6655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6656 (eval $ac_try) 2>&5
6657 ac_status=$?
6658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6659 (exit $ac_status); }; }; then
6660 ac_lo=$ac_mid; break
6661else
6662 echo "$as_me: failed program was:" >&5
6663cat conftest.$ac_ext >&5
6664ac_hi=`expr '(' $ac_mid ')' - 1`
6665 if test $ac_mid -le $ac_hi; then
6666 ac_lo= ac_hi=
6667 break
6668 fi
6669 ac_mid=`expr 2 '*' $ac_mid`
6670fi
6671rm -f conftest.$ac_objext conftest.$ac_ext
6672 done
6673else
6674 echo "$as_me: failed program was:" >&5
6675cat conftest.$ac_ext >&5
6676ac_lo= ac_hi=
6677fi
6678rm -f conftest.$ac_objext conftest.$ac_ext
6679fi
6680rm -f conftest.$ac_objext conftest.$ac_ext
6681# Binary search between lo and hi bounds.
6682while test "x$ac_lo" != "x$ac_hi"; do
6683 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6684 cat >conftest.$ac_ext <<_ACEOF
6685#line $LINENO "configure"
6686#include "confdefs.h"
6687$ac_includes_default
6688#ifdef F77_DUMMY_MAIN
6689# ifdef __cplusplus
6690 extern "C"
6691# endif
6692 int F77_DUMMY_MAIN() { return 1; }
6693#endif
6694int
6695main ()
6696{
6697static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6698test_array [0] = 0
6699
6700 ;
6701 return 0;
6702}
6703_ACEOF
6704rm -f conftest.$ac_objext
6705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6706 (eval $ac_compile) 2>&5
6707 ac_status=$?
6708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6709 (exit $ac_status); } &&
6710 { ac_try='test -s conftest.$ac_objext'
6711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6712 (eval $ac_try) 2>&5
6713 ac_status=$?
6714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715 (exit $ac_status); }; }; then
6716 ac_hi=$ac_mid
6717else
6718 echo "$as_me: failed program was:" >&5
6719cat conftest.$ac_ext >&5
6720ac_lo=`expr '(' $ac_mid ')' + 1`
6721fi
6722rm -f conftest.$ac_objext conftest.$ac_ext
6723done
6724case $ac_lo in
6725?*) ac_cv_sizeof_float=$ac_lo;;
6726'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6727echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6728 { (exit 1); exit 1; }; } ;;
6729esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006730else
6731 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006732 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6733echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6734 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006735else
Martin v. Löwis11437992002-04-12 09:54:03 +00006736 cat >conftest.$ac_ext <<_ACEOF
6737#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006738#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006739$ac_includes_default
6740long longval () { return (long) (sizeof (float)); }
6741unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006742#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006743#include <stdlib.h>
6744#ifdef F77_DUMMY_MAIN
6745# ifdef __cplusplus
6746 extern "C"
6747# endif
6748 int F77_DUMMY_MAIN() { return 1; }
6749#endif
6750int
6751main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006752{
Martin v. Löwis11437992002-04-12 09:54:03 +00006753
6754 FILE *f = fopen ("conftest.val", "w");
6755 if (! f)
6756 exit (1);
6757 if (((long) (sizeof (float))) < 0)
6758 {
6759 long i = longval ();
6760 if (i != ((long) (sizeof (float))))
6761 exit (1);
6762 fprintf (f, "%ld\n", i);
6763 }
6764 else
6765 {
6766 unsigned long i = ulongval ();
6767 if (i != ((long) (sizeof (float))))
6768 exit (1);
6769 fprintf (f, "%lu\n", i);
6770 }
6771 exit (ferror (f) || fclose (f) != 0);
6772
6773 ;
6774 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006775}
Martin v. Löwis11437992002-04-12 09:54:03 +00006776_ACEOF
6777rm -f conftest$ac_exeext
6778if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6779 (eval $ac_link) 2>&5
6780 ac_status=$?
6781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6782 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6784 (eval $ac_try) 2>&5
6785 ac_status=$?
6786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6787 (exit $ac_status); }; }; then
6788 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006789else
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 echo "$as_me: program exited with status $ac_status" >&5
6791echo "$as_me: failed program was:" >&5
6792cat conftest.$ac_ext >&5
6793( exit $ac_status )
6794{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
6795echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
6796 { (exit 1); exit 1; }; }
6797fi
6798rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6799fi
6800fi
6801rm -f conftest.val
6802else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006803 ac_cv_sizeof_float=0
6804fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006805fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006806echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
6807echo "${ECHO_T}$ac_cv_sizeof_float" >&6
6808cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006809#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006810_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006811
6812
Martin v. Löwis11437992002-04-12 09:54:03 +00006813echo "$as_me:$LINENO: checking for double" >&5
6814echo $ECHO_N "checking for double... $ECHO_C" >&6
6815if test "${ac_cv_type_double+set}" = set; then
6816 echo $ECHO_N "(cached) $ECHO_C" >&6
6817else
6818 cat >conftest.$ac_ext <<_ACEOF
6819#line $LINENO "configure"
6820#include "confdefs.h"
6821$ac_includes_default
6822#ifdef F77_DUMMY_MAIN
6823# ifdef __cplusplus
6824 extern "C"
6825# endif
6826 int F77_DUMMY_MAIN() { return 1; }
6827#endif
6828int
6829main ()
6830{
6831if ((double *) 0)
6832 return 0;
6833if (sizeof (double))
6834 return 0;
6835 ;
6836 return 0;
6837}
6838_ACEOF
6839rm -f conftest.$ac_objext
6840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6841 (eval $ac_compile) 2>&5
6842 ac_status=$?
6843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6844 (exit $ac_status); } &&
6845 { ac_try='test -s conftest.$ac_objext'
6846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6847 (eval $ac_try) 2>&5
6848 ac_status=$?
6849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6850 (exit $ac_status); }; }; then
6851 ac_cv_type_double=yes
6852else
6853 echo "$as_me: failed program was:" >&5
6854cat conftest.$ac_ext >&5
6855ac_cv_type_double=no
6856fi
6857rm -f conftest.$ac_objext conftest.$ac_ext
6858fi
6859echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
6860echo "${ECHO_T}$ac_cv_type_double" >&6
6861
6862echo "$as_me:$LINENO: checking size of double" >&5
6863echo $ECHO_N "checking size of double... $ECHO_C" >&6
6864if test "${ac_cv_sizeof_double+set}" = set; then
6865 echo $ECHO_N "(cached) $ECHO_C" >&6
6866else
6867 if test "$ac_cv_type_double" = yes; then
6868 # The cast to unsigned long works around a bug in the HP C Compiler
6869 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6870 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6871 # This bug is HP SR number 8606223364.
6872 if test "$cross_compiling" = yes; then
6873 # Depending upon the size, compute the lo and hi bounds.
6874cat >conftest.$ac_ext <<_ACEOF
6875#line $LINENO "configure"
6876#include "confdefs.h"
6877$ac_includes_default
6878#ifdef F77_DUMMY_MAIN
6879# ifdef __cplusplus
6880 extern "C"
6881# endif
6882 int F77_DUMMY_MAIN() { return 1; }
6883#endif
6884int
6885main ()
6886{
6887static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
6888test_array [0] = 0
6889
6890 ;
6891 return 0;
6892}
6893_ACEOF
6894rm -f conftest.$ac_objext
6895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6896 (eval $ac_compile) 2>&5
6897 ac_status=$?
6898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6899 (exit $ac_status); } &&
6900 { ac_try='test -s conftest.$ac_objext'
6901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6902 (eval $ac_try) 2>&5
6903 ac_status=$?
6904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6905 (exit $ac_status); }; }; then
6906 ac_lo=0 ac_mid=0
6907 while :; do
6908 cat >conftest.$ac_ext <<_ACEOF
6909#line $LINENO "configure"
6910#include "confdefs.h"
6911$ac_includes_default
6912#ifdef F77_DUMMY_MAIN
6913# ifdef __cplusplus
6914 extern "C"
6915# endif
6916 int F77_DUMMY_MAIN() { return 1; }
6917#endif
6918int
6919main ()
6920{
6921static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
6922test_array [0] = 0
6923
6924 ;
6925 return 0;
6926}
6927_ACEOF
6928rm -f conftest.$ac_objext
6929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6930 (eval $ac_compile) 2>&5
6931 ac_status=$?
6932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6933 (exit $ac_status); } &&
6934 { ac_try='test -s conftest.$ac_objext'
6935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6936 (eval $ac_try) 2>&5
6937 ac_status=$?
6938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6939 (exit $ac_status); }; }; then
6940 ac_hi=$ac_mid; break
6941else
6942 echo "$as_me: failed program was:" >&5
6943cat conftest.$ac_ext >&5
6944ac_lo=`expr $ac_mid + 1`
6945 if test $ac_lo -le $ac_mid; then
6946 ac_lo= ac_hi=
6947 break
6948 fi
6949 ac_mid=`expr 2 '*' $ac_mid + 1`
6950fi
6951rm -f conftest.$ac_objext conftest.$ac_ext
6952 done
6953else
6954 echo "$as_me: failed program was:" >&5
6955cat conftest.$ac_ext >&5
6956cat >conftest.$ac_ext <<_ACEOF
6957#line $LINENO "configure"
6958#include "confdefs.h"
6959$ac_includes_default
6960#ifdef F77_DUMMY_MAIN
6961# ifdef __cplusplus
6962 extern "C"
6963# endif
6964 int F77_DUMMY_MAIN() { return 1; }
6965#endif
6966int
6967main ()
6968{
6969static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
6970test_array [0] = 0
6971
6972 ;
6973 return 0;
6974}
6975_ACEOF
6976rm -f conftest.$ac_objext
6977if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6978 (eval $ac_compile) 2>&5
6979 ac_status=$?
6980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6981 (exit $ac_status); } &&
6982 { ac_try='test -s conftest.$ac_objext'
6983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6984 (eval $ac_try) 2>&5
6985 ac_status=$?
6986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6987 (exit $ac_status); }; }; then
6988 ac_hi=-1 ac_mid=-1
6989 while :; do
6990 cat >conftest.$ac_ext <<_ACEOF
6991#line $LINENO "configure"
6992#include "confdefs.h"
6993$ac_includes_default
6994#ifdef F77_DUMMY_MAIN
6995# ifdef __cplusplus
6996 extern "C"
6997# endif
6998 int F77_DUMMY_MAIN() { return 1; }
6999#endif
7000int
7001main ()
7002{
7003static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7004test_array [0] = 0
7005
7006 ;
7007 return 0;
7008}
7009_ACEOF
7010rm -f conftest.$ac_objext
7011if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7012 (eval $ac_compile) 2>&5
7013 ac_status=$?
7014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7015 (exit $ac_status); } &&
7016 { ac_try='test -s conftest.$ac_objext'
7017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7018 (eval $ac_try) 2>&5
7019 ac_status=$?
7020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7021 (exit $ac_status); }; }; then
7022 ac_lo=$ac_mid; break
7023else
7024 echo "$as_me: failed program was:" >&5
7025cat conftest.$ac_ext >&5
7026ac_hi=`expr '(' $ac_mid ')' - 1`
7027 if test $ac_mid -le $ac_hi; then
7028 ac_lo= ac_hi=
7029 break
7030 fi
7031 ac_mid=`expr 2 '*' $ac_mid`
7032fi
7033rm -f conftest.$ac_objext conftest.$ac_ext
7034 done
7035else
7036 echo "$as_me: failed program was:" >&5
7037cat conftest.$ac_ext >&5
7038ac_lo= ac_hi=
7039fi
7040rm -f conftest.$ac_objext conftest.$ac_ext
7041fi
7042rm -f conftest.$ac_objext conftest.$ac_ext
7043# Binary search between lo and hi bounds.
7044while test "x$ac_lo" != "x$ac_hi"; do
7045 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7046 cat >conftest.$ac_ext <<_ACEOF
7047#line $LINENO "configure"
7048#include "confdefs.h"
7049$ac_includes_default
7050#ifdef F77_DUMMY_MAIN
7051# ifdef __cplusplus
7052 extern "C"
7053# endif
7054 int F77_DUMMY_MAIN() { return 1; }
7055#endif
7056int
7057main ()
7058{
7059static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7060test_array [0] = 0
7061
7062 ;
7063 return 0;
7064}
7065_ACEOF
7066rm -f conftest.$ac_objext
7067if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7068 (eval $ac_compile) 2>&5
7069 ac_status=$?
7070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7071 (exit $ac_status); } &&
7072 { ac_try='test -s conftest.$ac_objext'
7073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7074 (eval $ac_try) 2>&5
7075 ac_status=$?
7076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7077 (exit $ac_status); }; }; then
7078 ac_hi=$ac_mid
7079else
7080 echo "$as_me: failed program was:" >&5
7081cat conftest.$ac_ext >&5
7082ac_lo=`expr '(' $ac_mid ')' + 1`
7083fi
7084rm -f conftest.$ac_objext conftest.$ac_ext
7085done
7086case $ac_lo in
7087?*) ac_cv_sizeof_double=$ac_lo;;
7088'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7089echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7090 { (exit 1); exit 1; }; } ;;
7091esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007092else
7093 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007094 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7095echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7096 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007097else
Martin v. Löwis11437992002-04-12 09:54:03 +00007098 cat >conftest.$ac_ext <<_ACEOF
7099#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007100#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007101$ac_includes_default
7102long longval () { return (long) (sizeof (double)); }
7103unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007104#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007105#include <stdlib.h>
7106#ifdef F77_DUMMY_MAIN
7107# ifdef __cplusplus
7108 extern "C"
7109# endif
7110 int F77_DUMMY_MAIN() { return 1; }
7111#endif
7112int
7113main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007114{
Martin v. Löwis11437992002-04-12 09:54:03 +00007115
7116 FILE *f = fopen ("conftest.val", "w");
7117 if (! f)
7118 exit (1);
7119 if (((long) (sizeof (double))) < 0)
7120 {
7121 long i = longval ();
7122 if (i != ((long) (sizeof (double))))
7123 exit (1);
7124 fprintf (f, "%ld\n", i);
7125 }
7126 else
7127 {
7128 unsigned long i = ulongval ();
7129 if (i != ((long) (sizeof (double))))
7130 exit (1);
7131 fprintf (f, "%lu\n", i);
7132 }
7133 exit (ferror (f) || fclose (f) != 0);
7134
7135 ;
7136 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007137}
Martin v. Löwis11437992002-04-12 09:54:03 +00007138_ACEOF
7139rm -f conftest$ac_exeext
7140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7141 (eval $ac_link) 2>&5
7142 ac_status=$?
7143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7144 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7146 (eval $ac_try) 2>&5
7147 ac_status=$?
7148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7149 (exit $ac_status); }; }; then
7150 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007151else
Martin v. Löwis11437992002-04-12 09:54:03 +00007152 echo "$as_me: program exited with status $ac_status" >&5
7153echo "$as_me: failed program was:" >&5
7154cat conftest.$ac_ext >&5
7155( exit $ac_status )
7156{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7157echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7158 { (exit 1); exit 1; }; }
7159fi
7160rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7161fi
7162fi
7163rm -f conftest.val
7164else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007165 ac_cv_sizeof_double=0
7166fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007168echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7169echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7170cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007171#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007172_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007173
7174
Martin v. Löwis11437992002-04-12 09:54:03 +00007175echo "$as_me:$LINENO: checking for fpos_t" >&5
7176echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7177if test "${ac_cv_type_fpos_t+set}" = set; then
7178 echo $ECHO_N "(cached) $ECHO_C" >&6
7179else
7180 cat >conftest.$ac_ext <<_ACEOF
7181#line $LINENO "configure"
7182#include "confdefs.h"
7183$ac_includes_default
7184#ifdef F77_DUMMY_MAIN
7185# ifdef __cplusplus
7186 extern "C"
7187# endif
7188 int F77_DUMMY_MAIN() { return 1; }
7189#endif
7190int
7191main ()
7192{
7193if ((fpos_t *) 0)
7194 return 0;
7195if (sizeof (fpos_t))
7196 return 0;
7197 ;
7198 return 0;
7199}
7200_ACEOF
7201rm -f conftest.$ac_objext
7202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7203 (eval $ac_compile) 2>&5
7204 ac_status=$?
7205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7206 (exit $ac_status); } &&
7207 { ac_try='test -s conftest.$ac_objext'
7208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7209 (eval $ac_try) 2>&5
7210 ac_status=$?
7211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7212 (exit $ac_status); }; }; then
7213 ac_cv_type_fpos_t=yes
7214else
7215 echo "$as_me: failed program was:" >&5
7216cat conftest.$ac_ext >&5
7217ac_cv_type_fpos_t=no
7218fi
7219rm -f conftest.$ac_objext conftest.$ac_ext
7220fi
7221echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7222echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7223
7224echo "$as_me:$LINENO: checking size of fpos_t" >&5
7225echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7226if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7227 echo $ECHO_N "(cached) $ECHO_C" >&6
7228else
7229 if test "$ac_cv_type_fpos_t" = yes; then
7230 # The cast to unsigned long works around a bug in the HP C Compiler
7231 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7232 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7233 # This bug is HP SR number 8606223364.
7234 if test "$cross_compiling" = yes; then
7235 # Depending upon the size, compute the lo and hi bounds.
7236cat >conftest.$ac_ext <<_ACEOF
7237#line $LINENO "configure"
7238#include "confdefs.h"
7239$ac_includes_default
7240#ifdef F77_DUMMY_MAIN
7241# ifdef __cplusplus
7242 extern "C"
7243# endif
7244 int F77_DUMMY_MAIN() { return 1; }
7245#endif
7246int
7247main ()
7248{
7249static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7250test_array [0] = 0
7251
7252 ;
7253 return 0;
7254}
7255_ACEOF
7256rm -f conftest.$ac_objext
7257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7258 (eval $ac_compile) 2>&5
7259 ac_status=$?
7260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7261 (exit $ac_status); } &&
7262 { ac_try='test -s conftest.$ac_objext'
7263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7264 (eval $ac_try) 2>&5
7265 ac_status=$?
7266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7267 (exit $ac_status); }; }; then
7268 ac_lo=0 ac_mid=0
7269 while :; do
7270 cat >conftest.$ac_ext <<_ACEOF
7271#line $LINENO "configure"
7272#include "confdefs.h"
7273$ac_includes_default
7274#ifdef F77_DUMMY_MAIN
7275# ifdef __cplusplus
7276 extern "C"
7277# endif
7278 int F77_DUMMY_MAIN() { return 1; }
7279#endif
7280int
7281main ()
7282{
7283static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7284test_array [0] = 0
7285
7286 ;
7287 return 0;
7288}
7289_ACEOF
7290rm -f conftest.$ac_objext
7291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7292 (eval $ac_compile) 2>&5
7293 ac_status=$?
7294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7295 (exit $ac_status); } &&
7296 { ac_try='test -s conftest.$ac_objext'
7297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7298 (eval $ac_try) 2>&5
7299 ac_status=$?
7300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7301 (exit $ac_status); }; }; then
7302 ac_hi=$ac_mid; break
7303else
7304 echo "$as_me: failed program was:" >&5
7305cat conftest.$ac_ext >&5
7306ac_lo=`expr $ac_mid + 1`
7307 if test $ac_lo -le $ac_mid; then
7308 ac_lo= ac_hi=
7309 break
7310 fi
7311 ac_mid=`expr 2 '*' $ac_mid + 1`
7312fi
7313rm -f conftest.$ac_objext conftest.$ac_ext
7314 done
7315else
7316 echo "$as_me: failed program was:" >&5
7317cat conftest.$ac_ext >&5
7318cat >conftest.$ac_ext <<_ACEOF
7319#line $LINENO "configure"
7320#include "confdefs.h"
7321$ac_includes_default
7322#ifdef F77_DUMMY_MAIN
7323# ifdef __cplusplus
7324 extern "C"
7325# endif
7326 int F77_DUMMY_MAIN() { return 1; }
7327#endif
7328int
7329main ()
7330{
7331static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7332test_array [0] = 0
7333
7334 ;
7335 return 0;
7336}
7337_ACEOF
7338rm -f conftest.$ac_objext
7339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7340 (eval $ac_compile) 2>&5
7341 ac_status=$?
7342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7343 (exit $ac_status); } &&
7344 { ac_try='test -s conftest.$ac_objext'
7345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7346 (eval $ac_try) 2>&5
7347 ac_status=$?
7348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7349 (exit $ac_status); }; }; then
7350 ac_hi=-1 ac_mid=-1
7351 while :; do
7352 cat >conftest.$ac_ext <<_ACEOF
7353#line $LINENO "configure"
7354#include "confdefs.h"
7355$ac_includes_default
7356#ifdef F77_DUMMY_MAIN
7357# ifdef __cplusplus
7358 extern "C"
7359# endif
7360 int F77_DUMMY_MAIN() { return 1; }
7361#endif
7362int
7363main ()
7364{
7365static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7366test_array [0] = 0
7367
7368 ;
7369 return 0;
7370}
7371_ACEOF
7372rm -f conftest.$ac_objext
7373if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7374 (eval $ac_compile) 2>&5
7375 ac_status=$?
7376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7377 (exit $ac_status); } &&
7378 { ac_try='test -s conftest.$ac_objext'
7379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7380 (eval $ac_try) 2>&5
7381 ac_status=$?
7382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7383 (exit $ac_status); }; }; then
7384 ac_lo=$ac_mid; break
7385else
7386 echo "$as_me: failed program was:" >&5
7387cat conftest.$ac_ext >&5
7388ac_hi=`expr '(' $ac_mid ')' - 1`
7389 if test $ac_mid -le $ac_hi; then
7390 ac_lo= ac_hi=
7391 break
7392 fi
7393 ac_mid=`expr 2 '*' $ac_mid`
7394fi
7395rm -f conftest.$ac_objext conftest.$ac_ext
7396 done
7397else
7398 echo "$as_me: failed program was:" >&5
7399cat conftest.$ac_ext >&5
7400ac_lo= ac_hi=
7401fi
7402rm -f conftest.$ac_objext conftest.$ac_ext
7403fi
7404rm -f conftest.$ac_objext conftest.$ac_ext
7405# Binary search between lo and hi bounds.
7406while test "x$ac_lo" != "x$ac_hi"; do
7407 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7408 cat >conftest.$ac_ext <<_ACEOF
7409#line $LINENO "configure"
7410#include "confdefs.h"
7411$ac_includes_default
7412#ifdef F77_DUMMY_MAIN
7413# ifdef __cplusplus
7414 extern "C"
7415# endif
7416 int F77_DUMMY_MAIN() { return 1; }
7417#endif
7418int
7419main ()
7420{
7421static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7422test_array [0] = 0
7423
7424 ;
7425 return 0;
7426}
7427_ACEOF
7428rm -f conftest.$ac_objext
7429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7430 (eval $ac_compile) 2>&5
7431 ac_status=$?
7432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7433 (exit $ac_status); } &&
7434 { ac_try='test -s conftest.$ac_objext'
7435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7436 (eval $ac_try) 2>&5
7437 ac_status=$?
7438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439 (exit $ac_status); }; }; then
7440 ac_hi=$ac_mid
7441else
7442 echo "$as_me: failed program was:" >&5
7443cat conftest.$ac_ext >&5
7444ac_lo=`expr '(' $ac_mid ')' + 1`
7445fi
7446rm -f conftest.$ac_objext conftest.$ac_ext
7447done
7448case $ac_lo in
7449?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7450'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7451echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7452 { (exit 1); exit 1; }; } ;;
7453esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007454else
7455 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007456 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7457echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7458 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007459else
Martin v. Löwis11437992002-04-12 09:54:03 +00007460 cat >conftest.$ac_ext <<_ACEOF
7461#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007462#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007463$ac_includes_default
7464long longval () { return (long) (sizeof (fpos_t)); }
7465unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007466#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007467#include <stdlib.h>
7468#ifdef F77_DUMMY_MAIN
7469# ifdef __cplusplus
7470 extern "C"
7471# endif
7472 int F77_DUMMY_MAIN() { return 1; }
7473#endif
7474int
7475main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007476{
Martin v. Löwis11437992002-04-12 09:54:03 +00007477
7478 FILE *f = fopen ("conftest.val", "w");
7479 if (! f)
7480 exit (1);
7481 if (((long) (sizeof (fpos_t))) < 0)
7482 {
7483 long i = longval ();
7484 if (i != ((long) (sizeof (fpos_t))))
7485 exit (1);
7486 fprintf (f, "%ld\n", i);
7487 }
7488 else
7489 {
7490 unsigned long i = ulongval ();
7491 if (i != ((long) (sizeof (fpos_t))))
7492 exit (1);
7493 fprintf (f, "%lu\n", i);
7494 }
7495 exit (ferror (f) || fclose (f) != 0);
7496
7497 ;
7498 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007499}
Martin v. Löwis11437992002-04-12 09:54:03 +00007500_ACEOF
7501rm -f conftest$ac_exeext
7502if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7503 (eval $ac_link) 2>&5
7504 ac_status=$?
7505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7506 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7508 (eval $ac_try) 2>&5
7509 ac_status=$?
7510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7511 (exit $ac_status); }; }; then
7512 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007513else
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 echo "$as_me: program exited with status $ac_status" >&5
7515echo "$as_me: failed program was:" >&5
7516cat conftest.$ac_ext >&5
7517( exit $ac_status )
7518{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7519echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7520 { (exit 1); exit 1; }; }
7521fi
7522rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7523fi
7524fi
7525rm -f conftest.val
7526else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007527 ac_cv_sizeof_fpos_t=0
7528fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007529fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007530echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7531echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7532cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007533#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007534_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007535
Michael W. Hudson54241132001-12-07 15:38:26 +00007536
7537
Martin v. Löwis11437992002-04-12 09:54:03 +00007538echo "$as_me:$LINENO: checking for long long support" >&5
7539echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007540have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007541cat >conftest.$ac_ext <<_ACEOF
7542#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007543#include "confdefs.h"
7544
Martin v. Löwis11437992002-04-12 09:54:03 +00007545#ifdef F77_DUMMY_MAIN
7546# ifdef __cplusplus
7547 extern "C"
7548# endif
7549 int F77_DUMMY_MAIN() { return 1; }
7550#endif
7551int
7552main ()
7553{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007554long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007555 ;
7556 return 0;
7557}
7558_ACEOF
7559rm -f conftest.$ac_objext
7560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7561 (eval $ac_compile) 2>&5
7562 ac_status=$?
7563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7564 (exit $ac_status); } &&
7565 { ac_try='test -s conftest.$ac_objext'
7566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7567 (eval $ac_try) 2>&5
7568 ac_status=$?
7569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7570 (exit $ac_status); }; }; then
7571
7572
7573cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007574#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007575_ACEOF
7576
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007577 have_long_long=yes
7578
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007579else
Martin v. Löwis11437992002-04-12 09:54:03 +00007580 echo "$as_me: failed program was:" >&5
7581cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007582fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007583rm -f conftest.$ac_objext conftest.$ac_ext
7584echo "$as_me:$LINENO: result: $have_long_long" >&5
7585echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007586if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007587echo "$as_me:$LINENO: checking for long long" >&5
7588echo $ECHO_N "checking for long long... $ECHO_C" >&6
7589if test "${ac_cv_type_long_long+set}" = set; then
7590 echo $ECHO_N "(cached) $ECHO_C" >&6
7591else
7592 cat >conftest.$ac_ext <<_ACEOF
7593#line $LINENO "configure"
7594#include "confdefs.h"
7595$ac_includes_default
7596#ifdef F77_DUMMY_MAIN
7597# ifdef __cplusplus
7598 extern "C"
7599# endif
7600 int F77_DUMMY_MAIN() { return 1; }
7601#endif
7602int
7603main ()
7604{
7605if ((long long *) 0)
7606 return 0;
7607if (sizeof (long long))
7608 return 0;
7609 ;
7610 return 0;
7611}
7612_ACEOF
7613rm -f conftest.$ac_objext
7614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7615 (eval $ac_compile) 2>&5
7616 ac_status=$?
7617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7618 (exit $ac_status); } &&
7619 { ac_try='test -s conftest.$ac_objext'
7620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7621 (eval $ac_try) 2>&5
7622 ac_status=$?
7623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624 (exit $ac_status); }; }; then
7625 ac_cv_type_long_long=yes
7626else
7627 echo "$as_me: failed program was:" >&5
7628cat conftest.$ac_ext >&5
7629ac_cv_type_long_long=no
7630fi
7631rm -f conftest.$ac_objext conftest.$ac_ext
7632fi
7633echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7634echo "${ECHO_T}$ac_cv_type_long_long" >&6
7635
7636echo "$as_me:$LINENO: checking size of long long" >&5
7637echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7638if test "${ac_cv_sizeof_long_long+set}" = set; then
7639 echo $ECHO_N "(cached) $ECHO_C" >&6
7640else
7641 if test "$ac_cv_type_long_long" = yes; then
7642 # The cast to unsigned long works around a bug in the HP C Compiler
7643 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7644 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7645 # This bug is HP SR number 8606223364.
7646 if test "$cross_compiling" = yes; then
7647 # Depending upon the size, compute the lo and hi bounds.
7648cat >conftest.$ac_ext <<_ACEOF
7649#line $LINENO "configure"
7650#include "confdefs.h"
7651$ac_includes_default
7652#ifdef F77_DUMMY_MAIN
7653# ifdef __cplusplus
7654 extern "C"
7655# endif
7656 int F77_DUMMY_MAIN() { return 1; }
7657#endif
7658int
7659main ()
7660{
7661static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7662test_array [0] = 0
7663
7664 ;
7665 return 0;
7666}
7667_ACEOF
7668rm -f conftest.$ac_objext
7669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7670 (eval $ac_compile) 2>&5
7671 ac_status=$?
7672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7673 (exit $ac_status); } &&
7674 { ac_try='test -s conftest.$ac_objext'
7675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7676 (eval $ac_try) 2>&5
7677 ac_status=$?
7678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679 (exit $ac_status); }; }; then
7680 ac_lo=0 ac_mid=0
7681 while :; do
7682 cat >conftest.$ac_ext <<_ACEOF
7683#line $LINENO "configure"
7684#include "confdefs.h"
7685$ac_includes_default
7686#ifdef F77_DUMMY_MAIN
7687# ifdef __cplusplus
7688 extern "C"
7689# endif
7690 int F77_DUMMY_MAIN() { return 1; }
7691#endif
7692int
7693main ()
7694{
7695static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7696test_array [0] = 0
7697
7698 ;
7699 return 0;
7700}
7701_ACEOF
7702rm -f conftest.$ac_objext
7703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7704 (eval $ac_compile) 2>&5
7705 ac_status=$?
7706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7707 (exit $ac_status); } &&
7708 { ac_try='test -s conftest.$ac_objext'
7709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7710 (eval $ac_try) 2>&5
7711 ac_status=$?
7712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7713 (exit $ac_status); }; }; then
7714 ac_hi=$ac_mid; break
7715else
7716 echo "$as_me: failed program was:" >&5
7717cat conftest.$ac_ext >&5
7718ac_lo=`expr $ac_mid + 1`
7719 if test $ac_lo -le $ac_mid; then
7720 ac_lo= ac_hi=
7721 break
7722 fi
7723 ac_mid=`expr 2 '*' $ac_mid + 1`
7724fi
7725rm -f conftest.$ac_objext conftest.$ac_ext
7726 done
7727else
7728 echo "$as_me: failed program was:" >&5
7729cat conftest.$ac_ext >&5
7730cat >conftest.$ac_ext <<_ACEOF
7731#line $LINENO "configure"
7732#include "confdefs.h"
7733$ac_includes_default
7734#ifdef F77_DUMMY_MAIN
7735# ifdef __cplusplus
7736 extern "C"
7737# endif
7738 int F77_DUMMY_MAIN() { return 1; }
7739#endif
7740int
7741main ()
7742{
7743static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
7744test_array [0] = 0
7745
7746 ;
7747 return 0;
7748}
7749_ACEOF
7750rm -f conftest.$ac_objext
7751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7752 (eval $ac_compile) 2>&5
7753 ac_status=$?
7754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7755 (exit $ac_status); } &&
7756 { ac_try='test -s conftest.$ac_objext'
7757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7758 (eval $ac_try) 2>&5
7759 ac_status=$?
7760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7761 (exit $ac_status); }; }; then
7762 ac_hi=-1 ac_mid=-1
7763 while :; do
7764 cat >conftest.$ac_ext <<_ACEOF
7765#line $LINENO "configure"
7766#include "confdefs.h"
7767$ac_includes_default
7768#ifdef F77_DUMMY_MAIN
7769# ifdef __cplusplus
7770 extern "C"
7771# endif
7772 int F77_DUMMY_MAIN() { return 1; }
7773#endif
7774int
7775main ()
7776{
7777static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
7778test_array [0] = 0
7779
7780 ;
7781 return 0;
7782}
7783_ACEOF
7784rm -f conftest.$ac_objext
7785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7786 (eval $ac_compile) 2>&5
7787 ac_status=$?
7788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7789 (exit $ac_status); } &&
7790 { ac_try='test -s conftest.$ac_objext'
7791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7792 (eval $ac_try) 2>&5
7793 ac_status=$?
7794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7795 (exit $ac_status); }; }; then
7796 ac_lo=$ac_mid; break
7797else
7798 echo "$as_me: failed program was:" >&5
7799cat conftest.$ac_ext >&5
7800ac_hi=`expr '(' $ac_mid ')' - 1`
7801 if test $ac_mid -le $ac_hi; then
7802 ac_lo= ac_hi=
7803 break
7804 fi
7805 ac_mid=`expr 2 '*' $ac_mid`
7806fi
7807rm -f conftest.$ac_objext conftest.$ac_ext
7808 done
7809else
7810 echo "$as_me: failed program was:" >&5
7811cat conftest.$ac_ext >&5
7812ac_lo= ac_hi=
7813fi
7814rm -f conftest.$ac_objext conftest.$ac_ext
7815fi
7816rm -f conftest.$ac_objext conftest.$ac_ext
7817# Binary search between lo and hi bounds.
7818while test "x$ac_lo" != "x$ac_hi"; do
7819 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7820 cat >conftest.$ac_ext <<_ACEOF
7821#line $LINENO "configure"
7822#include "confdefs.h"
7823$ac_includes_default
7824#ifdef F77_DUMMY_MAIN
7825# ifdef __cplusplus
7826 extern "C"
7827# endif
7828 int F77_DUMMY_MAIN() { return 1; }
7829#endif
7830int
7831main ()
7832{
7833static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7834test_array [0] = 0
7835
7836 ;
7837 return 0;
7838}
7839_ACEOF
7840rm -f conftest.$ac_objext
7841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7842 (eval $ac_compile) 2>&5
7843 ac_status=$?
7844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7845 (exit $ac_status); } &&
7846 { ac_try='test -s conftest.$ac_objext'
7847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7848 (eval $ac_try) 2>&5
7849 ac_status=$?
7850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7851 (exit $ac_status); }; }; then
7852 ac_hi=$ac_mid
7853else
7854 echo "$as_me: failed program was:" >&5
7855cat conftest.$ac_ext >&5
7856ac_lo=`expr '(' $ac_mid ')' + 1`
7857fi
7858rm -f conftest.$ac_objext conftest.$ac_ext
7859done
7860case $ac_lo in
7861?*) ac_cv_sizeof_long_long=$ac_lo;;
7862'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7863echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7864 { (exit 1); exit 1; }; } ;;
7865esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007866else
7867 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7869echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7870 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007871else
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 cat >conftest.$ac_ext <<_ACEOF
7873#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007874#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007875$ac_includes_default
7876long longval () { return (long) (sizeof (long long)); }
7877unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007878#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007879#include <stdlib.h>
7880#ifdef F77_DUMMY_MAIN
7881# ifdef __cplusplus
7882 extern "C"
7883# endif
7884 int F77_DUMMY_MAIN() { return 1; }
7885#endif
7886int
7887main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007888{
Martin v. Löwis11437992002-04-12 09:54:03 +00007889
7890 FILE *f = fopen ("conftest.val", "w");
7891 if (! f)
7892 exit (1);
7893 if (((long) (sizeof (long long))) < 0)
7894 {
7895 long i = longval ();
7896 if (i != ((long) (sizeof (long long))))
7897 exit (1);
7898 fprintf (f, "%ld\n", i);
7899 }
7900 else
7901 {
7902 unsigned long i = ulongval ();
7903 if (i != ((long) (sizeof (long long))))
7904 exit (1);
7905 fprintf (f, "%lu\n", i);
7906 }
7907 exit (ferror (f) || fclose (f) != 0);
7908
7909 ;
7910 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007911}
Martin v. Löwis11437992002-04-12 09:54:03 +00007912_ACEOF
7913rm -f conftest$ac_exeext
7914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7915 (eval $ac_link) 2>&5
7916 ac_status=$?
7917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7918 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7920 (eval $ac_try) 2>&5
7921 ac_status=$?
7922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7923 (exit $ac_status); }; }; then
7924 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007925else
Martin v. Löwis11437992002-04-12 09:54:03 +00007926 echo "$as_me: program exited with status $ac_status" >&5
7927echo "$as_me: failed program was:" >&5
7928cat conftest.$ac_ext >&5
7929( exit $ac_status )
7930{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
7931echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
7932 { (exit 1); exit 1; }; }
7933fi
7934rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7935fi
7936fi
7937rm -f conftest.val
7938else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007939 ac_cv_sizeof_long_long=0
7940fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007941fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007942echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
7943echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
7944cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007945#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007946_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007947
Michael W. Hudson54241132001-12-07 15:38:26 +00007948
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007949fi
7950
Martin v. Löwis11437992002-04-12 09:54:03 +00007951echo "$as_me:$LINENO: checking for uintptr_t support" >&5
7952echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007953have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007954cat >conftest.$ac_ext <<_ACEOF
7955#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007956#include "confdefs.h"
7957
Martin v. Löwis11437992002-04-12 09:54:03 +00007958#ifdef F77_DUMMY_MAIN
7959# ifdef __cplusplus
7960 extern "C"
7961# endif
7962 int F77_DUMMY_MAIN() { return 1; }
7963#endif
7964int
7965main ()
7966{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007967uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 ;
7969 return 0;
7970}
7971_ACEOF
7972rm -f conftest.$ac_objext
7973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7974 (eval $ac_compile) 2>&5
7975 ac_status=$?
7976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7977 (exit $ac_status); } &&
7978 { ac_try='test -s conftest.$ac_objext'
7979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7980 (eval $ac_try) 2>&5
7981 ac_status=$?
7982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7983 (exit $ac_status); }; }; then
7984
7985
7986cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007987#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007988_ACEOF
7989
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007990 have_uintptr_t=yes
7991
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007992else
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 echo "$as_me: failed program was:" >&5
7994cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007995fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007996rm -f conftest.$ac_objext conftest.$ac_ext
7997echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
7998echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007999if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008000echo "$as_me:$LINENO: checking for uintptr_t" >&5
8001echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8002if test "${ac_cv_type_uintptr_t+set}" = set; then
8003 echo $ECHO_N "(cached) $ECHO_C" >&6
8004else
8005 cat >conftest.$ac_ext <<_ACEOF
8006#line $LINENO "configure"
8007#include "confdefs.h"
8008$ac_includes_default
8009#ifdef F77_DUMMY_MAIN
8010# ifdef __cplusplus
8011 extern "C"
8012# endif
8013 int F77_DUMMY_MAIN() { return 1; }
8014#endif
8015int
8016main ()
8017{
8018if ((uintptr_t *) 0)
8019 return 0;
8020if (sizeof (uintptr_t))
8021 return 0;
8022 ;
8023 return 0;
8024}
8025_ACEOF
8026rm -f conftest.$ac_objext
8027if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8028 (eval $ac_compile) 2>&5
8029 ac_status=$?
8030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8031 (exit $ac_status); } &&
8032 { ac_try='test -s conftest.$ac_objext'
8033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8034 (eval $ac_try) 2>&5
8035 ac_status=$?
8036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8037 (exit $ac_status); }; }; then
8038 ac_cv_type_uintptr_t=yes
8039else
8040 echo "$as_me: failed program was:" >&5
8041cat conftest.$ac_ext >&5
8042ac_cv_type_uintptr_t=no
8043fi
8044rm -f conftest.$ac_objext conftest.$ac_ext
8045fi
8046echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8047echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8048
8049echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8050echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8051if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8052 echo $ECHO_N "(cached) $ECHO_C" >&6
8053else
8054 if test "$ac_cv_type_uintptr_t" = yes; then
8055 # The cast to unsigned long works around a bug in the HP C Compiler
8056 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8057 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8058 # This bug is HP SR number 8606223364.
8059 if test "$cross_compiling" = yes; then
8060 # Depending upon the size, compute the lo and hi bounds.
8061cat >conftest.$ac_ext <<_ACEOF
8062#line $LINENO "configure"
8063#include "confdefs.h"
8064$ac_includes_default
8065#ifdef F77_DUMMY_MAIN
8066# ifdef __cplusplus
8067 extern "C"
8068# endif
8069 int F77_DUMMY_MAIN() { return 1; }
8070#endif
8071int
8072main ()
8073{
8074static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8075test_array [0] = 0
8076
8077 ;
8078 return 0;
8079}
8080_ACEOF
8081rm -f conftest.$ac_objext
8082if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8083 (eval $ac_compile) 2>&5
8084 ac_status=$?
8085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8086 (exit $ac_status); } &&
8087 { ac_try='test -s conftest.$ac_objext'
8088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8089 (eval $ac_try) 2>&5
8090 ac_status=$?
8091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8092 (exit $ac_status); }; }; then
8093 ac_lo=0 ac_mid=0
8094 while :; do
8095 cat >conftest.$ac_ext <<_ACEOF
8096#line $LINENO "configure"
8097#include "confdefs.h"
8098$ac_includes_default
8099#ifdef F77_DUMMY_MAIN
8100# ifdef __cplusplus
8101 extern "C"
8102# endif
8103 int F77_DUMMY_MAIN() { return 1; }
8104#endif
8105int
8106main ()
8107{
8108static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8109test_array [0] = 0
8110
8111 ;
8112 return 0;
8113}
8114_ACEOF
8115rm -f conftest.$ac_objext
8116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8117 (eval $ac_compile) 2>&5
8118 ac_status=$?
8119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8120 (exit $ac_status); } &&
8121 { ac_try='test -s conftest.$ac_objext'
8122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8123 (eval $ac_try) 2>&5
8124 ac_status=$?
8125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8126 (exit $ac_status); }; }; then
8127 ac_hi=$ac_mid; break
8128else
8129 echo "$as_me: failed program was:" >&5
8130cat conftest.$ac_ext >&5
8131ac_lo=`expr $ac_mid + 1`
8132 if test $ac_lo -le $ac_mid; then
8133 ac_lo= ac_hi=
8134 break
8135 fi
8136 ac_mid=`expr 2 '*' $ac_mid + 1`
8137fi
8138rm -f conftest.$ac_objext conftest.$ac_ext
8139 done
8140else
8141 echo "$as_me: failed program was:" >&5
8142cat conftest.$ac_ext >&5
8143cat >conftest.$ac_ext <<_ACEOF
8144#line $LINENO "configure"
8145#include "confdefs.h"
8146$ac_includes_default
8147#ifdef F77_DUMMY_MAIN
8148# ifdef __cplusplus
8149 extern "C"
8150# endif
8151 int F77_DUMMY_MAIN() { return 1; }
8152#endif
8153int
8154main ()
8155{
8156static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8157test_array [0] = 0
8158
8159 ;
8160 return 0;
8161}
8162_ACEOF
8163rm -f conftest.$ac_objext
8164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8165 (eval $ac_compile) 2>&5
8166 ac_status=$?
8167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8168 (exit $ac_status); } &&
8169 { ac_try='test -s conftest.$ac_objext'
8170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8171 (eval $ac_try) 2>&5
8172 ac_status=$?
8173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8174 (exit $ac_status); }; }; then
8175 ac_hi=-1 ac_mid=-1
8176 while :; do
8177 cat >conftest.$ac_ext <<_ACEOF
8178#line $LINENO "configure"
8179#include "confdefs.h"
8180$ac_includes_default
8181#ifdef F77_DUMMY_MAIN
8182# ifdef __cplusplus
8183 extern "C"
8184# endif
8185 int F77_DUMMY_MAIN() { return 1; }
8186#endif
8187int
8188main ()
8189{
8190static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8191test_array [0] = 0
8192
8193 ;
8194 return 0;
8195}
8196_ACEOF
8197rm -f conftest.$ac_objext
8198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8199 (eval $ac_compile) 2>&5
8200 ac_status=$?
8201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8202 (exit $ac_status); } &&
8203 { ac_try='test -s conftest.$ac_objext'
8204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8205 (eval $ac_try) 2>&5
8206 ac_status=$?
8207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8208 (exit $ac_status); }; }; then
8209 ac_lo=$ac_mid; break
8210else
8211 echo "$as_me: failed program was:" >&5
8212cat conftest.$ac_ext >&5
8213ac_hi=`expr '(' $ac_mid ')' - 1`
8214 if test $ac_mid -le $ac_hi; then
8215 ac_lo= ac_hi=
8216 break
8217 fi
8218 ac_mid=`expr 2 '*' $ac_mid`
8219fi
8220rm -f conftest.$ac_objext conftest.$ac_ext
8221 done
8222else
8223 echo "$as_me: failed program was:" >&5
8224cat conftest.$ac_ext >&5
8225ac_lo= ac_hi=
8226fi
8227rm -f conftest.$ac_objext conftest.$ac_ext
8228fi
8229rm -f conftest.$ac_objext conftest.$ac_ext
8230# Binary search between lo and hi bounds.
8231while test "x$ac_lo" != "x$ac_hi"; do
8232 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8233 cat >conftest.$ac_ext <<_ACEOF
8234#line $LINENO "configure"
8235#include "confdefs.h"
8236$ac_includes_default
8237#ifdef F77_DUMMY_MAIN
8238# ifdef __cplusplus
8239 extern "C"
8240# endif
8241 int F77_DUMMY_MAIN() { return 1; }
8242#endif
8243int
8244main ()
8245{
8246static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8247test_array [0] = 0
8248
8249 ;
8250 return 0;
8251}
8252_ACEOF
8253rm -f conftest.$ac_objext
8254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8255 (eval $ac_compile) 2>&5
8256 ac_status=$?
8257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8258 (exit $ac_status); } &&
8259 { ac_try='test -s conftest.$ac_objext'
8260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8261 (eval $ac_try) 2>&5
8262 ac_status=$?
8263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8264 (exit $ac_status); }; }; then
8265 ac_hi=$ac_mid
8266else
8267 echo "$as_me: failed program was:" >&5
8268cat conftest.$ac_ext >&5
8269ac_lo=`expr '(' $ac_mid ')' + 1`
8270fi
8271rm -f conftest.$ac_objext conftest.$ac_ext
8272done
8273case $ac_lo in
8274?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8275'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8276echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8277 { (exit 1); exit 1; }; } ;;
8278esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008279else
8280 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008281 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8282echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8283 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008284else
Martin v. Löwis11437992002-04-12 09:54:03 +00008285 cat >conftest.$ac_ext <<_ACEOF
8286#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008287#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008288$ac_includes_default
8289long longval () { return (long) (sizeof (uintptr_t)); }
8290unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008291#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008292#include <stdlib.h>
8293#ifdef F77_DUMMY_MAIN
8294# ifdef __cplusplus
8295 extern "C"
8296# endif
8297 int F77_DUMMY_MAIN() { return 1; }
8298#endif
8299int
8300main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008301{
Martin v. Löwis11437992002-04-12 09:54:03 +00008302
8303 FILE *f = fopen ("conftest.val", "w");
8304 if (! f)
8305 exit (1);
8306 if (((long) (sizeof (uintptr_t))) < 0)
8307 {
8308 long i = longval ();
8309 if (i != ((long) (sizeof (uintptr_t))))
8310 exit (1);
8311 fprintf (f, "%ld\n", i);
8312 }
8313 else
8314 {
8315 unsigned long i = ulongval ();
8316 if (i != ((long) (sizeof (uintptr_t))))
8317 exit (1);
8318 fprintf (f, "%lu\n", i);
8319 }
8320 exit (ferror (f) || fclose (f) != 0);
8321
8322 ;
8323 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008324}
Martin v. Löwis11437992002-04-12 09:54:03 +00008325_ACEOF
8326rm -f conftest$ac_exeext
8327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8328 (eval $ac_link) 2>&5
8329 ac_status=$?
8330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8331 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8333 (eval $ac_try) 2>&5
8334 ac_status=$?
8335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8336 (exit $ac_status); }; }; then
8337 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008338else
Martin v. Löwis11437992002-04-12 09:54:03 +00008339 echo "$as_me: program exited with status $ac_status" >&5
8340echo "$as_me: failed program was:" >&5
8341cat conftest.$ac_ext >&5
8342( exit $ac_status )
8343{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8344echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8345 { (exit 1); exit 1; }; }
8346fi
8347rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8348fi
8349fi
8350rm -f conftest.val
8351else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008352 ac_cv_sizeof_uintptr_t=0
8353fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008354fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008355echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8356echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8357cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008358#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008359_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008360
Michael W. Hudson54241132001-12-07 15:38:26 +00008361
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008362fi
8363
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008364# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008365echo "$as_me:$LINENO: checking size of off_t" >&5
8366echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8367if test "${ac_cv_sizeof_off_t+set}" = set; then
8368 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008369else
8370 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008371 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008372else
Martin v. Löwis11437992002-04-12 09:54:03 +00008373 cat >conftest.$ac_ext <<_ACEOF
8374#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008375#include "confdefs.h"
8376#include <stdio.h>
8377#include <sys/types.h>
8378main()
8379{
8380 FILE *f=fopen("conftestval", "w");
8381 if (!f) exit(1);
8382 fprintf(f, "%d\n", sizeof(off_t));
8383 exit(0);
8384}
Martin v. Löwis11437992002-04-12 09:54:03 +00008385_ACEOF
8386rm -f conftest$ac_exeext
8387if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8388 (eval $ac_link) 2>&5
8389 ac_status=$?
8390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8391 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8393 (eval $ac_try) 2>&5
8394 ac_status=$?
8395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8396 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008397 ac_cv_sizeof_off_t=`cat conftestval`
8398else
Martin v. Löwis11437992002-04-12 09:54:03 +00008399 echo "$as_me: program exited with status $ac_status" >&5
8400echo "$as_me: failed program was:" >&5
8401cat conftest.$ac_ext >&5
8402( exit $ac_status )
8403ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008405rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008406fi
8407
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008408fi
8409
Martin v. Löwis11437992002-04-12 09:54:03 +00008410echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8411echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8412
8413cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008414#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008415_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008416
Michael W. Hudson54241132001-12-07 15:38:26 +00008417
Martin v. Löwis11437992002-04-12 09:54:03 +00008418echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8419echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008420if test "$have_long_long" = yes -a \
8421 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8422 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008423
Martin v. Löwis11437992002-04-12 09:54:03 +00008424cat >>confdefs.h <<\_ACEOF
8425#define HAVE_LARGEFILE_SUPPORT 1
8426_ACEOF
8427
8428 echo "$as_me:$LINENO: result: yes" >&5
8429echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008430else
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 echo "$as_me:$LINENO: result: no" >&5
8432echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008433fi
8434
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008435# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008436echo "$as_me:$LINENO: checking size of time_t" >&5
8437echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8438if test "${ac_cv_sizeof_time_t+set}" = set; then
8439 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008440else
8441 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008442 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008443else
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 cat >conftest.$ac_ext <<_ACEOF
8445#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008446#include "confdefs.h"
8447#include <stdio.h>
8448#include <time.h>
8449main()
8450{
8451 FILE *f=fopen("conftestval", "w");
8452 if (!f) exit(1);
8453 fprintf(f, "%d\n", sizeof(time_t));
8454 exit(0);
8455}
Martin v. Löwis11437992002-04-12 09:54:03 +00008456_ACEOF
8457rm -f conftest$ac_exeext
8458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8459 (eval $ac_link) 2>&5
8460 ac_status=$?
8461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8462 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8464 (eval $ac_try) 2>&5
8465 ac_status=$?
8466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8467 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008468 ac_cv_sizeof_time_t=`cat conftestval`
8469else
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 echo "$as_me: program exited with status $ac_status" >&5
8471echo "$as_me: failed program was:" >&5
8472cat conftest.$ac_ext >&5
8473( exit $ac_status )
8474ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008475fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008476rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008477fi
8478
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008479fi
8480
Martin v. Löwis11437992002-04-12 09:54:03 +00008481echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8482echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8483
8484cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008485#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008486_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008487
Michael W. Hudson54241132001-12-07 15:38:26 +00008488
8489
Trent Mick635f6fb2000-08-23 21:33:05 +00008490# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008491ac_save_cc="$CC"
8492if test "$ac_cv_kpthread" = "yes"
8493then CC="$CC -Kpthread"
8494fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008495echo "$as_me:$LINENO: checking for pthread_t" >&5
8496echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008497have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008498cat >conftest.$ac_ext <<_ACEOF
8499#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008500#include "confdefs.h"
8501#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008502#ifdef F77_DUMMY_MAIN
8503# ifdef __cplusplus
8504 extern "C"
8505# endif
8506 int F77_DUMMY_MAIN() { return 1; }
8507#endif
8508int
8509main ()
8510{
Guido van Rossum12580492000-09-24 16:47:19 +00008511pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 ;
8513 return 0;
8514}
8515_ACEOF
8516rm -f conftest.$ac_objext
8517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8518 (eval $ac_compile) 2>&5
8519 ac_status=$?
8520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8521 (exit $ac_status); } &&
8522 { ac_try='test -s conftest.$ac_objext'
8523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8524 (eval $ac_try) 2>&5
8525 ac_status=$?
8526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8527 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008528 have_pthread_t=yes
8529else
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 echo "$as_me: failed program was:" >&5
8531cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008532fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008533rm -f conftest.$ac_objext conftest.$ac_ext
8534echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8535echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008536if test "$have_pthread_t" = yes ; then
8537 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8539echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8540 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8541 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008542else
8543 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008544 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008545else
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 cat >conftest.$ac_ext <<_ACEOF
8547#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008548#include "confdefs.h"
8549#include <stdio.h>
8550 #include <pthread.h>
8551 main()
8552 {
8553 FILE *f=fopen("conftestval", "w");
8554 if (!f) exit(1);
8555 fprintf(f, "%d\n", sizeof(pthread_t));
8556 exit(0);
8557 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008558_ACEOF
8559rm -f conftest$ac_exeext
8560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8561 (eval $ac_link) 2>&5
8562 ac_status=$?
8563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8564 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8566 (eval $ac_try) 2>&5
8567 ac_status=$?
8568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8569 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008570 ac_cv_sizeof_pthread_t=`cat conftestval`
8571else
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 echo "$as_me: program exited with status $ac_status" >&5
8573echo "$as_me: failed program was:" >&5
8574cat conftest.$ac_ext >&5
8575( exit $ac_status )
8576ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008577fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008578rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008579fi
8580
Trent Mick635f6fb2000-08-23 21:33:05 +00008581fi
8582
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8584echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8585
8586cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008587#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008588_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008589
8590fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008591CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008592
Martin v. Löwis11437992002-04-12 09:54:03 +00008593echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8594echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008595# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8596if test "${enable_toolbox_glue+set}" = set; then
8597 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599fi;
Jack Jansene578a632001-08-15 01:27:14 +00008600
8601if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008602then
Jack Jansene578a632001-08-15 01:27:14 +00008603 case $ac_sys_system/$ac_sys_release in
8604 Darwin/*)
8605 enable_toolbox_glue="yes";;
8606 *)
8607 enable_toolbox_glue="no";;
8608 esac
8609fi
8610case "$enable_toolbox_glue" in
8611yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008612 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008613 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008614 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008615
8616cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008617#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008618_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008619
8620 ;;
8621*)
8622 extra_frameworks=""
8623 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008624 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008625 ;;
8626esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008627echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8628echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008629
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008630
8631case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008632 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008633 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008634 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
8635 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008636 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8637 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008638 Darwin/*)
8639 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00008640 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
8641 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008642 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8643 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008644esac
8645
Martin v. Löwis11437992002-04-12 09:54:03 +00008646echo "$as_me:$LINENO: checking for --enable-framework" >&5
8647echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008648if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008649then
Jack Jansenca06bc62001-08-03 15:32:23 +00008650 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008651 # -U __environ is needed since bundles don't have access
8652 # to crt0 when built but will always be linked against it
Martin v. Löwis11437992002-04-12 09:54:03 +00008653 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008654 # in the build location.
Martin v. Löwis11437992002-04-12 09:54:03 +00008655
Jack Jansena3891ea2001-09-07 14:25:12 +00008656 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008657 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
8658 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00008659 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661cat >>confdefs.h <<\_ACEOF
8662#define WITH_NEXT_FRAMEWORK 1
8663_ACEOF
8664
8665 echo "$as_me:$LINENO: result: yes" >&5
8666echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008667else
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 echo "$as_me:$LINENO: result: no" >&5
8669echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008670fi
8671
Martin v. Löwis11437992002-04-12 09:54:03 +00008672echo "$as_me:$LINENO: checking for dyld" >&5
8673echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008674case $ac_sys_system/$ac_sys_release in
8675 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677cat >>confdefs.h <<\_ACEOF
8678#define WITH_DYLD 1
8679_ACEOF
8680
8681 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8682echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008683 ;;
8684 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 echo "$as_me:$LINENO: result: no" >&5
8686echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008687 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008688esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008689
Guido van Rossum0a516c91994-09-12 10:58:40 +00008690# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008691
Michael W. Hudson54241132001-12-07 15:38:26 +00008692
8693
8694
8695
Guido van Rossum0a516c91994-09-12 10:58:40 +00008696# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008697# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008698echo "$as_me:$LINENO: checking SO" >&5
8699echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008700if test -z "$SO"
8701then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008702 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008703 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008704 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008705 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008706 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008707fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008708echo "$as_me:$LINENO: result: $SO" >&5
8709echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008710# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008711# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008712# (Shared libraries in this instance are shared modules to be loaded into
8713# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008714echo "$as_me:$LINENO: checking LDSHARED" >&5
8715echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008716if test -z "$LDSHARED"
8717then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008718 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008719 AIX*)
8720 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008721 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008722 ;;
8723 BeOS*)
8724 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008725 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008726 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008727 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008728 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008729 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00008731 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008732 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008733 else LDSHARED="$(CC) -G";
Greg Ward57c9a662000-05-26 12:22:54 +00008734 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008735 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008736 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8737 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008738 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008739 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8740 if test "$enable_framework" ; then
8741 # Link against the framework. All externals should be defined.
8742 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8743 else
8744 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008745 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008746 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008747 Darwin/*)
8748 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8749 if test "$enable_framework" ; then
8750 # Link against the framework. All externals should be defined.
8751 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8752 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008753 # No framework, use the Python app as bundle-loader
8754 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8755 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008756 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008757 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008758 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008759 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008760 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008761 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008762 then
8763 LDSHARED="cc -shared ${LDFLAGS}"
8764 else
8765 LDSHARED="ld -Bshareable ${LDFLAGS}"
8766 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008767 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008768 if test "$GCC" = "yes"
8769 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008770 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008771 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008772 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008773 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008774 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008775 *) LDSHARED="ld";;
8776 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008777fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008778echo "$as_me:$LINENO: result: $LDSHARED" >&5
8779echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008780BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008781# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008782# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008783echo "$as_me:$LINENO: checking CCSHARED" >&5
8784echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008785if test -z "$CCSHARED"
8786then
Guido van Rossum07397971997-04-29 21:49:50 +00008787 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008788 SunOS*) if test "$GCC" = yes;
8789 then CCSHARED="-fPIC";
8790 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008791 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008792 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008793 else CCSHARED="+z";
8794 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008795 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008796 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008797 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008798 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008799 if test "$GCC" = "yes"
8800 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008801 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008802 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008803 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008804 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008805 IRIX*/6*) case $CC in
8806 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008807 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008808 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008809 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008810 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008811fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008812echo "$as_me:$LINENO: result: $CCSHARED" >&5
8813echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008814# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008815# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008816echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8817echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008818if test -z "$LINKFORSHARED"
8819then
Guido van Rossum07397971997-04-29 21:49:50 +00008820 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008821 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008822 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008823 LINKFORSHARED="-Wl,-E -Wl,+s";;
8824# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008825 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008826 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008827 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008829 # -u __dummy makes the linker aware of the objc runtime
8830 # in System.framework; otherwise, __objcInit (referenced in
8831 # crt1.o) gets erroneously defined as common, which breaks dynamic
8832 # loading of any modules which reference it in System.framework.
8833 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8834 # not used by the core itself but which needs to be in the core so
8835 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008836 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008837 if test "$enable_framework"
8838 then
8839 LINKFORSHARED="$LINKFORSHARED -framework Python"
8840 fi
8841 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008842 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008843 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008844 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008845 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008846 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8847 then
8848 LINKFORSHARED="-Wl,--export-dynamic"
8849 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008850 SunOS/5*) case $CC in
8851 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008852 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008853 then
8854 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008855 fi;;
8856 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008857 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008858fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008859echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8860echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008861
Michael W. Hudson54241132001-12-07 15:38:26 +00008862
Martin v. Löwis11437992002-04-12 09:54:03 +00008863echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8864echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008865if test ! "$LIBRARY" = "$LDLIBRARY"
8866then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008867 case $ac_sys_system in
8868 CYGWIN*)
8869 # Cygwin needs CCSHARED when building extension DLLs
8870 # but not when building the interpreter DLL.
8871 CFLAGSFORSHARED='';;
8872 *)
8873 CFLAGSFORSHARED='$(CCSHARED)'
8874 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008875fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008876echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8877echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008878
Guido van Rossum627b2d71993-12-24 10:39:16 +00008879# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008880
8881echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8882echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8883if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8884 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008885else
Martin v. Löwis11437992002-04-12 09:54:03 +00008886 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008887LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008888cat >conftest.$ac_ext <<_ACEOF
8889#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008890#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008891
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008892/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008893#ifdef __cplusplus
8894extern "C"
8895#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008896/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008897 builtin and then its argument prototype would still apply. */
8898char dlopen ();
8899#ifdef F77_DUMMY_MAIN
8900# ifdef __cplusplus
8901 extern "C"
8902# endif
8903 int F77_DUMMY_MAIN() { return 1; }
8904#endif
8905int
8906main ()
8907{
8908dlopen ();
8909 ;
8910 return 0;
8911}
8912_ACEOF
8913rm -f conftest.$ac_objext conftest$ac_exeext
8914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8915 (eval $ac_link) 2>&5
8916 ac_status=$?
8917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8918 (exit $ac_status); } &&
8919 { ac_try='test -s conftest$ac_exeext'
8920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8921 (eval $ac_try) 2>&5
8922 ac_status=$?
8923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8924 (exit $ac_status); }; }; then
8925 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008926else
Martin v. Löwis11437992002-04-12 09:54:03 +00008927 echo "$as_me: failed program was:" >&5
8928cat conftest.$ac_ext >&5
8929ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008930fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008931rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8932LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008933fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008934echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8935echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8936if test $ac_cv_lib_dl_dlopen = yes; then
8937 cat >>confdefs.h <<_ACEOF
8938#define HAVE_LIBDL 1
8939_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008940
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008941 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008942
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008943fi
8944 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008945
8946echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8947echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8948if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8949 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008950else
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008952LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008953cat >conftest.$ac_ext <<_ACEOF
8954#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008955#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008956
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008957/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008958#ifdef __cplusplus
8959extern "C"
8960#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008961/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 builtin and then its argument prototype would still apply. */
8963char shl_load ();
8964#ifdef F77_DUMMY_MAIN
8965# ifdef __cplusplus
8966 extern "C"
8967# endif
8968 int F77_DUMMY_MAIN() { return 1; }
8969#endif
8970int
8971main ()
8972{
8973shl_load ();
8974 ;
8975 return 0;
8976}
8977_ACEOF
8978rm -f conftest.$ac_objext conftest$ac_exeext
8979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8980 (eval $ac_link) 2>&5
8981 ac_status=$?
8982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8983 (exit $ac_status); } &&
8984 { ac_try='test -s conftest$ac_exeext'
8985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8986 (eval $ac_try) 2>&5
8987 ac_status=$?
8988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8989 (exit $ac_status); }; }; then
8990 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008991else
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 echo "$as_me: failed program was:" >&5
8993cat conftest.$ac_ext >&5
8994ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008995fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008996rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8997LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008999echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9000echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9001if test $ac_cv_lib_dld_shl_load = yes; then
9002 cat >>confdefs.h <<_ACEOF
9003#define HAVE_LIBDLD 1
9004_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009005
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009006 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009007
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009008fi
9009 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009010
9011echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9012echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9013if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9014 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009015else
Martin v. Löwis11437992002-04-12 09:54:03 +00009016 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009017LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009018cat >conftest.$ac_ext <<_ACEOF
9019#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009020#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009021
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009022/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009023#ifdef __cplusplus
9024extern "C"
9025#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009026/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009027 builtin and then its argument prototype would still apply. */
9028char sem_init ();
9029#ifdef F77_DUMMY_MAIN
9030# ifdef __cplusplus
9031 extern "C"
9032# endif
9033 int F77_DUMMY_MAIN() { return 1; }
9034#endif
9035int
9036main ()
9037{
9038sem_init ();
9039 ;
9040 return 0;
9041}
9042_ACEOF
9043rm -f conftest.$ac_objext conftest$ac_exeext
9044if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9045 (eval $ac_link) 2>&5
9046 ac_status=$?
9047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9048 (exit $ac_status); } &&
9049 { ac_try='test -s conftest$ac_exeext'
9050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9051 (eval $ac_try) 2>&5
9052 ac_status=$?
9053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9054 (exit $ac_status); }; }; then
9055 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009056else
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 echo "$as_me: failed program was:" >&5
9058cat conftest.$ac_ext >&5
9059ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009060fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009061rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9062LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009064echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9065echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9066if test $ac_cv_lib_rt_sem_init = yes; then
9067 cat >>confdefs.h <<_ACEOF
9068#define HAVE_LIBRT 1
9069_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009070
9071 LIBS="-lrt $LIBS"
9072
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009073fi
9074 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009075
9076# checks for system dependent C++ extensions support
9077case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9079echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9080 cat >conftest.$ac_ext <<_ACEOF
9081#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009082#include "confdefs.h"
9083#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009084#ifdef F77_DUMMY_MAIN
9085# ifdef __cplusplus
9086 extern "C"
9087# endif
9088 int F77_DUMMY_MAIN() { return 1; }
9089#endif
9090int
9091main ()
9092{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009093loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009094 ;
9095 return 0;
9096}
9097_ACEOF
9098rm -f conftest.$ac_objext conftest$ac_exeext
9099if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9100 (eval $ac_link) 2>&5
9101 ac_status=$?
9102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9103 (exit $ac_status); } &&
9104 { ac_try='test -s conftest$ac_exeext'
9105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9106 (eval $ac_try) 2>&5
9107 ac_status=$?
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009110
Martin v. Löwis11437992002-04-12 09:54:03 +00009111cat >>confdefs.h <<\_ACEOF
9112#define AIX_GENUINE_CPLUSPLUS 1
9113_ACEOF
9114
9115 echo "$as_me:$LINENO: result: yes" >&5
9116echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009117else
Martin v. Löwis11437992002-04-12 09:54:03 +00009118 echo "$as_me: failed program was:" >&5
9119cat conftest.$ac_ext >&5
9120echo "$as_me:$LINENO: result: no" >&5
9121echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009122fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009123rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009124 *) ;;
9125esac
9126
Guido van Rossum70c7f481998-03-26 18:44:10 +00009127# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9128# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009129# BeOS' sockets are stashed in libnet.
9130case "$ac_sys_system" in
9131IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009132*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009133echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9134echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9135if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9136 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009137else
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009139LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009140cat >conftest.$ac_ext <<_ACEOF
9141#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009142#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009143
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009144/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009145#ifdef __cplusplus
9146extern "C"
9147#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009148/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009149 builtin and then its argument prototype would still apply. */
9150char t_open ();
9151#ifdef F77_DUMMY_MAIN
9152# ifdef __cplusplus
9153 extern "C"
9154# endif
9155 int F77_DUMMY_MAIN() { return 1; }
9156#endif
9157int
9158main ()
9159{
9160t_open ();
9161 ;
9162 return 0;
9163}
9164_ACEOF
9165rm -f conftest.$ac_objext conftest$ac_exeext
9166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9167 (eval $ac_link) 2>&5
9168 ac_status=$?
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); } &&
9171 { ac_try='test -s conftest$ac_exeext'
9172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9173 (eval $ac_try) 2>&5
9174 ac_status=$?
9175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); }; }; then
9177 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009178else
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 echo "$as_me: failed program was:" >&5
9180cat conftest.$ac_ext >&5
9181ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009183rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9184LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009185fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009186echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9187echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9188if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009189 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009190fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009191 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009192echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9193echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9194if test "${ac_cv_lib_socket_socket+set}" = set; then
9195 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009196else
Martin v. Löwis11437992002-04-12 09:54:03 +00009197 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009198LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009199cat >conftest.$ac_ext <<_ACEOF
9200#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009201#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009202
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009203/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009204#ifdef __cplusplus
9205extern "C"
9206#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009207/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 builtin and then its argument prototype would still apply. */
9209char socket ();
9210#ifdef F77_DUMMY_MAIN
9211# ifdef __cplusplus
9212 extern "C"
9213# endif
9214 int F77_DUMMY_MAIN() { return 1; }
9215#endif
9216int
9217main ()
9218{
9219socket ();
9220 ;
9221 return 0;
9222}
9223_ACEOF
9224rm -f conftest.$ac_objext conftest$ac_exeext
9225if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9226 (eval $ac_link) 2>&5
9227 ac_status=$?
9228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9229 (exit $ac_status); } &&
9230 { ac_try='test -s conftest$ac_exeext'
9231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9232 (eval $ac_try) 2>&5
9233 ac_status=$?
9234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9235 (exit $ac_status); }; }; then
9236 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009237else
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 echo "$as_me: failed program was:" >&5
9239cat conftest.$ac_ext >&5
9240ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009241fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009242rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9243LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009244fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009245echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9246echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9247if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009248 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009249fi
9250 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009251;;
9252esac
9253case "$ac_sys_system" in
9254BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009255echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9256echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9257if test "${ac_cv_lib_net_socket+set}" = set; then
9258 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009259else
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009261LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009262cat >conftest.$ac_ext <<_ACEOF
9263#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009264#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009265
Guido van Rossumad678af1998-10-02 14:42:15 +00009266/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009267#ifdef __cplusplus
9268extern "C"
9269#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009270/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009271 builtin and then its argument prototype would still apply. */
9272char socket ();
9273#ifdef F77_DUMMY_MAIN
9274# ifdef __cplusplus
9275 extern "C"
9276# endif
9277 int F77_DUMMY_MAIN() { return 1; }
9278#endif
9279int
9280main ()
9281{
9282socket ();
9283 ;
9284 return 0;
9285}
9286_ACEOF
9287rm -f conftest.$ac_objext conftest$ac_exeext
9288if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9289 (eval $ac_link) 2>&5
9290 ac_status=$?
9291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9292 (exit $ac_status); } &&
9293 { ac_try='test -s conftest$ac_exeext'
9294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9295 (eval $ac_try) 2>&5
9296 ac_status=$?
9297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9298 (exit $ac_status); }; }; then
9299 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009300else
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 echo "$as_me: failed program was:" >&5
9302cat conftest.$ac_ext >&5
9303ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009304fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009305rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9306LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009308echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9309echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9310if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009311 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009312fi
9313 # BeOS
9314;;
9315esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009316
Martin v. Löwis11437992002-04-12 09:54:03 +00009317echo "$as_me:$LINENO: checking for --with-libs" >&5
9318echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9319
Guido van Rossuma68acba1996-07-31 17:36:39 +00009320# Check whether --with-libs or --without-libs was given.
9321if test "${with_libs+set}" = set; then
9322 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009323
9324echo "$as_me:$LINENO: result: $withval" >&5
9325echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009326LIBS="$withval $LIBS"
9327
9328else
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 echo "$as_me:$LINENO: result: no" >&5
9330echo "${ECHO_T}no" >&6
9331fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009332
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009333# Determine if signalmodule should be used.
9334
9335
Martin v. Löwis11437992002-04-12 09:54:03 +00009336echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9337echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9338
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009339# Check whether --with-signal-module or --without-signal-module was given.
9340if test "${with_signal_module+set}" = set; then
9341 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009342
Martin v. Löwis11437992002-04-12 09:54:03 +00009343fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009344
9345if test -z "$with_signal_module"
9346then with_signal_module="yes"
9347fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009348echo "$as_me:$LINENO: result: $with_signal_module" >&5
9349echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009350
9351if test "${with_signal_module}" = "yes"; then
9352 USE_SIGNAL_MODULE=""
9353 SIGNAL_OBJS=""
9354else
9355 USE_SIGNAL_MODULE="#"
9356 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9357fi
9358
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009359# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009360
Barry Warsawc0d24d82000-06-29 16:12:00 +00009361USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009362
Martin v. Löwis11437992002-04-12 09:54:03 +00009363echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9364echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9365
Guido van Rossumec2f0731997-01-22 20:54:01 +00009366
9367# Check whether --with-dec-threads or --without-dec-threads was given.
9368if test "${with_dec_threads+set}" = set; then
9369 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009370
9371echo "$as_me:$LINENO: result: $withval" >&5
9372echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009373LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009374if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009375 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009376fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009377else
Martin v. Löwis11437992002-04-12 09:54:03 +00009378 echo "$as_me:$LINENO: result: no" >&5
9379echo "${ECHO_T}no" >&6
9380fi;
9381
9382# Templates for things AC_DEFINEd more than once.
9383# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009384
9385
Martin v. Löwis11437992002-04-12 09:54:03 +00009386
9387
9388
9389
9390
9391echo "$as_me:$LINENO: checking for --with-threads" >&5
9392echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9393
Guido van Rossumec2f0731997-01-22 20:54:01 +00009394# Check whether --with-threads or --without-threads was given.
9395if test "${with_threads+set}" = set; then
9396 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009397
Martin v. Löwis11437992002-04-12 09:54:03 +00009398fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009399
Barry Warsawc0d24d82000-06-29 16:12:00 +00009400# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009401
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009402# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009403if test "${with_thread+set}" = set; then
9404 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009405
Martin v. Löwis11437992002-04-12 09:54:03 +00009406with_threads=$with_thread
9407fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009408
9409if test -z "$with_threads"
9410then with_threads="yes"
9411fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009412echo "$as_me:$LINENO: result: $with_threads" >&5
9413echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009414
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009415
Barry Warsawc0d24d82000-06-29 16:12:00 +00009416if test "$with_threads" = "no"
9417then
9418 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009419elif test "$ac_cv_pthread_is_default" = yes
9420then
Martin v. Löwis11437992002-04-12 09:54:03 +00009421 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009422#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009423_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009424
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009425 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009427#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009428_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009429
9430 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009432elif test "$ac_cv_kpthread" = "yes"
9433then
9434 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009436#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009437_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009438
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009439 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009440 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009441else
9442 if test ! -z "$with_threads" -a -d "$with_threads"
9443 then LDFLAGS="$LDFLAGS -L$with_threads"
9444 fi
9445 if test ! -z "$withval" -a -d "$withval"
9446 then LDFLAGS="$LDFLAGS -L$withval"
9447 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009448
9449 # According to the POSIX spec, a pthreads implementation must
9450 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9452echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9453 cat >conftest.$ac_ext <<_ACEOF
9454#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009455#include "confdefs.h"
9456#include <unistd.h>
9457 #ifdef _POSIX_THREADS
9458 yes
9459 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009460
9461_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009462if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9463 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009464 unistd_defines_pthreads=yes
9465else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009466 unistd_defines_pthreads=no
9467fi
9468rm -f conftest*
9469
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9471echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009472
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009474#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009475_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009476
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 if test "${ac_cv_header_cthreads_h+set}" = set; then
9478 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9479echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9480if test "${ac_cv_header_cthreads_h+set}" = set; then
9481 echo $ECHO_N "(cached) $ECHO_C" >&6
9482fi
9483echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9484echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009485else
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 # Is the header compilable?
9487echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9488echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9489cat >conftest.$ac_ext <<_ACEOF
9490#line $LINENO "configure"
9491#include "confdefs.h"
9492$ac_includes_default
9493#include <cthreads.h>
9494_ACEOF
9495rm -f conftest.$ac_objext
9496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9497 (eval $ac_compile) 2>&5
9498 ac_status=$?
9499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9500 (exit $ac_status); } &&
9501 { ac_try='test -s conftest.$ac_objext'
9502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9503 (eval $ac_try) 2>&5
9504 ac_status=$?
9505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9506 (exit $ac_status); }; }; then
9507 ac_header_compiler=yes
9508else
9509 echo "$as_me: failed program was:" >&5
9510cat conftest.$ac_ext >&5
9511ac_header_compiler=no
9512fi
9513rm -f conftest.$ac_objext conftest.$ac_ext
9514echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9515echo "${ECHO_T}$ac_header_compiler" >&6
9516
9517# Is the header present?
9518echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9519echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9520cat >conftest.$ac_ext <<_ACEOF
9521#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009522#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009523#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009524_ACEOF
9525if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9526 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9527 ac_status=$?
9528 egrep -v '^ *\+' conftest.er1 >conftest.err
9529 rm -f conftest.er1
9530 cat conftest.err >&5
9531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9532 (exit $ac_status); } >/dev/null; then
9533 if test -s conftest.err; then
9534 ac_cpp_err=$ac_c_preproc_warn_flag
9535 else
9536 ac_cpp_err=
9537 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009538else
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 ac_cpp_err=yes
9540fi
9541if test -z "$ac_cpp_err"; then
9542 ac_header_preproc=yes
9543else
9544 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009545 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009547fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009548rm -f conftest.err conftest.$ac_ext
9549echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9550echo "${ECHO_T}$ac_header_preproc" >&6
9551
9552# So? What about this header?
9553case $ac_header_compiler:$ac_header_preproc in
9554 yes:no )
9555 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9556echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9557 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9558echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9559 no:yes )
9560 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9561echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9562 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9563echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9564 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9565echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9566esac
9567echo "$as_me:$LINENO: checking for cthreads.h" >&5
9568echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9569if test "${ac_cv_header_cthreads_h+set}" = set; then
9570 echo $ECHO_N "(cached) $ECHO_C" >&6
9571else
9572 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009573fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009574echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9575echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9576
9577fi
9578if test $ac_cv_header_cthreads_h = yes; then
9579 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009580#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009581_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009582
Martin v. Löwis11437992002-04-12 09:54:03 +00009583 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009584#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009585_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009586
Martin v. Löwis11437992002-04-12 09:54:03 +00009587
9588cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009589#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009590_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009591
9592 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009593 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009594else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009595
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9597 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9598echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9599if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9600 echo $ECHO_N "(cached) $ECHO_C" >&6
9601fi
9602echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9603echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009604else
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 # Is the header compilable?
9606echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9607echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9608cat >conftest.$ac_ext <<_ACEOF
9609#line $LINENO "configure"
9610#include "confdefs.h"
9611$ac_includes_default
9612#include <mach/cthreads.h>
9613_ACEOF
9614rm -f conftest.$ac_objext
9615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9616 (eval $ac_compile) 2>&5
9617 ac_status=$?
9618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9619 (exit $ac_status); } &&
9620 { ac_try='test -s conftest.$ac_objext'
9621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9622 (eval $ac_try) 2>&5
9623 ac_status=$?
9624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9625 (exit $ac_status); }; }; then
9626 ac_header_compiler=yes
9627else
9628 echo "$as_me: failed program was:" >&5
9629cat conftest.$ac_ext >&5
9630ac_header_compiler=no
9631fi
9632rm -f conftest.$ac_objext conftest.$ac_ext
9633echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9634echo "${ECHO_T}$ac_header_compiler" >&6
9635
9636# Is the header present?
9637echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9638echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9639cat >conftest.$ac_ext <<_ACEOF
9640#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009641#include "confdefs.h"
9642#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009643_ACEOF
9644if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9645 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9646 ac_status=$?
9647 egrep -v '^ *\+' conftest.er1 >conftest.err
9648 rm -f conftest.er1
9649 cat conftest.err >&5
9650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651 (exit $ac_status); } >/dev/null; then
9652 if test -s conftest.err; then
9653 ac_cpp_err=$ac_c_preproc_warn_flag
9654 else
9655 ac_cpp_err=
9656 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009657else
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_cpp_err=yes
9659fi
9660if test -z "$ac_cpp_err"; then
9661 ac_header_preproc=yes
9662else
9663 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009664 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009665 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009666fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009667rm -f conftest.err conftest.$ac_ext
9668echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9669echo "${ECHO_T}$ac_header_preproc" >&6
9670
9671# So? What about this header?
9672case $ac_header_compiler:$ac_header_preproc in
9673 yes:no )
9674 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9675echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9676 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9677echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9678 no:yes )
9679 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9680echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9681 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9682echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9683 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9684echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9685esac
9686echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9687echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9688if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9689 echo $ECHO_N "(cached) $ECHO_C" >&6
9690else
9691 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009692fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009693echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9694echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9695
9696fi
9697if test $ac_cv_header_mach_cthreads_h = yes; then
9698 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009699#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009700_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009701
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009703#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009704_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009705
Martin v. Löwis11437992002-04-12 09:54:03 +00009706
9707cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009708#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009709_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009710
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009711 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009712else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009713
Martin v. Löwis11437992002-04-12 09:54:03 +00009714 echo "$as_me:$LINENO: checking for --with-pth" >&5
9715echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9716
9717# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009718if test "${with_pth+set}" = set; then
9719 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009720
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 echo "$as_me:$LINENO: result: $withval" >&5
9722echo "${ECHO_T}$withval" >&6
9723 cat >>confdefs.h <<\_ACEOF
9724#define WITH_THREAD 1
9725_ACEOF
9726
9727
9728cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009729#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009730_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009731
Martin v. Löwis130fb172001-07-19 11:00:41 +00009732 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009733 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009734else
Martin v. Löwis11437992002-04-12 09:54:03 +00009735
9736 echo "$as_me:$LINENO: result: no" >&5
9737echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009738
9739 # Just looking for pthread_create in libpthread is not enough:
9740 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9741 # So we really have to include pthread.h, and then link.
9742 _libs=$LIBS
9743 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9745echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9746 cat >conftest.$ac_ext <<_ACEOF
9747#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009748#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009749#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009750
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009751void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009752#ifdef F77_DUMMY_MAIN
9753# ifdef __cplusplus
9754 extern "C"
9755# endif
9756 int F77_DUMMY_MAIN() { return 1; }
9757#endif
9758int
9759main ()
9760{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009761
9762pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 ;
9764 return 0;
9765}
9766_ACEOF
9767rm -f conftest.$ac_objext conftest$ac_exeext
9768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9769 (eval $ac_link) 2>&5
9770 ac_status=$?
9771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772 (exit $ac_status); } &&
9773 { ac_try='test -s conftest$ac_exeext'
9774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9775 (eval $ac_try) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); }; }; then
9779
9780 echo "$as_me:$LINENO: result: yes" >&5
9781echo "${ECHO_T}yes" >&6
9782 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009783#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009784_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009785
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009786 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009787 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009788else
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 echo "$as_me: failed program was:" >&5
9790cat conftest.$ac_ext >&5
9791
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009792 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9794echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9795if test "${ac_cv_func_pthread_detach+set}" = set; then
9796 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009797else
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 cat >conftest.$ac_ext <<_ACEOF
9799#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009800#include "confdefs.h"
9801/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009803#include <assert.h>
9804/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009805#ifdef __cplusplus
9806extern "C"
9807#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009808/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 builtin and then its argument prototype would still apply. */
9810char pthread_detach ();
9811char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009812
Martin v. Löwis11437992002-04-12 09:54:03 +00009813#ifdef F77_DUMMY_MAIN
9814# ifdef __cplusplus
9815 extern "C"
9816# endif
9817 int F77_DUMMY_MAIN() { return 1; }
9818#endif
9819int
9820main ()
9821{
Guido van Rossumad678af1998-10-02 14:42:15 +00009822/* The GNU C library defines this for functions which it implements
9823 to always fail with ENOSYS. Some functions are actually named
9824 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009825#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009826choke me
9827#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009828f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009829#endif
9830
Martin v. Löwis11437992002-04-12 09:54:03 +00009831 ;
9832 return 0;
9833}
9834_ACEOF
9835rm -f conftest.$ac_objext conftest$ac_exeext
9836if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9837 (eval $ac_link) 2>&5
9838 ac_status=$?
9839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9840 (exit $ac_status); } &&
9841 { ac_try='test -s conftest$ac_exeext'
9842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9843 (eval $ac_try) 2>&5
9844 ac_status=$?
9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846 (exit $ac_status); }; }; then
9847 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009848else
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 echo "$as_me: failed program was:" >&5
9850cat conftest.$ac_ext >&5
9851ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009852fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009853rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009854fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009855echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9856echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9857if test $ac_cv_func_pthread_detach = yes; then
9858 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009859#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009860_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009861
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009862 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009863 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009864else
Guido van Rossumad678af1998-10-02 14:42:15 +00009865
Martin v. Löwis11437992002-04-12 09:54:03 +00009866 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9867 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9868echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9869if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9870 echo $ECHO_N "(cached) $ECHO_C" >&6
9871fi
9872echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9873echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009874else
Martin v. Löwis11437992002-04-12 09:54:03 +00009875 # Is the header compilable?
9876echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
9877echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
9878cat >conftest.$ac_ext <<_ACEOF
9879#line $LINENO "configure"
9880#include "confdefs.h"
9881$ac_includes_default
9882#include <kernel/OS.h>
9883_ACEOF
9884rm -f conftest.$ac_objext
9885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9886 (eval $ac_compile) 2>&5
9887 ac_status=$?
9888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9889 (exit $ac_status); } &&
9890 { ac_try='test -s conftest.$ac_objext'
9891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9892 (eval $ac_try) 2>&5
9893 ac_status=$?
9894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9895 (exit $ac_status); }; }; then
9896 ac_header_compiler=yes
9897else
9898 echo "$as_me: failed program was:" >&5
9899cat conftest.$ac_ext >&5
9900ac_header_compiler=no
9901fi
9902rm -f conftest.$ac_objext conftest.$ac_ext
9903echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9904echo "${ECHO_T}$ac_header_compiler" >&6
9905
9906# Is the header present?
9907echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
9908echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
9909cat >conftest.$ac_ext <<_ACEOF
9910#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009911#include "confdefs.h"
9912#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009913_ACEOF
9914if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9915 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9916 ac_status=$?
9917 egrep -v '^ *\+' conftest.er1 >conftest.err
9918 rm -f conftest.er1
9919 cat conftest.err >&5
9920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9921 (exit $ac_status); } >/dev/null; then
9922 if test -s conftest.err; then
9923 ac_cpp_err=$ac_c_preproc_warn_flag
9924 else
9925 ac_cpp_err=
9926 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009927else
Martin v. Löwis11437992002-04-12 09:54:03 +00009928 ac_cpp_err=yes
9929fi
9930if test -z "$ac_cpp_err"; then
9931 ac_header_preproc=yes
9932else
9933 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009934 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009935 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009936fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009937rm -f conftest.err conftest.$ac_ext
9938echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9939echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009940
Martin v. Löwis11437992002-04-12 09:54:03 +00009941# So? What about this header?
9942case $ac_header_compiler:$ac_header_preproc in
9943 yes:no )
9944 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
9945echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9946 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9947echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9948 no:yes )
9949 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
9950echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
9951 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
9952echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
9953 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9954echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9955esac
9956echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9957echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9958if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9959 echo $ECHO_N "(cached) $ECHO_C" >&6
9960else
9961 ac_cv_header_kernel_OS_h=$ac_header_preproc
9962fi
9963echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9964echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
9965
9966fi
9967if test $ac_cv_header_kernel_OS_h = yes; then
9968 cat >>confdefs.h <<\_ACEOF
9969#define WITH_THREAD 1
9970_ACEOF
9971
9972
9973cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009974#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009975_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009976
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009977 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009978else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009979
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
9981echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
9982if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
9983 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009984else
Martin v. Löwis11437992002-04-12 09:54:03 +00009985 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009986LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009987cat >conftest.$ac_ext <<_ACEOF
9988#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00009989#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009990
Greg Steinadf63d62000-07-05 10:38:09 +00009991/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009992#ifdef __cplusplus
9993extern "C"
9994#endif
Greg Steinadf63d62000-07-05 10:38:09 +00009995/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009996 builtin and then its argument prototype would still apply. */
9997char pthread_create ();
9998#ifdef F77_DUMMY_MAIN
9999# ifdef __cplusplus
10000 extern "C"
10001# endif
10002 int F77_DUMMY_MAIN() { return 1; }
10003#endif
10004int
10005main ()
10006{
10007pthread_create ();
10008 ;
10009 return 0;
10010}
10011_ACEOF
10012rm -f conftest.$ac_objext conftest$ac_exeext
10013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10014 (eval $ac_link) 2>&5
10015 ac_status=$?
10016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017 (exit $ac_status); } &&
10018 { ac_try='test -s conftest$ac_exeext'
10019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10020 (eval $ac_try) 2>&5
10021 ac_status=$?
10022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10023 (exit $ac_status); }; }; then
10024 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010025else
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 echo "$as_me: failed program was:" >&5
10027cat conftest.$ac_ext >&5
10028ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10031LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010032fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010033echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10034echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10035if test $ac_cv_lib_pthreads_pthread_create = yes; then
10036 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010037#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010038_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010039
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010040 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010041 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010042 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010043else
Greg Steinadf63d62000-07-05 10:38:09 +000010044
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10046echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10047if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10048 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010049else
Martin v. Löwis11437992002-04-12 09:54:03 +000010050 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010051LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010052cat >conftest.$ac_ext <<_ACEOF
10053#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010054#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010055
Guido van Rossum49545951997-12-02 19:28:29 +000010056/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010057#ifdef __cplusplus
10058extern "C"
10059#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010060/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010061 builtin and then its argument prototype would still apply. */
10062char pthread_create ();
10063#ifdef F77_DUMMY_MAIN
10064# ifdef __cplusplus
10065 extern "C"
10066# endif
10067 int F77_DUMMY_MAIN() { return 1; }
10068#endif
10069int
10070main ()
10071{
10072pthread_create ();
10073 ;
10074 return 0;
10075}
10076_ACEOF
10077rm -f conftest.$ac_objext conftest$ac_exeext
10078if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10079 (eval $ac_link) 2>&5
10080 ac_status=$?
10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); } &&
10083 { ac_try='test -s conftest$ac_exeext'
10084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10085 (eval $ac_try) 2>&5
10086 ac_status=$?
10087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088 (exit $ac_status); }; }; then
10089 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010090else
Martin v. Löwis11437992002-04-12 09:54:03 +000010091 echo "$as_me: failed program was:" >&5
10092cat conftest.$ac_ext >&5
10093ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010094fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010095rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10096LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010097fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010098echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10099echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10100if test $ac_cv_lib_c_r_pthread_create = yes; then
10101 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010102#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010103_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010104
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010105 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010106 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010107 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010108else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010109
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10111echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10112if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10113 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010114else
Martin v. Löwis11437992002-04-12 09:54:03 +000010115 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010116LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010117cat >conftest.$ac_ext <<_ACEOF
10118#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010119#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010120
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010121/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010122#ifdef __cplusplus
10123extern "C"
10124#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010125/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 builtin and then its argument prototype would still apply. */
10127char __d6_pthread_create ();
10128#ifdef F77_DUMMY_MAIN
10129# ifdef __cplusplus
10130 extern "C"
10131# endif
10132 int F77_DUMMY_MAIN() { return 1; }
10133#endif
10134int
10135main ()
10136{
10137__d6_pthread_create ();
10138 ;
10139 return 0;
10140}
10141_ACEOF
10142rm -f conftest.$ac_objext conftest$ac_exeext
10143if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10144 (eval $ac_link) 2>&5
10145 ac_status=$?
10146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10147 (exit $ac_status); } &&
10148 { ac_try='test -s conftest$ac_exeext'
10149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10150 (eval $ac_try) 2>&5
10151 ac_status=$?
10152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153 (exit $ac_status); }; }; then
10154 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010155else
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 echo "$as_me: failed program was:" >&5
10157cat conftest.$ac_ext >&5
10158ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010159fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010160rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10161LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010163echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10164echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10165if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10166 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010167#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010168_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010169
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010170 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010171 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010172 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010173else
Guido van Rossum49545951997-12-02 19:28:29 +000010174
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10176echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10177if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10178 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010179else
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010181LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010182cat >conftest.$ac_ext <<_ACEOF
10183#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010184#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010185
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010186/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010187#ifdef __cplusplus
10188extern "C"
10189#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010190/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 builtin and then its argument prototype would still apply. */
10192char __pthread_create_system ();
10193#ifdef F77_DUMMY_MAIN
10194# ifdef __cplusplus
10195 extern "C"
10196# endif
10197 int F77_DUMMY_MAIN() { return 1; }
10198#endif
10199int
10200main ()
10201{
10202__pthread_create_system ();
10203 ;
10204 return 0;
10205}
10206_ACEOF
10207rm -f conftest.$ac_objext conftest$ac_exeext
10208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10209 (eval $ac_link) 2>&5
10210 ac_status=$?
10211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10212 (exit $ac_status); } &&
10213 { ac_try='test -s conftest$ac_exeext'
10214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10215 (eval $ac_try) 2>&5
10216 ac_status=$?
10217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10218 (exit $ac_status); }; }; then
10219 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010220else
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 echo "$as_me: failed program was:" >&5
10222cat conftest.$ac_ext >&5
10223ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010224fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010225rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10226LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010227fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010228echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10229echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10230if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10231 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010232#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010233_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010234
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010235 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010236 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010237 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010238else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010239
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10241echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10242if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10243 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010244else
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010246LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010247cat >conftest.$ac_ext <<_ACEOF
10248#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010249#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010250
Guido van Rossumb93a8621998-05-07 13:27:32 +000010251/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010252#ifdef __cplusplus
10253extern "C"
10254#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010255/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 builtin and then its argument prototype would still apply. */
10257char pthread_create ();
10258#ifdef F77_DUMMY_MAIN
10259# ifdef __cplusplus
10260 extern "C"
10261# endif
10262 int F77_DUMMY_MAIN() { return 1; }
10263#endif
10264int
10265main ()
10266{
10267pthread_create ();
10268 ;
10269 return 0;
10270}
10271_ACEOF
10272rm -f conftest.$ac_objext conftest$ac_exeext
10273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10274 (eval $ac_link) 2>&5
10275 ac_status=$?
10276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10277 (exit $ac_status); } &&
10278 { ac_try='test -s conftest$ac_exeext'
10279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10280 (eval $ac_try) 2>&5
10281 ac_status=$?
10282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10283 (exit $ac_status); }; }; then
10284 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010285else
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 echo "$as_me: failed program was:" >&5
10287cat conftest.$ac_ext >&5
10288ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010290rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10291LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010293echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10294echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10295if test $ac_cv_lib_cma_pthread_create = yes; then
10296 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010297#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010298_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010299
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010300 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010301 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010302 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010303else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010304
Martin v. Löwis130fb172001-07-19 11:00:41 +000010305 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010306fi
10307
Guido van Rossum627b2d71993-12-24 10:39:16 +000010308
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010309fi
10310
Guido van Rossum0be3e491997-05-22 20:33:33 +000010311fi
10312
Guido van Rossum49545951997-12-02 19:28:29 +000010313fi
10314
Guido van Rossumb93a8621998-05-07 13:27:32 +000010315fi
10316
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010317fi
10318
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010319
Michael W. Hudson54241132001-12-07 15:38:26 +000010320fi
10321
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010322fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010323rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10324fi;
10325fi
10326
10327
10328fi
10329
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010330
Michael W. Hudson54241132001-12-07 15:38:26 +000010331
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010332 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010333 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010334
10335cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010336#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010337_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010338
10339 fi
10340
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10342echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10343 if test "${ac_cv_pthread_system_supported+set}" = set; then
10344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010345else
10346 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010347 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010348else
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 cat >conftest.$ac_ext <<_ACEOF
10350#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010351#include "confdefs.h"
10352#include <pthread.h>
10353 void *foo(void *parm) {
10354 return NULL;
10355 }
10356 main() {
10357 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010358 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010359 if (pthread_attr_init(&attr)) exit(-1);
10360 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010361 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010362 exit(0);
10363 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010364_ACEOF
10365rm -f conftest$ac_exeext
10366if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10367 (eval $ac_link) 2>&5
10368 ac_status=$?
10369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10370 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10372 (eval $ac_try) 2>&5
10373 ac_status=$?
10374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10375 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010376 ac_cv_pthread_system_supported=yes
10377else
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 echo "$as_me: program exited with status $ac_status" >&5
10379echo "$as_me: failed program was:" >&5
10380cat conftest.$ac_ext >&5
10381( exit $ac_status )
10382ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010383fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010384rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010385fi
10386
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010387fi
10388
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10390echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010391 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010392
10393cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010394#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010395_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010396
10397 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010398
10399for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010400do
Martin v. Löwis11437992002-04-12 09:54:03 +000010401as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10402echo "$as_me:$LINENO: checking for $ac_func" >&5
10403echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10404if eval "test \"\${$as_ac_var+set}\" = set"; then
10405 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010406else
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 cat >conftest.$ac_ext <<_ACEOF
10408#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010409#include "confdefs.h"
10410/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010411 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010412#include <assert.h>
10413/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010414#ifdef __cplusplus
10415extern "C"
10416#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010417/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 builtin and then its argument prototype would still apply. */
10419char $ac_func ();
10420char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010421
Martin v. Löwis11437992002-04-12 09:54:03 +000010422#ifdef F77_DUMMY_MAIN
10423# ifdef __cplusplus
10424 extern "C"
10425# endif
10426 int F77_DUMMY_MAIN() { return 1; }
10427#endif
10428int
10429main ()
10430{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010431/* The GNU C library defines this for functions which it implements
10432 to always fail with ENOSYS. Some functions are actually named
10433 something starting with __ and the normal name is an alias. */
10434#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10435choke me
10436#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010437f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010438#endif
10439
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 ;
10441 return 0;
10442}
10443_ACEOF
10444rm -f conftest.$ac_objext conftest$ac_exeext
10445if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10446 (eval $ac_link) 2>&5
10447 ac_status=$?
10448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10449 (exit $ac_status); } &&
10450 { ac_try='test -s conftest$ac_exeext'
10451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10452 (eval $ac_try) 2>&5
10453 ac_status=$?
10454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10455 (exit $ac_status); }; }; then
10456 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010457else
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 echo "$as_me: failed program was:" >&5
10459cat conftest.$ac_ext >&5
10460eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010461fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010462rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010463fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010464echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10465echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10466if test `eval echo '${'$as_ac_var'}'` = yes; then
10467 cat >>confdefs.h <<_ACEOF
10468#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10469_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010470
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010471fi
10472done
10473
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010474 fi
10475
Martin v. Löwis11437992002-04-12 09:54:03 +000010476 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10477echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10478if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10479 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010480else
Martin v. Löwis11437992002-04-12 09:54:03 +000010481 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010482LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010483cat >conftest.$ac_ext <<_ACEOF
10484#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010485#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010486
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010487/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010488#ifdef __cplusplus
10489extern "C"
10490#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010491/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010492 builtin and then its argument prototype would still apply. */
10493char usconfig ();
10494#ifdef F77_DUMMY_MAIN
10495# ifdef __cplusplus
10496 extern "C"
10497# endif
10498 int F77_DUMMY_MAIN() { return 1; }
10499#endif
10500int
10501main ()
10502{
10503usconfig ();
10504 ;
10505 return 0;
10506}
10507_ACEOF
10508rm -f conftest.$ac_objext conftest$ac_exeext
10509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10510 (eval $ac_link) 2>&5
10511 ac_status=$?
10512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10513 (exit $ac_status); } &&
10514 { ac_try='test -s conftest$ac_exeext'
10515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10516 (eval $ac_try) 2>&5
10517 ac_status=$?
10518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10519 (exit $ac_status); }; }; then
10520 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010521else
Martin v. Löwis11437992002-04-12 09:54:03 +000010522 echo "$as_me: failed program was:" >&5
10523cat conftest.$ac_ext >&5
10524ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010525fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010526rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10527LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010528fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010529echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10530echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10531if test $ac_cv_lib_mpc_usconfig = yes; then
10532 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010533#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010534_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010535
Martin v. Löwis130fb172001-07-19 11:00:41 +000010536 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010537 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010538 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010539fi
10540
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010541
Martin v. Löwis11437992002-04-12 09:54:03 +000010542 if test $posix_threads != "yes"; then
10543 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10544echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10545if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10546 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010547else
Martin v. Löwis11437992002-04-12 09:54:03 +000010548 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010549LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010550cat >conftest.$ac_ext <<_ACEOF
10551#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010552#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010554/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010555#ifdef __cplusplus
10556extern "C"
10557#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010558/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 builtin and then its argument prototype would still apply. */
10560char thr_create ();
10561#ifdef F77_DUMMY_MAIN
10562# ifdef __cplusplus
10563 extern "C"
10564# endif
10565 int F77_DUMMY_MAIN() { return 1; }
10566#endif
10567int
10568main ()
10569{
10570thr_create ();
10571 ;
10572 return 0;
10573}
10574_ACEOF
10575rm -f conftest.$ac_objext conftest$ac_exeext
10576if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10577 (eval $ac_link) 2>&5
10578 ac_status=$?
10579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10580 (exit $ac_status); } &&
10581 { ac_try='test -s conftest$ac_exeext'
10582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10583 (eval $ac_try) 2>&5
10584 ac_status=$?
10585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10586 (exit $ac_status); }; }; then
10587 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010588else
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 echo "$as_me: failed program was:" >&5
10590cat conftest.$ac_ext >&5
10591ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010593rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10594LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010595fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010596echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10597echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10598if test $ac_cv_lib_thread_thr_create = yes; then
10599 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010600#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010601_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010602
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010603 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010604 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010605 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010606fi
10607
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010608 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010609
Martin v. Löwis130fb172001-07-19 11:00:41 +000010610 if test "$USE_THREAD_MODULE" != "#"
10611 then
10612 # If the above checks didn't disable threads, (at least) OSF1
10613 # needs this '-threads' argument during linking.
10614 case $ac_sys_system in
10615 OSF1) LDLAST=-threads;;
10616 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010617 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010618fi
10619
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010620# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010621
10622
10623echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10624echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010625# Check whether --enable-ipv6 or --disable-ipv6 was given.
10626if test "${enable_ipv6+set}" = set; then
10627 enableval="$enable_ipv6"
10628 case "$enableval" in
10629 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010630 echo "$as_me:$LINENO: result: no" >&5
10631echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010632 ipv6=no
10633 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 *) echo "$as_me:$LINENO: result: yes" >&5
10635echo "${ECHO_T}yes" >&6
10636 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010637#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010638_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010639
10640 ipv6=yes
10641 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010642 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010643else
Martin v. Löwis11437992002-04-12 09:54:03 +000010644
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010645 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010646 echo "$as_me:$LINENO: result: no" >&5
10647echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010648 ipv6=no
10649
10650else
Martin v. Löwis11437992002-04-12 09:54:03 +000010651 cat >conftest.$ac_ext <<_ACEOF
10652#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010653#include "confdefs.h"
10654 /* AF_INET6 available check */
10655#include <sys/types.h>
10656#include <sys/socket.h>
10657main()
10658{
10659 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10660 exit(1);
10661 else
10662 exit(0);
10663}
10664
Martin v. Löwis11437992002-04-12 09:54:03 +000010665_ACEOF
10666rm -f conftest$ac_exeext
10667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10668 (eval $ac_link) 2>&5
10669 ac_status=$?
10670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10671 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10673 (eval $ac_try) 2>&5
10674 ac_status=$?
10675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10676 (exit $ac_status); }; }; then
10677 echo "$as_me:$LINENO: result: yes" >&5
10678echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010679 ipv6=yes
10680else
Martin v. Löwis11437992002-04-12 09:54:03 +000010681 echo "$as_me: program exited with status $ac_status" >&5
10682echo "$as_me: failed program was:" >&5
10683cat conftest.$ac_ext >&5
10684( exit $ac_status )
10685echo "$as_me:$LINENO: result: no" >&5
10686echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010687 ipv6=no
10688fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010689rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010690fi
10691
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010692if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10694echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10695 cat >conftest.$ac_ext <<_ACEOF
10696#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010697#include "confdefs.h"
10698#include <sys/types.h>
10699#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010700#ifdef F77_DUMMY_MAIN
10701# ifdef __cplusplus
10702 extern "C"
10703# endif
10704 int F77_DUMMY_MAIN() { return 1; }
10705#endif
10706int
10707main ()
10708{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010709struct sockaddr_in6 x;
10710x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 ;
10712 return 0;
10713}
10714_ACEOF
10715rm -f conftest.$ac_objext
10716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10717 (eval $ac_compile) 2>&5
10718 ac_status=$?
10719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10720 (exit $ac_status); } &&
10721 { ac_try='test -s conftest.$ac_objext'
10722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10723 (eval $ac_try) 2>&5
10724 ac_status=$?
10725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10726 (exit $ac_status); }; }; then
10727 echo "$as_me:$LINENO: result: yes" >&5
10728echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010729 ipv6=yes
10730else
Martin v. Löwis11437992002-04-12 09:54:03 +000010731 echo "$as_me: failed program was:" >&5
10732cat conftest.$ac_ext >&5
10733echo "$as_me:$LINENO: result: no" >&5
10734echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010735 ipv6=no
10736fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010737rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010738fi
10739
10740if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010741 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010742#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010743_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010744
10745fi
10746
Martin v. Löwis11437992002-04-12 09:54:03 +000010747fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748
10749ipv6type=unknown
10750ipv6lib=none
10751ipv6trylibc=no
10752
10753if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010754 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10755echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010756 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10757 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758 case $i in
10759 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 cat >conftest.$ac_ext <<_ACEOF
10761#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010762#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010763
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764#include <netinet/in.h>
10765#ifdef IPV6_INRIA_VERSION
10766yes
10767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010768_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10770 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010771 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772fi
10773rm -f conftest*
10774
10775 ;;
10776 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 cat >conftest.$ac_ext <<_ACEOF
10778#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781#include <netinet/in.h>
10782#ifdef __KAME__
10783yes
10784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010785_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10787 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788 ipv6type=$i;
10789 ipv6lib=inet6
10790 ipv6libdir=/usr/local/v6/lib
10791 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792fi
10793rm -f conftest*
10794
10795 ;;
10796 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010797 cat >conftest.$ac_ext <<_ACEOF
10798#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010799#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010800
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801#include <features.h>
10802#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10803yes
10804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010805_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10807 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010808 ipv6type=$i;
10809 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810fi
10811rm -f conftest*
10812
10813 ;;
10814 linux-inet6)
10815 if test -d /usr/inet6; then
10816 ipv6type=$i
10817 ipv6lib=inet6
10818 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010819 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820 fi
10821 ;;
10822 solaris)
10823 if test -f /etc/netconfig; then
10824 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10825 ipv6type=$i
10826 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827 fi
10828 fi
10829 ;;
10830 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010831 cat >conftest.$ac_ext <<_ACEOF
10832#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010834
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835#include <sys/param.h>
10836#ifdef _TOSHIBA_INET6
10837yes
10838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010839_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10841 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842 ipv6type=$i;
10843 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010844 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010845fi
10846rm -f conftest*
10847
10848 ;;
10849 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010850 cat >conftest.$ac_ext <<_ACEOF
10851#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010853
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854#include </usr/local/v6/include/sys/v6config.h>
10855#ifdef __V6D__
10856yes
10857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010858_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10860 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861 ipv6type=$i;
10862 ipv6lib=v6;
10863 ipv6libdir=/usr/local/v6/lib;
10864 OPT="-I/usr/local/v6/include $OPT"
10865fi
10866rm -f conftest*
10867
10868 ;;
10869 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000010870 cat >conftest.$ac_ext <<_ACEOF
10871#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010872#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010873
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874#include <sys/param.h>
10875#ifdef _ZETA_MINAMI_INET6
10876yes
10877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010878_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10880 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010881 ipv6type=$i;
10882 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010883 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884fi
10885rm -f conftest*
10886
10887 ;;
10888 esac
10889 if test "$ipv6type" != "unknown"; then
10890 break
10891 fi
10892 done
Martin v. Löwis11437992002-04-12 09:54:03 +000010893 echo "$as_me:$LINENO: result: $ipv6type" >&5
10894echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895fi
10896
10897if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10898 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10899 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10900 echo "using lib$ipv6lib"
10901 else
10902 if test $ipv6trylibc = "yes"; then
10903 echo "using libc"
10904 else
10905 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10906 echo "You need to fetch lib$ipv6lib.a from appropriate"
10907 echo 'ipv6 kit and compile beforehand.'
10908 exit 1
10909 fi
10910 fi
10911fi
10912
Barry Warsawef82cd72000-06-30 16:21:01 +000010913# Check for GC support
Martin v. Löwis11437992002-04-12 09:54:03 +000010914echo "$as_me:$LINENO: checking for --with-cycle-gc" >&5
10915echo $ECHO_N "checking for --with-cycle-gc... $ECHO_C" >&6
10916
Barry Warsawef82cd72000-06-30 16:21:01 +000010917# Check whether --with-cycle-gc or --without-cycle-gc was given.
10918if test "${with_cycle_gc+set}" = set; then
10919 withval="$with_cycle_gc"
Barry Warsawef82cd72000-06-30 16:21:01 +000010920
Martin v. Löwis11437992002-04-12 09:54:03 +000010921fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000010922
10923if test -z "$with_cycle_gc"
10924then with_cycle_gc="yes"
10925fi
Neil Schemenauercf229462001-08-29 23:58:47 +000010926if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +000010927then
Martin v. Löwis11437992002-04-12 09:54:03 +000010928
10929cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010930#define WITH_CYCLE_GC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010931_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010932
10933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010934echo "$as_me:$LINENO: result: $with_cycle_gc" >&5
10935echo "${ECHO_T}$with_cycle_gc" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000010936
Jack Jansen7b8c7542002-04-14 20:12:41 +000010937# Check for universal newline support
10938echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
10939echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
10940
10941# Check whether --with-universal-newlines or --without-universal-newlines was given.
10942if test "${with_universal_newlines+set}" = set; then
10943 withval="$with_universal_newlines"
10944
10945fi;
10946
10947if test -z "$with_universal_newlines"
10948then with_universal_newlines="yes"
10949fi
10950if test "$with_universal_newlines" != "no"
10951then
Martin v. Löwise8aea582002-04-16 05:51:02 +000010952
10953cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000010954#define WITH_UNIVERSAL_NEWLINES 1
10955_ACEOF
10956
10957fi
10958echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
10959echo "${ECHO_T}$with_universal_newlines" >&6
10960
Neil Schemenauera35c6882001-02-27 04:45:05 +000010961# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000010962echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
10963echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
10964
Neil Schemenauera35c6882001-02-27 04:45:05 +000010965# Check whether --with-pymalloc or --without-pymalloc was given.
10966if test "${with_pymalloc+set}" = set; then
10967 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000010968
Martin v. Löwis11437992002-04-12 09:54:03 +000010969fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000010970
Neil Schemenauer16c22972002-03-22 15:34:49 +000010971if test -z "$with_pymalloc"
10972then with_pymalloc="yes"
10973fi
10974if test "$with_pymalloc" != "no"
10975then
Martin v. Löwis11437992002-04-12 09:54:03 +000010976
10977cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010978#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010979_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010980
10981fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010982echo "$as_me:$LINENO: result: $with_pymalloc" >&5
10983echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000010984
Barry Warsawef82cd72000-06-30 16:21:01 +000010985# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000010986echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
10987echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
10988
Barry Warsawef82cd72000-06-30 16:21:01 +000010989# Check whether --with-wctype-functions or --without-wctype-functions was given.
10990if test "${with_wctype_functions+set}" = set; then
10991 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000010992
Barry Warsawef82cd72000-06-30 16:21:01 +000010993if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010994then
10995
10996cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010997#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010998_ACEOF
10999
11000 echo "$as_me:$LINENO: result: yes" >&5
11001echo "${ECHO_T}yes" >&6
11002else echo "$as_me:$LINENO: result: no" >&5
11003echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011004fi
11005else
Martin v. Löwis11437992002-04-12 09:54:03 +000011006 echo "$as_me:$LINENO: result: no" >&5
11007echo "${ECHO_T}no" >&6
11008fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011009
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011010# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011011
Guido van Rossum98935bf2001-09-05 19:13:16 +000011012DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011013
Martin v. Löwis11437992002-04-12 09:54:03 +000011014echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11015echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11016
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011017# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011018if test "${with_sgi_dl+set}" = set; then
11019 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011020
11021echo "$as_me:$LINENO: result: $withval" >&5
11022echo "${ECHO_T}$withval" >&6
11023
11024cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011025#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011026_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011027
Guido van Rossume97ee181999-12-20 21:27:22 +000011028DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011029dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011030if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011031then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011032else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11033echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11034 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011035fi
11036DLINCLDIR=${dldir}
11037LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011038else
Martin v. Löwis11437992002-04-12 09:54:03 +000011039 echo "$as_me:$LINENO: result: no" >&5
11040echo "${ECHO_T}no" >&6
11041fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011042
Martin v. Löwis11437992002-04-12 09:54:03 +000011043echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11044echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011045
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011046# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011047if test "${with_dl_dld+set}" = set; then
11048 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011049
11050echo "$as_me:$LINENO: result: $withval" >&5
11051echo "${ECHO_T}$withval" >&6
11052
11053cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011054#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011055_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011056
Guido van Rossume97ee181999-12-20 21:27:22 +000011057DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011058dldir=`echo "$withval" | sed 's/,.*//'`
11059dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011060if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011061then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011062else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11063echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11064 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011065fi
11066DLINCLDIR=${dldir}
11067LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011068else
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 echo "$as_me:$LINENO: result: no" >&5
11070echo "${ECHO_T}no" >&6
11071fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011072
Guido van Rossume97ee181999-12-20 21:27:22 +000011073# the dlopen() function means we might want to use dynload_shlib.o. some
11074# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011075
Thomas Wouters3a584202000-08-05 23:28:51 +000011076for ac_func in dlopen
11077do
Martin v. Löwis11437992002-04-12 09:54:03 +000011078as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11079echo "$as_me:$LINENO: checking for $ac_func" >&5
11080echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11081if eval "test \"\${$as_ac_var+set}\" = set"; then
11082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011083else
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 cat >conftest.$ac_ext <<_ACEOF
11085#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011086#include "confdefs.h"
11087/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011088 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011089#include <assert.h>
11090/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011091#ifdef __cplusplus
11092extern "C"
11093#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011094/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011095 builtin and then its argument prototype would still apply. */
11096char $ac_func ();
11097char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011098
Martin v. Löwis11437992002-04-12 09:54:03 +000011099#ifdef F77_DUMMY_MAIN
11100# ifdef __cplusplus
11101 extern "C"
11102# endif
11103 int F77_DUMMY_MAIN() { return 1; }
11104#endif
11105int
11106main ()
11107{
Guido van Rossume97ee181999-12-20 21:27:22 +000011108/* The GNU C library defines this for functions which it implements
11109 to always fail with ENOSYS. Some functions are actually named
11110 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011111#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011112choke me
11113#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011114f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011115#endif
11116
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 ;
11118 return 0;
11119}
11120_ACEOF
11121rm -f conftest.$ac_objext conftest$ac_exeext
11122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11123 (eval $ac_link) 2>&5
11124 ac_status=$?
11125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11126 (exit $ac_status); } &&
11127 { ac_try='test -s conftest$ac_exeext'
11128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11129 (eval $ac_try) 2>&5
11130 ac_status=$?
11131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11132 (exit $ac_status); }; }; then
11133 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011134else
Martin v. Löwis11437992002-04-12 09:54:03 +000011135 echo "$as_me: failed program was:" >&5
11136cat conftest.$ac_ext >&5
11137eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011138fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011139rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011140fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011141echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11142echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11143if test `eval echo '${'$as_ac_var'}'` = yes; then
11144 cat >>confdefs.h <<_ACEOF
11145#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11146_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011147
Guido van Rossume97ee181999-12-20 21:27:22 +000011148fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011149done
Guido van Rossume97ee181999-12-20 21:27:22 +000011150
Michael W. Hudson54241132001-12-07 15:38:26 +000011151
Guido van Rossume97ee181999-12-20 21:27:22 +000011152# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11153# loading of modules.
11154
Martin v. Löwis11437992002-04-12 09:54:03 +000011155echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11156echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011157if test -z "$DYNLOADFILE"
11158then
11159 case $ac_sys_system/$ac_sys_release in
11160 AIX*) DYNLOADFILE="dynload_aix.o";;
11161 BeOS*) DYNLOADFILE="dynload_beos.o";;
11162 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011163 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011164 *)
11165 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11166 # out any dynamic loading
11167 if test "$ac_cv_func_dlopen" = yes
11168 then DYNLOADFILE="dynload_shlib.o"
11169 else DYNLOADFILE="dynload_stub.o"
11170 fi
11171 ;;
11172 esac
11173fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011174echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11175echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011176if test "$DYNLOADFILE" != "dynload_stub.o"
11177then
Martin v. Löwis11437992002-04-12 09:54:03 +000011178
11179cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011180#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011181_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011182
11183fi
11184
Neil Schemenauer4e425612001-06-19 15:44:15 +000011185# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11186
Michael W. Hudson54241132001-12-07 15:38:26 +000011187
Martin v. Löwis11437992002-04-12 09:54:03 +000011188echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11189echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011190if test -z "$MACHDEP_OBJS"
11191then
Jack Jansene578a632001-08-15 01:27:14 +000011192 MACHDEP_OBJS=$extra_machdep_objs
11193else
11194 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011195fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011196echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11197echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011198
Guido van Rossum627b2d71993-12-24 10:39:16 +000011199# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011273
Fred Drake6b3cc522002-04-15 19:20:27 +000011274
Martin v. Löwis244edc82001-10-04 22:44:26 +000011275for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011276 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +000011277 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011278 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011279 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011280 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011281 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011282 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +000011283 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +000011284 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011285 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011286do
Martin v. Löwis11437992002-04-12 09:54:03 +000011287as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11288echo "$as_me:$LINENO: checking for $ac_func" >&5
11289echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11290if eval "test \"\${$as_ac_var+set}\" = set"; then
11291 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011292else
Martin v. Löwis11437992002-04-12 09:54:03 +000011293 cat >conftest.$ac_ext <<_ACEOF
11294#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011295#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011296/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011297 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011298#include <assert.h>
11299/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011300#ifdef __cplusplus
11301extern "C"
11302#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011303/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 builtin and then its argument prototype would still apply. */
11305char $ac_func ();
11306char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011307
Martin v. Löwis11437992002-04-12 09:54:03 +000011308#ifdef F77_DUMMY_MAIN
11309# ifdef __cplusplus
11310 extern "C"
11311# endif
11312 int F77_DUMMY_MAIN() { return 1; }
11313#endif
11314int
11315main ()
11316{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011317/* The GNU C library defines this for functions which it implements
11318 to always fail with ENOSYS. Some functions are actually named
11319 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011320#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011321choke me
11322#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011323f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011324#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011325
Martin v. Löwis11437992002-04-12 09:54:03 +000011326 ;
11327 return 0;
11328}
11329_ACEOF
11330rm -f conftest.$ac_objext conftest$ac_exeext
11331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11332 (eval $ac_link) 2>&5
11333 ac_status=$?
11334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11335 (exit $ac_status); } &&
11336 { ac_try='test -s conftest$ac_exeext'
11337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11338 (eval $ac_try) 2>&5
11339 ac_status=$?
11340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11341 (exit $ac_status); }; }; then
11342 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011343else
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 echo "$as_me: failed program was:" >&5
11345cat conftest.$ac_ext >&5
11346eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011347fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011348rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011349fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011350echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11351echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11352if test `eval echo '${'$as_ac_var'}'` = yes; then
11353 cat >>confdefs.h <<_ACEOF
11354#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11355_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011356
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011357fi
11358done
11359
Michael W. Hudson54241132001-12-07 15:38:26 +000011360
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011361# check for openpty and forkpty
11362
Martin v. Löwis11437992002-04-12 09:54:03 +000011363
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011364for ac_func in openpty
11365do
Martin v. Löwis11437992002-04-12 09:54:03 +000011366as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11367echo "$as_me:$LINENO: checking for $ac_func" >&5
11368echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11369if eval "test \"\${$as_ac_var+set}\" = set"; then
11370 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011371else
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 cat >conftest.$ac_ext <<_ACEOF
11373#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011374#include "confdefs.h"
11375/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011377#include <assert.h>
11378/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011379#ifdef __cplusplus
11380extern "C"
11381#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011382/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 builtin and then its argument prototype would still apply. */
11384char $ac_func ();
11385char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011386
Martin v. Löwis11437992002-04-12 09:54:03 +000011387#ifdef F77_DUMMY_MAIN
11388# ifdef __cplusplus
11389 extern "C"
11390# endif
11391 int F77_DUMMY_MAIN() { return 1; }
11392#endif
11393int
11394main ()
11395{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011396/* The GNU C library defines this for functions which it implements
11397 to always fail with ENOSYS. Some functions are actually named
11398 something starting with __ and the normal name is an alias. */
11399#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11400choke me
11401#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011402f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011403#endif
11404
Martin v. Löwis11437992002-04-12 09:54:03 +000011405 ;
11406 return 0;
11407}
11408_ACEOF
11409rm -f conftest.$ac_objext conftest$ac_exeext
11410if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11411 (eval $ac_link) 2>&5
11412 ac_status=$?
11413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11414 (exit $ac_status); } &&
11415 { ac_try='test -s conftest$ac_exeext'
11416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11417 (eval $ac_try) 2>&5
11418 ac_status=$?
11419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11420 (exit $ac_status); }; }; then
11421 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011422else
Martin v. Löwis11437992002-04-12 09:54:03 +000011423 echo "$as_me: failed program was:" >&5
11424cat conftest.$ac_ext >&5
11425eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011426fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011427rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011428fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011429echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11430echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11431if test `eval echo '${'$as_ac_var'}'` = yes; then
11432 cat >>confdefs.h <<_ACEOF
11433#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11434_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011435
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011436else
Martin v. Löwis11437992002-04-12 09:54:03 +000011437 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11438echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11439if test "${ac_cv_lib_util_openpty+set}" = set; then
11440 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011441else
Martin v. Löwis11437992002-04-12 09:54:03 +000011442 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011443LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011444cat >conftest.$ac_ext <<_ACEOF
11445#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011446#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011447
Fred Drake8cef4cf2000-06-28 16:40:38 +000011448/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011449#ifdef __cplusplus
11450extern "C"
11451#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011452/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 builtin and then its argument prototype would still apply. */
11454char openpty ();
11455#ifdef F77_DUMMY_MAIN
11456# ifdef __cplusplus
11457 extern "C"
11458# endif
11459 int F77_DUMMY_MAIN() { return 1; }
11460#endif
11461int
11462main ()
11463{
11464openpty ();
11465 ;
11466 return 0;
11467}
11468_ACEOF
11469rm -f conftest.$ac_objext conftest$ac_exeext
11470if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11471 (eval $ac_link) 2>&5
11472 ac_status=$?
11473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11474 (exit $ac_status); } &&
11475 { ac_try='test -s conftest$ac_exeext'
11476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11477 (eval $ac_try) 2>&5
11478 ac_status=$?
11479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11480 (exit $ac_status); }; }; then
11481 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011482else
Martin v. Löwis11437992002-04-12 09:54:03 +000011483 echo "$as_me: failed program was:" >&5
11484cat conftest.$ac_ext >&5
11485ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011486fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011487rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11488LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011489fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011490echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11491echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11492if test $ac_cv_lib_util_openpty = yes; then
11493 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011494#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011495_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011496 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011497fi
11498
11499fi
11500done
11501
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
Fred Drake8cef4cf2000-06-28 16:40:38 +000011503for ac_func in forkpty
11504do
Martin v. Löwis11437992002-04-12 09:54:03 +000011505as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11506echo "$as_me:$LINENO: checking for $ac_func" >&5
11507echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11508if eval "test \"\${$as_ac_var+set}\" = set"; then
11509 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011510else
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 cat >conftest.$ac_ext <<_ACEOF
11512#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011513#include "confdefs.h"
11514/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011515 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011516#include <assert.h>
11517/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011518#ifdef __cplusplus
11519extern "C"
11520#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011521/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 builtin and then its argument prototype would still apply. */
11523char $ac_func ();
11524char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011525
Martin v. Löwis11437992002-04-12 09:54:03 +000011526#ifdef F77_DUMMY_MAIN
11527# ifdef __cplusplus
11528 extern "C"
11529# endif
11530 int F77_DUMMY_MAIN() { return 1; }
11531#endif
11532int
11533main ()
11534{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011535/* The GNU C library defines this for functions which it implements
11536 to always fail with ENOSYS. Some functions are actually named
11537 something starting with __ and the normal name is an alias. */
11538#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11539choke me
11540#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011541f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011542#endif
11543
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 ;
11545 return 0;
11546}
11547_ACEOF
11548rm -f conftest.$ac_objext conftest$ac_exeext
11549if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11550 (eval $ac_link) 2>&5
11551 ac_status=$?
11552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11553 (exit $ac_status); } &&
11554 { ac_try='test -s conftest$ac_exeext'
11555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11556 (eval $ac_try) 2>&5
11557 ac_status=$?
11558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11559 (exit $ac_status); }; }; then
11560 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011561else
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 echo "$as_me: failed program was:" >&5
11563cat conftest.$ac_ext >&5
11564eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011566rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011568echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11569echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11570if test `eval echo '${'$as_ac_var'}'` = yes; then
11571 cat >>confdefs.h <<_ACEOF
11572#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11573_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011574
Fred Drake8cef4cf2000-06-28 16:40:38 +000011575else
Martin v. Löwis11437992002-04-12 09:54:03 +000011576 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11577echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11578if test "${ac_cv_lib_util_forkpty+set}" = set; then
11579 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011580else
Martin v. Löwis11437992002-04-12 09:54:03 +000011581 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011582LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011583cat >conftest.$ac_ext <<_ACEOF
11584#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011585#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011586
Fred Drake8cef4cf2000-06-28 16:40:38 +000011587/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011588#ifdef __cplusplus
11589extern "C"
11590#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011591/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011592 builtin and then its argument prototype would still apply. */
11593char forkpty ();
11594#ifdef F77_DUMMY_MAIN
11595# ifdef __cplusplus
11596 extern "C"
11597# endif
11598 int F77_DUMMY_MAIN() { return 1; }
11599#endif
11600int
11601main ()
11602{
11603forkpty ();
11604 ;
11605 return 0;
11606}
11607_ACEOF
11608rm -f conftest.$ac_objext conftest$ac_exeext
11609if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11610 (eval $ac_link) 2>&5
11611 ac_status=$?
11612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11613 (exit $ac_status); } &&
11614 { ac_try='test -s conftest$ac_exeext'
11615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11616 (eval $ac_try) 2>&5
11617 ac_status=$?
11618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11619 (exit $ac_status); }; }; then
11620 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011621else
Martin v. Löwis11437992002-04-12 09:54:03 +000011622 echo "$as_me: failed program was:" >&5
11623cat conftest.$ac_ext >&5
11624ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011626rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11627LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011628fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011629echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11630echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11631if test $ac_cv_lib_util_forkpty = yes; then
11632 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011633#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011634_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011635 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011636fi
11637
11638fi
11639done
11640
Jack Jansendd19cf82001-12-06 22:36:17 +000011641
Michael W. Hudson54241132001-12-07 15:38:26 +000011642# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011643
11644
11645
11646
11647
11648
Fred Drake8cef4cf2000-06-28 16:40:38 +000011649for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11650do
Martin v. Löwis11437992002-04-12 09:54:03 +000011651as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11652echo "$as_me:$LINENO: checking for $ac_func" >&5
11653echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11654if eval "test \"\${$as_ac_var+set}\" = set"; then
11655 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011656else
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 cat >conftest.$ac_ext <<_ACEOF
11658#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011659#include "confdefs.h"
11660/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011661 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011662#include <assert.h>
11663/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011664#ifdef __cplusplus
11665extern "C"
11666#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011667/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011668 builtin and then its argument prototype would still apply. */
11669char $ac_func ();
11670char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011671
Martin v. Löwis11437992002-04-12 09:54:03 +000011672#ifdef F77_DUMMY_MAIN
11673# ifdef __cplusplus
11674 extern "C"
11675# endif
11676 int F77_DUMMY_MAIN() { return 1; }
11677#endif
11678int
11679main ()
11680{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011681/* The GNU C library defines this for functions which it implements
11682 to always fail with ENOSYS. Some functions are actually named
11683 something starting with __ and the normal name is an alias. */
11684#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11685choke me
11686#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011687f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011688#endif
11689
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 ;
11691 return 0;
11692}
11693_ACEOF
11694rm -f conftest.$ac_objext conftest$ac_exeext
11695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11696 (eval $ac_link) 2>&5
11697 ac_status=$?
11698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11699 (exit $ac_status); } &&
11700 { ac_try='test -s conftest$ac_exeext'
11701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11702 (eval $ac_try) 2>&5
11703 ac_status=$?
11704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11705 (exit $ac_status); }; }; then
11706 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011707else
Martin v. Löwis11437992002-04-12 09:54:03 +000011708 echo "$as_me: failed program was:" >&5
11709cat conftest.$ac_ext >&5
11710eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011711fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011712rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011714echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11715echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11716if test `eval echo '${'$as_ac_var'}'` = yes; then
11717 cat >>confdefs.h <<_ACEOF
11718#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11719_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011720
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011721fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011722done
11723
Michael W. Hudson54241132001-12-07 15:38:26 +000011724
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
11726
11727
11728
11729
Martin v. Löwis1142de32002-03-29 16:28:31 +000011730for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011731do
Martin v. Löwis11437992002-04-12 09:54:03 +000011732as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11733echo "$as_me:$LINENO: checking for $ac_func" >&5
11734echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11735if eval "test \"\${$as_ac_var+set}\" = set"; then
11736 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011737else
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 cat >conftest.$ac_ext <<_ACEOF
11739#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011740#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011741/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011742 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011743#include <assert.h>
11744/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011745#ifdef __cplusplus
11746extern "C"
11747#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011748/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011749 builtin and then its argument prototype would still apply. */
11750char $ac_func ();
11751char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011752
Martin v. Löwis11437992002-04-12 09:54:03 +000011753#ifdef F77_DUMMY_MAIN
11754# ifdef __cplusplus
11755 extern "C"
11756# endif
11757 int F77_DUMMY_MAIN() { return 1; }
11758#endif
11759int
11760main ()
11761{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011762/* The GNU C library defines this for functions which it implements
11763 to always fail with ENOSYS. Some functions are actually named
11764 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011765#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011766choke me
11767#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011768f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011769#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011770
Martin v. Löwis11437992002-04-12 09:54:03 +000011771 ;
11772 return 0;
11773}
11774_ACEOF
11775rm -f conftest.$ac_objext conftest$ac_exeext
11776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11777 (eval $ac_link) 2>&5
11778 ac_status=$?
11779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11780 (exit $ac_status); } &&
11781 { ac_try='test -s conftest$ac_exeext'
11782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11783 (eval $ac_try) 2>&5
11784 ac_status=$?
11785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11786 (exit $ac_status); }; }; then
11787 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011788else
Martin v. Löwis11437992002-04-12 09:54:03 +000011789 echo "$as_me: failed program was:" >&5
11790cat conftest.$ac_ext >&5
11791eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011792fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011793rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011794fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011795echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11796echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11797if test `eval echo '${'$as_ac_var'}'` = yes; then
11798 cat >>confdefs.h <<_ACEOF
11799#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11800_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011801
Martin v. Löwis1142de32002-03-29 16:28:31 +000011802else
Martin v. Löwis11437992002-04-12 09:54:03 +000011803 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011804fi
11805done
11806
11807
Martin v. Löwis11437992002-04-12 09:54:03 +000011808
Martin v. Löwis1142de32002-03-29 16:28:31 +000011809for ac_func in getpgrp
11810do
Martin v. Löwis11437992002-04-12 09:54:03 +000011811as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11812echo "$as_me:$LINENO: checking for $ac_func" >&5
11813echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11814if eval "test \"\${$as_ac_var+set}\" = set"; then
11815 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011816else
Martin v. Löwis11437992002-04-12 09:54:03 +000011817 cat >conftest.$ac_ext <<_ACEOF
11818#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011819#include "confdefs.h"
11820/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011821 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011822#include <assert.h>
11823/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011824#ifdef __cplusplus
11825extern "C"
11826#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011827/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011828 builtin and then its argument prototype would still apply. */
11829char $ac_func ();
11830char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011831
Martin v. Löwis11437992002-04-12 09:54:03 +000011832#ifdef F77_DUMMY_MAIN
11833# ifdef __cplusplus
11834 extern "C"
11835# endif
11836 int F77_DUMMY_MAIN() { return 1; }
11837#endif
11838int
11839main ()
11840{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011841/* The GNU C library defines this for functions which it implements
11842 to always fail with ENOSYS. Some functions are actually named
11843 something starting with __ and the normal name is an alias. */
11844#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11845choke me
11846#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011847f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000011848#endif
11849
Martin v. Löwis11437992002-04-12 09:54:03 +000011850 ;
11851 return 0;
11852}
11853_ACEOF
11854rm -f conftest.$ac_objext conftest$ac_exeext
11855if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11856 (eval $ac_link) 2>&5
11857 ac_status=$?
11858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11859 (exit $ac_status); } &&
11860 { ac_try='test -s conftest$ac_exeext'
11861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11862 (eval $ac_try) 2>&5
11863 ac_status=$?
11864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11865 (exit $ac_status); }; }; then
11866 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011867else
Martin v. Löwis11437992002-04-12 09:54:03 +000011868 echo "$as_me: failed program was:" >&5
11869cat conftest.$ac_ext >&5
11870eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011871fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011872rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011873fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011874echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11875echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11876if test `eval echo '${'$as_ac_var'}'` = yes; then
11877 cat >>confdefs.h <<_ACEOF
11878#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11879_ACEOF
11880 cat >conftest.$ac_ext <<_ACEOF
11881#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011882#include "confdefs.h"
11883#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011884#ifdef F77_DUMMY_MAIN
11885# ifdef __cplusplus
11886 extern "C"
11887# endif
11888 int F77_DUMMY_MAIN() { return 1; }
11889#endif
11890int
11891main ()
11892{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011893getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011894 ;
11895 return 0;
11896}
11897_ACEOF
11898rm -f conftest.$ac_objext
11899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11900 (eval $ac_compile) 2>&5
11901 ac_status=$?
11902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11903 (exit $ac_status); } &&
11904 { ac_try='test -s conftest.$ac_objext'
11905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11906 (eval $ac_try) 2>&5
11907 ac_status=$?
11908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11909 (exit $ac_status); }; }; then
11910
11911cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011912#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011913_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011914
Martin v. Löwis11437992002-04-12 09:54:03 +000011915
Guido van Rossumf78abae1997-01-21 22:02:36 +000011916else
Martin v. Löwis11437992002-04-12 09:54:03 +000011917 echo "$as_me: failed program was:" >&5
11918cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000011919fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011920rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011921
Guido van Rossum627b2d71993-12-24 10:39:16 +000011922fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011923done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011924
Martin v. Löwis11437992002-04-12 09:54:03 +000011925
Thomas Wouters3a584202000-08-05 23:28:51 +000011926for ac_func in setpgrp
11927do
Martin v. Löwis11437992002-04-12 09:54:03 +000011928as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11929echo "$as_me:$LINENO: checking for $ac_func" >&5
11930echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11931if eval "test \"\${$as_ac_var+set}\" = set"; then
11932 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011933else
Martin v. Löwis11437992002-04-12 09:54:03 +000011934 cat >conftest.$ac_ext <<_ACEOF
11935#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011936#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011937/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011938 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011939#include <assert.h>
11940/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011941#ifdef __cplusplus
11942extern "C"
11943#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011944/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011945 builtin and then its argument prototype would still apply. */
11946char $ac_func ();
11947char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011948
Martin v. Löwis11437992002-04-12 09:54:03 +000011949#ifdef F77_DUMMY_MAIN
11950# ifdef __cplusplus
11951 extern "C"
11952# endif
11953 int F77_DUMMY_MAIN() { return 1; }
11954#endif
11955int
11956main ()
11957{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011958/* The GNU C library defines this for functions which it implements
11959 to always fail with ENOSYS. Some functions are actually named
11960 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011961#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011962choke me
11963#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011964f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011965#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011966
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 ;
11968 return 0;
11969}
11970_ACEOF
11971rm -f conftest.$ac_objext conftest$ac_exeext
11972if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11973 (eval $ac_link) 2>&5
11974 ac_status=$?
11975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11976 (exit $ac_status); } &&
11977 { ac_try='test -s conftest$ac_exeext'
11978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11979 (eval $ac_try) 2>&5
11980 ac_status=$?
11981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11982 (exit $ac_status); }; }; then
11983 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011984else
Martin v. Löwis11437992002-04-12 09:54:03 +000011985 echo "$as_me: failed program was:" >&5
11986cat conftest.$ac_ext >&5
11987eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011988fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011989rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011990fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011991echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11992echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11993if test `eval echo '${'$as_ac_var'}'` = yes; then
11994 cat >>confdefs.h <<_ACEOF
11995#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11996_ACEOF
11997 cat >conftest.$ac_ext <<_ACEOF
11998#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011999#include "confdefs.h"
12000#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012001#ifdef F77_DUMMY_MAIN
12002# ifdef __cplusplus
12003 extern "C"
12004# endif
12005 int F77_DUMMY_MAIN() { return 1; }
12006#endif
12007int
12008main ()
12009{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012010setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012011 ;
12012 return 0;
12013}
12014_ACEOF
12015rm -f conftest.$ac_objext
12016if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12017 (eval $ac_compile) 2>&5
12018 ac_status=$?
12019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12020 (exit $ac_status); } &&
12021 { ac_try='test -s conftest.$ac_objext'
12022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12023 (eval $ac_try) 2>&5
12024 ac_status=$?
12025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12026 (exit $ac_status); }; }; then
12027
12028cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012029#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012030_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012031
Martin v. Löwis11437992002-04-12 09:54:03 +000012032
Guido van Rossumf78abae1997-01-21 22:02:36 +000012033else
Martin v. Löwis11437992002-04-12 09:54:03 +000012034 echo "$as_me: failed program was:" >&5
12035cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012036fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012037rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012038
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012039fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012040done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012041
Martin v. Löwis11437992002-04-12 09:54:03 +000012042
Thomas Wouters3a584202000-08-05 23:28:51 +000012043for ac_func in gettimeofday
12044do
Martin v. Löwis11437992002-04-12 09:54:03 +000012045as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12046echo "$as_me:$LINENO: checking for $ac_func" >&5
12047echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12048if eval "test \"\${$as_ac_var+set}\" = set"; then
12049 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012050else
Martin v. Löwis11437992002-04-12 09:54:03 +000012051 cat >conftest.$ac_ext <<_ACEOF
12052#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012053#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012054/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012055 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012056#include <assert.h>
12057/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012058#ifdef __cplusplus
12059extern "C"
12060#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012061/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012062 builtin and then its argument prototype would still apply. */
12063char $ac_func ();
12064char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012065
Martin v. Löwis11437992002-04-12 09:54:03 +000012066#ifdef F77_DUMMY_MAIN
12067# ifdef __cplusplus
12068 extern "C"
12069# endif
12070 int F77_DUMMY_MAIN() { return 1; }
12071#endif
12072int
12073main ()
12074{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012075/* The GNU C library defines this for functions which it implements
12076 to always fail with ENOSYS. Some functions are actually named
12077 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012078#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012079choke me
12080#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012081f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012082#endif
12083
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 ;
12085 return 0;
12086}
12087_ACEOF
12088rm -f conftest.$ac_objext conftest$ac_exeext
12089if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12090 (eval $ac_link) 2>&5
12091 ac_status=$?
12092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12093 (exit $ac_status); } &&
12094 { ac_try='test -s conftest$ac_exeext'
12095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12096 (eval $ac_try) 2>&5
12097 ac_status=$?
12098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12099 (exit $ac_status); }; }; then
12100 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012101else
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 echo "$as_me: failed program was:" >&5
12103cat conftest.$ac_ext >&5
12104eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012105fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012106rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012107fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012108echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12109echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12110if test `eval echo '${'$as_ac_var'}'` = yes; then
12111 cat >>confdefs.h <<_ACEOF
12112#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12113_ACEOF
12114 cat >conftest.$ac_ext <<_ACEOF
12115#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012116#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012117#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012118#ifdef F77_DUMMY_MAIN
12119# ifdef __cplusplus
12120 extern "C"
12121# endif
12122 int F77_DUMMY_MAIN() { return 1; }
12123#endif
12124int
12125main ()
12126{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012127gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012128 ;
12129 return 0;
12130}
12131_ACEOF
12132rm -f conftest.$ac_objext
12133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12134 (eval $ac_compile) 2>&5
12135 ac_status=$?
12136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12137 (exit $ac_status); } &&
12138 { ac_try='test -s conftest.$ac_objext'
12139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12140 (eval $ac_try) 2>&5
12141 ac_status=$?
12142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12143 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012144 :
12145else
Martin v. Löwis11437992002-04-12 09:54:03 +000012146 echo "$as_me: failed program was:" >&5
12147cat conftest.$ac_ext >&5
12148
12149cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012150#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012151_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012152
Martin v. Löwis11437992002-04-12 09:54:03 +000012153
Guido van Rossum627b2d71993-12-24 10:39:16 +000012154fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012155rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012156
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012157fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012158done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012159
Michael W. Hudson54241132001-12-07 15:38:26 +000012160
12161
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012162# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012163# for [no]getaddrinfo in netdb.h.
12164echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12165echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12166cat >conftest.$ac_ext <<_ACEOF
12167#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012168#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012169
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012170#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012171#include <sys/socket.h>
12172#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012173#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012174
Martin v. Löwis11437992002-04-12 09:54:03 +000012175#ifdef F77_DUMMY_MAIN
12176# ifdef __cplusplus
12177 extern "C"
12178# endif
12179 int F77_DUMMY_MAIN() { return 1; }
12180#endif
12181int
12182main ()
12183{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012184
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012185getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012186
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 ;
12188 return 0;
12189}
12190_ACEOF
12191rm -f conftest.$ac_objext conftest$ac_exeext
12192if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12193 (eval $ac_link) 2>&5
12194 ac_status=$?
12195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12196 (exit $ac_status); } &&
12197 { ac_try='test -s conftest$ac_exeext'
12198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12199 (eval $ac_try) 2>&5
12200 ac_status=$?
12201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12202 (exit $ac_status); }; }; then
12203
12204echo "$as_me:$LINENO: result: yes" >&5
12205echo "${ECHO_T}yes" >&6
12206echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12207echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012208if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 echo "$as_me:$LINENO: result: buggy" >&5
12210echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012211buggygetaddrinfo=yes
12212else
Martin v. Löwis11437992002-04-12 09:54:03 +000012213 cat >conftest.$ac_ext <<_ACEOF
12214#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012215#include "confdefs.h"
12216
12217#include <sys/types.h>
12218#include <netdb.h>
12219#include <string.h>
12220#include <sys/socket.h>
12221#include <netinet/in.h>
12222
12223main()
12224{
12225 int passive, gaierr, inet4 = 0, inet6 = 0;
12226 struct addrinfo hints, *ai, *aitop;
12227 char straddr[INET6_ADDRSTRLEN], strport[16];
12228
12229 for (passive = 0; passive <= 1; passive++) {
12230 memset(&hints, 0, sizeof(hints));
12231 hints.ai_family = AF_UNSPEC;
12232 hints.ai_flags = passive ? AI_PASSIVE : 0;
12233 hints.ai_socktype = SOCK_STREAM;
12234 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12235 (void)gai_strerror(gaierr);
12236 goto bad;
12237 }
12238 for (ai = aitop; ai; ai = ai->ai_next) {
12239 if (ai->ai_addr == NULL ||
12240 ai->ai_addrlen == 0 ||
12241 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12242 straddr, sizeof(straddr), strport, sizeof(strport),
12243 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12244 goto bad;
12245 }
12246 switch (ai->ai_family) {
12247 case AF_INET:
12248 if (strcmp(strport, "54321") != 0) {
12249 goto bad;
12250 }
12251 if (passive) {
12252 if (strcmp(straddr, "0.0.0.0") != 0) {
12253 goto bad;
12254 }
12255 } else {
12256 if (strcmp(straddr, "127.0.0.1") != 0) {
12257 goto bad;
12258 }
12259 }
12260 inet4++;
12261 break;
12262 case AF_INET6:
12263 if (strcmp(strport, "54321") != 0) {
12264 goto bad;
12265 }
12266 if (passive) {
12267 if (strcmp(straddr, "::") != 0) {
12268 goto bad;
12269 }
12270 } else {
12271 if (strcmp(straddr, "::1") != 0) {
12272 goto bad;
12273 }
12274 }
12275 inet6++;
12276 break;
12277 case AF_UNSPEC:
12278 goto bad;
12279 break;
12280 default:
12281 /* another family support? */
12282 break;
12283 }
12284 }
12285 }
12286
12287 if (!(inet4 == 0 || inet4 == 2))
12288 goto bad;
12289 if (!(inet6 == 0 || inet6 == 2))
12290 goto bad;
12291
12292 if (aitop)
12293 freeaddrinfo(aitop);
12294 exit(0);
12295
12296 bad:
12297 if (aitop)
12298 freeaddrinfo(aitop);
12299 exit(1);
12300}
12301
Martin v. Löwis11437992002-04-12 09:54:03 +000012302_ACEOF
12303rm -f conftest$ac_exeext
12304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12305 (eval $ac_link) 2>&5
12306 ac_status=$?
12307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12308 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12310 (eval $ac_try) 2>&5
12311 ac_status=$?
12312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12313 (exit $ac_status); }; }; then
12314 echo "$as_me:$LINENO: result: good" >&5
12315echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012316buggygetaddrinfo=no
12317else
Martin v. Löwis11437992002-04-12 09:54:03 +000012318 echo "$as_me: program exited with status $ac_status" >&5
12319echo "$as_me: failed program was:" >&5
12320cat conftest.$ac_ext >&5
12321( exit $ac_status )
12322echo "$as_me:$LINENO: result: buggy" >&5
12323echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012324buggygetaddrinfo=yes
12325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012326rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012327fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012328else
Martin v. Löwis11437992002-04-12 09:54:03 +000012329 echo "$as_me: failed program was:" >&5
12330cat conftest.$ac_ext >&5
12331
12332echo "$as_me:$LINENO: result: no" >&5
12333echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012334buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012335
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012336fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012337rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012338
12339if test "$buggygetaddrinfo" = "yes"; then
12340 if test "$ipv6" = "yes"; then
12341 echo 'Fatal: You must get working getaddrinfo() function.'
12342 echo ' or you can specify "--disable-ipv6"'.
12343 exit 1
12344 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012345else
Martin v. Löwis11437992002-04-12 09:54:03 +000012346
12347cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012348#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012349_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012350
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012351fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012352
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012353for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012354do
Martin v. Löwis11437992002-04-12 09:54:03 +000012355as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12356echo "$as_me:$LINENO: checking for $ac_func" >&5
12357echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12358if eval "test \"\${$as_ac_var+set}\" = set"; then
12359 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012360else
Martin v. Löwis11437992002-04-12 09:54:03 +000012361 cat >conftest.$ac_ext <<_ACEOF
12362#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012363#include "confdefs.h"
12364/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012365 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012366#include <assert.h>
12367/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012368#ifdef __cplusplus
12369extern "C"
12370#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012371/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 builtin and then its argument prototype would still apply. */
12373char $ac_func ();
12374char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012375
Martin v. Löwis11437992002-04-12 09:54:03 +000012376#ifdef F77_DUMMY_MAIN
12377# ifdef __cplusplus
12378 extern "C"
12379# endif
12380 int F77_DUMMY_MAIN() { return 1; }
12381#endif
12382int
12383main ()
12384{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012385/* The GNU C library defines this for functions which it implements
12386 to always fail with ENOSYS. Some functions are actually named
12387 something starting with __ and the normal name is an alias. */
12388#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12389choke me
12390#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012391f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012392#endif
12393
Martin v. Löwis11437992002-04-12 09:54:03 +000012394 ;
12395 return 0;
12396}
12397_ACEOF
12398rm -f conftest.$ac_objext conftest$ac_exeext
12399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12400 (eval $ac_link) 2>&5
12401 ac_status=$?
12402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12403 (exit $ac_status); } &&
12404 { ac_try='test -s conftest$ac_exeext'
12405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12406 (eval $ac_try) 2>&5
12407 ac_status=$?
12408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12409 (exit $ac_status); }; }; then
12410 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012411else
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 echo "$as_me: failed program was:" >&5
12413cat conftest.$ac_ext >&5
12414eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012415fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012416rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012417fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012418echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12419echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12420if test `eval echo '${'$as_ac_var'}'` = yes; then
12421 cat >>confdefs.h <<_ACEOF
12422#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12423_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012424
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012425fi
12426done
12427
Michael W. Hudson54241132001-12-07 15:38:26 +000012428
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012429# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012430echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12431echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12432if test "${ac_cv_header_time+set}" = set; then
12433 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012434else
Martin v. Löwis11437992002-04-12 09:54:03 +000012435 cat >conftest.$ac_ext <<_ACEOF
12436#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012437#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012438#include <sys/types.h>
12439#include <sys/time.h>
12440#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012441
12442#ifdef F77_DUMMY_MAIN
12443# ifdef __cplusplus
12444 extern "C"
12445# endif
12446 int F77_DUMMY_MAIN() { return 1; }
12447#endif
12448int
12449main ()
12450{
12451if ((struct tm *) 0)
12452return 0;
12453 ;
12454 return 0;
12455}
12456_ACEOF
12457rm -f conftest.$ac_objext
12458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12459 (eval $ac_compile) 2>&5
12460 ac_status=$?
12461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12462 (exit $ac_status); } &&
12463 { ac_try='test -s conftest.$ac_objext'
12464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12465 (eval $ac_try) 2>&5
12466 ac_status=$?
12467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12468 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012469 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012470else
Martin v. Löwis11437992002-04-12 09:54:03 +000012471 echo "$as_me: failed program was:" >&5
12472cat conftest.$ac_ext >&5
12473ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012474fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012475rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012477echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12478echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012479if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
12481cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012482#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012483_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012484
12485fi
12486
Martin v. Löwis11437992002-04-12 09:54:03 +000012487echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12488echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12489if test "${ac_cv_struct_tm+set}" = set; then
12490 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012491else
Martin v. Löwis11437992002-04-12 09:54:03 +000012492 cat >conftest.$ac_ext <<_ACEOF
12493#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012494#include "confdefs.h"
12495#include <sys/types.h>
12496#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012497
12498#ifdef F77_DUMMY_MAIN
12499# ifdef __cplusplus
12500 extern "C"
12501# endif
12502 int F77_DUMMY_MAIN() { return 1; }
12503#endif
12504int
12505main ()
12506{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012507struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012508 ;
12509 return 0;
12510}
12511_ACEOF
12512rm -f conftest.$ac_objext
12513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12514 (eval $ac_compile) 2>&5
12515 ac_status=$?
12516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12517 (exit $ac_status); } &&
12518 { ac_try='test -s conftest.$ac_objext'
12519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12520 (eval $ac_try) 2>&5
12521 ac_status=$?
12522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12523 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012524 ac_cv_struct_tm=time.h
12525else
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 echo "$as_me: failed program was:" >&5
12527cat conftest.$ac_ext >&5
12528ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012529fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012530rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012531fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012532echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12533echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012534if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012535
12536cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012537#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012538_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012539
12540fi
12541
Martin v. Löwis11437992002-04-12 09:54:03 +000012542echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12543echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12544if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12545 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012546else
Martin v. Löwis11437992002-04-12 09:54:03 +000012547 cat >conftest.$ac_ext <<_ACEOF
12548#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012549#include "confdefs.h"
12550#include <sys/types.h>
12551#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012552
12553
12554#ifdef F77_DUMMY_MAIN
12555# ifdef __cplusplus
12556 extern "C"
12557# endif
12558 int F77_DUMMY_MAIN() { return 1; }
12559#endif
12560int
12561main ()
12562{
12563static struct tm ac_aggr;
12564if (ac_aggr.tm_zone)
12565return 0;
12566 ;
12567 return 0;
12568}
12569_ACEOF
12570rm -f conftest.$ac_objext
12571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12572 (eval $ac_compile) 2>&5
12573 ac_status=$?
12574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12575 (exit $ac_status); } &&
12576 { ac_try='test -s conftest.$ac_objext'
12577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12578 (eval $ac_try) 2>&5
12579 ac_status=$?
12580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581 (exit $ac_status); }; }; then
12582 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012583else
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 echo "$as_me: failed program was:" >&5
12585cat conftest.$ac_ext >&5
12586ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012587fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012588rm -f conftest.$ac_objext conftest.$ac_ext
12589fi
12590echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12591echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12592if test $ac_cv_member_struct_tm_tm_zone = yes; then
12593
12594cat >>confdefs.h <<_ACEOF
12595#define HAVE_STRUCT_TM_TM_ZONE 1
12596_ACEOF
12597
12598
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012599fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012600
Martin v. Löwis11437992002-04-12 09:54:03 +000012601if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12602
12603cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012604#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012605_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012606
12607else
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 echo "$as_me:$LINENO: checking for tzname" >&5
12609echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12610if test "${ac_cv_var_tzname+set}" = set; then
12611 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012612else
Martin v. Löwis11437992002-04-12 09:54:03 +000012613 cat >conftest.$ac_ext <<_ACEOF
12614#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012615#include "confdefs.h"
12616#include <time.h>
12617#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012618extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012620
12621#ifdef F77_DUMMY_MAIN
12622# ifdef __cplusplus
12623 extern "C"
12624# endif
12625 int F77_DUMMY_MAIN() { return 1; }
12626#endif
12627int
12628main ()
12629{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012630atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012631 ;
12632 return 0;
12633}
12634_ACEOF
12635rm -f conftest.$ac_objext conftest$ac_exeext
12636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12637 (eval $ac_link) 2>&5
12638 ac_status=$?
12639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12640 (exit $ac_status); } &&
12641 { ac_try='test -s conftest$ac_exeext'
12642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12643 (eval $ac_try) 2>&5
12644 ac_status=$?
12645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12646 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012647 ac_cv_var_tzname=yes
12648else
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 echo "$as_me: failed program was:" >&5
12650cat conftest.$ac_ext >&5
12651ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012652fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012653rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012654fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012655echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12656echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012657 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012658
12659cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012660#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012661_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012662
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012663 fi
12664fi
12665
Jack Jansendd19cf82001-12-06 22:36:17 +000012666
Martin v. Löwis11437992002-04-12 09:54:03 +000012667echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12668echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12669if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12670 echo $ECHO_N "(cached) $ECHO_C" >&6
12671else
12672 cat >conftest.$ac_ext <<_ACEOF
12673#line $LINENO "configure"
12674#include "confdefs.h"
12675$ac_includes_default
12676#ifdef F77_DUMMY_MAIN
12677# ifdef __cplusplus
12678 extern "C"
12679# endif
12680 int F77_DUMMY_MAIN() { return 1; }
12681#endif
12682int
12683main ()
12684{
12685static struct stat ac_aggr;
12686if (ac_aggr.st_rdev)
12687return 0;
12688 ;
12689 return 0;
12690}
12691_ACEOF
12692rm -f conftest.$ac_objext
12693if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12694 (eval $ac_compile) 2>&5
12695 ac_status=$?
12696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12697 (exit $ac_status); } &&
12698 { ac_try='test -s conftest.$ac_objext'
12699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12700 (eval $ac_try) 2>&5
12701 ac_status=$?
12702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12703 (exit $ac_status); }; }; then
12704 ac_cv_member_struct_stat_st_rdev=yes
12705else
12706 echo "$as_me: failed program was:" >&5
12707cat conftest.$ac_ext >&5
12708ac_cv_member_struct_stat_st_rdev=no
12709fi
12710rm -f conftest.$ac_objext conftest.$ac_ext
12711fi
12712echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12713echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12714if test $ac_cv_member_struct_stat_st_rdev = yes; then
12715
12716cat >>confdefs.h <<_ACEOF
12717#define HAVE_STRUCT_STAT_ST_RDEV 1
12718_ACEOF
12719
12720
12721cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012722#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012723_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012724
12725fi
12726
Martin v. Löwis11437992002-04-12 09:54:03 +000012727
12728
12729echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12730echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12731if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12732 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012733else
Martin v. Löwis11437992002-04-12 09:54:03 +000012734 cat >conftest.$ac_ext <<_ACEOF
12735#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012736#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012737$ac_includes_default
12738#ifdef F77_DUMMY_MAIN
12739# ifdef __cplusplus
12740 extern "C"
12741# endif
12742 int F77_DUMMY_MAIN() { return 1; }
12743#endif
12744int
12745main ()
12746{
12747static struct stat ac_aggr;
12748if (ac_aggr.st_blksize)
12749return 0;
12750 ;
12751 return 0;
12752}
12753_ACEOF
12754rm -f conftest.$ac_objext
12755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12756 (eval $ac_compile) 2>&5
12757 ac_status=$?
12758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12759 (exit $ac_status); } &&
12760 { ac_try='test -s conftest.$ac_objext'
12761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12762 (eval $ac_try) 2>&5
12763 ac_status=$?
12764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12765 (exit $ac_status); }; }; then
12766 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012767else
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 echo "$as_me: failed program was:" >&5
12769cat conftest.$ac_ext >&5
12770ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012771fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012772rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012773fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012774echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12775echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12776if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012777
Martin v. Löwis11437992002-04-12 09:54:03 +000012778cat >>confdefs.h <<_ACEOF
12779#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12780_ACEOF
12781
12782
12783cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012784#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012785_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012786
12787fi
12788
Martin v. Löwis11437992002-04-12 09:54:03 +000012789
12790echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12791echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12792if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12793 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012794else
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 cat >conftest.$ac_ext <<_ACEOF
12796#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012797#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012798$ac_includes_default
12799#ifdef F77_DUMMY_MAIN
12800# ifdef __cplusplus
12801 extern "C"
12802# endif
12803 int F77_DUMMY_MAIN() { return 1; }
12804#endif
12805int
12806main ()
12807{
12808static struct stat ac_aggr;
12809if (ac_aggr.st_blocks)
12810return 0;
12811 ;
12812 return 0;
12813}
12814_ACEOF
12815rm -f conftest.$ac_objext
12816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12817 (eval $ac_compile) 2>&5
12818 ac_status=$?
12819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12820 (exit $ac_status); } &&
12821 { ac_try='test -s conftest.$ac_objext'
12822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12823 (eval $ac_try) 2>&5
12824 ac_status=$?
12825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12826 (exit $ac_status); }; }; then
12827 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012828else
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 echo "$as_me: failed program was:" >&5
12830cat conftest.$ac_ext >&5
12831ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012833rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012834fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012835echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12836echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12837if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012838
Martin v. Löwis11437992002-04-12 09:54:03 +000012839cat >>confdefs.h <<_ACEOF
12840#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12841_ACEOF
12842
12843
12844cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012845#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012846_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012847
12848else
Martin v. Löwis11437992002-04-12 09:54:03 +000012849 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012850fi
12851
Michael W. Hudson54241132001-12-07 15:38:26 +000012852
Martin v. Löwis11437992002-04-12 09:54:03 +000012853
12854echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12855echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12856if test "${ac_cv_header_time_altzone+set}" = set; then
12857 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012858else
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 cat >conftest.$ac_ext <<_ACEOF
12860#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012861#include "confdefs.h"
12862#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012863#ifdef F77_DUMMY_MAIN
12864# ifdef __cplusplus
12865 extern "C"
12866# endif
12867 int F77_DUMMY_MAIN() { return 1; }
12868#endif
12869int
12870main ()
12871{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012872return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 ;
12874 return 0;
12875}
12876_ACEOF
12877rm -f conftest.$ac_objext
12878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12879 (eval $ac_compile) 2>&5
12880 ac_status=$?
12881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12882 (exit $ac_status); } &&
12883 { ac_try='test -s conftest.$ac_objext'
12884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12885 (eval $ac_try) 2>&5
12886 ac_status=$?
12887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12888 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012889 ac_cv_header_time_altzone=yes
12890else
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 echo "$as_me: failed program was:" >&5
12892cat conftest.$ac_ext >&5
12893ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012894fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012895rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012896fi
12897
Martin v. Löwis11437992002-04-12 09:54:03 +000012898echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
12899echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012900if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012901
12902cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012903#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012904_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012905
12906fi
12907
Guido van Rossumda88dad1995-01-26 00:46:29 +000012908was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012909echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
12910echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
12911cat >conftest.$ac_ext <<_ACEOF
12912#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012913#include "confdefs.h"
12914
12915#include <sys/types.h>
12916#include <sys/select.h>
12917#include <sys/time.h>
12918
Martin v. Löwis11437992002-04-12 09:54:03 +000012919#ifdef F77_DUMMY_MAIN
12920# ifdef __cplusplus
12921 extern "C"
12922# endif
12923 int F77_DUMMY_MAIN() { return 1; }
12924#endif
12925int
12926main ()
12927{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012928;
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 ;
12930 return 0;
12931}
12932_ACEOF
12933rm -f conftest.$ac_objext
12934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12935 (eval $ac_compile) 2>&5
12936 ac_status=$?
12937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12938 (exit $ac_status); } &&
12939 { ac_try='test -s conftest.$ac_objext'
12940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12941 (eval $ac_try) 2>&5
12942 ac_status=$?
12943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12944 (exit $ac_status); }; }; then
12945
12946
12947cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012948#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012949_ACEOF
12950
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012951 was_it_defined=yes
12952
Guido van Rossumf78abae1997-01-21 22:02:36 +000012953else
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 echo "$as_me: failed program was:" >&5
12955cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012956fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012957rm -f conftest.$ac_objext conftest.$ac_ext
12958echo "$as_me:$LINENO: result: $was_it_defined" >&5
12959echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000012960
Martin v. Löwis11437992002-04-12 09:54:03 +000012961echo "$as_me:$LINENO: checking for addrinfo" >&5
12962echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
12963if test "${ac_cv_struct_addrinfo+set}" = set; then
12964 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012965else
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 cat >conftest.$ac_ext <<_ACEOF
12967#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012968#include "confdefs.h"
12969
12970# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012971#ifdef F77_DUMMY_MAIN
12972# ifdef __cplusplus
12973 extern "C"
12974# endif
12975 int F77_DUMMY_MAIN() { return 1; }
12976#endif
12977int
12978main ()
12979{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012980struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 ;
12982 return 0;
12983}
12984_ACEOF
12985rm -f conftest.$ac_objext
12986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12987 (eval $ac_compile) 2>&5
12988 ac_status=$?
12989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12990 (exit $ac_status); } &&
12991 { ac_try='test -s conftest.$ac_objext'
12992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12993 (eval $ac_try) 2>&5
12994 ac_status=$?
12995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12996 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012997 ac_cv_struct_addrinfo=yes
12998else
Martin v. Löwis11437992002-04-12 09:54:03 +000012999 echo "$as_me: failed program was:" >&5
13000cat conftest.$ac_ext >&5
13001ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013002fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013003rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013004fi
13005
Martin v. Löwis11437992002-04-12 09:54:03 +000013006echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13007echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013008if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013009
13010cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013011#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013012_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013013
13014fi
13015
Martin v. Löwis11437992002-04-12 09:54:03 +000013016echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13017echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13018if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13019 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013020else
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 cat >conftest.$ac_ext <<_ACEOF
13022#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013023#include "confdefs.h"
13024
13025# include <sys/types.h>
13026# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013027#ifdef F77_DUMMY_MAIN
13028# ifdef __cplusplus
13029 extern "C"
13030# endif
13031 int F77_DUMMY_MAIN() { return 1; }
13032#endif
13033int
13034main ()
13035{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013036struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013037 ;
13038 return 0;
13039}
13040_ACEOF
13041rm -f conftest.$ac_objext
13042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13043 (eval $ac_compile) 2>&5
13044 ac_status=$?
13045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13046 (exit $ac_status); } &&
13047 { ac_try='test -s conftest.$ac_objext'
13048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13049 (eval $ac_try) 2>&5
13050 ac_status=$?
13051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13052 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013053 ac_cv_struct_sockaddr_storage=yes
13054else
Martin v. Löwis11437992002-04-12 09:54:03 +000013055 echo "$as_me: failed program was:" >&5
13056cat conftest.$ac_ext >&5
13057ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013058fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013059rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013060fi
13061
Martin v. Löwis11437992002-04-12 09:54:03 +000013062echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13063echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013064if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013065
13066cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013067#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013068_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013069
13070fi
13071
Guido van Rossum627b2d71993-12-24 10:39:16 +000013072# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013073
Michael W. Hudson54241132001-12-07 15:38:26 +000013074
Martin v. Löwis11437992002-04-12 09:54:03 +000013075echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13076echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13077if test "${ac_cv_c_char_unsigned+set}" = set; then
13078 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013079else
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 cat >conftest.$ac_ext <<_ACEOF
13081#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013082#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013083$ac_includes_default
13084#ifdef F77_DUMMY_MAIN
13085# ifdef __cplusplus
13086 extern "C"
13087# endif
13088 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013089#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013090int
13091main ()
13092{
13093static int test_array [1 - 2 * !(((char) -1) < 0)];
13094test_array [0] = 0
13095
13096 ;
13097 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013098}
Martin v. Löwis11437992002-04-12 09:54:03 +000013099_ACEOF
13100rm -f conftest.$ac_objext
13101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13102 (eval $ac_compile) 2>&5
13103 ac_status=$?
13104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13105 (exit $ac_status); } &&
13106 { ac_try='test -s conftest.$ac_objext'
13107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13108 (eval $ac_try) 2>&5
13109 ac_status=$?
13110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13111 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013112 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013113else
13114 echo "$as_me: failed program was:" >&5
13115cat conftest.$ac_ext >&5
13116ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013118rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013119fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013120echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13121echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013122if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013123 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013124#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013125_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013126
13127fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013128
Martin v. Löwis11437992002-04-12 09:54:03 +000013129echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13130echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13131if test "${ac_cv_prog_cc_stdc+set}" = set; then
13132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013133else
Martin v. Löwis11437992002-04-12 09:54:03 +000013134 ac_cv_prog_cc_stdc=no
13135ac_save_CC=$CC
13136cat >conftest.$ac_ext <<_ACEOF
13137#line $LINENO "configure"
13138#include "confdefs.h"
13139#include <stdarg.h>
13140#include <stdio.h>
13141#include <sys/types.h>
13142#include <sys/stat.h>
13143/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13144struct buf { int x; };
13145FILE * (*rcsopen) (struct buf *, struct stat *, int);
13146static char *e (p, i)
13147 char **p;
13148 int i;
13149{
13150 return p[i];
13151}
13152static char *f (char * (*g) (char **, int), char **p, ...)
13153{
13154 char *s;
13155 va_list v;
13156 va_start (v,p);
13157 s = g (p, va_arg (v,int));
13158 va_end (v);
13159 return s;
13160}
13161int test (int i, double x);
13162struct s1 {int (*f) (int a);};
13163struct s2 {int (*f) (double a);};
13164int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13165int argc;
13166char **argv;
13167#ifdef F77_DUMMY_MAIN
13168# ifdef __cplusplus
13169 extern "C"
13170# endif
13171 int F77_DUMMY_MAIN() { return 1; }
13172#endif
13173int
13174main ()
13175{
13176return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13177 ;
13178 return 0;
13179}
13180_ACEOF
13181# Don't try gcc -ansi; that turns off useful extensions and
13182# breaks some systems' header files.
13183# AIX -qlanglvl=ansi
13184# Ultrix and OSF/1 -std1
13185# HP-UX 10.20 and later -Ae
13186# HP-UX older versions -Aa -D_HPUX_SOURCE
13187# SVR4 -Xc -D__EXTENSIONS__
13188for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13189do
13190 CC="$ac_save_CC $ac_arg"
13191 rm -f conftest.$ac_objext
13192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13193 (eval $ac_compile) 2>&5
13194 ac_status=$?
13195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13196 (exit $ac_status); } &&
13197 { ac_try='test -s conftest.$ac_objext'
13198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13199 (eval $ac_try) 2>&5
13200 ac_status=$?
13201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13202 (exit $ac_status); }; }; then
13203 ac_cv_prog_cc_stdc=$ac_arg
13204break
13205else
13206 echo "$as_me: failed program was:" >&5
13207cat conftest.$ac_ext >&5
13208fi
13209rm -f conftest.$ac_objext
13210done
13211rm -f conftest.$ac_ext conftest.$ac_objext
13212CC=$ac_save_CC
13213
13214fi
13215
13216case "x$ac_cv_prog_cc_stdc" in
13217 x|xno)
13218 echo "$as_me:$LINENO: result: none needed" >&5
13219echo "${ECHO_T}none needed" >&6 ;;
13220 *)
13221 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13222echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13223 CC="$CC $ac_cv_prog_cc_stdc" ;;
13224esac
13225
13226echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13227echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13228if test "${ac_cv_c_const+set}" = set; then
13229 echo $ECHO_N "(cached) $ECHO_C" >&6
13230else
13231 cat >conftest.$ac_ext <<_ACEOF
13232#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013233#include "confdefs.h"
13234
Martin v. Löwis11437992002-04-12 09:54:03 +000013235#ifdef F77_DUMMY_MAIN
13236# ifdef __cplusplus
13237 extern "C"
13238# endif
13239 int F77_DUMMY_MAIN() { return 1; }
13240#endif
13241int
13242main ()
13243{
13244/* FIXME: Include the comments suggested by Paul. */
13245#ifndef __cplusplus
13246 /* Ultrix mips cc rejects this. */
13247 typedef int charset[2];
13248 const charset x;
13249 /* SunOS 4.1.1 cc rejects this. */
13250 char const *const *ccp;
13251 char **p;
13252 /* NEC SVR4.0.2 mips cc rejects this. */
13253 struct point {int x, y;};
13254 static struct point const zero = {0,0};
13255 /* AIX XL C 1.02.0.0 rejects this.
13256 It does not let you subtract one const X* pointer from another in
13257 an arm of an if-expression whose if-part is not a constant
13258 expression */
13259 const char *g = "string";
13260 ccp = &g + (g ? g-g : 0);
13261 /* HPUX 7.0 cc rejects these. */
13262 ++ccp;
13263 p = (char**) ccp;
13264 ccp = (char const *const *) p;
13265 { /* SCO 3.2v4 cc rejects this. */
13266 char *t;
13267 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013268
Martin v. Löwis11437992002-04-12 09:54:03 +000013269 *t++ = 0;
13270 }
13271 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13272 int x[] = {25, 17};
13273 const int *foo = &x[0];
13274 ++foo;
13275 }
13276 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13277 typedef const int *iptr;
13278 iptr p = 0;
13279 ++p;
13280 }
13281 { /* AIX XL C 1.02.0.0 rejects this saying
13282 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13283 struct s { int j; const int *ap[3]; };
13284 struct s *b; b->j = 5;
13285 }
13286 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13287 const int foo = 10;
13288 }
13289#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013290
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 ;
13292 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013293}
Martin v. Löwis11437992002-04-12 09:54:03 +000013294_ACEOF
13295rm -f conftest.$ac_objext
13296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13297 (eval $ac_compile) 2>&5
13298 ac_status=$?
13299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13300 (exit $ac_status); } &&
13301 { ac_try='test -s conftest.$ac_objext'
13302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13303 (eval $ac_try) 2>&5
13304 ac_status=$?
13305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13306 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013307 ac_cv_c_const=yes
13308else
Martin v. Löwis11437992002-04-12 09:54:03 +000013309 echo "$as_me: failed program was:" >&5
13310cat conftest.$ac_ext >&5
13311ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013312fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013313rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013314fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013315echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13316echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013317if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013318
13319cat >>confdefs.h <<\_ACEOF
13320#define const
13321_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013322
13323fi
13324
Michael W. Hudson54241132001-12-07 15:38:26 +000013325
Guido van Rossumda88dad1995-01-26 00:46:29 +000013326works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013327echo "$as_me:$LINENO: checking for working volatile" >&5
13328echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13329cat >conftest.$ac_ext <<_ACEOF
13330#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013331#include "confdefs.h"
13332
Martin v. Löwis11437992002-04-12 09:54:03 +000013333#ifdef F77_DUMMY_MAIN
13334# ifdef __cplusplus
13335 extern "C"
13336# endif
13337 int F77_DUMMY_MAIN() { return 1; }
13338#endif
13339int
13340main ()
13341{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013342volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013343 ;
13344 return 0;
13345}
13346_ACEOF
13347rm -f conftest.$ac_objext
13348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13349 (eval $ac_compile) 2>&5
13350 ac_status=$?
13351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13352 (exit $ac_status); } &&
13353 { ac_try='test -s conftest.$ac_objext'
13354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13355 (eval $ac_try) 2>&5
13356 ac_status=$?
13357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13358 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013359 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013360else
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 echo "$as_me: failed program was:" >&5
13362cat conftest.$ac_ext >&5
13363
13364cat >>confdefs.h <<\_ACEOF
13365#define volatile
13366_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013367
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013368
Guido van Rossum627b2d71993-12-24 10:39:16 +000013369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013370rm -f conftest.$ac_objext conftest.$ac_ext
13371echo "$as_me:$LINENO: result: $works" >&5
13372echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013373
Guido van Rossumda88dad1995-01-26 00:46:29 +000013374works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013375echo "$as_me:$LINENO: checking for working signed char" >&5
13376echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13377cat >conftest.$ac_ext <<_ACEOF
13378#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013379#include "confdefs.h"
13380
Martin v. Löwis11437992002-04-12 09:54:03 +000013381#ifdef F77_DUMMY_MAIN
13382# ifdef __cplusplus
13383 extern "C"
13384# endif
13385 int F77_DUMMY_MAIN() { return 1; }
13386#endif
13387int
13388main ()
13389{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013390signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 ;
13392 return 0;
13393}
13394_ACEOF
13395rm -f conftest.$ac_objext
13396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13397 (eval $ac_compile) 2>&5
13398 ac_status=$?
13399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13400 (exit $ac_status); } &&
13401 { ac_try='test -s conftest.$ac_objext'
13402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13403 (eval $ac_try) 2>&5
13404 ac_status=$?
13405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13406 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013407 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013408else
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 echo "$as_me: failed program was:" >&5
13410cat conftest.$ac_ext >&5
13411
13412cat >>confdefs.h <<\_ACEOF
13413#define signed
13414_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013415
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013416
Guido van Rossum7f43da71994-08-01 12:15:30 +000013417fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013418rm -f conftest.$ac_objext conftest.$ac_ext
13419echo "$as_me:$LINENO: result: $works" >&5
13420echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013421
Guido van Rossumda88dad1995-01-26 00:46:29 +000013422have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013423echo "$as_me:$LINENO: checking for prototypes" >&5
13424echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13425cat >conftest.$ac_ext <<_ACEOF
13426#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013427#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013428int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013429#ifdef F77_DUMMY_MAIN
13430# ifdef __cplusplus
13431 extern "C"
13432# endif
13433 int F77_DUMMY_MAIN() { return 1; }
13434#endif
13435int
13436main ()
13437{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013438return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013439 ;
13440 return 0;
13441}
13442_ACEOF
13443rm -f conftest.$ac_objext
13444if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13445 (eval $ac_compile) 2>&5
13446 ac_status=$?
13447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13448 (exit $ac_status); } &&
13449 { ac_try='test -s conftest.$ac_objext'
13450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13451 (eval $ac_try) 2>&5
13452 ac_status=$?
13453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13454 (exit $ac_status); }; }; then
13455
13456
13457cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013458#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013459_ACEOF
13460
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013461 have_prototypes=yes
13462
Guido van Rossumf78abae1997-01-21 22:02:36 +000013463else
Martin v. Löwis11437992002-04-12 09:54:03 +000013464 echo "$as_me: failed program was:" >&5
13465cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013466fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013467rm -f conftest.$ac_objext conftest.$ac_ext
13468echo "$as_me:$LINENO: result: $have_prototypes" >&5
13469echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013470
Guido van Rossumda88dad1995-01-26 00:46:29 +000013471works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013472echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13473echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13474cat >conftest.$ac_ext <<_ACEOF
13475#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013476#include "confdefs.h"
13477
13478#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013479int foo(int x, ...) {
13480 va_list va;
13481 va_start(va, x);
13482 va_arg(va, int);
13483 va_arg(va, char *);
13484 va_arg(va, double);
13485 return 0;
13486}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013487
Martin v. Löwis11437992002-04-12 09:54:03 +000013488#ifdef F77_DUMMY_MAIN
13489# ifdef __cplusplus
13490 extern "C"
13491# endif
13492 int F77_DUMMY_MAIN() { return 1; }
13493#endif
13494int
13495main ()
13496{
Guido van Rossum90eea071996-08-30 20:58:57 +000013497return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 ;
13499 return 0;
13500}
13501_ACEOF
13502rm -f conftest.$ac_objext
13503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13504 (eval $ac_compile) 2>&5
13505 ac_status=$?
13506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13507 (exit $ac_status); } &&
13508 { ac_try='test -s conftest.$ac_objext'
13509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13510 (eval $ac_try) 2>&5
13511 ac_status=$?
13512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13513 (exit $ac_status); }; }; then
13514
13515
13516cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013517#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013518_ACEOF
13519
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013520 works=yes
13521
Guido van Rossumf78abae1997-01-21 22:02:36 +000013522else
Martin v. Löwis11437992002-04-12 09:54:03 +000013523 echo "$as_me: failed program was:" >&5
13524cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013525fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013526rm -f conftest.$ac_objext conftest.$ac_ext
13527echo "$as_me:$LINENO: result: $works" >&5
13528echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013529
Guido van Rossumda88dad1995-01-26 00:46:29 +000013530if test "$have_prototypes" = yes; then
13531bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013532echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13533echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13534cat >conftest.$ac_ext <<_ACEOF
13535#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013536#include "confdefs.h"
13537#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013538#ifdef F77_DUMMY_MAIN
13539# ifdef __cplusplus
13540 extern "C"
13541# endif
13542 int F77_DUMMY_MAIN() { return 1; }
13543#endif
13544int
13545main ()
13546{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013547char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013548 ;
13549 return 0;
13550}
13551_ACEOF
13552rm -f conftest.$ac_objext
13553if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13554 (eval $ac_compile) 2>&5
13555 ac_status=$?
13556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13557 (exit $ac_status); } &&
13558 { ac_try='test -s conftest.$ac_objext'
13559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13560 (eval $ac_try) 2>&5
13561 ac_status=$?
13562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13563 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013564 :
13565else
Martin v. Löwis11437992002-04-12 09:54:03 +000013566 echo "$as_me: failed program was:" >&5
13567cat conftest.$ac_ext >&5
13568
13569cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013570#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013571_ACEOF
13572
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013573 bad_prototypes=yes
13574
Guido van Rossum627b2d71993-12-24 10:39:16 +000013575fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013576rm -f conftest.$ac_objext conftest.$ac_ext
13577echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13578echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013579fi
13580
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013581# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013582echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13583echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13584cat >conftest.$ac_ext <<_ACEOF
13585#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013586#include "confdefs.h"
13587#include <sys/types.h>
13588#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013589#ifdef F77_DUMMY_MAIN
13590# ifdef __cplusplus
13591 extern "C"
13592# endif
13593 int F77_DUMMY_MAIN() { return 1; }
13594#endif
13595int
13596main ()
13597{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013598struct sockaddr x;
13599x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013600 ;
13601 return 0;
13602}
13603_ACEOF
13604rm -f conftest.$ac_objext
13605if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13606 (eval $ac_compile) 2>&5
13607 ac_status=$?
13608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13609 (exit $ac_status); } &&
13610 { ac_try='test -s conftest.$ac_objext'
13611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13612 (eval $ac_try) 2>&5
13613 ac_status=$?
13614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13615 (exit $ac_status); }; }; then
13616 echo "$as_me:$LINENO: result: yes" >&5
13617echo "${ECHO_T}yes" >&6
13618
13619cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013620#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013621_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013622
13623else
Martin v. Löwis11437992002-04-12 09:54:03 +000013624 echo "$as_me: failed program was:" >&5
13625cat conftest.$ac_ext >&5
13626echo "$as_me:$LINENO: result: no" >&5
13627echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013628fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013629rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013630
Martin v. Löwis11437992002-04-12 09:54:03 +000013631echo "$as_me:$LINENO: checking for bad static forward" >&5
13632echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13633if test "${ac_cv_bad_static_forward+set}" = set; then
13634 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013635else
13636 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013637 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013638else
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 cat >conftest.$ac_ext <<_ACEOF
13640#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013641#include "confdefs.h"
13642
13643struct s { int a; int b; };
13644static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013645int foobar() {
13646 static int random;
13647 random = (int) &foo;
13648 return random;
13649}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013650static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013651main() {
13652 exit(!((int)&foo == foobar()));
13653}
Martin v. Löwis11437992002-04-12 09:54:03 +000013654_ACEOF
13655rm -f conftest$ac_exeext
13656if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13657 (eval $ac_link) 2>&5
13658 ac_status=$?
13659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13660 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13662 (eval $ac_try) 2>&5
13663 ac_status=$?
13664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13665 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013666 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013667else
Martin v. Löwis11437992002-04-12 09:54:03 +000013668 echo "$as_me: program exited with status $ac_status" >&5
13669echo "$as_me: failed program was:" >&5
13670cat conftest.$ac_ext >&5
13671( exit $ac_status )
13672ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013673fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013674rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13675fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013676fi
13677
Martin v. Löwis11437992002-04-12 09:54:03 +000013678echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13679echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013680if test "$ac_cv_bad_static_forward" = yes
13681then
Martin v. Löwis11437992002-04-12 09:54:03 +000013682
13683cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013684#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013685_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013686
13687fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013688
Guido van Rossumda88dad1995-01-26 00:46:29 +000013689va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013690echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13691echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13692cat >conftest.$ac_ext <<_ACEOF
13693#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013694#include "confdefs.h"
13695
13696#ifdef HAVE_STDARG_PROTOTYPES
13697#include <stdarg.h>
13698#else
13699#include <varargs.h>
13700#endif
13701
Martin v. Löwis11437992002-04-12 09:54:03 +000013702#ifdef F77_DUMMY_MAIN
13703# ifdef __cplusplus
13704 extern "C"
13705# endif
13706 int F77_DUMMY_MAIN() { return 1; }
13707#endif
13708int
13709main ()
13710{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013711va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013712 ;
13713 return 0;
13714}
13715_ACEOF
13716rm -f conftest.$ac_objext
13717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13718 (eval $ac_compile) 2>&5
13719 ac_status=$?
13720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13721 (exit $ac_status); } &&
13722 { ac_try='test -s conftest.$ac_objext'
13723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13724 (eval $ac_try) 2>&5
13725 ac_status=$?
13726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13727 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013728 :
13729else
Martin v. Löwis11437992002-04-12 09:54:03 +000013730 echo "$as_me: failed program was:" >&5
13731cat conftest.$ac_ext >&5
13732
13733
13734cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013736_ACEOF
13737
Guido van Rossumda88dad1995-01-26 00:46:29 +000013738 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013739
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013740fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013741rm -f conftest.$ac_objext conftest.$ac_ext
13742echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13743echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013744
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013745# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013746
13747
13748
13749echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13750echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13751if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13752 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013753else
Martin v. Löwis11437992002-04-12 09:54:03 +000013754 cat >conftest.$ac_ext <<_ACEOF
13755#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013756#include "confdefs.h"
13757/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013758 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013759#include <assert.h>
13760/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013761#ifdef __cplusplus
13762extern "C"
13763#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013764/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 builtin and then its argument prototype would still apply. */
13766char gethostbyname_r ();
13767char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013768
Martin v. Löwis11437992002-04-12 09:54:03 +000013769#ifdef F77_DUMMY_MAIN
13770# ifdef __cplusplus
13771 extern "C"
13772# endif
13773 int F77_DUMMY_MAIN() { return 1; }
13774#endif
13775int
13776main ()
13777{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013778/* The GNU C library defines this for functions which it implements
13779 to always fail with ENOSYS. Some functions are actually named
13780 something starting with __ and the normal name is an alias. */
13781#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13782choke me
13783#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013784f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013785#endif
13786
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 ;
13788 return 0;
13789}
13790_ACEOF
13791rm -f conftest.$ac_objext conftest$ac_exeext
13792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13793 (eval $ac_link) 2>&5
13794 ac_status=$?
13795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13796 (exit $ac_status); } &&
13797 { ac_try='test -s conftest$ac_exeext'
13798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13799 (eval $ac_try) 2>&5
13800 ac_status=$?
13801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13802 (exit $ac_status); }; }; then
13803 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013804else
Martin v. Löwis11437992002-04-12 09:54:03 +000013805 echo "$as_me: failed program was:" >&5
13806cat conftest.$ac_ext >&5
13807ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013808fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013809rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013810fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013811echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13812echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13813if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013814
Martin v. Löwis11437992002-04-12 09:54:03 +000013815 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013816#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013817_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013818
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13820echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013821 OLD_CFLAGS=$CFLAGS
13822 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013823 cat >conftest.$ac_ext <<_ACEOF
13824#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013825#include "confdefs.h"
13826
13827# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013828
13829#ifdef F77_DUMMY_MAIN
13830# ifdef __cplusplus
13831 extern "C"
13832# endif
13833 int F77_DUMMY_MAIN() { return 1; }
13834#endif
13835int
13836main ()
13837{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013838
13839 char *name;
13840 struct hostent *he, *res;
13841 char buffer[2048];
13842 int buflen = 2048;
13843 int h_errnop;
13844
13845 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013846
13847 ;
13848 return 0;
13849}
13850_ACEOF
13851rm -f conftest.$ac_objext
13852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13853 (eval $ac_compile) 2>&5
13854 ac_status=$?
13855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13856 (exit $ac_status); } &&
13857 { ac_try='test -s conftest.$ac_objext'
13858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13859 (eval $ac_try) 2>&5
13860 ac_status=$?
13861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13862 (exit $ac_status); }; }; then
13863
13864 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013865#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013866_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013867
Martin v. Löwis11437992002-04-12 09:54:03 +000013868
13869cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013870#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013871_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013872
Martin v. Löwis11437992002-04-12 09:54:03 +000013873 echo "$as_me:$LINENO: result: yes" >&5
13874echo "${ECHO_T}yes" >&6
13875
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013876else
Martin v. Löwis11437992002-04-12 09:54:03 +000013877 echo "$as_me: failed program was:" >&5
13878cat conftest.$ac_ext >&5
13879
13880 echo "$as_me:$LINENO: result: no" >&5
13881echo "${ECHO_T}no" >&6
13882 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13883echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13884 cat >conftest.$ac_ext <<_ACEOF
13885#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013886#include "confdefs.h"
13887
13888# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013889
13890#ifdef F77_DUMMY_MAIN
13891# ifdef __cplusplus
13892 extern "C"
13893# endif
13894 int F77_DUMMY_MAIN() { return 1; }
13895#endif
13896int
13897main ()
13898{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013899
13900 char *name;
13901 struct hostent *he;
13902 char buffer[2048];
13903 int buflen = 2048;
13904 int h_errnop;
13905
13906 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013907
13908 ;
13909 return 0;
13910}
13911_ACEOF
13912rm -f conftest.$ac_objext
13913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13914 (eval $ac_compile) 2>&5
13915 ac_status=$?
13916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13917 (exit $ac_status); } &&
13918 { ac_try='test -s conftest.$ac_objext'
13919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13920 (eval $ac_try) 2>&5
13921 ac_status=$?
13922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13923 (exit $ac_status); }; }; then
13924
13925 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013926#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013927_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013928
Martin v. Löwis11437992002-04-12 09:54:03 +000013929
13930cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013931#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013932_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013933
Martin v. Löwis11437992002-04-12 09:54:03 +000013934 echo "$as_me:$LINENO: result: yes" >&5
13935echo "${ECHO_T}yes" >&6
13936
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013937else
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 echo "$as_me: failed program was:" >&5
13939cat conftest.$ac_ext >&5
13940
13941 echo "$as_me:$LINENO: result: no" >&5
13942echo "${ECHO_T}no" >&6
13943 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
13944echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
13945 cat >conftest.$ac_ext <<_ACEOF
13946#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013947#include "confdefs.h"
13948
13949# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013950
13951#ifdef F77_DUMMY_MAIN
13952# ifdef __cplusplus
13953 extern "C"
13954# endif
13955 int F77_DUMMY_MAIN() { return 1; }
13956#endif
13957int
13958main ()
13959{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013960
13961 char *name;
13962 struct hostent *he;
13963 struct hostent_data data;
13964
13965 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000013966
13967 ;
13968 return 0;
13969}
13970_ACEOF
13971rm -f conftest.$ac_objext
13972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13973 (eval $ac_compile) 2>&5
13974 ac_status=$?
13975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13976 (exit $ac_status); } &&
13977 { ac_try='test -s conftest.$ac_objext'
13978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13979 (eval $ac_try) 2>&5
13980 ac_status=$?
13981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13982 (exit $ac_status); }; }; then
13983
13984 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013985#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013986_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013987
Martin v. Löwis11437992002-04-12 09:54:03 +000013988
13989cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013990#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013991_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013992
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 echo "$as_me:$LINENO: result: yes" >&5
13994echo "${ECHO_T}yes" >&6
13995
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013996else
Martin v. Löwis11437992002-04-12 09:54:03 +000013997 echo "$as_me: failed program was:" >&5
13998cat conftest.$ac_ext >&5
13999
14000 echo "$as_me:$LINENO: result: no" >&5
14001echo "${ECHO_T}no" >&6
14002
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014003fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014004rm -f conftest.$ac_objext conftest.$ac_ext
14005
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014006fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014007rm -f conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014011 CFLAGS=$OLD_CFLAGS
14012
14013else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014014
Martin v. Löwis11437992002-04-12 09:54:03 +000014015
14016for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014017do
Martin v. Löwis11437992002-04-12 09:54:03 +000014018as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14019echo "$as_me:$LINENO: checking for $ac_func" >&5
14020echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14021if eval "test \"\${$as_ac_var+set}\" = set"; then
14022 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014023else
Martin v. Löwis11437992002-04-12 09:54:03 +000014024 cat >conftest.$ac_ext <<_ACEOF
14025#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014026#include "confdefs.h"
14027/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014028 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014029#include <assert.h>
14030/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014031#ifdef __cplusplus
14032extern "C"
14033#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014034/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014035 builtin and then its argument prototype would still apply. */
14036char $ac_func ();
14037char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014038
Martin v. Löwis11437992002-04-12 09:54:03 +000014039#ifdef F77_DUMMY_MAIN
14040# ifdef __cplusplus
14041 extern "C"
14042# endif
14043 int F77_DUMMY_MAIN() { return 1; }
14044#endif
14045int
14046main ()
14047{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014048/* The GNU C library defines this for functions which it implements
14049 to always fail with ENOSYS. Some functions are actually named
14050 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014051#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014052choke me
14053#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014054f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014055#endif
14056
Martin v. Löwis11437992002-04-12 09:54:03 +000014057 ;
14058 return 0;
14059}
14060_ACEOF
14061rm -f conftest.$ac_objext conftest$ac_exeext
14062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14063 (eval $ac_link) 2>&5
14064 ac_status=$?
14065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14066 (exit $ac_status); } &&
14067 { ac_try='test -s conftest$ac_exeext'
14068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14069 (eval $ac_try) 2>&5
14070 ac_status=$?
14071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14072 (exit $ac_status); }; }; then
14073 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014074else
Martin v. Löwis11437992002-04-12 09:54:03 +000014075 echo "$as_me: failed program was:" >&5
14076cat conftest.$ac_ext >&5
14077eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014078fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014079rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014081echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14082echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14083if test `eval echo '${'$as_ac_var'}'` = yes; then
14084 cat >>confdefs.h <<_ACEOF
14085#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14086_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014087
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014088fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014089done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014090
Michael W. Hudson54241132001-12-07 15:38:26 +000014091
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014092fi
14093
Michael W. Hudson54241132001-12-07 15:38:26 +000014094
14095
14096
14097
14098
14099
Guido van Rossum627b2d71993-12-24 10:39:16 +000014100# checks for system services
14101# (none yet)
14102
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014103# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014104echo "$as_me:$LINENO: checking for __fpu_control" >&5
14105echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14106if test "${ac_cv_func___fpu_control+set}" = set; then
14107 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014108else
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 cat >conftest.$ac_ext <<_ACEOF
14110#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014111#include "confdefs.h"
14112/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014114#include <assert.h>
14115/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014116#ifdef __cplusplus
14117extern "C"
14118#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014119/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 builtin and then its argument prototype would still apply. */
14121char __fpu_control ();
14122char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014123
Martin v. Löwis11437992002-04-12 09:54:03 +000014124#ifdef F77_DUMMY_MAIN
14125# ifdef __cplusplus
14126 extern "C"
14127# endif
14128 int F77_DUMMY_MAIN() { return 1; }
14129#endif
14130int
14131main ()
14132{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014133/* The GNU C library defines this for functions which it implements
14134 to always fail with ENOSYS. Some functions are actually named
14135 something starting with __ and the normal name is an alias. */
14136#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14137choke me
14138#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014139f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014140#endif
14141
Martin v. Löwis11437992002-04-12 09:54:03 +000014142 ;
14143 return 0;
14144}
14145_ACEOF
14146rm -f conftest.$ac_objext conftest$ac_exeext
14147if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14148 (eval $ac_link) 2>&5
14149 ac_status=$?
14150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14151 (exit $ac_status); } &&
14152 { ac_try='test -s conftest$ac_exeext'
14153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14154 (eval $ac_try) 2>&5
14155 ac_status=$?
14156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14157 (exit $ac_status); }; }; then
14158 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014159else
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 echo "$as_me: failed program was:" >&5
14161cat conftest.$ac_ext >&5
14162ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014164rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014166echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14167echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14168if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014169 :
14170else
Martin v. Löwis11437992002-04-12 09:54:03 +000014171
14172echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14173echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14174if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14175 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014176else
Martin v. Löwis11437992002-04-12 09:54:03 +000014177 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014178LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014179cat >conftest.$ac_ext <<_ACEOF
14180#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014181#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014182
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014183/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014184#ifdef __cplusplus
14185extern "C"
14186#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014187/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014188 builtin and then its argument prototype would still apply. */
14189char __fpu_control ();
14190#ifdef F77_DUMMY_MAIN
14191# ifdef __cplusplus
14192 extern "C"
14193# endif
14194 int F77_DUMMY_MAIN() { return 1; }
14195#endif
14196int
14197main ()
14198{
14199__fpu_control ();
14200 ;
14201 return 0;
14202}
14203_ACEOF
14204rm -f conftest.$ac_objext conftest$ac_exeext
14205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14206 (eval $ac_link) 2>&5
14207 ac_status=$?
14208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209 (exit $ac_status); } &&
14210 { ac_try='test -s conftest$ac_exeext'
14211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14212 (eval $ac_try) 2>&5
14213 ac_status=$?
14214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14215 (exit $ac_status); }; }; then
14216 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014217else
Martin v. Löwis11437992002-04-12 09:54:03 +000014218 echo "$as_me: failed program was:" >&5
14219cat conftest.$ac_ext >&5
14220ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014222rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14223LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014224fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014225echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14226echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14227if test $ac_cv_lib_ieee___fpu_control = yes; then
14228 cat >>confdefs.h <<_ACEOF
14229#define HAVE_LIBIEEE 1
14230_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014231
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014232 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014233
Guido van Rossum627b2d71993-12-24 10:39:16 +000014234fi
14235
Michael W. Hudson54241132001-12-07 15:38:26 +000014236
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014237fi
14238
Michael W. Hudson54241132001-12-07 15:38:26 +000014239
Guido van Rossum7f253911997-05-09 02:42:48 +000014240# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014241echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14242echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14243
Guido van Rossum7f253911997-05-09 02:42:48 +000014244# Check whether --with-fpectl or --without-fpectl was given.
14245if test "${with_fpectl+set}" = set; then
14246 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014247
Guido van Rossum7f253911997-05-09 02:42:48 +000014248if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014249then
14250
14251cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014252#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014253_ACEOF
14254
14255 echo "$as_me:$LINENO: result: yes" >&5
14256echo "${ECHO_T}yes" >&6
14257else echo "$as_me:$LINENO: result: no" >&5
14258echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014259fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014260else
Martin v. Löwis11437992002-04-12 09:54:03 +000014261 echo "$as_me:$LINENO: result: no" >&5
14262echo "${ECHO_T}no" >&6
14263fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014264
Guido van Rossum7f43da71994-08-01 12:15:30 +000014265# check for --with-libm=...
14266
Guido van Rossum563e7081996-09-10 18:20:48 +000014267case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014268Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014269BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014270*) LIBM=-lm
14271esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014272echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14273echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14274
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014275# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014276if test "${with_libm+set}" = set; then
14277 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014278
Guido van Rossum7f253911997-05-09 02:42:48 +000014279if test "$withval" = no
14280then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014281 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14282echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014283elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014284then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14286echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14287else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14288echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14289 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014290fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014291else
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14293echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14294fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014295
14296# check for --with-libc=...
14297
Martin v. Löwis11437992002-04-12 09:54:03 +000014298echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14299echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14300
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014301# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014302if test "${with_libc+set}" = set; then
14303 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
Guido van Rossum7f253911997-05-09 02:42:48 +000014305if test "$withval" = no
14306then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014307 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14308echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014309elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014310then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014311 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14312echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14313else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14314echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14315 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014316fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014317else
Martin v. Löwis11437992002-04-12 09:54:03 +000014318 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14319echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14320fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014321
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014322# check for hypot() in math library
14323LIBS_SAVE=$LIBS
14324LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014325
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014326for ac_func in hypot
14327do
Martin v. Löwis11437992002-04-12 09:54:03 +000014328as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14329echo "$as_me:$LINENO: checking for $ac_func" >&5
14330echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14331if eval "test \"\${$as_ac_var+set}\" = set"; then
14332 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014333else
Martin v. Löwis11437992002-04-12 09:54:03 +000014334 cat >conftest.$ac_ext <<_ACEOF
14335#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014336#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014337/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014339#include <assert.h>
14340/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014341#ifdef __cplusplus
14342extern "C"
14343#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014344/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014345 builtin and then its argument prototype would still apply. */
14346char $ac_func ();
14347char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014348
Martin v. Löwis11437992002-04-12 09:54:03 +000014349#ifdef F77_DUMMY_MAIN
14350# ifdef __cplusplus
14351 extern "C"
14352# endif
14353 int F77_DUMMY_MAIN() { return 1; }
14354#endif
14355int
14356main ()
14357{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014358/* The GNU C library defines this for functions which it implements
14359 to always fail with ENOSYS. Some functions are actually named
14360 something starting with __ and the normal name is an alias. */
14361#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14362choke me
14363#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014364f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014365#endif
14366
Martin v. Löwis11437992002-04-12 09:54:03 +000014367 ;
14368 return 0;
14369}
14370_ACEOF
14371rm -f conftest.$ac_objext conftest$ac_exeext
14372if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14373 (eval $ac_link) 2>&5
14374 ac_status=$?
14375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14376 (exit $ac_status); } &&
14377 { ac_try='test -s conftest$ac_exeext'
14378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14379 (eval $ac_try) 2>&5
14380 ac_status=$?
14381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14382 (exit $ac_status); }; }; then
14383 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014384else
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 echo "$as_me: failed program was:" >&5
14386cat conftest.$ac_ext >&5
14387eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014388fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014389rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014390fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014391echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14392echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14393if test `eval echo '${'$as_ac_var'}'` = yes; then
14394 cat >>confdefs.h <<_ACEOF
14395#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14396_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014397
Michael W. Hudson54241132001-12-07 15:38:26 +000014398else
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014400fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014401done
14402
Michael W. Hudson54241132001-12-07 15:38:26 +000014403
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014404LIBS=$LIBS_SAVE
14405
Guido van Rossumad713701997-07-10 22:42:38 +000014406# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014407echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14408echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14409if test "${ac_cv_malloc_zero+set}" = set; then
14410 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014411else
14412 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014413 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014414else
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 cat >conftest.$ac_ext <<_ACEOF
14416#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014417#include "confdefs.h"
14418#include <stdio.h>
14419#ifdef HAVE_STDLIB
14420#include <stdlib.h>
14421#else
14422char *malloc(), *realloc();
14423int *free();
14424#endif
14425main() {
14426 char *p;
14427 p = malloc(0);
14428 if (p == NULL) exit(1);
14429 p = realloc(p, 0);
14430 if (p == NULL) exit(1);
14431 free(p);
14432 exit(0);
14433}
Martin v. Löwis11437992002-04-12 09:54:03 +000014434_ACEOF
14435rm -f conftest$ac_exeext
14436if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14437 (eval $ac_link) 2>&5
14438 ac_status=$?
14439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14440 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14442 (eval $ac_try) 2>&5
14443 ac_status=$?
14444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14445 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014446 ac_cv_malloc_zero=nonnull
14447else
Martin v. Löwis11437992002-04-12 09:54:03 +000014448 echo "$as_me: program exited with status $ac_status" >&5
14449echo "$as_me: failed program was:" >&5
14450cat conftest.$ac_ext >&5
14451( exit $ac_status )
14452ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014454rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014455fi
Guido van Rossumad713701997-07-10 22:42:38 +000014456fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014457 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014458echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14459echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014460if test "$ac_cv_malloc_zero" = null
14461then
Martin v. Löwis11437992002-04-12 09:54:03 +000014462
14463cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014464#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014465_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014466
14467fi
14468
Guido van Rossumef2255b2000-03-10 22:30:29 +000014469# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014470if test "${ac_cv_header_wchar_h+set}" = set; then
14471 echo "$as_me:$LINENO: checking for wchar.h" >&5
14472echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14473if test "${ac_cv_header_wchar_h+set}" = set; then
14474 echo $ECHO_N "(cached) $ECHO_C" >&6
14475fi
14476echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14477echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014478else
Martin v. Löwis11437992002-04-12 09:54:03 +000014479 # Is the header compilable?
14480echo "$as_me:$LINENO: checking wchar.h usability" >&5
14481echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14482cat >conftest.$ac_ext <<_ACEOF
14483#line $LINENO "configure"
14484#include "confdefs.h"
14485$ac_includes_default
14486#include <wchar.h>
14487_ACEOF
14488rm -f conftest.$ac_objext
14489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14490 (eval $ac_compile) 2>&5
14491 ac_status=$?
14492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14493 (exit $ac_status); } &&
14494 { ac_try='test -s conftest.$ac_objext'
14495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14496 (eval $ac_try) 2>&5
14497 ac_status=$?
14498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14499 (exit $ac_status); }; }; then
14500 ac_header_compiler=yes
14501else
14502 echo "$as_me: failed program was:" >&5
14503cat conftest.$ac_ext >&5
14504ac_header_compiler=no
14505fi
14506rm -f conftest.$ac_objext conftest.$ac_ext
14507echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14508echo "${ECHO_T}$ac_header_compiler" >&6
14509
14510# Is the header present?
14511echo "$as_me:$LINENO: checking wchar.h presence" >&5
14512echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14513cat >conftest.$ac_ext <<_ACEOF
14514#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014515#include "confdefs.h"
14516#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014517_ACEOF
14518if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14519 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14520 ac_status=$?
14521 egrep -v '^ *\+' conftest.er1 >conftest.err
14522 rm -f conftest.er1
14523 cat conftest.err >&5
14524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14525 (exit $ac_status); } >/dev/null; then
14526 if test -s conftest.err; then
14527 ac_cpp_err=$ac_c_preproc_warn_flag
14528 else
14529 ac_cpp_err=
14530 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014531else
Martin v. Löwis11437992002-04-12 09:54:03 +000014532 ac_cpp_err=yes
14533fi
14534if test -z "$ac_cpp_err"; then
14535 ac_header_preproc=yes
14536else
14537 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014538 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014539 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014540fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014541rm -f conftest.err conftest.$ac_ext
14542echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14543echo "${ECHO_T}$ac_header_preproc" >&6
14544
14545# So? What about this header?
14546case $ac_header_compiler:$ac_header_preproc in
14547 yes:no )
14548 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14549echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14550 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14551echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14552 no:yes )
14553 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14554echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14555 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14556echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14557 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14558echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14559esac
14560echo "$as_me:$LINENO: checking for wchar.h" >&5
14561echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14562if test "${ac_cv_header_wchar_h+set}" = set; then
14563 echo $ECHO_N "(cached) $ECHO_C" >&6
14564else
14565 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014567echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14568echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14569
14570fi
14571if test $ac_cv_header_wchar_h = yes; then
14572
14573
14574cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014575#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014576_ACEOF
14577
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014578 wchar_h="yes"
14579
Guido van Rossumef2255b2000-03-10 22:30:29 +000014580else
Martin v. Löwis11437992002-04-12 09:54:03 +000014581 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014582
14583fi
14584
Michael W. Hudson54241132001-12-07 15:38:26 +000014585
Martin v. Löwis11437992002-04-12 09:54:03 +000014586
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014587# determine wchar_t size
14588if test "$wchar_h" = yes
14589then
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 echo "$as_me:$LINENO: checking for wchar_t" >&5
14591echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14592if test "${ac_cv_type_wchar_t+set}" = set; then
14593 echo $ECHO_N "(cached) $ECHO_C" >&6
14594else
14595 cat >conftest.$ac_ext <<_ACEOF
14596#line $LINENO "configure"
14597#include "confdefs.h"
14598#include <wchar.h>
14599
14600#ifdef F77_DUMMY_MAIN
14601# ifdef __cplusplus
14602 extern "C"
14603# endif
14604 int F77_DUMMY_MAIN() { return 1; }
14605#endif
14606int
14607main ()
14608{
14609if ((wchar_t *) 0)
14610 return 0;
14611if (sizeof (wchar_t))
14612 return 0;
14613 ;
14614 return 0;
14615}
14616_ACEOF
14617rm -f conftest.$ac_objext
14618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14619 (eval $ac_compile) 2>&5
14620 ac_status=$?
14621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14622 (exit $ac_status); } &&
14623 { ac_try='test -s conftest.$ac_objext'
14624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14625 (eval $ac_try) 2>&5
14626 ac_status=$?
14627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14628 (exit $ac_status); }; }; then
14629 ac_cv_type_wchar_t=yes
14630else
14631 echo "$as_me: failed program was:" >&5
14632cat conftest.$ac_ext >&5
14633ac_cv_type_wchar_t=no
14634fi
14635rm -f conftest.$ac_objext conftest.$ac_ext
14636fi
14637echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14638echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14639
14640echo "$as_me:$LINENO: checking size of wchar_t" >&5
14641echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14642if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14643 echo $ECHO_N "(cached) $ECHO_C" >&6
14644else
14645 if test "$ac_cv_type_wchar_t" = yes; then
14646 # The cast to unsigned long works around a bug in the HP C Compiler
14647 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14648 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14649 # This bug is HP SR number 8606223364.
14650 if test "$cross_compiling" = yes; then
14651 # Depending upon the size, compute the lo and hi bounds.
14652cat >conftest.$ac_ext <<_ACEOF
14653#line $LINENO "configure"
14654#include "confdefs.h"
14655#include <wchar.h>
14656
14657#ifdef F77_DUMMY_MAIN
14658# ifdef __cplusplus
14659 extern "C"
14660# endif
14661 int F77_DUMMY_MAIN() { return 1; }
14662#endif
14663int
14664main ()
14665{
14666static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14667test_array [0] = 0
14668
14669 ;
14670 return 0;
14671}
14672_ACEOF
14673rm -f conftest.$ac_objext
14674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14675 (eval $ac_compile) 2>&5
14676 ac_status=$?
14677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14678 (exit $ac_status); } &&
14679 { ac_try='test -s conftest.$ac_objext'
14680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14681 (eval $ac_try) 2>&5
14682 ac_status=$?
14683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14684 (exit $ac_status); }; }; then
14685 ac_lo=0 ac_mid=0
14686 while :; do
14687 cat >conftest.$ac_ext <<_ACEOF
14688#line $LINENO "configure"
14689#include "confdefs.h"
14690#include <wchar.h>
14691
14692#ifdef F77_DUMMY_MAIN
14693# ifdef __cplusplus
14694 extern "C"
14695# endif
14696 int F77_DUMMY_MAIN() { return 1; }
14697#endif
14698int
14699main ()
14700{
14701static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14702test_array [0] = 0
14703
14704 ;
14705 return 0;
14706}
14707_ACEOF
14708rm -f conftest.$ac_objext
14709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14710 (eval $ac_compile) 2>&5
14711 ac_status=$?
14712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14713 (exit $ac_status); } &&
14714 { ac_try='test -s conftest.$ac_objext'
14715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14716 (eval $ac_try) 2>&5
14717 ac_status=$?
14718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14719 (exit $ac_status); }; }; then
14720 ac_hi=$ac_mid; break
14721else
14722 echo "$as_me: failed program was:" >&5
14723cat conftest.$ac_ext >&5
14724ac_lo=`expr $ac_mid + 1`
14725 if test $ac_lo -le $ac_mid; then
14726 ac_lo= ac_hi=
14727 break
14728 fi
14729 ac_mid=`expr 2 '*' $ac_mid + 1`
14730fi
14731rm -f conftest.$ac_objext conftest.$ac_ext
14732 done
14733else
14734 echo "$as_me: failed program was:" >&5
14735cat conftest.$ac_ext >&5
14736cat >conftest.$ac_ext <<_ACEOF
14737#line $LINENO "configure"
14738#include "confdefs.h"
14739#include <wchar.h>
14740
14741#ifdef F77_DUMMY_MAIN
14742# ifdef __cplusplus
14743 extern "C"
14744# endif
14745 int F77_DUMMY_MAIN() { return 1; }
14746#endif
14747int
14748main ()
14749{
14750static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14751test_array [0] = 0
14752
14753 ;
14754 return 0;
14755}
14756_ACEOF
14757rm -f conftest.$ac_objext
14758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14759 (eval $ac_compile) 2>&5
14760 ac_status=$?
14761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14762 (exit $ac_status); } &&
14763 { ac_try='test -s conftest.$ac_objext'
14764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14765 (eval $ac_try) 2>&5
14766 ac_status=$?
14767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14768 (exit $ac_status); }; }; then
14769 ac_hi=-1 ac_mid=-1
14770 while :; do
14771 cat >conftest.$ac_ext <<_ACEOF
14772#line $LINENO "configure"
14773#include "confdefs.h"
14774#include <wchar.h>
14775
14776#ifdef F77_DUMMY_MAIN
14777# ifdef __cplusplus
14778 extern "C"
14779# endif
14780 int F77_DUMMY_MAIN() { return 1; }
14781#endif
14782int
14783main ()
14784{
14785static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14786test_array [0] = 0
14787
14788 ;
14789 return 0;
14790}
14791_ACEOF
14792rm -f conftest.$ac_objext
14793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14794 (eval $ac_compile) 2>&5
14795 ac_status=$?
14796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14797 (exit $ac_status); } &&
14798 { ac_try='test -s conftest.$ac_objext'
14799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14800 (eval $ac_try) 2>&5
14801 ac_status=$?
14802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14803 (exit $ac_status); }; }; then
14804 ac_lo=$ac_mid; break
14805else
14806 echo "$as_me: failed program was:" >&5
14807cat conftest.$ac_ext >&5
14808ac_hi=`expr '(' $ac_mid ')' - 1`
14809 if test $ac_mid -le $ac_hi; then
14810 ac_lo= ac_hi=
14811 break
14812 fi
14813 ac_mid=`expr 2 '*' $ac_mid`
14814fi
14815rm -f conftest.$ac_objext conftest.$ac_ext
14816 done
14817else
14818 echo "$as_me: failed program was:" >&5
14819cat conftest.$ac_ext >&5
14820ac_lo= ac_hi=
14821fi
14822rm -f conftest.$ac_objext conftest.$ac_ext
14823fi
14824rm -f conftest.$ac_objext conftest.$ac_ext
14825# Binary search between lo and hi bounds.
14826while test "x$ac_lo" != "x$ac_hi"; do
14827 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14828 cat >conftest.$ac_ext <<_ACEOF
14829#line $LINENO "configure"
14830#include "confdefs.h"
14831#include <wchar.h>
14832
14833#ifdef F77_DUMMY_MAIN
14834# ifdef __cplusplus
14835 extern "C"
14836# endif
14837 int F77_DUMMY_MAIN() { return 1; }
14838#endif
14839int
14840main ()
14841{
14842static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14843test_array [0] = 0
14844
14845 ;
14846 return 0;
14847}
14848_ACEOF
14849rm -f conftest.$ac_objext
14850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14851 (eval $ac_compile) 2>&5
14852 ac_status=$?
14853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14854 (exit $ac_status); } &&
14855 { ac_try='test -s conftest.$ac_objext'
14856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14857 (eval $ac_try) 2>&5
14858 ac_status=$?
14859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14860 (exit $ac_status); }; }; then
14861 ac_hi=$ac_mid
14862else
14863 echo "$as_me: failed program was:" >&5
14864cat conftest.$ac_ext >&5
14865ac_lo=`expr '(' $ac_mid ')' + 1`
14866fi
14867rm -f conftest.$ac_objext conftest.$ac_ext
14868done
14869case $ac_lo in
14870?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14871'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14872echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14873 { (exit 1); exit 1; }; } ;;
14874esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014875else
14876 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014877 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14878echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14879 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014880else
Martin v. Löwis11437992002-04-12 09:54:03 +000014881 cat >conftest.$ac_ext <<_ACEOF
14882#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014883#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014884#include <wchar.h>
14885
14886long longval () { return (long) (sizeof (wchar_t)); }
14887unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014888#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014889#include <stdlib.h>
14890#ifdef F77_DUMMY_MAIN
14891# ifdef __cplusplus
14892 extern "C"
14893# endif
14894 int F77_DUMMY_MAIN() { return 1; }
14895#endif
14896int
14897main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014898{
Martin v. Löwis11437992002-04-12 09:54:03 +000014899
14900 FILE *f = fopen ("conftest.val", "w");
14901 if (! f)
14902 exit (1);
14903 if (((long) (sizeof (wchar_t))) < 0)
14904 {
14905 long i = longval ();
14906 if (i != ((long) (sizeof (wchar_t))))
14907 exit (1);
14908 fprintf (f, "%ld\n", i);
14909 }
14910 else
14911 {
14912 unsigned long i = ulongval ();
14913 if (i != ((long) (sizeof (wchar_t))))
14914 exit (1);
14915 fprintf (f, "%lu\n", i);
14916 }
14917 exit (ferror (f) || fclose (f) != 0);
14918
14919 ;
14920 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014921}
Martin v. Löwis11437992002-04-12 09:54:03 +000014922_ACEOF
14923rm -f conftest$ac_exeext
14924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14925 (eval $ac_link) 2>&5
14926 ac_status=$?
14927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14928 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14930 (eval $ac_try) 2>&5
14931 ac_status=$?
14932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14933 (exit $ac_status); }; }; then
14934 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014935else
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 echo "$as_me: program exited with status $ac_status" >&5
14937echo "$as_me: failed program was:" >&5
14938cat conftest.$ac_ext >&5
14939( exit $ac_status )
14940{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14941echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14942 { (exit 1); exit 1; }; }
14943fi
14944rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14945fi
14946fi
14947rm -f conftest.val
14948else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014949 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000014950fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014951fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014952echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
14953echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
14954cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014955#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014956_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014957
Michael W. Hudson54241132001-12-07 15:38:26 +000014958
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014959fi
14960
Martin v. Löwis11437992002-04-12 09:54:03 +000014961echo "$as_me:$LINENO: checking what type to use for unicode" >&5
14962echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014963# Check whether --enable-unicode or --disable-unicode was given.
14964if test "${enable_unicode+set}" = set; then
14965 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000014966
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014967else
14968 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014969fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014970
14971if test $enable_unicode = yes
14972then
Martin v. Löwisfd917792001-06-27 20:22:04 +000014973 # Without any arguments, Py_UNICODE defaults to two-byte mode
14974 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014975fi
14976
Martin v. Löwis0036cba2002-04-12 09:58:45 +000014977
14978
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014979case "$enable_unicode" in
14980ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000014981 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014982#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000014983_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014984
14985 ;;
14986ucs4) unicode_size="4"
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 4
Martin v. Löwis11437992002-04-12 09:54:03 +000014989_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014990
14991 ;;
14992esac
14993
Michael W. Hudson54241132001-12-07 15:38:26 +000014994
Martin v. Löwis11437992002-04-12 09:54:03 +000014995
14996
Martin v. Löwis0036cba2002-04-12 09:58:45 +000014997
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014998if test "$enable_unicode" = "no"
14999then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015000 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015001 echo "$as_me:$LINENO: result: not used" >&5
15002echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015003else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015004 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015005
15006cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015007#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015008_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015009
15010 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15011 then
15012 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015013
Martin v. Löwis11437992002-04-12 09:54:03 +000015014cat >>confdefs.h <<\_ACEOF
15015#define HAVE_USABLE_WCHAR_T 1
15016_ACEOF
15017
15018 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015019#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015020_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015021
15022 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15023 then
15024 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015025 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015026#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015027_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015028
15029 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15030 then
15031 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015033#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015034_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015035
15036 else
15037 PY_UNICODE_TYPE="no type found"
15038 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15040echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015041fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015042
15043# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015044echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15045echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15046if test "${ac_cv_c_bigendian+set}" = set; then
15047 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015048else
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 # See if sys/param.h defines the BYTE_ORDER macro.
15050cat >conftest.$ac_ext <<_ACEOF
15051#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015052#include "confdefs.h"
15053#include <sys/types.h>
15054#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015055
Martin v. Löwis11437992002-04-12 09:54:03 +000015056#ifdef F77_DUMMY_MAIN
15057# ifdef __cplusplus
15058 extern "C"
15059# endif
15060 int F77_DUMMY_MAIN() { return 1; }
15061#endif
15062int
15063main ()
15064{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015065#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15066 bogus endian macros
15067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015068
15069 ;
15070 return 0;
15071}
15072_ACEOF
15073rm -f conftest.$ac_objext
15074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15075 (eval $ac_compile) 2>&5
15076 ac_status=$?
15077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15078 (exit $ac_status); } &&
15079 { ac_try='test -s conftest.$ac_objext'
15080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15081 (eval $ac_try) 2>&5
15082 ac_status=$?
15083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15084 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015085 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015086cat >conftest.$ac_ext <<_ACEOF
15087#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015088#include "confdefs.h"
15089#include <sys/types.h>
15090#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015091
Martin v. Löwis11437992002-04-12 09:54:03 +000015092#ifdef F77_DUMMY_MAIN
15093# ifdef __cplusplus
15094 extern "C"
15095# endif
15096 int F77_DUMMY_MAIN() { return 1; }
15097#endif
15098int
15099main ()
15100{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015101#if BYTE_ORDER != BIG_ENDIAN
15102 not big endian
15103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015104
15105 ;
15106 return 0;
15107}
15108_ACEOF
15109rm -f conftest.$ac_objext
15110if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15111 (eval $ac_compile) 2>&5
15112 ac_status=$?
15113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15114 (exit $ac_status); } &&
15115 { ac_try='test -s conftest.$ac_objext'
15116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15117 (eval $ac_try) 2>&5
15118 ac_status=$?
15119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15120 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015121 ac_cv_c_bigendian=yes
15122else
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 echo "$as_me: failed program was:" >&5
15124cat conftest.$ac_ext >&5
15125ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015127rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015128else
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 echo "$as_me: failed program was:" >&5
15130cat conftest.$ac_ext >&5
15131# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015132if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 # try to guess the endianess by grep'ing values into an object file
15134 ac_cv_c_bigendian=unknown
15135 cat >conftest.$ac_ext <<_ACEOF
15136#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015137#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015138short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15139short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15140void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15141short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15142short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15143void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15144#ifdef F77_DUMMY_MAIN
15145# ifdef __cplusplus
15146 extern "C"
15147# endif
15148 int F77_DUMMY_MAIN() { return 1; }
15149#endif
15150int
15151main ()
15152{
15153 _ascii (); _ebcdic ();
15154 ;
15155 return 0;
15156}
15157_ACEOF
15158rm -f conftest.$ac_objext
15159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15160 (eval $ac_compile) 2>&5
15161 ac_status=$?
15162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15163 (exit $ac_status); } &&
15164 { ac_try='test -s conftest.$ac_objext'
15165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15166 (eval $ac_try) 2>&5
15167 ac_status=$?
15168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15169 (exit $ac_status); }; }; then
15170 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15171 ac_cv_c_bigendian=yes
15172fi
15173if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15174 if test "$ac_cv_c_bigendian" = unknown; then
15175 ac_cv_c_bigendian=no
15176 else
15177 # finding both strings is unlikely to happen, but who knows?
15178 ac_cv_c_bigendian=unknown
15179 fi
15180fi
15181else
15182 echo "$as_me: failed program was:" >&5
15183cat conftest.$ac_ext >&5
15184fi
15185rm -f conftest.$ac_objext conftest.$ac_ext
15186else
15187 cat >conftest.$ac_ext <<_ACEOF
15188#line $LINENO "configure"
15189#include "confdefs.h"
15190int
15191main ()
15192{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015193 /* Are we little or big endian? From Harbison&Steele. */
15194 union
15195 {
15196 long l;
15197 char c[sizeof (long)];
15198 } u;
15199 u.l = 1;
15200 exit (u.c[sizeof (long) - 1] == 1);
15201}
Martin v. Löwis11437992002-04-12 09:54:03 +000015202_ACEOF
15203rm -f conftest$ac_exeext
15204if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15205 (eval $ac_link) 2>&5
15206 ac_status=$?
15207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15208 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15210 (eval $ac_try) 2>&5
15211 ac_status=$?
15212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15213 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015214 ac_cv_c_bigendian=no
15215else
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 echo "$as_me: program exited with status $ac_status" >&5
15217echo "$as_me: failed program was:" >&5
15218cat conftest.$ac_ext >&5
15219( exit $ac_status )
15220ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015222rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015223fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015224fi
15225rm -f conftest.$ac_objext conftest.$ac_ext
15226fi
15227echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15228echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15229case $ac_cv_c_bigendian in
15230 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015231
Martin v. Löwis11437992002-04-12 09:54:03 +000015232cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015233#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015234_ACEOF
15235 ;;
15236 no)
15237 ;;
15238 *)
15239 { { echo "$as_me:$LINENO: error: unknown endianess
15240presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15241echo "$as_me: error: unknown endianess
15242presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15243 { (exit 1); exit 1; }; } ;;
15244esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015245
Michael W. Hudson54241132001-12-07 15:38:26 +000015246
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015247# Check whether right shifting a negative integer extends the sign bit
15248# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015249echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15250echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15251if test "${ac_cv_rshift_extends_sign+set}" = set; then
15252 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015253else
Martin v. Löwis11437992002-04-12 09:54:03 +000015254
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015255if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015256 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015257else
Martin v. Löwis11437992002-04-12 09:54:03 +000015258 cat >conftest.$ac_ext <<_ACEOF
15259#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015260#include "confdefs.h"
15261
15262int main()
15263{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015264 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015265}
15266
Martin v. Löwis11437992002-04-12 09:54:03 +000015267_ACEOF
15268rm -f conftest$ac_exeext
15269if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15270 (eval $ac_link) 2>&5
15271 ac_status=$?
15272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15273 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15275 (eval $ac_try) 2>&5
15276 ac_status=$?
15277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15278 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015279 ac_cv_rshift_extends_sign=yes
15280else
Martin v. Löwis11437992002-04-12 09:54:03 +000015281 echo "$as_me: program exited with status $ac_status" >&5
15282echo "$as_me: failed program was:" >&5
15283cat conftest.$ac_ext >&5
15284( exit $ac_status )
15285ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015286fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015287rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15288fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015289fi
15290
Martin v. Löwis11437992002-04-12 09:54:03 +000015291echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15292echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015293if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015294then
Martin v. Löwis11437992002-04-12 09:54:03 +000015295
15296cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015297#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015298_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015299
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015300fi
15301
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015302# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015303echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15304echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15305if test "${ac_cv_have_getc_unlocked+set}" = set; then
15306 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015307else
Martin v. Löwis11437992002-04-12 09:54:03 +000015308
15309cat >conftest.$ac_ext <<_ACEOF
15310#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015311#include "confdefs.h"
15312#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015313#ifdef F77_DUMMY_MAIN
15314# ifdef __cplusplus
15315 extern "C"
15316# endif
15317 int F77_DUMMY_MAIN() { return 1; }
15318#endif
15319int
15320main ()
15321{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015322
15323 FILE *f = fopen("/dev/null", "r");
15324 flockfile(f);
15325 getc_unlocked(f);
15326 funlockfile(f);
15327
Martin v. Löwis11437992002-04-12 09:54:03 +000015328 ;
15329 return 0;
15330}
15331_ACEOF
15332rm -f conftest.$ac_objext conftest$ac_exeext
15333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15334 (eval $ac_link) 2>&5
15335 ac_status=$?
15336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15337 (exit $ac_status); } &&
15338 { ac_try='test -s conftest$ac_exeext'
15339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15340 (eval $ac_try) 2>&5
15341 ac_status=$?
15342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15343 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015344 ac_cv_have_getc_unlocked=yes
15345else
Martin v. Löwis11437992002-04-12 09:54:03 +000015346 echo "$as_me: failed program was:" >&5
15347cat conftest.$ac_ext >&5
15348ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015349fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015350rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015351fi
15352
Martin v. Löwis11437992002-04-12 09:54:03 +000015353echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15354echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015355if test "$ac_cv_have_getc_unlocked" = yes
15356then
Martin v. Löwis11437992002-04-12 09:54:03 +000015357
15358cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015359#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015360_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015361
15362fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015363
Martin v. Löwis0daad592001-09-30 21:09:59 +000015364# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015365echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15366echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15367if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15368 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015369else
Martin v. Löwis11437992002-04-12 09:54:03 +000015370 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015371LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015372cat >conftest.$ac_ext <<_ACEOF
15373#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015374#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015375
Guido van Rossum353ae582001-07-10 16:45:32 +000015376/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015377#ifdef __cplusplus
15378extern "C"
15379#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015380/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 builtin and then its argument prototype would still apply. */
15382char rl_pre_input_hook ();
15383#ifdef F77_DUMMY_MAIN
15384# ifdef __cplusplus
15385 extern "C"
15386# endif
15387 int F77_DUMMY_MAIN() { return 1; }
15388#endif
15389int
15390main ()
15391{
15392rl_pre_input_hook ();
15393 ;
15394 return 0;
15395}
15396_ACEOF
15397rm -f conftest.$ac_objext conftest$ac_exeext
15398if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15399 (eval $ac_link) 2>&5
15400 ac_status=$?
15401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15402 (exit $ac_status); } &&
15403 { ac_try='test -s conftest$ac_exeext'
15404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15405 (eval $ac_try) 2>&5
15406 ac_status=$?
15407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15408 (exit $ac_status); }; }; then
15409 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015410else
Martin v. Löwis11437992002-04-12 09:54:03 +000015411 echo "$as_me: failed program was:" >&5
15412cat conftest.$ac_ext >&5
15413ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15416LIBS=$ac_check_lib_save_LIBS
15417fi
15418echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15419echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15420if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015421
Martin v. Löwis11437992002-04-12 09:54:03 +000015422cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015423#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015424_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015425
Martin v. Löwis0daad592001-09-30 21:09:59 +000015426fi
15427
Michael W. Hudson54241132001-12-07 15:38:26 +000015428
Martin v. Löwis0daad592001-09-30 21:09:59 +000015429# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015430echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15431echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15432if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15433 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015434else
Martin v. Löwis11437992002-04-12 09:54:03 +000015435 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015436LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015437cat >conftest.$ac_ext <<_ACEOF
15438#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015439#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015440
Martin v. Löwis0daad592001-09-30 21:09:59 +000015441/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015442#ifdef __cplusplus
15443extern "C"
15444#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015445/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015446 builtin and then its argument prototype would still apply. */
15447char rl_completion_matches ();
15448#ifdef F77_DUMMY_MAIN
15449# ifdef __cplusplus
15450 extern "C"
15451# endif
15452 int F77_DUMMY_MAIN() { return 1; }
15453#endif
15454int
15455main ()
15456{
15457rl_completion_matches ();
15458 ;
15459 return 0;
15460}
15461_ACEOF
15462rm -f conftest.$ac_objext conftest$ac_exeext
15463if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15464 (eval $ac_link) 2>&5
15465 ac_status=$?
15466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15467 (exit $ac_status); } &&
15468 { ac_try='test -s conftest$ac_exeext'
15469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15470 (eval $ac_try) 2>&5
15471 ac_status=$?
15472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15473 (exit $ac_status); }; }; then
15474 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015475else
Martin v. Löwis11437992002-04-12 09:54:03 +000015476 echo "$as_me: failed program was:" >&5
15477cat conftest.$ac_ext >&5
15478ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015479fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015480rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15481LIBS=$ac_check_lib_save_LIBS
15482fi
15483echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15484echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15485if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015486
Martin v. Löwis11437992002-04-12 09:54:03 +000015487cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015488#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015489_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015490
Guido van Rossum353ae582001-07-10 16:45:32 +000015491fi
15492
Jack Jansendd19cf82001-12-06 22:36:17 +000015493
Martin v. Löwis11437992002-04-12 09:54:03 +000015494echo "$as_me:$LINENO: checking for broken nice()" >&5
15495echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15496if test "${ac_cv_broken_nice+set}" = set; then
15497 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015498else
Martin v. Löwis11437992002-04-12 09:54:03 +000015499
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015500if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015501 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015502else
Martin v. Löwis11437992002-04-12 09:54:03 +000015503 cat >conftest.$ac_ext <<_ACEOF
15504#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015505#include "confdefs.h"
15506
15507int main()
15508{
15509 int val1 = nice(1);
15510 if (val1 != -1 && val1 == nice(2))
15511 exit(0);
15512 exit(1);
15513}
15514
Martin v. Löwis11437992002-04-12 09:54:03 +000015515_ACEOF
15516rm -f conftest$ac_exeext
15517if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15518 (eval $ac_link) 2>&5
15519 ac_status=$?
15520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15521 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15523 (eval $ac_try) 2>&5
15524 ac_status=$?
15525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15526 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015527 ac_cv_broken_nice=yes
15528else
Martin v. Löwis11437992002-04-12 09:54:03 +000015529 echo "$as_me: program exited with status $ac_status" >&5
15530echo "$as_me: failed program was:" >&5
15531cat conftest.$ac_ext >&5
15532( exit $ac_status )
15533ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015534fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015535rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15536fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015537fi
15538
Martin v. Löwis11437992002-04-12 09:54:03 +000015539echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15540echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015541if test "$ac_cv_broken_nice" = yes
15542then
Martin v. Löwis11437992002-04-12 09:54:03 +000015543
15544cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015545#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015546_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015547
15548fi
15549
Jack Jansen666b1e72001-10-31 12:11:48 +000015550# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015551echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15552echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15553if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15554 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015555else
Martin v. Löwis11437992002-04-12 09:54:03 +000015556 cat >conftest.$ac_ext <<_ACEOF
15557#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015558#include "confdefs.h"
15559#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015560#ifdef F77_DUMMY_MAIN
15561# ifdef __cplusplus
15562 extern "C"
15563# endif
15564 int F77_DUMMY_MAIN() { return 1; }
15565#endif
15566int
15567main ()
15568{
Jack Jansen666b1e72001-10-31 12:11:48 +000015569
15570 int rtn;
15571 rtn = mvwdelch(0,0,0);
15572
Martin v. Löwis11437992002-04-12 09:54:03 +000015573 ;
15574 return 0;
15575}
15576_ACEOF
15577rm -f conftest.$ac_objext
15578if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15579 (eval $ac_compile) 2>&5
15580 ac_status=$?
15581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15582 (exit $ac_status); } &&
15583 { ac_try='test -s conftest.$ac_objext'
15584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15585 (eval $ac_try) 2>&5
15586 ac_status=$?
15587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15588 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015589 ac_cv_mvwdelch_is_expression=yes
15590else
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 echo "$as_me: failed program was:" >&5
15592cat conftest.$ac_ext >&5
15593ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015594fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015595rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015596fi
15597
Martin v. Löwis11437992002-04-12 09:54:03 +000015598echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15599echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015600
15601if test "$ac_cv_mvwdelch_is_expression" = yes
15602then
Martin v. Löwis11437992002-04-12 09:54:03 +000015603
15604cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015605#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015606_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015607
15608fi
15609
Martin v. Löwis11437992002-04-12 09:54:03 +000015610echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15611echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15612if test "${ac_cv_window_has_flags+set}" = set; then
15613 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015614else
Martin v. Löwis11437992002-04-12 09:54:03 +000015615 cat >conftest.$ac_ext <<_ACEOF
15616#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015617#include "confdefs.h"
15618#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015619#ifdef F77_DUMMY_MAIN
15620# ifdef __cplusplus
15621 extern "C"
15622# endif
15623 int F77_DUMMY_MAIN() { return 1; }
15624#endif
15625int
15626main ()
15627{
Jack Jansen666b1e72001-10-31 12:11:48 +000015628
15629 WINDOW *w;
15630 w->_flags = 0;
15631
Martin v. Löwis11437992002-04-12 09:54:03 +000015632 ;
15633 return 0;
15634}
15635_ACEOF
15636rm -f conftest.$ac_objext
15637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15638 (eval $ac_compile) 2>&5
15639 ac_status=$?
15640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15641 (exit $ac_status); } &&
15642 { ac_try='test -s conftest.$ac_objext'
15643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15644 (eval $ac_try) 2>&5
15645 ac_status=$?
15646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15647 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015648 ac_cv_window_has_flags=yes
15649else
Martin v. Löwis11437992002-04-12 09:54:03 +000015650 echo "$as_me: failed program was:" >&5
15651cat conftest.$ac_ext >&5
15652ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015653fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015654rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015655fi
15656
Martin v. Löwis11437992002-04-12 09:54:03 +000015657echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15658echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015659
Jack Jansen666b1e72001-10-31 12:11:48 +000015660
15661if test "$ac_cv_window_has_flags" = yes
15662then
Martin v. Löwis11437992002-04-12 09:54:03 +000015663
15664cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015665#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015666_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015667
15668fi
15669
Guido van Rossum95713eb2000-05-18 20:53:31 +000015670# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15671# Add sys/socket.h to confdefs.h
15672cat >> confdefs.h <<\EOF
15673#ifdef HAVE_SYS_SOCKET_H
15674#include <sys/socket.h>
15675#endif
15676EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015677echo "$as_me:$LINENO: checking for socklen_t" >&5
15678echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15679if test "${ac_cv_type_socklen_t+set}" = set; then
15680 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015681else
Martin v. Löwis11437992002-04-12 09:54:03 +000015682 cat >conftest.$ac_ext <<_ACEOF
15683#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015684#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015685$ac_includes_default
15686#ifdef F77_DUMMY_MAIN
15687# ifdef __cplusplus
15688 extern "C"
15689# endif
15690 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015691#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015692int
15693main ()
15694{
15695if ((socklen_t *) 0)
15696 return 0;
15697if (sizeof (socklen_t))
15698 return 0;
15699 ;
15700 return 0;
15701}
15702_ACEOF
15703rm -f conftest.$ac_objext
15704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15705 (eval $ac_compile) 2>&5
15706 ac_status=$?
15707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15708 (exit $ac_status); } &&
15709 { ac_try='test -s conftest.$ac_objext'
15710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15711 (eval $ac_try) 2>&5
15712 ac_status=$?
15713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15714 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015715 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015716else
Martin v. Löwis11437992002-04-12 09:54:03 +000015717 echo "$as_me: failed program was:" >&5
15718cat conftest.$ac_ext >&5
15719ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015720fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015721rm -f conftest.$ac_objext conftest.$ac_ext
15722fi
15723echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15724echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15725if test $ac_cv_type_socklen_t = yes; then
15726 :
15727else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015728
Martin v. Löwis11437992002-04-12 09:54:03 +000015729cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015730#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015731_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015732
15733fi
15734
Michael W. Hudson54241132001-12-07 15:38:26 +000015735
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015736#AC_MSG_CHECKING(for Modules/Setup)
15737#if test ! -f Modules/Setup ; then
15738# if test ! -d Modules ; then
15739# mkdir Modules
15740# fi
15741# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15742# AC_MSG_RESULT(creating)
15743#else
15744# AC_MSG_RESULT(already exists)
15745#fi
15746
Michael W. Hudson54241132001-12-07 15:38:26 +000015747
15748
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015749for h in `(cd $srcdir;echo Python/thread_*.h)`
15750do
15751 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15752done
15753
Michael W. Hudson54241132001-12-07 15:38:26 +000015754
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +000015755SRCDIRS="Parser Grammar Objects Python Modules"
Martin v. Löwis11437992002-04-12 09:54:03 +000015756echo "$as_me:$LINENO: checking for build directories" >&5
15757echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015758for dir in $SRCDIRS; do
15759 if test ! -d $dir; then
15760 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015761 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015762done
Martin v. Löwis11437992002-04-12 09:54:03 +000015763echo "$as_me:$LINENO: result: done" >&5
15764echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015765
Guido van Rossum627b2d71993-12-24 10:39:16 +000015766# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015767ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15768cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015769# This file is a shell script that caches the results of configure
15770# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015771# scripts and configure runs, see configure's option --config-cache.
15772# It is not useful on other systems. If it contains results you don't
15773# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015774#
Martin v. Löwis11437992002-04-12 09:54:03 +000015775# config.status only pays attention to the cache file if you give it
15776# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015777#
Martin v. Löwis11437992002-04-12 09:54:03 +000015778# `ac_cv_env_foo' variables (set or unset) will be overriden when
15779# loading this file, other *unset* `ac_cv_foo' will be assigned the
15780# following values.
15781
15782_ACEOF
15783
Guido van Rossumf78abae1997-01-21 22:02:36 +000015784# The following way of writing the cache mishandles newlines in values,
15785# but we know of no workaround that is simple, portable, and efficient.
15786# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015787# Ultrix sh set writes to stderr and can't be redirected directly,
15788# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015789{
15790 (set) 2>&1 |
15791 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15792 *ac_space=\ *)
15793 # `set' does not quote correctly, so add quotes (double-quote
15794 # substitution turns \\\\ into \\, and sed turns \\ into \).
15795 sed -n \
15796 "s/'/'\\\\''/g;
15797 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15798 ;;
15799 *)
15800 # `set' quotes correctly as required by POSIX, so do not add quotes.
15801 sed -n \
15802 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15803 ;;
15804 esac;
15805} |
15806 sed '
15807 t clear
15808 : clear
15809 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15810 t end
15811 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15812 : end' >>confcache
15813if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015814 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015815 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15816 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015817 else
15818 echo "not updating unwritable cache $cache_file"
15819 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015820fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015821rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015822
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015823test "x$prefix" = xNONE && prefix=$ac_default_prefix
15824# Let make expand exec_prefix.
15825test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015826
Martin v. Löwis11437992002-04-12 09:54:03 +000015827# VPATH may cause trouble with some makes, so we remove $(srcdir),
15828# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15829# trailing colons and then remove the whole line if VPATH becomes empty
15830# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015831if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015832 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15833s/:*\$(srcdir):*/:/;
15834s/:*\${srcdir}:*/:/;
15835s/:*@srcdir@:*/:/;
15836s/^\([^=]*=[ ]*\):*/\1/;
15837s/:*$//;
15838s/^[^=]*=[ ]*$//;
15839}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015840fi
15841
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015842DEFS=-DHAVE_CONFIG_H
15843
Martin v. Löwis11437992002-04-12 09:54:03 +000015844
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015845: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015846ac_clean_files_save=$ac_clean_files
15847ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15848{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15849echo "$as_me: creating $CONFIG_STATUS" >&6;}
15850cat >$CONFIG_STATUS <<_ACEOF
15851#! $SHELL
15852# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015853# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015854# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015855# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015856
Martin v. Löwis11437992002-04-12 09:54:03 +000015857debug=false
15858SHELL=\${CONFIG_SHELL-$SHELL}
15859_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015860
Martin v. Löwis11437992002-04-12 09:54:03 +000015861cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015862
Martin v. Löwis11437992002-04-12 09:54:03 +000015863## --------------------- ##
15864## M4sh Initialization. ##
15865## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015866
Martin v. Löwis11437992002-04-12 09:54:03 +000015867# Be Bourne compatible
15868if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15869 emulate sh
15870 NULLCMD=:
15871elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15872 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015873fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015874
Martin v. Löwis11437992002-04-12 09:54:03 +000015875# NLS nuisances.
15876# Support unset when possible.
15877if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15878 as_unset=unset
15879else
15880 as_unset=false
15881fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015882
Martin v. Löwis11437992002-04-12 09:54:03 +000015883(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15884 { $as_unset LANG || test "${LANG+set}" != set; } ||
15885 { LANG=C; export LANG; }
15886(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15887 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15888 { LC_ALL=C; export LC_ALL; }
15889(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15890 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15891 { LC_TIME=C; export LC_TIME; }
15892(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15893 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15894 { LC_CTYPE=C; export LC_CTYPE; }
15895(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15896 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15897 { LANGUAGE=C; export LANGUAGE; }
15898(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15899 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15900 { LC_COLLATE=C; export LC_COLLATE; }
15901(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15902 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15903 { LC_NUMERIC=C; export LC_NUMERIC; }
15904(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15905 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15906 { LC_MESSAGES=C; export LC_MESSAGES; }
15907
15908
15909# Name of the executable.
15910as_me=`(basename "$0") 2>/dev/null ||
15911$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15912 X"$0" : 'X\(//\)$' \| \
15913 X"$0" : 'X\(/\)$' \| \
15914 . : '\(.\)' 2>/dev/null ||
15915echo X/"$0" |
15916 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15917 /^X\/\(\/\/\)$/{ s//\1/; q; }
15918 /^X\/\(\/\).*/{ s//\1/; q; }
15919 s/.*/./; q'`
15920
15921# PATH needs CR, and LINENO needs CR and PATH.
15922# Avoid depending upon Character Ranges.
15923as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15924as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15925as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15926as_cr_digits='0123456789'
15927as_cr_alnum=$as_cr_Letters$as_cr_digits
15928
15929# The user is always right.
15930if test "${PATH_SEPARATOR+set}" != set; then
15931 echo "#! /bin/sh" >conftest.sh
15932 echo "exit 0" >>conftest.sh
15933 chmod +x conftest.sh
15934 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15935 PATH_SEPARATOR=';'
15936 else
15937 PATH_SEPARATOR=:
15938 fi
15939 rm -f conftest.sh
15940fi
15941
15942
15943 as_lineno_1=$LINENO
15944 as_lineno_2=$LINENO
15945 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15946 test "x$as_lineno_1" != "x$as_lineno_2" &&
15947 test "x$as_lineno_3" = "x$as_lineno_2" || {
15948 # Find who we are. Look in the path if we contain no path at all
15949 # relative or not.
15950 case $0 in
15951 *[\\/]* ) as_myself=$0 ;;
15952 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15953for as_dir in $PATH
15954do
15955 IFS=$as_save_IFS
15956 test -z "$as_dir" && as_dir=.
15957 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15958done
15959
15960 ;;
15961 esac
15962 # We did not find ourselves, most probably we were run as `sh COMMAND'
15963 # in which case we are not to be found in the path.
15964 if test "x$as_myself" = x; then
15965 as_myself=$0
15966 fi
15967 if test ! -f "$as_myself"; then
15968 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15969echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15970 { (exit 1); exit 1; }; }
15971 fi
15972 case $CONFIG_SHELL in
15973 '')
15974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15975for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15976do
15977 IFS=$as_save_IFS
15978 test -z "$as_dir" && as_dir=.
15979 for as_base in sh bash ksh sh5; do
15980 case $as_dir in
15981 /*)
15982 if ("$as_dir/$as_base" -c '
15983 as_lineno_1=$LINENO
15984 as_lineno_2=$LINENO
15985 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15986 test "x$as_lineno_1" != "x$as_lineno_2" &&
15987 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
15988 CONFIG_SHELL=$as_dir/$as_base
15989 export CONFIG_SHELL
15990 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15991 fi;;
15992 esac
15993 done
15994done
15995;;
Jack Jansendd19cf82001-12-06 22:36:17 +000015996 esac
15997
Martin v. Löwis11437992002-04-12 09:54:03 +000015998 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
15999 # uniformly replaced by the line number. The first 'sed' inserts a
16000 # line-number line before each line; the second 'sed' does the real
16001 # work. The second script uses 'N' to pair each line-number line
16002 # with the numbered line, and appends trailing '-' during
16003 # substitution so that $LINENO is not a special case at line end.
16004 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16005 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16006 sed '=' <$as_myself |
16007 sed '
16008 N
16009 s,$,-,
16010 : loop
16011 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16012 t loop
16013 s,-$,,
16014 s,^['$as_cr_digits']*\n,,
16015 ' >$as_me.lineno &&
16016 chmod +x $as_me.lineno ||
16017 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16018echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16019 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016020
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 # Don't try to exec as it changes $[0], causing all sort of problems
16022 # (the dirname of $[0] is not the place where we might find the
16023 # original and so on. Autoconf is especially sensible to this).
16024 . ./$as_me.lineno
16025 # Exit status is that of the last command.
16026 exit
16027}
16028
16029
16030case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16031 *c*,-n*) ECHO_N= ECHO_C='
16032' ECHO_T=' ' ;;
16033 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16034 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16035esac
16036
16037if expr a : '\(a\)' >/dev/null 2>&1; then
16038 as_expr=expr
16039else
16040 as_expr=false
16041fi
16042
16043rm -f conf$$ conf$$.exe conf$$.file
16044echo >conf$$.file
16045if ln -s conf$$.file conf$$ 2>/dev/null; then
16046 # We could just check for DJGPP; but this test a) works b) is more generic
16047 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16048 if test -f conf$$.exe; then
16049 # Don't use ln at all; we don't have any links
16050 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016051 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016052 as_ln_s='ln -s'
16053 fi
16054elif ln conf$$.file conf$$ 2>/dev/null; then
16055 as_ln_s=ln
16056else
16057 as_ln_s='cp -p'
16058fi
16059rm -f conf$$ conf$$.exe conf$$.file
16060
16061as_executable_p="test -f"
16062
16063# Sed expression to map a string onto a valid CPP name.
16064as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16065
16066# Sed expression to map a string onto a valid variable name.
16067as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16068
16069
16070# IFS
16071# We need space, tab and new line, in precisely that order.
16072as_nl='
16073'
16074IFS=" $as_nl"
16075
16076# CDPATH.
16077$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16078
16079exec 6>&1
16080
16081# Open the log real soon, to keep \$[0] and so on meaningful, and to
16082# report actual input values of CONFIG_FILES etc. instead of their
16083# values after options handling. Logging --version etc. is OK.
16084exec 5>>config.log
16085{
16086 echo
16087 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16088## Running $as_me. ##
16089_ASBOX
16090} >&5
16091cat >&5 <<_CSEOF
16092
16093This file was extended by $as_me, which was
16094generated by GNU Autoconf 2.53. Invocation command line was
16095
16096 CONFIG_FILES = $CONFIG_FILES
16097 CONFIG_HEADERS = $CONFIG_HEADERS
16098 CONFIG_LINKS = $CONFIG_LINKS
16099 CONFIG_COMMANDS = $CONFIG_COMMANDS
16100 $ $0 $@
16101
16102_CSEOF
16103echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16104echo >&5
16105_ACEOF
16106
16107# Files that config.status was made for.
16108if test -n "$ac_config_files"; then
16109 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16110fi
16111
16112if test -n "$ac_config_headers"; then
16113 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16114fi
16115
16116if test -n "$ac_config_links"; then
16117 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16118fi
16119
16120if test -n "$ac_config_commands"; then
16121 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16122fi
16123
16124cat >>$CONFIG_STATUS <<\_ACEOF
16125
16126ac_cs_usage="\
16127\`$as_me' instantiates files from templates according to the
16128current configuration.
16129
16130Usage: $0 [OPTIONS] [FILE]...
16131
16132 -h, --help print this help, then exit
16133 -V, --version print version number, then exit
16134 -d, --debug don't remove temporary files
16135 --recheck update $as_me by reconfiguring in the same conditions
16136 --file=FILE[:TEMPLATE]
16137 instantiate the configuration file FILE
16138 --header=FILE[:TEMPLATE]
16139 instantiate the configuration header FILE
16140
16141Configuration files:
16142$config_files
16143
16144Configuration headers:
16145$config_headers
16146
16147Report bugs to <bug-autoconf@gnu.org>."
16148_ACEOF
16149
16150cat >>$CONFIG_STATUS <<_ACEOF
16151ac_cs_version="\\
16152config.status
16153configured by $0, generated by GNU Autoconf 2.53,
16154 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16155
16156Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16157Free Software Foundation, Inc.
16158This config.status script is free software; the Free Software Foundation
16159gives unlimited permission to copy, distribute and modify it."
16160srcdir=$srcdir
16161INSTALL="$INSTALL"
16162_ACEOF
16163
16164cat >>$CONFIG_STATUS <<\_ACEOF
16165# If no file are specified by the user, then we need to provide default
16166# value. By we need to know if files were specified by the user.
16167ac_need_defaults=:
16168while test $# != 0
16169do
16170 case $1 in
16171 --*=*)
16172 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16173 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16174 shift
16175 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16176 shift
16177 ;;
16178 -*);;
16179 *) # This is not an option, so the user has probably given explicit
16180 # arguments.
16181 ac_need_defaults=false;;
16182 esac
16183
16184 case $1 in
16185 # Handling of the options.
16186_ACEOF
16187cat >>$CONFIG_STATUS <<_ACEOF
16188 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16189 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16190 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16191_ACEOF
16192cat >>$CONFIG_STATUS <<\_ACEOF
16193 --version | --vers* | -V )
16194 echo "$ac_cs_version"; exit 0 ;;
16195 --he | --h)
16196 # Conflict between --help and --header
16197 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16198Try \`$0 --help' for more information." >&5
16199echo "$as_me: error: ambiguous option: $1
16200Try \`$0 --help' for more information." >&2;}
16201 { (exit 1); exit 1; }; };;
16202 --help | --hel | -h )
16203 echo "$ac_cs_usage"; exit 0 ;;
16204 --debug | --d* | -d )
16205 debug=: ;;
16206 --file | --fil | --fi | --f )
16207 shift
16208 CONFIG_FILES="$CONFIG_FILES $1"
16209 ac_need_defaults=false;;
16210 --header | --heade | --head | --hea )
16211 shift
16212 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16213 ac_need_defaults=false;;
16214
16215 # This is an error.
16216 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16217Try \`$0 --help' for more information." >&5
16218echo "$as_me: error: unrecognized option: $1
16219Try \`$0 --help' for more information." >&2;}
16220 { (exit 1); exit 1; }; } ;;
16221
16222 *) ac_config_targets="$ac_config_targets $1" ;;
16223
16224 esac
16225 shift
16226done
16227
16228_ACEOF
16229
16230
16231
16232
16233
16234cat >>$CONFIG_STATUS <<\_ACEOF
16235for ac_config_target in $ac_config_targets
16236do
16237 case "$ac_config_target" in
16238 # Handling of arguments.
16239 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16240 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16241 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16242 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16243echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16244 { (exit 1); exit 1; }; };;
16245 esac
16246done
16247
16248# If the user did not use the arguments to specify the items to instantiate,
16249# then the envvar interface is used. Set only those that are not.
16250# We use the long form for the default assignment because of an extremely
16251# bizarre bug on SunOS 4.1.3.
16252if $ac_need_defaults; then
16253 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16254 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16255fi
16256
16257# Create a temporary directory, and hook for its removal unless debugging.
16258$debug ||
16259{
16260 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16261 trap '{ (exit 1); exit 1; }' 1 2 13 15
16262}
16263
16264# Create a (secure) tmp directory for tmp files.
16265: ${TMPDIR=/tmp}
16266{
16267 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16268 test -n "$tmp" && test -d "$tmp"
16269} ||
16270{
16271 tmp=$TMPDIR/cs$$-$RANDOM
16272 (umask 077 && mkdir $tmp)
16273} ||
16274{
16275 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16276 { (exit 1); exit 1; }
16277}
16278
16279_ACEOF
16280
16281cat >>$CONFIG_STATUS <<_ACEOF
16282
16283#
16284# CONFIG_FILES section.
16285#
16286
16287# No need to generate the scripts if there are no CONFIG_FILES.
16288# This happens for instance when ./config.status config.h
16289if test -n "\$CONFIG_FILES"; then
16290 # Protect against being on the right side of a sed subst in config.status.
16291 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16292 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16293s,@SHELL@,$SHELL,;t t
16294s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16295s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16296s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16297s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16298s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16299s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16300s,@exec_prefix@,$exec_prefix,;t t
16301s,@prefix@,$prefix,;t t
16302s,@program_transform_name@,$program_transform_name,;t t
16303s,@bindir@,$bindir,;t t
16304s,@sbindir@,$sbindir,;t t
16305s,@libexecdir@,$libexecdir,;t t
16306s,@datadir@,$datadir,;t t
16307s,@sysconfdir@,$sysconfdir,;t t
16308s,@sharedstatedir@,$sharedstatedir,;t t
16309s,@localstatedir@,$localstatedir,;t t
16310s,@libdir@,$libdir,;t t
16311s,@includedir@,$includedir,;t t
16312s,@oldincludedir@,$oldincludedir,;t t
16313s,@infodir@,$infodir,;t t
16314s,@mandir@,$mandir,;t t
16315s,@build_alias@,$build_alias,;t t
16316s,@host_alias@,$host_alias,;t t
16317s,@target_alias@,$target_alias,;t t
16318s,@DEFS@,$DEFS,;t t
16319s,@ECHO_C@,$ECHO_C,;t t
16320s,@ECHO_N@,$ECHO_N,;t t
16321s,@ECHO_T@,$ECHO_T,;t t
16322s,@LIBS@,$LIBS,;t t
16323s,@VERSION@,$VERSION,;t t
16324s,@SOVERSION@,$SOVERSION,;t t
16325s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16326s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16327s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16328s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16329s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16330s,@MACHDEP@,$MACHDEP,;t t
16331s,@SGI_ABI@,$SGI_ABI,;t t
16332s,@CXX@,$CXX,;t t
16333s,@MAINOBJ@,$MAINOBJ,;t t
16334s,@EXEEXT@,$EXEEXT,;t t
16335s,@CC@,$CC,;t t
16336s,@CFLAGS@,$CFLAGS,;t t
16337s,@LDFLAGS@,$LDFLAGS,;t t
16338s,@CPPFLAGS@,$CPPFLAGS,;t t
16339s,@ac_ct_CC@,$ac_ct_CC,;t t
16340s,@OBJEXT@,$OBJEXT,;t t
16341s,@CPP@,$CPP,;t t
16342s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16343s,@LIBRARY@,$LIBRARY,;t t
16344s,@LDLIBRARY@,$LDLIBRARY,;t t
16345s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16346s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16347s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16348s,@INSTSONAME@,$INSTSONAME,;t t
16349s,@RUNSHARED@,$RUNSHARED,;t t
16350s,@LINKCC@,$LINKCC,;t t
16351s,@RANLIB@,$RANLIB,;t t
16352s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16353s,@AR@,$AR,;t t
16354s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16355s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16356s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16357s,@LN@,$LN,;t t
16358s,@OPT@,$OPT,;t t
16359s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16360s,@SO@,$SO,;t t
16361s,@LDSHARED@,$LDSHARED,;t t
16362s,@BLDSHARED@,$BLDSHARED,;t t
16363s,@CCSHARED@,$CCSHARED,;t t
16364s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16365s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
16366s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16367s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16368s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16369s,@LDLAST@,$LDLAST,;t t
16370s,@THREADOBJ@,$THREADOBJ,;t t
16371s,@DLINCLDIR@,$DLINCLDIR,;t t
16372s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16373s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16374s,@LIBOBJS@,$LIBOBJS,;t t
16375s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16376s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16377s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16378s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16379s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16380s,@LIBM@,$LIBM,;t t
16381s,@LIBC@,$LIBC,;t t
16382s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16383s,@THREADHEADERS@,$THREADHEADERS,;t t
16384s,@SRCDIRS@,$SRCDIRS,;t t
16385CEOF
16386
16387_ACEOF
16388
16389 cat >>$CONFIG_STATUS <<\_ACEOF
16390 # Split the substitutions into bite-sized pieces for seds with
16391 # small command number limits, like on Digital OSF/1 and HP-UX.
16392 ac_max_sed_lines=48
16393 ac_sed_frag=1 # Number of current file.
16394 ac_beg=1 # First line for current file.
16395 ac_end=$ac_max_sed_lines # Line after last line for current file.
16396 ac_more_lines=:
16397 ac_sed_cmds=
16398 while $ac_more_lines; do
16399 if test $ac_beg -gt 1; then
16400 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16401 else
16402 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16403 fi
16404 if test ! -s $tmp/subs.frag; then
16405 ac_more_lines=false
16406 else
16407 # The purpose of the label and of the branching condition is to
16408 # speed up the sed processing (if there are no `@' at all, there
16409 # is no need to browse any of the substitutions).
16410 # These are the two extra sed commands mentioned above.
16411 (echo ':t
16412 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16413 if test -z "$ac_sed_cmds"; then
16414 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16415 else
16416 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16417 fi
16418 ac_sed_frag=`expr $ac_sed_frag + 1`
16419 ac_beg=$ac_end
16420 ac_end=`expr $ac_end + $ac_max_sed_lines`
16421 fi
16422 done
16423 if test -z "$ac_sed_cmds"; then
16424 ac_sed_cmds=cat
16425 fi
16426fi # test -n "$CONFIG_FILES"
16427
16428_ACEOF
16429cat >>$CONFIG_STATUS <<\_ACEOF
16430for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16431 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16432 case $ac_file in
16433 - | *:- | *:-:* ) # input from stdin
16434 cat >$tmp/stdin
16435 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16436 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16437 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16438 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16439 * ) ac_file_in=$ac_file.in ;;
16440 esac
16441
16442 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16443 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16444$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16445 X"$ac_file" : 'X\(//\)[^/]' \| \
16446 X"$ac_file" : 'X\(//\)$' \| \
16447 X"$ac_file" : 'X\(/\)' \| \
16448 . : '\(.\)' 2>/dev/null ||
16449echo X"$ac_file" |
16450 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16451 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16452 /^X\(\/\/\)$/{ s//\1/; q; }
16453 /^X\(\/\).*/{ s//\1/; q; }
16454 s/.*/./; q'`
16455 { case "$ac_dir" in
16456 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16457 *) as_incr_dir=.;;
16458esac
16459as_dummy="$ac_dir"
16460for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16461 case $as_mkdir_dir in
16462 # Skip DOS drivespec
16463 ?:) as_incr_dir=$as_mkdir_dir ;;
16464 *)
16465 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16466 test -d "$as_incr_dir" ||
16467 mkdir "$as_incr_dir" ||
16468 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16469echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16470 { (exit 1); exit 1; }; }
16471 ;;
16472 esac
16473done; }
16474
16475 ac_builddir=.
16476
16477if test "$ac_dir" != .; then
16478 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16479 # A "../" for each directory in $ac_dir_suffix.
16480 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16481else
16482 ac_dir_suffix= ac_top_builddir=
16483fi
16484
16485case $srcdir in
16486 .) # No --srcdir option. We are building in place.
16487 ac_srcdir=.
16488 if test -z "$ac_top_builddir"; then
16489 ac_top_srcdir=.
16490 else
16491 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16492 fi ;;
16493 [\\/]* | ?:[\\/]* ) # Absolute path.
16494 ac_srcdir=$srcdir$ac_dir_suffix;
16495 ac_top_srcdir=$srcdir ;;
16496 *) # Relative path.
16497 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16498 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16499esac
16500# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16501# absolute.
16502ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16503ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16504ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16505ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16506
16507
16508 case $INSTALL in
16509 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16510 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16511 esac
16512
16513 if test x"$ac_file" != x-; then
16514 { echo "$as_me:$LINENO: creating $ac_file" >&5
16515echo "$as_me: creating $ac_file" >&6;}
16516 rm -f "$ac_file"
16517 fi
16518 # Let's still pretend it is `configure' which instantiates (i.e., don't
16519 # use $as_me), people would be surprised to read:
16520 # /* config.h. Generated by config.status. */
16521 if test x"$ac_file" = x-; then
16522 configure_input=
16523 else
16524 configure_input="$ac_file. "
16525 fi
16526 configure_input=$configure_input"Generated from `echo $ac_file_in |
16527 sed 's,.*/,,'` by configure."
16528
16529 # First look for the input files in the build tree, otherwise in the
16530 # src tree.
16531 ac_file_inputs=`IFS=:
16532 for f in $ac_file_in; do
16533 case $f in
16534 -) echo $tmp/stdin ;;
16535 [\\/$]*)
16536 # Absolute (can't be DOS-style, as IFS=:)
16537 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16538echo "$as_me: error: cannot find input file: $f" >&2;}
16539 { (exit 1); exit 1; }; }
16540 echo $f;;
16541 *) # Relative
16542 if test -f "$f"; then
16543 # Build tree
16544 echo $f
16545 elif test -f "$srcdir/$f"; then
16546 # Source tree
16547 echo $srcdir/$f
16548 else
16549 # /dev/null tree
16550 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16551echo "$as_me: error: cannot find input file: $f" >&2;}
16552 { (exit 1); exit 1; }; }
16553 fi;;
16554 esac
16555 done` || { (exit 1); exit 1; }
16556_ACEOF
16557cat >>$CONFIG_STATUS <<_ACEOF
16558 sed "$ac_vpsub
16559$extrasub
16560_ACEOF
16561cat >>$CONFIG_STATUS <<\_ACEOF
16562:t
16563/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16564s,@configure_input@,$configure_input,;t t
16565s,@srcdir@,$ac_srcdir,;t t
16566s,@abs_srcdir@,$ac_abs_srcdir,;t t
16567s,@top_srcdir@,$ac_top_srcdir,;t t
16568s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16569s,@builddir@,$ac_builddir,;t t
16570s,@abs_builddir@,$ac_abs_builddir,;t t
16571s,@top_builddir@,$ac_top_builddir,;t t
16572s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16573s,@INSTALL@,$ac_INSTALL,;t t
16574" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16575 rm -f $tmp/stdin
16576 if test x"$ac_file" != x-; then
16577 mv $tmp/out $ac_file
16578 else
16579 cat $tmp/out
16580 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016581 fi
16582
Martin v. Löwis11437992002-04-12 09:54:03 +000016583done
16584_ACEOF
16585cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016586
Martin v. Löwis11437992002-04-12 09:54:03 +000016587#
16588# CONFIG_HEADER section.
16589#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016590
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016591# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16592# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016593#
16594# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016595ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16596ac_dB='[ ].*$,\1#\2'
16597ac_dC=' '
16598ac_dD=',;t'
16599# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16600ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16601ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016602ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016603ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016604
Martin v. Löwis11437992002-04-12 09:54:03 +000016605for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016606 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016607 case $ac_file in
16608 - | *:- | *:-:* ) # input from stdin
16609 cat >$tmp/stdin
16610 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16611 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16612 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16613 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16614 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016615 esac
16616
Martin v. Löwis11437992002-04-12 09:54:03 +000016617 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16618echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016619
Martin v. Löwis11437992002-04-12 09:54:03 +000016620 # First look for the input files in the build tree, otherwise in the
16621 # src tree.
16622 ac_file_inputs=`IFS=:
16623 for f in $ac_file_in; do
16624 case $f in
16625 -) echo $tmp/stdin ;;
16626 [\\/$]*)
16627 # Absolute (can't be DOS-style, as IFS=:)
16628 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16629echo "$as_me: error: cannot find input file: $f" >&2;}
16630 { (exit 1); exit 1; }; }
16631 echo $f;;
16632 *) # Relative
16633 if test -f "$f"; then
16634 # Build tree
16635 echo $f
16636 elif test -f "$srcdir/$f"; then
16637 # Source tree
16638 echo $srcdir/$f
16639 else
16640 # /dev/null tree
16641 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16642echo "$as_me: error: cannot find input file: $f" >&2;}
16643 { (exit 1); exit 1; }; }
16644 fi;;
16645 esac
16646 done` || { (exit 1); exit 1; }
16647 # Remove the trailing spaces.
16648 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016649
Martin v. Löwis11437992002-04-12 09:54:03 +000016650_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016651
Martin v. Löwis11437992002-04-12 09:54:03 +000016652# Transform confdefs.h into two sed scripts, `conftest.defines' and
16653# `conftest.undefs', that substitutes the proper values into
16654# config.h.in to produce config.h. The first handles `#define'
16655# templates, and the second `#undef' templates.
16656# And first: Protect against being on the right side of a sed subst in
16657# config.status. Protect against being in an unquoted here document
16658# in config.status.
16659rm -f conftest.defines conftest.undefs
16660# Using a here document instead of a string reduces the quoting nightmare.
16661# Putting comments in sed scripts is not portable.
16662#
16663# `end' is used to avoid that the second main sed command (meant for
16664# 0-ary CPP macros) applies to n-ary macro definitions.
16665# See the Autoconf documentation for `clear'.
16666cat >confdef2sed.sed <<\_ACEOF
16667s/[\\&,]/\\&/g
16668s,[\\$`],\\&,g
16669t clear
16670: clear
16671s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16672t end
16673s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16674: end
16675_ACEOF
16676# If some macros were called several times there might be several times
16677# the same #defines, which is useless. Nevertheless, we may not want to
16678# sort them, since we want the *last* AC-DEFINE to be honored.
16679uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16680sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16681rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016682
16683# This sed command replaces #undef with comments. This is necessary, for
16684# example, in the case of _POSIX_SOURCE, which is predefined and required
16685# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016686cat >>conftest.undefs <<\_ACEOF
16687s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16688_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016689
Martin v. Löwis11437992002-04-12 09:54:03 +000016690# Break up conftest.defines because some shells have a limit on the size
16691# of here documents, and old seds have small limits too (100 cmds).
16692echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16693echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16694echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16695echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016696rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016697while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016698do
Martin v. Löwis11437992002-04-12 09:54:03 +000016699 # Write a limited-size here document to $tmp/defines.sed.
16700 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16701 # Speed up: don't consider the non `#define' lines.
16702 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16703 # Work around the forget-to-reset-the-flag bug.
16704 echo 't clr' >>$CONFIG_STATUS
16705 echo ': clr' >>$CONFIG_STATUS
16706 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016707 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016708 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16709 rm -f $tmp/in
16710 mv $tmp/out $tmp/in
16711' >>$CONFIG_STATUS
16712 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16713 rm -f conftest.defines
16714 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016715done
Martin v. Löwis11437992002-04-12 09:54:03 +000016716rm -f conftest.defines
16717echo ' fi # egrep' >>$CONFIG_STATUS
16718echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016719
Martin v. Löwis11437992002-04-12 09:54:03 +000016720# Break up conftest.undefs because some shells have a limit on the size
16721# of here documents, and old seds have small limits too (100 cmds).
16722echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16723rm -f conftest.tail
16724while grep . conftest.undefs >/dev/null
16725do
16726 # Write a limited-size here document to $tmp/undefs.sed.
16727 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16728 # Speed up: don't consider the non `#undef'
16729 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16730 # Work around the forget-to-reset-the-flag bug.
16731 echo 't clr' >>$CONFIG_STATUS
16732 echo ': clr' >>$CONFIG_STATUS
16733 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16734 echo 'CEOF
16735 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16736 rm -f $tmp/in
16737 mv $tmp/out $tmp/in
16738' >>$CONFIG_STATUS
16739 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16740 rm -f conftest.undefs
16741 mv conftest.tail conftest.undefs
16742done
16743rm -f conftest.undefs
16744
16745cat >>$CONFIG_STATUS <<\_ACEOF
16746 # Let's still pretend it is `configure' which instantiates (i.e., don't
16747 # use $as_me), people would be surprised to read:
16748 # /* config.h. Generated by config.status. */
16749 if test x"$ac_file" = x-; then
16750 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016751 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016752 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016754 cat $tmp/in >>$tmp/config.h
16755 rm -f $tmp/in
16756 if test x"$ac_file" != x-; then
16757 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16758 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16759echo "$as_me: $ac_file is unchanged" >&6;}
16760 else
16761 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16762$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16763 X"$ac_file" : 'X\(//\)[^/]' \| \
16764 X"$ac_file" : 'X\(//\)$' \| \
16765 X"$ac_file" : 'X\(/\)' \| \
16766 . : '\(.\)' 2>/dev/null ||
16767echo X"$ac_file" |
16768 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16769 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16770 /^X\(\/\/\)$/{ s//\1/; q; }
16771 /^X\(\/\).*/{ s//\1/; q; }
16772 s/.*/./; q'`
16773 { case "$ac_dir" in
16774 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16775 *) as_incr_dir=.;;
16776esac
16777as_dummy="$ac_dir"
16778for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16779 case $as_mkdir_dir in
16780 # Skip DOS drivespec
16781 ?:) as_incr_dir=$as_mkdir_dir ;;
16782 *)
16783 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16784 test -d "$as_incr_dir" ||
16785 mkdir "$as_incr_dir" ||
16786 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16787echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16788 { (exit 1); exit 1; }; }
16789 ;;
16790 esac
16791done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016792
Martin v. Löwis11437992002-04-12 09:54:03 +000016793 rm -f $ac_file
16794 mv $tmp/config.h $ac_file
16795 fi
16796 else
16797 cat $tmp/config.h
16798 rm -f $tmp/config.h
16799 fi
16800done
16801_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016802
Martin v. Löwis11437992002-04-12 09:54:03 +000016803cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016804
Martin v. Löwis11437992002-04-12 09:54:03 +000016805{ (exit 0); exit 0; }
16806_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016807chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016808ac_clean_files=$ac_clean_files_save
16809
16810
16811# configure is writing to config.log, and then calls config.status.
16812# config.status does its own redirection, appending to config.log.
16813# Unfortunately, on DOS this fails, as config.log is still kept open
16814# by configure, so config.status won't be able to write to it; its
16815# output is simply discarded. So we exec the FD to /dev/null,
16816# effectively closing config.log, so it can be properly (re)opened and
16817# appended to by config.status. When coming back to configure, we
16818# need to make the FD available again.
16819if test "$no_create" != yes; then
16820 ac_cs_success=:
16821 exec 5>/dev/null
16822 $SHELL $CONFIG_STATUS || ac_cs_success=false
16823 exec 5>>config.log
16824 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16825 # would make configure fail if this is the last instruction.
16826 $ac_cs_success || { (exit 1); exit 1; }
16827fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016828
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016829
16830echo "creating Setup"
16831if test ! -f Modules/Setup
16832then
16833 cp $srcdir/Modules/Setup.dist Modules/Setup
16834fi
16835
16836echo "creating Setup.local"
16837if test ! -f Modules/Setup.local
16838then
16839 echo "# Edit this file for local setup changes" >Modules/Setup.local
16840fi
16841
16842echo "creating Makefile"
16843$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16844 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016845 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016846mv config.c Modules