blob: 6bd6eca036072914eba8addc66aa0b6ec8516653 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Fred Drake6b3cc522002-04-15 19:20:27 +00002# From configure.in Revision: 1.309 .
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 Ward57c9a6632000-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 Ward57c9a6632000-05-26 12:22:54 +00008734 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008735 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008736 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8737 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008738 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008739 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8740 if test "$enable_framework" ; then
8741 # Link against the framework. All externals should be defined.
8742 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8743 else
8744 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008745 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008746 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008747 Darwin/*)
8748 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8749 if test "$enable_framework" ; then
8750 # Link against the framework. All externals should be defined.
8751 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8752 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008753 # No framework, use the Python app as bundle-loader
8754 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8755 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008756 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008757 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008758 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008759 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008760 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008761 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008762 then
8763 LDSHARED="cc -shared ${LDFLAGS}"
8764 else
8765 LDSHARED="ld -Bshareable ${LDFLAGS}"
8766 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008767 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008768 if test "$GCC" = "yes"
8769 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008770 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008771 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008772 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008773 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008774 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008775 *) LDSHARED="ld";;
8776 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008777fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008778echo "$as_me:$LINENO: result: $LDSHARED" >&5
8779echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008780BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008781# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008782# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008783echo "$as_me:$LINENO: checking CCSHARED" >&5
8784echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008785if test -z "$CCSHARED"
8786then
Guido van Rossum07397971997-04-29 21:49:50 +00008787 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008788 SunOS*) if test "$GCC" = yes;
8789 then CCSHARED="-fPIC";
8790 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008791 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008792 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008793 else CCSHARED="+z";
8794 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008795 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008796 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008797 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008798 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008799 if test "$GCC" = "yes"
8800 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008801 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008802 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008803 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00008804 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008805 IRIX*/6*) case $CC in
8806 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008807 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008808 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008809 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008810 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008811fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008812echo "$as_me:$LINENO: result: $CCSHARED" >&5
8813echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008814# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008815# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008816echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
8817echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008818if test -z "$LINKFORSHARED"
8819then
Guido van Rossum07397971997-04-29 21:49:50 +00008820 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008821 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008822 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008823 LINKFORSHARED="-Wl,-E -Wl,+s";;
8824# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008825 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008826 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008827 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00008829 # -u __dummy makes the linker aware of the objc runtime
8830 # in System.framework; otherwise, __objcInit (referenced in
8831 # crt1.o) gets erroneously defined as common, which breaks dynamic
8832 # loading of any modules which reference it in System.framework.
8833 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
8834 # not used by the core itself but which needs to be in the core so
8835 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00008836 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00008837 if test "$enable_framework"
8838 then
8839 LINKFORSHARED="$LINKFORSHARED -framework Python"
8840 fi
8841 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008842 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00008843 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008844 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008845 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008846 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8847 then
8848 LINKFORSHARED="-Wl,--export-dynamic"
8849 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008850 SunOS/5*) case $CC in
8851 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00008852 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008853 then
8854 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008855 fi;;
8856 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008857 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008858fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008859echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
8860echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008861
Michael W. Hudson54241132001-12-07 15:38:26 +00008862
Martin v. Löwis11437992002-04-12 09:54:03 +00008863echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
8864echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008865if test ! "$LIBRARY" = "$LDLIBRARY"
8866then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008867 case $ac_sys_system in
8868 CYGWIN*)
8869 # Cygwin needs CCSHARED when building extension DLLs
8870 # but not when building the interpreter DLL.
8871 CFLAGSFORSHARED='';;
8872 *)
8873 CFLAGSFORSHARED='$(CCSHARED)'
8874 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008875fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008876echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
8877echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008878
Guido van Rossum627b2d71993-12-24 10:39:16 +00008879# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00008880
8881echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8882echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
8883if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8884 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008885else
Martin v. Löwis11437992002-04-12 09:54:03 +00008886 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008887LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008888cat >conftest.$ac_ext <<_ACEOF
8889#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008890#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008891
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008892/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008893#ifdef __cplusplus
8894extern "C"
8895#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008896/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008897 builtin and then its argument prototype would still apply. */
8898char dlopen ();
8899#ifdef F77_DUMMY_MAIN
8900# ifdef __cplusplus
8901 extern "C"
8902# endif
8903 int F77_DUMMY_MAIN() { return 1; }
8904#endif
8905int
8906main ()
8907{
8908dlopen ();
8909 ;
8910 return 0;
8911}
8912_ACEOF
8913rm -f conftest.$ac_objext conftest$ac_exeext
8914if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8915 (eval $ac_link) 2>&5
8916 ac_status=$?
8917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8918 (exit $ac_status); } &&
8919 { ac_try='test -s conftest$ac_exeext'
8920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8921 (eval $ac_try) 2>&5
8922 ac_status=$?
8923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8924 (exit $ac_status); }; }; then
8925 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008926else
Martin v. Löwis11437992002-04-12 09:54:03 +00008927 echo "$as_me: failed program was:" >&5
8928cat conftest.$ac_ext >&5
8929ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008930fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008931rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8932LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008933fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008934echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8935echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
8936if test $ac_cv_lib_dl_dlopen = yes; then
8937 cat >>confdefs.h <<_ACEOF
8938#define HAVE_LIBDL 1
8939_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008940
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008941 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008942
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008943fi
8944 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00008945
8946echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8947echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
8948if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8949 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008950else
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008952LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008953cat >conftest.$ac_ext <<_ACEOF
8954#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00008955#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008956
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008957/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008958#ifdef __cplusplus
8959extern "C"
8960#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008961/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 builtin and then its argument prototype would still apply. */
8963char shl_load ();
8964#ifdef F77_DUMMY_MAIN
8965# ifdef __cplusplus
8966 extern "C"
8967# endif
8968 int F77_DUMMY_MAIN() { return 1; }
8969#endif
8970int
8971main ()
8972{
8973shl_load ();
8974 ;
8975 return 0;
8976}
8977_ACEOF
8978rm -f conftest.$ac_objext conftest$ac_exeext
8979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8980 (eval $ac_link) 2>&5
8981 ac_status=$?
8982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8983 (exit $ac_status); } &&
8984 { ac_try='test -s conftest$ac_exeext'
8985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8986 (eval $ac_try) 2>&5
8987 ac_status=$?
8988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8989 (exit $ac_status); }; }; then
8990 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008991else
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 echo "$as_me: failed program was:" >&5
8993cat conftest.$ac_ext >&5
8994ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008995fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008996rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8997LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008999echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9000echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9001if test $ac_cv_lib_dld_shl_load = yes; then
9002 cat >>confdefs.h <<_ACEOF
9003#define HAVE_LIBDLD 1
9004_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009005
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009006 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009007
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009008fi
9009 # Dynamic linking for HP-UX
Martin v. Löwis11437992002-04-12 09:54:03 +00009010
9011echo "$as_me:$LINENO: checking for sem_init in -lrt" >&5
9012echo $ECHO_N "checking for sem_init in -lrt... $ECHO_C" >&6
9013if test "${ac_cv_lib_rt_sem_init+set}" = set; then
9014 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009015else
Martin v. Löwis11437992002-04-12 09:54:03 +00009016 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009017LIBS="-lrt $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009018cat >conftest.$ac_ext <<_ACEOF
9019#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009020#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009021
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009022/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009023#ifdef __cplusplus
9024extern "C"
9025#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009026/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009027 builtin and then its argument prototype would still apply. */
9028char sem_init ();
9029#ifdef F77_DUMMY_MAIN
9030# ifdef __cplusplus
9031 extern "C"
9032# endif
9033 int F77_DUMMY_MAIN() { return 1; }
9034#endif
9035int
9036main ()
9037{
9038sem_init ();
9039 ;
9040 return 0;
9041}
9042_ACEOF
9043rm -f conftest.$ac_objext conftest$ac_exeext
9044if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9045 (eval $ac_link) 2>&5
9046 ac_status=$?
9047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9048 (exit $ac_status); } &&
9049 { ac_try='test -s conftest$ac_exeext'
9050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9051 (eval $ac_try) 2>&5
9052 ac_status=$?
9053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9054 (exit $ac_status); }; }; then
9055 ac_cv_lib_rt_sem_init=yes
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009056else
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 echo "$as_me: failed program was:" >&5
9058cat conftest.$ac_ext >&5
9059ac_cv_lib_rt_sem_init=no
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009060fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009061rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9062LIBS=$ac_check_lib_save_LIBS
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009064echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sem_init" >&5
9065echo "${ECHO_T}$ac_cv_lib_rt_sem_init" >&6
9066if test $ac_cv_lib_rt_sem_init = yes; then
9067 cat >>confdefs.h <<_ACEOF
9068#define HAVE_LIBRT 1
9069_ACEOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009070
9071 LIBS="-lrt $LIBS"
9072
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009073fi
9074 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009075
9076# checks for system dependent C++ extensions support
9077case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9079echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9080 cat >conftest.$ac_ext <<_ACEOF
9081#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009082#include "confdefs.h"
9083#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009084#ifdef F77_DUMMY_MAIN
9085# ifdef __cplusplus
9086 extern "C"
9087# endif
9088 int F77_DUMMY_MAIN() { return 1; }
9089#endif
9090int
9091main ()
9092{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009093loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009094 ;
9095 return 0;
9096}
9097_ACEOF
9098rm -f conftest.$ac_objext conftest$ac_exeext
9099if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9100 (eval $ac_link) 2>&5
9101 ac_status=$?
9102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9103 (exit $ac_status); } &&
9104 { ac_try='test -s conftest$ac_exeext'
9105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9106 (eval $ac_try) 2>&5
9107 ac_status=$?
9108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9109 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009110
Martin v. Löwis11437992002-04-12 09:54:03 +00009111cat >>confdefs.h <<\_ACEOF
9112#define AIX_GENUINE_CPLUSPLUS 1
9113_ACEOF
9114
9115 echo "$as_me:$LINENO: result: yes" >&5
9116echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009117else
Martin v. Löwis11437992002-04-12 09:54:03 +00009118 echo "$as_me: failed program was:" >&5
9119cat conftest.$ac_ext >&5
9120echo "$as_me:$LINENO: result: no" >&5
9121echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009122fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009123rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009124 *) ;;
9125esac
9126
Guido van Rossum70c7f481998-03-26 18:44:10 +00009127# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9128# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009129# BeOS' sockets are stashed in libnet.
9130case "$ac_sys_system" in
9131IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009132*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009133echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9134echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9135if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9136 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009137else
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009139LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009140cat >conftest.$ac_ext <<_ACEOF
9141#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009142#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009143
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009144/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009145#ifdef __cplusplus
9146extern "C"
9147#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009148/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009149 builtin and then its argument prototype would still apply. */
9150char t_open ();
9151#ifdef F77_DUMMY_MAIN
9152# ifdef __cplusplus
9153 extern "C"
9154# endif
9155 int F77_DUMMY_MAIN() { return 1; }
9156#endif
9157int
9158main ()
9159{
9160t_open ();
9161 ;
9162 return 0;
9163}
9164_ACEOF
9165rm -f conftest.$ac_objext conftest$ac_exeext
9166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9167 (eval $ac_link) 2>&5
9168 ac_status=$?
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); } &&
9171 { ac_try='test -s conftest$ac_exeext'
9172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9173 (eval $ac_try) 2>&5
9174 ac_status=$?
9175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); }; }; then
9177 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009178else
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 echo "$as_me: failed program was:" >&5
9180cat conftest.$ac_ext >&5
9181ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009183rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9184LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009185fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009186echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9187echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9188if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009189 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009190fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009191 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009192echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9193echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9194if test "${ac_cv_lib_socket_socket+set}" = set; then
9195 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009196else
Martin v. Löwis11437992002-04-12 09:54:03 +00009197 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009198LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009199cat >conftest.$ac_ext <<_ACEOF
9200#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009201#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009202
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009203/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009204#ifdef __cplusplus
9205extern "C"
9206#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009207/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 builtin and then its argument prototype would still apply. */
9209char socket ();
9210#ifdef F77_DUMMY_MAIN
9211# ifdef __cplusplus
9212 extern "C"
9213# endif
9214 int F77_DUMMY_MAIN() { return 1; }
9215#endif
9216int
9217main ()
9218{
9219socket ();
9220 ;
9221 return 0;
9222}
9223_ACEOF
9224rm -f conftest.$ac_objext conftest$ac_exeext
9225if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9226 (eval $ac_link) 2>&5
9227 ac_status=$?
9228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9229 (exit $ac_status); } &&
9230 { ac_try='test -s conftest$ac_exeext'
9231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9232 (eval $ac_try) 2>&5
9233 ac_status=$?
9234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9235 (exit $ac_status); }; }; then
9236 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009237else
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 echo "$as_me: failed program was:" >&5
9239cat conftest.$ac_ext >&5
9240ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009241fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009242rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9243LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009244fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009245echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9246echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9247if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009248 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009249fi
9250 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009251;;
9252esac
9253case "$ac_sys_system" in
9254BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009255echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9256echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9257if test "${ac_cv_lib_net_socket+set}" = set; then
9258 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009259else
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009261LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009262cat >conftest.$ac_ext <<_ACEOF
9263#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009264#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009265
Guido van Rossumad678af1998-10-02 14:42:15 +00009266/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009267#ifdef __cplusplus
9268extern "C"
9269#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009270/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009271 builtin and then its argument prototype would still apply. */
9272char socket ();
9273#ifdef F77_DUMMY_MAIN
9274# ifdef __cplusplus
9275 extern "C"
9276# endif
9277 int F77_DUMMY_MAIN() { return 1; }
9278#endif
9279int
9280main ()
9281{
9282socket ();
9283 ;
9284 return 0;
9285}
9286_ACEOF
9287rm -f conftest.$ac_objext conftest$ac_exeext
9288if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9289 (eval $ac_link) 2>&5
9290 ac_status=$?
9291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9292 (exit $ac_status); } &&
9293 { ac_try='test -s conftest$ac_exeext'
9294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9295 (eval $ac_try) 2>&5
9296 ac_status=$?
9297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9298 (exit $ac_status); }; }; then
9299 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009300else
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 echo "$as_me: failed program was:" >&5
9302cat conftest.$ac_ext >&5
9303ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009304fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009305rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9306LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009307fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009308echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9309echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9310if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009311 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009312fi
9313 # BeOS
9314;;
9315esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009316
Martin v. Löwis11437992002-04-12 09:54:03 +00009317echo "$as_me:$LINENO: checking for --with-libs" >&5
9318echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9319
Guido van Rossuma68acba1996-07-31 17:36:39 +00009320# Check whether --with-libs or --without-libs was given.
9321if test "${with_libs+set}" = set; then
9322 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009323
9324echo "$as_me:$LINENO: result: $withval" >&5
9325echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009326LIBS="$withval $LIBS"
9327
9328else
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 echo "$as_me:$LINENO: result: no" >&5
9330echo "${ECHO_T}no" >&6
9331fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009332
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009333# Determine if signalmodule should be used.
9334
9335
Martin v. Löwis11437992002-04-12 09:54:03 +00009336echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9337echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9338
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009339# Check whether --with-signal-module or --without-signal-module was given.
9340if test "${with_signal_module+set}" = set; then
9341 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009342
Martin v. Löwis11437992002-04-12 09:54:03 +00009343fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009344
9345if test -z "$with_signal_module"
9346then with_signal_module="yes"
9347fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009348echo "$as_me:$LINENO: result: $with_signal_module" >&5
9349echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009350
9351if test "${with_signal_module}" = "yes"; then
9352 USE_SIGNAL_MODULE=""
9353 SIGNAL_OBJS=""
9354else
9355 USE_SIGNAL_MODULE="#"
9356 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9357fi
9358
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009359# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009360
Barry Warsawc0d24d8b2000-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 Warsawc0d24d8b2000-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 Warsawc0d24d8b2000-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 Warsawc0d24d8b2000-06-29 16:12:00 +00009414
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009415
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009416if test "$with_threads" = "no"
9417then
9418 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009419elif test "$ac_cv_pthread_is_default" = yes
9420then
Martin v. Löwis11437992002-04-12 09:54:03 +00009421 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009422#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009423_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009424
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009425 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009427#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009428_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009429
9430 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009432elif test "$ac_cv_kpthread" = "yes"
9433then
9434 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009436#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009437_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009438
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009439 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009440 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009441else
9442 if test ! -z "$with_threads" -a -d "$with_threads"
9443 then LDFLAGS="$LDFLAGS -L$with_threads"
9444 fi
9445 if test ! -z "$withval" -a -d "$withval"
9446 then LDFLAGS="$LDFLAGS -L$withval"
9447 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009448
9449 # According to the POSIX spec, a pthreads implementation must
9450 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9452echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9453 cat >conftest.$ac_ext <<_ACEOF
9454#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009455#include "confdefs.h"
9456#include <unistd.h>
9457 #ifdef _POSIX_THREADS
9458 yes
9459 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009460
9461_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009462if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9463 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009464 unistd_defines_pthreads=yes
9465else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009466 unistd_defines_pthreads=no
9467fi
9468rm -f conftest*
9469
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9471echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009472
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009474#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009475_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009476
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 if test "${ac_cv_header_cthreads_h+set}" = set; then
9478 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9479echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9480if test "${ac_cv_header_cthreads_h+set}" = set; then
9481 echo $ECHO_N "(cached) $ECHO_C" >&6
9482fi
9483echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9484echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009485else
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 # Is the header compilable?
9487echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9488echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9489cat >conftest.$ac_ext <<_ACEOF
9490#line $LINENO "configure"
9491#include "confdefs.h"
9492$ac_includes_default
9493#include <cthreads.h>
9494_ACEOF
9495rm -f conftest.$ac_objext
9496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9497 (eval $ac_compile) 2>&5
9498 ac_status=$?
9499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9500 (exit $ac_status); } &&
9501 { ac_try='test -s conftest.$ac_objext'
9502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9503 (eval $ac_try) 2>&5
9504 ac_status=$?
9505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9506 (exit $ac_status); }; }; then
9507 ac_header_compiler=yes
9508else
9509 echo "$as_me: failed program was:" >&5
9510cat conftest.$ac_ext >&5
9511ac_header_compiler=no
9512fi
9513rm -f conftest.$ac_objext conftest.$ac_ext
9514echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9515echo "${ECHO_T}$ac_header_compiler" >&6
9516
9517# Is the header present?
9518echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9519echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9520cat >conftest.$ac_ext <<_ACEOF
9521#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009522#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009523#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009524_ACEOF
9525if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9526 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9527 ac_status=$?
9528 egrep -v '^ *\+' conftest.er1 >conftest.err
9529 rm -f conftest.er1
9530 cat conftest.err >&5
9531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9532 (exit $ac_status); } >/dev/null; then
9533 if test -s conftest.err; then
9534 ac_cpp_err=$ac_c_preproc_warn_flag
9535 else
9536 ac_cpp_err=
9537 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009538else
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 ac_cpp_err=yes
9540fi
9541if test -z "$ac_cpp_err"; then
9542 ac_header_preproc=yes
9543else
9544 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009545 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009547fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009548rm -f conftest.err conftest.$ac_ext
9549echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9550echo "${ECHO_T}$ac_header_preproc" >&6
9551
9552# So? What about this header?
9553case $ac_header_compiler:$ac_header_preproc in
9554 yes:no )
9555 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9556echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9557 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9558echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9559 no:yes )
9560 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9561echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9562 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9563echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9564 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9565echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9566esac
9567echo "$as_me:$LINENO: checking for cthreads.h" >&5
9568echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9569if test "${ac_cv_header_cthreads_h+set}" = set; then
9570 echo $ECHO_N "(cached) $ECHO_C" >&6
9571else
9572 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009573fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009574echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9575echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9576
9577fi
9578if test $ac_cv_header_cthreads_h = yes; then
9579 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009580#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009581_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009582
Martin v. Löwis11437992002-04-12 09:54:03 +00009583 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009584#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009585_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009586
Martin v. Löwis11437992002-04-12 09:54:03 +00009587
9588cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009589#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009590_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009591
9592 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009593 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009594else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009595
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9597 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9598echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9599if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9600 echo $ECHO_N "(cached) $ECHO_C" >&6
9601fi
9602echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9603echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009604else
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 # Is the header compilable?
9606echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9607echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9608cat >conftest.$ac_ext <<_ACEOF
9609#line $LINENO "configure"
9610#include "confdefs.h"
9611$ac_includes_default
9612#include <mach/cthreads.h>
9613_ACEOF
9614rm -f conftest.$ac_objext
9615if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9616 (eval $ac_compile) 2>&5
9617 ac_status=$?
9618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9619 (exit $ac_status); } &&
9620 { ac_try='test -s conftest.$ac_objext'
9621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9622 (eval $ac_try) 2>&5
9623 ac_status=$?
9624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9625 (exit $ac_status); }; }; then
9626 ac_header_compiler=yes
9627else
9628 echo "$as_me: failed program was:" >&5
9629cat conftest.$ac_ext >&5
9630ac_header_compiler=no
9631fi
9632rm -f conftest.$ac_objext conftest.$ac_ext
9633echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9634echo "${ECHO_T}$ac_header_compiler" >&6
9635
9636# Is the header present?
9637echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9638echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9639cat >conftest.$ac_ext <<_ACEOF
9640#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009641#include "confdefs.h"
9642#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009643_ACEOF
9644if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9645 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9646 ac_status=$?
9647 egrep -v '^ *\+' conftest.er1 >conftest.err
9648 rm -f conftest.er1
9649 cat conftest.err >&5
9650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651 (exit $ac_status); } >/dev/null; then
9652 if test -s conftest.err; then
9653 ac_cpp_err=$ac_c_preproc_warn_flag
9654 else
9655 ac_cpp_err=
9656 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009657else
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_cpp_err=yes
9659fi
9660if test -z "$ac_cpp_err"; then
9661 ac_header_preproc=yes
9662else
9663 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009664 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009665 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009666fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009667rm -f conftest.err conftest.$ac_ext
9668echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9669echo "${ECHO_T}$ac_header_preproc" >&6
9670
9671# So? What about this header?
9672case $ac_header_compiler:$ac_header_preproc in
9673 yes:no )
9674 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9675echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9676 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9677echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9678 no:yes )
9679 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9680echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9681 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9682echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9683 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9684echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9685esac
9686echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9687echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9688if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9689 echo $ECHO_N "(cached) $ECHO_C" >&6
9690else
9691 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009692fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009693echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9694echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9695
9696fi
9697if test $ac_cv_header_mach_cthreads_h = yes; then
9698 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009699#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009700_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009701
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009703#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009704_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009705
Martin v. Löwis11437992002-04-12 09:54:03 +00009706
9707cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009708#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009709_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009710
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009711 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009712else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009713
Martin v. Löwis11437992002-04-12 09:54:03 +00009714 echo "$as_me:$LINENO: checking for --with-pth" >&5
9715echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9716
9717# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009718if test "${with_pth+set}" = set; then
9719 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009720
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 echo "$as_me:$LINENO: result: $withval" >&5
9722echo "${ECHO_T}$withval" >&6
9723 cat >>confdefs.h <<\_ACEOF
9724#define WITH_THREAD 1
9725_ACEOF
9726
9727
9728cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009729#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009730_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009731
Martin v. Löwis130fb172001-07-19 11:00:41 +00009732 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009733 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009734else
Martin v. Löwis11437992002-04-12 09:54:03 +00009735
9736 echo "$as_me:$LINENO: result: no" >&5
9737echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009738
9739 # Just looking for pthread_create in libpthread is not enough:
9740 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9741 # So we really have to include pthread.h, and then link.
9742 _libs=$LIBS
9743 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9745echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9746 cat >conftest.$ac_ext <<_ACEOF
9747#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009748#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009749#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009750
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009751void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009752#ifdef F77_DUMMY_MAIN
9753# ifdef __cplusplus
9754 extern "C"
9755# endif
9756 int F77_DUMMY_MAIN() { return 1; }
9757#endif
9758int
9759main ()
9760{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009761
9762pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 ;
9764 return 0;
9765}
9766_ACEOF
9767rm -f conftest.$ac_objext conftest$ac_exeext
9768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9769 (eval $ac_link) 2>&5
9770 ac_status=$?
9771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772 (exit $ac_status); } &&
9773 { ac_try='test -s conftest$ac_exeext'
9774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9775 (eval $ac_try) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); }; }; then
9779
9780 echo "$as_me:$LINENO: result: yes" >&5
9781echo "${ECHO_T}yes" >&6
9782 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009783#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009784_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009785
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009786 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009787 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009788else
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 echo "$as_me: failed program was:" >&5
9790cat conftest.$ac_ext >&5
9791
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009792 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9794echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9795if test "${ac_cv_func_pthread_detach+set}" = set; then
9796 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009797else
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 cat >conftest.$ac_ext <<_ACEOF
9799#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009800#include "confdefs.h"
9801/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00009803#include <assert.h>
9804/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009805#ifdef __cplusplus
9806extern "C"
9807#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009808/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 builtin and then its argument prototype would still apply. */
9810char pthread_detach ();
9811char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +00009812
Martin v. Löwis11437992002-04-12 09:54:03 +00009813#ifdef F77_DUMMY_MAIN
9814# ifdef __cplusplus
9815 extern "C"
9816# endif
9817 int F77_DUMMY_MAIN() { return 1; }
9818#endif
9819int
9820main ()
9821{
Guido van Rossumad678af1998-10-02 14:42:15 +00009822/* The GNU C library defines this for functions which it implements
9823 to always fail with ENOSYS. Some functions are actually named
9824 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00009825#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00009826choke me
9827#else
Martin v. Löwis11437992002-04-12 09:54:03 +00009828f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00009829#endif
9830
Martin v. Löwis11437992002-04-12 09:54:03 +00009831 ;
9832 return 0;
9833}
9834_ACEOF
9835rm -f conftest.$ac_objext conftest$ac_exeext
9836if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9837 (eval $ac_link) 2>&5
9838 ac_status=$?
9839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9840 (exit $ac_status); } &&
9841 { ac_try='test -s conftest$ac_exeext'
9842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9843 (eval $ac_try) 2>&5
9844 ac_status=$?
9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846 (exit $ac_status); }; }; then
9847 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009848else
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 echo "$as_me: failed program was:" >&5
9850cat conftest.$ac_ext >&5
9851ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009852fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009853rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +00009854fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009855echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
9856echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
9857if test $ac_cv_func_pthread_detach = yes; then
9858 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009859#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009860_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009861
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009862 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009863 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009864else
Guido van Rossumad678af1998-10-02 14:42:15 +00009865
Martin v. Löwis11437992002-04-12 09:54:03 +00009866 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9867 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9868echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9869if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9870 echo $ECHO_N "(cached) $ECHO_C" >&6
9871fi
9872echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9873echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009874else
Martin v. Löwis11437992002-04-12 09:54:03 +00009875 # Is the header compilable?
9876echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
9877echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
9878cat >conftest.$ac_ext <<_ACEOF
9879#line $LINENO "configure"
9880#include "confdefs.h"
9881$ac_includes_default
9882#include <kernel/OS.h>
9883_ACEOF
9884rm -f conftest.$ac_objext
9885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9886 (eval $ac_compile) 2>&5
9887 ac_status=$?
9888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9889 (exit $ac_status); } &&
9890 { ac_try='test -s conftest.$ac_objext'
9891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9892 (eval $ac_try) 2>&5
9893 ac_status=$?
9894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9895 (exit $ac_status); }; }; then
9896 ac_header_compiler=yes
9897else
9898 echo "$as_me: failed program was:" >&5
9899cat conftest.$ac_ext >&5
9900ac_header_compiler=no
9901fi
9902rm -f conftest.$ac_objext conftest.$ac_ext
9903echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9904echo "${ECHO_T}$ac_header_compiler" >&6
9905
9906# Is the header present?
9907echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
9908echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
9909cat >conftest.$ac_ext <<_ACEOF
9910#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009911#include "confdefs.h"
9912#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009913_ACEOF
9914if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9915 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9916 ac_status=$?
9917 egrep -v '^ *\+' conftest.er1 >conftest.err
9918 rm -f conftest.er1
9919 cat conftest.err >&5
9920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9921 (exit $ac_status); } >/dev/null; then
9922 if test -s conftest.err; then
9923 ac_cpp_err=$ac_c_preproc_warn_flag
9924 else
9925 ac_cpp_err=
9926 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009927else
Martin v. Löwis11437992002-04-12 09:54:03 +00009928 ac_cpp_err=yes
9929fi
9930if test -z "$ac_cpp_err"; then
9931 ac_header_preproc=yes
9932else
9933 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009934 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009935 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009936fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009937rm -f conftest.err conftest.$ac_ext
9938echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9939echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009940
Martin v. Löwis11437992002-04-12 09:54:03 +00009941# So? What about this header?
9942case $ac_header_compiler:$ac_header_preproc in
9943 yes:no )
9944 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
9945echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9946 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9947echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9948 no:yes )
9949 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
9950echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
9951 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
9952echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
9953 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
9954echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
9955esac
9956echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
9957echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
9958if test "${ac_cv_header_kernel_OS_h+set}" = set; then
9959 echo $ECHO_N "(cached) $ECHO_C" >&6
9960else
9961 ac_cv_header_kernel_OS_h=$ac_header_preproc
9962fi
9963echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
9964echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
9965
9966fi
9967if test $ac_cv_header_kernel_OS_h = yes; then
9968 cat >>confdefs.h <<\_ACEOF
9969#define WITH_THREAD 1
9970_ACEOF
9971
9972
9973cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009974#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009975_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009976
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009977 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009978else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009979
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
9981echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
9982if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
9983 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009984else
Martin v. Löwis11437992002-04-12 09:54:03 +00009985 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009986LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009987cat >conftest.$ac_ext <<_ACEOF
9988#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00009989#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009990
Greg Steinadf63d62000-07-05 10:38:09 +00009991/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009992#ifdef __cplusplus
9993extern "C"
9994#endif
Greg Steinadf63d62000-07-05 10:38:09 +00009995/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009996 builtin and then its argument prototype would still apply. */
9997char pthread_create ();
9998#ifdef F77_DUMMY_MAIN
9999# ifdef __cplusplus
10000 extern "C"
10001# endif
10002 int F77_DUMMY_MAIN() { return 1; }
10003#endif
10004int
10005main ()
10006{
10007pthread_create ();
10008 ;
10009 return 0;
10010}
10011_ACEOF
10012rm -f conftest.$ac_objext conftest$ac_exeext
10013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10014 (eval $ac_link) 2>&5
10015 ac_status=$?
10016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017 (exit $ac_status); } &&
10018 { ac_try='test -s conftest$ac_exeext'
10019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10020 (eval $ac_try) 2>&5
10021 ac_status=$?
10022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10023 (exit $ac_status); }; }; then
10024 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010025else
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 echo "$as_me: failed program was:" >&5
10027cat conftest.$ac_ext >&5
10028ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10031LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010032fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010033echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10034echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10035if test $ac_cv_lib_pthreads_pthread_create = yes; then
10036 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010037#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010038_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010039
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010040 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010041 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010042 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010043else
Greg Steinadf63d62000-07-05 10:38:09 +000010044
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10046echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10047if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10048 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010049else
Martin v. Löwis11437992002-04-12 09:54:03 +000010050 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010051LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010052cat >conftest.$ac_ext <<_ACEOF
10053#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010054#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010055
Guido van Rossum49545951997-12-02 19:28:29 +000010056/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010057#ifdef __cplusplus
10058extern "C"
10059#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010060/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010061 builtin and then its argument prototype would still apply. */
10062char pthread_create ();
10063#ifdef F77_DUMMY_MAIN
10064# ifdef __cplusplus
10065 extern "C"
10066# endif
10067 int F77_DUMMY_MAIN() { return 1; }
10068#endif
10069int
10070main ()
10071{
10072pthread_create ();
10073 ;
10074 return 0;
10075}
10076_ACEOF
10077rm -f conftest.$ac_objext conftest$ac_exeext
10078if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10079 (eval $ac_link) 2>&5
10080 ac_status=$?
10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); } &&
10083 { ac_try='test -s conftest$ac_exeext'
10084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10085 (eval $ac_try) 2>&5
10086 ac_status=$?
10087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088 (exit $ac_status); }; }; then
10089 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010090else
Martin v. Löwis11437992002-04-12 09:54:03 +000010091 echo "$as_me: failed program was:" >&5
10092cat conftest.$ac_ext >&5
10093ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010094fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010095rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10096LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010097fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010098echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10099echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10100if test $ac_cv_lib_c_r_pthread_create = yes; then
10101 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010102#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010103_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010104
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010105 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010106 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010107 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010108else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010109
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10111echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10112if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10113 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010114else
Martin v. Löwis11437992002-04-12 09:54:03 +000010115 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010116LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010117cat >conftest.$ac_ext <<_ACEOF
10118#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010119#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010120
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010121/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010122#ifdef __cplusplus
10123extern "C"
10124#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010125/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010126 builtin and then its argument prototype would still apply. */
10127char __d6_pthread_create ();
10128#ifdef F77_DUMMY_MAIN
10129# ifdef __cplusplus
10130 extern "C"
10131# endif
10132 int F77_DUMMY_MAIN() { return 1; }
10133#endif
10134int
10135main ()
10136{
10137__d6_pthread_create ();
10138 ;
10139 return 0;
10140}
10141_ACEOF
10142rm -f conftest.$ac_objext conftest$ac_exeext
10143if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10144 (eval $ac_link) 2>&5
10145 ac_status=$?
10146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10147 (exit $ac_status); } &&
10148 { ac_try='test -s conftest$ac_exeext'
10149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10150 (eval $ac_try) 2>&5
10151 ac_status=$?
10152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153 (exit $ac_status); }; }; then
10154 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010155else
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 echo "$as_me: failed program was:" >&5
10157cat conftest.$ac_ext >&5
10158ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010159fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010160rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10161LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010163echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10164echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10165if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10166 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010167#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010168_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010169
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010170 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010171 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010172 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010173else
Guido van Rossum49545951997-12-02 19:28:29 +000010174
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10176echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10177if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10178 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010179else
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010181LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010182cat >conftest.$ac_ext <<_ACEOF
10183#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010184#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010185
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010186/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010187#ifdef __cplusplus
10188extern "C"
10189#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010190/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 builtin and then its argument prototype would still apply. */
10192char __pthread_create_system ();
10193#ifdef F77_DUMMY_MAIN
10194# ifdef __cplusplus
10195 extern "C"
10196# endif
10197 int F77_DUMMY_MAIN() { return 1; }
10198#endif
10199int
10200main ()
10201{
10202__pthread_create_system ();
10203 ;
10204 return 0;
10205}
10206_ACEOF
10207rm -f conftest.$ac_objext conftest$ac_exeext
10208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10209 (eval $ac_link) 2>&5
10210 ac_status=$?
10211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10212 (exit $ac_status); } &&
10213 { ac_try='test -s conftest$ac_exeext'
10214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10215 (eval $ac_try) 2>&5
10216 ac_status=$?
10217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10218 (exit $ac_status); }; }; then
10219 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010220else
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 echo "$as_me: failed program was:" >&5
10222cat conftest.$ac_ext >&5
10223ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010224fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010225rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10226LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010227fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010228echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10229echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10230if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10231 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010232#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010233_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010234
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010235 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010236 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010237 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010238else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010239
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10241echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10242if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10243 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010244else
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010246LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010247cat >conftest.$ac_ext <<_ACEOF
10248#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010249#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010250
Guido van Rossumb93a8621998-05-07 13:27:32 +000010251/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010252#ifdef __cplusplus
10253extern "C"
10254#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010255/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 builtin and then its argument prototype would still apply. */
10257char pthread_create ();
10258#ifdef F77_DUMMY_MAIN
10259# ifdef __cplusplus
10260 extern "C"
10261# endif
10262 int F77_DUMMY_MAIN() { return 1; }
10263#endif
10264int
10265main ()
10266{
10267pthread_create ();
10268 ;
10269 return 0;
10270}
10271_ACEOF
10272rm -f conftest.$ac_objext conftest$ac_exeext
10273if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10274 (eval $ac_link) 2>&5
10275 ac_status=$?
10276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10277 (exit $ac_status); } &&
10278 { ac_try='test -s conftest$ac_exeext'
10279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10280 (eval $ac_try) 2>&5
10281 ac_status=$?
10282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10283 (exit $ac_status); }; }; then
10284 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010285else
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 echo "$as_me: failed program was:" >&5
10287cat conftest.$ac_ext >&5
10288ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010290rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10291LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010292fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010293echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10294echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10295if test $ac_cv_lib_cma_pthread_create = yes; then
10296 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010297#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010298_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010299
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010300 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010301 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010302 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010303else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010304
Martin v. Löwis130fb172001-07-19 11:00:41 +000010305 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010306fi
10307
Guido van Rossum627b2d71993-12-24 10:39:16 +000010308
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010309fi
10310
Guido van Rossum0be3e491997-05-22 20:33:33 +000010311fi
10312
Guido van Rossum49545951997-12-02 19:28:29 +000010313fi
10314
Guido van Rossumb93a8621998-05-07 13:27:32 +000010315fi
10316
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010317fi
10318
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010319
Michael W. Hudson54241132001-12-07 15:38:26 +000010320fi
10321
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010322fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010323rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10324fi;
10325fi
10326
10327
10328fi
10329
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010330
Michael W. Hudson54241132001-12-07 15:38:26 +000010331
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010332 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010333 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010334
10335cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010336#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010337_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010338
10339 fi
10340
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10342echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10343 if test "${ac_cv_pthread_system_supported+set}" = set; then
10344 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010345else
10346 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010347 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010348else
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 cat >conftest.$ac_ext <<_ACEOF
10350#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010351#include "confdefs.h"
10352#include <pthread.h>
10353 void *foo(void *parm) {
10354 return NULL;
10355 }
10356 main() {
10357 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010358 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010359 if (pthread_attr_init(&attr)) exit(-1);
10360 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010361 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010362 exit(0);
10363 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010364_ACEOF
10365rm -f conftest$ac_exeext
10366if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10367 (eval $ac_link) 2>&5
10368 ac_status=$?
10369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10370 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10372 (eval $ac_try) 2>&5
10373 ac_status=$?
10374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10375 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010376 ac_cv_pthread_system_supported=yes
10377else
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 echo "$as_me: program exited with status $ac_status" >&5
10379echo "$as_me: failed program was:" >&5
10380cat conftest.$ac_ext >&5
10381( exit $ac_status )
10382ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010383fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010384rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010385fi
10386
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010387fi
10388
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10390echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010391 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010392
10393cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010394#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010395_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010396
10397 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010398
10399for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010400do
Martin v. Löwis11437992002-04-12 09:54:03 +000010401as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10402echo "$as_me:$LINENO: checking for $ac_func" >&5
10403echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10404if eval "test \"\${$as_ac_var+set}\" = set"; then
10405 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010406else
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 cat >conftest.$ac_ext <<_ACEOF
10408#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010409#include "confdefs.h"
10410/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010411 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010412#include <assert.h>
10413/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010414#ifdef __cplusplus
10415extern "C"
10416#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010417/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 builtin and then its argument prototype would still apply. */
10419char $ac_func ();
10420char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010421
Martin v. Löwis11437992002-04-12 09:54:03 +000010422#ifdef F77_DUMMY_MAIN
10423# ifdef __cplusplus
10424 extern "C"
10425# endif
10426 int F77_DUMMY_MAIN() { return 1; }
10427#endif
10428int
10429main ()
10430{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010431/* The GNU C library defines this for functions which it implements
10432 to always fail with ENOSYS. Some functions are actually named
10433 something starting with __ and the normal name is an alias. */
10434#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10435choke me
10436#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010437f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010438#endif
10439
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 ;
10441 return 0;
10442}
10443_ACEOF
10444rm -f conftest.$ac_objext conftest$ac_exeext
10445if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10446 (eval $ac_link) 2>&5
10447 ac_status=$?
10448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10449 (exit $ac_status); } &&
10450 { ac_try='test -s conftest$ac_exeext'
10451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10452 (eval $ac_try) 2>&5
10453 ac_status=$?
10454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10455 (exit $ac_status); }; }; then
10456 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010457else
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 echo "$as_me: failed program was:" >&5
10459cat conftest.$ac_ext >&5
10460eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010461fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010462rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010463fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010464echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10465echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10466if test `eval echo '${'$as_ac_var'}'` = yes; then
10467 cat >>confdefs.h <<_ACEOF
10468#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10469_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010470
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010471fi
10472done
10473
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010474 fi
10475
Martin v. Löwis11437992002-04-12 09:54:03 +000010476 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10477echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10478if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10479 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010480else
Martin v. Löwis11437992002-04-12 09:54:03 +000010481 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010482LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010483cat >conftest.$ac_ext <<_ACEOF
10484#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010485#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010486
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010487/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010488#ifdef __cplusplus
10489extern "C"
10490#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010491/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010492 builtin and then its argument prototype would still apply. */
10493char usconfig ();
10494#ifdef F77_DUMMY_MAIN
10495# ifdef __cplusplus
10496 extern "C"
10497# endif
10498 int F77_DUMMY_MAIN() { return 1; }
10499#endif
10500int
10501main ()
10502{
10503usconfig ();
10504 ;
10505 return 0;
10506}
10507_ACEOF
10508rm -f conftest.$ac_objext conftest$ac_exeext
10509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10510 (eval $ac_link) 2>&5
10511 ac_status=$?
10512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10513 (exit $ac_status); } &&
10514 { ac_try='test -s conftest$ac_exeext'
10515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10516 (eval $ac_try) 2>&5
10517 ac_status=$?
10518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10519 (exit $ac_status); }; }; then
10520 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010521else
Martin v. Löwis11437992002-04-12 09:54:03 +000010522 echo "$as_me: failed program was:" >&5
10523cat conftest.$ac_ext >&5
10524ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010525fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010526rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10527LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010528fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010529echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10530echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10531if test $ac_cv_lib_mpc_usconfig = yes; then
10532 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010533#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010534_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010535
Martin v. Löwis130fb172001-07-19 11:00:41 +000010536 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010537 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010538 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010539fi
10540
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010541
Martin v. Löwis11437992002-04-12 09:54:03 +000010542 if test $posix_threads != "yes"; then
10543 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10544echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10545if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10546 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010547else
Martin v. Löwis11437992002-04-12 09:54:03 +000010548 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010549LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010550cat >conftest.$ac_ext <<_ACEOF
10551#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010552#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010554/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010555#ifdef __cplusplus
10556extern "C"
10557#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010558/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 builtin and then its argument prototype would still apply. */
10560char thr_create ();
10561#ifdef F77_DUMMY_MAIN
10562# ifdef __cplusplus
10563 extern "C"
10564# endif
10565 int F77_DUMMY_MAIN() { return 1; }
10566#endif
10567int
10568main ()
10569{
10570thr_create ();
10571 ;
10572 return 0;
10573}
10574_ACEOF
10575rm -f conftest.$ac_objext conftest$ac_exeext
10576if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10577 (eval $ac_link) 2>&5
10578 ac_status=$?
10579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10580 (exit $ac_status); } &&
10581 { ac_try='test -s conftest$ac_exeext'
10582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10583 (eval $ac_try) 2>&5
10584 ac_status=$?
10585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10586 (exit $ac_status); }; }; then
10587 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010588else
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 echo "$as_me: failed program was:" >&5
10590cat conftest.$ac_ext >&5
10591ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010593rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10594LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010595fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010596echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10597echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10598if test $ac_cv_lib_thread_thr_create = yes; then
10599 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010600#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010601_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010602
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010603 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010604 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010605 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010606fi
10607
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010608 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010609
Martin v. Löwis130fb172001-07-19 11:00:41 +000010610 if test "$USE_THREAD_MODULE" != "#"
10611 then
10612 # If the above checks didn't disable threads, (at least) OSF1
10613 # needs this '-threads' argument during linking.
10614 case $ac_sys_system in
10615 OSF1) LDLAST=-threads;;
10616 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010617 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010618fi
10619
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010620# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010621
10622
10623echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10624echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010625# Check whether --enable-ipv6 or --disable-ipv6 was given.
10626if test "${enable_ipv6+set}" = set; then
10627 enableval="$enable_ipv6"
10628 case "$enableval" in
10629 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010630 echo "$as_me:$LINENO: result: no" >&5
10631echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010632 ipv6=no
10633 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 *) echo "$as_me:$LINENO: result: yes" >&5
10635echo "${ECHO_T}yes" >&6
10636 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010637#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010638_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010639
10640 ipv6=yes
10641 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010642 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010643else
Martin v. Löwis11437992002-04-12 09:54:03 +000010644
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010645 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010646 echo "$as_me:$LINENO: result: no" >&5
10647echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010648 ipv6=no
10649
10650else
Martin v. Löwis11437992002-04-12 09:54:03 +000010651 cat >conftest.$ac_ext <<_ACEOF
10652#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010653#include "confdefs.h"
10654 /* AF_INET6 available check */
10655#include <sys/types.h>
10656#include <sys/socket.h>
10657main()
10658{
10659 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10660 exit(1);
10661 else
10662 exit(0);
10663}
10664
Martin v. Löwis11437992002-04-12 09:54:03 +000010665_ACEOF
10666rm -f conftest$ac_exeext
10667if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10668 (eval $ac_link) 2>&5
10669 ac_status=$?
10670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10671 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10673 (eval $ac_try) 2>&5
10674 ac_status=$?
10675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10676 (exit $ac_status); }; }; then
10677 echo "$as_me:$LINENO: result: yes" >&5
10678echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010679 ipv6=yes
10680else
Martin v. Löwis11437992002-04-12 09:54:03 +000010681 echo "$as_me: program exited with status $ac_status" >&5
10682echo "$as_me: failed program was:" >&5
10683cat conftest.$ac_ext >&5
10684( exit $ac_status )
10685echo "$as_me:$LINENO: result: no" >&5
10686echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010687 ipv6=no
10688fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010689rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010690fi
10691
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010692if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10694echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10695 cat >conftest.$ac_ext <<_ACEOF
10696#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010697#include "confdefs.h"
10698#include <sys/types.h>
10699#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010700#ifdef F77_DUMMY_MAIN
10701# ifdef __cplusplus
10702 extern "C"
10703# endif
10704 int F77_DUMMY_MAIN() { return 1; }
10705#endif
10706int
10707main ()
10708{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010709struct sockaddr_in6 x;
10710x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 ;
10712 return 0;
10713}
10714_ACEOF
10715rm -f conftest.$ac_objext
10716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10717 (eval $ac_compile) 2>&5
10718 ac_status=$?
10719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10720 (exit $ac_status); } &&
10721 { ac_try='test -s conftest.$ac_objext'
10722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10723 (eval $ac_try) 2>&5
10724 ac_status=$?
10725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10726 (exit $ac_status); }; }; then
10727 echo "$as_me:$LINENO: result: yes" >&5
10728echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010729 ipv6=yes
10730else
Martin v. Löwis11437992002-04-12 09:54:03 +000010731 echo "$as_me: failed program was:" >&5
10732cat conftest.$ac_ext >&5
10733echo "$as_me:$LINENO: result: no" >&5
10734echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010735 ipv6=no
10736fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010737rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010738fi
10739
10740if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010741 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010742#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010743_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010744
10745fi
10746
Martin v. Löwis11437992002-04-12 09:54:03 +000010747fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748
10749ipv6type=unknown
10750ipv6lib=none
10751ipv6trylibc=no
10752
10753if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010754 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
10755echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000010756 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10757 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758 case $i in
10759 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 cat >conftest.$ac_ext <<_ACEOF
10761#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010762#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010763
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764#include <netinet/in.h>
10765#ifdef IPV6_INRIA_VERSION
10766yes
10767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010768_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10770 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010771 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772fi
10773rm -f conftest*
10774
10775 ;;
10776 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 cat >conftest.$ac_ext <<_ACEOF
10778#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781#include <netinet/in.h>
10782#ifdef __KAME__
10783yes
10784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010785_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10787 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788 ipv6type=$i;
10789 ipv6lib=inet6
10790 ipv6libdir=/usr/local/v6/lib
10791 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792fi
10793rm -f conftest*
10794
10795 ;;
10796 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000010797 cat >conftest.$ac_ext <<_ACEOF
10798#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010799#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010800
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801#include <features.h>
10802#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10803yes
10804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010805_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10807 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010808 ipv6type=$i;
10809 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810fi
10811rm -f conftest*
10812
10813 ;;
10814 linux-inet6)
10815 if test -d /usr/inet6; then
10816 ipv6type=$i
10817 ipv6lib=inet6
10818 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010819 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820 fi
10821 ;;
10822 solaris)
10823 if test -f /etc/netconfig; then
10824 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
10825 ipv6type=$i
10826 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827 fi
10828 fi
10829 ;;
10830 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000010831 cat >conftest.$ac_ext <<_ACEOF
10832#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010834
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835#include <sys/param.h>
10836#ifdef _TOSHIBA_INET6
10837yes
10838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010839_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10841 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842 ipv6type=$i;
10843 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010844 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010845fi
10846rm -f conftest*
10847
10848 ;;
10849 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000010850 cat >conftest.$ac_ext <<_ACEOF
10851#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010853
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854#include </usr/local/v6/include/sys/v6config.h>
10855#ifdef __V6D__
10856yes
10857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010858_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10860 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861 ipv6type=$i;
10862 ipv6lib=v6;
10863 ipv6libdir=/usr/local/v6/lib;
10864 OPT="-I/usr/local/v6/include $OPT"
10865fi
10866rm -f conftest*
10867
10868 ;;
10869 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000010870 cat >conftest.$ac_ext <<_ACEOF
10871#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010872#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010873
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874#include <sys/param.h>
10875#ifdef _ZETA_MINAMI_INET6
10876yes
10877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010878_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10880 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010881 ipv6type=$i;
10882 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010883 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010884fi
10885rm -f conftest*
10886
10887 ;;
10888 esac
10889 if test "$ipv6type" != "unknown"; then
10890 break
10891 fi
10892 done
Martin v. Löwis11437992002-04-12 09:54:03 +000010893 echo "$as_me:$LINENO: result: $ipv6type" >&5
10894echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895fi
10896
10897if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10898 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10899 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10900 echo "using lib$ipv6lib"
10901 else
10902 if test $ipv6trylibc = "yes"; then
10903 echo "using libc"
10904 else
10905 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10906 echo "You need to fetch lib$ipv6lib.a from appropriate"
10907 echo 'ipv6 kit and compile beforehand.'
10908 exit 1
10909 fi
10910 fi
10911fi
10912
Barry Warsawef82cd72000-06-30 16:21:01 +000010913# Check for GC support
Martin v. Löwis11437992002-04-12 09:54:03 +000010914echo "$as_me:$LINENO: checking for --with-cycle-gc" >&5
10915echo $ECHO_N "checking for --with-cycle-gc... $ECHO_C" >&6
10916
Barry Warsawef82cd72000-06-30 16:21:01 +000010917# Check whether --with-cycle-gc or --without-cycle-gc was given.
10918if test "${with_cycle_gc+set}" = set; then
10919 withval="$with_cycle_gc"
Barry Warsawef82cd72000-06-30 16:21:01 +000010920
Martin v. Löwis11437992002-04-12 09:54:03 +000010921fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000010922
10923if test -z "$with_cycle_gc"
10924then with_cycle_gc="yes"
10925fi
Neil Schemenauercf229462001-08-29 23:58:47 +000010926if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +000010927then
Martin v. Löwis11437992002-04-12 09:54:03 +000010928
10929cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010930#define WITH_CYCLE_GC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010931_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010932
10933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010934echo "$as_me:$LINENO: result: $with_cycle_gc" >&5
10935echo "${ECHO_T}$with_cycle_gc" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000010936
Jack Jansen7b8c7542002-04-14 20:12:41 +000010937# Check for universal newline support
10938echo "$as_me:$LINENO: checking for --with-universal-newline" >&5
10939echo $ECHO_N "checking for --with-universal-newline... $ECHO_C" >&6
10940
10941# Check whether --with-universal-newlines or --without-universal-newlines was given.
10942if test "${with_universal_newlines+set}" = set; then
10943 withval="$with_universal_newlines"
10944
10945fi;
10946
10947if test -z "$with_universal_newlines"
10948then with_universal_newlines="yes"
10949fi
10950if test "$with_universal_newlines" != "no"
10951then
10952 cat >>confdefs.h <<\_ACEOF
10953#define WITH_UNIVERSAL_NEWLINES 1
10954_ACEOF
10955
10956fi
10957echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
10958echo "${ECHO_T}$with_universal_newlines" >&6
10959
Neil Schemenauera35c6882001-02-27 04:45:05 +000010960# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000010961echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
10962echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
10963
Neil Schemenauera35c6882001-02-27 04:45:05 +000010964# Check whether --with-pymalloc or --without-pymalloc was given.
10965if test "${with_pymalloc+set}" = set; then
10966 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000010967
Martin v. Löwis11437992002-04-12 09:54:03 +000010968fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000010969
Neil Schemenauer16c22972002-03-22 15:34:49 +000010970if test -z "$with_pymalloc"
10971then with_pymalloc="yes"
10972fi
10973if test "$with_pymalloc" != "no"
10974then
Martin v. Löwis11437992002-04-12 09:54:03 +000010975
10976cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010977#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010978_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000010979
10980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010981echo "$as_me:$LINENO: result: $with_pymalloc" >&5
10982echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000010983
Barry Warsawef82cd72000-06-30 16:21:01 +000010984# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000010985echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
10986echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
10987
Barry Warsawef82cd72000-06-30 16:21:01 +000010988# Check whether --with-wctype-functions or --without-wctype-functions was given.
10989if test "${with_wctype_functions+set}" = set; then
10990 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000010991
Barry Warsawef82cd72000-06-30 16:21:01 +000010992if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010993then
10994
10995cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000010996#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010997_ACEOF
10998
10999 echo "$as_me:$LINENO: result: yes" >&5
11000echo "${ECHO_T}yes" >&6
11001else echo "$as_me:$LINENO: result: no" >&5
11002echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011003fi
11004else
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 echo "$as_me:$LINENO: result: no" >&5
11006echo "${ECHO_T}no" >&6
11007fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011008
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011009# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011010
Guido van Rossum98935bf2001-09-05 19:13:16 +000011011DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011012
Martin v. Löwis11437992002-04-12 09:54:03 +000011013echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11014echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11015
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011016# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011017if test "${with_sgi_dl+set}" = set; then
11018 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011019
11020echo "$as_me:$LINENO: result: $withval" >&5
11021echo "${ECHO_T}$withval" >&6
11022
11023cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011024#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011025_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011026
Guido van Rossume97ee181999-12-20 21:27:22 +000011027DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011028dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011029if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011030then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011031else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11032echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11033 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011034fi
11035DLINCLDIR=${dldir}
11036LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011037else
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 echo "$as_me:$LINENO: result: no" >&5
11039echo "${ECHO_T}no" >&6
11040fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011041
Martin v. Löwis11437992002-04-12 09:54:03 +000011042echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11043echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011044
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011045# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011046if test "${with_dl_dld+set}" = set; then
11047 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011048
11049echo "$as_me:$LINENO: result: $withval" >&5
11050echo "${ECHO_T}$withval" >&6
11051
11052cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011053#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011054_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011055
Guido van Rossume97ee181999-12-20 21:27:22 +000011056DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011057dldir=`echo "$withval" | sed 's/,.*//'`
11058dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011059if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011060then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011061else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11062echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11063 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011064fi
11065DLINCLDIR=${dldir}
11066LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011067else
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 echo "$as_me:$LINENO: result: no" >&5
11069echo "${ECHO_T}no" >&6
11070fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011071
Guido van Rossume97ee181999-12-20 21:27:22 +000011072# the dlopen() function means we might want to use dynload_shlib.o. some
11073# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011074
Thomas Wouters3a584202000-08-05 23:28:51 +000011075for ac_func in dlopen
11076do
Martin v. Löwis11437992002-04-12 09:54:03 +000011077as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11078echo "$as_me:$LINENO: checking for $ac_func" >&5
11079echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11080if eval "test \"\${$as_ac_var+set}\" = set"; then
11081 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011082else
Martin v. Löwis11437992002-04-12 09:54:03 +000011083 cat >conftest.$ac_ext <<_ACEOF
11084#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011085#include "confdefs.h"
11086/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011088#include <assert.h>
11089/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011090#ifdef __cplusplus
11091extern "C"
11092#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011093/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 builtin and then its argument prototype would still apply. */
11095char $ac_func ();
11096char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011097
Martin v. Löwis11437992002-04-12 09:54:03 +000011098#ifdef F77_DUMMY_MAIN
11099# ifdef __cplusplus
11100 extern "C"
11101# endif
11102 int F77_DUMMY_MAIN() { return 1; }
11103#endif
11104int
11105main ()
11106{
Guido van Rossume97ee181999-12-20 21:27:22 +000011107/* The GNU C library defines this for functions which it implements
11108 to always fail with ENOSYS. Some functions are actually named
11109 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011110#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011111choke me
11112#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011113f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011114#endif
11115
Martin v. Löwis11437992002-04-12 09:54:03 +000011116 ;
11117 return 0;
11118}
11119_ACEOF
11120rm -f conftest.$ac_objext conftest$ac_exeext
11121if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11122 (eval $ac_link) 2>&5
11123 ac_status=$?
11124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11125 (exit $ac_status); } &&
11126 { ac_try='test -s conftest$ac_exeext'
11127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11128 (eval $ac_try) 2>&5
11129 ac_status=$?
11130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11131 (exit $ac_status); }; }; then
11132 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011133else
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 echo "$as_me: failed program was:" >&5
11135cat conftest.$ac_ext >&5
11136eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011137fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011138rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011139fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011140echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11141echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11142if test `eval echo '${'$as_ac_var'}'` = yes; then
11143 cat >>confdefs.h <<_ACEOF
11144#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11145_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011146
Guido van Rossume97ee181999-12-20 21:27:22 +000011147fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011148done
Guido van Rossume97ee181999-12-20 21:27:22 +000011149
Michael W. Hudson54241132001-12-07 15:38:26 +000011150
Guido van Rossume97ee181999-12-20 21:27:22 +000011151# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11152# loading of modules.
11153
Martin v. Löwis11437992002-04-12 09:54:03 +000011154echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11155echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011156if test -z "$DYNLOADFILE"
11157then
11158 case $ac_sys_system/$ac_sys_release in
11159 AIX*) DYNLOADFILE="dynload_aix.o";;
11160 BeOS*) DYNLOADFILE="dynload_beos.o";;
11161 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011162 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011163 *)
11164 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11165 # out any dynamic loading
11166 if test "$ac_cv_func_dlopen" = yes
11167 then DYNLOADFILE="dynload_shlib.o"
11168 else DYNLOADFILE="dynload_stub.o"
11169 fi
11170 ;;
11171 esac
11172fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011173echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11174echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011175if test "$DYNLOADFILE" != "dynload_stub.o"
11176then
Martin v. Löwis11437992002-04-12 09:54:03 +000011177
11178cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011179#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011180_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011181
11182fi
11183
Neil Schemenauer4e425612001-06-19 15:44:15 +000011184# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11185
Michael W. Hudson54241132001-12-07 15:38:26 +000011186
Martin v. Löwis11437992002-04-12 09:54:03 +000011187echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11188echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011189if test -z "$MACHDEP_OBJS"
11190then
Jack Jansene578a632001-08-15 01:27:14 +000011191 MACHDEP_OBJS=$extra_machdep_objs
11192else
11193 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011194fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011195echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11196echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011197
Guido van Rossum627b2d71993-12-24 10:39:16 +000011198# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011272
Fred Drake6b3cc522002-04-15 19:20:27 +000011273
Martin v. Löwis244edc82001-10-04 22:44:26 +000011274for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011275 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +000011276 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011277 hstrerror inet_pton kill killpg link lstat mkfifo mknod mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +000011278 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011279 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011280 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011281 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +000011282 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +000011283 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +000011284 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011285do
Martin v. Löwis11437992002-04-12 09:54:03 +000011286as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11287echo "$as_me:$LINENO: checking for $ac_func" >&5
11288echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11289if eval "test \"\${$as_ac_var+set}\" = set"; then
11290 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011291else
Martin v. Löwis11437992002-04-12 09:54:03 +000011292 cat >conftest.$ac_ext <<_ACEOF
11293#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011294#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011295/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011296 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011297#include <assert.h>
11298/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011299#ifdef __cplusplus
11300extern "C"
11301#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011302/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011303 builtin and then its argument prototype would still apply. */
11304char $ac_func ();
11305char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011306
Martin v. Löwis11437992002-04-12 09:54:03 +000011307#ifdef F77_DUMMY_MAIN
11308# ifdef __cplusplus
11309 extern "C"
11310# endif
11311 int F77_DUMMY_MAIN() { return 1; }
11312#endif
11313int
11314main ()
11315{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011316/* The GNU C library defines this for functions which it implements
11317 to always fail with ENOSYS. Some functions are actually named
11318 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011319#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011320choke me
11321#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011322f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011323#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011324
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 ;
11326 return 0;
11327}
11328_ACEOF
11329rm -f conftest.$ac_objext conftest$ac_exeext
11330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11331 (eval $ac_link) 2>&5
11332 ac_status=$?
11333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11334 (exit $ac_status); } &&
11335 { ac_try='test -s conftest$ac_exeext'
11336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11337 (eval $ac_try) 2>&5
11338 ac_status=$?
11339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11340 (exit $ac_status); }; }; then
11341 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011342else
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 echo "$as_me: failed program was:" >&5
11344cat conftest.$ac_ext >&5
11345eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011347rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011349echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11350echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11351if test `eval echo '${'$as_ac_var'}'` = yes; then
11352 cat >>confdefs.h <<_ACEOF
11353#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11354_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011355
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011356fi
11357done
11358
Michael W. Hudson54241132001-12-07 15:38:26 +000011359
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011360# check for openpty and forkpty
11361
Martin v. Löwis11437992002-04-12 09:54:03 +000011362
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011363for ac_func in openpty
11364do
Martin v. Löwis11437992002-04-12 09:54:03 +000011365as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11366echo "$as_me:$LINENO: checking for $ac_func" >&5
11367echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11368if eval "test \"\${$as_ac_var+set}\" = set"; then
11369 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011370else
Martin v. Löwis11437992002-04-12 09:54:03 +000011371 cat >conftest.$ac_ext <<_ACEOF
11372#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011373#include "confdefs.h"
11374/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011376#include <assert.h>
11377/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011378#ifdef __cplusplus
11379extern "C"
11380#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011381/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 builtin and then its argument prototype would still apply. */
11383char $ac_func ();
11384char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011385
Martin v. Löwis11437992002-04-12 09:54:03 +000011386#ifdef F77_DUMMY_MAIN
11387# ifdef __cplusplus
11388 extern "C"
11389# endif
11390 int F77_DUMMY_MAIN() { return 1; }
11391#endif
11392int
11393main ()
11394{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011395/* The GNU C library defines this for functions which it implements
11396 to always fail with ENOSYS. Some functions are actually named
11397 something starting with __ and the normal name is an alias. */
11398#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11399choke me
11400#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011401f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011402#endif
11403
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 ;
11405 return 0;
11406}
11407_ACEOF
11408rm -f conftest.$ac_objext conftest$ac_exeext
11409if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11410 (eval $ac_link) 2>&5
11411 ac_status=$?
11412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11413 (exit $ac_status); } &&
11414 { ac_try='test -s conftest$ac_exeext'
11415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11416 (eval $ac_try) 2>&5
11417 ac_status=$?
11418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11419 (exit $ac_status); }; }; then
11420 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011421else
Martin v. Löwis11437992002-04-12 09:54:03 +000011422 echo "$as_me: failed program was:" >&5
11423cat conftest.$ac_ext >&5
11424eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011425fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011426rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011427fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011428echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11429echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11430if test `eval echo '${'$as_ac_var'}'` = yes; then
11431 cat >>confdefs.h <<_ACEOF
11432#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11433_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011434
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011435else
Martin v. Löwis11437992002-04-12 09:54:03 +000011436 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11437echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11438if test "${ac_cv_lib_util_openpty+set}" = set; then
11439 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011440else
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011442LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011443cat >conftest.$ac_ext <<_ACEOF
11444#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011445#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011446
Fred Drake8cef4cf2000-06-28 16:40:38 +000011447/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011448#ifdef __cplusplus
11449extern "C"
11450#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011451/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011452 builtin and then its argument prototype would still apply. */
11453char openpty ();
11454#ifdef F77_DUMMY_MAIN
11455# ifdef __cplusplus
11456 extern "C"
11457# endif
11458 int F77_DUMMY_MAIN() { return 1; }
11459#endif
11460int
11461main ()
11462{
11463openpty ();
11464 ;
11465 return 0;
11466}
11467_ACEOF
11468rm -f conftest.$ac_objext conftest$ac_exeext
11469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11470 (eval $ac_link) 2>&5
11471 ac_status=$?
11472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11473 (exit $ac_status); } &&
11474 { ac_try='test -s conftest$ac_exeext'
11475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11476 (eval $ac_try) 2>&5
11477 ac_status=$?
11478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11479 (exit $ac_status); }; }; then
11480 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011481else
Martin v. Löwis11437992002-04-12 09:54:03 +000011482 echo "$as_me: failed program was:" >&5
11483cat conftest.$ac_ext >&5
11484ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011486rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11487LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011488fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011489echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11490echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11491if test $ac_cv_lib_util_openpty = yes; then
11492 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011493#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011494_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011495 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011496fi
11497
11498fi
11499done
11500
Martin v. Löwis11437992002-04-12 09:54:03 +000011501
Fred Drake8cef4cf2000-06-28 16:40:38 +000011502for ac_func in forkpty
11503do
Martin v. Löwis11437992002-04-12 09:54:03 +000011504as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11505echo "$as_me:$LINENO: checking for $ac_func" >&5
11506echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11507if eval "test \"\${$as_ac_var+set}\" = set"; then
11508 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011509else
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 cat >conftest.$ac_ext <<_ACEOF
11511#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011512#include "confdefs.h"
11513/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011515#include <assert.h>
11516/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011517#ifdef __cplusplus
11518extern "C"
11519#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011520/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 builtin and then its argument prototype would still apply. */
11522char $ac_func ();
11523char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000011524
Martin v. Löwis11437992002-04-12 09:54:03 +000011525#ifdef F77_DUMMY_MAIN
11526# ifdef __cplusplus
11527 extern "C"
11528# endif
11529 int F77_DUMMY_MAIN() { return 1; }
11530#endif
11531int
11532main ()
11533{
Fred Drake8cef4cf2000-06-28 16:40:38 +000011534/* The GNU C library defines this for functions which it implements
11535 to always fail with ENOSYS. Some functions are actually named
11536 something starting with __ and the normal name is an alias. */
11537#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11538choke me
11539#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011540f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000011541#endif
11542
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 ;
11544 return 0;
11545}
11546_ACEOF
11547rm -f conftest.$ac_objext conftest$ac_exeext
11548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11549 (eval $ac_link) 2>&5
11550 ac_status=$?
11551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11552 (exit $ac_status); } &&
11553 { ac_try='test -s conftest$ac_exeext'
11554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11555 (eval $ac_try) 2>&5
11556 ac_status=$?
11557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11558 (exit $ac_status); }; }; then
11559 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011560else
Martin v. Löwis11437992002-04-12 09:54:03 +000011561 echo "$as_me: failed program was:" >&5
11562cat conftest.$ac_ext >&5
11563eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011565rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011567echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11568echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11569if test `eval echo '${'$as_ac_var'}'` = yes; then
11570 cat >>confdefs.h <<_ACEOF
11571#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11572_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011573
Fred Drake8cef4cf2000-06-28 16:40:38 +000011574else
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
11576echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
11577if test "${ac_cv_lib_util_forkpty+set}" = set; then
11578 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011579else
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011581LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011582cat >conftest.$ac_ext <<_ACEOF
11583#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011584#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011585
Fred Drake8cef4cf2000-06-28 16:40:38 +000011586/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011587#ifdef __cplusplus
11588extern "C"
11589#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011590/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011591 builtin and then its argument prototype would still apply. */
11592char forkpty ();
11593#ifdef F77_DUMMY_MAIN
11594# ifdef __cplusplus
11595 extern "C"
11596# endif
11597 int F77_DUMMY_MAIN() { return 1; }
11598#endif
11599int
11600main ()
11601{
11602forkpty ();
11603 ;
11604 return 0;
11605}
11606_ACEOF
11607rm -f conftest.$ac_objext conftest$ac_exeext
11608if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11609 (eval $ac_link) 2>&5
11610 ac_status=$?
11611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11612 (exit $ac_status); } &&
11613 { ac_try='test -s conftest$ac_exeext'
11614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11615 (eval $ac_try) 2>&5
11616 ac_status=$?
11617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11618 (exit $ac_status); }; }; then
11619 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011620else
Martin v. Löwis11437992002-04-12 09:54:03 +000011621 echo "$as_me: failed program was:" >&5
11622cat conftest.$ac_ext >&5
11623ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011625rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11626LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011628echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
11629echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
11630if test $ac_cv_lib_util_forkpty = yes; then
11631 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011632#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011633_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011634 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011635fi
11636
11637fi
11638done
11639
Jack Jansendd19cf82001-12-06 22:36:17 +000011640
Michael W. Hudson54241132001-12-07 15:38:26 +000011641# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011642
11643
11644
11645
11646
11647
Fred Drake8cef4cf2000-06-28 16:40:38 +000011648for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
11649do
Martin v. Löwis11437992002-04-12 09:54:03 +000011650as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11651echo "$as_me:$LINENO: checking for $ac_func" >&5
11652echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11653if eval "test \"\${$as_ac_var+set}\" = set"; then
11654 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011655else
Martin v. Löwis11437992002-04-12 09:54:03 +000011656 cat >conftest.$ac_ext <<_ACEOF
11657#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011658#include "confdefs.h"
11659/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011660 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011661#include <assert.h>
11662/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011663#ifdef __cplusplus
11664extern "C"
11665#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011666/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011667 builtin and then its argument prototype would still apply. */
11668char $ac_func ();
11669char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011670
Martin v. Löwis11437992002-04-12 09:54:03 +000011671#ifdef F77_DUMMY_MAIN
11672# ifdef __cplusplus
11673 extern "C"
11674# endif
11675 int F77_DUMMY_MAIN() { return 1; }
11676#endif
11677int
11678main ()
11679{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011680/* The GNU C library defines this for functions which it implements
11681 to always fail with ENOSYS. Some functions are actually named
11682 something starting with __ and the normal name is an alias. */
11683#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11684choke me
11685#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011686f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011687#endif
11688
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 ;
11690 return 0;
11691}
11692_ACEOF
11693rm -f conftest.$ac_objext conftest$ac_exeext
11694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11695 (eval $ac_link) 2>&5
11696 ac_status=$?
11697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11698 (exit $ac_status); } &&
11699 { ac_try='test -s conftest$ac_exeext'
11700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11701 (eval $ac_try) 2>&5
11702 ac_status=$?
11703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11704 (exit $ac_status); }; }; then
11705 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011706else
Martin v. Löwis11437992002-04-12 09:54:03 +000011707 echo "$as_me: failed program was:" >&5
11708cat conftest.$ac_ext >&5
11709eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011710fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011711rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011712fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011713echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11714echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11715if test `eval echo '${'$as_ac_var'}'` = yes; then
11716 cat >>confdefs.h <<_ACEOF
11717#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11718_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011719
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011720fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011721done
11722
Michael W. Hudson54241132001-12-07 15:38:26 +000011723
Martin v. Löwis11437992002-04-12 09:54:03 +000011724
11725
11726
11727
11728
Martin v. Löwis1142de32002-03-29 16:28:31 +000011729for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000011730do
Martin v. Löwis11437992002-04-12 09:54:03 +000011731as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11732echo "$as_me:$LINENO: checking for $ac_func" >&5
11733echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11734if eval "test \"\${$as_ac_var+set}\" = set"; then
11735 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011736else
Martin v. Löwis11437992002-04-12 09:54:03 +000011737 cat >conftest.$ac_ext <<_ACEOF
11738#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011739#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011740/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011741 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011742#include <assert.h>
11743/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011744#ifdef __cplusplus
11745extern "C"
11746#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011747/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 builtin and then its argument prototype would still apply. */
11749char $ac_func ();
11750char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011751
Martin v. Löwis11437992002-04-12 09:54:03 +000011752#ifdef F77_DUMMY_MAIN
11753# ifdef __cplusplus
11754 extern "C"
11755# endif
11756 int F77_DUMMY_MAIN() { return 1; }
11757#endif
11758int
11759main ()
11760{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011761/* The GNU C library defines this for functions which it implements
11762 to always fail with ENOSYS. Some functions are actually named
11763 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011764#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011765choke me
11766#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011767f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011768#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011769
Martin v. Löwis11437992002-04-12 09:54:03 +000011770 ;
11771 return 0;
11772}
11773_ACEOF
11774rm -f conftest.$ac_objext conftest$ac_exeext
11775if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11776 (eval $ac_link) 2>&5
11777 ac_status=$?
11778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11779 (exit $ac_status); } &&
11780 { ac_try='test -s conftest$ac_exeext'
11781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11782 (eval $ac_try) 2>&5
11783 ac_status=$?
11784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11785 (exit $ac_status); }; }; then
11786 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011787else
Martin v. Löwis11437992002-04-12 09:54:03 +000011788 echo "$as_me: failed program was:" >&5
11789cat conftest.$ac_ext >&5
11790eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011791fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011792rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000011793fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011794echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11795echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11796if test `eval echo '${'$as_ac_var'}'` = yes; then
11797 cat >>confdefs.h <<_ACEOF
11798#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11799_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000011800
Martin v. Löwis1142de32002-03-29 16:28:31 +000011801else
Martin v. Löwis11437992002-04-12 09:54:03 +000011802 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011803fi
11804done
11805
11806
Martin v. Löwis11437992002-04-12 09:54:03 +000011807
Martin v. Löwis1142de32002-03-29 16:28:31 +000011808for ac_func in getpgrp
11809do
Martin v. Löwis11437992002-04-12 09:54:03 +000011810as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11811echo "$as_me:$LINENO: checking for $ac_func" >&5
11812echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11813if eval "test \"\${$as_ac_var+set}\" = set"; then
11814 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000011815else
Martin v. Löwis11437992002-04-12 09:54:03 +000011816 cat >conftest.$ac_ext <<_ACEOF
11817#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000011818#include "confdefs.h"
11819/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011820 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000011821#include <assert.h>
11822/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011823#ifdef __cplusplus
11824extern "C"
11825#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000011826/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011827 builtin and then its argument prototype would still apply. */
11828char $ac_func ();
11829char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000011830
Martin v. Löwis11437992002-04-12 09:54:03 +000011831#ifdef F77_DUMMY_MAIN
11832# ifdef __cplusplus
11833 extern "C"
11834# endif
11835 int F77_DUMMY_MAIN() { return 1; }
11836#endif
11837int
11838main ()
11839{
Martin v. Löwis1142de32002-03-29 16:28:31 +000011840/* The GNU C library defines this for functions which it implements
11841 to always fail with ENOSYS. Some functions are actually named
11842 something starting with __ and the normal name is an alias. */
11843#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11844choke me
11845#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011846f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000011847#endif
11848
Martin v. Löwis11437992002-04-12 09:54:03 +000011849 ;
11850 return 0;
11851}
11852_ACEOF
11853rm -f conftest.$ac_objext conftest$ac_exeext
11854if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11855 (eval $ac_link) 2>&5
11856 ac_status=$?
11857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11858 (exit $ac_status); } &&
11859 { ac_try='test -s conftest$ac_exeext'
11860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11861 (eval $ac_try) 2>&5
11862 ac_status=$?
11863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11864 (exit $ac_status); }; }; then
11865 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011866else
Martin v. Löwis11437992002-04-12 09:54:03 +000011867 echo "$as_me: failed program was:" >&5
11868cat conftest.$ac_ext >&5
11869eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011870fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011871rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011872fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011873echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11874echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11875if test `eval echo '${'$as_ac_var'}'` = yes; then
11876 cat >>confdefs.h <<_ACEOF
11877#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11878_ACEOF
11879 cat >conftest.$ac_ext <<_ACEOF
11880#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011881#include "confdefs.h"
11882#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011883#ifdef F77_DUMMY_MAIN
11884# ifdef __cplusplus
11885 extern "C"
11886# endif
11887 int F77_DUMMY_MAIN() { return 1; }
11888#endif
11889int
11890main ()
11891{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011892getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011893 ;
11894 return 0;
11895}
11896_ACEOF
11897rm -f conftest.$ac_objext
11898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11899 (eval $ac_compile) 2>&5
11900 ac_status=$?
11901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11902 (exit $ac_status); } &&
11903 { ac_try='test -s conftest.$ac_objext'
11904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11905 (eval $ac_try) 2>&5
11906 ac_status=$?
11907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11908 (exit $ac_status); }; }; then
11909
11910cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011911#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011912_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011913
Martin v. Löwis11437992002-04-12 09:54:03 +000011914
Guido van Rossumf78abae1997-01-21 22:02:36 +000011915else
Martin v. Löwis11437992002-04-12 09:54:03 +000011916 echo "$as_me: failed program was:" >&5
11917cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000011918fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011919rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011920
Guido van Rossum627b2d71993-12-24 10:39:16 +000011921fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011922done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011923
Martin v. Löwis11437992002-04-12 09:54:03 +000011924
Thomas Wouters3a584202000-08-05 23:28:51 +000011925for ac_func in setpgrp
11926do
Martin v. Löwis11437992002-04-12 09:54:03 +000011927as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11928echo "$as_me:$LINENO: checking for $ac_func" >&5
11929echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11930if eval "test \"\${$as_ac_var+set}\" = set"; then
11931 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011932else
Martin v. Löwis11437992002-04-12 09:54:03 +000011933 cat >conftest.$ac_ext <<_ACEOF
11934#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011935#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011936/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011937 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011938#include <assert.h>
11939/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011940#ifdef __cplusplus
11941extern "C"
11942#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011943/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011944 builtin and then its argument prototype would still apply. */
11945char $ac_func ();
11946char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011947
Martin v. Löwis11437992002-04-12 09:54:03 +000011948#ifdef F77_DUMMY_MAIN
11949# ifdef __cplusplus
11950 extern "C"
11951# endif
11952 int F77_DUMMY_MAIN() { return 1; }
11953#endif
11954int
11955main ()
11956{
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011957/* The GNU C library defines this for functions which it implements
11958 to always fail with ENOSYS. Some functions are actually named
11959 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011960#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011961choke me
11962#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011963f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011964#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011965
Martin v. Löwis11437992002-04-12 09:54:03 +000011966 ;
11967 return 0;
11968}
11969_ACEOF
11970rm -f conftest.$ac_objext conftest$ac_exeext
11971if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11972 (eval $ac_link) 2>&5
11973 ac_status=$?
11974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11975 (exit $ac_status); } &&
11976 { ac_try='test -s conftest$ac_exeext'
11977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11978 (eval $ac_try) 2>&5
11979 ac_status=$?
11980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11981 (exit $ac_status); }; }; then
11982 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011983else
Martin v. Löwis11437992002-04-12 09:54:03 +000011984 echo "$as_me: failed program was:" >&5
11985cat conftest.$ac_ext >&5
11986eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011988rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011989fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011990echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11991echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11992if test `eval echo '${'$as_ac_var'}'` = yes; then
11993 cat >>confdefs.h <<_ACEOF
11994#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11995_ACEOF
11996 cat >conftest.$ac_ext <<_ACEOF
11997#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011998#include "confdefs.h"
11999#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012000#ifdef F77_DUMMY_MAIN
12001# ifdef __cplusplus
12002 extern "C"
12003# endif
12004 int F77_DUMMY_MAIN() { return 1; }
12005#endif
12006int
12007main ()
12008{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012009setpgrp(0,0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012010 ;
12011 return 0;
12012}
12013_ACEOF
12014rm -f conftest.$ac_objext
12015if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12016 (eval $ac_compile) 2>&5
12017 ac_status=$?
12018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12019 (exit $ac_status); } &&
12020 { ac_try='test -s conftest.$ac_objext'
12021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12022 (eval $ac_try) 2>&5
12023 ac_status=$?
12024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12025 (exit $ac_status); }; }; then
12026
12027cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012028#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012029_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012030
Martin v. Löwis11437992002-04-12 09:54:03 +000012031
Guido van Rossumf78abae1997-01-21 22:02:36 +000012032else
Martin v. Löwis11437992002-04-12 09:54:03 +000012033 echo "$as_me: failed program was:" >&5
12034cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012036rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012037
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012038fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012039done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012040
Martin v. Löwis11437992002-04-12 09:54:03 +000012041
Thomas Wouters3a584202000-08-05 23:28:51 +000012042for ac_func in gettimeofday
12043do
Martin v. Löwis11437992002-04-12 09:54:03 +000012044as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12045echo "$as_me:$LINENO: checking for $ac_func" >&5
12046echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12047if eval "test \"\${$as_ac_var+set}\" = set"; then
12048 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012049else
Martin v. Löwis11437992002-04-12 09:54:03 +000012050 cat >conftest.$ac_ext <<_ACEOF
12051#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012052#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012053/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012054 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012055#include <assert.h>
12056/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012057#ifdef __cplusplus
12058extern "C"
12059#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012060/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012061 builtin and then its argument prototype would still apply. */
12062char $ac_func ();
12063char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012064
Martin v. Löwis11437992002-04-12 09:54:03 +000012065#ifdef F77_DUMMY_MAIN
12066# ifdef __cplusplus
12067 extern "C"
12068# endif
12069 int F77_DUMMY_MAIN() { return 1; }
12070#endif
12071int
12072main ()
12073{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012074/* The GNU C library defines this for functions which it implements
12075 to always fail with ENOSYS. Some functions are actually named
12076 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012077#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012078choke me
12079#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012080f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012081#endif
12082
Martin v. Löwis11437992002-04-12 09:54:03 +000012083 ;
12084 return 0;
12085}
12086_ACEOF
12087rm -f conftest.$ac_objext conftest$ac_exeext
12088if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12089 (eval $ac_link) 2>&5
12090 ac_status=$?
12091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12092 (exit $ac_status); } &&
12093 { ac_try='test -s conftest$ac_exeext'
12094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12095 (eval $ac_try) 2>&5
12096 ac_status=$?
12097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12098 (exit $ac_status); }; }; then
12099 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012100else
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 echo "$as_me: failed program was:" >&5
12102cat conftest.$ac_ext >&5
12103eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012105rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012106fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012107echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12108echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12109if test `eval echo '${'$as_ac_var'}'` = yes; then
12110 cat >>confdefs.h <<_ACEOF
12111#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12112_ACEOF
12113 cat >conftest.$ac_ext <<_ACEOF
12114#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012115#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012116#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012117#ifdef F77_DUMMY_MAIN
12118# ifdef __cplusplus
12119 extern "C"
12120# endif
12121 int F77_DUMMY_MAIN() { return 1; }
12122#endif
12123int
12124main ()
12125{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012126gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012127 ;
12128 return 0;
12129}
12130_ACEOF
12131rm -f conftest.$ac_objext
12132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12133 (eval $ac_compile) 2>&5
12134 ac_status=$?
12135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12136 (exit $ac_status); } &&
12137 { ac_try='test -s conftest.$ac_objext'
12138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12139 (eval $ac_try) 2>&5
12140 ac_status=$?
12141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12142 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012143 :
12144else
Martin v. Löwis11437992002-04-12 09:54:03 +000012145 echo "$as_me: failed program was:" >&5
12146cat conftest.$ac_ext >&5
12147
12148cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012149#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012150_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012151
Martin v. Löwis11437992002-04-12 09:54:03 +000012152
Guido van Rossum627b2d71993-12-24 10:39:16 +000012153fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012154rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012155
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012157done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012158
Michael W. Hudson54241132001-12-07 15:38:26 +000012159
12160
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012161# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012162# for [no]getaddrinfo in netdb.h.
12163echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12164echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12165cat >conftest.$ac_ext <<_ACEOF
12166#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012167#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012168
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012169#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012170#include <sys/socket.h>
12171#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012172#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012173
Martin v. Löwis11437992002-04-12 09:54:03 +000012174#ifdef F77_DUMMY_MAIN
12175# ifdef __cplusplus
12176 extern "C"
12177# endif
12178 int F77_DUMMY_MAIN() { return 1; }
12179#endif
12180int
12181main ()
12182{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012183
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012184getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012185
Martin v. Löwis11437992002-04-12 09:54:03 +000012186 ;
12187 return 0;
12188}
12189_ACEOF
12190rm -f conftest.$ac_objext conftest$ac_exeext
12191if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12192 (eval $ac_link) 2>&5
12193 ac_status=$?
12194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12195 (exit $ac_status); } &&
12196 { ac_try='test -s conftest$ac_exeext'
12197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12198 (eval $ac_try) 2>&5
12199 ac_status=$?
12200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12201 (exit $ac_status); }; }; then
12202
12203echo "$as_me:$LINENO: result: yes" >&5
12204echo "${ECHO_T}yes" >&6
12205echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12206echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012207if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 echo "$as_me:$LINENO: result: buggy" >&5
12209echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012210buggygetaddrinfo=yes
12211else
Martin v. Löwis11437992002-04-12 09:54:03 +000012212 cat >conftest.$ac_ext <<_ACEOF
12213#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012214#include "confdefs.h"
12215
12216#include <sys/types.h>
12217#include <netdb.h>
12218#include <string.h>
12219#include <sys/socket.h>
12220#include <netinet/in.h>
12221
12222main()
12223{
12224 int passive, gaierr, inet4 = 0, inet6 = 0;
12225 struct addrinfo hints, *ai, *aitop;
12226 char straddr[INET6_ADDRSTRLEN], strport[16];
12227
12228 for (passive = 0; passive <= 1; passive++) {
12229 memset(&hints, 0, sizeof(hints));
12230 hints.ai_family = AF_UNSPEC;
12231 hints.ai_flags = passive ? AI_PASSIVE : 0;
12232 hints.ai_socktype = SOCK_STREAM;
12233 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12234 (void)gai_strerror(gaierr);
12235 goto bad;
12236 }
12237 for (ai = aitop; ai; ai = ai->ai_next) {
12238 if (ai->ai_addr == NULL ||
12239 ai->ai_addrlen == 0 ||
12240 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12241 straddr, sizeof(straddr), strport, sizeof(strport),
12242 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12243 goto bad;
12244 }
12245 switch (ai->ai_family) {
12246 case AF_INET:
12247 if (strcmp(strport, "54321") != 0) {
12248 goto bad;
12249 }
12250 if (passive) {
12251 if (strcmp(straddr, "0.0.0.0") != 0) {
12252 goto bad;
12253 }
12254 } else {
12255 if (strcmp(straddr, "127.0.0.1") != 0) {
12256 goto bad;
12257 }
12258 }
12259 inet4++;
12260 break;
12261 case AF_INET6:
12262 if (strcmp(strport, "54321") != 0) {
12263 goto bad;
12264 }
12265 if (passive) {
12266 if (strcmp(straddr, "::") != 0) {
12267 goto bad;
12268 }
12269 } else {
12270 if (strcmp(straddr, "::1") != 0) {
12271 goto bad;
12272 }
12273 }
12274 inet6++;
12275 break;
12276 case AF_UNSPEC:
12277 goto bad;
12278 break;
12279 default:
12280 /* another family support? */
12281 break;
12282 }
12283 }
12284 }
12285
12286 if (!(inet4 == 0 || inet4 == 2))
12287 goto bad;
12288 if (!(inet6 == 0 || inet6 == 2))
12289 goto bad;
12290
12291 if (aitop)
12292 freeaddrinfo(aitop);
12293 exit(0);
12294
12295 bad:
12296 if (aitop)
12297 freeaddrinfo(aitop);
12298 exit(1);
12299}
12300
Martin v. Löwis11437992002-04-12 09:54:03 +000012301_ACEOF
12302rm -f conftest$ac_exeext
12303if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12304 (eval $ac_link) 2>&5
12305 ac_status=$?
12306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12307 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12309 (eval $ac_try) 2>&5
12310 ac_status=$?
12311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12312 (exit $ac_status); }; }; then
12313 echo "$as_me:$LINENO: result: good" >&5
12314echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012315buggygetaddrinfo=no
12316else
Martin v. Löwis11437992002-04-12 09:54:03 +000012317 echo "$as_me: program exited with status $ac_status" >&5
12318echo "$as_me: failed program was:" >&5
12319cat conftest.$ac_ext >&5
12320( exit $ac_status )
12321echo "$as_me:$LINENO: result: buggy" >&5
12322echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012323buggygetaddrinfo=yes
12324fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012325rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012326fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012327else
Martin v. Löwis11437992002-04-12 09:54:03 +000012328 echo "$as_me: failed program was:" >&5
12329cat conftest.$ac_ext >&5
12330
12331echo "$as_me:$LINENO: result: no" >&5
12332echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012333buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012334
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012336rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012337
12338if test "$buggygetaddrinfo" = "yes"; then
12339 if test "$ipv6" = "yes"; then
12340 echo 'Fatal: You must get working getaddrinfo() function.'
12341 echo ' or you can specify "--disable-ipv6"'.
12342 exit 1
12343 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012344else
Martin v. Löwis11437992002-04-12 09:54:03 +000012345
12346cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012347#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012348_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012349
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012350fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012351
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012352for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012353do
Martin v. Löwis11437992002-04-12 09:54:03 +000012354as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12355echo "$as_me:$LINENO: checking for $ac_func" >&5
12356echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12357if eval "test \"\${$as_ac_var+set}\" = set"; then
12358 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012359else
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 cat >conftest.$ac_ext <<_ACEOF
12361#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012362#include "confdefs.h"
12363/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012364 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012365#include <assert.h>
12366/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012367#ifdef __cplusplus
12368extern "C"
12369#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012370/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 builtin and then its argument prototype would still apply. */
12372char $ac_func ();
12373char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012374
Martin v. Löwis11437992002-04-12 09:54:03 +000012375#ifdef F77_DUMMY_MAIN
12376# ifdef __cplusplus
12377 extern "C"
12378# endif
12379 int F77_DUMMY_MAIN() { return 1; }
12380#endif
12381int
12382main ()
12383{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012384/* The GNU C library defines this for functions which it implements
12385 to always fail with ENOSYS. Some functions are actually named
12386 something starting with __ and the normal name is an alias. */
12387#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12388choke me
12389#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012390f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012391#endif
12392
Martin v. Löwis11437992002-04-12 09:54:03 +000012393 ;
12394 return 0;
12395}
12396_ACEOF
12397rm -f conftest.$ac_objext conftest$ac_exeext
12398if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12399 (eval $ac_link) 2>&5
12400 ac_status=$?
12401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12402 (exit $ac_status); } &&
12403 { ac_try='test -s conftest$ac_exeext'
12404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12405 (eval $ac_try) 2>&5
12406 ac_status=$?
12407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12408 (exit $ac_status); }; }; then
12409 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012410else
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 echo "$as_me: failed program was:" >&5
12412cat conftest.$ac_ext >&5
12413eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012416fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012417echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12418echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12419if test `eval echo '${'$as_ac_var'}'` = yes; then
12420 cat >>confdefs.h <<_ACEOF
12421#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12422_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012423
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012424fi
12425done
12426
Michael W. Hudson54241132001-12-07 15:38:26 +000012427
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012428# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012429echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12430echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12431if test "${ac_cv_header_time+set}" = set; then
12432 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012433else
Martin v. Löwis11437992002-04-12 09:54:03 +000012434 cat >conftest.$ac_ext <<_ACEOF
12435#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012436#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012437#include <sys/types.h>
12438#include <sys/time.h>
12439#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012440
12441#ifdef F77_DUMMY_MAIN
12442# ifdef __cplusplus
12443 extern "C"
12444# endif
12445 int F77_DUMMY_MAIN() { return 1; }
12446#endif
12447int
12448main ()
12449{
12450if ((struct tm *) 0)
12451return 0;
12452 ;
12453 return 0;
12454}
12455_ACEOF
12456rm -f conftest.$ac_objext
12457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12458 (eval $ac_compile) 2>&5
12459 ac_status=$?
12460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12461 (exit $ac_status); } &&
12462 { ac_try='test -s conftest.$ac_objext'
12463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12464 (eval $ac_try) 2>&5
12465 ac_status=$?
12466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12467 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012468 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012469else
Martin v. Löwis11437992002-04-12 09:54:03 +000012470 echo "$as_me: failed program was:" >&5
12471cat conftest.$ac_ext >&5
12472ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012473fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012474rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012475fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012476echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12477echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012478if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012479
12480cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012481#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012482_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012483
12484fi
12485
Martin v. Löwis11437992002-04-12 09:54:03 +000012486echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12487echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12488if test "${ac_cv_struct_tm+set}" = set; then
12489 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012490else
Martin v. Löwis11437992002-04-12 09:54:03 +000012491 cat >conftest.$ac_ext <<_ACEOF
12492#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012493#include "confdefs.h"
12494#include <sys/types.h>
12495#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012496
12497#ifdef F77_DUMMY_MAIN
12498# ifdef __cplusplus
12499 extern "C"
12500# endif
12501 int F77_DUMMY_MAIN() { return 1; }
12502#endif
12503int
12504main ()
12505{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012506struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012507 ;
12508 return 0;
12509}
12510_ACEOF
12511rm -f conftest.$ac_objext
12512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12513 (eval $ac_compile) 2>&5
12514 ac_status=$?
12515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12516 (exit $ac_status); } &&
12517 { ac_try='test -s conftest.$ac_objext'
12518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12519 (eval $ac_try) 2>&5
12520 ac_status=$?
12521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12522 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012523 ac_cv_struct_tm=time.h
12524else
Martin v. Löwis11437992002-04-12 09:54:03 +000012525 echo "$as_me: failed program was:" >&5
12526cat conftest.$ac_ext >&5
12527ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012528fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012529rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012530fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012531echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12532echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012533if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012534
12535cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012536#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012537_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012538
12539fi
12540
Martin v. Löwis11437992002-04-12 09:54:03 +000012541echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12542echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12543if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12544 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012545else
Martin v. Löwis11437992002-04-12 09:54:03 +000012546 cat >conftest.$ac_ext <<_ACEOF
12547#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012548#include "confdefs.h"
12549#include <sys/types.h>
12550#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012551
12552
12553#ifdef F77_DUMMY_MAIN
12554# ifdef __cplusplus
12555 extern "C"
12556# endif
12557 int F77_DUMMY_MAIN() { return 1; }
12558#endif
12559int
12560main ()
12561{
12562static struct tm ac_aggr;
12563if (ac_aggr.tm_zone)
12564return 0;
12565 ;
12566 return 0;
12567}
12568_ACEOF
12569rm -f conftest.$ac_objext
12570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12571 (eval $ac_compile) 2>&5
12572 ac_status=$?
12573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12574 (exit $ac_status); } &&
12575 { ac_try='test -s conftest.$ac_objext'
12576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12577 (eval $ac_try) 2>&5
12578 ac_status=$?
12579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12580 (exit $ac_status); }; }; then
12581 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012582else
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 echo "$as_me: failed program was:" >&5
12584cat conftest.$ac_ext >&5
12585ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012586fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012587rm -f conftest.$ac_objext conftest.$ac_ext
12588fi
12589echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
12590echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
12591if test $ac_cv_member_struct_tm_tm_zone = yes; then
12592
12593cat >>confdefs.h <<_ACEOF
12594#define HAVE_STRUCT_TM_TM_ZONE 1
12595_ACEOF
12596
12597
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012598fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012599
Martin v. Löwis11437992002-04-12 09:54:03 +000012600if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12601
12602cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012603#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012604_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012605
12606else
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 echo "$as_me:$LINENO: checking for tzname" >&5
12608echo $ECHO_N "checking for tzname... $ECHO_C" >&6
12609if test "${ac_cv_var_tzname+set}" = set; then
12610 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012611else
Martin v. Löwis11437992002-04-12 09:54:03 +000012612 cat >conftest.$ac_ext <<_ACEOF
12613#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012614#include "confdefs.h"
12615#include <time.h>
12616#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012617extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012619
12620#ifdef F77_DUMMY_MAIN
12621# ifdef __cplusplus
12622 extern "C"
12623# endif
12624 int F77_DUMMY_MAIN() { return 1; }
12625#endif
12626int
12627main ()
12628{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012629atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000012630 ;
12631 return 0;
12632}
12633_ACEOF
12634rm -f conftest.$ac_objext conftest$ac_exeext
12635if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12636 (eval $ac_link) 2>&5
12637 ac_status=$?
12638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12639 (exit $ac_status); } &&
12640 { ac_try='test -s conftest$ac_exeext'
12641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12642 (eval $ac_try) 2>&5
12643 ac_status=$?
12644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12645 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012646 ac_cv_var_tzname=yes
12647else
Martin v. Löwis11437992002-04-12 09:54:03 +000012648 echo "$as_me: failed program was:" >&5
12649cat conftest.$ac_ext >&5
12650ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012652rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012653fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012654echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
12655echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012656 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012657
12658cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012659#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012660_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012661
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012662 fi
12663fi
12664
Jack Jansendd19cf82001-12-06 22:36:17 +000012665
Martin v. Löwis11437992002-04-12 09:54:03 +000012666echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
12667echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
12668if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
12669 echo $ECHO_N "(cached) $ECHO_C" >&6
12670else
12671 cat >conftest.$ac_ext <<_ACEOF
12672#line $LINENO "configure"
12673#include "confdefs.h"
12674$ac_includes_default
12675#ifdef F77_DUMMY_MAIN
12676# ifdef __cplusplus
12677 extern "C"
12678# endif
12679 int F77_DUMMY_MAIN() { return 1; }
12680#endif
12681int
12682main ()
12683{
12684static struct stat ac_aggr;
12685if (ac_aggr.st_rdev)
12686return 0;
12687 ;
12688 return 0;
12689}
12690_ACEOF
12691rm -f conftest.$ac_objext
12692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12693 (eval $ac_compile) 2>&5
12694 ac_status=$?
12695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12696 (exit $ac_status); } &&
12697 { ac_try='test -s conftest.$ac_objext'
12698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12699 (eval $ac_try) 2>&5
12700 ac_status=$?
12701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12702 (exit $ac_status); }; }; then
12703 ac_cv_member_struct_stat_st_rdev=yes
12704else
12705 echo "$as_me: failed program was:" >&5
12706cat conftest.$ac_ext >&5
12707ac_cv_member_struct_stat_st_rdev=no
12708fi
12709rm -f conftest.$ac_objext conftest.$ac_ext
12710fi
12711echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
12712echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
12713if test $ac_cv_member_struct_stat_st_rdev = yes; then
12714
12715cat >>confdefs.h <<_ACEOF
12716#define HAVE_STRUCT_STAT_ST_RDEV 1
12717_ACEOF
12718
12719
12720cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012721#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012722_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012723
12724fi
12725
Martin v. Löwis11437992002-04-12 09:54:03 +000012726
12727
12728echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
12729echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
12730if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
12731 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012732else
Martin v. Löwis11437992002-04-12 09:54:03 +000012733 cat >conftest.$ac_ext <<_ACEOF
12734#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012735#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012736$ac_includes_default
12737#ifdef F77_DUMMY_MAIN
12738# ifdef __cplusplus
12739 extern "C"
12740# endif
12741 int F77_DUMMY_MAIN() { return 1; }
12742#endif
12743int
12744main ()
12745{
12746static struct stat ac_aggr;
12747if (ac_aggr.st_blksize)
12748return 0;
12749 ;
12750 return 0;
12751}
12752_ACEOF
12753rm -f conftest.$ac_objext
12754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12755 (eval $ac_compile) 2>&5
12756 ac_status=$?
12757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12758 (exit $ac_status); } &&
12759 { ac_try='test -s conftest.$ac_objext'
12760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12761 (eval $ac_try) 2>&5
12762 ac_status=$?
12763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12764 (exit $ac_status); }; }; then
12765 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012766else
Martin v. Löwis11437992002-04-12 09:54:03 +000012767 echo "$as_me: failed program was:" >&5
12768cat conftest.$ac_ext >&5
12769ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012770fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012771rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012772fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012773echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
12774echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
12775if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012776
Martin v. Löwis11437992002-04-12 09:54:03 +000012777cat >>confdefs.h <<_ACEOF
12778#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12779_ACEOF
12780
12781
12782cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012783#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012784_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012785
12786fi
12787
Martin v. Löwis11437992002-04-12 09:54:03 +000012788
12789echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
12790echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
12791if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
12792 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012793else
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 cat >conftest.$ac_ext <<_ACEOF
12795#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012796#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012797$ac_includes_default
12798#ifdef F77_DUMMY_MAIN
12799# ifdef __cplusplus
12800 extern "C"
12801# endif
12802 int F77_DUMMY_MAIN() { return 1; }
12803#endif
12804int
12805main ()
12806{
12807static struct stat ac_aggr;
12808if (ac_aggr.st_blocks)
12809return 0;
12810 ;
12811 return 0;
12812}
12813_ACEOF
12814rm -f conftest.$ac_objext
12815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12816 (eval $ac_compile) 2>&5
12817 ac_status=$?
12818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12819 (exit $ac_status); } &&
12820 { ac_try='test -s conftest.$ac_objext'
12821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12822 (eval $ac_try) 2>&5
12823 ac_status=$?
12824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12825 (exit $ac_status); }; }; then
12826 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012827else
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 echo "$as_me: failed program was:" >&5
12829cat conftest.$ac_ext >&5
12830ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012832rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012834echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
12835echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
12836if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000012837
Martin v. Löwis11437992002-04-12 09:54:03 +000012838cat >>confdefs.h <<_ACEOF
12839#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12840_ACEOF
12841
12842
12843cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012844#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012845_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012846
12847else
Martin v. Löwis11437992002-04-12 09:54:03 +000012848 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012849fi
12850
Michael W. Hudson54241132001-12-07 15:38:26 +000012851
Martin v. Löwis11437992002-04-12 09:54:03 +000012852
12853echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
12854echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
12855if test "${ac_cv_header_time_altzone+set}" = set; then
12856 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012857else
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 cat >conftest.$ac_ext <<_ACEOF
12859#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012860#include "confdefs.h"
12861#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012862#ifdef F77_DUMMY_MAIN
12863# ifdef __cplusplus
12864 extern "C"
12865# endif
12866 int F77_DUMMY_MAIN() { return 1; }
12867#endif
12868int
12869main ()
12870{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012871return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012872 ;
12873 return 0;
12874}
12875_ACEOF
12876rm -f conftest.$ac_objext
12877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12878 (eval $ac_compile) 2>&5
12879 ac_status=$?
12880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12881 (exit $ac_status); } &&
12882 { ac_try='test -s conftest.$ac_objext'
12883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12884 (eval $ac_try) 2>&5
12885 ac_status=$?
12886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12887 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012888 ac_cv_header_time_altzone=yes
12889else
Martin v. Löwis11437992002-04-12 09:54:03 +000012890 echo "$as_me: failed program was:" >&5
12891cat conftest.$ac_ext >&5
12892ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012893fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012894rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012895fi
12896
Martin v. Löwis11437992002-04-12 09:54:03 +000012897echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
12898echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012899if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012900
12901cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012902#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012903_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012904
12905fi
12906
Guido van Rossumda88dad1995-01-26 00:46:29 +000012907was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012908echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
12909echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
12910cat >conftest.$ac_ext <<_ACEOF
12911#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012912#include "confdefs.h"
12913
12914#include <sys/types.h>
12915#include <sys/select.h>
12916#include <sys/time.h>
12917
Martin v. Löwis11437992002-04-12 09:54:03 +000012918#ifdef F77_DUMMY_MAIN
12919# ifdef __cplusplus
12920 extern "C"
12921# endif
12922 int F77_DUMMY_MAIN() { return 1; }
12923#endif
12924int
12925main ()
12926{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012927;
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 ;
12929 return 0;
12930}
12931_ACEOF
12932rm -f conftest.$ac_objext
12933if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12934 (eval $ac_compile) 2>&5
12935 ac_status=$?
12936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12937 (exit $ac_status); } &&
12938 { ac_try='test -s conftest.$ac_objext'
12939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12940 (eval $ac_try) 2>&5
12941 ac_status=$?
12942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12943 (exit $ac_status); }; }; then
12944
12945
12946cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012947#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012948_ACEOF
12949
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012950 was_it_defined=yes
12951
Guido van Rossumf78abae1997-01-21 22:02:36 +000012952else
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 echo "$as_me: failed program was:" >&5
12954cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012955fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012956rm -f conftest.$ac_objext conftest.$ac_ext
12957echo "$as_me:$LINENO: result: $was_it_defined" >&5
12958echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000012959
Martin v. Löwis11437992002-04-12 09:54:03 +000012960echo "$as_me:$LINENO: checking for addrinfo" >&5
12961echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
12962if test "${ac_cv_struct_addrinfo+set}" = set; then
12963 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012964else
Martin v. Löwis11437992002-04-12 09:54:03 +000012965 cat >conftest.$ac_ext <<_ACEOF
12966#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012967#include "confdefs.h"
12968
12969# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012970#ifdef F77_DUMMY_MAIN
12971# ifdef __cplusplus
12972 extern "C"
12973# endif
12974 int F77_DUMMY_MAIN() { return 1; }
12975#endif
12976int
12977main ()
12978{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012979struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012980 ;
12981 return 0;
12982}
12983_ACEOF
12984rm -f conftest.$ac_objext
12985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12986 (eval $ac_compile) 2>&5
12987 ac_status=$?
12988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12989 (exit $ac_status); } &&
12990 { ac_try='test -s conftest.$ac_objext'
12991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12992 (eval $ac_try) 2>&5
12993 ac_status=$?
12994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12995 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012996 ac_cv_struct_addrinfo=yes
12997else
Martin v. Löwis11437992002-04-12 09:54:03 +000012998 echo "$as_me: failed program was:" >&5
12999cat conftest.$ac_ext >&5
13000ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013001fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013002rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013003fi
13004
Martin v. Löwis11437992002-04-12 09:54:03 +000013005echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13006echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013007if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013008
13009cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013010#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013011_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013012
13013fi
13014
Martin v. Löwis11437992002-04-12 09:54:03 +000013015echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13016echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13017if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13018 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013019else
Martin v. Löwis11437992002-04-12 09:54:03 +000013020 cat >conftest.$ac_ext <<_ACEOF
13021#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013022#include "confdefs.h"
13023
13024# include <sys/types.h>
13025# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013026#ifdef F77_DUMMY_MAIN
13027# ifdef __cplusplus
13028 extern "C"
13029# endif
13030 int F77_DUMMY_MAIN() { return 1; }
13031#endif
13032int
13033main ()
13034{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013035struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013036 ;
13037 return 0;
13038}
13039_ACEOF
13040rm -f conftest.$ac_objext
13041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13042 (eval $ac_compile) 2>&5
13043 ac_status=$?
13044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13045 (exit $ac_status); } &&
13046 { ac_try='test -s conftest.$ac_objext'
13047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13048 (eval $ac_try) 2>&5
13049 ac_status=$?
13050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13051 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013052 ac_cv_struct_sockaddr_storage=yes
13053else
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 echo "$as_me: failed program was:" >&5
13055cat conftest.$ac_ext >&5
13056ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013057fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013058rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013059fi
13060
Martin v. Löwis11437992002-04-12 09:54:03 +000013061echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13062echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013063if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013064
13065cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013066#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013067_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013068
13069fi
13070
Guido van Rossum627b2d71993-12-24 10:39:16 +000013071# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013072
Michael W. Hudson54241132001-12-07 15:38:26 +000013073
Martin v. Löwis11437992002-04-12 09:54:03 +000013074echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13075echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13076if test "${ac_cv_c_char_unsigned+set}" = set; then
13077 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013078else
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 cat >conftest.$ac_ext <<_ACEOF
13080#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013081#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013082$ac_includes_default
13083#ifdef F77_DUMMY_MAIN
13084# ifdef __cplusplus
13085 extern "C"
13086# endif
13087 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013089int
13090main ()
13091{
13092static int test_array [1 - 2 * !(((char) -1) < 0)];
13093test_array [0] = 0
13094
13095 ;
13096 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013097}
Martin v. Löwis11437992002-04-12 09:54:03 +000013098_ACEOF
13099rm -f conftest.$ac_objext
13100if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13101 (eval $ac_compile) 2>&5
13102 ac_status=$?
13103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13104 (exit $ac_status); } &&
13105 { ac_try='test -s conftest.$ac_objext'
13106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13107 (eval $ac_try) 2>&5
13108 ac_status=$?
13109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13110 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013111 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013112else
13113 echo "$as_me: failed program was:" >&5
13114cat conftest.$ac_ext >&5
13115ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013116fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013117rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013119echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13120echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013121if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013122 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013123#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013124_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013125
13126fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013127
Martin v. Löwis11437992002-04-12 09:54:03 +000013128echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13129echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13130if test "${ac_cv_prog_cc_stdc+set}" = set; then
13131 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013132else
Martin v. Löwis11437992002-04-12 09:54:03 +000013133 ac_cv_prog_cc_stdc=no
13134ac_save_CC=$CC
13135cat >conftest.$ac_ext <<_ACEOF
13136#line $LINENO "configure"
13137#include "confdefs.h"
13138#include <stdarg.h>
13139#include <stdio.h>
13140#include <sys/types.h>
13141#include <sys/stat.h>
13142/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13143struct buf { int x; };
13144FILE * (*rcsopen) (struct buf *, struct stat *, int);
13145static char *e (p, i)
13146 char **p;
13147 int i;
13148{
13149 return p[i];
13150}
13151static char *f (char * (*g) (char **, int), char **p, ...)
13152{
13153 char *s;
13154 va_list v;
13155 va_start (v,p);
13156 s = g (p, va_arg (v,int));
13157 va_end (v);
13158 return s;
13159}
13160int test (int i, double x);
13161struct s1 {int (*f) (int a);};
13162struct s2 {int (*f) (double a);};
13163int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13164int argc;
13165char **argv;
13166#ifdef F77_DUMMY_MAIN
13167# ifdef __cplusplus
13168 extern "C"
13169# endif
13170 int F77_DUMMY_MAIN() { return 1; }
13171#endif
13172int
13173main ()
13174{
13175return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13176 ;
13177 return 0;
13178}
13179_ACEOF
13180# Don't try gcc -ansi; that turns off useful extensions and
13181# breaks some systems' header files.
13182# AIX -qlanglvl=ansi
13183# Ultrix and OSF/1 -std1
13184# HP-UX 10.20 and later -Ae
13185# HP-UX older versions -Aa -D_HPUX_SOURCE
13186# SVR4 -Xc -D__EXTENSIONS__
13187for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13188do
13189 CC="$ac_save_CC $ac_arg"
13190 rm -f conftest.$ac_objext
13191if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13192 (eval $ac_compile) 2>&5
13193 ac_status=$?
13194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13195 (exit $ac_status); } &&
13196 { ac_try='test -s conftest.$ac_objext'
13197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13198 (eval $ac_try) 2>&5
13199 ac_status=$?
13200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13201 (exit $ac_status); }; }; then
13202 ac_cv_prog_cc_stdc=$ac_arg
13203break
13204else
13205 echo "$as_me: failed program was:" >&5
13206cat conftest.$ac_ext >&5
13207fi
13208rm -f conftest.$ac_objext
13209done
13210rm -f conftest.$ac_ext conftest.$ac_objext
13211CC=$ac_save_CC
13212
13213fi
13214
13215case "x$ac_cv_prog_cc_stdc" in
13216 x|xno)
13217 echo "$as_me:$LINENO: result: none needed" >&5
13218echo "${ECHO_T}none needed" >&6 ;;
13219 *)
13220 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13221echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13222 CC="$CC $ac_cv_prog_cc_stdc" ;;
13223esac
13224
13225echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13226echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13227if test "${ac_cv_c_const+set}" = set; then
13228 echo $ECHO_N "(cached) $ECHO_C" >&6
13229else
13230 cat >conftest.$ac_ext <<_ACEOF
13231#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013232#include "confdefs.h"
13233
Martin v. Löwis11437992002-04-12 09:54:03 +000013234#ifdef F77_DUMMY_MAIN
13235# ifdef __cplusplus
13236 extern "C"
13237# endif
13238 int F77_DUMMY_MAIN() { return 1; }
13239#endif
13240int
13241main ()
13242{
13243/* FIXME: Include the comments suggested by Paul. */
13244#ifndef __cplusplus
13245 /* Ultrix mips cc rejects this. */
13246 typedef int charset[2];
13247 const charset x;
13248 /* SunOS 4.1.1 cc rejects this. */
13249 char const *const *ccp;
13250 char **p;
13251 /* NEC SVR4.0.2 mips cc rejects this. */
13252 struct point {int x, y;};
13253 static struct point const zero = {0,0};
13254 /* AIX XL C 1.02.0.0 rejects this.
13255 It does not let you subtract one const X* pointer from another in
13256 an arm of an if-expression whose if-part is not a constant
13257 expression */
13258 const char *g = "string";
13259 ccp = &g + (g ? g-g : 0);
13260 /* HPUX 7.0 cc rejects these. */
13261 ++ccp;
13262 p = (char**) ccp;
13263 ccp = (char const *const *) p;
13264 { /* SCO 3.2v4 cc rejects this. */
13265 char *t;
13266 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013267
Martin v. Löwis11437992002-04-12 09:54:03 +000013268 *t++ = 0;
13269 }
13270 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13271 int x[] = {25, 17};
13272 const int *foo = &x[0];
13273 ++foo;
13274 }
13275 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13276 typedef const int *iptr;
13277 iptr p = 0;
13278 ++p;
13279 }
13280 { /* AIX XL C 1.02.0.0 rejects this saying
13281 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13282 struct s { int j; const int *ap[3]; };
13283 struct s *b; b->j = 5;
13284 }
13285 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13286 const int foo = 10;
13287 }
13288#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013289
Martin v. Löwis11437992002-04-12 09:54:03 +000013290 ;
13291 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013292}
Martin v. Löwis11437992002-04-12 09:54:03 +000013293_ACEOF
13294rm -f conftest.$ac_objext
13295if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13296 (eval $ac_compile) 2>&5
13297 ac_status=$?
13298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13299 (exit $ac_status); } &&
13300 { ac_try='test -s conftest.$ac_objext'
13301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13302 (eval $ac_try) 2>&5
13303 ac_status=$?
13304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13305 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013306 ac_cv_c_const=yes
13307else
Martin v. Löwis11437992002-04-12 09:54:03 +000013308 echo "$as_me: failed program was:" >&5
13309cat conftest.$ac_ext >&5
13310ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013311fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013312rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013313fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013314echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13315echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013316if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
13318cat >>confdefs.h <<\_ACEOF
13319#define const
13320_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013321
13322fi
13323
Michael W. Hudson54241132001-12-07 15:38:26 +000013324
Guido van Rossumda88dad1995-01-26 00:46:29 +000013325works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013326echo "$as_me:$LINENO: checking for working volatile" >&5
13327echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13328cat >conftest.$ac_ext <<_ACEOF
13329#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013330#include "confdefs.h"
13331
Martin v. Löwis11437992002-04-12 09:54:03 +000013332#ifdef F77_DUMMY_MAIN
13333# ifdef __cplusplus
13334 extern "C"
13335# endif
13336 int F77_DUMMY_MAIN() { return 1; }
13337#endif
13338int
13339main ()
13340{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013341volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 ;
13343 return 0;
13344}
13345_ACEOF
13346rm -f conftest.$ac_objext
13347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13348 (eval $ac_compile) 2>&5
13349 ac_status=$?
13350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13351 (exit $ac_status); } &&
13352 { ac_try='test -s conftest.$ac_objext'
13353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13354 (eval $ac_try) 2>&5
13355 ac_status=$?
13356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13357 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013358 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013359else
Martin v. Löwis11437992002-04-12 09:54:03 +000013360 echo "$as_me: failed program was:" >&5
13361cat conftest.$ac_ext >&5
13362
13363cat >>confdefs.h <<\_ACEOF
13364#define volatile
13365_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013366
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013367
Guido van Rossum627b2d71993-12-24 10:39:16 +000013368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013369rm -f conftest.$ac_objext conftest.$ac_ext
13370echo "$as_me:$LINENO: result: $works" >&5
13371echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013372
Guido van Rossumda88dad1995-01-26 00:46:29 +000013373works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013374echo "$as_me:$LINENO: checking for working signed char" >&5
13375echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13376cat >conftest.$ac_ext <<_ACEOF
13377#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013378#include "confdefs.h"
13379
Martin v. Löwis11437992002-04-12 09:54:03 +000013380#ifdef F77_DUMMY_MAIN
13381# ifdef __cplusplus
13382 extern "C"
13383# endif
13384 int F77_DUMMY_MAIN() { return 1; }
13385#endif
13386int
13387main ()
13388{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013389signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013390 ;
13391 return 0;
13392}
13393_ACEOF
13394rm -f conftest.$ac_objext
13395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13396 (eval $ac_compile) 2>&5
13397 ac_status=$?
13398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13399 (exit $ac_status); } &&
13400 { ac_try='test -s conftest.$ac_objext'
13401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13402 (eval $ac_try) 2>&5
13403 ac_status=$?
13404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13405 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013406 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013407else
Martin v. Löwis11437992002-04-12 09:54:03 +000013408 echo "$as_me: failed program was:" >&5
13409cat conftest.$ac_ext >&5
13410
13411cat >>confdefs.h <<\_ACEOF
13412#define signed
13413_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013414
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013415
Guido van Rossum7f43da71994-08-01 12:15:30 +000013416fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013417rm -f conftest.$ac_objext conftest.$ac_ext
13418echo "$as_me:$LINENO: result: $works" >&5
13419echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013420
Guido van Rossumda88dad1995-01-26 00:46:29 +000013421have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013422echo "$as_me:$LINENO: checking for prototypes" >&5
13423echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13424cat >conftest.$ac_ext <<_ACEOF
13425#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013426#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013427int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013428#ifdef F77_DUMMY_MAIN
13429# ifdef __cplusplus
13430 extern "C"
13431# endif
13432 int F77_DUMMY_MAIN() { return 1; }
13433#endif
13434int
13435main ()
13436{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013437return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013438 ;
13439 return 0;
13440}
13441_ACEOF
13442rm -f conftest.$ac_objext
13443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13444 (eval $ac_compile) 2>&5
13445 ac_status=$?
13446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13447 (exit $ac_status); } &&
13448 { ac_try='test -s conftest.$ac_objext'
13449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13450 (eval $ac_try) 2>&5
13451 ac_status=$?
13452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13453 (exit $ac_status); }; }; then
13454
13455
13456cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013458_ACEOF
13459
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013460 have_prototypes=yes
13461
Guido van Rossumf78abae1997-01-21 22:02:36 +000013462else
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 echo "$as_me: failed program was:" >&5
13464cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013465fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013466rm -f conftest.$ac_objext conftest.$ac_ext
13467echo "$as_me:$LINENO: result: $have_prototypes" >&5
13468echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013469
Guido van Rossumda88dad1995-01-26 00:46:29 +000013470works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013471echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13472echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13473cat >conftest.$ac_ext <<_ACEOF
13474#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013475#include "confdefs.h"
13476
13477#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013478int foo(int x, ...) {
13479 va_list va;
13480 va_start(va, x);
13481 va_arg(va, int);
13482 va_arg(va, char *);
13483 va_arg(va, double);
13484 return 0;
13485}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013486
Martin v. Löwis11437992002-04-12 09:54:03 +000013487#ifdef F77_DUMMY_MAIN
13488# ifdef __cplusplus
13489 extern "C"
13490# endif
13491 int F77_DUMMY_MAIN() { return 1; }
13492#endif
13493int
13494main ()
13495{
Guido van Rossum90eea071996-08-30 20:58:57 +000013496return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013497 ;
13498 return 0;
13499}
13500_ACEOF
13501rm -f conftest.$ac_objext
13502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13503 (eval $ac_compile) 2>&5
13504 ac_status=$?
13505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13506 (exit $ac_status); } &&
13507 { ac_try='test -s conftest.$ac_objext'
13508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13509 (eval $ac_try) 2>&5
13510 ac_status=$?
13511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13512 (exit $ac_status); }; }; then
13513
13514
13515cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013516#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013517_ACEOF
13518
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013519 works=yes
13520
Guido van Rossumf78abae1997-01-21 22:02:36 +000013521else
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 echo "$as_me: failed program was:" >&5
13523cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013525rm -f conftest.$ac_objext conftest.$ac_ext
13526echo "$as_me:$LINENO: result: $works" >&5
13527echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528
Guido van Rossumda88dad1995-01-26 00:46:29 +000013529if test "$have_prototypes" = yes; then
13530bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013531echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13532echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13533cat >conftest.$ac_ext <<_ACEOF
13534#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013535#include "confdefs.h"
13536#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013537#ifdef F77_DUMMY_MAIN
13538# ifdef __cplusplus
13539 extern "C"
13540# endif
13541 int F77_DUMMY_MAIN() { return 1; }
13542#endif
13543int
13544main ()
13545{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013546char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013547 ;
13548 return 0;
13549}
13550_ACEOF
13551rm -f conftest.$ac_objext
13552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13553 (eval $ac_compile) 2>&5
13554 ac_status=$?
13555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13556 (exit $ac_status); } &&
13557 { ac_try='test -s conftest.$ac_objext'
13558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13559 (eval $ac_try) 2>&5
13560 ac_status=$?
13561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13562 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013563 :
13564else
Martin v. Löwis11437992002-04-12 09:54:03 +000013565 echo "$as_me: failed program was:" >&5
13566cat conftest.$ac_ext >&5
13567
13568cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013569#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013570_ACEOF
13571
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013572 bad_prototypes=yes
13573
Guido van Rossum627b2d71993-12-24 10:39:16 +000013574fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013575rm -f conftest.$ac_objext conftest.$ac_ext
13576echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13577echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013578fi
13579
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013580# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013581echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13582echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13583cat >conftest.$ac_ext <<_ACEOF
13584#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013585#include "confdefs.h"
13586#include <sys/types.h>
13587#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013588#ifdef F77_DUMMY_MAIN
13589# ifdef __cplusplus
13590 extern "C"
13591# endif
13592 int F77_DUMMY_MAIN() { return 1; }
13593#endif
13594int
13595main ()
13596{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013597struct sockaddr x;
13598x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013599 ;
13600 return 0;
13601}
13602_ACEOF
13603rm -f conftest.$ac_objext
13604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13605 (eval $ac_compile) 2>&5
13606 ac_status=$?
13607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13608 (exit $ac_status); } &&
13609 { ac_try='test -s conftest.$ac_objext'
13610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13611 (eval $ac_try) 2>&5
13612 ac_status=$?
13613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13614 (exit $ac_status); }; }; then
13615 echo "$as_me:$LINENO: result: yes" >&5
13616echo "${ECHO_T}yes" >&6
13617
13618cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013619#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013620_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013621
13622else
Martin v. Löwis11437992002-04-12 09:54:03 +000013623 echo "$as_me: failed program was:" >&5
13624cat conftest.$ac_ext >&5
13625echo "$as_me:$LINENO: result: no" >&5
13626echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013628rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013629
Martin v. Löwis11437992002-04-12 09:54:03 +000013630echo "$as_me:$LINENO: checking for bad static forward" >&5
13631echo $ECHO_N "checking for bad static forward... $ECHO_C" >&6
13632if test "${ac_cv_bad_static_forward+set}" = set; then
13633 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013634else
13635 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013636 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013637else
Martin v. Löwis11437992002-04-12 09:54:03 +000013638 cat >conftest.$ac_ext <<_ACEOF
13639#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013640#include "confdefs.h"
13641
13642struct s { int a; int b; };
13643static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013644int foobar() {
13645 static int random;
13646 random = (int) &foo;
13647 return random;
13648}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013649static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013650main() {
13651 exit(!((int)&foo == foobar()));
13652}
Martin v. Löwis11437992002-04-12 09:54:03 +000013653_ACEOF
13654rm -f conftest$ac_exeext
13655if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13656 (eval $ac_link) 2>&5
13657 ac_status=$?
13658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13659 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13661 (eval $ac_try) 2>&5
13662 ac_status=$?
13663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13664 (exit $ac_status); }; }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013665 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013666else
Martin v. Löwis11437992002-04-12 09:54:03 +000013667 echo "$as_me: program exited with status $ac_status" >&5
13668echo "$as_me: failed program was:" >&5
13669cat conftest.$ac_ext >&5
13670( exit $ac_status )
13671ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013673rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13674fi
Guido van Rossumf78abae1997-01-21 22:02:36 +000013675fi
13676
Martin v. Löwis11437992002-04-12 09:54:03 +000013677echo "$as_me:$LINENO: result: $ac_cv_bad_static_forward" >&5
13678echo "${ECHO_T}$ac_cv_bad_static_forward" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013679if test "$ac_cv_bad_static_forward" = yes
13680then
Martin v. Löwis11437992002-04-12 09:54:03 +000013681
13682cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013683#define BAD_STATIC_FORWARD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013684_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +000013685
13686fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013687
Guido van Rossumda88dad1995-01-26 00:46:29 +000013688va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013689echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13690echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13691cat >conftest.$ac_ext <<_ACEOF
13692#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013693#include "confdefs.h"
13694
13695#ifdef HAVE_STDARG_PROTOTYPES
13696#include <stdarg.h>
13697#else
13698#include <varargs.h>
13699#endif
13700
Martin v. Löwis11437992002-04-12 09:54:03 +000013701#ifdef F77_DUMMY_MAIN
13702# ifdef __cplusplus
13703 extern "C"
13704# endif
13705 int F77_DUMMY_MAIN() { return 1; }
13706#endif
13707int
13708main ()
13709{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013710va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 ;
13712 return 0;
13713}
13714_ACEOF
13715rm -f conftest.$ac_objext
13716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13717 (eval $ac_compile) 2>&5
13718 ac_status=$?
13719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13720 (exit $ac_status); } &&
13721 { ac_try='test -s conftest.$ac_objext'
13722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13723 (eval $ac_try) 2>&5
13724 ac_status=$?
13725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13726 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013727 :
13728else
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 echo "$as_me: failed program was:" >&5
13730cat conftest.$ac_ext >&5
13731
13732
13733cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013734#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013735_ACEOF
13736
Guido van Rossumda88dad1995-01-26 00:46:29 +000013737 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013738
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013740rm -f conftest.$ac_objext conftest.$ac_ext
13741echo "$as_me:$LINENO: result: $va_list_is_array" >&5
13742echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013743
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013744# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013745
13746
13747
13748echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
13749echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
13750if test "${ac_cv_func_gethostbyname_r+set}" = set; then
13751 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013752else
Martin v. Löwis11437992002-04-12 09:54:03 +000013753 cat >conftest.$ac_ext <<_ACEOF
13754#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013755#include "confdefs.h"
13756/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013758#include <assert.h>
13759/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013760#ifdef __cplusplus
13761extern "C"
13762#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013763/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013764 builtin and then its argument prototype would still apply. */
13765char gethostbyname_r ();
13766char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013767
Martin v. Löwis11437992002-04-12 09:54:03 +000013768#ifdef F77_DUMMY_MAIN
13769# ifdef __cplusplus
13770 extern "C"
13771# endif
13772 int F77_DUMMY_MAIN() { return 1; }
13773#endif
13774int
13775main ()
13776{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013777/* The GNU C library defines this for functions which it implements
13778 to always fail with ENOSYS. Some functions are actually named
13779 something starting with __ and the normal name is an alias. */
13780#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
13781choke me
13782#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013783f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013784#endif
13785
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 ;
13787 return 0;
13788}
13789_ACEOF
13790rm -f conftest.$ac_objext conftest$ac_exeext
13791if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13792 (eval $ac_link) 2>&5
13793 ac_status=$?
13794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13795 (exit $ac_status); } &&
13796 { ac_try='test -s conftest$ac_exeext'
13797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13798 (eval $ac_try) 2>&5
13799 ac_status=$?
13800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13801 (exit $ac_status); }; }; then
13802 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013803else
Martin v. Löwis11437992002-04-12 09:54:03 +000013804 echo "$as_me: failed program was:" >&5
13805cat conftest.$ac_ext >&5
13806ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013807fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013808rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013809fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013810echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
13811echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
13812if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013813
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013815#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013816_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013817
Martin v. Löwis11437992002-04-12 09:54:03 +000013818 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
13819echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013820 OLD_CFLAGS=$CFLAGS
13821 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013822 cat >conftest.$ac_ext <<_ACEOF
13823#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013824#include "confdefs.h"
13825
13826# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013827
13828#ifdef F77_DUMMY_MAIN
13829# ifdef __cplusplus
13830 extern "C"
13831# endif
13832 int F77_DUMMY_MAIN() { return 1; }
13833#endif
13834int
13835main ()
13836{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013837
13838 char *name;
13839 struct hostent *he, *res;
13840 char buffer[2048];
13841 int buflen = 2048;
13842 int h_errnop;
13843
13844 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013845
13846 ;
13847 return 0;
13848}
13849_ACEOF
13850rm -f conftest.$ac_objext
13851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13852 (eval $ac_compile) 2>&5
13853 ac_status=$?
13854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13855 (exit $ac_status); } &&
13856 { ac_try='test -s conftest.$ac_objext'
13857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13858 (eval $ac_try) 2>&5
13859 ac_status=$?
13860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13861 (exit $ac_status); }; }; then
13862
13863 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013864#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013865_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013866
Martin v. Löwis11437992002-04-12 09:54:03 +000013867
13868cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013869#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013870_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013871
Martin v. Löwis11437992002-04-12 09:54:03 +000013872 echo "$as_me:$LINENO: result: yes" >&5
13873echo "${ECHO_T}yes" >&6
13874
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013875else
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 echo "$as_me: failed program was:" >&5
13877cat conftest.$ac_ext >&5
13878
13879 echo "$as_me:$LINENO: result: no" >&5
13880echo "${ECHO_T}no" >&6
13881 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
13882echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
13883 cat >conftest.$ac_ext <<_ACEOF
13884#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013885#include "confdefs.h"
13886
13887# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013888
13889#ifdef F77_DUMMY_MAIN
13890# ifdef __cplusplus
13891 extern "C"
13892# endif
13893 int F77_DUMMY_MAIN() { return 1; }
13894#endif
13895int
13896main ()
13897{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013898
13899 char *name;
13900 struct hostent *he;
13901 char buffer[2048];
13902 int buflen = 2048;
13903 int h_errnop;
13904
13905 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013906
13907 ;
13908 return 0;
13909}
13910_ACEOF
13911rm -f conftest.$ac_objext
13912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13913 (eval $ac_compile) 2>&5
13914 ac_status=$?
13915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13916 (exit $ac_status); } &&
13917 { ac_try='test -s conftest.$ac_objext'
13918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13919 (eval $ac_try) 2>&5
13920 ac_status=$?
13921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13922 (exit $ac_status); }; }; then
13923
13924 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013925#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013926_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013927
Martin v. Löwis11437992002-04-12 09:54:03 +000013928
13929cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013930#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013931_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013932
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 echo "$as_me:$LINENO: result: yes" >&5
13934echo "${ECHO_T}yes" >&6
13935
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013936else
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 echo "$as_me: failed program was:" >&5
13938cat conftest.$ac_ext >&5
13939
13940 echo "$as_me:$LINENO: result: no" >&5
13941echo "${ECHO_T}no" >&6
13942 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
13943echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
13944 cat >conftest.$ac_ext <<_ACEOF
13945#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013946#include "confdefs.h"
13947
13948# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013949
13950#ifdef F77_DUMMY_MAIN
13951# ifdef __cplusplus
13952 extern "C"
13953# endif
13954 int F77_DUMMY_MAIN() { return 1; }
13955#endif
13956int
13957main ()
13958{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013959
13960 char *name;
13961 struct hostent *he;
13962 struct hostent_data data;
13963
13964 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000013965
13966 ;
13967 return 0;
13968}
13969_ACEOF
13970rm -f conftest.$ac_objext
13971if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13972 (eval $ac_compile) 2>&5
13973 ac_status=$?
13974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13975 (exit $ac_status); } &&
13976 { ac_try='test -s conftest.$ac_objext'
13977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13978 (eval $ac_try) 2>&5
13979 ac_status=$?
13980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13981 (exit $ac_status); }; }; then
13982
13983 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013984#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013985_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013986
Martin v. Löwis11437992002-04-12 09:54:03 +000013987
13988cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013989#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013990_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013991
Martin v. Löwis11437992002-04-12 09:54:03 +000013992 echo "$as_me:$LINENO: result: yes" >&5
13993echo "${ECHO_T}yes" >&6
13994
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013995else
Martin v. Löwis11437992002-04-12 09:54:03 +000013996 echo "$as_me: failed program was:" >&5
13997cat conftest.$ac_ext >&5
13998
13999 echo "$as_me:$LINENO: result: no" >&5
14000echo "${ECHO_T}no" >&6
14001
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014002fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014003rm -f conftest.$ac_objext conftest.$ac_ext
14004
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014005fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014006rm -f conftest.$ac_objext conftest.$ac_ext
14007
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014008fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014009rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014010 CFLAGS=$OLD_CFLAGS
14011
14012else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014013
Martin v. Löwis11437992002-04-12 09:54:03 +000014014
14015for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014016do
Martin v. Löwis11437992002-04-12 09:54:03 +000014017as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14018echo "$as_me:$LINENO: checking for $ac_func" >&5
14019echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14020if eval "test \"\${$as_ac_var+set}\" = set"; then
14021 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014022else
Martin v. Löwis11437992002-04-12 09:54:03 +000014023 cat >conftest.$ac_ext <<_ACEOF
14024#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014025#include "confdefs.h"
14026/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014027 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014028#include <assert.h>
14029/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014030#ifdef __cplusplus
14031extern "C"
14032#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014033/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014034 builtin and then its argument prototype would still apply. */
14035char $ac_func ();
14036char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014037
Martin v. Löwis11437992002-04-12 09:54:03 +000014038#ifdef F77_DUMMY_MAIN
14039# ifdef __cplusplus
14040 extern "C"
14041# endif
14042 int F77_DUMMY_MAIN() { return 1; }
14043#endif
14044int
14045main ()
14046{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014047/* The GNU C library defines this for functions which it implements
14048 to always fail with ENOSYS. Some functions are actually named
14049 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014050#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014051choke me
14052#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014053f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014054#endif
14055
Martin v. Löwis11437992002-04-12 09:54:03 +000014056 ;
14057 return 0;
14058}
14059_ACEOF
14060rm -f conftest.$ac_objext conftest$ac_exeext
14061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14062 (eval $ac_link) 2>&5
14063 ac_status=$?
14064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14065 (exit $ac_status); } &&
14066 { ac_try='test -s conftest$ac_exeext'
14067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14068 (eval $ac_try) 2>&5
14069 ac_status=$?
14070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14071 (exit $ac_status); }; }; then
14072 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014073else
Martin v. Löwis11437992002-04-12 09:54:03 +000014074 echo "$as_me: failed program was:" >&5
14075cat conftest.$ac_ext >&5
14076eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014077fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014078rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014080echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14081echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14082if test `eval echo '${'$as_ac_var'}'` = yes; then
14083 cat >>confdefs.h <<_ACEOF
14084#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14085_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014086
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014087fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014088done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014089
Michael W. Hudson54241132001-12-07 15:38:26 +000014090
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014091fi
14092
Michael W. Hudson54241132001-12-07 15:38:26 +000014093
14094
14095
14096
14097
14098
Guido van Rossum627b2d71993-12-24 10:39:16 +000014099# checks for system services
14100# (none yet)
14101
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014102# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014103echo "$as_me:$LINENO: checking for __fpu_control" >&5
14104echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14105if test "${ac_cv_func___fpu_control+set}" = set; then
14106 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014107else
Martin v. Löwis11437992002-04-12 09:54:03 +000014108 cat >conftest.$ac_ext <<_ACEOF
14109#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014110#include "confdefs.h"
14111/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014113#include <assert.h>
14114/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014115#ifdef __cplusplus
14116extern "C"
14117#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014118/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014119 builtin and then its argument prototype would still apply. */
14120char __fpu_control ();
14121char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014122
Martin v. Löwis11437992002-04-12 09:54:03 +000014123#ifdef F77_DUMMY_MAIN
14124# ifdef __cplusplus
14125 extern "C"
14126# endif
14127 int F77_DUMMY_MAIN() { return 1; }
14128#endif
14129int
14130main ()
14131{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014132/* The GNU C library defines this for functions which it implements
14133 to always fail with ENOSYS. Some functions are actually named
14134 something starting with __ and the normal name is an alias. */
14135#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14136choke me
14137#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014138f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014139#endif
14140
Martin v. Löwis11437992002-04-12 09:54:03 +000014141 ;
14142 return 0;
14143}
14144_ACEOF
14145rm -f conftest.$ac_objext conftest$ac_exeext
14146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14147 (eval $ac_link) 2>&5
14148 ac_status=$?
14149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14150 (exit $ac_status); } &&
14151 { ac_try='test -s conftest$ac_exeext'
14152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14153 (eval $ac_try) 2>&5
14154 ac_status=$?
14155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14156 (exit $ac_status); }; }; then
14157 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014158else
Martin v. Löwis11437992002-04-12 09:54:03 +000014159 echo "$as_me: failed program was:" >&5
14160cat conftest.$ac_ext >&5
14161ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014163rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014164fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014165echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14166echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14167if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014168 :
14169else
Martin v. Löwis11437992002-04-12 09:54:03 +000014170
14171echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14172echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14173if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14174 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014175else
Martin v. Löwis11437992002-04-12 09:54:03 +000014176 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014177LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014178cat >conftest.$ac_ext <<_ACEOF
14179#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014180#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014182/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014183#ifdef __cplusplus
14184extern "C"
14185#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014186/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014187 builtin and then its argument prototype would still apply. */
14188char __fpu_control ();
14189#ifdef F77_DUMMY_MAIN
14190# ifdef __cplusplus
14191 extern "C"
14192# endif
14193 int F77_DUMMY_MAIN() { return 1; }
14194#endif
14195int
14196main ()
14197{
14198__fpu_control ();
14199 ;
14200 return 0;
14201}
14202_ACEOF
14203rm -f conftest.$ac_objext conftest$ac_exeext
14204if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14205 (eval $ac_link) 2>&5
14206 ac_status=$?
14207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14208 (exit $ac_status); } &&
14209 { ac_try='test -s conftest$ac_exeext'
14210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14211 (eval $ac_try) 2>&5
14212 ac_status=$?
14213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14214 (exit $ac_status); }; }; then
14215 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014216else
Martin v. Löwis11437992002-04-12 09:54:03 +000014217 echo "$as_me: failed program was:" >&5
14218cat conftest.$ac_ext >&5
14219ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014220fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014221rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14222LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014223fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014224echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14225echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14226if test $ac_cv_lib_ieee___fpu_control = yes; then
14227 cat >>confdefs.h <<_ACEOF
14228#define HAVE_LIBIEEE 1
14229_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014230
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014231 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014232
Guido van Rossum627b2d71993-12-24 10:39:16 +000014233fi
14234
Michael W. Hudson54241132001-12-07 15:38:26 +000014235
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014236fi
14237
Michael W. Hudson54241132001-12-07 15:38:26 +000014238
Guido van Rossum7f253911997-05-09 02:42:48 +000014239# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014240echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14241echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14242
Guido van Rossum7f253911997-05-09 02:42:48 +000014243# Check whether --with-fpectl or --without-fpectl was given.
14244if test "${with_fpectl+set}" = set; then
14245 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014246
Guido van Rossum7f253911997-05-09 02:42:48 +000014247if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014248then
14249
14250cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014251#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014252_ACEOF
14253
14254 echo "$as_me:$LINENO: result: yes" >&5
14255echo "${ECHO_T}yes" >&6
14256else echo "$as_me:$LINENO: result: no" >&5
14257echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014258fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014259else
Martin v. Löwis11437992002-04-12 09:54:03 +000014260 echo "$as_me:$LINENO: result: no" >&5
14261echo "${ECHO_T}no" >&6
14262fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014263
Guido van Rossum7f43da71994-08-01 12:15:30 +000014264# check for --with-libm=...
14265
Guido van Rossum563e7081996-09-10 18:20:48 +000014266case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014267Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014268BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014269*) LIBM=-lm
14270esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014271echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14272echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14273
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014274# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014275if test "${with_libm+set}" = set; then
14276 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014277
Guido van Rossum7f253911997-05-09 02:42:48 +000014278if test "$withval" = no
14279then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014280 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14281echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014282elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014283then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014284 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14285echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14286else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14287echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14288 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014289fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014290else
Martin v. Löwis11437992002-04-12 09:54:03 +000014291 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14292echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14293fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014294
14295# check for --with-libc=...
14296
Martin v. Löwis11437992002-04-12 09:54:03 +000014297echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14298echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14299
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014300# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014301if test "${with_libc+set}" = set; then
14302 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
Guido van Rossum7f253911997-05-09 02:42:48 +000014304if test "$withval" = no
14305then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014306 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14307echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014308elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014309then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014310 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14311echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14312else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14313echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14314 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014315fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014316else
Martin v. Löwis11437992002-04-12 09:54:03 +000014317 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14318echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14319fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014320
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014321# check for hypot() in math library
14322LIBS_SAVE=$LIBS
14323LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014324
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014325for ac_func in hypot
14326do
Martin v. Löwis11437992002-04-12 09:54:03 +000014327as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14328echo "$as_me:$LINENO: checking for $ac_func" >&5
14329echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14330if eval "test \"\${$as_ac_var+set}\" = set"; then
14331 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014332else
Martin v. Löwis11437992002-04-12 09:54:03 +000014333 cat >conftest.$ac_ext <<_ACEOF
14334#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014335#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014336/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014337 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014338#include <assert.h>
14339/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014340#ifdef __cplusplus
14341extern "C"
14342#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014343/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014344 builtin and then its argument prototype would still apply. */
14345char $ac_func ();
14346char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014347
Martin v. Löwis11437992002-04-12 09:54:03 +000014348#ifdef F77_DUMMY_MAIN
14349# ifdef __cplusplus
14350 extern "C"
14351# endif
14352 int F77_DUMMY_MAIN() { return 1; }
14353#endif
14354int
14355main ()
14356{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014357/* The GNU C library defines this for functions which it implements
14358 to always fail with ENOSYS. Some functions are actually named
14359 something starting with __ and the normal name is an alias. */
14360#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14361choke me
14362#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014363f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014364#endif
14365
Martin v. Löwis11437992002-04-12 09:54:03 +000014366 ;
14367 return 0;
14368}
14369_ACEOF
14370rm -f conftest.$ac_objext conftest$ac_exeext
14371if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14372 (eval $ac_link) 2>&5
14373 ac_status=$?
14374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14375 (exit $ac_status); } &&
14376 { ac_try='test -s conftest$ac_exeext'
14377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14378 (eval $ac_try) 2>&5
14379 ac_status=$?
14380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14381 (exit $ac_status); }; }; then
14382 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014383else
Martin v. Löwis11437992002-04-12 09:54:03 +000014384 echo "$as_me: failed program was:" >&5
14385cat conftest.$ac_ext >&5
14386eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014387fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014388rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014389fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014390echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14391echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14392if test `eval echo '${'$as_ac_var'}'` = yes; then
14393 cat >>confdefs.h <<_ACEOF
14394#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14395_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014396
Michael W. Hudson54241132001-12-07 15:38:26 +000014397else
Martin v. Löwis11437992002-04-12 09:54:03 +000014398 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014399fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014400done
14401
Michael W. Hudson54241132001-12-07 15:38:26 +000014402
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014403LIBS=$LIBS_SAVE
14404
Guido van Rossumad713701997-07-10 22:42:38 +000014405# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000014406echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
14407echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
14408if test "${ac_cv_malloc_zero+set}" = set; then
14409 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014410else
14411 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000014412 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000014413else
Martin v. Löwis11437992002-04-12 09:54:03 +000014414 cat >conftest.$ac_ext <<_ACEOF
14415#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000014416#include "confdefs.h"
14417#include <stdio.h>
14418#ifdef HAVE_STDLIB
14419#include <stdlib.h>
14420#else
14421char *malloc(), *realloc();
14422int *free();
14423#endif
14424main() {
14425 char *p;
14426 p = malloc(0);
14427 if (p == NULL) exit(1);
14428 p = realloc(p, 0);
14429 if (p == NULL) exit(1);
14430 free(p);
14431 exit(0);
14432}
Martin v. Löwis11437992002-04-12 09:54:03 +000014433_ACEOF
14434rm -f conftest$ac_exeext
14435if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14436 (eval $ac_link) 2>&5
14437 ac_status=$?
14438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14441 (eval $ac_try) 2>&5
14442 ac_status=$?
14443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14444 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000014445 ac_cv_malloc_zero=nonnull
14446else
Martin v. Löwis11437992002-04-12 09:54:03 +000014447 echo "$as_me: program exited with status $ac_status" >&5
14448echo "$as_me: failed program was:" >&5
14449cat conftest.$ac_ext >&5
14450( exit $ac_status )
14451ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000014452fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014453rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000014454fi
Guido van Rossumad713701997-07-10 22:42:38 +000014455fi
Guido van Rossum3065c942001-09-17 04:03:14 +000014456 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000014457echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
14458echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000014459if test "$ac_cv_malloc_zero" = null
14460then
Martin v. Löwis11437992002-04-12 09:54:03 +000014461
14462cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014463#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014464_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000014465
14466fi
14467
Guido van Rossumef2255b2000-03-10 22:30:29 +000014468# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014469if test "${ac_cv_header_wchar_h+set}" = set; then
14470 echo "$as_me:$LINENO: checking for wchar.h" >&5
14471echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14472if test "${ac_cv_header_wchar_h+set}" = set; then
14473 echo $ECHO_N "(cached) $ECHO_C" >&6
14474fi
14475echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14476echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014477else
Martin v. Löwis11437992002-04-12 09:54:03 +000014478 # Is the header compilable?
14479echo "$as_me:$LINENO: checking wchar.h usability" >&5
14480echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14481cat >conftest.$ac_ext <<_ACEOF
14482#line $LINENO "configure"
14483#include "confdefs.h"
14484$ac_includes_default
14485#include <wchar.h>
14486_ACEOF
14487rm -f conftest.$ac_objext
14488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14489 (eval $ac_compile) 2>&5
14490 ac_status=$?
14491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14492 (exit $ac_status); } &&
14493 { ac_try='test -s conftest.$ac_objext'
14494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14495 (eval $ac_try) 2>&5
14496 ac_status=$?
14497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14498 (exit $ac_status); }; }; then
14499 ac_header_compiler=yes
14500else
14501 echo "$as_me: failed program was:" >&5
14502cat conftest.$ac_ext >&5
14503ac_header_compiler=no
14504fi
14505rm -f conftest.$ac_objext conftest.$ac_ext
14506echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14507echo "${ECHO_T}$ac_header_compiler" >&6
14508
14509# Is the header present?
14510echo "$as_me:$LINENO: checking wchar.h presence" >&5
14511echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14512cat >conftest.$ac_ext <<_ACEOF
14513#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014514#include "confdefs.h"
14515#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014516_ACEOF
14517if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14518 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14519 ac_status=$?
14520 egrep -v '^ *\+' conftest.er1 >conftest.err
14521 rm -f conftest.er1
14522 cat conftest.err >&5
14523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14524 (exit $ac_status); } >/dev/null; then
14525 if test -s conftest.err; then
14526 ac_cpp_err=$ac_c_preproc_warn_flag
14527 else
14528 ac_cpp_err=
14529 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014530else
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 ac_cpp_err=yes
14532fi
14533if test -z "$ac_cpp_err"; then
14534 ac_header_preproc=yes
14535else
14536 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014537 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014538 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014539fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014540rm -f conftest.err conftest.$ac_ext
14541echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14542echo "${ECHO_T}$ac_header_preproc" >&6
14543
14544# So? What about this header?
14545case $ac_header_compiler:$ac_header_preproc in
14546 yes:no )
14547 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14548echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14549 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14550echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14551 no:yes )
14552 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14553echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14554 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14555echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14556 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14557echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14558esac
14559echo "$as_me:$LINENO: checking for wchar.h" >&5
14560echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14561if test "${ac_cv_header_wchar_h+set}" = set; then
14562 echo $ECHO_N "(cached) $ECHO_C" >&6
14563else
14564 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014566echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14567echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14568
14569fi
14570if test $ac_cv_header_wchar_h = yes; then
14571
14572
14573cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014574#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014575_ACEOF
14576
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014577 wchar_h="yes"
14578
Guido van Rossumef2255b2000-03-10 22:30:29 +000014579else
Martin v. Löwis11437992002-04-12 09:54:03 +000014580 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014581
14582fi
14583
Michael W. Hudson54241132001-12-07 15:38:26 +000014584
Martin v. Löwis11437992002-04-12 09:54:03 +000014585
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014586# determine wchar_t size
14587if test "$wchar_h" = yes
14588then
Martin v. Löwis11437992002-04-12 09:54:03 +000014589 echo "$as_me:$LINENO: checking for wchar_t" >&5
14590echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14591if test "${ac_cv_type_wchar_t+set}" = set; then
14592 echo $ECHO_N "(cached) $ECHO_C" >&6
14593else
14594 cat >conftest.$ac_ext <<_ACEOF
14595#line $LINENO "configure"
14596#include "confdefs.h"
14597#include <wchar.h>
14598
14599#ifdef F77_DUMMY_MAIN
14600# ifdef __cplusplus
14601 extern "C"
14602# endif
14603 int F77_DUMMY_MAIN() { return 1; }
14604#endif
14605int
14606main ()
14607{
14608if ((wchar_t *) 0)
14609 return 0;
14610if (sizeof (wchar_t))
14611 return 0;
14612 ;
14613 return 0;
14614}
14615_ACEOF
14616rm -f conftest.$ac_objext
14617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14618 (eval $ac_compile) 2>&5
14619 ac_status=$?
14620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14621 (exit $ac_status); } &&
14622 { ac_try='test -s conftest.$ac_objext'
14623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14624 (eval $ac_try) 2>&5
14625 ac_status=$?
14626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14627 (exit $ac_status); }; }; then
14628 ac_cv_type_wchar_t=yes
14629else
14630 echo "$as_me: failed program was:" >&5
14631cat conftest.$ac_ext >&5
14632ac_cv_type_wchar_t=no
14633fi
14634rm -f conftest.$ac_objext conftest.$ac_ext
14635fi
14636echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14637echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14638
14639echo "$as_me:$LINENO: checking size of wchar_t" >&5
14640echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14641if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14642 echo $ECHO_N "(cached) $ECHO_C" >&6
14643else
14644 if test "$ac_cv_type_wchar_t" = yes; then
14645 # The cast to unsigned long works around a bug in the HP C Compiler
14646 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14647 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14648 # This bug is HP SR number 8606223364.
14649 if test "$cross_compiling" = yes; then
14650 # Depending upon the size, compute the lo and hi bounds.
14651cat >conftest.$ac_ext <<_ACEOF
14652#line $LINENO "configure"
14653#include "confdefs.h"
14654#include <wchar.h>
14655
14656#ifdef F77_DUMMY_MAIN
14657# ifdef __cplusplus
14658 extern "C"
14659# endif
14660 int F77_DUMMY_MAIN() { return 1; }
14661#endif
14662int
14663main ()
14664{
14665static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14666test_array [0] = 0
14667
14668 ;
14669 return 0;
14670}
14671_ACEOF
14672rm -f conftest.$ac_objext
14673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14674 (eval $ac_compile) 2>&5
14675 ac_status=$?
14676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14677 (exit $ac_status); } &&
14678 { ac_try='test -s conftest.$ac_objext'
14679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14680 (eval $ac_try) 2>&5
14681 ac_status=$?
14682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14683 (exit $ac_status); }; }; then
14684 ac_lo=0 ac_mid=0
14685 while :; do
14686 cat >conftest.$ac_ext <<_ACEOF
14687#line $LINENO "configure"
14688#include "confdefs.h"
14689#include <wchar.h>
14690
14691#ifdef F77_DUMMY_MAIN
14692# ifdef __cplusplus
14693 extern "C"
14694# endif
14695 int F77_DUMMY_MAIN() { return 1; }
14696#endif
14697int
14698main ()
14699{
14700static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14701test_array [0] = 0
14702
14703 ;
14704 return 0;
14705}
14706_ACEOF
14707rm -f conftest.$ac_objext
14708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14709 (eval $ac_compile) 2>&5
14710 ac_status=$?
14711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14712 (exit $ac_status); } &&
14713 { ac_try='test -s conftest.$ac_objext'
14714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14715 (eval $ac_try) 2>&5
14716 ac_status=$?
14717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14718 (exit $ac_status); }; }; then
14719 ac_hi=$ac_mid; break
14720else
14721 echo "$as_me: failed program was:" >&5
14722cat conftest.$ac_ext >&5
14723ac_lo=`expr $ac_mid + 1`
14724 if test $ac_lo -le $ac_mid; then
14725 ac_lo= ac_hi=
14726 break
14727 fi
14728 ac_mid=`expr 2 '*' $ac_mid + 1`
14729fi
14730rm -f conftest.$ac_objext conftest.$ac_ext
14731 done
14732else
14733 echo "$as_me: failed program was:" >&5
14734cat conftest.$ac_ext >&5
14735cat >conftest.$ac_ext <<_ACEOF
14736#line $LINENO "configure"
14737#include "confdefs.h"
14738#include <wchar.h>
14739
14740#ifdef F77_DUMMY_MAIN
14741# ifdef __cplusplus
14742 extern "C"
14743# endif
14744 int F77_DUMMY_MAIN() { return 1; }
14745#endif
14746int
14747main ()
14748{
14749static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14750test_array [0] = 0
14751
14752 ;
14753 return 0;
14754}
14755_ACEOF
14756rm -f conftest.$ac_objext
14757if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14758 (eval $ac_compile) 2>&5
14759 ac_status=$?
14760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14761 (exit $ac_status); } &&
14762 { ac_try='test -s conftest.$ac_objext'
14763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14764 (eval $ac_try) 2>&5
14765 ac_status=$?
14766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14767 (exit $ac_status); }; }; then
14768 ac_hi=-1 ac_mid=-1
14769 while :; do
14770 cat >conftest.$ac_ext <<_ACEOF
14771#line $LINENO "configure"
14772#include "confdefs.h"
14773#include <wchar.h>
14774
14775#ifdef F77_DUMMY_MAIN
14776# ifdef __cplusplus
14777 extern "C"
14778# endif
14779 int F77_DUMMY_MAIN() { return 1; }
14780#endif
14781int
14782main ()
14783{
14784static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14785test_array [0] = 0
14786
14787 ;
14788 return 0;
14789}
14790_ACEOF
14791rm -f conftest.$ac_objext
14792if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14793 (eval $ac_compile) 2>&5
14794 ac_status=$?
14795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14796 (exit $ac_status); } &&
14797 { ac_try='test -s conftest.$ac_objext'
14798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14799 (eval $ac_try) 2>&5
14800 ac_status=$?
14801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802 (exit $ac_status); }; }; then
14803 ac_lo=$ac_mid; break
14804else
14805 echo "$as_me: failed program was:" >&5
14806cat conftest.$ac_ext >&5
14807ac_hi=`expr '(' $ac_mid ')' - 1`
14808 if test $ac_mid -le $ac_hi; then
14809 ac_lo= ac_hi=
14810 break
14811 fi
14812 ac_mid=`expr 2 '*' $ac_mid`
14813fi
14814rm -f conftest.$ac_objext conftest.$ac_ext
14815 done
14816else
14817 echo "$as_me: failed program was:" >&5
14818cat conftest.$ac_ext >&5
14819ac_lo= ac_hi=
14820fi
14821rm -f conftest.$ac_objext conftest.$ac_ext
14822fi
14823rm -f conftest.$ac_objext conftest.$ac_ext
14824# Binary search between lo and hi bounds.
14825while test "x$ac_lo" != "x$ac_hi"; do
14826 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14827 cat >conftest.$ac_ext <<_ACEOF
14828#line $LINENO "configure"
14829#include "confdefs.h"
14830#include <wchar.h>
14831
14832#ifdef F77_DUMMY_MAIN
14833# ifdef __cplusplus
14834 extern "C"
14835# endif
14836 int F77_DUMMY_MAIN() { return 1; }
14837#endif
14838int
14839main ()
14840{
14841static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14842test_array [0] = 0
14843
14844 ;
14845 return 0;
14846}
14847_ACEOF
14848rm -f conftest.$ac_objext
14849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14850 (eval $ac_compile) 2>&5
14851 ac_status=$?
14852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14853 (exit $ac_status); } &&
14854 { ac_try='test -s conftest.$ac_objext'
14855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14856 (eval $ac_try) 2>&5
14857 ac_status=$?
14858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14859 (exit $ac_status); }; }; then
14860 ac_hi=$ac_mid
14861else
14862 echo "$as_me: failed program was:" >&5
14863cat conftest.$ac_ext >&5
14864ac_lo=`expr '(' $ac_mid ')' + 1`
14865fi
14866rm -f conftest.$ac_objext conftest.$ac_ext
14867done
14868case $ac_lo in
14869?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14870'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14871echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14872 { (exit 1); exit 1; }; } ;;
14873esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014874else
14875 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014876 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14877echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14878 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014879else
Martin v. Löwis11437992002-04-12 09:54:03 +000014880 cat >conftest.$ac_ext <<_ACEOF
14881#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014882#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014883#include <wchar.h>
14884
14885long longval () { return (long) (sizeof (wchar_t)); }
14886unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000014887#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014888#include <stdlib.h>
14889#ifdef F77_DUMMY_MAIN
14890# ifdef __cplusplus
14891 extern "C"
14892# endif
14893 int F77_DUMMY_MAIN() { return 1; }
14894#endif
14895int
14896main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014897{
Martin v. Löwis11437992002-04-12 09:54:03 +000014898
14899 FILE *f = fopen ("conftest.val", "w");
14900 if (! f)
14901 exit (1);
14902 if (((long) (sizeof (wchar_t))) < 0)
14903 {
14904 long i = longval ();
14905 if (i != ((long) (sizeof (wchar_t))))
14906 exit (1);
14907 fprintf (f, "%ld\n", i);
14908 }
14909 else
14910 {
14911 unsigned long i = ulongval ();
14912 if (i != ((long) (sizeof (wchar_t))))
14913 exit (1);
14914 fprintf (f, "%lu\n", i);
14915 }
14916 exit (ferror (f) || fclose (f) != 0);
14917
14918 ;
14919 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014920}
Martin v. Löwis11437992002-04-12 09:54:03 +000014921_ACEOF
14922rm -f conftest$ac_exeext
14923if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14924 (eval $ac_link) 2>&5
14925 ac_status=$?
14926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14927 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14929 (eval $ac_try) 2>&5
14930 ac_status=$?
14931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14932 (exit $ac_status); }; }; then
14933 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000014934else
Martin v. Löwis11437992002-04-12 09:54:03 +000014935 echo "$as_me: program exited with status $ac_status" >&5
14936echo "$as_me: failed program was:" >&5
14937cat conftest.$ac_ext >&5
14938( exit $ac_status )
14939{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14940echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14941 { (exit 1); exit 1; }; }
14942fi
14943rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14944fi
14945fi
14946rm -f conftest.val
14947else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014948 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000014949fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014950fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014951echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
14952echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
14953cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014954#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014955_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014956
Michael W. Hudson54241132001-12-07 15:38:26 +000014957
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014958fi
14959
Martin v. Löwis11437992002-04-12 09:54:03 +000014960echo "$as_me:$LINENO: checking what type to use for unicode" >&5
14961echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014962# Check whether --enable-unicode or --disable-unicode was given.
14963if test "${enable_unicode+set}" = set; then
14964 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000014965
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014966else
14967 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014968fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014969
14970if test $enable_unicode = yes
14971then
Martin v. Löwisfd917792001-06-27 20:22:04 +000014972 # Without any arguments, Py_UNICODE defaults to two-byte mode
14973 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014974fi
14975
Martin v. Löwis0036cba2002-04-12 09:58:45 +000014976
14977
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014978case "$enable_unicode" in
14979ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000014980 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014981#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000014982_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014983
14984 ;;
14985ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000014986 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014987#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000014988_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014989
14990 ;;
14991esac
14992
Michael W. Hudson54241132001-12-07 15:38:26 +000014993
Martin v. Löwis11437992002-04-12 09:54:03 +000014994
14995
Martin v. Löwis0036cba2002-04-12 09:58:45 +000014996
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014997if test "$enable_unicode" = "no"
14998then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000014999 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015000 echo "$as_me:$LINENO: result: not used" >&5
15001echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015002else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015003 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015004
15005cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015006#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015007_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015008
15009 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15010 then
15011 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015012
Martin v. Löwis11437992002-04-12 09:54:03 +000015013cat >>confdefs.h <<\_ACEOF
15014#define HAVE_USABLE_WCHAR_T 1
15015_ACEOF
15016
15017 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015018#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015019_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015020
15021 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15022 then
15023 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015025#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015026_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015027
15028 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15029 then
15030 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015031 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015032#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015033_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015034
15035 else
15036 PY_UNICODE_TYPE="no type found"
15037 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15039echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015040fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015041
15042# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015043echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15044echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15045if test "${ac_cv_c_bigendian+set}" = set; then
15046 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015047else
Martin v. Löwis11437992002-04-12 09:54:03 +000015048 # See if sys/param.h defines the BYTE_ORDER macro.
15049cat >conftest.$ac_ext <<_ACEOF
15050#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015051#include "confdefs.h"
15052#include <sys/types.h>
15053#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015054
Martin v. Löwis11437992002-04-12 09:54:03 +000015055#ifdef F77_DUMMY_MAIN
15056# ifdef __cplusplus
15057 extern "C"
15058# endif
15059 int F77_DUMMY_MAIN() { return 1; }
15060#endif
15061int
15062main ()
15063{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015064#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15065 bogus endian macros
15066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015067
15068 ;
15069 return 0;
15070}
15071_ACEOF
15072rm -f conftest.$ac_objext
15073if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15074 (eval $ac_compile) 2>&5
15075 ac_status=$?
15076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15077 (exit $ac_status); } &&
15078 { ac_try='test -s conftest.$ac_objext'
15079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15080 (eval $ac_try) 2>&5
15081 ac_status=$?
15082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15083 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015084 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015085cat >conftest.$ac_ext <<_ACEOF
15086#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015087#include "confdefs.h"
15088#include <sys/types.h>
15089#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015090
Martin v. Löwis11437992002-04-12 09:54:03 +000015091#ifdef F77_DUMMY_MAIN
15092# ifdef __cplusplus
15093 extern "C"
15094# endif
15095 int F77_DUMMY_MAIN() { return 1; }
15096#endif
15097int
15098main ()
15099{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015100#if BYTE_ORDER != BIG_ENDIAN
15101 not big endian
15102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015103
15104 ;
15105 return 0;
15106}
15107_ACEOF
15108rm -f conftest.$ac_objext
15109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15110 (eval $ac_compile) 2>&5
15111 ac_status=$?
15112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15113 (exit $ac_status); } &&
15114 { ac_try='test -s conftest.$ac_objext'
15115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15116 (eval $ac_try) 2>&5
15117 ac_status=$?
15118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15119 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015120 ac_cv_c_bigendian=yes
15121else
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 echo "$as_me: failed program was:" >&5
15123cat conftest.$ac_ext >&5
15124ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015126rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015127else
Martin v. Löwis11437992002-04-12 09:54:03 +000015128 echo "$as_me: failed program was:" >&5
15129cat conftest.$ac_ext >&5
15130# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015131if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015132 # try to guess the endianess by grep'ing values into an object file
15133 ac_cv_c_bigendian=unknown
15134 cat >conftest.$ac_ext <<_ACEOF
15135#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015136#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015137short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15138short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15139void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15140short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15141short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15142void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15143#ifdef F77_DUMMY_MAIN
15144# ifdef __cplusplus
15145 extern "C"
15146# endif
15147 int F77_DUMMY_MAIN() { return 1; }
15148#endif
15149int
15150main ()
15151{
15152 _ascii (); _ebcdic ();
15153 ;
15154 return 0;
15155}
15156_ACEOF
15157rm -f conftest.$ac_objext
15158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15159 (eval $ac_compile) 2>&5
15160 ac_status=$?
15161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15162 (exit $ac_status); } &&
15163 { ac_try='test -s conftest.$ac_objext'
15164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15165 (eval $ac_try) 2>&5
15166 ac_status=$?
15167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15168 (exit $ac_status); }; }; then
15169 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15170 ac_cv_c_bigendian=yes
15171fi
15172if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15173 if test "$ac_cv_c_bigendian" = unknown; then
15174 ac_cv_c_bigendian=no
15175 else
15176 # finding both strings is unlikely to happen, but who knows?
15177 ac_cv_c_bigendian=unknown
15178 fi
15179fi
15180else
15181 echo "$as_me: failed program was:" >&5
15182cat conftest.$ac_ext >&5
15183fi
15184rm -f conftest.$ac_objext conftest.$ac_ext
15185else
15186 cat >conftest.$ac_ext <<_ACEOF
15187#line $LINENO "configure"
15188#include "confdefs.h"
15189int
15190main ()
15191{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015192 /* Are we little or big endian? From Harbison&Steele. */
15193 union
15194 {
15195 long l;
15196 char c[sizeof (long)];
15197 } u;
15198 u.l = 1;
15199 exit (u.c[sizeof (long) - 1] == 1);
15200}
Martin v. Löwis11437992002-04-12 09:54:03 +000015201_ACEOF
15202rm -f conftest$ac_exeext
15203if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15204 (eval $ac_link) 2>&5
15205 ac_status=$?
15206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15207 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15209 (eval $ac_try) 2>&5
15210 ac_status=$?
15211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15212 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015213 ac_cv_c_bigendian=no
15214else
Martin v. Löwis11437992002-04-12 09:54:03 +000015215 echo "$as_me: program exited with status $ac_status" >&5
15216echo "$as_me: failed program was:" >&5
15217cat conftest.$ac_ext >&5
15218( exit $ac_status )
15219ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015220fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015221rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015223fi
15224rm -f conftest.$ac_objext conftest.$ac_ext
15225fi
15226echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15227echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15228case $ac_cv_c_bigendian in
15229 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015230
Martin v. Löwis11437992002-04-12 09:54:03 +000015231cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015232#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015233_ACEOF
15234 ;;
15235 no)
15236 ;;
15237 *)
15238 { { echo "$as_me:$LINENO: error: unknown endianess
15239presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15240echo "$as_me: error: unknown endianess
15241presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15242 { (exit 1); exit 1; }; } ;;
15243esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015244
Michael W. Hudson54241132001-12-07 15:38:26 +000015245
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015246# Check whether right shifting a negative integer extends the sign bit
15247# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015248echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15249echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15250if test "${ac_cv_rshift_extends_sign+set}" = set; then
15251 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015252else
Martin v. Löwis11437992002-04-12 09:54:03 +000015253
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015254if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015255 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015256else
Martin v. Löwis11437992002-04-12 09:54:03 +000015257 cat >conftest.$ac_ext <<_ACEOF
15258#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015259#include "confdefs.h"
15260
15261int main()
15262{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015263 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015264}
15265
Martin v. Löwis11437992002-04-12 09:54:03 +000015266_ACEOF
15267rm -f conftest$ac_exeext
15268if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15269 (eval $ac_link) 2>&5
15270 ac_status=$?
15271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15272 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15274 (eval $ac_try) 2>&5
15275 ac_status=$?
15276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15277 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015278 ac_cv_rshift_extends_sign=yes
15279else
Martin v. Löwis11437992002-04-12 09:54:03 +000015280 echo "$as_me: program exited with status $ac_status" >&5
15281echo "$as_me: failed program was:" >&5
15282cat conftest.$ac_ext >&5
15283( exit $ac_status )
15284ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015285fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015286rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15287fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015288fi
15289
Martin v. Löwis11437992002-04-12 09:54:03 +000015290echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15291echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015292if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015293then
Martin v. Löwis11437992002-04-12 09:54:03 +000015294
15295cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015296#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015297_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015298
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015299fi
15300
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015301# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015302echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15303echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15304if test "${ac_cv_have_getc_unlocked+set}" = set; then
15305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015306else
Martin v. Löwis11437992002-04-12 09:54:03 +000015307
15308cat >conftest.$ac_ext <<_ACEOF
15309#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015310#include "confdefs.h"
15311#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015312#ifdef F77_DUMMY_MAIN
15313# ifdef __cplusplus
15314 extern "C"
15315# endif
15316 int F77_DUMMY_MAIN() { return 1; }
15317#endif
15318int
15319main ()
15320{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015321
15322 FILE *f = fopen("/dev/null", "r");
15323 flockfile(f);
15324 getc_unlocked(f);
15325 funlockfile(f);
15326
Martin v. Löwis11437992002-04-12 09:54:03 +000015327 ;
15328 return 0;
15329}
15330_ACEOF
15331rm -f conftest.$ac_objext conftest$ac_exeext
15332if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15333 (eval $ac_link) 2>&5
15334 ac_status=$?
15335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15336 (exit $ac_status); } &&
15337 { ac_try='test -s conftest$ac_exeext'
15338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15339 (eval $ac_try) 2>&5
15340 ac_status=$?
15341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15342 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015343 ac_cv_have_getc_unlocked=yes
15344else
Martin v. Löwis11437992002-04-12 09:54:03 +000015345 echo "$as_me: failed program was:" >&5
15346cat conftest.$ac_ext >&5
15347ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015349rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015350fi
15351
Martin v. Löwis11437992002-04-12 09:54:03 +000015352echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15353echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015354if test "$ac_cv_have_getc_unlocked" = yes
15355then
Martin v. Löwis11437992002-04-12 09:54:03 +000015356
15357cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015358#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015359_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015360
15361fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015362
Martin v. Löwis0daad592001-09-30 21:09:59 +000015363# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015364echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15365echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15366if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15367 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015368else
Martin v. Löwis11437992002-04-12 09:54:03 +000015369 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015370LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015371cat >conftest.$ac_ext <<_ACEOF
15372#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015373#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015374
Guido van Rossum353ae582001-07-10 16:45:32 +000015375/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015376#ifdef __cplusplus
15377extern "C"
15378#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015379/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015380 builtin and then its argument prototype would still apply. */
15381char rl_pre_input_hook ();
15382#ifdef F77_DUMMY_MAIN
15383# ifdef __cplusplus
15384 extern "C"
15385# endif
15386 int F77_DUMMY_MAIN() { return 1; }
15387#endif
15388int
15389main ()
15390{
15391rl_pre_input_hook ();
15392 ;
15393 return 0;
15394}
15395_ACEOF
15396rm -f conftest.$ac_objext conftest$ac_exeext
15397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15398 (eval $ac_link) 2>&5
15399 ac_status=$?
15400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15401 (exit $ac_status); } &&
15402 { ac_try='test -s conftest$ac_exeext'
15403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15404 (eval $ac_try) 2>&5
15405 ac_status=$?
15406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15407 (exit $ac_status); }; }; then
15408 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015409else
Martin v. Löwis11437992002-04-12 09:54:03 +000015410 echo "$as_me: failed program was:" >&5
15411cat conftest.$ac_ext >&5
15412ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015413fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015414rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15415LIBS=$ac_check_lib_save_LIBS
15416fi
15417echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15418echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15419if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015420
Martin v. Löwis11437992002-04-12 09:54:03 +000015421cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015422#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015423_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015424
Martin v. Löwis0daad592001-09-30 21:09:59 +000015425fi
15426
Michael W. Hudson54241132001-12-07 15:38:26 +000015427
Martin v. Löwis0daad592001-09-30 21:09:59 +000015428# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015429echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15430echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15431if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15432 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015433else
Martin v. Löwis11437992002-04-12 09:54:03 +000015434 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015435LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015436cat >conftest.$ac_ext <<_ACEOF
15437#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015438#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015439
Martin v. Löwis0daad592001-09-30 21:09:59 +000015440/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015441#ifdef __cplusplus
15442extern "C"
15443#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015444/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015445 builtin and then its argument prototype would still apply. */
15446char rl_completion_matches ();
15447#ifdef F77_DUMMY_MAIN
15448# ifdef __cplusplus
15449 extern "C"
15450# endif
15451 int F77_DUMMY_MAIN() { return 1; }
15452#endif
15453int
15454main ()
15455{
15456rl_completion_matches ();
15457 ;
15458 return 0;
15459}
15460_ACEOF
15461rm -f conftest.$ac_objext conftest$ac_exeext
15462if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15463 (eval $ac_link) 2>&5
15464 ac_status=$?
15465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15466 (exit $ac_status); } &&
15467 { ac_try='test -s conftest$ac_exeext'
15468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15469 (eval $ac_try) 2>&5
15470 ac_status=$?
15471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15472 (exit $ac_status); }; }; then
15473 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015474else
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 echo "$as_me: failed program was:" >&5
15476cat conftest.$ac_ext >&5
15477ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015478fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015479rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15480LIBS=$ac_check_lib_save_LIBS
15481fi
15482echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15483echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15484if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015485
Martin v. Löwis11437992002-04-12 09:54:03 +000015486cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015487#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015488_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015489
Guido van Rossum353ae582001-07-10 16:45:32 +000015490fi
15491
Jack Jansendd19cf82001-12-06 22:36:17 +000015492
Martin v. Löwis11437992002-04-12 09:54:03 +000015493echo "$as_me:$LINENO: checking for broken nice()" >&5
15494echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15495if test "${ac_cv_broken_nice+set}" = set; then
15496 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015497else
Martin v. Löwis11437992002-04-12 09:54:03 +000015498
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015499if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015500 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015501else
Martin v. Löwis11437992002-04-12 09:54:03 +000015502 cat >conftest.$ac_ext <<_ACEOF
15503#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015504#include "confdefs.h"
15505
15506int main()
15507{
15508 int val1 = nice(1);
15509 if (val1 != -1 && val1 == nice(2))
15510 exit(0);
15511 exit(1);
15512}
15513
Martin v. Löwis11437992002-04-12 09:54:03 +000015514_ACEOF
15515rm -f conftest$ac_exeext
15516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15517 (eval $ac_link) 2>&5
15518 ac_status=$?
15519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15522 (eval $ac_try) 2>&5
15523 ac_status=$?
15524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15525 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015526 ac_cv_broken_nice=yes
15527else
Martin v. Löwis11437992002-04-12 09:54:03 +000015528 echo "$as_me: program exited with status $ac_status" >&5
15529echo "$as_me: failed program was:" >&5
15530cat conftest.$ac_ext >&5
15531( exit $ac_status )
15532ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015533fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015534rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15535fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015536fi
15537
Martin v. Löwis11437992002-04-12 09:54:03 +000015538echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15539echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015540if test "$ac_cv_broken_nice" = yes
15541then
Martin v. Löwis11437992002-04-12 09:54:03 +000015542
15543cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015544#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015545_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015546
15547fi
15548
Jack Jansen666b1e72001-10-31 12:11:48 +000015549# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015550echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15551echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15552if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15553 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015554else
Martin v. Löwis11437992002-04-12 09:54:03 +000015555 cat >conftest.$ac_ext <<_ACEOF
15556#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015557#include "confdefs.h"
15558#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015559#ifdef F77_DUMMY_MAIN
15560# ifdef __cplusplus
15561 extern "C"
15562# endif
15563 int F77_DUMMY_MAIN() { return 1; }
15564#endif
15565int
15566main ()
15567{
Jack Jansen666b1e72001-10-31 12:11:48 +000015568
15569 int rtn;
15570 rtn = mvwdelch(0,0,0);
15571
Martin v. Löwis11437992002-04-12 09:54:03 +000015572 ;
15573 return 0;
15574}
15575_ACEOF
15576rm -f conftest.$ac_objext
15577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15578 (eval $ac_compile) 2>&5
15579 ac_status=$?
15580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15581 (exit $ac_status); } &&
15582 { ac_try='test -s conftest.$ac_objext'
15583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15584 (eval $ac_try) 2>&5
15585 ac_status=$?
15586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15587 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015588 ac_cv_mvwdelch_is_expression=yes
15589else
Martin v. Löwis11437992002-04-12 09:54:03 +000015590 echo "$as_me: failed program was:" >&5
15591cat conftest.$ac_ext >&5
15592ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015593fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015594rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015595fi
15596
Martin v. Löwis11437992002-04-12 09:54:03 +000015597echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15598echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015599
15600if test "$ac_cv_mvwdelch_is_expression" = yes
15601then
Martin v. Löwis11437992002-04-12 09:54:03 +000015602
15603cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015604#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015605_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015606
15607fi
15608
Martin v. Löwis11437992002-04-12 09:54:03 +000015609echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15610echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15611if test "${ac_cv_window_has_flags+set}" = set; then
15612 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015613else
Martin v. Löwis11437992002-04-12 09:54:03 +000015614 cat >conftest.$ac_ext <<_ACEOF
15615#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015616#include "confdefs.h"
15617#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015618#ifdef F77_DUMMY_MAIN
15619# ifdef __cplusplus
15620 extern "C"
15621# endif
15622 int F77_DUMMY_MAIN() { return 1; }
15623#endif
15624int
15625main ()
15626{
Jack Jansen666b1e72001-10-31 12:11:48 +000015627
15628 WINDOW *w;
15629 w->_flags = 0;
15630
Martin v. Löwis11437992002-04-12 09:54:03 +000015631 ;
15632 return 0;
15633}
15634_ACEOF
15635rm -f conftest.$ac_objext
15636if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15637 (eval $ac_compile) 2>&5
15638 ac_status=$?
15639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15640 (exit $ac_status); } &&
15641 { ac_try='test -s conftest.$ac_objext'
15642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15643 (eval $ac_try) 2>&5
15644 ac_status=$?
15645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15646 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015647 ac_cv_window_has_flags=yes
15648else
Martin v. Löwis11437992002-04-12 09:54:03 +000015649 echo "$as_me: failed program was:" >&5
15650cat conftest.$ac_ext >&5
15651ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015652fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015653rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015654fi
15655
Martin v. Löwis11437992002-04-12 09:54:03 +000015656echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15657echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015658
Jack Jansen666b1e72001-10-31 12:11:48 +000015659
15660if test "$ac_cv_window_has_flags" = yes
15661then
Martin v. Löwis11437992002-04-12 09:54:03 +000015662
15663cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015664#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015665_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015666
15667fi
15668
Guido van Rossum95713eb2000-05-18 20:53:31 +000015669# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
15670# Add sys/socket.h to confdefs.h
15671cat >> confdefs.h <<\EOF
15672#ifdef HAVE_SYS_SOCKET_H
15673#include <sys/socket.h>
15674#endif
15675EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015676echo "$as_me:$LINENO: checking for socklen_t" >&5
15677echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15678if test "${ac_cv_type_socklen_t+set}" = set; then
15679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015680else
Martin v. Löwis11437992002-04-12 09:54:03 +000015681 cat >conftest.$ac_ext <<_ACEOF
15682#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015683#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015684$ac_includes_default
15685#ifdef F77_DUMMY_MAIN
15686# ifdef __cplusplus
15687 extern "C"
15688# endif
15689 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015691int
15692main ()
15693{
15694if ((socklen_t *) 0)
15695 return 0;
15696if (sizeof (socklen_t))
15697 return 0;
15698 ;
15699 return 0;
15700}
15701_ACEOF
15702rm -f conftest.$ac_objext
15703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15704 (eval $ac_compile) 2>&5
15705 ac_status=$?
15706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15707 (exit $ac_status); } &&
15708 { ac_try='test -s conftest.$ac_objext'
15709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15710 (eval $ac_try) 2>&5
15711 ac_status=$?
15712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15713 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015714 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015715else
Martin v. Löwis11437992002-04-12 09:54:03 +000015716 echo "$as_me: failed program was:" >&5
15717cat conftest.$ac_ext >&5
15718ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015719fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015720rm -f conftest.$ac_objext conftest.$ac_ext
15721fi
15722echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15723echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15724if test $ac_cv_type_socklen_t = yes; then
15725 :
15726else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015727
Martin v. Löwis11437992002-04-12 09:54:03 +000015728cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015729#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015730_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015731
15732fi
15733
Michael W. Hudson54241132001-12-07 15:38:26 +000015734
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015735#AC_MSG_CHECKING(for Modules/Setup)
15736#if test ! -f Modules/Setup ; then
15737# if test ! -d Modules ; then
15738# mkdir Modules
15739# fi
15740# cp "$srcdir/Modules/Setup.dist" Modules/Setup
15741# AC_MSG_RESULT(creating)
15742#else
15743# AC_MSG_RESULT(already exists)
15744#fi
15745
Michael W. Hudson54241132001-12-07 15:38:26 +000015746
15747
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015748for h in `(cd $srcdir;echo Python/thread_*.h)`
15749do
15750 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15751done
15752
Michael W. Hudson54241132001-12-07 15:38:26 +000015753
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +000015754SRCDIRS="Parser Grammar Objects Python Modules"
Martin v. Löwis11437992002-04-12 09:54:03 +000015755echo "$as_me:$LINENO: checking for build directories" >&5
15756echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015757for dir in $SRCDIRS; do
15758 if test ! -d $dir; then
15759 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015760 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015761done
Martin v. Löwis11437992002-04-12 09:54:03 +000015762echo "$as_me:$LINENO: result: done" >&5
15763echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015764
Guido van Rossum627b2d71993-12-24 10:39:16 +000015765# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000015766ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
15767cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015768# This file is a shell script that caches the results of configure
15769# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015770# scripts and configure runs, see configure's option --config-cache.
15771# It is not useful on other systems. If it contains results you don't
15772# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015773#
Martin v. Löwis11437992002-04-12 09:54:03 +000015774# config.status only pays attention to the cache file if you give it
15775# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015776#
Martin v. Löwis11437992002-04-12 09:54:03 +000015777# `ac_cv_env_foo' variables (set or unset) will be overriden when
15778# loading this file, other *unset* `ac_cv_foo' will be assigned the
15779# following values.
15780
15781_ACEOF
15782
Guido van Rossumf78abae1997-01-21 22:02:36 +000015783# The following way of writing the cache mishandles newlines in values,
15784# but we know of no workaround that is simple, portable, and efficient.
15785# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015786# Ultrix sh set writes to stderr and can't be redirected directly,
15787# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015788{
15789 (set) 2>&1 |
15790 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15791 *ac_space=\ *)
15792 # `set' does not quote correctly, so add quotes (double-quote
15793 # substitution turns \\\\ into \\, and sed turns \\ into \).
15794 sed -n \
15795 "s/'/'\\\\''/g;
15796 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15797 ;;
15798 *)
15799 # `set' quotes correctly as required by POSIX, so do not add quotes.
15800 sed -n \
15801 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15802 ;;
15803 esac;
15804} |
15805 sed '
15806 t clear
15807 : clear
15808 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15809 t end
15810 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15811 : end' >>confcache
15812if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015813 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015814 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15815 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015816 else
15817 echo "not updating unwritable cache $cache_file"
15818 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015819fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015820rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015821
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015822test "x$prefix" = xNONE && prefix=$ac_default_prefix
15823# Let make expand exec_prefix.
15824test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015825
Martin v. Löwis11437992002-04-12 09:54:03 +000015826# VPATH may cause trouble with some makes, so we remove $(srcdir),
15827# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15828# trailing colons and then remove the whole line if VPATH becomes empty
15829# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015830if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015831 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15832s/:*\$(srcdir):*/:/;
15833s/:*\${srcdir}:*/:/;
15834s/:*@srcdir@:*/:/;
15835s/^\([^=]*=[ ]*\):*/\1/;
15836s/:*$//;
15837s/^[^=]*=[ ]*$//;
15838}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000015839fi
15840
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015841DEFS=-DHAVE_CONFIG_H
15842
Martin v. Löwis11437992002-04-12 09:54:03 +000015843
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015844: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000015845ac_clean_files_save=$ac_clean_files
15846ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15847{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
15848echo "$as_me: creating $CONFIG_STATUS" >&6;}
15849cat >$CONFIG_STATUS <<_ACEOF
15850#! $SHELL
15851# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015852# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015853# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015854# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015855
Martin v. Löwis11437992002-04-12 09:54:03 +000015856debug=false
15857SHELL=\${CONFIG_SHELL-$SHELL}
15858_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015859
Martin v. Löwis11437992002-04-12 09:54:03 +000015860cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000015861
Martin v. Löwis11437992002-04-12 09:54:03 +000015862## --------------------- ##
15863## M4sh Initialization. ##
15864## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015865
Martin v. Löwis11437992002-04-12 09:54:03 +000015866# Be Bourne compatible
15867if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15868 emulate sh
15869 NULLCMD=:
15870elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15871 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000015872fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015873
Martin v. Löwis11437992002-04-12 09:54:03 +000015874# NLS nuisances.
15875# Support unset when possible.
15876if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15877 as_unset=unset
15878else
15879 as_unset=false
15880fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015881
Martin v. Löwis11437992002-04-12 09:54:03 +000015882(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
15883 { $as_unset LANG || test "${LANG+set}" != set; } ||
15884 { LANG=C; export LANG; }
15885(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
15886 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
15887 { LC_ALL=C; export LC_ALL; }
15888(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
15889 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
15890 { LC_TIME=C; export LC_TIME; }
15891(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
15892 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
15893 { LC_CTYPE=C; export LC_CTYPE; }
15894(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
15895 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
15896 { LANGUAGE=C; export LANGUAGE; }
15897(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
15898 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
15899 { LC_COLLATE=C; export LC_COLLATE; }
15900(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
15901 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
15902 { LC_NUMERIC=C; export LC_NUMERIC; }
15903(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
15904 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
15905 { LC_MESSAGES=C; export LC_MESSAGES; }
15906
15907
15908# Name of the executable.
15909as_me=`(basename "$0") 2>/dev/null ||
15910$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15911 X"$0" : 'X\(//\)$' \| \
15912 X"$0" : 'X\(/\)$' \| \
15913 . : '\(.\)' 2>/dev/null ||
15914echo X/"$0" |
15915 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
15916 /^X\/\(\/\/\)$/{ s//\1/; q; }
15917 /^X\/\(\/\).*/{ s//\1/; q; }
15918 s/.*/./; q'`
15919
15920# PATH needs CR, and LINENO needs CR and PATH.
15921# Avoid depending upon Character Ranges.
15922as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15923as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15924as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15925as_cr_digits='0123456789'
15926as_cr_alnum=$as_cr_Letters$as_cr_digits
15927
15928# The user is always right.
15929if test "${PATH_SEPARATOR+set}" != set; then
15930 echo "#! /bin/sh" >conftest.sh
15931 echo "exit 0" >>conftest.sh
15932 chmod +x conftest.sh
15933 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
15934 PATH_SEPARATOR=';'
15935 else
15936 PATH_SEPARATOR=:
15937 fi
15938 rm -f conftest.sh
15939fi
15940
15941
15942 as_lineno_1=$LINENO
15943 as_lineno_2=$LINENO
15944 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15945 test "x$as_lineno_1" != "x$as_lineno_2" &&
15946 test "x$as_lineno_3" = "x$as_lineno_2" || {
15947 # Find who we are. Look in the path if we contain no path at all
15948 # relative or not.
15949 case $0 in
15950 *[\\/]* ) as_myself=$0 ;;
15951 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15952for as_dir in $PATH
15953do
15954 IFS=$as_save_IFS
15955 test -z "$as_dir" && as_dir=.
15956 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15957done
15958
15959 ;;
15960 esac
15961 # We did not find ourselves, most probably we were run as `sh COMMAND'
15962 # in which case we are not to be found in the path.
15963 if test "x$as_myself" = x; then
15964 as_myself=$0
15965 fi
15966 if test ! -f "$as_myself"; then
15967 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
15968echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
15969 { (exit 1); exit 1; }; }
15970 fi
15971 case $CONFIG_SHELL in
15972 '')
15973 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15974for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
15975do
15976 IFS=$as_save_IFS
15977 test -z "$as_dir" && as_dir=.
15978 for as_base in sh bash ksh sh5; do
15979 case $as_dir in
15980 /*)
15981 if ("$as_dir/$as_base" -c '
15982 as_lineno_1=$LINENO
15983 as_lineno_2=$LINENO
15984 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
15985 test "x$as_lineno_1" != "x$as_lineno_2" &&
15986 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
15987 CONFIG_SHELL=$as_dir/$as_base
15988 export CONFIG_SHELL
15989 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
15990 fi;;
15991 esac
15992 done
15993done
15994;;
Jack Jansendd19cf82001-12-06 22:36:17 +000015995 esac
15996
Martin v. Löwis11437992002-04-12 09:54:03 +000015997 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
15998 # uniformly replaced by the line number. The first 'sed' inserts a
15999 # line-number line before each line; the second 'sed' does the real
16000 # work. The second script uses 'N' to pair each line-number line
16001 # with the numbered line, and appends trailing '-' during
16002 # substitution so that $LINENO is not a special case at line end.
16003 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16004 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16005 sed '=' <$as_myself |
16006 sed '
16007 N
16008 s,$,-,
16009 : loop
16010 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16011 t loop
16012 s,-$,,
16013 s,^['$as_cr_digits']*\n,,
16014 ' >$as_me.lineno &&
16015 chmod +x $as_me.lineno ||
16016 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16017echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16018 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016019
Martin v. Löwis11437992002-04-12 09:54:03 +000016020 # Don't try to exec as it changes $[0], causing all sort of problems
16021 # (the dirname of $[0] is not the place where we might find the
16022 # original and so on. Autoconf is especially sensible to this).
16023 . ./$as_me.lineno
16024 # Exit status is that of the last command.
16025 exit
16026}
16027
16028
16029case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16030 *c*,-n*) ECHO_N= ECHO_C='
16031' ECHO_T=' ' ;;
16032 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16033 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16034esac
16035
16036if expr a : '\(a\)' >/dev/null 2>&1; then
16037 as_expr=expr
16038else
16039 as_expr=false
16040fi
16041
16042rm -f conf$$ conf$$.exe conf$$.file
16043echo >conf$$.file
16044if ln -s conf$$.file conf$$ 2>/dev/null; then
16045 # We could just check for DJGPP; but this test a) works b) is more generic
16046 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16047 if test -f conf$$.exe; then
16048 # Don't use ln at all; we don't have any links
16049 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016050 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016051 as_ln_s='ln -s'
16052 fi
16053elif ln conf$$.file conf$$ 2>/dev/null; then
16054 as_ln_s=ln
16055else
16056 as_ln_s='cp -p'
16057fi
16058rm -f conf$$ conf$$.exe conf$$.file
16059
16060as_executable_p="test -f"
16061
16062# Sed expression to map a string onto a valid CPP name.
16063as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16064
16065# Sed expression to map a string onto a valid variable name.
16066as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16067
16068
16069# IFS
16070# We need space, tab and new line, in precisely that order.
16071as_nl='
16072'
16073IFS=" $as_nl"
16074
16075# CDPATH.
16076$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16077
16078exec 6>&1
16079
16080# Open the log real soon, to keep \$[0] and so on meaningful, and to
16081# report actual input values of CONFIG_FILES etc. instead of their
16082# values after options handling. Logging --version etc. is OK.
16083exec 5>>config.log
16084{
16085 echo
16086 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16087## Running $as_me. ##
16088_ASBOX
16089} >&5
16090cat >&5 <<_CSEOF
16091
16092This file was extended by $as_me, which was
16093generated by GNU Autoconf 2.53. Invocation command line was
16094
16095 CONFIG_FILES = $CONFIG_FILES
16096 CONFIG_HEADERS = $CONFIG_HEADERS
16097 CONFIG_LINKS = $CONFIG_LINKS
16098 CONFIG_COMMANDS = $CONFIG_COMMANDS
16099 $ $0 $@
16100
16101_CSEOF
16102echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16103echo >&5
16104_ACEOF
16105
16106# Files that config.status was made for.
16107if test -n "$ac_config_files"; then
16108 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16109fi
16110
16111if test -n "$ac_config_headers"; then
16112 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16113fi
16114
16115if test -n "$ac_config_links"; then
16116 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16117fi
16118
16119if test -n "$ac_config_commands"; then
16120 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16121fi
16122
16123cat >>$CONFIG_STATUS <<\_ACEOF
16124
16125ac_cs_usage="\
16126\`$as_me' instantiates files from templates according to the
16127current configuration.
16128
16129Usage: $0 [OPTIONS] [FILE]...
16130
16131 -h, --help print this help, then exit
16132 -V, --version print version number, then exit
16133 -d, --debug don't remove temporary files
16134 --recheck update $as_me by reconfiguring in the same conditions
16135 --file=FILE[:TEMPLATE]
16136 instantiate the configuration file FILE
16137 --header=FILE[:TEMPLATE]
16138 instantiate the configuration header FILE
16139
16140Configuration files:
16141$config_files
16142
16143Configuration headers:
16144$config_headers
16145
16146Report bugs to <bug-autoconf@gnu.org>."
16147_ACEOF
16148
16149cat >>$CONFIG_STATUS <<_ACEOF
16150ac_cs_version="\\
16151config.status
16152configured by $0, generated by GNU Autoconf 2.53,
16153 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16154
16155Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16156Free Software Foundation, Inc.
16157This config.status script is free software; the Free Software Foundation
16158gives unlimited permission to copy, distribute and modify it."
16159srcdir=$srcdir
16160INSTALL="$INSTALL"
16161_ACEOF
16162
16163cat >>$CONFIG_STATUS <<\_ACEOF
16164# If no file are specified by the user, then we need to provide default
16165# value. By we need to know if files were specified by the user.
16166ac_need_defaults=:
16167while test $# != 0
16168do
16169 case $1 in
16170 --*=*)
16171 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16172 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16173 shift
16174 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16175 shift
16176 ;;
16177 -*);;
16178 *) # This is not an option, so the user has probably given explicit
16179 # arguments.
16180 ac_need_defaults=false;;
16181 esac
16182
16183 case $1 in
16184 # Handling of the options.
16185_ACEOF
16186cat >>$CONFIG_STATUS <<_ACEOF
16187 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16188 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16189 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16190_ACEOF
16191cat >>$CONFIG_STATUS <<\_ACEOF
16192 --version | --vers* | -V )
16193 echo "$ac_cs_version"; exit 0 ;;
16194 --he | --h)
16195 # Conflict between --help and --header
16196 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16197Try \`$0 --help' for more information." >&5
16198echo "$as_me: error: ambiguous option: $1
16199Try \`$0 --help' for more information." >&2;}
16200 { (exit 1); exit 1; }; };;
16201 --help | --hel | -h )
16202 echo "$ac_cs_usage"; exit 0 ;;
16203 --debug | --d* | -d )
16204 debug=: ;;
16205 --file | --fil | --fi | --f )
16206 shift
16207 CONFIG_FILES="$CONFIG_FILES $1"
16208 ac_need_defaults=false;;
16209 --header | --heade | --head | --hea )
16210 shift
16211 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16212 ac_need_defaults=false;;
16213
16214 # This is an error.
16215 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16216Try \`$0 --help' for more information." >&5
16217echo "$as_me: error: unrecognized option: $1
16218Try \`$0 --help' for more information." >&2;}
16219 { (exit 1); exit 1; }; } ;;
16220
16221 *) ac_config_targets="$ac_config_targets $1" ;;
16222
16223 esac
16224 shift
16225done
16226
16227_ACEOF
16228
16229
16230
16231
16232
16233cat >>$CONFIG_STATUS <<\_ACEOF
16234for ac_config_target in $ac_config_targets
16235do
16236 case "$ac_config_target" in
16237 # Handling of arguments.
16238 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16239 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16240 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16241 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16242echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16243 { (exit 1); exit 1; }; };;
16244 esac
16245done
16246
16247# If the user did not use the arguments to specify the items to instantiate,
16248# then the envvar interface is used. Set only those that are not.
16249# We use the long form for the default assignment because of an extremely
16250# bizarre bug on SunOS 4.1.3.
16251if $ac_need_defaults; then
16252 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16253 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16254fi
16255
16256# Create a temporary directory, and hook for its removal unless debugging.
16257$debug ||
16258{
16259 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16260 trap '{ (exit 1); exit 1; }' 1 2 13 15
16261}
16262
16263# Create a (secure) tmp directory for tmp files.
16264: ${TMPDIR=/tmp}
16265{
16266 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16267 test -n "$tmp" && test -d "$tmp"
16268} ||
16269{
16270 tmp=$TMPDIR/cs$$-$RANDOM
16271 (umask 077 && mkdir $tmp)
16272} ||
16273{
16274 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16275 { (exit 1); exit 1; }
16276}
16277
16278_ACEOF
16279
16280cat >>$CONFIG_STATUS <<_ACEOF
16281
16282#
16283# CONFIG_FILES section.
16284#
16285
16286# No need to generate the scripts if there are no CONFIG_FILES.
16287# This happens for instance when ./config.status config.h
16288if test -n "\$CONFIG_FILES"; then
16289 # Protect against being on the right side of a sed subst in config.status.
16290 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16291 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16292s,@SHELL@,$SHELL,;t t
16293s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16294s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16295s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16296s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16297s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16298s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16299s,@exec_prefix@,$exec_prefix,;t t
16300s,@prefix@,$prefix,;t t
16301s,@program_transform_name@,$program_transform_name,;t t
16302s,@bindir@,$bindir,;t t
16303s,@sbindir@,$sbindir,;t t
16304s,@libexecdir@,$libexecdir,;t t
16305s,@datadir@,$datadir,;t t
16306s,@sysconfdir@,$sysconfdir,;t t
16307s,@sharedstatedir@,$sharedstatedir,;t t
16308s,@localstatedir@,$localstatedir,;t t
16309s,@libdir@,$libdir,;t t
16310s,@includedir@,$includedir,;t t
16311s,@oldincludedir@,$oldincludedir,;t t
16312s,@infodir@,$infodir,;t t
16313s,@mandir@,$mandir,;t t
16314s,@build_alias@,$build_alias,;t t
16315s,@host_alias@,$host_alias,;t t
16316s,@target_alias@,$target_alias,;t t
16317s,@DEFS@,$DEFS,;t t
16318s,@ECHO_C@,$ECHO_C,;t t
16319s,@ECHO_N@,$ECHO_N,;t t
16320s,@ECHO_T@,$ECHO_T,;t t
16321s,@LIBS@,$LIBS,;t t
16322s,@VERSION@,$VERSION,;t t
16323s,@SOVERSION@,$SOVERSION,;t t
16324s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16325s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16326s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16327s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16328s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16329s,@MACHDEP@,$MACHDEP,;t t
16330s,@SGI_ABI@,$SGI_ABI,;t t
16331s,@CXX@,$CXX,;t t
16332s,@MAINOBJ@,$MAINOBJ,;t t
16333s,@EXEEXT@,$EXEEXT,;t t
16334s,@CC@,$CC,;t t
16335s,@CFLAGS@,$CFLAGS,;t t
16336s,@LDFLAGS@,$LDFLAGS,;t t
16337s,@CPPFLAGS@,$CPPFLAGS,;t t
16338s,@ac_ct_CC@,$ac_ct_CC,;t t
16339s,@OBJEXT@,$OBJEXT,;t t
16340s,@CPP@,$CPP,;t t
16341s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16342s,@LIBRARY@,$LIBRARY,;t t
16343s,@LDLIBRARY@,$LDLIBRARY,;t t
16344s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16345s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16346s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16347s,@INSTSONAME@,$INSTSONAME,;t t
16348s,@RUNSHARED@,$RUNSHARED,;t t
16349s,@LINKCC@,$LINKCC,;t t
16350s,@RANLIB@,$RANLIB,;t t
16351s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16352s,@AR@,$AR,;t t
16353s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16354s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16355s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16356s,@LN@,$LN,;t t
16357s,@OPT@,$OPT,;t t
16358s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16359s,@SO@,$SO,;t t
16360s,@LDSHARED@,$LDSHARED,;t t
16361s,@BLDSHARED@,$BLDSHARED,;t t
16362s,@CCSHARED@,$CCSHARED,;t t
16363s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16364s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
16365s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16366s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16367s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16368s,@LDLAST@,$LDLAST,;t t
16369s,@THREADOBJ@,$THREADOBJ,;t t
16370s,@DLINCLDIR@,$DLINCLDIR,;t t
16371s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16372s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16373s,@LIBOBJS@,$LIBOBJS,;t t
16374s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16375s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16376s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16377s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16378s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16379s,@LIBM@,$LIBM,;t t
16380s,@LIBC@,$LIBC,;t t
16381s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16382s,@THREADHEADERS@,$THREADHEADERS,;t t
16383s,@SRCDIRS@,$SRCDIRS,;t t
16384CEOF
16385
16386_ACEOF
16387
16388 cat >>$CONFIG_STATUS <<\_ACEOF
16389 # Split the substitutions into bite-sized pieces for seds with
16390 # small command number limits, like on Digital OSF/1 and HP-UX.
16391 ac_max_sed_lines=48
16392 ac_sed_frag=1 # Number of current file.
16393 ac_beg=1 # First line for current file.
16394 ac_end=$ac_max_sed_lines # Line after last line for current file.
16395 ac_more_lines=:
16396 ac_sed_cmds=
16397 while $ac_more_lines; do
16398 if test $ac_beg -gt 1; then
16399 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16400 else
16401 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16402 fi
16403 if test ! -s $tmp/subs.frag; then
16404 ac_more_lines=false
16405 else
16406 # The purpose of the label and of the branching condition is to
16407 # speed up the sed processing (if there are no `@' at all, there
16408 # is no need to browse any of the substitutions).
16409 # These are the two extra sed commands mentioned above.
16410 (echo ':t
16411 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16412 if test -z "$ac_sed_cmds"; then
16413 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16414 else
16415 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16416 fi
16417 ac_sed_frag=`expr $ac_sed_frag + 1`
16418 ac_beg=$ac_end
16419 ac_end=`expr $ac_end + $ac_max_sed_lines`
16420 fi
16421 done
16422 if test -z "$ac_sed_cmds"; then
16423 ac_sed_cmds=cat
16424 fi
16425fi # test -n "$CONFIG_FILES"
16426
16427_ACEOF
16428cat >>$CONFIG_STATUS <<\_ACEOF
16429for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16430 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16431 case $ac_file in
16432 - | *:- | *:-:* ) # input from stdin
16433 cat >$tmp/stdin
16434 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16435 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16436 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16437 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16438 * ) ac_file_in=$ac_file.in ;;
16439 esac
16440
16441 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16442 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16443$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16444 X"$ac_file" : 'X\(//\)[^/]' \| \
16445 X"$ac_file" : 'X\(//\)$' \| \
16446 X"$ac_file" : 'X\(/\)' \| \
16447 . : '\(.\)' 2>/dev/null ||
16448echo X"$ac_file" |
16449 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16450 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16451 /^X\(\/\/\)$/{ s//\1/; q; }
16452 /^X\(\/\).*/{ s//\1/; q; }
16453 s/.*/./; q'`
16454 { case "$ac_dir" in
16455 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16456 *) as_incr_dir=.;;
16457esac
16458as_dummy="$ac_dir"
16459for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16460 case $as_mkdir_dir in
16461 # Skip DOS drivespec
16462 ?:) as_incr_dir=$as_mkdir_dir ;;
16463 *)
16464 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16465 test -d "$as_incr_dir" ||
16466 mkdir "$as_incr_dir" ||
16467 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16468echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16469 { (exit 1); exit 1; }; }
16470 ;;
16471 esac
16472done; }
16473
16474 ac_builddir=.
16475
16476if test "$ac_dir" != .; then
16477 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16478 # A "../" for each directory in $ac_dir_suffix.
16479 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16480else
16481 ac_dir_suffix= ac_top_builddir=
16482fi
16483
16484case $srcdir in
16485 .) # No --srcdir option. We are building in place.
16486 ac_srcdir=.
16487 if test -z "$ac_top_builddir"; then
16488 ac_top_srcdir=.
16489 else
16490 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16491 fi ;;
16492 [\\/]* | ?:[\\/]* ) # Absolute path.
16493 ac_srcdir=$srcdir$ac_dir_suffix;
16494 ac_top_srcdir=$srcdir ;;
16495 *) # Relative path.
16496 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16497 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16498esac
16499# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16500# absolute.
16501ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
16502ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
16503ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16504ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16505
16506
16507 case $INSTALL in
16508 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16509 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16510 esac
16511
16512 if test x"$ac_file" != x-; then
16513 { echo "$as_me:$LINENO: creating $ac_file" >&5
16514echo "$as_me: creating $ac_file" >&6;}
16515 rm -f "$ac_file"
16516 fi
16517 # Let's still pretend it is `configure' which instantiates (i.e., don't
16518 # use $as_me), people would be surprised to read:
16519 # /* config.h. Generated by config.status. */
16520 if test x"$ac_file" = x-; then
16521 configure_input=
16522 else
16523 configure_input="$ac_file. "
16524 fi
16525 configure_input=$configure_input"Generated from `echo $ac_file_in |
16526 sed 's,.*/,,'` by configure."
16527
16528 # First look for the input files in the build tree, otherwise in the
16529 # src tree.
16530 ac_file_inputs=`IFS=:
16531 for f in $ac_file_in; do
16532 case $f in
16533 -) echo $tmp/stdin ;;
16534 [\\/$]*)
16535 # Absolute (can't be DOS-style, as IFS=:)
16536 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16537echo "$as_me: error: cannot find input file: $f" >&2;}
16538 { (exit 1); exit 1; }; }
16539 echo $f;;
16540 *) # Relative
16541 if test -f "$f"; then
16542 # Build tree
16543 echo $f
16544 elif test -f "$srcdir/$f"; then
16545 # Source tree
16546 echo $srcdir/$f
16547 else
16548 # /dev/null tree
16549 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16550echo "$as_me: error: cannot find input file: $f" >&2;}
16551 { (exit 1); exit 1; }; }
16552 fi;;
16553 esac
16554 done` || { (exit 1); exit 1; }
16555_ACEOF
16556cat >>$CONFIG_STATUS <<_ACEOF
16557 sed "$ac_vpsub
16558$extrasub
16559_ACEOF
16560cat >>$CONFIG_STATUS <<\_ACEOF
16561:t
16562/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16563s,@configure_input@,$configure_input,;t t
16564s,@srcdir@,$ac_srcdir,;t t
16565s,@abs_srcdir@,$ac_abs_srcdir,;t t
16566s,@top_srcdir@,$ac_top_srcdir,;t t
16567s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16568s,@builddir@,$ac_builddir,;t t
16569s,@abs_builddir@,$ac_abs_builddir,;t t
16570s,@top_builddir@,$ac_top_builddir,;t t
16571s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16572s,@INSTALL@,$ac_INSTALL,;t t
16573" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16574 rm -f $tmp/stdin
16575 if test x"$ac_file" != x-; then
16576 mv $tmp/out $ac_file
16577 else
16578 cat $tmp/out
16579 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016580 fi
16581
Martin v. Löwis11437992002-04-12 09:54:03 +000016582done
16583_ACEOF
16584cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016585
Martin v. Löwis11437992002-04-12 09:54:03 +000016586#
16587# CONFIG_HEADER section.
16588#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016589
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016590# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16591# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016592#
16593# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016594ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16595ac_dB='[ ].*$,\1#\2'
16596ac_dC=' '
16597ac_dD=',;t'
16598# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16599ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16600ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016601ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016602ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016603
Martin v. Löwis11437992002-04-12 09:54:03 +000016604for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016605 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016606 case $ac_file in
16607 - | *:- | *:-:* ) # input from stdin
16608 cat >$tmp/stdin
16609 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16610 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16611 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16612 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16613 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016614 esac
16615
Martin v. Löwis11437992002-04-12 09:54:03 +000016616 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16617echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016618
Martin v. Löwis11437992002-04-12 09:54:03 +000016619 # First look for the input files in the build tree, otherwise in the
16620 # src tree.
16621 ac_file_inputs=`IFS=:
16622 for f in $ac_file_in; do
16623 case $f in
16624 -) echo $tmp/stdin ;;
16625 [\\/$]*)
16626 # Absolute (can't be DOS-style, as IFS=:)
16627 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16628echo "$as_me: error: cannot find input file: $f" >&2;}
16629 { (exit 1); exit 1; }; }
16630 echo $f;;
16631 *) # Relative
16632 if test -f "$f"; then
16633 # Build tree
16634 echo $f
16635 elif test -f "$srcdir/$f"; then
16636 # Source tree
16637 echo $srcdir/$f
16638 else
16639 # /dev/null tree
16640 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16641echo "$as_me: error: cannot find input file: $f" >&2;}
16642 { (exit 1); exit 1; }; }
16643 fi;;
16644 esac
16645 done` || { (exit 1); exit 1; }
16646 # Remove the trailing spaces.
16647 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016648
Martin v. Löwis11437992002-04-12 09:54:03 +000016649_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016650
Martin v. Löwis11437992002-04-12 09:54:03 +000016651# Transform confdefs.h into two sed scripts, `conftest.defines' and
16652# `conftest.undefs', that substitutes the proper values into
16653# config.h.in to produce config.h. The first handles `#define'
16654# templates, and the second `#undef' templates.
16655# And first: Protect against being on the right side of a sed subst in
16656# config.status. Protect against being in an unquoted here document
16657# in config.status.
16658rm -f conftest.defines conftest.undefs
16659# Using a here document instead of a string reduces the quoting nightmare.
16660# Putting comments in sed scripts is not portable.
16661#
16662# `end' is used to avoid that the second main sed command (meant for
16663# 0-ary CPP macros) applies to n-ary macro definitions.
16664# See the Autoconf documentation for `clear'.
16665cat >confdef2sed.sed <<\_ACEOF
16666s/[\\&,]/\\&/g
16667s,[\\$`],\\&,g
16668t clear
16669: clear
16670s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16671t end
16672s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16673: end
16674_ACEOF
16675# If some macros were called several times there might be several times
16676# the same #defines, which is useless. Nevertheless, we may not want to
16677# sort them, since we want the *last* AC-DEFINE to be honored.
16678uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16679sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16680rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016681
16682# This sed command replaces #undef with comments. This is necessary, for
16683# example, in the case of _POSIX_SOURCE, which is predefined and required
16684# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016685cat >>conftest.undefs <<\_ACEOF
16686s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16687_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016688
Martin v. Löwis11437992002-04-12 09:54:03 +000016689# Break up conftest.defines because some shells have a limit on the size
16690# of here documents, and old seds have small limits too (100 cmds).
16691echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16692echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16693echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16694echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016695rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016696while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016697do
Martin v. Löwis11437992002-04-12 09:54:03 +000016698 # Write a limited-size here document to $tmp/defines.sed.
16699 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16700 # Speed up: don't consider the non `#define' lines.
16701 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16702 # Work around the forget-to-reset-the-flag bug.
16703 echo 't clr' >>$CONFIG_STATUS
16704 echo ': clr' >>$CONFIG_STATUS
16705 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016706 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016707 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16708 rm -f $tmp/in
16709 mv $tmp/out $tmp/in
16710' >>$CONFIG_STATUS
16711 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16712 rm -f conftest.defines
16713 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016714done
Martin v. Löwis11437992002-04-12 09:54:03 +000016715rm -f conftest.defines
16716echo ' fi # egrep' >>$CONFIG_STATUS
16717echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016718
Martin v. Löwis11437992002-04-12 09:54:03 +000016719# Break up conftest.undefs because some shells have a limit on the size
16720# of here documents, and old seds have small limits too (100 cmds).
16721echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16722rm -f conftest.tail
16723while grep . conftest.undefs >/dev/null
16724do
16725 # Write a limited-size here document to $tmp/undefs.sed.
16726 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16727 # Speed up: don't consider the non `#undef'
16728 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16729 # Work around the forget-to-reset-the-flag bug.
16730 echo 't clr' >>$CONFIG_STATUS
16731 echo ': clr' >>$CONFIG_STATUS
16732 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16733 echo 'CEOF
16734 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16735 rm -f $tmp/in
16736 mv $tmp/out $tmp/in
16737' >>$CONFIG_STATUS
16738 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16739 rm -f conftest.undefs
16740 mv conftest.tail conftest.undefs
16741done
16742rm -f conftest.undefs
16743
16744cat >>$CONFIG_STATUS <<\_ACEOF
16745 # Let's still pretend it is `configure' which instantiates (i.e., don't
16746 # use $as_me), people would be surprised to read:
16747 # /* config.h. Generated by config.status. */
16748 if test x"$ac_file" = x-; then
16749 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016750 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016751 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016752 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016753 cat $tmp/in >>$tmp/config.h
16754 rm -f $tmp/in
16755 if test x"$ac_file" != x-; then
16756 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16757 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16758echo "$as_me: $ac_file is unchanged" >&6;}
16759 else
16760 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16761$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16762 X"$ac_file" : 'X\(//\)[^/]' \| \
16763 X"$ac_file" : 'X\(//\)$' \| \
16764 X"$ac_file" : 'X\(/\)' \| \
16765 . : '\(.\)' 2>/dev/null ||
16766echo X"$ac_file" |
16767 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16768 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16769 /^X\(\/\/\)$/{ s//\1/; q; }
16770 /^X\(\/\).*/{ s//\1/; q; }
16771 s/.*/./; q'`
16772 { case "$ac_dir" in
16773 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16774 *) as_incr_dir=.;;
16775esac
16776as_dummy="$ac_dir"
16777for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16778 case $as_mkdir_dir in
16779 # Skip DOS drivespec
16780 ?:) as_incr_dir=$as_mkdir_dir ;;
16781 *)
16782 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16783 test -d "$as_incr_dir" ||
16784 mkdir "$as_incr_dir" ||
16785 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16786echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16787 { (exit 1); exit 1; }; }
16788 ;;
16789 esac
16790done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016791
Martin v. Löwis11437992002-04-12 09:54:03 +000016792 rm -f $ac_file
16793 mv $tmp/config.h $ac_file
16794 fi
16795 else
16796 cat $tmp/config.h
16797 rm -f $tmp/config.h
16798 fi
16799done
16800_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016801
Martin v. Löwis11437992002-04-12 09:54:03 +000016802cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016803
Martin v. Löwis11437992002-04-12 09:54:03 +000016804{ (exit 0); exit 0; }
16805_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016806chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016807ac_clean_files=$ac_clean_files_save
16808
16809
16810# configure is writing to config.log, and then calls config.status.
16811# config.status does its own redirection, appending to config.log.
16812# Unfortunately, on DOS this fails, as config.log is still kept open
16813# by configure, so config.status won't be able to write to it; its
16814# output is simply discarded. So we exec the FD to /dev/null,
16815# effectively closing config.log, so it can be properly (re)opened and
16816# appended to by config.status. When coming back to configure, we
16817# need to make the FD available again.
16818if test "$no_create" != yes; then
16819 ac_cs_success=:
16820 exec 5>/dev/null
16821 $SHELL $CONFIG_STATUS || ac_cs_success=false
16822 exec 5>>config.log
16823 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16824 # would make configure fail if this is the last instruction.
16825 $ac_cs_success || { (exit 1); exit 1; }
16826fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016827
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016828
16829echo "creating Setup"
16830if test ! -f Modules/Setup
16831then
16832 cp $srcdir/Modules/Setup.dist Modules/Setup
16833fi
16834
16835echo "creating Setup.local"
16836if test ! -f Modules/Setup.local
16837then
16838 echo "# Edit this file for local setup changes" >Modules/Setup.local
16839fi
16840
16841echo "creating Makefile"
16842$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16843 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016844 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016845mv config.c Modules