blob: 35071dc0cea9317fc641617f2ba101821d7d748a [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwise4826582002-10-26 13:33:00 +00002# From configure.in Revision: 1.358 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis11437992002-04-12 09:54:03 +00004# Generated by GNU Autoconf 2.53.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
30# NLS nuisances.
31# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
38(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
256PACKAGE_NAME=
257PACKAGE_TARNAME=
258PACKAGE_VERSION=
259PACKAGE_STRING=
260PACKAGE_BUGREPORT=
261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
764\`configure' configures this package to adapt to many kinds of systems.
765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
820
821 cat <<\_ACEOF
822
823Optional Features:
824 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
825 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
826 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
827 --enable-shared disable/enable building shared python library
828 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
829 --enable-ipv6 Enable ipv6 (with ipv4) support
830 --disable-ipv6 Disable ipv6 support
831 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
832
833Optional Packages:
834 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
835 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
836 --without-gcc never use gcc
837 --with-cxx=<compiler> enable C++ support
838 --with-suffix=.exe set executable suffix
839 --with-pydebug build with Py_DEBUG defined
840 --with-libs='lib1 ...' link against additional libs
841 --with-signal-module disable/enable signal module
842 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
843 --with(out)-threads=DIRECTORY disable/enable thread support
844 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
845 --with-pth use GNU pth threading libraries
Jack Jansen7b8c7542002-04-14 20:12:41 +0000846 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +0000847 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 --with(out)-pymalloc disable/enable specialized mallocs
849 --with-wctype-functions use wctype.h functions
850 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
851 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
852 --with-fpectl enable SIGFPE catching
853 --with-libm=STRING math library
854 --with-libc=STRING C library
855
856Some influential environment variables:
857 CC C compiler command
858 CFLAGS C compiler flags
859 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
860 nonstandard directory <lib dir>
861 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
862 headers in a nonstandard directory <include dir>
863 CPP C preprocessor
864
865Use these variables to override the choices made by `configure' or to help
866it to find libraries and programs with nonstandard names/locations.
867
868_ACEOF
869fi
870
871if test "$ac_init_help" = "recursive"; then
872 # If there are subdirs, report their specific --help.
873 ac_popdir=`pwd`
874 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
875 test -d $ac_dir || continue
876 ac_builddir=.
877
878if test "$ac_dir" != .; then
879 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
880 # A "../" for each directory in $ac_dir_suffix.
881 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
882else
883 ac_dir_suffix= ac_top_builddir=
884fi
885
886case $srcdir in
887 .) # No --srcdir option. We are building in place.
888 ac_srcdir=.
889 if test -z "$ac_top_builddir"; then
890 ac_top_srcdir=.
891 else
892 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
893 fi ;;
894 [\\/]* | ?:[\\/]* ) # Absolute path.
895 ac_srcdir=$srcdir$ac_dir_suffix;
896 ac_top_srcdir=$srcdir ;;
897 *) # Relative path.
898 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
899 ac_top_srcdir=$ac_top_builddir$srcdir ;;
900esac
901# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
902# absolute.
903ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise4826582002-10-26 13:33:00 +0000904ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000905ac_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
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001228# The later defininition of _XOPEN_SOURCE disables certain features
1229# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1230
1231cat >>confdefs.h <<\_ACEOF
1232#define _GNU_SOURCE 1
1233_ACEOF
1234
1235
1236# The definition of _GNU_SOURCE potentially causes a change of the value
1237# of _XOPEN_SOURCE. So define it only conditionally.
1238
1239
1240cat >>confdefs.h <<\_ACEOF
1241#define _XOPEN_SOURCE 500
1242_ACEOF
1243
1244
Martin v. Löwise4826582002-10-26 13:33:00 +00001245# On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires definition
1246# of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else several APIs
1247# are not declared. Since this is also needed in some cases for HP-UX,
1248# we define it globally.
1249
1250cat >>confdefs.h <<\_ACEOF
1251#define _XOPEN_SOURCE_EXTENDED 1
1252_ACEOF
1253
1254
1255cat >>confdefs.h <<\_ACEOF
1256#define _POSIX_C_SOURCE 199506L
1257_ACEOF
1258
1259
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001260# Arguments passed to configure.
1261
1262CONFIG_ARGS="$ac_configure_args"
1263
Michael W. Hudson54241132001-12-07 15:38:26 +00001264
Jack Jansene578a632001-08-15 01:27:14 +00001265# Check whether --enable-framework or --disable-framework was given.
1266if test "${enable_framework+set}" = set; then
1267 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001268
Jack Jansene578a632001-08-15 01:27:14 +00001269 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001271 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001272 esac
1273 case $enableval in
1274 no)
1275 PYTHONFRAMEWORK=
1276 PYTHONFRAMEWORKDIR=no-framework
1277 PYTHONFRAMEWORKPREFIX=
1278 PYTHONFRAMEWORKINSTALLDIR=
1279 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001280 ;;
1281 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001282 PYTHONFRAMEWORK=Python
1283 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001284 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001285 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1286 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001287 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001288
Guido van Rossum563e7081996-09-10 18:20:48 +00001289else
Martin v. Löwis11437992002-04-12 09:54:03 +00001290
Jack Jansene578a632001-08-15 01:27:14 +00001291 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001292 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001293 PYTHONFRAMEWORKPREFIX=
1294 PYTHONFRAMEWORKINSTALLDIR=
1295 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001296
Martin v. Löwis11437992002-04-12 09:54:03 +00001297fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001298
1299
1300
1301
Jack Jansene578a632001-08-15 01:27:14 +00001302
1303##AC_ARG_WITH(dyld,
1304##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1305##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001306# Set name for machine-dependent library files
1307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308echo "$as_me:$LINENO: checking MACHDEP" >&5
1309echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001310if test -z "$MACHDEP"
1311then
Guido van Rossum563e7081996-09-10 18:20:48 +00001312 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001313 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1314 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001315 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001316 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001317 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001318 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001319 ac_md_system=`echo $ac_sys_system |
1320 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1321 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001322 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001323 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001324
Guido van Rossum07397971997-04-29 21:49:50 +00001325 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001326 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001327 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001328 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001329 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001330 esac
1331fi
Guido van Rossum91922671997-10-09 20:24:13 +00001332
1333#
1334# SGI compilers allow the specification of the both the ABI and the
1335# ISA on the command line. Depending on the values of these switches,
1336# different and often incompatable code will be generated.
1337#
1338# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1339# thus supply support for various ABI/ISA combinations. The MACHDEP
1340# variable is also adjusted.
1341#
1342
1343if test ! -z "$SGI_ABI"
1344then
1345 CC="cc $SGI_ABI"
1346 LDFLAGS="$SGI_ABI $LDFLAGS"
1347 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1348fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001349echo "$as_me:$LINENO: result: $MACHDEP" >&5
1350echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001351
Guido van Rossum627b2d71993-12-24 10:39:16 +00001352# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001353echo "$as_me:$LINENO: checking for --without-gcc" >&5
1354echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1355
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001356# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001357if test "${with_gcc+set}" = set; then
1358 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001359
Guido van Rossum7f43da71994-08-01 12:15:30 +00001360 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001361 no) CC=cc
1362 without_gcc=yes;;
1363 yes) CC=gcc
1364 without_gcc=no;;
1365 *) CC=$withval
1366 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001367 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001368else
Martin v. Löwis11437992002-04-12 09:54:03 +00001369
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001370 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001371 AIX*) CC=cc_r
1372 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001373 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001374 case $BE_HOST_CPU in
1375 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001376 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001377 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001378 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001379 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001380 ;;
1381 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001382 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001383 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001384 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001385 ;;
1386 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1388echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1389 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001390 ;;
1391 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001392 AR="\$(srcdir)/Modules/ar_beos"
1393 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001394 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001395 Monterey*)
1396 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001397 without_gcc=;;
1398 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001399 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001400fi;
1401echo "$as_me:$LINENO: result: $without_gcc" >&5
1402echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001403
1404
Guido van Rossum95012191999-12-16 17:50:52 +00001405
Fred Drakea1a84e72001-03-06 05:52:16 +00001406MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001407echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1408echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1409
Guido van Rossum95012191999-12-16 17:50:52 +00001410# Check whether --with-cxx or --without-cxx was given.
1411if test "${with_cxx+set}" = set; then
1412 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001413
Martin v. Löwis22352952000-12-13 17:37:02 +00001414 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001415 case $withval in
1416 no) CXX=
1417 with_cxx=no;;
1418 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001419 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001420 with_cxx=$withval;;
1421 esac
1422else
Martin v. Löwis11437992002-04-12 09:54:03 +00001423
Guido van Rossum95012191999-12-16 17:50:52 +00001424 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001425 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001426
Martin v. Löwis11437992002-04-12 09:54:03 +00001427fi;
1428echo "$as_me:$LINENO: result: $with_cxx" >&5
1429echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001430
1431if test "$with_cxx" = "yes"
1432then
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1434echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1435 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001436fi
1437
1438
1439
1440
Martin v. Löwis11437992002-04-12 09:54:03 +00001441if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001442then
1443 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1444do
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 # 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 +00001446set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001447echo "$as_me:$LINENO: checking for $ac_word" >&5
1448echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1449if test "${ac_cv_prog_CXX+set}" = set; then
1450 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001451else
1452 if test -n "$CXX"; then
1453 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1454else
Martin v. Löwis11437992002-04-12 09:54:03 +00001455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1456for as_dir in $PATH
1457do
1458 IFS=$as_save_IFS
1459 test -z "$as_dir" && as_dir=.
1460 for ac_exec_ext in '' $ac_executable_extensions; do
1461 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1462 ac_cv_prog_CXX="$ac_prog"
1463 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1464 break 2
1465 fi
1466done
1467done
1468
Martin v. Löwis22352952000-12-13 17:37:02 +00001469fi
1470fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001471CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001472if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 echo "$as_me:$LINENO: result: $CXX" >&5
1474echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001475else
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 echo "$as_me:$LINENO: result: no" >&5
1477echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001478fi
1479
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001481done
1482test -n "$CXX" || CXX="notfound"
1483
1484 if test "$CXX" = "notfound"
1485 then
1486 CXX=
1487 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001488 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001489ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001490ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1491ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1492ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1493 cat >conftest.$ac_ext <<_ACEOF
1494#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001495#include "confdefs.h"
1496
Martin v. Löwis11437992002-04-12 09:54:03 +00001497#ifdef F77_DUMMY_MAIN
1498# ifdef __cplusplus
1499 extern "C"
1500# endif
1501 int F77_DUMMY_MAIN() { return 1; }
1502#endif
1503int
1504main ()
1505{
Michael W. Hudson54241132001-12-07 15:38:26 +00001506
Martin v. Löwis11437992002-04-12 09:54:03 +00001507 ;
1508 return 0;
1509}
1510_ACEOF
1511ac_clean_files_save=$ac_clean_files
1512ac_clean_files="$ac_clean_files a.out a.exe"
1513# Try to create an executable without -o first, disregard a.out.
1514# It will help us diagnose broken compilers, and finding out an intuition
1515# of exeext.
1516echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1517echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1518ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1519if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1520 (eval $ac_link_default) 2>&5
1521 ac_status=$?
1522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1523 (exit $ac_status); }; then
1524 # Find the output, starting from the most likely. This scheme is
1525# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1526# resort.
1527
1528# Be careful to initialize this variable, since it used to be cached.
1529# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1530ac_cv_exeext=
1531for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1532 ls a.out conftest 2>/dev/null;
1533 ls a.* conftest.* 2>/dev/null`; do
1534 case $ac_file in
1535 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1536 a.out ) # We found the default executable, but exeext='' is most
1537 # certainly right.
1538 break;;
1539 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1540 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1541 export ac_cv_exeext
1542 break;;
1543 * ) break;;
1544 esac
1545done
1546else
1547 echo "$as_me: failed program was:" >&5
1548cat conftest.$ac_ext >&5
1549{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1550echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1551 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001552fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001553
1554ac_exeext=$ac_cv_exeext
1555echo "$as_me:$LINENO: result: $ac_file" >&5
1556echo "${ECHO_T}$ac_file" >&6
1557
1558# Check the compiler produces executables we can run. If not, either
1559# the compiler is broken, or we cross compile.
1560echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1561echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1562# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1563# If not cross compiling, check that we can run a simple program.
1564if test "$cross_compiling" != yes; then
1565 if { ac_try='./$ac_file'
1566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1567 (eval $ac_try) 2>&5
1568 ac_status=$?
1569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1570 (exit $ac_status); }; }; then
1571 cross_compiling=no
1572 else
1573 if test "$cross_compiling" = maybe; then
1574 cross_compiling=yes
1575 else
1576 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1577If you meant to cross compile, use \`--host'." >&5
1578echo "$as_me: error: cannot run C++ compiled programs.
1579If you meant to cross compile, use \`--host'." >&2;}
1580 { (exit 1); exit 1; }; }
1581 fi
1582 fi
1583fi
1584echo "$as_me:$LINENO: result: yes" >&5
1585echo "${ECHO_T}yes" >&6
1586
1587rm -f a.out a.exe conftest$ac_cv_exeext
1588ac_clean_files=$ac_clean_files_save
1589# Check the compiler produces executables we can run. If not, either
1590# the compiler is broken, or we cross compile.
1591echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1592echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1593echo "$as_me:$LINENO: result: $cross_compiling" >&5
1594echo "${ECHO_T}$cross_compiling" >&6
1595
1596echo "$as_me:$LINENO: checking for suffix of executables" >&5
1597echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1598if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1599 (eval $ac_link) 2>&5
1600 ac_status=$?
1601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1602 (exit $ac_status); }; then
1603 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1604# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1605# work properly (i.e., refer to `conftest.exe'), while it won't with
1606# `rm'.
1607for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1608 case $ac_file in
1609 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1610 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1611 export ac_cv_exeext
1612 break;;
1613 * ) break;;
1614 esac
1615done
1616else
1617 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1618echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1619 { (exit 1); exit 1; }; }
1620fi
1621
1622rm -f conftest$ac_cv_exeext
1623echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1624echo "${ECHO_T}$ac_cv_exeext" >&6
1625
1626rm -f conftest.$ac_ext
1627EXEEXT=$ac_cv_exeext
1628ac_exeext=$EXEEXT
1629
1630 ac_ext=c
1631ac_cpp='$CPP $CPPFLAGS'
1632ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1633ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1634ac_compiler_gnu=$ac_cv_c_compiler_gnu
1635
1636
Martin v. Löwis22352952000-12-13 17:37:02 +00001637
1638 fi
1639fi
1640
Guido van Rossum8b131c51995-03-09 14:10:13 +00001641# If the user switches compilers, we can't believe the cache
1642if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1643then
Martin v. Löwis11437992002-04-12 09:54:03 +00001644 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1645(it is also a good idea to do 'make clean' before compiling)" >&5
1646echo "$as_me: error: cached CC is different -- throw away $cache_file
1647(it is also a good idea to do 'make clean' before compiling)" >&2;}
1648 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001649fi
1650
Martin v. Löwis11437992002-04-12 09:54:03 +00001651ac_ext=c
1652ac_cpp='$CPP $CPPFLAGS'
1653ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1654ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1655ac_compiler_gnu=$ac_cv_c_compiler_gnu
1656if test -n "$ac_tool_prefix"; then
1657 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1658set dummy ${ac_tool_prefix}gcc; ac_word=$2
1659echo "$as_me:$LINENO: checking for $ac_word" >&5
1660echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1661if test "${ac_cv_prog_CC+set}" = set; then
1662 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001663else
1664 if test -n "$CC"; then
1665 ac_cv_prog_CC="$CC" # Let the user override the test.
1666else
Martin v. Löwis11437992002-04-12 09:54:03 +00001667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1668for as_dir in $PATH
1669do
1670 IFS=$as_save_IFS
1671 test -z "$as_dir" && as_dir=.
1672 for ac_exec_ext in '' $ac_executable_extensions; do
1673 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1674 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1675 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1676 break 2
1677 fi
1678done
1679done
1680
Jack Jansendd19cf82001-12-06 22:36:17 +00001681fi
1682fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001683CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001684if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001685 echo "$as_me:$LINENO: result: $CC" >&5
1686echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001687else
Martin v. Löwis11437992002-04-12 09:54:03 +00001688 echo "$as_me:$LINENO: result: no" >&5
1689echo "${ECHO_T}no" >&6
1690fi
1691
1692fi
1693if test -z "$ac_cv_prog_CC"; then
1694 ac_ct_CC=$CC
1695 # Extract the first word of "gcc", so it can be a program name with args.
1696set dummy gcc; ac_word=$2
1697echo "$as_me:$LINENO: checking for $ac_word" >&5
1698echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1699if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1700 echo $ECHO_N "(cached) $ECHO_C" >&6
1701else
1702 if test -n "$ac_ct_CC"; then
1703 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1704else
1705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1706for as_dir in $PATH
1707do
1708 IFS=$as_save_IFS
1709 test -z "$as_dir" && as_dir=.
1710 for ac_exec_ext in '' $ac_executable_extensions; do
1711 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1712 ac_cv_prog_ac_ct_CC="gcc"
1713 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1714 break 2
1715 fi
1716done
1717done
1718
1719fi
1720fi
1721ac_ct_CC=$ac_cv_prog_ac_ct_CC
1722if test -n "$ac_ct_CC"; then
1723 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1724echo "${ECHO_T}$ac_ct_CC" >&6
1725else
1726 echo "$as_me:$LINENO: result: no" >&5
1727echo "${ECHO_T}no" >&6
1728fi
1729
1730 CC=$ac_ct_CC
1731else
1732 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001733fi
1734
Jack Jansendd19cf82001-12-06 22:36:17 +00001735if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 if test -n "$ac_tool_prefix"; then
1737 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1738set dummy ${ac_tool_prefix}cc; ac_word=$2
1739echo "$as_me:$LINENO: checking for $ac_word" >&5
1740echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1741if test "${ac_cv_prog_CC+set}" = set; then
1742 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001743else
1744 if test -n "$CC"; then
1745 ac_cv_prog_CC="$CC" # Let the user override the test.
1746else
Martin v. Löwis11437992002-04-12 09:54:03 +00001747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1748for as_dir in $PATH
1749do
1750 IFS=$as_save_IFS
1751 test -z "$as_dir" && as_dir=.
1752 for ac_exec_ext in '' $ac_executable_extensions; do
1753 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1754 ac_cv_prog_CC="${ac_tool_prefix}cc"
1755 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1756 break 2
1757 fi
1758done
1759done
1760
1761fi
1762fi
1763CC=$ac_cv_prog_CC
1764if test -n "$CC"; then
1765 echo "$as_me:$LINENO: result: $CC" >&5
1766echo "${ECHO_T}$CC" >&6
1767else
1768 echo "$as_me:$LINENO: result: no" >&5
1769echo "${ECHO_T}no" >&6
1770fi
1771
1772fi
1773if test -z "$ac_cv_prog_CC"; then
1774 ac_ct_CC=$CC
1775 # Extract the first word of "cc", so it can be a program name with args.
1776set dummy cc; ac_word=$2
1777echo "$as_me:$LINENO: checking for $ac_word" >&5
1778echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1779if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1780 echo $ECHO_N "(cached) $ECHO_C" >&6
1781else
1782 if test -n "$ac_ct_CC"; then
1783 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1784else
1785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1786for as_dir in $PATH
1787do
1788 IFS=$as_save_IFS
1789 test -z "$as_dir" && as_dir=.
1790 for ac_exec_ext in '' $ac_executable_extensions; do
1791 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1792 ac_cv_prog_ac_ct_CC="cc"
1793 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1794 break 2
1795 fi
1796done
1797done
1798
1799fi
1800fi
1801ac_ct_CC=$ac_cv_prog_ac_ct_CC
1802if test -n "$ac_ct_CC"; then
1803 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1804echo "${ECHO_T}$ac_ct_CC" >&6
1805else
1806 echo "$as_me:$LINENO: result: no" >&5
1807echo "${ECHO_T}no" >&6
1808fi
1809
1810 CC=$ac_ct_CC
1811else
1812 CC="$ac_cv_prog_CC"
1813fi
1814
1815fi
1816if test -z "$CC"; then
1817 # Extract the first word of "cc", so it can be a program name with args.
1818set dummy cc; ac_word=$2
1819echo "$as_me:$LINENO: checking for $ac_word" >&5
1820echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1821if test "${ac_cv_prog_CC+set}" = set; then
1822 echo $ECHO_N "(cached) $ECHO_C" >&6
1823else
1824 if test -n "$CC"; then
1825 ac_cv_prog_CC="$CC" # Let the user override the test.
1826else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001827 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1829for as_dir in $PATH
1830do
1831 IFS=$as_save_IFS
1832 test -z "$as_dir" && as_dir=.
1833 for ac_exec_ext in '' $ac_executable_extensions; do
1834 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1835 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1836 ac_prog_rejected=yes
1837 continue
1838 fi
1839 ac_cv_prog_CC="cc"
1840 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1841 break 2
1842 fi
1843done
1844done
1845
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001846if test $ac_prog_rejected = yes; then
1847 # We found a bogon in the path, so make sure we never use it.
1848 set dummy $ac_cv_prog_CC
1849 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001850 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001851 # We chose a different compiler from the bogus one.
1852 # However, it has the same basename, so the bogon will be chosen
1853 # first if we set CC to just the basename; use the full file name.
1854 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001855 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001856 shift
1857 ac_cv_prog_CC="$@"
1858 fi
1859fi
1860fi
1861fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001862CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001863if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001864 echo "$as_me:$LINENO: result: $CC" >&5
1865echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001866else
Martin v. Löwis11437992002-04-12 09:54:03 +00001867 echo "$as_me:$LINENO: result: no" >&5
1868echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001869fi
1870
Martin v. Löwis11437992002-04-12 09:54:03 +00001871fi
1872if test -z "$CC"; then
1873 if test -n "$ac_tool_prefix"; then
1874 for ac_prog in cl
1875 do
1876 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1877set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1878echo "$as_me:$LINENO: checking for $ac_word" >&5
1879echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1880if test "${ac_cv_prog_CC+set}" = set; then
1881 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001882else
1883 if test -n "$CC"; then
1884 ac_cv_prog_CC="$CC" # Let the user override the test.
1885else
Martin v. Löwis11437992002-04-12 09:54:03 +00001886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1887for as_dir in $PATH
1888do
1889 IFS=$as_save_IFS
1890 test -z "$as_dir" && as_dir=.
1891 for ac_exec_ext in '' $ac_executable_extensions; do
1892 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1893 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1894 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1895 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001896 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001897done
1898done
1899
1900fi
1901fi
1902CC=$ac_cv_prog_CC
1903if test -n "$CC"; then
1904 echo "$as_me:$LINENO: result: $CC" >&5
1905echo "${ECHO_T}$CC" >&6
1906else
1907 echo "$as_me:$LINENO: result: no" >&5
1908echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001909fi
1910
Martin v. Löwis11437992002-04-12 09:54:03 +00001911 test -n "$CC" && break
1912 done
1913fi
1914if test -z "$CC"; then
1915 ac_ct_CC=$CC
1916 for ac_prog in cl
1917do
1918 # Extract the first word of "$ac_prog", so it can be a program name with args.
1919set dummy $ac_prog; ac_word=$2
1920echo "$as_me:$LINENO: checking for $ac_word" >&5
1921echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1922if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1923 echo $ECHO_N "(cached) $ECHO_C" >&6
1924else
1925 if test -n "$ac_ct_CC"; then
1926 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1927else
1928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1929for as_dir in $PATH
1930do
1931 IFS=$as_save_IFS
1932 test -z "$as_dir" && as_dir=.
1933 for ac_exec_ext in '' $ac_executable_extensions; do
1934 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1935 ac_cv_prog_ac_ct_CC="$ac_prog"
1936 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1937 break 2
1938 fi
1939done
1940done
Jack Jansendd19cf82001-12-06 22:36:17 +00001941
Martin v. Löwis11437992002-04-12 09:54:03 +00001942fi
1943fi
1944ac_ct_CC=$ac_cv_prog_ac_ct_CC
1945if test -n "$ac_ct_CC"; then
1946 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1947echo "${ECHO_T}$ac_ct_CC" >&6
1948else
1949 echo "$as_me:$LINENO: result: no" >&5
1950echo "${ECHO_T}no" >&6
1951fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001952
Martin v. Löwis11437992002-04-12 09:54:03 +00001953 test -n "$ac_ct_CC" && break
1954done
Michael W. Hudson54241132001-12-07 15:38:26 +00001955
Martin v. Löwis11437992002-04-12 09:54:03 +00001956 CC=$ac_ct_CC
1957fi
1958
1959fi
1960
1961
1962test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1963echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1964 { (exit 1); exit 1; }; }
1965
1966# Provide some information about the compiler.
1967echo "$as_me:$LINENO:" \
1968 "checking for C compiler version" >&5
1969ac_compiler=`set X $ac_compile; echo $2`
1970{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1971 (eval $ac_compiler --version </dev/null >&5) 2>&5
1972 ac_status=$?
1973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1974 (exit $ac_status); }
1975{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1976 (eval $ac_compiler -v </dev/null >&5) 2>&5
1977 ac_status=$?
1978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1979 (exit $ac_status); }
1980{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1981 (eval $ac_compiler -V </dev/null >&5) 2>&5
1982 ac_status=$?
1983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1984 (exit $ac_status); }
1985
1986cat >conftest.$ac_ext <<_ACEOF
1987#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001988#include "confdefs.h"
1989
Martin v. Löwis11437992002-04-12 09:54:03 +00001990#ifdef F77_DUMMY_MAIN
1991# ifdef __cplusplus
1992 extern "C"
1993# endif
1994 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001996int
1997main ()
1998{
1999
2000 ;
2001 return 0;
2002}
2003_ACEOF
2004ac_clean_files_save=$ac_clean_files
2005ac_clean_files="$ac_clean_files a.out a.exe"
2006# Try to create an executable without -o first, disregard a.out.
2007# It will help us diagnose broken compilers, and finding out an intuition
2008# of exeext.
2009echo "$as_me:$LINENO: checking for C compiler default output" >&5
2010echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2011ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2012if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2013 (eval $ac_link_default) 2>&5
2014 ac_status=$?
2015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2016 (exit $ac_status); }; then
2017 # Find the output, starting from the most likely. This scheme is
2018# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2019# resort.
2020
2021# Be careful to initialize this variable, since it used to be cached.
2022# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2023ac_cv_exeext=
2024for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2025 ls a.out conftest 2>/dev/null;
2026 ls a.* conftest.* 2>/dev/null`; do
2027 case $ac_file in
2028 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2029 a.out ) # We found the default executable, but exeext='' is most
2030 # certainly right.
2031 break;;
2032 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2033 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2034 export ac_cv_exeext
2035 break;;
2036 * ) break;;
2037 esac
2038done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002039else
Martin v. Löwis11437992002-04-12 09:54:03 +00002040 echo "$as_me: failed program was:" >&5
2041cat conftest.$ac_ext >&5
2042{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2043echo "$as_me: error: C compiler cannot create executables" >&2;}
2044 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002045fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002046
Martin v. Löwis11437992002-04-12 09:54:03 +00002047ac_exeext=$ac_cv_exeext
2048echo "$as_me:$LINENO: result: $ac_file" >&5
2049echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002050
Martin v. Löwis11437992002-04-12 09:54:03 +00002051# Check the compiler produces executables we can run. If not, either
2052# the compiler is broken, or we cross compile.
2053echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2054echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2055# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2056# If not cross compiling, check that we can run a simple program.
2057if test "$cross_compiling" != yes; then
2058 if { ac_try='./$ac_file'
2059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2060 (eval $ac_try) 2>&5
2061 ac_status=$?
2062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2063 (exit $ac_status); }; }; then
2064 cross_compiling=no
2065 else
2066 if test "$cross_compiling" = maybe; then
2067 cross_compiling=yes
2068 else
2069 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2070If you meant to cross compile, use \`--host'." >&5
2071echo "$as_me: error: cannot run C compiled programs.
2072If you meant to cross compile, use \`--host'." >&2;}
2073 { (exit 1); exit 1; }; }
2074 fi
2075 fi
2076fi
2077echo "$as_me:$LINENO: result: yes" >&5
2078echo "${ECHO_T}yes" >&6
2079
2080rm -f a.out a.exe conftest$ac_cv_exeext
2081ac_clean_files=$ac_clean_files_save
2082# Check the compiler produces executables we can run. If not, either
2083# the compiler is broken, or we cross compile.
2084echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2085echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2086echo "$as_me:$LINENO: result: $cross_compiling" >&5
2087echo "${ECHO_T}$cross_compiling" >&6
2088
2089echo "$as_me:$LINENO: checking for suffix of executables" >&5
2090echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2092 (eval $ac_link) 2>&5
2093 ac_status=$?
2094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2095 (exit $ac_status); }; then
2096 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2097# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2098# work properly (i.e., refer to `conftest.exe'), while it won't with
2099# `rm'.
2100for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2101 case $ac_file in
2102 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2103 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2104 export ac_cv_exeext
2105 break;;
2106 * ) break;;
2107 esac
2108done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002109else
Martin v. Löwis11437992002-04-12 09:54:03 +00002110 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2111echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2112 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002113fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002114
Martin v. Löwis11437992002-04-12 09:54:03 +00002115rm -f conftest$ac_cv_exeext
2116echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2117echo "${ECHO_T}$ac_cv_exeext" >&6
2118
2119rm -f conftest.$ac_ext
2120EXEEXT=$ac_cv_exeext
2121ac_exeext=$EXEEXT
2122echo "$as_me:$LINENO: checking for suffix of object files" >&5
2123echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2124if test "${ac_cv_objext+set}" = set; then
2125 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002126else
Martin v. Löwis11437992002-04-12 09:54:03 +00002127 cat >conftest.$ac_ext <<_ACEOF
2128#line $LINENO "configure"
2129#include "confdefs.h"
2130
2131#ifdef F77_DUMMY_MAIN
2132# ifdef __cplusplus
2133 extern "C"
2134# endif
2135 int F77_DUMMY_MAIN() { return 1; }
2136#endif
2137int
2138main ()
2139{
2140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145rm -f conftest.o conftest.obj
2146if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2147 (eval $ac_compile) 2>&5
2148 ac_status=$?
2149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2150 (exit $ac_status); }; then
2151 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2152 case $ac_file in
2153 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2154 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2155 break;;
2156 esac
2157done
2158else
2159 echo "$as_me: failed program was:" >&5
2160cat conftest.$ac_ext >&5
2161{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2162echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2163 { (exit 1); exit 1; }; }
2164fi
2165
2166rm -f conftest.$ac_cv_objext conftest.$ac_ext
2167fi
2168echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2169echo "${ECHO_T}$ac_cv_objext" >&6
2170OBJEXT=$ac_cv_objext
2171ac_objext=$OBJEXT
2172echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2173echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2174if test "${ac_cv_c_compiler_gnu+set}" = set; then
2175 echo $ECHO_N "(cached) $ECHO_C" >&6
2176else
2177 cat >conftest.$ac_ext <<_ACEOF
2178#line $LINENO "configure"
2179#include "confdefs.h"
2180
2181#ifdef F77_DUMMY_MAIN
2182# ifdef __cplusplus
2183 extern "C"
2184# endif
2185 int F77_DUMMY_MAIN() { return 1; }
2186#endif
2187int
2188main ()
2189{
2190#ifndef __GNUC__
2191 choke me
2192#endif
2193
2194 ;
2195 return 0;
2196}
2197_ACEOF
2198rm -f conftest.$ac_objext
2199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2200 (eval $ac_compile) 2>&5
2201 ac_status=$?
2202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2203 (exit $ac_status); } &&
2204 { ac_try='test -s conftest.$ac_objext'
2205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2206 (eval $ac_try) 2>&5
2207 ac_status=$?
2208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2209 (exit $ac_status); }; }; then
2210 ac_compiler_gnu=yes
2211else
2212 echo "$as_me: failed program was:" >&5
2213cat conftest.$ac_ext >&5
2214ac_compiler_gnu=no
2215fi
2216rm -f conftest.$ac_objext conftest.$ac_ext
2217ac_cv_c_compiler_gnu=$ac_compiler_gnu
2218
2219fi
2220echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2221echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2222GCC=`test $ac_compiler_gnu = yes && echo yes`
2223ac_test_CFLAGS=${CFLAGS+set}
2224ac_save_CFLAGS=$CFLAGS
2225CFLAGS="-g"
2226echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2227echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2228if test "${ac_cv_prog_cc_g+set}" = set; then
2229 echo $ECHO_N "(cached) $ECHO_C" >&6
2230else
2231 cat >conftest.$ac_ext <<_ACEOF
2232#line $LINENO "configure"
2233#include "confdefs.h"
2234
2235#ifdef F77_DUMMY_MAIN
2236# ifdef __cplusplus
2237 extern "C"
2238# endif
2239 int F77_DUMMY_MAIN() { return 1; }
2240#endif
2241int
2242main ()
2243{
2244
2245 ;
2246 return 0;
2247}
2248_ACEOF
2249rm -f conftest.$ac_objext
2250if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2251 (eval $ac_compile) 2>&5
2252 ac_status=$?
2253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2254 (exit $ac_status); } &&
2255 { ac_try='test -s conftest.$ac_objext'
2256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2257 (eval $ac_try) 2>&5
2258 ac_status=$?
2259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2260 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002261 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002262else
Martin v. Löwis11437992002-04-12 09:54:03 +00002263 echo "$as_me: failed program was:" >&5
2264cat conftest.$ac_ext >&5
2265ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002266fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002267rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002268fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002269echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2270echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002271if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002272 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002273elif test $ac_cv_prog_cc_g = yes; then
2274 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002275 CFLAGS="-g -O2"
2276 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002277 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002278 fi
2279else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002280 if test "$GCC" = yes; then
2281 CFLAGS="-O2"
2282 else
2283 CFLAGS=
2284 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002285fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002286# Some people use a C++ compiler to compile C. Since we use `exit',
2287# in C++ we need to declare it. In case someone uses the same compiler
2288# for both compiling C and C++ we need to have the C++ compiler decide
2289# the declaration of exit, since it's the most demanding environment.
2290cat >conftest.$ac_ext <<_ACEOF
2291#ifndef __cplusplus
2292 choke me
2293#endif
2294_ACEOF
2295rm -f conftest.$ac_objext
2296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2297 (eval $ac_compile) 2>&5
2298 ac_status=$?
2299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2300 (exit $ac_status); } &&
2301 { ac_try='test -s conftest.$ac_objext'
2302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2303 (eval $ac_try) 2>&5
2304 ac_status=$?
2305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2306 (exit $ac_status); }; }; then
2307 for ac_declaration in \
2308 ''\
2309 '#include <stdlib.h>' \
2310 'extern "C" void std::exit (int) throw (); using std::exit;' \
2311 'extern "C" void std::exit (int); using std::exit;' \
2312 'extern "C" void exit (int) throw ();' \
2313 'extern "C" void exit (int);' \
2314 'void exit (int);'
2315do
2316 cat >conftest.$ac_ext <<_ACEOF
2317#line $LINENO "configure"
2318#include "confdefs.h"
2319#include <stdlib.h>
2320$ac_declaration
2321#ifdef F77_DUMMY_MAIN
2322# ifdef __cplusplus
2323 extern "C"
2324# endif
2325 int F77_DUMMY_MAIN() { return 1; }
2326#endif
2327int
2328main ()
2329{
2330exit (42);
2331 ;
2332 return 0;
2333}
2334_ACEOF
2335rm -f conftest.$ac_objext
2336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2337 (eval $ac_compile) 2>&5
2338 ac_status=$?
2339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2340 (exit $ac_status); } &&
2341 { ac_try='test -s conftest.$ac_objext'
2342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2343 (eval $ac_try) 2>&5
2344 ac_status=$?
2345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2346 (exit $ac_status); }; }; then
2347 :
2348else
2349 echo "$as_me: failed program was:" >&5
2350cat conftest.$ac_ext >&5
2351continue
2352fi
2353rm -f conftest.$ac_objext conftest.$ac_ext
2354 cat >conftest.$ac_ext <<_ACEOF
2355#line $LINENO "configure"
2356#include "confdefs.h"
2357$ac_declaration
2358#ifdef F77_DUMMY_MAIN
2359# ifdef __cplusplus
2360 extern "C"
2361# endif
2362 int F77_DUMMY_MAIN() { return 1; }
2363#endif
2364int
2365main ()
2366{
2367exit (42);
2368 ;
2369 return 0;
2370}
2371_ACEOF
2372rm -f conftest.$ac_objext
2373if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2374 (eval $ac_compile) 2>&5
2375 ac_status=$?
2376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2377 (exit $ac_status); } &&
2378 { ac_try='test -s conftest.$ac_objext'
2379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2380 (eval $ac_try) 2>&5
2381 ac_status=$?
2382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2383 (exit $ac_status); }; }; then
2384 break
2385else
2386 echo "$as_me: failed program was:" >&5
2387cat conftest.$ac_ext >&5
2388fi
2389rm -f conftest.$ac_objext conftest.$ac_ext
2390done
2391rm -f conftest*
2392if test -n "$ac_declaration"; then
2393 echo '#ifdef __cplusplus' >>confdefs.h
2394 echo $ac_declaration >>confdefs.h
2395 echo '#endif' >>confdefs.h
2396fi
2397
2398else
2399 echo "$as_me: failed program was:" >&5
2400cat conftest.$ac_ext >&5
2401fi
2402rm -f conftest.$ac_objext conftest.$ac_ext
2403ac_ext=c
2404ac_cpp='$CPP $CPPFLAGS'
2405ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2406ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2407ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002408
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002409
2410# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002411
2412ac_ext=c
2413ac_cpp='$CPP $CPPFLAGS'
2414ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2415ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2416ac_compiler_gnu=$ac_cv_c_compiler_gnu
2417echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2418echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002419# On Suns, sometimes $CPP names a directory.
2420if test -n "$CPP" && test -d "$CPP"; then
2421 CPP=
2422fi
2423if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002424 if test "${ac_cv_prog_CPP+set}" = set; then
2425 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002426else
Martin v. Löwis11437992002-04-12 09:54:03 +00002427 # Double quotes because CPP needs to be expanded
2428 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2429 do
2430 ac_preproc_ok=false
2431for ac_c_preproc_warn_flag in '' yes
2432do
2433 # Use a header file that comes with gcc, so configuring glibc
2434 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002435 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002436 # not just through cpp. "Syntax error" is here to catch this case.
2437 cat >conftest.$ac_ext <<_ACEOF
2438#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002439#include "confdefs.h"
2440#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002441 Syntax error
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
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002460 :
2461else
Martin v. Löwis11437992002-04-12 09:54:03 +00002462 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002463 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 # Broken: fails on valid input.
2465continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002466fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002467rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002468
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 # OK, works on sane cases. Now check whether non-existent headers
2470 # can be detected and how.
2471 cat >conftest.$ac_ext <<_ACEOF
2472#line $LINENO "configure"
2473#include "confdefs.h"
2474#include <ac_nonexistent.h>
2475_ACEOF
2476if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2477 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2478 ac_status=$?
2479 egrep -v '^ *\+' conftest.er1 >conftest.err
2480 rm -f conftest.er1
2481 cat conftest.err >&5
2482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2483 (exit $ac_status); } >/dev/null; then
2484 if test -s conftest.err; then
2485 ac_cpp_err=$ac_c_preproc_warn_flag
2486 else
2487 ac_cpp_err=
2488 fi
2489else
2490 ac_cpp_err=yes
2491fi
2492if test -z "$ac_cpp_err"; then
2493 # Broken: success on invalid input.
2494continue
2495else
2496 echo "$as_me: failed program was:" >&5
2497 cat conftest.$ac_ext >&5
2498 # Passes both tests.
2499ac_preproc_ok=:
2500break
2501fi
2502rm -f conftest.err conftest.$ac_ext
2503
2504done
2505# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2506rm -f conftest.err conftest.$ac_ext
2507if $ac_preproc_ok; then
2508 break
2509fi
2510
2511 done
2512 ac_cv_prog_CPP=$CPP
2513
2514fi
2515 CPP=$ac_cv_prog_CPP
2516else
2517 ac_cv_prog_CPP=$CPP
2518fi
2519echo "$as_me:$LINENO: result: $CPP" >&5
2520echo "${ECHO_T}$CPP" >&6
2521ac_preproc_ok=false
2522for ac_c_preproc_warn_flag in '' yes
2523do
2524 # Use a header file that comes with gcc, so configuring glibc
2525 # with a fresh cross-compiler works.
2526 # On the NeXT, cc -E runs the code through the compiler's parser,
2527 # not just through cpp. "Syntax error" is here to catch this case.
2528 cat >conftest.$ac_ext <<_ACEOF
2529#line $LINENO "configure"
2530#include "confdefs.h"
2531#include <assert.h>
2532 Syntax error
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 :
2552else
2553 echo "$as_me: failed program was:" >&5
2554 cat conftest.$ac_ext >&5
2555 # Broken: fails on valid input.
2556continue
2557fi
2558rm -f conftest.err conftest.$ac_ext
2559
2560 # OK, works on sane cases. Now check whether non-existent headers
2561 # can be detected and how.
2562 cat >conftest.$ac_ext <<_ACEOF
2563#line $LINENO "configure"
2564#include "confdefs.h"
2565#include <ac_nonexistent.h>
2566_ACEOF
2567if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2568 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2569 ac_status=$?
2570 egrep -v '^ *\+' conftest.er1 >conftest.err
2571 rm -f conftest.er1
2572 cat conftest.err >&5
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); } >/dev/null; then
2575 if test -s conftest.err; then
2576 ac_cpp_err=$ac_c_preproc_warn_flag
2577 else
2578 ac_cpp_err=
2579 fi
2580else
2581 ac_cpp_err=yes
2582fi
2583if test -z "$ac_cpp_err"; then
2584 # Broken: success on invalid input.
2585continue
2586else
2587 echo "$as_me: failed program was:" >&5
2588 cat conftest.$ac_ext >&5
2589 # Passes both tests.
2590ac_preproc_ok=:
2591break
2592fi
2593rm -f conftest.err conftest.$ac_ext
2594
2595done
2596# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2597rm -f conftest.err conftest.$ac_ext
2598if $ac_preproc_ok; then
2599 :
2600else
2601 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2602echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2603 { (exit 1); exit 1; }; }
2604fi
2605
2606ac_ext=c
2607ac_cpp='$CPP $CPPFLAGS'
2608ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2609ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2610ac_compiler_gnu=$ac_cv_c_compiler_gnu
2611
2612
2613
2614echo "$as_me:$LINENO: checking for AIX" >&5
2615echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2616cat >conftest.$ac_ext <<_ACEOF
2617#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002618#include "confdefs.h"
2619#ifdef _AIX
2620 yes
2621#endif
2622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2625 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 echo "$as_me:$LINENO: result: yes" >&5
2627echo "${ECHO_T}yes" >&6
2628cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002629#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002630_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002631
2632else
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 echo "$as_me:$LINENO: result: no" >&5
2634echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002635fi
2636rm -f conftest*
2637
Michael W. Hudson54241132001-12-07 15:38:26 +00002638
Martin v. Löwis11437992002-04-12 09:54:03 +00002639echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2640echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2641if test "${ac_cv_header_stdc+set}" = set; then
2642 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002643else
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 cat >conftest.$ac_ext <<_ACEOF
2645#line $LINENO "configure"
2646#include "confdefs.h"
2647#include <stdlib.h>
2648#include <stdarg.h>
2649#include <string.h>
2650#include <float.h>
2651
2652_ACEOF
2653if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2654 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2655 ac_status=$?
2656 egrep -v '^ *\+' conftest.er1 >conftest.err
2657 rm -f conftest.er1
2658 cat conftest.err >&5
2659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2660 (exit $ac_status); } >/dev/null; then
2661 if test -s conftest.err; then
2662 ac_cpp_err=$ac_c_preproc_warn_flag
2663 else
2664 ac_cpp_err=
2665 fi
2666else
2667 ac_cpp_err=yes
2668fi
2669if test -z "$ac_cpp_err"; then
2670 ac_cv_header_stdc=yes
2671else
2672 echo "$as_me: failed program was:" >&5
2673 cat conftest.$ac_ext >&5
2674 ac_cv_header_stdc=no
2675fi
2676rm -f conftest.err conftest.$ac_ext
2677
2678if test $ac_cv_header_stdc = yes; then
2679 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2680 cat >conftest.$ac_ext <<_ACEOF
2681#line $LINENO "configure"
2682#include "confdefs.h"
2683#include <string.h>
2684
2685_ACEOF
2686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2687 egrep "memchr" >/dev/null 2>&1; then
2688 :
2689else
2690 ac_cv_header_stdc=no
2691fi
2692rm -f conftest*
2693
2694fi
2695
2696if test $ac_cv_header_stdc = yes; then
2697 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2698 cat >conftest.$ac_ext <<_ACEOF
2699#line $LINENO "configure"
2700#include "confdefs.h"
2701#include <stdlib.h>
2702
2703_ACEOF
2704if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2705 egrep "free" >/dev/null 2>&1; then
2706 :
2707else
2708 ac_cv_header_stdc=no
2709fi
2710rm -f conftest*
2711
2712fi
2713
2714if test $ac_cv_header_stdc = yes; then
2715 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2716 if test "$cross_compiling" = yes; then
2717 :
2718else
2719 cat >conftest.$ac_ext <<_ACEOF
2720#line $LINENO "configure"
2721#include "confdefs.h"
2722#include <ctype.h>
2723#if ((' ' & 0x0FF) == 0x020)
2724# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2725# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2726#else
2727# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2728 || ('j' <= (c) && (c) <= 'r') \
2729 || ('s' <= (c) && (c) <= 'z'))
2730# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2731#endif
2732
2733#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2734int
2735main ()
2736{
2737 int i;
2738 for (i = 0; i < 256; i++)
2739 if (XOR (islower (i), ISLOWER (i))
2740 || toupper (i) != TOUPPER (i))
2741 exit(2);
2742 exit (0);
2743}
2744_ACEOF
2745rm -f conftest$ac_exeext
2746if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2747 (eval $ac_link) 2>&5
2748 ac_status=$?
2749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2750 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2752 (eval $ac_try) 2>&5
2753 ac_status=$?
2754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2755 (exit $ac_status); }; }; then
2756 :
2757else
2758 echo "$as_me: program exited with status $ac_status" >&5
2759echo "$as_me: failed program was:" >&5
2760cat conftest.$ac_ext >&5
2761( exit $ac_status )
2762ac_cv_header_stdc=no
2763fi
2764rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2765fi
2766fi
2767fi
2768echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2769echo "${ECHO_T}$ac_cv_header_stdc" >&6
2770if test $ac_cv_header_stdc = yes; then
2771
2772cat >>confdefs.h <<\_ACEOF
2773#define STDC_HEADERS 1
2774_ACEOF
2775
2776fi
2777
2778# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2789 inttypes.h stdint.h unistd.h
2790do
2791as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2792echo "$as_me:$LINENO: checking for $ac_header" >&5
2793echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2794if eval "test \"\${$as_ac_Header+set}\" = set"; then
2795 echo $ECHO_N "(cached) $ECHO_C" >&6
2796else
2797 cat >conftest.$ac_ext <<_ACEOF
2798#line $LINENO "configure"
2799#include "confdefs.h"
2800$ac_includes_default
2801
2802#include <$ac_header>
2803_ACEOF
2804rm -f conftest.$ac_objext
2805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2806 (eval $ac_compile) 2>&5
2807 ac_status=$?
2808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2809 (exit $ac_status); } &&
2810 { ac_try='test -s conftest.$ac_objext'
2811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2812 (eval $ac_try) 2>&5
2813 ac_status=$?
2814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2815 (exit $ac_status); }; }; then
2816 eval "$as_ac_Header=yes"
2817else
2818 echo "$as_me: failed program was:" >&5
2819cat conftest.$ac_ext >&5
2820eval "$as_ac_Header=no"
2821fi
2822rm -f conftest.$ac_objext conftest.$ac_ext
2823fi
2824echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2825echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2826if test `eval echo '${'$as_ac_Header'}'` = yes; then
2827 cat >>confdefs.h <<_ACEOF
2828#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2829_ACEOF
2830
2831fi
2832
2833done
2834
2835
2836if test "${ac_cv_header_minix_config_h+set}" = set; then
2837 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2838echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2839if test "${ac_cv_header_minix_config_h+set}" = set; then
2840 echo $ECHO_N "(cached) $ECHO_C" >&6
2841fi
2842echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2843echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2844else
2845 # Is the header compilable?
2846echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2847echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2848cat >conftest.$ac_ext <<_ACEOF
2849#line $LINENO "configure"
2850#include "confdefs.h"
2851$ac_includes_default
2852#include <minix/config.h>
2853_ACEOF
2854rm -f conftest.$ac_objext
2855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2856 (eval $ac_compile) 2>&5
2857 ac_status=$?
2858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2859 (exit $ac_status); } &&
2860 { ac_try='test -s conftest.$ac_objext'
2861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2862 (eval $ac_try) 2>&5
2863 ac_status=$?
2864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2865 (exit $ac_status); }; }; then
2866 ac_header_compiler=yes
2867else
2868 echo "$as_me: failed program was:" >&5
2869cat conftest.$ac_ext >&5
2870ac_header_compiler=no
2871fi
2872rm -f conftest.$ac_objext conftest.$ac_ext
2873echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2874echo "${ECHO_T}$ac_header_compiler" >&6
2875
2876# Is the header present?
2877echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2878echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2879cat >conftest.$ac_ext <<_ACEOF
2880#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002881#include "confdefs.h"
2882#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002883_ACEOF
2884if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2885 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2886 ac_status=$?
2887 egrep -v '^ *\+' conftest.er1 >conftest.err
2888 rm -f conftest.er1
2889 cat conftest.err >&5
2890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2891 (exit $ac_status); } >/dev/null; then
2892 if test -s conftest.err; then
2893 ac_cpp_err=$ac_c_preproc_warn_flag
2894 else
2895 ac_cpp_err=
2896 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002897else
Martin v. Löwis11437992002-04-12 09:54:03 +00002898 ac_cpp_err=yes
2899fi
2900if test -z "$ac_cpp_err"; then
2901 ac_header_preproc=yes
2902else
2903 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002904 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002905 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002906fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002907rm -f conftest.err conftest.$ac_ext
2908echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2909echo "${ECHO_T}$ac_header_preproc" >&6
2910
2911# So? What about this header?
2912case $ac_header_compiler:$ac_header_preproc in
2913 yes:no )
2914 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2915echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2916 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2917echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2918 no:yes )
2919 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2920echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2921 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2922echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2923 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2924echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2925esac
2926echo "$as_me:$LINENO: checking for minix/config.h" >&5
2927echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2928if test "${ac_cv_header_minix_config_h+set}" = set; then
2929 echo $ECHO_N "(cached) $ECHO_C" >&6
2930else
2931 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002932fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002933echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2934echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2935
2936fi
2937if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002938 MINIX=yes
2939else
Martin v. Löwis11437992002-04-12 09:54:03 +00002940 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002941fi
2942
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002944if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002945
2946cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002947#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002948_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950
2951cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002952#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002953_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002954
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
2956cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002957#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002958_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002959
2960fi
2961
2962
Michael W. Hudson54241132001-12-07 15:38:26 +00002963
Martin v. Löwis11437992002-04-12 09:54:03 +00002964echo "$as_me:$LINENO: checking for --with-suffix" >&5
2965echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002966
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002967# Check whether --with-suffix or --without-suffix was given.
2968if test "${with_suffix+set}" = set; then
2969 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002970
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002971 case $withval in
2972 no) EXEEXT=;;
2973 yes) EXEEXT=.exe;;
2974 *) EXEEXT=$withval;;
2975 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002976fi;
2977echo "$as_me:$LINENO: result: $EXEEXT" >&5
2978echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002979
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002980# Test whether we're running on a non-case-sensitive system, in which
2981# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002982
Martin v. Löwis11437992002-04-12 09:54:03 +00002983echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2984echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00002985if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002986then
Martin v. Löwis11437992002-04-12 09:54:03 +00002987 echo "$as_me:$LINENO: result: yes" >&5
2988echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002989 BUILDEXEEXT=.exe
2990else
Martin v. Löwis11437992002-04-12 09:54:03 +00002991 echo "$as_me:$LINENO: result: no" >&5
2992echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002993 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002994fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002995
Guido van Rossumdd997f71998-10-07 19:58:26 +00002996case $MACHDEP in
2997bsdos*)
2998 case $CC in
2999 gcc) CC="$CC -D_HAVE_BSDI";;
3000 esac;;
3001esac
3002
Guido van Rossum24b1e751997-08-21 02:29:16 +00003003case $ac_sys_system in
3004hp*|HP*)
3005 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003006 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003007 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003008Monterey*)
3009 case $CC in
3010 cc) CC="$CC -Wl,-Bexport";;
3011 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003012SunOS*)
3013 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003014
3015cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003016#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003017_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003018
3019 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003020esac
3021
Michael W. Hudson54241132001-12-07 15:38:26 +00003022
3023
Martin v. Löwis11437992002-04-12 09:54:03 +00003024echo "$as_me:$LINENO: checking LIBRARY" >&5
3025echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003026if test -z "$LIBRARY"
3027then
3028 LIBRARY='libpython$(VERSION).a'
3029fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003030echo "$as_me:$LINENO: result: $LIBRARY" >&5
3031echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003032
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003033# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003034# name of the library into which to insert object files). BLDLIBRARY is also
3035# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3036# is blank as the main program is not linked directly against LDLIBRARY.
3037# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3038# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3039# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3040# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003041#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003042# RUNSHARED is used to run shared python without installed libraries
3043#
3044# INSTSONAME is the name of the shared library that will be use to install
3045# on the system - some systems like version suffix, others don't
3046
3047
Michael W. Hudson54241132001-12-07 15:38:26 +00003048
3049
3050
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003051
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003052LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003053BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003054INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003055DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003056LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003057RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003058
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003059# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003060# If CXX is set, and if it is needed to link a main function that was
3061# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3062# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003063# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003064# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003065
Martin v. Löwis11437992002-04-12 09:54:03 +00003066echo "$as_me:$LINENO: checking LINKCC" >&5
3067echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003068if test -z "$LINKCC"
3069then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003070 if test -z "$CXX"; then
3071 LINKCC="\$(PURIFY) \$(CC)"
3072 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003073 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003074 $CXX -c conftest.$ac_ext 2>&5
3075 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3076 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3077 then
3078 LINKCC="\$(PURIFY) \$(CC)"
3079 else
3080 LINKCC="\$(PURIFY) \$(CXX)"
3081 fi
3082 rm -fr conftest*
3083 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003084 case $ac_sys_system in
3085 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003086 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003087 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003088 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003089 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003090 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003091 esac
3092fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003093echo "$as_me:$LINENO: result: $LINKCC" >&5
3094echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003095
Martin v. Löwis11437992002-04-12 09:54:03 +00003096echo "$as_me:$LINENO: checking for --enable-shared" >&5
3097echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003098# Check whether --enable-shared or --disable-shared was given.
3099if test "${enable_shared+set}" = set; then
3100 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003101
Martin v. Löwis11437992002-04-12 09:54:03 +00003102fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003103
3104if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003105then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003106 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003107 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003108 enable_shared="yes";;
3109 *)
3110 enable_shared="no";;
3111 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003112fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003113echo "$as_me:$LINENO: result: $enable_shared" >&5
3114echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003115
3116
Martin v. Löwis11437992002-04-12 09:54:03 +00003117echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3118echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003119
Guido van Rossumb8552162001-09-05 14:58:11 +00003120# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3121# library that we build, but we do not want to link against it (we
3122# will find it with a -framework option). For this reason there is an
3123# extra variable BLDLIBRARY against which Python and the extension
3124# modules are linked, BLDLIBRARY. This is normally the same as
3125# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003126if test "$enable_framework"
3127then
3128 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3129 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3130 BLDLIBRARY=''
3131else
3132 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003133fi
Jack Jansene578a632001-08-15 01:27:14 +00003134
Martin v. Löwis1142de32002-03-29 16:28:31 +00003135# Other platforms follow
3136if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003137
3138cat >>confdefs.h <<\_ACEOF
3139#define Py_ENABLE_SHARED 1
3140_ACEOF
3141
Martin v. Löwis1142de32002-03-29 16:28:31 +00003142 case $ac_sys_system in
3143 BeOS*)
3144 LDLIBRARY='libpython$(VERSION).so'
3145 ;;
3146 CYGWIN*)
3147 LDLIBRARY='libpython$(VERSION).dll.a'
3148 DLLLIBRARY='libpython$(VERSION).dll'
3149 ;;
3150 SunOS*)
3151 LDLIBRARY='libpython$(VERSION).so'
3152 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3153 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3154 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003155 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003156 LDLIBRARY='libpython$(VERSION).so'
3157 BLDLIBRARY='-L. -lpython$(VERSION)'
3158 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3159 INSTSONAME="$LDLIBRARY".$SOVERSION
3160 ;;
3161 hp*|HP*)
3162 LDLIBRARY='libpython$(VERSION).sl'
3163 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3164 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3165 ;;
3166 OSF*)
3167 LDLIBRARY='libpython$(VERSION).so'
3168 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3169 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3170 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003171 atheos*)
3172 LDLIBRARY='libpython$(VERSION).so'
3173 BLDLIBRARY='-L. -lpython$(VERSION)'
3174 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3175 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003176 esac
3177 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3178 case $MACHDEP in
3179 dguxR4)
3180 LDLIBRARY='libpython$(VERSION).so'
3181 OPT="$OPT -pic"
3182 ;;
3183 esac
3184fi
3185
Martin v. Löwis11437992002-04-12 09:54:03 +00003186echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3187echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003188
Martin v. Löwis11437992002-04-12 09:54:03 +00003189if test -n "$ac_tool_prefix"; then
3190 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3191set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3192echo "$as_me:$LINENO: checking for $ac_word" >&5
3193echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3194if test "${ac_cv_prog_RANLIB+set}" = set; then
3195 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003196else
3197 if test -n "$RANLIB"; then
3198 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3199else
Martin v. Löwis11437992002-04-12 09:54:03 +00003200as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3201for as_dir in $PATH
3202do
3203 IFS=$as_save_IFS
3204 test -z "$as_dir" && as_dir=.
3205 for ac_exec_ext in '' $ac_executable_extensions; do
3206 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3207 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3208 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3209 break 2
3210 fi
3211done
3212done
3213
Guido van Rossum627b2d71993-12-24 10:39:16 +00003214fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003216RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003217if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003218 echo "$as_me:$LINENO: result: $RANLIB" >&5
3219echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003220else
Martin v. Löwis11437992002-04-12 09:54:03 +00003221 echo "$as_me:$LINENO: result: no" >&5
3222echo "${ECHO_T}no" >&6
3223fi
3224
3225fi
3226if test -z "$ac_cv_prog_RANLIB"; then
3227 ac_ct_RANLIB=$RANLIB
3228 # Extract the first word of "ranlib", so it can be a program name with args.
3229set dummy ranlib; ac_word=$2
3230echo "$as_me:$LINENO: checking for $ac_word" >&5
3231echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3232if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3233 echo $ECHO_N "(cached) $ECHO_C" >&6
3234else
3235 if test -n "$ac_ct_RANLIB"; then
3236 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3237else
3238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3239for as_dir in $PATH
3240do
3241 IFS=$as_save_IFS
3242 test -z "$as_dir" && as_dir=.
3243 for ac_exec_ext in '' $ac_executable_extensions; do
3244 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3245 ac_cv_prog_ac_ct_RANLIB="ranlib"
3246 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3247 break 2
3248 fi
3249done
3250done
3251
3252 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3253fi
3254fi
3255ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3256if test -n "$ac_ct_RANLIB"; then
3257 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3258echo "${ECHO_T}$ac_ct_RANLIB" >&6
3259else
3260 echo "$as_me:$LINENO: result: no" >&5
3261echo "${ECHO_T}no" >&6
3262fi
3263
3264 RANLIB=$ac_ct_RANLIB
3265else
3266 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003267fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003268
3269
Guido van Rossum7f43da71994-08-01 12:15:30 +00003270for ac_prog in ar aal
3271do
Martin v. Löwis11437992002-04-12 09:54:03 +00003272 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003273set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003274echo "$as_me:$LINENO: checking for $ac_word" >&5
3275echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3276if test "${ac_cv_prog_AR+set}" = set; then
3277 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003278else
3279 if test -n "$AR"; then
3280 ac_cv_prog_AR="$AR" # Let the user override the test.
3281else
Martin v. Löwis11437992002-04-12 09:54:03 +00003282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3283for as_dir in $PATH
3284do
3285 IFS=$as_save_IFS
3286 test -z "$as_dir" && as_dir=.
3287 for ac_exec_ext in '' $ac_executable_extensions; do
3288 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3289 ac_cv_prog_AR="$ac_prog"
3290 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3291 break 2
3292 fi
3293done
3294done
3295
Guido van Rossum7f43da71994-08-01 12:15:30 +00003296fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003297fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003298AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003299if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003300 echo "$as_me:$LINENO: result: $AR" >&5
3301echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003302else
Martin v. Löwis11437992002-04-12 09:54:03 +00003303 echo "$as_me:$LINENO: result: no" >&5
3304echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003305fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003306
Martin v. Löwis11437992002-04-12 09:54:03 +00003307 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003308done
3309test -n "$AR" || AR="ar"
3310
Michael W. Hudson54241132001-12-07 15:38:26 +00003311
Neil Schemenauera42c8272001-03-31 00:01:55 +00003312case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003313bsdos*|hp*|HP*)
3314 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003315 if test -z "$INSTALL"
3316 then
3317 INSTALL="${srcdir}/install-sh -c"
3318 fi
3319esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003320ac_aux_dir=
3321for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3322 if test -f $ac_dir/install-sh; then
3323 ac_aux_dir=$ac_dir
3324 ac_install_sh="$ac_aux_dir/install-sh -c"
3325 break
3326 elif test -f $ac_dir/install.sh; then
3327 ac_aux_dir=$ac_dir
3328 ac_install_sh="$ac_aux_dir/install.sh -c"
3329 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003330 elif test -f $ac_dir/shtool; then
3331 ac_aux_dir=$ac_dir
3332 ac_install_sh="$ac_aux_dir/shtool install -c"
3333 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003334 fi
3335done
3336if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003337 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3338echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3339 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003340fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003341ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3342ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3343ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003344
3345# Find a good install program. We prefer a C program (faster),
3346# so one script is as good as another. But avoid the broken or
3347# incompatible versions:
3348# SysV /etc/install, /usr/sbin/install
3349# SunOS /usr/etc/install
3350# IRIX /sbin/install
3351# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003352# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003353# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3354# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3355# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3356# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003357echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3358echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003359if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003360if test "${ac_cv_path_install+set}" = set; then
3361 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003362else
Martin v. Löwis11437992002-04-12 09:54:03 +00003363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3364for as_dir in $PATH
3365do
3366 IFS=$as_save_IFS
3367 test -z "$as_dir" && as_dir=.
3368 # Account for people who put trailing slashes in PATH elements.
3369case $as_dir/ in
3370 ./ | .// | /cC/* | \
3371 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3372 /usr/ucb/* ) ;;
3373 *)
3374 # OSF1 and SCO ODT 3.0 have their own names for install.
3375 # Don't use installbsd from OSF since it installs stuff as root
3376 # by default.
3377 for ac_prog in ginstall scoinst install; do
3378 for ac_exec_ext in '' $ac_executable_extensions; do
3379 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3380 if test $ac_prog = install &&
3381 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3382 # AIX install. It has an incompatible calling convention.
3383 :
3384 elif test $ac_prog = install &&
3385 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3386 # program-specific install script used by HP pwplus--don't use.
3387 :
3388 else
3389 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3390 break 3
3391 fi
3392 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003393 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003394 done
3395 ;;
3396esac
3397done
3398
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003399
3400fi
3401 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003402 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003403 else
3404 # As a last resort, use the slow shell script. We don't cache a
3405 # path for INSTALL within a source directory, because that will
3406 # break other packages using the cache if that directory is
3407 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003408 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003409 fi
3410fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003411echo "$as_me:$LINENO: result: $INSTALL" >&5
3412echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003413
3414# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3415# It thinks the first close brace ends the variable substitution.
3416test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3417
Martin v. Löwis11437992002-04-12 09:54:03 +00003418test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003419
3420test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3421
Michael W. Hudson54241132001-12-07 15:38:26 +00003422
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003423# Not every filesystem supports hard links
3424
3425if test -z "$LN" ; then
3426 case $ac_sys_system in
3427 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003428 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003429 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003430 *) LN=ln;;
3431 esac
3432fi
3433
Fred Drake109d9862001-07-11 06:27:56 +00003434# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003435echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3436echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3437
Fred Drake109d9862001-07-11 06:27:56 +00003438# Check whether --with-pydebug or --without-pydebug was given.
3439if test "${with_pydebug+set}" = set; then
3440 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003441
Fred Drake109d9862001-07-11 06:27:56 +00003442if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003443then
3444
3445cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003446#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003447_ACEOF
3448
3449 echo "$as_me:$LINENO: result: yes" >&5
3450echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003451 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003452else echo "$as_me:$LINENO: result: no" >&5
3453echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003454fi
3455else
Martin v. Löwis11437992002-04-12 09:54:03 +00003456 echo "$as_me:$LINENO: result: no" >&5
3457echo "${ECHO_T}no" >&6
3458fi;
Fred Drake109d9862001-07-11 06:27:56 +00003459
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003460# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003461
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003462if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003463then
Neal Norwitzd957f392002-09-25 21:26:19 +00003464 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003465 yes)
3466 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003467 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003468 if test "$Py_DEBUG" = 'true' ; then
3469 # Optimization messes up debuggers, so turn it off for
3470 # debug builds.
3471 OPT="-g -Wall -Wstrict-prototypes"
3472 else
3473 OPT="-g -O3 -Wall -Wstrict-prototypes"
3474 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003475 *)
Fred Drake109d9862001-07-11 06:27:56 +00003476 OPT="-O3 -Wall -Wstrict-prototypes";;
3477 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003478 case $ac_sys_system in
3479 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3480 esac
Fred Drake109d9862001-07-11 06:27:56 +00003481 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003482 *)
3483 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003484 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003485 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003486 SCO_SV*)
3487 CFLAGS="$CFLAGS -belf"
3488 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003489 *)
3490 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003491 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003492 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003493 case $ac_sys_system in
3494 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003495 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003496 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003497fi
3498
Fred Drakee1ceaa02001-12-04 20:55:47 +00003499if test "$Py_DEBUG" = 'true'; then
3500 :
3501else
3502 OPT="-DNDEBUG $OPT"
3503fi
3504
Trent Mick635f6fb2000-08-23 21:33:05 +00003505# The current (beta) Monterey compiler dies with optimizations
3506case $ac_sys_system in
3507Monterey*) OPT="";;
3508esac
3509
Guido van Rossum563e7081996-09-10 18:20:48 +00003510if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003511then
3512 OPT="$OPT $ac_arch_flags"
3513fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003514
Martin v. Löwis11437992002-04-12 09:54:03 +00003515echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3516echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3517if test "${ac_cv_opt_olimit_ok+set}" = set; then
3518 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003519else
3520 ac_save_cc="$CC"
3521CC="$CC -OPT:Olimit=0"
3522if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003523 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003524else
Martin v. Löwis11437992002-04-12 09:54:03 +00003525 cat >conftest.$ac_ext <<_ACEOF
3526#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003527#include "confdefs.h"
3528int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003529_ACEOF
3530rm -f conftest$ac_exeext
3531if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3532 (eval $ac_link) 2>&5
3533 ac_status=$?
3534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3535 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3537 (eval $ac_try) 2>&5
3538 ac_status=$?
3539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3540 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003541 ac_cv_opt_olimit_ok=yes
3542else
Martin v. Löwis11437992002-04-12 09:54:03 +00003543 echo "$as_me: program exited with status $ac_status" >&5
3544echo "$as_me: failed program was:" >&5
3545cat conftest.$ac_ext >&5
3546( exit $ac_status )
3547ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003548fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003549rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003550fi
Guido van Rossum91922671997-10-09 20:24:13 +00003551CC="$ac_save_cc"
3552fi
3553
Martin v. Löwis11437992002-04-12 09:54:03 +00003554echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3555echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003556if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003557 case $ac_sys_system in
3558 Darwin*) OPT="$OPT" ;;
3559 *) OPT="$OPT -OPT:Olimit=0";;
3560 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003561else
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3563echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3564 if test "${ac_cv_olimit_ok+set}" = set; then
3565 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003566else
3567 ac_save_cc="$CC"
3568 CC="$CC -Olimit 1500"
3569 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003570 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003571else
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 cat >conftest.$ac_ext <<_ACEOF
3573#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003574#include "confdefs.h"
3575int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003576_ACEOF
3577rm -f conftest$ac_exeext
3578if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3579 (eval $ac_link) 2>&5
3580 ac_status=$?
3581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3582 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3584 (eval $ac_try) 2>&5
3585 ac_status=$?
3586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3587 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003588 ac_cv_olimit_ok=yes
3589else
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 echo "$as_me: program exited with status $ac_status" >&5
3591echo "$as_me: failed program was:" >&5
3592cat conftest.$ac_ext >&5
3593( exit $ac_status )
3594ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003595fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003596rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003597fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003598 CC="$ac_save_cc"
3599fi
3600
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3602echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003603 if test $ac_cv_olimit_ok = yes; then
3604 OPT="$OPT -Olimit 1500"
3605 fi
3606fi
3607
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003608# On some compilers, pthreads are available without further options
3609# (e.g. MacOS X). On some of these systems, the compiler will not
3610# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3611# So we have to see first whether pthreads are available without
3612# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003613echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3614echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3615if test "${ac_cv_pthread_is_default+set}" = set; then
3616 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003617else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003618 if test "$cross_compiling" = yes; then
3619 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003620else
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 cat >conftest.$ac_ext <<_ACEOF
3622#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003623#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003624
Martin v. Löwis130fb172001-07-19 11:00:41 +00003625#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003626
3627void* routine(void* p){return NULL;}
3628
3629int main(){
3630 pthread_t p;
3631 if(pthread_create(&p,NULL,routine,NULL)!=0)
3632 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003633 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003634 return 0;
3635}
3636
Martin v. Löwis11437992002-04-12 09:54:03 +00003637_ACEOF
3638rm -f conftest$ac_exeext
3639if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3640 (eval $ac_link) 2>&5
3641 ac_status=$?
3642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3645 (eval $ac_try) 2>&5
3646 ac_status=$?
3647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3648 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003649 ac_cv_pthread_is_default=yes
3650else
Martin v. Löwis11437992002-04-12 09:54:03 +00003651 echo "$as_me: program exited with status $ac_status" >&5
3652echo "$as_me: failed program was:" >&5
3653cat conftest.$ac_ext >&5
3654( exit $ac_status )
3655ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003656fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003657rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003658fi
3659
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003660fi
3661
Martin v. Löwis11437992002-04-12 09:54:03 +00003662echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3663echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003664
Michael W. Hudson54241132001-12-07 15:38:26 +00003665
Martin v. Löwis11437992002-04-12 09:54:03 +00003666if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003667then
3668 ac_cv_kpthread=no
3669else
3670# -Kpthread, if available, provides the right #defines
3671# and linker options to make pthread_create available
3672# Some compilers won't report that they do not support -Kpthread,
3673# so we need to run a program to see whether it really made the
3674# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003675echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3676echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3677if test "${ac_cv_kpthread+set}" = set; then
3678 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003679else
3680 ac_save_cc="$CC"
3681CC="$CC -Kpthread"
3682if test "$cross_compiling" = yes; then
3683 ac_cv_kpthread=no
3684else
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 cat >conftest.$ac_ext <<_ACEOF
3686#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003687#include "confdefs.h"
3688
3689#include <pthread.h>
3690
3691void* routine(void* p){return NULL;}
3692
3693int main(){
3694 pthread_t p;
3695 if(pthread_create(&p,NULL,routine,NULL)!=0)
3696 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003697 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003698 return 0;
3699}
3700
Martin v. Löwis11437992002-04-12 09:54:03 +00003701_ACEOF
3702rm -f conftest$ac_exeext
3703if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3704 (eval $ac_link) 2>&5
3705 ac_status=$?
3706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3707 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3709 (eval $ac_try) 2>&5
3710 ac_status=$?
3711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3712 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003713 ac_cv_kpthread=yes
3714else
Martin v. Löwis11437992002-04-12 09:54:03 +00003715 echo "$as_me: program exited with status $ac_status" >&5
3716echo "$as_me: failed program was:" >&5
3717cat conftest.$ac_ext >&5
3718( exit $ac_status )
3719ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003720fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003721rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003722fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003723CC="$ac_save_cc"
3724fi
3725
Martin v. Löwis11437992002-04-12 09:54:03 +00003726echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3727echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003728fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003729
Michael W. Hudson54241132001-12-07 15:38:26 +00003730
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003731# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003732echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3733echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3734if test "${ac_cv_header_stdc+set}" = set; then
3735 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003736else
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 cat >conftest.$ac_ext <<_ACEOF
3738#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003739#include "confdefs.h"
3740#include <stdlib.h>
3741#include <stdarg.h>
3742#include <string.h>
3743#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003744
3745_ACEOF
3746if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3747 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3748 ac_status=$?
3749 egrep -v '^ *\+' conftest.er1 >conftest.err
3750 rm -f conftest.er1
3751 cat conftest.err >&5
3752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3753 (exit $ac_status); } >/dev/null; then
3754 if test -s conftest.err; then
3755 ac_cpp_err=$ac_c_preproc_warn_flag
3756 else
3757 ac_cpp_err=
3758 fi
3759else
3760 ac_cpp_err=yes
3761fi
3762if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003763 ac_cv_header_stdc=yes
3764else
Martin v. Löwis11437992002-04-12 09:54:03 +00003765 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003766 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003767 ac_cv_header_stdc=no
3768fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003769rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003770
3771if test $ac_cv_header_stdc = yes; then
3772 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 cat >conftest.$ac_ext <<_ACEOF
3774#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003775#include "confdefs.h"
3776#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003777
3778_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003779if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3780 egrep "memchr" >/dev/null 2>&1; then
3781 :
3782else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003783 ac_cv_header_stdc=no
3784fi
3785rm -f conftest*
3786
3787fi
3788
3789if test $ac_cv_header_stdc = yes; then
3790 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 cat >conftest.$ac_ext <<_ACEOF
3792#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003793#include "confdefs.h"
3794#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003795
3796_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3798 egrep "free" >/dev/null 2>&1; then
3799 :
3800else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003801 ac_cv_header_stdc=no
3802fi
3803rm -f conftest*
3804
3805fi
3806
3807if test $ac_cv_header_stdc = yes; then
3808 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003810 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003811else
Martin v. Löwis11437992002-04-12 09:54:03 +00003812 cat >conftest.$ac_ext <<_ACEOF
3813#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003814#include "confdefs.h"
3815#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003816#if ((' ' & 0x0FF) == 0x020)
3817# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3818# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3819#else
3820# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3821 || ('j' <= (c) && (c) <= 'r') \
3822 || ('s' <= (c) && (c) <= 'z'))
3823# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3824#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003825
Martin v. Löwis11437992002-04-12 09:54:03 +00003826#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3827int
3828main ()
3829{
3830 int i;
3831 for (i = 0; i < 256; i++)
3832 if (XOR (islower (i), ISLOWER (i))
3833 || toupper (i) != TOUPPER (i))
3834 exit(2);
3835 exit (0);
3836}
3837_ACEOF
3838rm -f conftest$ac_exeext
3839if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3840 (eval $ac_link) 2>&5
3841 ac_status=$?
3842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3843 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3845 (eval $ac_try) 2>&5
3846 ac_status=$?
3847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3848 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003849 :
3850else
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 echo "$as_me: program exited with status $ac_status" >&5
3852echo "$as_me: failed program was:" >&5
3853cat conftest.$ac_ext >&5
3854( exit $ac_status )
3855ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003856fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003857rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003858fi
3859fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003860fi
3861echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3862echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003863if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003864
3865cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003866#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003867_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003868
3869fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
Martin v. Löwis11437992002-04-12 09:54:03 +00003908for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003909libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003910signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003911sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003912sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00003913sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003914sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003915do
Martin v. Löwis11437992002-04-12 09:54:03 +00003916as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3917if eval "test \"\${$as_ac_Header+set}\" = set"; then
3918 echo "$as_me:$LINENO: checking for $ac_header" >&5
3919echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3920if eval "test \"\${$as_ac_Header+set}\" = set"; then
3921 echo $ECHO_N "(cached) $ECHO_C" >&6
3922fi
3923echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3924echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003925else
Martin v. Löwis11437992002-04-12 09:54:03 +00003926 # Is the header compilable?
3927echo "$as_me:$LINENO: checking $ac_header usability" >&5
3928echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3929cat >conftest.$ac_ext <<_ACEOF
3930#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003931#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003932$ac_includes_default
3933#include <$ac_header>
3934_ACEOF
3935rm -f conftest.$ac_objext
3936if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3937 (eval $ac_compile) 2>&5
3938 ac_status=$?
3939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3940 (exit $ac_status); } &&
3941 { ac_try='test -s conftest.$ac_objext'
3942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3943 (eval $ac_try) 2>&5
3944 ac_status=$?
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); }; }; then
3947 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003948else
Martin v. Löwis11437992002-04-12 09:54:03 +00003949 echo "$as_me: failed program was:" >&5
3950cat conftest.$ac_ext >&5
3951ac_header_compiler=no
3952fi
3953rm -f conftest.$ac_objext conftest.$ac_ext
3954echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3955echo "${ECHO_T}$ac_header_compiler" >&6
3956
3957# Is the header present?
3958echo "$as_me:$LINENO: checking $ac_header presence" >&5
3959echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3960cat >conftest.$ac_ext <<_ACEOF
3961#line $LINENO "configure"
3962#include "confdefs.h"
3963#include <$ac_header>
3964_ACEOF
3965if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3966 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3967 ac_status=$?
3968 egrep -v '^ *\+' conftest.er1 >conftest.err
3969 rm -f conftest.er1
3970 cat conftest.err >&5
3971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3972 (exit $ac_status); } >/dev/null; then
3973 if test -s conftest.err; then
3974 ac_cpp_err=$ac_c_preproc_warn_flag
3975 else
3976 ac_cpp_err=
3977 fi
3978else
3979 ac_cpp_err=yes
3980fi
3981if test -z "$ac_cpp_err"; then
3982 ac_header_preproc=yes
3983else
3984 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003985 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003986 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003987fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003988rm -f conftest.err conftest.$ac_ext
3989echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3990echo "${ECHO_T}$ac_header_preproc" >&6
3991
3992# So? What about this header?
3993case $ac_header_compiler:$ac_header_preproc in
3994 yes:no )
3995 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3996echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3997 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3998echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3999 no:yes )
4000 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4001echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4002 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4003echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4004 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4005echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4006esac
4007echo "$as_me:$LINENO: checking for $ac_header" >&5
4008echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4009if eval "test \"\${$as_ac_Header+set}\" = set"; then
4010 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004011else
Martin v. Löwis11437992002-04-12 09:54:03 +00004012 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004013fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004014echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4015echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4016
4017fi
4018if test `eval echo '${'$as_ac_Header'}'` = yes; then
4019 cat >>confdefs.h <<_ACEOF
4020#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4021_ACEOF
4022
4023fi
4024
Guido van Rossum627b2d71993-12-24 10:39:16 +00004025done
4026
Martin v. Löwis11437992002-04-12 09:54:03 +00004027
4028
4029
4030
4031
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004032ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004033for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4034 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4035echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4036echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4037if eval "test \"\${$as_ac_Header+set}\" = set"; then
4038 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004039else
Martin v. Löwis11437992002-04-12 09:54:03 +00004040 cat >conftest.$ac_ext <<_ACEOF
4041#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004042#include "confdefs.h"
4043#include <sys/types.h>
4044#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004045
4046#ifdef F77_DUMMY_MAIN
4047# ifdef __cplusplus
4048 extern "C"
4049# endif
4050 int F77_DUMMY_MAIN() { return 1; }
4051#endif
4052int
4053main ()
4054{
4055if ((DIR *) 0)
4056return 0;
4057 ;
4058 return 0;
4059}
4060_ACEOF
4061rm -f conftest.$ac_objext
4062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4063 (eval $ac_compile) 2>&5
4064 ac_status=$?
4065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4066 (exit $ac_status); } &&
4067 { ac_try='test -s conftest.$ac_objext'
4068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4069 (eval $ac_try) 2>&5
4070 ac_status=$?
4071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4072 (exit $ac_status); }; }; then
4073 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004074else
Martin v. Löwis11437992002-04-12 09:54:03 +00004075 echo "$as_me: failed program was:" >&5
4076cat conftest.$ac_ext >&5
4077eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004078fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004079rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004080fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004081echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4082echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4083if test `eval echo '${'$as_ac_Header'}'` = yes; then
4084 cat >>confdefs.h <<_ACEOF
4085#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4086_ACEOF
4087
4088ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004089fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004090
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004091done
4092# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4093if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004094 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4095echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4096if test "${ac_cv_search_opendir+set}" = set; then
4097 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004098else
Martin v. Löwis11437992002-04-12 09:54:03 +00004099 ac_func_search_save_LIBS=$LIBS
4100ac_cv_search_opendir=no
4101cat >conftest.$ac_ext <<_ACEOF
4102#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004103#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004104
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004105/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004106#ifdef __cplusplus
4107extern "C"
4108#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004109/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004110 builtin and then its argument prototype would still apply. */
4111char opendir ();
4112#ifdef F77_DUMMY_MAIN
4113# ifdef __cplusplus
4114 extern "C"
4115# endif
4116 int F77_DUMMY_MAIN() { return 1; }
4117#endif
4118int
4119main ()
4120{
4121opendir ();
4122 ;
4123 return 0;
4124}
4125_ACEOF
4126rm -f conftest.$ac_objext conftest$ac_exeext
4127if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4128 (eval $ac_link) 2>&5
4129 ac_status=$?
4130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4131 (exit $ac_status); } &&
4132 { ac_try='test -s conftest$ac_exeext'
4133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4134 (eval $ac_try) 2>&5
4135 ac_status=$?
4136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4137 (exit $ac_status); }; }; then
4138 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004139else
Martin v. Löwis11437992002-04-12 09:54:03 +00004140 echo "$as_me: failed program was:" >&5
4141cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004142fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004143rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4144if test "$ac_cv_search_opendir" = no; then
4145 for ac_lib in dir; do
4146 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4147 cat >conftest.$ac_ext <<_ACEOF
4148#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004149#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004151/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004152#ifdef __cplusplus
4153extern "C"
4154#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004155/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004156 builtin and then its argument prototype would still apply. */
4157char opendir ();
4158#ifdef F77_DUMMY_MAIN
4159# ifdef __cplusplus
4160 extern "C"
4161# endif
4162 int F77_DUMMY_MAIN() { return 1; }
4163#endif
4164int
4165main ()
4166{
4167opendir ();
4168 ;
4169 return 0;
4170}
4171_ACEOF
4172rm -f conftest.$ac_objext conftest$ac_exeext
4173if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4174 (eval $ac_link) 2>&5
4175 ac_status=$?
4176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4177 (exit $ac_status); } &&
4178 { ac_try='test -s conftest$ac_exeext'
4179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4180 (eval $ac_try) 2>&5
4181 ac_status=$?
4182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4183 (exit $ac_status); }; }; then
4184 ac_cv_search_opendir="-l$ac_lib"
4185break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004186else
Martin v. Löwis11437992002-04-12 09:54:03 +00004187 echo "$as_me: failed program was:" >&5
4188cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004189fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004190rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4191 done
4192fi
4193LIBS=$ac_func_search_save_LIBS
4194fi
4195echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4196echo "${ECHO_T}$ac_cv_search_opendir" >&6
4197if test "$ac_cv_search_opendir" != no; then
4198 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004199
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004200fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004201
Michael W. Hudson54241132001-12-07 15:38:26 +00004202else
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4204echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4205if test "${ac_cv_search_opendir+set}" = set; then
4206 echo $ECHO_N "(cached) $ECHO_C" >&6
4207else
4208 ac_func_search_save_LIBS=$LIBS
4209ac_cv_search_opendir=no
4210cat >conftest.$ac_ext <<_ACEOF
4211#line $LINENO "configure"
4212#include "confdefs.h"
4213
4214/* Override any gcc2 internal prototype to avoid an error. */
4215#ifdef __cplusplus
4216extern "C"
4217#endif
4218/* We use char because int might match the return type of a gcc2
4219 builtin and then its argument prototype would still apply. */
4220char opendir ();
4221#ifdef F77_DUMMY_MAIN
4222# ifdef __cplusplus
4223 extern "C"
4224# endif
4225 int F77_DUMMY_MAIN() { return 1; }
4226#endif
4227int
4228main ()
4229{
4230opendir ();
4231 ;
4232 return 0;
4233}
4234_ACEOF
4235rm -f conftest.$ac_objext conftest$ac_exeext
4236if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4237 (eval $ac_link) 2>&5
4238 ac_status=$?
4239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4240 (exit $ac_status); } &&
4241 { ac_try='test -s conftest$ac_exeext'
4242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4243 (eval $ac_try) 2>&5
4244 ac_status=$?
4245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4246 (exit $ac_status); }; }; then
4247 ac_cv_search_opendir="none required"
4248else
4249 echo "$as_me: failed program was:" >&5
4250cat conftest.$ac_ext >&5
4251fi
4252rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4253if test "$ac_cv_search_opendir" = no; then
4254 for ac_lib in x; do
4255 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4256 cat >conftest.$ac_ext <<_ACEOF
4257#line $LINENO "configure"
4258#include "confdefs.h"
4259
4260/* Override any gcc2 internal prototype to avoid an error. */
4261#ifdef __cplusplus
4262extern "C"
4263#endif
4264/* We use char because int might match the return type of a gcc2
4265 builtin and then its argument prototype would still apply. */
4266char opendir ();
4267#ifdef F77_DUMMY_MAIN
4268# ifdef __cplusplus
4269 extern "C"
4270# endif
4271 int F77_DUMMY_MAIN() { return 1; }
4272#endif
4273int
4274main ()
4275{
4276opendir ();
4277 ;
4278 return 0;
4279}
4280_ACEOF
4281rm -f conftest.$ac_objext conftest$ac_exeext
4282if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4283 (eval $ac_link) 2>&5
4284 ac_status=$?
4285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4286 (exit $ac_status); } &&
4287 { ac_try='test -s conftest$ac_exeext'
4288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4289 (eval $ac_try) 2>&5
4290 ac_status=$?
4291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4292 (exit $ac_status); }; }; then
4293 ac_cv_search_opendir="-l$ac_lib"
4294break
4295else
4296 echo "$as_me: failed program was:" >&5
4297cat conftest.$ac_ext >&5
4298fi
4299rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4300 done
4301fi
4302LIBS=$ac_func_search_save_LIBS
4303fi
4304echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4305echo "${ECHO_T}$ac_cv_search_opendir" >&6
4306if test "$ac_cv_search_opendir" != no; then
4307 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4308
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004309fi
4310
4311fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004312
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004313echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4314echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4315if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4316 echo $ECHO_N "(cached) $ECHO_C" >&6
4317else
4318 cat >conftest.$ac_ext <<_ACEOF
4319#line $LINENO "configure"
4320#include "confdefs.h"
4321#include <sys/types.h>
4322#ifdef F77_DUMMY_MAIN
4323# ifdef __cplusplus
4324 extern "C"
4325# endif
4326 int F77_DUMMY_MAIN() { return 1; }
4327#endif
4328int
4329main ()
4330{
4331return makedev(0, 0);
4332 ;
4333 return 0;
4334}
4335_ACEOF
4336rm -f conftest.$ac_objext conftest$ac_exeext
4337if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4338 (eval $ac_link) 2>&5
4339 ac_status=$?
4340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4341 (exit $ac_status); } &&
4342 { ac_try='test -s conftest$ac_exeext'
4343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4344 (eval $ac_try) 2>&5
4345 ac_status=$?
4346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4347 (exit $ac_status); }; }; then
4348 ac_cv_header_sys_types_h_makedev=yes
4349else
4350 echo "$as_me: failed program was:" >&5
4351cat conftest.$ac_ext >&5
4352ac_cv_header_sys_types_h_makedev=no
4353fi
4354rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4355
4356fi
4357echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4358echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4359
4360if test $ac_cv_header_sys_types_h_makedev = no; then
4361if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4362 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4363echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4364if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4365 echo $ECHO_N "(cached) $ECHO_C" >&6
4366fi
4367echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4368echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4369else
4370 # Is the header compilable?
4371echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4372echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4373cat >conftest.$ac_ext <<_ACEOF
4374#line $LINENO "configure"
4375#include "confdefs.h"
4376$ac_includes_default
4377#include <sys/mkdev.h>
4378_ACEOF
4379rm -f conftest.$ac_objext
4380if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4381 (eval $ac_compile) 2>&5
4382 ac_status=$?
4383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4384 (exit $ac_status); } &&
4385 { ac_try='test -s conftest.$ac_objext'
4386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4387 (eval $ac_try) 2>&5
4388 ac_status=$?
4389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4390 (exit $ac_status); }; }; then
4391 ac_header_compiler=yes
4392else
4393 echo "$as_me: failed program was:" >&5
4394cat conftest.$ac_ext >&5
4395ac_header_compiler=no
4396fi
4397rm -f conftest.$ac_objext conftest.$ac_ext
4398echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4399echo "${ECHO_T}$ac_header_compiler" >&6
4400
4401# Is the header present?
4402echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4403echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4404cat >conftest.$ac_ext <<_ACEOF
4405#line $LINENO "configure"
4406#include "confdefs.h"
4407#include <sys/mkdev.h>
4408_ACEOF
4409if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4410 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4411 ac_status=$?
4412 egrep -v '^ *\+' conftest.er1 >conftest.err
4413 rm -f conftest.er1
4414 cat conftest.err >&5
4415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4416 (exit $ac_status); } >/dev/null; then
4417 if test -s conftest.err; then
4418 ac_cpp_err=$ac_c_preproc_warn_flag
4419 else
4420 ac_cpp_err=
4421 fi
4422else
4423 ac_cpp_err=yes
4424fi
4425if test -z "$ac_cpp_err"; then
4426 ac_header_preproc=yes
4427else
4428 echo "$as_me: failed program was:" >&5
4429 cat conftest.$ac_ext >&5
4430 ac_header_preproc=no
4431fi
4432rm -f conftest.err conftest.$ac_ext
4433echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4434echo "${ECHO_T}$ac_header_preproc" >&6
4435
4436# So? What about this header?
4437case $ac_header_compiler:$ac_header_preproc in
4438 yes:no )
4439 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4440echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4441 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4442echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4443 no:yes )
4444 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4445echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4446 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4447echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4448 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4449echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4450esac
4451echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4452echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4453if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4454 echo $ECHO_N "(cached) $ECHO_C" >&6
4455else
4456 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4457fi
4458echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4459echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4460
4461fi
4462if test $ac_cv_header_sys_mkdev_h = yes; then
4463
4464cat >>confdefs.h <<\_ACEOF
4465#define MAJOR_IN_MKDEV 1
4466_ACEOF
4467
4468fi
4469
4470
4471
4472 if test $ac_cv_header_sys_mkdev_h = no; then
4473 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4474 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4475echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4476if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4477 echo $ECHO_N "(cached) $ECHO_C" >&6
4478fi
4479echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4480echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4481else
4482 # Is the header compilable?
4483echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4484echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4485cat >conftest.$ac_ext <<_ACEOF
4486#line $LINENO "configure"
4487#include "confdefs.h"
4488$ac_includes_default
4489#include <sys/sysmacros.h>
4490_ACEOF
4491rm -f conftest.$ac_objext
4492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4493 (eval $ac_compile) 2>&5
4494 ac_status=$?
4495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4496 (exit $ac_status); } &&
4497 { ac_try='test -s conftest.$ac_objext'
4498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4499 (eval $ac_try) 2>&5
4500 ac_status=$?
4501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4502 (exit $ac_status); }; }; then
4503 ac_header_compiler=yes
4504else
4505 echo "$as_me: failed program was:" >&5
4506cat conftest.$ac_ext >&5
4507ac_header_compiler=no
4508fi
4509rm -f conftest.$ac_objext conftest.$ac_ext
4510echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4511echo "${ECHO_T}$ac_header_compiler" >&6
4512
4513# Is the header present?
4514echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4515echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4516cat >conftest.$ac_ext <<_ACEOF
4517#line $LINENO "configure"
4518#include "confdefs.h"
4519#include <sys/sysmacros.h>
4520_ACEOF
4521if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4522 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4523 ac_status=$?
4524 egrep -v '^ *\+' conftest.er1 >conftest.err
4525 rm -f conftest.er1
4526 cat conftest.err >&5
4527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4528 (exit $ac_status); } >/dev/null; then
4529 if test -s conftest.err; then
4530 ac_cpp_err=$ac_c_preproc_warn_flag
4531 else
4532 ac_cpp_err=
4533 fi
4534else
4535 ac_cpp_err=yes
4536fi
4537if test -z "$ac_cpp_err"; then
4538 ac_header_preproc=yes
4539else
4540 echo "$as_me: failed program was:" >&5
4541 cat conftest.$ac_ext >&5
4542 ac_header_preproc=no
4543fi
4544rm -f conftest.err conftest.$ac_ext
4545echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4546echo "${ECHO_T}$ac_header_preproc" >&6
4547
4548# So? What about this header?
4549case $ac_header_compiler:$ac_header_preproc in
4550 yes:no )
4551 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4552echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4553 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4554echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4555 no:yes )
4556 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4557echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4558 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4559echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4560 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4561echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4562esac
4563echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4564echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4565if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4566 echo $ECHO_N "(cached) $ECHO_C" >&6
4567else
4568 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4569fi
4570echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4571echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4572
4573fi
4574if test $ac_cv_header_sys_sysmacros_h = yes; then
4575
4576cat >>confdefs.h <<\_ACEOF
4577#define MAJOR_IN_SYSMACROS 1
4578_ACEOF
4579
4580fi
4581
4582
4583 fi
4584fi
4585
Michael W. Hudson54241132001-12-07 15:38:26 +00004586
Guido van Rossum627b2d71993-12-24 10:39:16 +00004587# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004588was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004589echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4590echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4591cat >conftest.$ac_ext <<_ACEOF
4592#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004593#include "confdefs.h"
4594#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004595
4596_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004597if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4598 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004599 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004600else
Martin v. Löwis11437992002-04-12 09:54:03 +00004601
4602
4603cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004605_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004606
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004607
Guido van Rossum627b2d71993-12-24 10:39:16 +00004608fi
4609rm -f conftest*
4610
Martin v. Löwis11437992002-04-12 09:54:03 +00004611echo "$as_me:$LINENO: result: $was_it_defined" >&5
4612echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004613
Neal Norwitz11690112002-07-30 01:08:28 +00004614# Check whether using makedev requires defining _OSF_SOURCE
4615echo "$as_me:$LINENO: checking for makedev" >&5
4616echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4617cat >conftest.$ac_ext <<_ACEOF
4618#line $LINENO "configure"
4619#include "confdefs.h"
4620 #include <sys/types.h>
4621#ifdef F77_DUMMY_MAIN
4622# ifdef __cplusplus
4623 extern "C"
4624# endif
4625 int F77_DUMMY_MAIN() { return 1; }
4626#endif
4627int
4628main ()
4629{
4630 makedev(0, 0)
4631 ;
4632 return 0;
4633}
4634_ACEOF
4635rm -f conftest.$ac_objext conftest$ac_exeext
4636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4637 (eval $ac_link) 2>&5
4638 ac_status=$?
4639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4640 (exit $ac_status); } &&
4641 { ac_try='test -s conftest$ac_exeext'
4642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4643 (eval $ac_try) 2>&5
4644 ac_status=$?
4645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4646 (exit $ac_status); }; }; then
4647 ac_cv_has_makedev=yes
4648else
4649 echo "$as_me: failed program was:" >&5
4650cat conftest.$ac_ext >&5
4651ac_cv_has_makedev=no
4652fi
4653rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4654if test "$ac_cv_has_makedev" = "no"; then
4655 # we didn't link, try if _OSF_SOURCE will allow us to link
4656 cat >conftest.$ac_ext <<_ACEOF
4657#line $LINENO "configure"
4658#include "confdefs.h"
4659
4660 #define _OSF_SOURCE 1
4661 #include <sys/types.h>
4662
4663#ifdef F77_DUMMY_MAIN
4664# ifdef __cplusplus
4665 extern "C"
4666# endif
4667 int F77_DUMMY_MAIN() { return 1; }
4668#endif
4669int
4670main ()
4671{
4672 makedev(0, 0)
4673 ;
4674 return 0;
4675}
4676_ACEOF
4677rm -f conftest.$ac_objext conftest$ac_exeext
4678if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4679 (eval $ac_link) 2>&5
4680 ac_status=$?
4681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4682 (exit $ac_status); } &&
4683 { ac_try='test -s conftest$ac_exeext'
4684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4685 (eval $ac_try) 2>&5
4686 ac_status=$?
4687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4688 (exit $ac_status); }; }; then
4689 ac_cv_has_makedev=yes
4690else
4691 echo "$as_me: failed program was:" >&5
4692cat conftest.$ac_ext >&5
4693ac_cv_has_makedev=no
4694fi
4695rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4696 if test "$ac_cv_has_makedev" = "yes"; then
4697
4698cat >>confdefs.h <<\_ACEOF
4699#define _OSF_SOURCE 1
4700_ACEOF
4701
4702 fi
4703fi
4704echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4705echo "${ECHO_T}$ac_cv_has_makedev" >&6
4706if test "$ac_cv_has_makedev" = "yes"; then
4707
4708cat >>confdefs.h <<\_ACEOF
4709#define HAVE_MAKEDEV 1
4710_ACEOF
4711
4712fi
4713
Martin v. Löwis399a6892002-10-04 10:22:02 +00004714# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4715# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4716# defined, but the compiler does not support pragma redefine_extname,
4717# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4718# structures (such as rlimit64) without declaring them. As a
4719# work-around, disable LFS on such configurations
4720
4721use_lfs=yes
4722echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4723echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4724cat >conftest.$ac_ext <<_ACEOF
4725#line $LINENO "configure"
4726#include "confdefs.h"
4727
4728#define _LARGEFILE_SOURCE 1
4729#define _FILE_OFFSET_BITS 64
4730#include <sys/resource.h>
4731
4732#ifdef F77_DUMMY_MAIN
4733# ifdef __cplusplus
4734 extern "C"
4735# endif
4736 int F77_DUMMY_MAIN() { return 1; }
4737#endif
4738int
4739main ()
4740{
4741struct rlimit foo;
4742 ;
4743 return 0;
4744}
4745_ACEOF
4746rm -f conftest.$ac_objext
4747if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4748 (eval $ac_compile) 2>&5
4749 ac_status=$?
4750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4751 (exit $ac_status); } &&
4752 { ac_try='test -s conftest.$ac_objext'
4753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4754 (eval $ac_try) 2>&5
4755 ac_status=$?
4756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4757 (exit $ac_status); }; }; then
4758 sol_lfs_bug=no
4759else
4760 echo "$as_me: failed program was:" >&5
4761cat conftest.$ac_ext >&5
4762sol_lfs_bug=yes
4763fi
4764rm -f conftest.$ac_objext conftest.$ac_ext
4765echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4766echo "${ECHO_T}$sol_lfs_bug" >&6
4767if test "$sol_lfs_bug" = "yes"; then
4768 use_lfs=no
4769fi
4770
4771if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004772# Two defines needed to enable largefile support on various platforms
4773# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004774
Martin v. Löwis11437992002-04-12 09:54:03 +00004775cat >>confdefs.h <<\_ACEOF
4776#define _LARGEFILE_SOURCE 1
4777_ACEOF
4778
4779
4780cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004781#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004782_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004783
Martin v. Löwis399a6892002-10-04 10:22:02 +00004784fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004785
Guido van Rossum84e7b241996-08-19 21:59:00 +00004786# Add some code to confdefs.h so that the test for off_t works on SCO
4787cat >> confdefs.h <<\EOF
4788#if defined(SCO_DS)
4789#undef _OFF_T
4790#endif
4791EOF
4792
Guido van Rossumef2255b2000-03-10 22:30:29 +00004793# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004794echo "$as_me:$LINENO: checking for mode_t" >&5
4795echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4796if test "${ac_cv_type_mode_t+set}" = set; then
4797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004798else
Martin v. Löwis11437992002-04-12 09:54:03 +00004799 cat >conftest.$ac_ext <<_ACEOF
4800#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004801#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004802$ac_includes_default
4803#ifdef F77_DUMMY_MAIN
4804# ifdef __cplusplus
4805 extern "C"
4806# endif
4807 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004809int
4810main ()
4811{
4812if ((mode_t *) 0)
4813 return 0;
4814if (sizeof (mode_t))
4815 return 0;
4816 ;
4817 return 0;
4818}
4819_ACEOF
4820rm -f conftest.$ac_objext
4821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4822 (eval $ac_compile) 2>&5
4823 ac_status=$?
4824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4825 (exit $ac_status); } &&
4826 { ac_try='test -s conftest.$ac_objext'
4827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4828 (eval $ac_try) 2>&5
4829 ac_status=$?
4830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4831 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004832 ac_cv_type_mode_t=yes
4833else
Martin v. Löwis11437992002-04-12 09:54:03 +00004834 echo "$as_me: failed program was:" >&5
4835cat conftest.$ac_ext >&5
4836ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004837fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004838rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004839fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004840echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4841echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4842if test $ac_cv_type_mode_t = yes; then
4843 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004844else
Martin v. Löwis11437992002-04-12 09:54:03 +00004845
4846cat >>confdefs.h <<_ACEOF
4847#define mode_t int
4848_ACEOF
4849
4850fi
4851
4852echo "$as_me:$LINENO: checking for off_t" >&5
4853echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4854if test "${ac_cv_type_off_t+set}" = set; then
4855 echo $ECHO_N "(cached) $ECHO_C" >&6
4856else
4857 cat >conftest.$ac_ext <<_ACEOF
4858#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004859#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004860$ac_includes_default
4861#ifdef F77_DUMMY_MAIN
4862# ifdef __cplusplus
4863 extern "C"
4864# endif
4865 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004867int
4868main ()
4869{
4870if ((off_t *) 0)
4871 return 0;
4872if (sizeof (off_t))
4873 return 0;
4874 ;
4875 return 0;
4876}
4877_ACEOF
4878rm -f conftest.$ac_objext
4879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4880 (eval $ac_compile) 2>&5
4881 ac_status=$?
4882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4883 (exit $ac_status); } &&
4884 { ac_try='test -s conftest.$ac_objext'
4885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4886 (eval $ac_try) 2>&5
4887 ac_status=$?
4888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4889 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004890 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004891else
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 echo "$as_me: failed program was:" >&5
4893cat conftest.$ac_ext >&5
4894ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004895fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004896rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004897fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004898echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4899echo "${ECHO_T}$ac_cv_type_off_t" >&6
4900if test $ac_cv_type_off_t = yes; then
4901 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004902else
Martin v. Löwis11437992002-04-12 09:54:03 +00004903
4904cat >>confdefs.h <<_ACEOF
4905#define off_t long
4906_ACEOF
4907
4908fi
4909
4910echo "$as_me:$LINENO: checking for pid_t" >&5
4911echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4912if test "${ac_cv_type_pid_t+set}" = set; then
4913 echo $ECHO_N "(cached) $ECHO_C" >&6
4914else
4915 cat >conftest.$ac_ext <<_ACEOF
4916#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004917#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004918$ac_includes_default
4919#ifdef F77_DUMMY_MAIN
4920# ifdef __cplusplus
4921 extern "C"
4922# endif
4923 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004925int
4926main ()
4927{
4928if ((pid_t *) 0)
4929 return 0;
4930if (sizeof (pid_t))
4931 return 0;
4932 ;
4933 return 0;
4934}
4935_ACEOF
4936rm -f conftest.$ac_objext
4937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4938 (eval $ac_compile) 2>&5
4939 ac_status=$?
4940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4941 (exit $ac_status); } &&
4942 { ac_try='test -s conftest.$ac_objext'
4943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4944 (eval $ac_try) 2>&5
4945 ac_status=$?
4946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4947 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004948 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004949else
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 echo "$as_me: failed program was:" >&5
4951cat conftest.$ac_ext >&5
4952ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004953fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004954rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004955fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004956echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4957echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4958if test $ac_cv_type_pid_t = yes; then
4959 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004960else
Martin v. Löwis11437992002-04-12 09:54:03 +00004961
4962cat >>confdefs.h <<_ACEOF
4963#define pid_t int
4964_ACEOF
4965
4966fi
4967
4968echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4969echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4970if test "${ac_cv_type_signal+set}" = set; then
4971 echo $ECHO_N "(cached) $ECHO_C" >&6
4972else
4973 cat >conftest.$ac_ext <<_ACEOF
4974#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004975#include "confdefs.h"
4976#include <sys/types.h>
4977#include <signal.h>
4978#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004979# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004980#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004981#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004982extern "C" void (*signal (int, void (*)(int)))(int);
4983#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004984void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004985#endif
4986
Martin v. Löwis11437992002-04-12 09:54:03 +00004987#ifdef F77_DUMMY_MAIN
4988# ifdef __cplusplus
4989 extern "C"
4990# endif
4991 int F77_DUMMY_MAIN() { return 1; }
4992#endif
4993int
4994main ()
4995{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004996int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004997 ;
4998 return 0;
4999}
5000_ACEOF
5001rm -f conftest.$ac_objext
5002if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5003 (eval $ac_compile) 2>&5
5004 ac_status=$?
5005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5006 (exit $ac_status); } &&
5007 { ac_try='test -s conftest.$ac_objext'
5008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5009 (eval $ac_try) 2>&5
5010 ac_status=$?
5011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5012 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005013 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005014else
Martin v. Löwis11437992002-04-12 09:54:03 +00005015 echo "$as_me: failed program was:" >&5
5016cat conftest.$ac_ext >&5
5017ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005018fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005019rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005020fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005021echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5022echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005023
Martin v. Löwis11437992002-04-12 09:54:03 +00005024cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005025#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005026_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005027
Michael W. Hudson54241132001-12-07 15:38:26 +00005028
Martin v. Löwis11437992002-04-12 09:54:03 +00005029echo "$as_me:$LINENO: checking for size_t" >&5
5030echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5031if test "${ac_cv_type_size_t+set}" = set; then
5032 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005033else
Martin v. Löwis11437992002-04-12 09:54:03 +00005034 cat >conftest.$ac_ext <<_ACEOF
5035#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005036#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005037$ac_includes_default
5038#ifdef F77_DUMMY_MAIN
5039# ifdef __cplusplus
5040 extern "C"
5041# endif
5042 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005044int
5045main ()
5046{
5047if ((size_t *) 0)
5048 return 0;
5049if (sizeof (size_t))
5050 return 0;
5051 ;
5052 return 0;
5053}
5054_ACEOF
5055rm -f conftest.$ac_objext
5056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5057 (eval $ac_compile) 2>&5
5058 ac_status=$?
5059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5060 (exit $ac_status); } &&
5061 { ac_try='test -s conftest.$ac_objext'
5062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5063 (eval $ac_try) 2>&5
5064 ac_status=$?
5065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5066 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005067 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005068else
Martin v. Löwis11437992002-04-12 09:54:03 +00005069 echo "$as_me: failed program was:" >&5
5070cat conftest.$ac_ext >&5
5071ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005072fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005073rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005074fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005075echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5076echo "${ECHO_T}$ac_cv_type_size_t" >&6
5077if test $ac_cv_type_size_t = yes; then
5078 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005079else
Martin v. Löwis11437992002-04-12 09:54:03 +00005080
5081cat >>confdefs.h <<_ACEOF
5082#define size_t unsigned
5083_ACEOF
5084
5085fi
5086
5087echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5088echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5089if test "${ac_cv_type_uid_t+set}" = set; then
5090 echo $ECHO_N "(cached) $ECHO_C" >&6
5091else
5092 cat >conftest.$ac_ext <<_ACEOF
5093#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005094#include "confdefs.h"
5095#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005096
5097_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5099 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005100 ac_cv_type_uid_t=yes
5101else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005102 ac_cv_type_uid_t=no
5103fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005104rm -f conftest*
5105
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005106fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005107echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5108echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005109if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005110
Martin v. Löwis11437992002-04-12 09:54:03 +00005111cat >>confdefs.h <<\_ACEOF
5112#define uid_t int
5113_ACEOF
5114
5115
5116cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005117#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005118_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005119
5120fi
5121
Jack Jansendd19cf82001-12-06 22:36:17 +00005122
Michael W. Hudson54241132001-12-07 15:38:26 +00005123# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005124echo "$as_me:$LINENO: checking for int" >&5
5125echo $ECHO_N "checking for int... $ECHO_C" >&6
5126if test "${ac_cv_type_int+set}" = set; then
5127 echo $ECHO_N "(cached) $ECHO_C" >&6
5128else
5129 cat >conftest.$ac_ext <<_ACEOF
5130#line $LINENO "configure"
5131#include "confdefs.h"
5132$ac_includes_default
5133#ifdef F77_DUMMY_MAIN
5134# ifdef __cplusplus
5135 extern "C"
5136# endif
5137 int F77_DUMMY_MAIN() { return 1; }
5138#endif
5139int
5140main ()
5141{
5142if ((int *) 0)
5143 return 0;
5144if (sizeof (int))
5145 return 0;
5146 ;
5147 return 0;
5148}
5149_ACEOF
5150rm -f conftest.$ac_objext
5151if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5152 (eval $ac_compile) 2>&5
5153 ac_status=$?
5154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5155 (exit $ac_status); } &&
5156 { ac_try='test -s conftest.$ac_objext'
5157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5158 (eval $ac_try) 2>&5
5159 ac_status=$?
5160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5161 (exit $ac_status); }; }; then
5162 ac_cv_type_int=yes
5163else
5164 echo "$as_me: failed program was:" >&5
5165cat conftest.$ac_ext >&5
5166ac_cv_type_int=no
5167fi
5168rm -f conftest.$ac_objext conftest.$ac_ext
5169fi
5170echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5171echo "${ECHO_T}$ac_cv_type_int" >&6
5172
5173echo "$as_me:$LINENO: checking size of int" >&5
5174echo $ECHO_N "checking size of int... $ECHO_C" >&6
5175if test "${ac_cv_sizeof_int+set}" = set; then
5176 echo $ECHO_N "(cached) $ECHO_C" >&6
5177else
5178 if test "$ac_cv_type_int" = yes; then
5179 # The cast to unsigned long works around a bug in the HP C Compiler
5180 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5181 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5182 # This bug is HP SR number 8606223364.
5183 if test "$cross_compiling" = yes; then
5184 # Depending upon the size, compute the lo and hi bounds.
5185cat >conftest.$ac_ext <<_ACEOF
5186#line $LINENO "configure"
5187#include "confdefs.h"
5188$ac_includes_default
5189#ifdef F77_DUMMY_MAIN
5190# ifdef __cplusplus
5191 extern "C"
5192# endif
5193 int F77_DUMMY_MAIN() { return 1; }
5194#endif
5195int
5196main ()
5197{
5198static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5199test_array [0] = 0
5200
5201 ;
5202 return 0;
5203}
5204_ACEOF
5205rm -f conftest.$ac_objext
5206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5207 (eval $ac_compile) 2>&5
5208 ac_status=$?
5209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5210 (exit $ac_status); } &&
5211 { ac_try='test -s conftest.$ac_objext'
5212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5213 (eval $ac_try) 2>&5
5214 ac_status=$?
5215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5216 (exit $ac_status); }; }; then
5217 ac_lo=0 ac_mid=0
5218 while :; do
5219 cat >conftest.$ac_ext <<_ACEOF
5220#line $LINENO "configure"
5221#include "confdefs.h"
5222$ac_includes_default
5223#ifdef F77_DUMMY_MAIN
5224# ifdef __cplusplus
5225 extern "C"
5226# endif
5227 int F77_DUMMY_MAIN() { return 1; }
5228#endif
5229int
5230main ()
5231{
5232static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5233test_array [0] = 0
5234
5235 ;
5236 return 0;
5237}
5238_ACEOF
5239rm -f conftest.$ac_objext
5240if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5241 (eval $ac_compile) 2>&5
5242 ac_status=$?
5243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5244 (exit $ac_status); } &&
5245 { ac_try='test -s conftest.$ac_objext'
5246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5247 (eval $ac_try) 2>&5
5248 ac_status=$?
5249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5250 (exit $ac_status); }; }; then
5251 ac_hi=$ac_mid; break
5252else
5253 echo "$as_me: failed program was:" >&5
5254cat conftest.$ac_ext >&5
5255ac_lo=`expr $ac_mid + 1`
5256 if test $ac_lo -le $ac_mid; then
5257 ac_lo= ac_hi=
5258 break
5259 fi
5260 ac_mid=`expr 2 '*' $ac_mid + 1`
5261fi
5262rm -f conftest.$ac_objext conftest.$ac_ext
5263 done
5264else
5265 echo "$as_me: failed program was:" >&5
5266cat conftest.$ac_ext >&5
5267cat >conftest.$ac_ext <<_ACEOF
5268#line $LINENO "configure"
5269#include "confdefs.h"
5270$ac_includes_default
5271#ifdef F77_DUMMY_MAIN
5272# ifdef __cplusplus
5273 extern "C"
5274# endif
5275 int F77_DUMMY_MAIN() { return 1; }
5276#endif
5277int
5278main ()
5279{
5280static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5281test_array [0] = 0
5282
5283 ;
5284 return 0;
5285}
5286_ACEOF
5287rm -f conftest.$ac_objext
5288if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5289 (eval $ac_compile) 2>&5
5290 ac_status=$?
5291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5292 (exit $ac_status); } &&
5293 { ac_try='test -s conftest.$ac_objext'
5294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5295 (eval $ac_try) 2>&5
5296 ac_status=$?
5297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5298 (exit $ac_status); }; }; then
5299 ac_hi=-1 ac_mid=-1
5300 while :; do
5301 cat >conftest.$ac_ext <<_ACEOF
5302#line $LINENO "configure"
5303#include "confdefs.h"
5304$ac_includes_default
5305#ifdef F77_DUMMY_MAIN
5306# ifdef __cplusplus
5307 extern "C"
5308# endif
5309 int F77_DUMMY_MAIN() { return 1; }
5310#endif
5311int
5312main ()
5313{
5314static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5315test_array [0] = 0
5316
5317 ;
5318 return 0;
5319}
5320_ACEOF
5321rm -f conftest.$ac_objext
5322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5323 (eval $ac_compile) 2>&5
5324 ac_status=$?
5325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5326 (exit $ac_status); } &&
5327 { ac_try='test -s conftest.$ac_objext'
5328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5329 (eval $ac_try) 2>&5
5330 ac_status=$?
5331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5332 (exit $ac_status); }; }; then
5333 ac_lo=$ac_mid; break
5334else
5335 echo "$as_me: failed program was:" >&5
5336cat conftest.$ac_ext >&5
5337ac_hi=`expr '(' $ac_mid ')' - 1`
5338 if test $ac_mid -le $ac_hi; then
5339 ac_lo= ac_hi=
5340 break
5341 fi
5342 ac_mid=`expr 2 '*' $ac_mid`
5343fi
5344rm -f conftest.$ac_objext conftest.$ac_ext
5345 done
5346else
5347 echo "$as_me: failed program was:" >&5
5348cat conftest.$ac_ext >&5
5349ac_lo= ac_hi=
5350fi
5351rm -f conftest.$ac_objext conftest.$ac_ext
5352fi
5353rm -f conftest.$ac_objext conftest.$ac_ext
5354# Binary search between lo and hi bounds.
5355while test "x$ac_lo" != "x$ac_hi"; do
5356 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5357 cat >conftest.$ac_ext <<_ACEOF
5358#line $LINENO "configure"
5359#include "confdefs.h"
5360$ac_includes_default
5361#ifdef F77_DUMMY_MAIN
5362# ifdef __cplusplus
5363 extern "C"
5364# endif
5365 int F77_DUMMY_MAIN() { return 1; }
5366#endif
5367int
5368main ()
5369{
5370static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5371test_array [0] = 0
5372
5373 ;
5374 return 0;
5375}
5376_ACEOF
5377rm -f conftest.$ac_objext
5378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5379 (eval $ac_compile) 2>&5
5380 ac_status=$?
5381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5382 (exit $ac_status); } &&
5383 { ac_try='test -s conftest.$ac_objext'
5384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5385 (eval $ac_try) 2>&5
5386 ac_status=$?
5387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5388 (exit $ac_status); }; }; then
5389 ac_hi=$ac_mid
5390else
5391 echo "$as_me: failed program was:" >&5
5392cat conftest.$ac_ext >&5
5393ac_lo=`expr '(' $ac_mid ')' + 1`
5394fi
5395rm -f conftest.$ac_objext conftest.$ac_ext
5396done
5397case $ac_lo in
5398?*) ac_cv_sizeof_int=$ac_lo;;
5399'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5400echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5401 { (exit 1); exit 1; }; } ;;
5402esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005403else
5404 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005405 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5406echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5407 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005408else
Martin v. Löwis11437992002-04-12 09:54:03 +00005409 cat >conftest.$ac_ext <<_ACEOF
5410#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005411#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005412$ac_includes_default
5413long longval () { return (long) (sizeof (int)); }
5414unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005415#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005416#include <stdlib.h>
5417#ifdef F77_DUMMY_MAIN
5418# ifdef __cplusplus
5419 extern "C"
5420# endif
5421 int F77_DUMMY_MAIN() { return 1; }
5422#endif
5423int
5424main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005425{
Martin v. Löwis11437992002-04-12 09:54:03 +00005426
5427 FILE *f = fopen ("conftest.val", "w");
5428 if (! f)
5429 exit (1);
5430 if (((long) (sizeof (int))) < 0)
5431 {
5432 long i = longval ();
5433 if (i != ((long) (sizeof (int))))
5434 exit (1);
5435 fprintf (f, "%ld\n", i);
5436 }
5437 else
5438 {
5439 unsigned long i = ulongval ();
5440 if (i != ((long) (sizeof (int))))
5441 exit (1);
5442 fprintf (f, "%lu\n", i);
5443 }
5444 exit (ferror (f) || fclose (f) != 0);
5445
5446 ;
5447 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005448}
Martin v. Löwis11437992002-04-12 09:54:03 +00005449_ACEOF
5450rm -f conftest$ac_exeext
5451if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5452 (eval $ac_link) 2>&5
5453 ac_status=$?
5454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5455 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5457 (eval $ac_try) 2>&5
5458 ac_status=$?
5459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5460 (exit $ac_status); }; }; then
5461 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005462else
Martin v. Löwis11437992002-04-12 09:54:03 +00005463 echo "$as_me: program exited with status $ac_status" >&5
5464echo "$as_me: failed program was:" >&5
5465cat conftest.$ac_ext >&5
5466( exit $ac_status )
5467{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5468echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5469 { (exit 1); exit 1; }; }
5470fi
5471rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5472fi
5473fi
5474rm -f conftest.val
5475else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005476 ac_cv_sizeof_int=0
5477fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005479echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5480echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5481cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005482#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005483_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005484
5485
Martin v. Löwis11437992002-04-12 09:54:03 +00005486echo "$as_me:$LINENO: checking for long" >&5
5487echo $ECHO_N "checking for long... $ECHO_C" >&6
5488if test "${ac_cv_type_long+set}" = set; then
5489 echo $ECHO_N "(cached) $ECHO_C" >&6
5490else
5491 cat >conftest.$ac_ext <<_ACEOF
5492#line $LINENO "configure"
5493#include "confdefs.h"
5494$ac_includes_default
5495#ifdef F77_DUMMY_MAIN
5496# ifdef __cplusplus
5497 extern "C"
5498# endif
5499 int F77_DUMMY_MAIN() { return 1; }
5500#endif
5501int
5502main ()
5503{
5504if ((long *) 0)
5505 return 0;
5506if (sizeof (long))
5507 return 0;
5508 ;
5509 return 0;
5510}
5511_ACEOF
5512rm -f conftest.$ac_objext
5513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5514 (eval $ac_compile) 2>&5
5515 ac_status=$?
5516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5517 (exit $ac_status); } &&
5518 { ac_try='test -s conftest.$ac_objext'
5519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5520 (eval $ac_try) 2>&5
5521 ac_status=$?
5522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5523 (exit $ac_status); }; }; then
5524 ac_cv_type_long=yes
5525else
5526 echo "$as_me: failed program was:" >&5
5527cat conftest.$ac_ext >&5
5528ac_cv_type_long=no
5529fi
5530rm -f conftest.$ac_objext conftest.$ac_ext
5531fi
5532echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5533echo "${ECHO_T}$ac_cv_type_long" >&6
5534
5535echo "$as_me:$LINENO: checking size of long" >&5
5536echo $ECHO_N "checking size of long... $ECHO_C" >&6
5537if test "${ac_cv_sizeof_long+set}" = set; then
5538 echo $ECHO_N "(cached) $ECHO_C" >&6
5539else
5540 if test "$ac_cv_type_long" = yes; then
5541 # The cast to unsigned long works around a bug in the HP C Compiler
5542 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5543 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5544 # This bug is HP SR number 8606223364.
5545 if test "$cross_compiling" = yes; then
5546 # Depending upon the size, compute the lo and hi bounds.
5547cat >conftest.$ac_ext <<_ACEOF
5548#line $LINENO "configure"
5549#include "confdefs.h"
5550$ac_includes_default
5551#ifdef F77_DUMMY_MAIN
5552# ifdef __cplusplus
5553 extern "C"
5554# endif
5555 int F77_DUMMY_MAIN() { return 1; }
5556#endif
5557int
5558main ()
5559{
5560static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5561test_array [0] = 0
5562
5563 ;
5564 return 0;
5565}
5566_ACEOF
5567rm -f conftest.$ac_objext
5568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5569 (eval $ac_compile) 2>&5
5570 ac_status=$?
5571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5572 (exit $ac_status); } &&
5573 { ac_try='test -s conftest.$ac_objext'
5574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5575 (eval $ac_try) 2>&5
5576 ac_status=$?
5577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5578 (exit $ac_status); }; }; then
5579 ac_lo=0 ac_mid=0
5580 while :; do
5581 cat >conftest.$ac_ext <<_ACEOF
5582#line $LINENO "configure"
5583#include "confdefs.h"
5584$ac_includes_default
5585#ifdef F77_DUMMY_MAIN
5586# ifdef __cplusplus
5587 extern "C"
5588# endif
5589 int F77_DUMMY_MAIN() { return 1; }
5590#endif
5591int
5592main ()
5593{
5594static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5595test_array [0] = 0
5596
5597 ;
5598 return 0;
5599}
5600_ACEOF
5601rm -f conftest.$ac_objext
5602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5603 (eval $ac_compile) 2>&5
5604 ac_status=$?
5605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5606 (exit $ac_status); } &&
5607 { ac_try='test -s conftest.$ac_objext'
5608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5609 (eval $ac_try) 2>&5
5610 ac_status=$?
5611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5612 (exit $ac_status); }; }; then
5613 ac_hi=$ac_mid; break
5614else
5615 echo "$as_me: failed program was:" >&5
5616cat conftest.$ac_ext >&5
5617ac_lo=`expr $ac_mid + 1`
5618 if test $ac_lo -le $ac_mid; then
5619 ac_lo= ac_hi=
5620 break
5621 fi
5622 ac_mid=`expr 2 '*' $ac_mid + 1`
5623fi
5624rm -f conftest.$ac_objext conftest.$ac_ext
5625 done
5626else
5627 echo "$as_me: failed program was:" >&5
5628cat conftest.$ac_ext >&5
5629cat >conftest.$ac_ext <<_ACEOF
5630#line $LINENO "configure"
5631#include "confdefs.h"
5632$ac_includes_default
5633#ifdef F77_DUMMY_MAIN
5634# ifdef __cplusplus
5635 extern "C"
5636# endif
5637 int F77_DUMMY_MAIN() { return 1; }
5638#endif
5639int
5640main ()
5641{
5642static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5643test_array [0] = 0
5644
5645 ;
5646 return 0;
5647}
5648_ACEOF
5649rm -f conftest.$ac_objext
5650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5651 (eval $ac_compile) 2>&5
5652 ac_status=$?
5653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5654 (exit $ac_status); } &&
5655 { ac_try='test -s conftest.$ac_objext'
5656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5657 (eval $ac_try) 2>&5
5658 ac_status=$?
5659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5660 (exit $ac_status); }; }; then
5661 ac_hi=-1 ac_mid=-1
5662 while :; do
5663 cat >conftest.$ac_ext <<_ACEOF
5664#line $LINENO "configure"
5665#include "confdefs.h"
5666$ac_includes_default
5667#ifdef F77_DUMMY_MAIN
5668# ifdef __cplusplus
5669 extern "C"
5670# endif
5671 int F77_DUMMY_MAIN() { return 1; }
5672#endif
5673int
5674main ()
5675{
5676static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5677test_array [0] = 0
5678
5679 ;
5680 return 0;
5681}
5682_ACEOF
5683rm -f conftest.$ac_objext
5684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5685 (eval $ac_compile) 2>&5
5686 ac_status=$?
5687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5688 (exit $ac_status); } &&
5689 { ac_try='test -s conftest.$ac_objext'
5690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5691 (eval $ac_try) 2>&5
5692 ac_status=$?
5693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5694 (exit $ac_status); }; }; then
5695 ac_lo=$ac_mid; break
5696else
5697 echo "$as_me: failed program was:" >&5
5698cat conftest.$ac_ext >&5
5699ac_hi=`expr '(' $ac_mid ')' - 1`
5700 if test $ac_mid -le $ac_hi; then
5701 ac_lo= ac_hi=
5702 break
5703 fi
5704 ac_mid=`expr 2 '*' $ac_mid`
5705fi
5706rm -f conftest.$ac_objext conftest.$ac_ext
5707 done
5708else
5709 echo "$as_me: failed program was:" >&5
5710cat conftest.$ac_ext >&5
5711ac_lo= ac_hi=
5712fi
5713rm -f conftest.$ac_objext conftest.$ac_ext
5714fi
5715rm -f conftest.$ac_objext conftest.$ac_ext
5716# Binary search between lo and hi bounds.
5717while test "x$ac_lo" != "x$ac_hi"; do
5718 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5719 cat >conftest.$ac_ext <<_ACEOF
5720#line $LINENO "configure"
5721#include "confdefs.h"
5722$ac_includes_default
5723#ifdef F77_DUMMY_MAIN
5724# ifdef __cplusplus
5725 extern "C"
5726# endif
5727 int F77_DUMMY_MAIN() { return 1; }
5728#endif
5729int
5730main ()
5731{
5732static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5733test_array [0] = 0
5734
5735 ;
5736 return 0;
5737}
5738_ACEOF
5739rm -f conftest.$ac_objext
5740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5741 (eval $ac_compile) 2>&5
5742 ac_status=$?
5743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744 (exit $ac_status); } &&
5745 { ac_try='test -s conftest.$ac_objext'
5746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5747 (eval $ac_try) 2>&5
5748 ac_status=$?
5749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5750 (exit $ac_status); }; }; then
5751 ac_hi=$ac_mid
5752else
5753 echo "$as_me: failed program was:" >&5
5754cat conftest.$ac_ext >&5
5755ac_lo=`expr '(' $ac_mid ')' + 1`
5756fi
5757rm -f conftest.$ac_objext conftest.$ac_ext
5758done
5759case $ac_lo in
5760?*) ac_cv_sizeof_long=$ac_lo;;
5761'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5762echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5763 { (exit 1); exit 1; }; } ;;
5764esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005765else
5766 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005767 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5768echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5769 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005770else
Martin v. Löwis11437992002-04-12 09:54:03 +00005771 cat >conftest.$ac_ext <<_ACEOF
5772#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005773#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005774$ac_includes_default
5775long longval () { return (long) (sizeof (long)); }
5776unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005777#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005778#include <stdlib.h>
5779#ifdef F77_DUMMY_MAIN
5780# ifdef __cplusplus
5781 extern "C"
5782# endif
5783 int F77_DUMMY_MAIN() { return 1; }
5784#endif
5785int
5786main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005787{
Martin v. Löwis11437992002-04-12 09:54:03 +00005788
5789 FILE *f = fopen ("conftest.val", "w");
5790 if (! f)
5791 exit (1);
5792 if (((long) (sizeof (long))) < 0)
5793 {
5794 long i = longval ();
5795 if (i != ((long) (sizeof (long))))
5796 exit (1);
5797 fprintf (f, "%ld\n", i);
5798 }
5799 else
5800 {
5801 unsigned long i = ulongval ();
5802 if (i != ((long) (sizeof (long))))
5803 exit (1);
5804 fprintf (f, "%lu\n", i);
5805 }
5806 exit (ferror (f) || fclose (f) != 0);
5807
5808 ;
5809 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005810}
Martin v. Löwis11437992002-04-12 09:54:03 +00005811_ACEOF
5812rm -f conftest$ac_exeext
5813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5814 (eval $ac_link) 2>&5
5815 ac_status=$?
5816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5817 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5819 (eval $ac_try) 2>&5
5820 ac_status=$?
5821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5822 (exit $ac_status); }; }; then
5823 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005824else
Martin v. Löwis11437992002-04-12 09:54:03 +00005825 echo "$as_me: program exited with status $ac_status" >&5
5826echo "$as_me: failed program was:" >&5
5827cat conftest.$ac_ext >&5
5828( exit $ac_status )
5829{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5830echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5831 { (exit 1); exit 1; }; }
5832fi
5833rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5834fi
5835fi
5836rm -f conftest.val
5837else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005838 ac_cv_sizeof_long=0
5839fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005840fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005841echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5842echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5843cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005844#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005845_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005846
5847
Martin v. Löwis11437992002-04-12 09:54:03 +00005848echo "$as_me:$LINENO: checking for void *" >&5
5849echo $ECHO_N "checking for void *... $ECHO_C" >&6
5850if test "${ac_cv_type_void_p+set}" = set; then
5851 echo $ECHO_N "(cached) $ECHO_C" >&6
5852else
5853 cat >conftest.$ac_ext <<_ACEOF
5854#line $LINENO "configure"
5855#include "confdefs.h"
5856$ac_includes_default
5857#ifdef F77_DUMMY_MAIN
5858# ifdef __cplusplus
5859 extern "C"
5860# endif
5861 int F77_DUMMY_MAIN() { return 1; }
5862#endif
5863int
5864main ()
5865{
5866if ((void * *) 0)
5867 return 0;
5868if (sizeof (void *))
5869 return 0;
5870 ;
5871 return 0;
5872}
5873_ACEOF
5874rm -f conftest.$ac_objext
5875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5876 (eval $ac_compile) 2>&5
5877 ac_status=$?
5878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5879 (exit $ac_status); } &&
5880 { ac_try='test -s conftest.$ac_objext'
5881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5882 (eval $ac_try) 2>&5
5883 ac_status=$?
5884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5885 (exit $ac_status); }; }; then
5886 ac_cv_type_void_p=yes
5887else
5888 echo "$as_me: failed program was:" >&5
5889cat conftest.$ac_ext >&5
5890ac_cv_type_void_p=no
5891fi
5892rm -f conftest.$ac_objext conftest.$ac_ext
5893fi
5894echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5895echo "${ECHO_T}$ac_cv_type_void_p" >&6
5896
5897echo "$as_me:$LINENO: checking size of void *" >&5
5898echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5899if test "${ac_cv_sizeof_void_p+set}" = set; then
5900 echo $ECHO_N "(cached) $ECHO_C" >&6
5901else
5902 if test "$ac_cv_type_void_p" = yes; then
5903 # The cast to unsigned long works around a bug in the HP C Compiler
5904 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5905 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5906 # This bug is HP SR number 8606223364.
5907 if test "$cross_compiling" = yes; then
5908 # Depending upon the size, compute the lo and hi bounds.
5909cat >conftest.$ac_ext <<_ACEOF
5910#line $LINENO "configure"
5911#include "confdefs.h"
5912$ac_includes_default
5913#ifdef F77_DUMMY_MAIN
5914# ifdef __cplusplus
5915 extern "C"
5916# endif
5917 int F77_DUMMY_MAIN() { return 1; }
5918#endif
5919int
5920main ()
5921{
5922static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5923test_array [0] = 0
5924
5925 ;
5926 return 0;
5927}
5928_ACEOF
5929rm -f conftest.$ac_objext
5930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5931 (eval $ac_compile) 2>&5
5932 ac_status=$?
5933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5934 (exit $ac_status); } &&
5935 { ac_try='test -s conftest.$ac_objext'
5936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5937 (eval $ac_try) 2>&5
5938 ac_status=$?
5939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5940 (exit $ac_status); }; }; then
5941 ac_lo=0 ac_mid=0
5942 while :; do
5943 cat >conftest.$ac_ext <<_ACEOF
5944#line $LINENO "configure"
5945#include "confdefs.h"
5946$ac_includes_default
5947#ifdef F77_DUMMY_MAIN
5948# ifdef __cplusplus
5949 extern "C"
5950# endif
5951 int F77_DUMMY_MAIN() { return 1; }
5952#endif
5953int
5954main ()
5955{
5956static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5957test_array [0] = 0
5958
5959 ;
5960 return 0;
5961}
5962_ACEOF
5963rm -f conftest.$ac_objext
5964if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5965 (eval $ac_compile) 2>&5
5966 ac_status=$?
5967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5968 (exit $ac_status); } &&
5969 { ac_try='test -s conftest.$ac_objext'
5970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5971 (eval $ac_try) 2>&5
5972 ac_status=$?
5973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5974 (exit $ac_status); }; }; then
5975 ac_hi=$ac_mid; break
5976else
5977 echo "$as_me: failed program was:" >&5
5978cat conftest.$ac_ext >&5
5979ac_lo=`expr $ac_mid + 1`
5980 if test $ac_lo -le $ac_mid; then
5981 ac_lo= ac_hi=
5982 break
5983 fi
5984 ac_mid=`expr 2 '*' $ac_mid + 1`
5985fi
5986rm -f conftest.$ac_objext conftest.$ac_ext
5987 done
5988else
5989 echo "$as_me: failed program was:" >&5
5990cat conftest.$ac_ext >&5
5991cat >conftest.$ac_ext <<_ACEOF
5992#line $LINENO "configure"
5993#include "confdefs.h"
5994$ac_includes_default
5995#ifdef F77_DUMMY_MAIN
5996# ifdef __cplusplus
5997 extern "C"
5998# endif
5999 int F77_DUMMY_MAIN() { return 1; }
6000#endif
6001int
6002main ()
6003{
6004static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6005test_array [0] = 0
6006
6007 ;
6008 return 0;
6009}
6010_ACEOF
6011rm -f conftest.$ac_objext
6012if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6013 (eval $ac_compile) 2>&5
6014 ac_status=$?
6015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6016 (exit $ac_status); } &&
6017 { ac_try='test -s conftest.$ac_objext'
6018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6019 (eval $ac_try) 2>&5
6020 ac_status=$?
6021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6022 (exit $ac_status); }; }; then
6023 ac_hi=-1 ac_mid=-1
6024 while :; do
6025 cat >conftest.$ac_ext <<_ACEOF
6026#line $LINENO "configure"
6027#include "confdefs.h"
6028$ac_includes_default
6029#ifdef F77_DUMMY_MAIN
6030# ifdef __cplusplus
6031 extern "C"
6032# endif
6033 int F77_DUMMY_MAIN() { return 1; }
6034#endif
6035int
6036main ()
6037{
6038static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6039test_array [0] = 0
6040
6041 ;
6042 return 0;
6043}
6044_ACEOF
6045rm -f conftest.$ac_objext
6046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6047 (eval $ac_compile) 2>&5
6048 ac_status=$?
6049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6050 (exit $ac_status); } &&
6051 { ac_try='test -s conftest.$ac_objext'
6052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6053 (eval $ac_try) 2>&5
6054 ac_status=$?
6055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6056 (exit $ac_status); }; }; then
6057 ac_lo=$ac_mid; break
6058else
6059 echo "$as_me: failed program was:" >&5
6060cat conftest.$ac_ext >&5
6061ac_hi=`expr '(' $ac_mid ')' - 1`
6062 if test $ac_mid -le $ac_hi; then
6063 ac_lo= ac_hi=
6064 break
6065 fi
6066 ac_mid=`expr 2 '*' $ac_mid`
6067fi
6068rm -f conftest.$ac_objext conftest.$ac_ext
6069 done
6070else
6071 echo "$as_me: failed program was:" >&5
6072cat conftest.$ac_ext >&5
6073ac_lo= ac_hi=
6074fi
6075rm -f conftest.$ac_objext conftest.$ac_ext
6076fi
6077rm -f conftest.$ac_objext conftest.$ac_ext
6078# Binary search between lo and hi bounds.
6079while test "x$ac_lo" != "x$ac_hi"; do
6080 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6081 cat >conftest.$ac_ext <<_ACEOF
6082#line $LINENO "configure"
6083#include "confdefs.h"
6084$ac_includes_default
6085#ifdef F77_DUMMY_MAIN
6086# ifdef __cplusplus
6087 extern "C"
6088# endif
6089 int F77_DUMMY_MAIN() { return 1; }
6090#endif
6091int
6092main ()
6093{
6094static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6095test_array [0] = 0
6096
6097 ;
6098 return 0;
6099}
6100_ACEOF
6101rm -f conftest.$ac_objext
6102if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6103 (eval $ac_compile) 2>&5
6104 ac_status=$?
6105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6106 (exit $ac_status); } &&
6107 { ac_try='test -s conftest.$ac_objext'
6108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6109 (eval $ac_try) 2>&5
6110 ac_status=$?
6111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6112 (exit $ac_status); }; }; then
6113 ac_hi=$ac_mid
6114else
6115 echo "$as_me: failed program was:" >&5
6116cat conftest.$ac_ext >&5
6117ac_lo=`expr '(' $ac_mid ')' + 1`
6118fi
6119rm -f conftest.$ac_objext conftest.$ac_ext
6120done
6121case $ac_lo in
6122?*) ac_cv_sizeof_void_p=$ac_lo;;
6123'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6124echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6125 { (exit 1); exit 1; }; } ;;
6126esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006127else
6128 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006129 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6130echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6131 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006132else
Martin v. Löwis11437992002-04-12 09:54:03 +00006133 cat >conftest.$ac_ext <<_ACEOF
6134#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006135#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006136$ac_includes_default
6137long longval () { return (long) (sizeof (void *)); }
6138unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006139#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006140#include <stdlib.h>
6141#ifdef F77_DUMMY_MAIN
6142# ifdef __cplusplus
6143 extern "C"
6144# endif
6145 int F77_DUMMY_MAIN() { return 1; }
6146#endif
6147int
6148main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006149{
Martin v. Löwis11437992002-04-12 09:54:03 +00006150
6151 FILE *f = fopen ("conftest.val", "w");
6152 if (! f)
6153 exit (1);
6154 if (((long) (sizeof (void *))) < 0)
6155 {
6156 long i = longval ();
6157 if (i != ((long) (sizeof (void *))))
6158 exit (1);
6159 fprintf (f, "%ld\n", i);
6160 }
6161 else
6162 {
6163 unsigned long i = ulongval ();
6164 if (i != ((long) (sizeof (void *))))
6165 exit (1);
6166 fprintf (f, "%lu\n", i);
6167 }
6168 exit (ferror (f) || fclose (f) != 0);
6169
6170 ;
6171 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006172}
Martin v. Löwis11437992002-04-12 09:54:03 +00006173_ACEOF
6174rm -f conftest$ac_exeext
6175if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6176 (eval $ac_link) 2>&5
6177 ac_status=$?
6178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6181 (eval $ac_try) 2>&5
6182 ac_status=$?
6183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6184 (exit $ac_status); }; }; then
6185 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006186else
Martin v. Löwis11437992002-04-12 09:54:03 +00006187 echo "$as_me: program exited with status $ac_status" >&5
6188echo "$as_me: failed program was:" >&5
6189cat conftest.$ac_ext >&5
6190( exit $ac_status )
6191{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6192echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6193 { (exit 1); exit 1; }; }
6194fi
6195rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6196fi
6197fi
6198rm -f conftest.val
6199else
Guido van Rossumad678af1998-10-02 14:42:15 +00006200 ac_cv_sizeof_void_p=0
6201fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006202fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006203echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6204echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6205cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006206#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006207_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006208
6209
Martin v. Löwis11437992002-04-12 09:54:03 +00006210echo "$as_me:$LINENO: checking for char" >&5
6211echo $ECHO_N "checking for char... $ECHO_C" >&6
6212if test "${ac_cv_type_char+set}" = set; then
6213 echo $ECHO_N "(cached) $ECHO_C" >&6
6214else
6215 cat >conftest.$ac_ext <<_ACEOF
6216#line $LINENO "configure"
6217#include "confdefs.h"
6218$ac_includes_default
6219#ifdef F77_DUMMY_MAIN
6220# ifdef __cplusplus
6221 extern "C"
6222# endif
6223 int F77_DUMMY_MAIN() { return 1; }
6224#endif
6225int
6226main ()
6227{
6228if ((char *) 0)
6229 return 0;
6230if (sizeof (char))
6231 return 0;
6232 ;
6233 return 0;
6234}
6235_ACEOF
6236rm -f conftest.$ac_objext
6237if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6238 (eval $ac_compile) 2>&5
6239 ac_status=$?
6240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6241 (exit $ac_status); } &&
6242 { ac_try='test -s conftest.$ac_objext'
6243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6244 (eval $ac_try) 2>&5
6245 ac_status=$?
6246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6247 (exit $ac_status); }; }; then
6248 ac_cv_type_char=yes
6249else
6250 echo "$as_me: failed program was:" >&5
6251cat conftest.$ac_ext >&5
6252ac_cv_type_char=no
6253fi
6254rm -f conftest.$ac_objext conftest.$ac_ext
6255fi
6256echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6257echo "${ECHO_T}$ac_cv_type_char" >&6
6258
6259echo "$as_me:$LINENO: checking size of char" >&5
6260echo $ECHO_N "checking size of char... $ECHO_C" >&6
6261if test "${ac_cv_sizeof_char+set}" = set; then
6262 echo $ECHO_N "(cached) $ECHO_C" >&6
6263else
6264 if test "$ac_cv_type_char" = yes; then
6265 # The cast to unsigned long works around a bug in the HP C Compiler
6266 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6267 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6268 # This bug is HP SR number 8606223364.
6269 if test "$cross_compiling" = yes; then
6270 # Depending upon the size, compute the lo and hi bounds.
6271cat >conftest.$ac_ext <<_ACEOF
6272#line $LINENO "configure"
6273#include "confdefs.h"
6274$ac_includes_default
6275#ifdef F77_DUMMY_MAIN
6276# ifdef __cplusplus
6277 extern "C"
6278# endif
6279 int F77_DUMMY_MAIN() { return 1; }
6280#endif
6281int
6282main ()
6283{
6284static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6285test_array [0] = 0
6286
6287 ;
6288 return 0;
6289}
6290_ACEOF
6291rm -f conftest.$ac_objext
6292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6293 (eval $ac_compile) 2>&5
6294 ac_status=$?
6295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6296 (exit $ac_status); } &&
6297 { ac_try='test -s conftest.$ac_objext'
6298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6299 (eval $ac_try) 2>&5
6300 ac_status=$?
6301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6302 (exit $ac_status); }; }; then
6303 ac_lo=0 ac_mid=0
6304 while :; do
6305 cat >conftest.$ac_ext <<_ACEOF
6306#line $LINENO "configure"
6307#include "confdefs.h"
6308$ac_includes_default
6309#ifdef F77_DUMMY_MAIN
6310# ifdef __cplusplus
6311 extern "C"
6312# endif
6313 int F77_DUMMY_MAIN() { return 1; }
6314#endif
6315int
6316main ()
6317{
6318static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6319test_array [0] = 0
6320
6321 ;
6322 return 0;
6323}
6324_ACEOF
6325rm -f conftest.$ac_objext
6326if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6327 (eval $ac_compile) 2>&5
6328 ac_status=$?
6329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6330 (exit $ac_status); } &&
6331 { ac_try='test -s conftest.$ac_objext'
6332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6333 (eval $ac_try) 2>&5
6334 ac_status=$?
6335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6336 (exit $ac_status); }; }; then
6337 ac_hi=$ac_mid; break
6338else
6339 echo "$as_me: failed program was:" >&5
6340cat conftest.$ac_ext >&5
6341ac_lo=`expr $ac_mid + 1`
6342 if test $ac_lo -le $ac_mid; then
6343 ac_lo= ac_hi=
6344 break
6345 fi
6346 ac_mid=`expr 2 '*' $ac_mid + 1`
6347fi
6348rm -f conftest.$ac_objext conftest.$ac_ext
6349 done
6350else
6351 echo "$as_me: failed program was:" >&5
6352cat conftest.$ac_ext >&5
6353cat >conftest.$ac_ext <<_ACEOF
6354#line $LINENO "configure"
6355#include "confdefs.h"
6356$ac_includes_default
6357#ifdef F77_DUMMY_MAIN
6358# ifdef __cplusplus
6359 extern "C"
6360# endif
6361 int F77_DUMMY_MAIN() { return 1; }
6362#endif
6363int
6364main ()
6365{
6366static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6367test_array [0] = 0
6368
6369 ;
6370 return 0;
6371}
6372_ACEOF
6373rm -f conftest.$ac_objext
6374if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6375 (eval $ac_compile) 2>&5
6376 ac_status=$?
6377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6378 (exit $ac_status); } &&
6379 { ac_try='test -s conftest.$ac_objext'
6380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6381 (eval $ac_try) 2>&5
6382 ac_status=$?
6383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6384 (exit $ac_status); }; }; then
6385 ac_hi=-1 ac_mid=-1
6386 while :; do
6387 cat >conftest.$ac_ext <<_ACEOF
6388#line $LINENO "configure"
6389#include "confdefs.h"
6390$ac_includes_default
6391#ifdef F77_DUMMY_MAIN
6392# ifdef __cplusplus
6393 extern "C"
6394# endif
6395 int F77_DUMMY_MAIN() { return 1; }
6396#endif
6397int
6398main ()
6399{
6400static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6401test_array [0] = 0
6402
6403 ;
6404 return 0;
6405}
6406_ACEOF
6407rm -f conftest.$ac_objext
6408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6409 (eval $ac_compile) 2>&5
6410 ac_status=$?
6411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6412 (exit $ac_status); } &&
6413 { ac_try='test -s conftest.$ac_objext'
6414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6415 (eval $ac_try) 2>&5
6416 ac_status=$?
6417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6418 (exit $ac_status); }; }; then
6419 ac_lo=$ac_mid; break
6420else
6421 echo "$as_me: failed program was:" >&5
6422cat conftest.$ac_ext >&5
6423ac_hi=`expr '(' $ac_mid ')' - 1`
6424 if test $ac_mid -le $ac_hi; then
6425 ac_lo= ac_hi=
6426 break
6427 fi
6428 ac_mid=`expr 2 '*' $ac_mid`
6429fi
6430rm -f conftest.$ac_objext conftest.$ac_ext
6431 done
6432else
6433 echo "$as_me: failed program was:" >&5
6434cat conftest.$ac_ext >&5
6435ac_lo= ac_hi=
6436fi
6437rm -f conftest.$ac_objext conftest.$ac_ext
6438fi
6439rm -f conftest.$ac_objext conftest.$ac_ext
6440# Binary search between lo and hi bounds.
6441while test "x$ac_lo" != "x$ac_hi"; do
6442 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6443 cat >conftest.$ac_ext <<_ACEOF
6444#line $LINENO "configure"
6445#include "confdefs.h"
6446$ac_includes_default
6447#ifdef F77_DUMMY_MAIN
6448# ifdef __cplusplus
6449 extern "C"
6450# endif
6451 int F77_DUMMY_MAIN() { return 1; }
6452#endif
6453int
6454main ()
6455{
6456static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6457test_array [0] = 0
6458
6459 ;
6460 return 0;
6461}
6462_ACEOF
6463rm -f conftest.$ac_objext
6464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6465 (eval $ac_compile) 2>&5
6466 ac_status=$?
6467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6468 (exit $ac_status); } &&
6469 { ac_try='test -s conftest.$ac_objext'
6470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6471 (eval $ac_try) 2>&5
6472 ac_status=$?
6473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6474 (exit $ac_status); }; }; then
6475 ac_hi=$ac_mid
6476else
6477 echo "$as_me: failed program was:" >&5
6478cat conftest.$ac_ext >&5
6479ac_lo=`expr '(' $ac_mid ')' + 1`
6480fi
6481rm -f conftest.$ac_objext conftest.$ac_ext
6482done
6483case $ac_lo in
6484?*) ac_cv_sizeof_char=$ac_lo;;
6485'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6486echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6487 { (exit 1); exit 1; }; } ;;
6488esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006489else
6490 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006491 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6492echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6493 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006494else
Martin v. Löwis11437992002-04-12 09:54:03 +00006495 cat >conftest.$ac_ext <<_ACEOF
6496#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006497#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006498$ac_includes_default
6499long longval () { return (long) (sizeof (char)); }
6500unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006501#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006502#include <stdlib.h>
6503#ifdef F77_DUMMY_MAIN
6504# ifdef __cplusplus
6505 extern "C"
6506# endif
6507 int F77_DUMMY_MAIN() { return 1; }
6508#endif
6509int
6510main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006511{
Martin v. Löwis11437992002-04-12 09:54:03 +00006512
6513 FILE *f = fopen ("conftest.val", "w");
6514 if (! f)
6515 exit (1);
6516 if (((long) (sizeof (char))) < 0)
6517 {
6518 long i = longval ();
6519 if (i != ((long) (sizeof (char))))
6520 exit (1);
6521 fprintf (f, "%ld\n", i);
6522 }
6523 else
6524 {
6525 unsigned long i = ulongval ();
6526 if (i != ((long) (sizeof (char))))
6527 exit (1);
6528 fprintf (f, "%lu\n", i);
6529 }
6530 exit (ferror (f) || fclose (f) != 0);
6531
6532 ;
6533 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006534}
Martin v. Löwis11437992002-04-12 09:54:03 +00006535_ACEOF
6536rm -f conftest$ac_exeext
6537if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6538 (eval $ac_link) 2>&5
6539 ac_status=$?
6540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6541 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6543 (eval $ac_try) 2>&5
6544 ac_status=$?
6545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6546 (exit $ac_status); }; }; then
6547 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006548else
Martin v. Löwis11437992002-04-12 09:54:03 +00006549 echo "$as_me: program exited with status $ac_status" >&5
6550echo "$as_me: failed program was:" >&5
6551cat conftest.$ac_ext >&5
6552( exit $ac_status )
6553{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6554echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6555 { (exit 1); exit 1; }; }
6556fi
6557rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6558fi
6559fi
6560rm -f conftest.val
6561else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006562 ac_cv_sizeof_char=0
6563fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006565echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6566echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6567cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006568#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006569_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006570
6571
Martin v. Löwis11437992002-04-12 09:54:03 +00006572echo "$as_me:$LINENO: checking for short" >&5
6573echo $ECHO_N "checking for short... $ECHO_C" >&6
6574if test "${ac_cv_type_short+set}" = set; then
6575 echo $ECHO_N "(cached) $ECHO_C" >&6
6576else
6577 cat >conftest.$ac_ext <<_ACEOF
6578#line $LINENO "configure"
6579#include "confdefs.h"
6580$ac_includes_default
6581#ifdef F77_DUMMY_MAIN
6582# ifdef __cplusplus
6583 extern "C"
6584# endif
6585 int F77_DUMMY_MAIN() { return 1; }
6586#endif
6587int
6588main ()
6589{
6590if ((short *) 0)
6591 return 0;
6592if (sizeof (short))
6593 return 0;
6594 ;
6595 return 0;
6596}
6597_ACEOF
6598rm -f conftest.$ac_objext
6599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6600 (eval $ac_compile) 2>&5
6601 ac_status=$?
6602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6603 (exit $ac_status); } &&
6604 { ac_try='test -s conftest.$ac_objext'
6605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6606 (eval $ac_try) 2>&5
6607 ac_status=$?
6608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6609 (exit $ac_status); }; }; then
6610 ac_cv_type_short=yes
6611else
6612 echo "$as_me: failed program was:" >&5
6613cat conftest.$ac_ext >&5
6614ac_cv_type_short=no
6615fi
6616rm -f conftest.$ac_objext conftest.$ac_ext
6617fi
6618echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6619echo "${ECHO_T}$ac_cv_type_short" >&6
6620
6621echo "$as_me:$LINENO: checking size of short" >&5
6622echo $ECHO_N "checking size of short... $ECHO_C" >&6
6623if test "${ac_cv_sizeof_short+set}" = set; then
6624 echo $ECHO_N "(cached) $ECHO_C" >&6
6625else
6626 if test "$ac_cv_type_short" = yes; then
6627 # The cast to unsigned long works around a bug in the HP C Compiler
6628 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6629 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6630 # This bug is HP SR number 8606223364.
6631 if test "$cross_compiling" = yes; then
6632 # Depending upon the size, compute the lo and hi bounds.
6633cat >conftest.$ac_ext <<_ACEOF
6634#line $LINENO "configure"
6635#include "confdefs.h"
6636$ac_includes_default
6637#ifdef F77_DUMMY_MAIN
6638# ifdef __cplusplus
6639 extern "C"
6640# endif
6641 int F77_DUMMY_MAIN() { return 1; }
6642#endif
6643int
6644main ()
6645{
6646static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6647test_array [0] = 0
6648
6649 ;
6650 return 0;
6651}
6652_ACEOF
6653rm -f conftest.$ac_objext
6654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6655 (eval $ac_compile) 2>&5
6656 ac_status=$?
6657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6658 (exit $ac_status); } &&
6659 { ac_try='test -s conftest.$ac_objext'
6660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6661 (eval $ac_try) 2>&5
6662 ac_status=$?
6663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6664 (exit $ac_status); }; }; then
6665 ac_lo=0 ac_mid=0
6666 while :; do
6667 cat >conftest.$ac_ext <<_ACEOF
6668#line $LINENO "configure"
6669#include "confdefs.h"
6670$ac_includes_default
6671#ifdef F77_DUMMY_MAIN
6672# ifdef __cplusplus
6673 extern "C"
6674# endif
6675 int F77_DUMMY_MAIN() { return 1; }
6676#endif
6677int
6678main ()
6679{
6680static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6681test_array [0] = 0
6682
6683 ;
6684 return 0;
6685}
6686_ACEOF
6687rm -f conftest.$ac_objext
6688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6689 (eval $ac_compile) 2>&5
6690 ac_status=$?
6691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6692 (exit $ac_status); } &&
6693 { ac_try='test -s conftest.$ac_objext'
6694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6695 (eval $ac_try) 2>&5
6696 ac_status=$?
6697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6698 (exit $ac_status); }; }; then
6699 ac_hi=$ac_mid; break
6700else
6701 echo "$as_me: failed program was:" >&5
6702cat conftest.$ac_ext >&5
6703ac_lo=`expr $ac_mid + 1`
6704 if test $ac_lo -le $ac_mid; then
6705 ac_lo= ac_hi=
6706 break
6707 fi
6708 ac_mid=`expr 2 '*' $ac_mid + 1`
6709fi
6710rm -f conftest.$ac_objext conftest.$ac_ext
6711 done
6712else
6713 echo "$as_me: failed program was:" >&5
6714cat conftest.$ac_ext >&5
6715cat >conftest.$ac_ext <<_ACEOF
6716#line $LINENO "configure"
6717#include "confdefs.h"
6718$ac_includes_default
6719#ifdef F77_DUMMY_MAIN
6720# ifdef __cplusplus
6721 extern "C"
6722# endif
6723 int F77_DUMMY_MAIN() { return 1; }
6724#endif
6725int
6726main ()
6727{
6728static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6729test_array [0] = 0
6730
6731 ;
6732 return 0;
6733}
6734_ACEOF
6735rm -f conftest.$ac_objext
6736if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6737 (eval $ac_compile) 2>&5
6738 ac_status=$?
6739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6740 (exit $ac_status); } &&
6741 { ac_try='test -s conftest.$ac_objext'
6742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6743 (eval $ac_try) 2>&5
6744 ac_status=$?
6745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6746 (exit $ac_status); }; }; then
6747 ac_hi=-1 ac_mid=-1
6748 while :; do
6749 cat >conftest.$ac_ext <<_ACEOF
6750#line $LINENO "configure"
6751#include "confdefs.h"
6752$ac_includes_default
6753#ifdef F77_DUMMY_MAIN
6754# ifdef __cplusplus
6755 extern "C"
6756# endif
6757 int F77_DUMMY_MAIN() { return 1; }
6758#endif
6759int
6760main ()
6761{
6762static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6763test_array [0] = 0
6764
6765 ;
6766 return 0;
6767}
6768_ACEOF
6769rm -f conftest.$ac_objext
6770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6771 (eval $ac_compile) 2>&5
6772 ac_status=$?
6773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6774 (exit $ac_status); } &&
6775 { ac_try='test -s conftest.$ac_objext'
6776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6777 (eval $ac_try) 2>&5
6778 ac_status=$?
6779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6780 (exit $ac_status); }; }; then
6781 ac_lo=$ac_mid; break
6782else
6783 echo "$as_me: failed program was:" >&5
6784cat conftest.$ac_ext >&5
6785ac_hi=`expr '(' $ac_mid ')' - 1`
6786 if test $ac_mid -le $ac_hi; then
6787 ac_lo= ac_hi=
6788 break
6789 fi
6790 ac_mid=`expr 2 '*' $ac_mid`
6791fi
6792rm -f conftest.$ac_objext conftest.$ac_ext
6793 done
6794else
6795 echo "$as_me: failed program was:" >&5
6796cat conftest.$ac_ext >&5
6797ac_lo= ac_hi=
6798fi
6799rm -f conftest.$ac_objext conftest.$ac_ext
6800fi
6801rm -f conftest.$ac_objext conftest.$ac_ext
6802# Binary search between lo and hi bounds.
6803while test "x$ac_lo" != "x$ac_hi"; do
6804 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6805 cat >conftest.$ac_ext <<_ACEOF
6806#line $LINENO "configure"
6807#include "confdefs.h"
6808$ac_includes_default
6809#ifdef F77_DUMMY_MAIN
6810# ifdef __cplusplus
6811 extern "C"
6812# endif
6813 int F77_DUMMY_MAIN() { return 1; }
6814#endif
6815int
6816main ()
6817{
6818static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6819test_array [0] = 0
6820
6821 ;
6822 return 0;
6823}
6824_ACEOF
6825rm -f conftest.$ac_objext
6826if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6827 (eval $ac_compile) 2>&5
6828 ac_status=$?
6829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6830 (exit $ac_status); } &&
6831 { ac_try='test -s conftest.$ac_objext'
6832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6833 (eval $ac_try) 2>&5
6834 ac_status=$?
6835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6836 (exit $ac_status); }; }; then
6837 ac_hi=$ac_mid
6838else
6839 echo "$as_me: failed program was:" >&5
6840cat conftest.$ac_ext >&5
6841ac_lo=`expr '(' $ac_mid ')' + 1`
6842fi
6843rm -f conftest.$ac_objext conftest.$ac_ext
6844done
6845case $ac_lo in
6846?*) ac_cv_sizeof_short=$ac_lo;;
6847'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6848echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6849 { (exit 1); exit 1; }; } ;;
6850esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006851else
6852 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6854echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6855 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006856else
Martin v. Löwis11437992002-04-12 09:54:03 +00006857 cat >conftest.$ac_ext <<_ACEOF
6858#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006859#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006860$ac_includes_default
6861long longval () { return (long) (sizeof (short)); }
6862unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006863#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006864#include <stdlib.h>
6865#ifdef F77_DUMMY_MAIN
6866# ifdef __cplusplus
6867 extern "C"
6868# endif
6869 int F77_DUMMY_MAIN() { return 1; }
6870#endif
6871int
6872main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006873{
Martin v. Löwis11437992002-04-12 09:54:03 +00006874
6875 FILE *f = fopen ("conftest.val", "w");
6876 if (! f)
6877 exit (1);
6878 if (((long) (sizeof (short))) < 0)
6879 {
6880 long i = longval ();
6881 if (i != ((long) (sizeof (short))))
6882 exit (1);
6883 fprintf (f, "%ld\n", i);
6884 }
6885 else
6886 {
6887 unsigned long i = ulongval ();
6888 if (i != ((long) (sizeof (short))))
6889 exit (1);
6890 fprintf (f, "%lu\n", i);
6891 }
6892 exit (ferror (f) || fclose (f) != 0);
6893
6894 ;
6895 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006896}
Martin v. Löwis11437992002-04-12 09:54:03 +00006897_ACEOF
6898rm -f conftest$ac_exeext
6899if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6900 (eval $ac_link) 2>&5
6901 ac_status=$?
6902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6903 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6905 (eval $ac_try) 2>&5
6906 ac_status=$?
6907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6908 (exit $ac_status); }; }; then
6909 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006910else
Martin v. Löwis11437992002-04-12 09:54:03 +00006911 echo "$as_me: program exited with status $ac_status" >&5
6912echo "$as_me: failed program was:" >&5
6913cat conftest.$ac_ext >&5
6914( exit $ac_status )
6915{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6916echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6917 { (exit 1); exit 1; }; }
6918fi
6919rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6920fi
6921fi
6922rm -f conftest.val
6923else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006924 ac_cv_sizeof_short=0
6925fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006926fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006927echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6928echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6929cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006930#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006931_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006932
6933
Martin v. Löwis11437992002-04-12 09:54:03 +00006934echo "$as_me:$LINENO: checking for float" >&5
6935echo $ECHO_N "checking for float... $ECHO_C" >&6
6936if test "${ac_cv_type_float+set}" = set; then
6937 echo $ECHO_N "(cached) $ECHO_C" >&6
6938else
6939 cat >conftest.$ac_ext <<_ACEOF
6940#line $LINENO "configure"
6941#include "confdefs.h"
6942$ac_includes_default
6943#ifdef F77_DUMMY_MAIN
6944# ifdef __cplusplus
6945 extern "C"
6946# endif
6947 int F77_DUMMY_MAIN() { return 1; }
6948#endif
6949int
6950main ()
6951{
6952if ((float *) 0)
6953 return 0;
6954if (sizeof (float))
6955 return 0;
6956 ;
6957 return 0;
6958}
6959_ACEOF
6960rm -f conftest.$ac_objext
6961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6962 (eval $ac_compile) 2>&5
6963 ac_status=$?
6964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6965 (exit $ac_status); } &&
6966 { ac_try='test -s conftest.$ac_objext'
6967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6968 (eval $ac_try) 2>&5
6969 ac_status=$?
6970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6971 (exit $ac_status); }; }; then
6972 ac_cv_type_float=yes
6973else
6974 echo "$as_me: failed program was:" >&5
6975cat conftest.$ac_ext >&5
6976ac_cv_type_float=no
6977fi
6978rm -f conftest.$ac_objext conftest.$ac_ext
6979fi
6980echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6981echo "${ECHO_T}$ac_cv_type_float" >&6
6982
6983echo "$as_me:$LINENO: checking size of float" >&5
6984echo $ECHO_N "checking size of float... $ECHO_C" >&6
6985if test "${ac_cv_sizeof_float+set}" = set; then
6986 echo $ECHO_N "(cached) $ECHO_C" >&6
6987else
6988 if test "$ac_cv_type_float" = yes; then
6989 # The cast to unsigned long works around a bug in the HP C Compiler
6990 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6991 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6992 # This bug is HP SR number 8606223364.
6993 if test "$cross_compiling" = yes; then
6994 # Depending upon the size, compute the lo and hi bounds.
6995cat >conftest.$ac_ext <<_ACEOF
6996#line $LINENO "configure"
6997#include "confdefs.h"
6998$ac_includes_default
6999#ifdef F77_DUMMY_MAIN
7000# ifdef __cplusplus
7001 extern "C"
7002# endif
7003 int F77_DUMMY_MAIN() { return 1; }
7004#endif
7005int
7006main ()
7007{
7008static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7009test_array [0] = 0
7010
7011 ;
7012 return 0;
7013}
7014_ACEOF
7015rm -f conftest.$ac_objext
7016if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7017 (eval $ac_compile) 2>&5
7018 ac_status=$?
7019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7020 (exit $ac_status); } &&
7021 { ac_try='test -s conftest.$ac_objext'
7022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7023 (eval $ac_try) 2>&5
7024 ac_status=$?
7025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7026 (exit $ac_status); }; }; then
7027 ac_lo=0 ac_mid=0
7028 while :; do
7029 cat >conftest.$ac_ext <<_ACEOF
7030#line $LINENO "configure"
7031#include "confdefs.h"
7032$ac_includes_default
7033#ifdef F77_DUMMY_MAIN
7034# ifdef __cplusplus
7035 extern "C"
7036# endif
7037 int F77_DUMMY_MAIN() { return 1; }
7038#endif
7039int
7040main ()
7041{
7042static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7043test_array [0] = 0
7044
7045 ;
7046 return 0;
7047}
7048_ACEOF
7049rm -f conftest.$ac_objext
7050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7051 (eval $ac_compile) 2>&5
7052 ac_status=$?
7053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7054 (exit $ac_status); } &&
7055 { ac_try='test -s conftest.$ac_objext'
7056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7057 (eval $ac_try) 2>&5
7058 ac_status=$?
7059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7060 (exit $ac_status); }; }; then
7061 ac_hi=$ac_mid; break
7062else
7063 echo "$as_me: failed program was:" >&5
7064cat conftest.$ac_ext >&5
7065ac_lo=`expr $ac_mid + 1`
7066 if test $ac_lo -le $ac_mid; then
7067 ac_lo= ac_hi=
7068 break
7069 fi
7070 ac_mid=`expr 2 '*' $ac_mid + 1`
7071fi
7072rm -f conftest.$ac_objext conftest.$ac_ext
7073 done
7074else
7075 echo "$as_me: failed program was:" >&5
7076cat conftest.$ac_ext >&5
7077cat >conftest.$ac_ext <<_ACEOF
7078#line $LINENO "configure"
7079#include "confdefs.h"
7080$ac_includes_default
7081#ifdef F77_DUMMY_MAIN
7082# ifdef __cplusplus
7083 extern "C"
7084# endif
7085 int F77_DUMMY_MAIN() { return 1; }
7086#endif
7087int
7088main ()
7089{
7090static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7091test_array [0] = 0
7092
7093 ;
7094 return 0;
7095}
7096_ACEOF
7097rm -f conftest.$ac_objext
7098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7099 (eval $ac_compile) 2>&5
7100 ac_status=$?
7101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7102 (exit $ac_status); } &&
7103 { ac_try='test -s conftest.$ac_objext'
7104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7105 (eval $ac_try) 2>&5
7106 ac_status=$?
7107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7108 (exit $ac_status); }; }; then
7109 ac_hi=-1 ac_mid=-1
7110 while :; do
7111 cat >conftest.$ac_ext <<_ACEOF
7112#line $LINENO "configure"
7113#include "confdefs.h"
7114$ac_includes_default
7115#ifdef F77_DUMMY_MAIN
7116# ifdef __cplusplus
7117 extern "C"
7118# endif
7119 int F77_DUMMY_MAIN() { return 1; }
7120#endif
7121int
7122main ()
7123{
7124static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7125test_array [0] = 0
7126
7127 ;
7128 return 0;
7129}
7130_ACEOF
7131rm -f conftest.$ac_objext
7132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7133 (eval $ac_compile) 2>&5
7134 ac_status=$?
7135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7136 (exit $ac_status); } &&
7137 { ac_try='test -s conftest.$ac_objext'
7138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7139 (eval $ac_try) 2>&5
7140 ac_status=$?
7141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7142 (exit $ac_status); }; }; then
7143 ac_lo=$ac_mid; break
7144else
7145 echo "$as_me: failed program was:" >&5
7146cat conftest.$ac_ext >&5
7147ac_hi=`expr '(' $ac_mid ')' - 1`
7148 if test $ac_mid -le $ac_hi; then
7149 ac_lo= ac_hi=
7150 break
7151 fi
7152 ac_mid=`expr 2 '*' $ac_mid`
7153fi
7154rm -f conftest.$ac_objext conftest.$ac_ext
7155 done
7156else
7157 echo "$as_me: failed program was:" >&5
7158cat conftest.$ac_ext >&5
7159ac_lo= ac_hi=
7160fi
7161rm -f conftest.$ac_objext conftest.$ac_ext
7162fi
7163rm -f conftest.$ac_objext conftest.$ac_ext
7164# Binary search between lo and hi bounds.
7165while test "x$ac_lo" != "x$ac_hi"; do
7166 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7167 cat >conftest.$ac_ext <<_ACEOF
7168#line $LINENO "configure"
7169#include "confdefs.h"
7170$ac_includes_default
7171#ifdef F77_DUMMY_MAIN
7172# ifdef __cplusplus
7173 extern "C"
7174# endif
7175 int F77_DUMMY_MAIN() { return 1; }
7176#endif
7177int
7178main ()
7179{
7180static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7181test_array [0] = 0
7182
7183 ;
7184 return 0;
7185}
7186_ACEOF
7187rm -f conftest.$ac_objext
7188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7189 (eval $ac_compile) 2>&5
7190 ac_status=$?
7191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7192 (exit $ac_status); } &&
7193 { ac_try='test -s conftest.$ac_objext'
7194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7195 (eval $ac_try) 2>&5
7196 ac_status=$?
7197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7198 (exit $ac_status); }; }; then
7199 ac_hi=$ac_mid
7200else
7201 echo "$as_me: failed program was:" >&5
7202cat conftest.$ac_ext >&5
7203ac_lo=`expr '(' $ac_mid ')' + 1`
7204fi
7205rm -f conftest.$ac_objext conftest.$ac_ext
7206done
7207case $ac_lo in
7208?*) ac_cv_sizeof_float=$ac_lo;;
7209'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7210echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7211 { (exit 1); exit 1; }; } ;;
7212esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007213else
7214 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007215 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7216echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7217 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007218else
Martin v. Löwis11437992002-04-12 09:54:03 +00007219 cat >conftest.$ac_ext <<_ACEOF
7220#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007221#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007222$ac_includes_default
7223long longval () { return (long) (sizeof (float)); }
7224unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007225#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007226#include <stdlib.h>
7227#ifdef F77_DUMMY_MAIN
7228# ifdef __cplusplus
7229 extern "C"
7230# endif
7231 int F77_DUMMY_MAIN() { return 1; }
7232#endif
7233int
7234main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007235{
Martin v. Löwis11437992002-04-12 09:54:03 +00007236
7237 FILE *f = fopen ("conftest.val", "w");
7238 if (! f)
7239 exit (1);
7240 if (((long) (sizeof (float))) < 0)
7241 {
7242 long i = longval ();
7243 if (i != ((long) (sizeof (float))))
7244 exit (1);
7245 fprintf (f, "%ld\n", i);
7246 }
7247 else
7248 {
7249 unsigned long i = ulongval ();
7250 if (i != ((long) (sizeof (float))))
7251 exit (1);
7252 fprintf (f, "%lu\n", i);
7253 }
7254 exit (ferror (f) || fclose (f) != 0);
7255
7256 ;
7257 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007258}
Martin v. Löwis11437992002-04-12 09:54:03 +00007259_ACEOF
7260rm -f conftest$ac_exeext
7261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7262 (eval $ac_link) 2>&5
7263 ac_status=$?
7264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7265 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7267 (eval $ac_try) 2>&5
7268 ac_status=$?
7269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7270 (exit $ac_status); }; }; then
7271 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007272else
Martin v. Löwis11437992002-04-12 09:54:03 +00007273 echo "$as_me: program exited with status $ac_status" >&5
7274echo "$as_me: failed program was:" >&5
7275cat conftest.$ac_ext >&5
7276( exit $ac_status )
7277{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7278echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7279 { (exit 1); exit 1; }; }
7280fi
7281rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7282fi
7283fi
7284rm -f conftest.val
7285else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007286 ac_cv_sizeof_float=0
7287fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007288fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007289echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7290echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7291cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007292#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007293_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007294
7295
Martin v. Löwis11437992002-04-12 09:54:03 +00007296echo "$as_me:$LINENO: checking for double" >&5
7297echo $ECHO_N "checking for double... $ECHO_C" >&6
7298if test "${ac_cv_type_double+set}" = set; then
7299 echo $ECHO_N "(cached) $ECHO_C" >&6
7300else
7301 cat >conftest.$ac_ext <<_ACEOF
7302#line $LINENO "configure"
7303#include "confdefs.h"
7304$ac_includes_default
7305#ifdef F77_DUMMY_MAIN
7306# ifdef __cplusplus
7307 extern "C"
7308# endif
7309 int F77_DUMMY_MAIN() { return 1; }
7310#endif
7311int
7312main ()
7313{
7314if ((double *) 0)
7315 return 0;
7316if (sizeof (double))
7317 return 0;
7318 ;
7319 return 0;
7320}
7321_ACEOF
7322rm -f conftest.$ac_objext
7323if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7324 (eval $ac_compile) 2>&5
7325 ac_status=$?
7326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7327 (exit $ac_status); } &&
7328 { ac_try='test -s conftest.$ac_objext'
7329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7330 (eval $ac_try) 2>&5
7331 ac_status=$?
7332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7333 (exit $ac_status); }; }; then
7334 ac_cv_type_double=yes
7335else
7336 echo "$as_me: failed program was:" >&5
7337cat conftest.$ac_ext >&5
7338ac_cv_type_double=no
7339fi
7340rm -f conftest.$ac_objext conftest.$ac_ext
7341fi
7342echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7343echo "${ECHO_T}$ac_cv_type_double" >&6
7344
7345echo "$as_me:$LINENO: checking size of double" >&5
7346echo $ECHO_N "checking size of double... $ECHO_C" >&6
7347if test "${ac_cv_sizeof_double+set}" = set; then
7348 echo $ECHO_N "(cached) $ECHO_C" >&6
7349else
7350 if test "$ac_cv_type_double" = yes; then
7351 # The cast to unsigned long works around a bug in the HP C Compiler
7352 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7353 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7354 # This bug is HP SR number 8606223364.
7355 if test "$cross_compiling" = yes; then
7356 # Depending upon the size, compute the lo and hi bounds.
7357cat >conftest.$ac_ext <<_ACEOF
7358#line $LINENO "configure"
7359#include "confdefs.h"
7360$ac_includes_default
7361#ifdef F77_DUMMY_MAIN
7362# ifdef __cplusplus
7363 extern "C"
7364# endif
7365 int F77_DUMMY_MAIN() { return 1; }
7366#endif
7367int
7368main ()
7369{
7370static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7371test_array [0] = 0
7372
7373 ;
7374 return 0;
7375}
7376_ACEOF
7377rm -f conftest.$ac_objext
7378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7379 (eval $ac_compile) 2>&5
7380 ac_status=$?
7381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7382 (exit $ac_status); } &&
7383 { ac_try='test -s conftest.$ac_objext'
7384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7385 (eval $ac_try) 2>&5
7386 ac_status=$?
7387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7388 (exit $ac_status); }; }; then
7389 ac_lo=0 ac_mid=0
7390 while :; do
7391 cat >conftest.$ac_ext <<_ACEOF
7392#line $LINENO "configure"
7393#include "confdefs.h"
7394$ac_includes_default
7395#ifdef F77_DUMMY_MAIN
7396# ifdef __cplusplus
7397 extern "C"
7398# endif
7399 int F77_DUMMY_MAIN() { return 1; }
7400#endif
7401int
7402main ()
7403{
7404static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7405test_array [0] = 0
7406
7407 ;
7408 return 0;
7409}
7410_ACEOF
7411rm -f conftest.$ac_objext
7412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7413 (eval $ac_compile) 2>&5
7414 ac_status=$?
7415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7416 (exit $ac_status); } &&
7417 { ac_try='test -s conftest.$ac_objext'
7418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7419 (eval $ac_try) 2>&5
7420 ac_status=$?
7421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7422 (exit $ac_status); }; }; then
7423 ac_hi=$ac_mid; break
7424else
7425 echo "$as_me: failed program was:" >&5
7426cat conftest.$ac_ext >&5
7427ac_lo=`expr $ac_mid + 1`
7428 if test $ac_lo -le $ac_mid; then
7429 ac_lo= ac_hi=
7430 break
7431 fi
7432 ac_mid=`expr 2 '*' $ac_mid + 1`
7433fi
7434rm -f conftest.$ac_objext conftest.$ac_ext
7435 done
7436else
7437 echo "$as_me: failed program was:" >&5
7438cat conftest.$ac_ext >&5
7439cat >conftest.$ac_ext <<_ACEOF
7440#line $LINENO "configure"
7441#include "confdefs.h"
7442$ac_includes_default
7443#ifdef F77_DUMMY_MAIN
7444# ifdef __cplusplus
7445 extern "C"
7446# endif
7447 int F77_DUMMY_MAIN() { return 1; }
7448#endif
7449int
7450main ()
7451{
7452static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7453test_array [0] = 0
7454
7455 ;
7456 return 0;
7457}
7458_ACEOF
7459rm -f conftest.$ac_objext
7460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7461 (eval $ac_compile) 2>&5
7462 ac_status=$?
7463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7464 (exit $ac_status); } &&
7465 { ac_try='test -s conftest.$ac_objext'
7466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7467 (eval $ac_try) 2>&5
7468 ac_status=$?
7469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7470 (exit $ac_status); }; }; then
7471 ac_hi=-1 ac_mid=-1
7472 while :; do
7473 cat >conftest.$ac_ext <<_ACEOF
7474#line $LINENO "configure"
7475#include "confdefs.h"
7476$ac_includes_default
7477#ifdef F77_DUMMY_MAIN
7478# ifdef __cplusplus
7479 extern "C"
7480# endif
7481 int F77_DUMMY_MAIN() { return 1; }
7482#endif
7483int
7484main ()
7485{
7486static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7487test_array [0] = 0
7488
7489 ;
7490 return 0;
7491}
7492_ACEOF
7493rm -f conftest.$ac_objext
7494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7495 (eval $ac_compile) 2>&5
7496 ac_status=$?
7497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7498 (exit $ac_status); } &&
7499 { ac_try='test -s conftest.$ac_objext'
7500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7501 (eval $ac_try) 2>&5
7502 ac_status=$?
7503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7504 (exit $ac_status); }; }; then
7505 ac_lo=$ac_mid; break
7506else
7507 echo "$as_me: failed program was:" >&5
7508cat conftest.$ac_ext >&5
7509ac_hi=`expr '(' $ac_mid ')' - 1`
7510 if test $ac_mid -le $ac_hi; then
7511 ac_lo= ac_hi=
7512 break
7513 fi
7514 ac_mid=`expr 2 '*' $ac_mid`
7515fi
7516rm -f conftest.$ac_objext conftest.$ac_ext
7517 done
7518else
7519 echo "$as_me: failed program was:" >&5
7520cat conftest.$ac_ext >&5
7521ac_lo= ac_hi=
7522fi
7523rm -f conftest.$ac_objext conftest.$ac_ext
7524fi
7525rm -f conftest.$ac_objext conftest.$ac_ext
7526# Binary search between lo and hi bounds.
7527while test "x$ac_lo" != "x$ac_hi"; do
7528 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7529 cat >conftest.$ac_ext <<_ACEOF
7530#line $LINENO "configure"
7531#include "confdefs.h"
7532$ac_includes_default
7533#ifdef F77_DUMMY_MAIN
7534# ifdef __cplusplus
7535 extern "C"
7536# endif
7537 int F77_DUMMY_MAIN() { return 1; }
7538#endif
7539int
7540main ()
7541{
7542static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7543test_array [0] = 0
7544
7545 ;
7546 return 0;
7547}
7548_ACEOF
7549rm -f conftest.$ac_objext
7550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7551 (eval $ac_compile) 2>&5
7552 ac_status=$?
7553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7554 (exit $ac_status); } &&
7555 { ac_try='test -s conftest.$ac_objext'
7556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7557 (eval $ac_try) 2>&5
7558 ac_status=$?
7559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7560 (exit $ac_status); }; }; then
7561 ac_hi=$ac_mid
7562else
7563 echo "$as_me: failed program was:" >&5
7564cat conftest.$ac_ext >&5
7565ac_lo=`expr '(' $ac_mid ')' + 1`
7566fi
7567rm -f conftest.$ac_objext conftest.$ac_ext
7568done
7569case $ac_lo in
7570?*) ac_cv_sizeof_double=$ac_lo;;
7571'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7572echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7573 { (exit 1); exit 1; }; } ;;
7574esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007575else
7576 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007577 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7578echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7579 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007580else
Martin v. Löwis11437992002-04-12 09:54:03 +00007581 cat >conftest.$ac_ext <<_ACEOF
7582#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007583#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007584$ac_includes_default
7585long longval () { return (long) (sizeof (double)); }
7586unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007587#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007588#include <stdlib.h>
7589#ifdef F77_DUMMY_MAIN
7590# ifdef __cplusplus
7591 extern "C"
7592# endif
7593 int F77_DUMMY_MAIN() { return 1; }
7594#endif
7595int
7596main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007597{
Martin v. Löwis11437992002-04-12 09:54:03 +00007598
7599 FILE *f = fopen ("conftest.val", "w");
7600 if (! f)
7601 exit (1);
7602 if (((long) (sizeof (double))) < 0)
7603 {
7604 long i = longval ();
7605 if (i != ((long) (sizeof (double))))
7606 exit (1);
7607 fprintf (f, "%ld\n", i);
7608 }
7609 else
7610 {
7611 unsigned long i = ulongval ();
7612 if (i != ((long) (sizeof (double))))
7613 exit (1);
7614 fprintf (f, "%lu\n", i);
7615 }
7616 exit (ferror (f) || fclose (f) != 0);
7617
7618 ;
7619 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007620}
Martin v. Löwis11437992002-04-12 09:54:03 +00007621_ACEOF
7622rm -f conftest$ac_exeext
7623if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7624 (eval $ac_link) 2>&5
7625 ac_status=$?
7626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7627 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7629 (eval $ac_try) 2>&5
7630 ac_status=$?
7631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632 (exit $ac_status); }; }; then
7633 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007634else
Martin v. Löwis11437992002-04-12 09:54:03 +00007635 echo "$as_me: program exited with status $ac_status" >&5
7636echo "$as_me: failed program was:" >&5
7637cat conftest.$ac_ext >&5
7638( exit $ac_status )
7639{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7640echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7641 { (exit 1); exit 1; }; }
7642fi
7643rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7644fi
7645fi
7646rm -f conftest.val
7647else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007648 ac_cv_sizeof_double=0
7649fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007650fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007651echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7652echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7653cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007654#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007655_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007656
7657
Martin v. Löwis11437992002-04-12 09:54:03 +00007658echo "$as_me:$LINENO: checking for fpos_t" >&5
7659echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7660if test "${ac_cv_type_fpos_t+set}" = set; then
7661 echo $ECHO_N "(cached) $ECHO_C" >&6
7662else
7663 cat >conftest.$ac_ext <<_ACEOF
7664#line $LINENO "configure"
7665#include "confdefs.h"
7666$ac_includes_default
7667#ifdef F77_DUMMY_MAIN
7668# ifdef __cplusplus
7669 extern "C"
7670# endif
7671 int F77_DUMMY_MAIN() { return 1; }
7672#endif
7673int
7674main ()
7675{
7676if ((fpos_t *) 0)
7677 return 0;
7678if (sizeof (fpos_t))
7679 return 0;
7680 ;
7681 return 0;
7682}
7683_ACEOF
7684rm -f conftest.$ac_objext
7685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7686 (eval $ac_compile) 2>&5
7687 ac_status=$?
7688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7689 (exit $ac_status); } &&
7690 { ac_try='test -s conftest.$ac_objext'
7691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7692 (eval $ac_try) 2>&5
7693 ac_status=$?
7694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7695 (exit $ac_status); }; }; then
7696 ac_cv_type_fpos_t=yes
7697else
7698 echo "$as_me: failed program was:" >&5
7699cat conftest.$ac_ext >&5
7700ac_cv_type_fpos_t=no
7701fi
7702rm -f conftest.$ac_objext conftest.$ac_ext
7703fi
7704echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7705echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7706
7707echo "$as_me:$LINENO: checking size of fpos_t" >&5
7708echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7709if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7710 echo $ECHO_N "(cached) $ECHO_C" >&6
7711else
7712 if test "$ac_cv_type_fpos_t" = yes; then
7713 # The cast to unsigned long works around a bug in the HP C Compiler
7714 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7715 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7716 # This bug is HP SR number 8606223364.
7717 if test "$cross_compiling" = yes; then
7718 # Depending upon the size, compute the lo and hi bounds.
7719cat >conftest.$ac_ext <<_ACEOF
7720#line $LINENO "configure"
7721#include "confdefs.h"
7722$ac_includes_default
7723#ifdef F77_DUMMY_MAIN
7724# ifdef __cplusplus
7725 extern "C"
7726# endif
7727 int F77_DUMMY_MAIN() { return 1; }
7728#endif
7729int
7730main ()
7731{
7732static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7733test_array [0] = 0
7734
7735 ;
7736 return 0;
7737}
7738_ACEOF
7739rm -f conftest.$ac_objext
7740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7741 (eval $ac_compile) 2>&5
7742 ac_status=$?
7743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7744 (exit $ac_status); } &&
7745 { ac_try='test -s conftest.$ac_objext'
7746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7747 (eval $ac_try) 2>&5
7748 ac_status=$?
7749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7750 (exit $ac_status); }; }; then
7751 ac_lo=0 ac_mid=0
7752 while :; do
7753 cat >conftest.$ac_ext <<_ACEOF
7754#line $LINENO "configure"
7755#include "confdefs.h"
7756$ac_includes_default
7757#ifdef F77_DUMMY_MAIN
7758# ifdef __cplusplus
7759 extern "C"
7760# endif
7761 int F77_DUMMY_MAIN() { return 1; }
7762#endif
7763int
7764main ()
7765{
7766static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7767test_array [0] = 0
7768
7769 ;
7770 return 0;
7771}
7772_ACEOF
7773rm -f conftest.$ac_objext
7774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7775 (eval $ac_compile) 2>&5
7776 ac_status=$?
7777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778 (exit $ac_status); } &&
7779 { ac_try='test -s conftest.$ac_objext'
7780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7781 (eval $ac_try) 2>&5
7782 ac_status=$?
7783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7784 (exit $ac_status); }; }; then
7785 ac_hi=$ac_mid; break
7786else
7787 echo "$as_me: failed program was:" >&5
7788cat conftest.$ac_ext >&5
7789ac_lo=`expr $ac_mid + 1`
7790 if test $ac_lo -le $ac_mid; then
7791 ac_lo= ac_hi=
7792 break
7793 fi
7794 ac_mid=`expr 2 '*' $ac_mid + 1`
7795fi
7796rm -f conftest.$ac_objext conftest.$ac_ext
7797 done
7798else
7799 echo "$as_me: failed program was:" >&5
7800cat conftest.$ac_ext >&5
7801cat >conftest.$ac_ext <<_ACEOF
7802#line $LINENO "configure"
7803#include "confdefs.h"
7804$ac_includes_default
7805#ifdef F77_DUMMY_MAIN
7806# ifdef __cplusplus
7807 extern "C"
7808# endif
7809 int F77_DUMMY_MAIN() { return 1; }
7810#endif
7811int
7812main ()
7813{
7814static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7815test_array [0] = 0
7816
7817 ;
7818 return 0;
7819}
7820_ACEOF
7821rm -f conftest.$ac_objext
7822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7823 (eval $ac_compile) 2>&5
7824 ac_status=$?
7825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7826 (exit $ac_status); } &&
7827 { ac_try='test -s conftest.$ac_objext'
7828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7829 (eval $ac_try) 2>&5
7830 ac_status=$?
7831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7832 (exit $ac_status); }; }; then
7833 ac_hi=-1 ac_mid=-1
7834 while :; do
7835 cat >conftest.$ac_ext <<_ACEOF
7836#line $LINENO "configure"
7837#include "confdefs.h"
7838$ac_includes_default
7839#ifdef F77_DUMMY_MAIN
7840# ifdef __cplusplus
7841 extern "C"
7842# endif
7843 int F77_DUMMY_MAIN() { return 1; }
7844#endif
7845int
7846main ()
7847{
7848static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7849test_array [0] = 0
7850
7851 ;
7852 return 0;
7853}
7854_ACEOF
7855rm -f conftest.$ac_objext
7856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7857 (eval $ac_compile) 2>&5
7858 ac_status=$?
7859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7860 (exit $ac_status); } &&
7861 { ac_try='test -s conftest.$ac_objext'
7862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7863 (eval $ac_try) 2>&5
7864 ac_status=$?
7865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7866 (exit $ac_status); }; }; then
7867 ac_lo=$ac_mid; break
7868else
7869 echo "$as_me: failed program was:" >&5
7870cat conftest.$ac_ext >&5
7871ac_hi=`expr '(' $ac_mid ')' - 1`
7872 if test $ac_mid -le $ac_hi; then
7873 ac_lo= ac_hi=
7874 break
7875 fi
7876 ac_mid=`expr 2 '*' $ac_mid`
7877fi
7878rm -f conftest.$ac_objext conftest.$ac_ext
7879 done
7880else
7881 echo "$as_me: failed program was:" >&5
7882cat conftest.$ac_ext >&5
7883ac_lo= ac_hi=
7884fi
7885rm -f conftest.$ac_objext conftest.$ac_ext
7886fi
7887rm -f conftest.$ac_objext conftest.$ac_ext
7888# Binary search between lo and hi bounds.
7889while test "x$ac_lo" != "x$ac_hi"; do
7890 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7891 cat >conftest.$ac_ext <<_ACEOF
7892#line $LINENO "configure"
7893#include "confdefs.h"
7894$ac_includes_default
7895#ifdef F77_DUMMY_MAIN
7896# ifdef __cplusplus
7897 extern "C"
7898# endif
7899 int F77_DUMMY_MAIN() { return 1; }
7900#endif
7901int
7902main ()
7903{
7904static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7905test_array [0] = 0
7906
7907 ;
7908 return 0;
7909}
7910_ACEOF
7911rm -f conftest.$ac_objext
7912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7913 (eval $ac_compile) 2>&5
7914 ac_status=$?
7915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7916 (exit $ac_status); } &&
7917 { ac_try='test -s conftest.$ac_objext'
7918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7919 (eval $ac_try) 2>&5
7920 ac_status=$?
7921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7922 (exit $ac_status); }; }; then
7923 ac_hi=$ac_mid
7924else
7925 echo "$as_me: failed program was:" >&5
7926cat conftest.$ac_ext >&5
7927ac_lo=`expr '(' $ac_mid ')' + 1`
7928fi
7929rm -f conftest.$ac_objext conftest.$ac_ext
7930done
7931case $ac_lo in
7932?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7933'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7934echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7935 { (exit 1); exit 1; }; } ;;
7936esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007937else
7938 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007939 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7940echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7941 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007942else
Martin v. Löwis11437992002-04-12 09:54:03 +00007943 cat >conftest.$ac_ext <<_ACEOF
7944#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007945#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007946$ac_includes_default
7947long longval () { return (long) (sizeof (fpos_t)); }
7948unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007949#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007950#include <stdlib.h>
7951#ifdef F77_DUMMY_MAIN
7952# ifdef __cplusplus
7953 extern "C"
7954# endif
7955 int F77_DUMMY_MAIN() { return 1; }
7956#endif
7957int
7958main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007959{
Martin v. Löwis11437992002-04-12 09:54:03 +00007960
7961 FILE *f = fopen ("conftest.val", "w");
7962 if (! f)
7963 exit (1);
7964 if (((long) (sizeof (fpos_t))) < 0)
7965 {
7966 long i = longval ();
7967 if (i != ((long) (sizeof (fpos_t))))
7968 exit (1);
7969 fprintf (f, "%ld\n", i);
7970 }
7971 else
7972 {
7973 unsigned long i = ulongval ();
7974 if (i != ((long) (sizeof (fpos_t))))
7975 exit (1);
7976 fprintf (f, "%lu\n", i);
7977 }
7978 exit (ferror (f) || fclose (f) != 0);
7979
7980 ;
7981 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007982}
Martin v. Löwis11437992002-04-12 09:54:03 +00007983_ACEOF
7984rm -f conftest$ac_exeext
7985if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7986 (eval $ac_link) 2>&5
7987 ac_status=$?
7988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7989 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7991 (eval $ac_try) 2>&5
7992 ac_status=$?
7993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7994 (exit $ac_status); }; }; then
7995 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007996else
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 echo "$as_me: program exited with status $ac_status" >&5
7998echo "$as_me: failed program was:" >&5
7999cat conftest.$ac_ext >&5
8000( exit $ac_status )
8001{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8002echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8003 { (exit 1); exit 1; }; }
8004fi
8005rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8006fi
8007fi
8008rm -f conftest.val
8009else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008010 ac_cv_sizeof_fpos_t=0
8011fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008012fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008013echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8014echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8015cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008016#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008017_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008018
Michael W. Hudson54241132001-12-07 15:38:26 +00008019
8020
Martin v. Löwis11437992002-04-12 09:54:03 +00008021echo "$as_me:$LINENO: checking for long long support" >&5
8022echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008023have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008024cat >conftest.$ac_ext <<_ACEOF
8025#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008026#include "confdefs.h"
8027
Martin v. Löwis11437992002-04-12 09:54:03 +00008028#ifdef F77_DUMMY_MAIN
8029# ifdef __cplusplus
8030 extern "C"
8031# endif
8032 int F77_DUMMY_MAIN() { return 1; }
8033#endif
8034int
8035main ()
8036{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008037long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008038 ;
8039 return 0;
8040}
8041_ACEOF
8042rm -f conftest.$ac_objext
8043if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8044 (eval $ac_compile) 2>&5
8045 ac_status=$?
8046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8047 (exit $ac_status); } &&
8048 { ac_try='test -s conftest.$ac_objext'
8049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8050 (eval $ac_try) 2>&5
8051 ac_status=$?
8052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8053 (exit $ac_status); }; }; then
8054
8055
8056cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008057#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008058_ACEOF
8059
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008060 have_long_long=yes
8061
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008062else
Martin v. Löwis11437992002-04-12 09:54:03 +00008063 echo "$as_me: failed program was:" >&5
8064cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008066rm -f conftest.$ac_objext conftest.$ac_ext
8067echo "$as_me:$LINENO: result: $have_long_long" >&5
8068echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008069if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008070echo "$as_me:$LINENO: checking for long long" >&5
8071echo $ECHO_N "checking for long long... $ECHO_C" >&6
8072if test "${ac_cv_type_long_long+set}" = set; then
8073 echo $ECHO_N "(cached) $ECHO_C" >&6
8074else
8075 cat >conftest.$ac_ext <<_ACEOF
8076#line $LINENO "configure"
8077#include "confdefs.h"
8078$ac_includes_default
8079#ifdef F77_DUMMY_MAIN
8080# ifdef __cplusplus
8081 extern "C"
8082# endif
8083 int F77_DUMMY_MAIN() { return 1; }
8084#endif
8085int
8086main ()
8087{
8088if ((long long *) 0)
8089 return 0;
8090if (sizeof (long long))
8091 return 0;
8092 ;
8093 return 0;
8094}
8095_ACEOF
8096rm -f conftest.$ac_objext
8097if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8098 (eval $ac_compile) 2>&5
8099 ac_status=$?
8100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8101 (exit $ac_status); } &&
8102 { ac_try='test -s conftest.$ac_objext'
8103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8104 (eval $ac_try) 2>&5
8105 ac_status=$?
8106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8107 (exit $ac_status); }; }; then
8108 ac_cv_type_long_long=yes
8109else
8110 echo "$as_me: failed program was:" >&5
8111cat conftest.$ac_ext >&5
8112ac_cv_type_long_long=no
8113fi
8114rm -f conftest.$ac_objext conftest.$ac_ext
8115fi
8116echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8117echo "${ECHO_T}$ac_cv_type_long_long" >&6
8118
8119echo "$as_me:$LINENO: checking size of long long" >&5
8120echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8121if test "${ac_cv_sizeof_long_long+set}" = set; then
8122 echo $ECHO_N "(cached) $ECHO_C" >&6
8123else
8124 if test "$ac_cv_type_long_long" = yes; then
8125 # The cast to unsigned long works around a bug in the HP C Compiler
8126 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8127 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8128 # This bug is HP SR number 8606223364.
8129 if test "$cross_compiling" = yes; then
8130 # Depending upon the size, compute the lo and hi bounds.
8131cat >conftest.$ac_ext <<_ACEOF
8132#line $LINENO "configure"
8133#include "confdefs.h"
8134$ac_includes_default
8135#ifdef F77_DUMMY_MAIN
8136# ifdef __cplusplus
8137 extern "C"
8138# endif
8139 int F77_DUMMY_MAIN() { return 1; }
8140#endif
8141int
8142main ()
8143{
8144static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8145test_array [0] = 0
8146
8147 ;
8148 return 0;
8149}
8150_ACEOF
8151rm -f conftest.$ac_objext
8152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8153 (eval $ac_compile) 2>&5
8154 ac_status=$?
8155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8156 (exit $ac_status); } &&
8157 { ac_try='test -s conftest.$ac_objext'
8158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8159 (eval $ac_try) 2>&5
8160 ac_status=$?
8161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8162 (exit $ac_status); }; }; then
8163 ac_lo=0 ac_mid=0
8164 while :; do
8165 cat >conftest.$ac_ext <<_ACEOF
8166#line $LINENO "configure"
8167#include "confdefs.h"
8168$ac_includes_default
8169#ifdef F77_DUMMY_MAIN
8170# ifdef __cplusplus
8171 extern "C"
8172# endif
8173 int F77_DUMMY_MAIN() { return 1; }
8174#endif
8175int
8176main ()
8177{
8178static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8179test_array [0] = 0
8180
8181 ;
8182 return 0;
8183}
8184_ACEOF
8185rm -f conftest.$ac_objext
8186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8187 (eval $ac_compile) 2>&5
8188 ac_status=$?
8189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8190 (exit $ac_status); } &&
8191 { ac_try='test -s conftest.$ac_objext'
8192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8193 (eval $ac_try) 2>&5
8194 ac_status=$?
8195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8196 (exit $ac_status); }; }; then
8197 ac_hi=$ac_mid; break
8198else
8199 echo "$as_me: failed program was:" >&5
8200cat conftest.$ac_ext >&5
8201ac_lo=`expr $ac_mid + 1`
8202 if test $ac_lo -le $ac_mid; then
8203 ac_lo= ac_hi=
8204 break
8205 fi
8206 ac_mid=`expr 2 '*' $ac_mid + 1`
8207fi
8208rm -f conftest.$ac_objext conftest.$ac_ext
8209 done
8210else
8211 echo "$as_me: failed program was:" >&5
8212cat conftest.$ac_ext >&5
8213cat >conftest.$ac_ext <<_ACEOF
8214#line $LINENO "configure"
8215#include "confdefs.h"
8216$ac_includes_default
8217#ifdef F77_DUMMY_MAIN
8218# ifdef __cplusplus
8219 extern "C"
8220# endif
8221 int F77_DUMMY_MAIN() { return 1; }
8222#endif
8223int
8224main ()
8225{
8226static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8227test_array [0] = 0
8228
8229 ;
8230 return 0;
8231}
8232_ACEOF
8233rm -f conftest.$ac_objext
8234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8235 (eval $ac_compile) 2>&5
8236 ac_status=$?
8237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8238 (exit $ac_status); } &&
8239 { ac_try='test -s conftest.$ac_objext'
8240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8241 (eval $ac_try) 2>&5
8242 ac_status=$?
8243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8244 (exit $ac_status); }; }; then
8245 ac_hi=-1 ac_mid=-1
8246 while :; do
8247 cat >conftest.$ac_ext <<_ACEOF
8248#line $LINENO "configure"
8249#include "confdefs.h"
8250$ac_includes_default
8251#ifdef F77_DUMMY_MAIN
8252# ifdef __cplusplus
8253 extern "C"
8254# endif
8255 int F77_DUMMY_MAIN() { return 1; }
8256#endif
8257int
8258main ()
8259{
8260static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8261test_array [0] = 0
8262
8263 ;
8264 return 0;
8265}
8266_ACEOF
8267rm -f conftest.$ac_objext
8268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8269 (eval $ac_compile) 2>&5
8270 ac_status=$?
8271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8272 (exit $ac_status); } &&
8273 { ac_try='test -s conftest.$ac_objext'
8274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8275 (eval $ac_try) 2>&5
8276 ac_status=$?
8277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8278 (exit $ac_status); }; }; then
8279 ac_lo=$ac_mid; break
8280else
8281 echo "$as_me: failed program was:" >&5
8282cat conftest.$ac_ext >&5
8283ac_hi=`expr '(' $ac_mid ')' - 1`
8284 if test $ac_mid -le $ac_hi; then
8285 ac_lo= ac_hi=
8286 break
8287 fi
8288 ac_mid=`expr 2 '*' $ac_mid`
8289fi
8290rm -f conftest.$ac_objext conftest.$ac_ext
8291 done
8292else
8293 echo "$as_me: failed program was:" >&5
8294cat conftest.$ac_ext >&5
8295ac_lo= ac_hi=
8296fi
8297rm -f conftest.$ac_objext conftest.$ac_ext
8298fi
8299rm -f conftest.$ac_objext conftest.$ac_ext
8300# Binary search between lo and hi bounds.
8301while test "x$ac_lo" != "x$ac_hi"; do
8302 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8303 cat >conftest.$ac_ext <<_ACEOF
8304#line $LINENO "configure"
8305#include "confdefs.h"
8306$ac_includes_default
8307#ifdef F77_DUMMY_MAIN
8308# ifdef __cplusplus
8309 extern "C"
8310# endif
8311 int F77_DUMMY_MAIN() { return 1; }
8312#endif
8313int
8314main ()
8315{
8316static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8317test_array [0] = 0
8318
8319 ;
8320 return 0;
8321}
8322_ACEOF
8323rm -f conftest.$ac_objext
8324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8325 (eval $ac_compile) 2>&5
8326 ac_status=$?
8327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8328 (exit $ac_status); } &&
8329 { ac_try='test -s conftest.$ac_objext'
8330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8331 (eval $ac_try) 2>&5
8332 ac_status=$?
8333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8334 (exit $ac_status); }; }; then
8335 ac_hi=$ac_mid
8336else
8337 echo "$as_me: failed program was:" >&5
8338cat conftest.$ac_ext >&5
8339ac_lo=`expr '(' $ac_mid ')' + 1`
8340fi
8341rm -f conftest.$ac_objext conftest.$ac_ext
8342done
8343case $ac_lo in
8344?*) ac_cv_sizeof_long_long=$ac_lo;;
8345'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8346echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8347 { (exit 1); exit 1; }; } ;;
8348esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008349else
8350 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008351 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8352echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8353 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008354else
Martin v. Löwis11437992002-04-12 09:54:03 +00008355 cat >conftest.$ac_ext <<_ACEOF
8356#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008357#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008358$ac_includes_default
8359long longval () { return (long) (sizeof (long long)); }
8360unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008361#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008362#include <stdlib.h>
8363#ifdef F77_DUMMY_MAIN
8364# ifdef __cplusplus
8365 extern "C"
8366# endif
8367 int F77_DUMMY_MAIN() { return 1; }
8368#endif
8369int
8370main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008371{
Martin v. Löwis11437992002-04-12 09:54:03 +00008372
8373 FILE *f = fopen ("conftest.val", "w");
8374 if (! f)
8375 exit (1);
8376 if (((long) (sizeof (long long))) < 0)
8377 {
8378 long i = longval ();
8379 if (i != ((long) (sizeof (long long))))
8380 exit (1);
8381 fprintf (f, "%ld\n", i);
8382 }
8383 else
8384 {
8385 unsigned long i = ulongval ();
8386 if (i != ((long) (sizeof (long long))))
8387 exit (1);
8388 fprintf (f, "%lu\n", i);
8389 }
8390 exit (ferror (f) || fclose (f) != 0);
8391
8392 ;
8393 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008394}
Martin v. Löwis11437992002-04-12 09:54:03 +00008395_ACEOF
8396rm -f conftest$ac_exeext
8397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8398 (eval $ac_link) 2>&5
8399 ac_status=$?
8400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8401 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8403 (eval $ac_try) 2>&5
8404 ac_status=$?
8405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8406 (exit $ac_status); }; }; then
8407 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008408else
Martin v. Löwis11437992002-04-12 09:54:03 +00008409 echo "$as_me: program exited with status $ac_status" >&5
8410echo "$as_me: failed program was:" >&5
8411cat conftest.$ac_ext >&5
8412( exit $ac_status )
8413{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8414echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8415 { (exit 1); exit 1; }; }
8416fi
8417rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8418fi
8419fi
8420rm -f conftest.val
8421else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008422 ac_cv_sizeof_long_long=0
8423fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008424fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008425echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8426echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8427cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008428#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008429_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008430
Michael W. Hudson54241132001-12-07 15:38:26 +00008431
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008432fi
8433
Martin v. Löwis11437992002-04-12 09:54:03 +00008434echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8435echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008436have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008437cat >conftest.$ac_ext <<_ACEOF
8438#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008439#include "confdefs.h"
8440
Martin v. Löwis11437992002-04-12 09:54:03 +00008441#ifdef F77_DUMMY_MAIN
8442# ifdef __cplusplus
8443 extern "C"
8444# endif
8445 int F77_DUMMY_MAIN() { return 1; }
8446#endif
8447int
8448main ()
8449{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008450uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008451 ;
8452 return 0;
8453}
8454_ACEOF
8455rm -f conftest.$ac_objext
8456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8457 (eval $ac_compile) 2>&5
8458 ac_status=$?
8459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8460 (exit $ac_status); } &&
8461 { ac_try='test -s conftest.$ac_objext'
8462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8463 (eval $ac_try) 2>&5
8464 ac_status=$?
8465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8466 (exit $ac_status); }; }; then
8467
8468
8469cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008470#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008471_ACEOF
8472
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008473 have_uintptr_t=yes
8474
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008475else
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 echo "$as_me: failed program was:" >&5
8477cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008479rm -f conftest.$ac_objext conftest.$ac_ext
8480echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8481echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008482if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008483echo "$as_me:$LINENO: checking for uintptr_t" >&5
8484echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8485if test "${ac_cv_type_uintptr_t+set}" = set; then
8486 echo $ECHO_N "(cached) $ECHO_C" >&6
8487else
8488 cat >conftest.$ac_ext <<_ACEOF
8489#line $LINENO "configure"
8490#include "confdefs.h"
8491$ac_includes_default
8492#ifdef F77_DUMMY_MAIN
8493# ifdef __cplusplus
8494 extern "C"
8495# endif
8496 int F77_DUMMY_MAIN() { return 1; }
8497#endif
8498int
8499main ()
8500{
8501if ((uintptr_t *) 0)
8502 return 0;
8503if (sizeof (uintptr_t))
8504 return 0;
8505 ;
8506 return 0;
8507}
8508_ACEOF
8509rm -f conftest.$ac_objext
8510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8511 (eval $ac_compile) 2>&5
8512 ac_status=$?
8513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8514 (exit $ac_status); } &&
8515 { ac_try='test -s conftest.$ac_objext'
8516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8517 (eval $ac_try) 2>&5
8518 ac_status=$?
8519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8520 (exit $ac_status); }; }; then
8521 ac_cv_type_uintptr_t=yes
8522else
8523 echo "$as_me: failed program was:" >&5
8524cat conftest.$ac_ext >&5
8525ac_cv_type_uintptr_t=no
8526fi
8527rm -f conftest.$ac_objext conftest.$ac_ext
8528fi
8529echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8530echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8531
8532echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8533echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8534if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8535 echo $ECHO_N "(cached) $ECHO_C" >&6
8536else
8537 if test "$ac_cv_type_uintptr_t" = yes; then
8538 # The cast to unsigned long works around a bug in the HP C Compiler
8539 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8540 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8541 # This bug is HP SR number 8606223364.
8542 if test "$cross_compiling" = yes; then
8543 # Depending upon the size, compute the lo and hi bounds.
8544cat >conftest.$ac_ext <<_ACEOF
8545#line $LINENO "configure"
8546#include "confdefs.h"
8547$ac_includes_default
8548#ifdef F77_DUMMY_MAIN
8549# ifdef __cplusplus
8550 extern "C"
8551# endif
8552 int F77_DUMMY_MAIN() { return 1; }
8553#endif
8554int
8555main ()
8556{
8557static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8558test_array [0] = 0
8559
8560 ;
8561 return 0;
8562}
8563_ACEOF
8564rm -f conftest.$ac_objext
8565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8566 (eval $ac_compile) 2>&5
8567 ac_status=$?
8568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8569 (exit $ac_status); } &&
8570 { ac_try='test -s conftest.$ac_objext'
8571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8572 (eval $ac_try) 2>&5
8573 ac_status=$?
8574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8575 (exit $ac_status); }; }; then
8576 ac_lo=0 ac_mid=0
8577 while :; do
8578 cat >conftest.$ac_ext <<_ACEOF
8579#line $LINENO "configure"
8580#include "confdefs.h"
8581$ac_includes_default
8582#ifdef F77_DUMMY_MAIN
8583# ifdef __cplusplus
8584 extern "C"
8585# endif
8586 int F77_DUMMY_MAIN() { return 1; }
8587#endif
8588int
8589main ()
8590{
8591static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8592test_array [0] = 0
8593
8594 ;
8595 return 0;
8596}
8597_ACEOF
8598rm -f conftest.$ac_objext
8599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8600 (eval $ac_compile) 2>&5
8601 ac_status=$?
8602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8603 (exit $ac_status); } &&
8604 { ac_try='test -s conftest.$ac_objext'
8605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8606 (eval $ac_try) 2>&5
8607 ac_status=$?
8608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8609 (exit $ac_status); }; }; then
8610 ac_hi=$ac_mid; break
8611else
8612 echo "$as_me: failed program was:" >&5
8613cat conftest.$ac_ext >&5
8614ac_lo=`expr $ac_mid + 1`
8615 if test $ac_lo -le $ac_mid; then
8616 ac_lo= ac_hi=
8617 break
8618 fi
8619 ac_mid=`expr 2 '*' $ac_mid + 1`
8620fi
8621rm -f conftest.$ac_objext conftest.$ac_ext
8622 done
8623else
8624 echo "$as_me: failed program was:" >&5
8625cat conftest.$ac_ext >&5
8626cat >conftest.$ac_ext <<_ACEOF
8627#line $LINENO "configure"
8628#include "confdefs.h"
8629$ac_includes_default
8630#ifdef F77_DUMMY_MAIN
8631# ifdef __cplusplus
8632 extern "C"
8633# endif
8634 int F77_DUMMY_MAIN() { return 1; }
8635#endif
8636int
8637main ()
8638{
8639static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8640test_array [0] = 0
8641
8642 ;
8643 return 0;
8644}
8645_ACEOF
8646rm -f conftest.$ac_objext
8647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8648 (eval $ac_compile) 2>&5
8649 ac_status=$?
8650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8651 (exit $ac_status); } &&
8652 { ac_try='test -s conftest.$ac_objext'
8653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8654 (eval $ac_try) 2>&5
8655 ac_status=$?
8656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8657 (exit $ac_status); }; }; then
8658 ac_hi=-1 ac_mid=-1
8659 while :; do
8660 cat >conftest.$ac_ext <<_ACEOF
8661#line $LINENO "configure"
8662#include "confdefs.h"
8663$ac_includes_default
8664#ifdef F77_DUMMY_MAIN
8665# ifdef __cplusplus
8666 extern "C"
8667# endif
8668 int F77_DUMMY_MAIN() { return 1; }
8669#endif
8670int
8671main ()
8672{
8673static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8674test_array [0] = 0
8675
8676 ;
8677 return 0;
8678}
8679_ACEOF
8680rm -f conftest.$ac_objext
8681if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8682 (eval $ac_compile) 2>&5
8683 ac_status=$?
8684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8685 (exit $ac_status); } &&
8686 { ac_try='test -s conftest.$ac_objext'
8687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8688 (eval $ac_try) 2>&5
8689 ac_status=$?
8690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8691 (exit $ac_status); }; }; then
8692 ac_lo=$ac_mid; break
8693else
8694 echo "$as_me: failed program was:" >&5
8695cat conftest.$ac_ext >&5
8696ac_hi=`expr '(' $ac_mid ')' - 1`
8697 if test $ac_mid -le $ac_hi; then
8698 ac_lo= ac_hi=
8699 break
8700 fi
8701 ac_mid=`expr 2 '*' $ac_mid`
8702fi
8703rm -f conftest.$ac_objext conftest.$ac_ext
8704 done
8705else
8706 echo "$as_me: failed program was:" >&5
8707cat conftest.$ac_ext >&5
8708ac_lo= ac_hi=
8709fi
8710rm -f conftest.$ac_objext conftest.$ac_ext
8711fi
8712rm -f conftest.$ac_objext conftest.$ac_ext
8713# Binary search between lo and hi bounds.
8714while test "x$ac_lo" != "x$ac_hi"; do
8715 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8716 cat >conftest.$ac_ext <<_ACEOF
8717#line $LINENO "configure"
8718#include "confdefs.h"
8719$ac_includes_default
8720#ifdef F77_DUMMY_MAIN
8721# ifdef __cplusplus
8722 extern "C"
8723# endif
8724 int F77_DUMMY_MAIN() { return 1; }
8725#endif
8726int
8727main ()
8728{
8729static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8730test_array [0] = 0
8731
8732 ;
8733 return 0;
8734}
8735_ACEOF
8736rm -f conftest.$ac_objext
8737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8738 (eval $ac_compile) 2>&5
8739 ac_status=$?
8740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8741 (exit $ac_status); } &&
8742 { ac_try='test -s conftest.$ac_objext'
8743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8744 (eval $ac_try) 2>&5
8745 ac_status=$?
8746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8747 (exit $ac_status); }; }; then
8748 ac_hi=$ac_mid
8749else
8750 echo "$as_me: failed program was:" >&5
8751cat conftest.$ac_ext >&5
8752ac_lo=`expr '(' $ac_mid ')' + 1`
8753fi
8754rm -f conftest.$ac_objext conftest.$ac_ext
8755done
8756case $ac_lo in
8757?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8758'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8759echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8760 { (exit 1); exit 1; }; } ;;
8761esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008762else
8763 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008764 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8765echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8766 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008767else
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 cat >conftest.$ac_ext <<_ACEOF
8769#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008770#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008771$ac_includes_default
8772long longval () { return (long) (sizeof (uintptr_t)); }
8773unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008774#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008775#include <stdlib.h>
8776#ifdef F77_DUMMY_MAIN
8777# ifdef __cplusplus
8778 extern "C"
8779# endif
8780 int F77_DUMMY_MAIN() { return 1; }
8781#endif
8782int
8783main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008784{
Martin v. Löwis11437992002-04-12 09:54:03 +00008785
8786 FILE *f = fopen ("conftest.val", "w");
8787 if (! f)
8788 exit (1);
8789 if (((long) (sizeof (uintptr_t))) < 0)
8790 {
8791 long i = longval ();
8792 if (i != ((long) (sizeof (uintptr_t))))
8793 exit (1);
8794 fprintf (f, "%ld\n", i);
8795 }
8796 else
8797 {
8798 unsigned long i = ulongval ();
8799 if (i != ((long) (sizeof (uintptr_t))))
8800 exit (1);
8801 fprintf (f, "%lu\n", i);
8802 }
8803 exit (ferror (f) || fclose (f) != 0);
8804
8805 ;
8806 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008807}
Martin v. Löwis11437992002-04-12 09:54:03 +00008808_ACEOF
8809rm -f conftest$ac_exeext
8810if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8811 (eval $ac_link) 2>&5
8812 ac_status=$?
8813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8814 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8816 (eval $ac_try) 2>&5
8817 ac_status=$?
8818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8819 (exit $ac_status); }; }; then
8820 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008821else
Martin v. Löwis11437992002-04-12 09:54:03 +00008822 echo "$as_me: program exited with status $ac_status" >&5
8823echo "$as_me: failed program was:" >&5
8824cat conftest.$ac_ext >&5
8825( exit $ac_status )
8826{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8827echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8828 { (exit 1); exit 1; }; }
8829fi
8830rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8831fi
8832fi
8833rm -f conftest.val
8834else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008835 ac_cv_sizeof_uintptr_t=0
8836fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008837fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008838echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8839echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8840cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008841#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008842_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008843
Michael W. Hudson54241132001-12-07 15:38:26 +00008844
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008845fi
8846
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008847# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008848echo "$as_me:$LINENO: checking size of off_t" >&5
8849echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8850if test "${ac_cv_sizeof_off_t+set}" = set; then
8851 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008852else
8853 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008854 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008855else
Martin v. Löwis11437992002-04-12 09:54:03 +00008856 cat >conftest.$ac_ext <<_ACEOF
8857#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008858#include "confdefs.h"
8859#include <stdio.h>
8860#include <sys/types.h>
8861main()
8862{
8863 FILE *f=fopen("conftestval", "w");
8864 if (!f) exit(1);
8865 fprintf(f, "%d\n", sizeof(off_t));
8866 exit(0);
8867}
Martin v. Löwis11437992002-04-12 09:54:03 +00008868_ACEOF
8869rm -f conftest$ac_exeext
8870if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8871 (eval $ac_link) 2>&5
8872 ac_status=$?
8873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8874 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8876 (eval $ac_try) 2>&5
8877 ac_status=$?
8878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8879 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008880 ac_cv_sizeof_off_t=`cat conftestval`
8881else
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 echo "$as_me: program exited with status $ac_status" >&5
8883echo "$as_me: failed program was:" >&5
8884cat conftest.$ac_ext >&5
8885( exit $ac_status )
8886ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008887fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008888rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008889fi
8890
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008891fi
8892
Martin v. Löwis11437992002-04-12 09:54:03 +00008893echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8894echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8895
8896cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008897#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008898_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008899
Michael W. Hudson54241132001-12-07 15:38:26 +00008900
Martin v. Löwis11437992002-04-12 09:54:03 +00008901echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8902echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008903if test "$have_long_long" = yes -a \
8904 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8905 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008906
Martin v. Löwis11437992002-04-12 09:54:03 +00008907cat >>confdefs.h <<\_ACEOF
8908#define HAVE_LARGEFILE_SUPPORT 1
8909_ACEOF
8910
8911 echo "$as_me:$LINENO: result: yes" >&5
8912echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008913else
Martin v. Löwis11437992002-04-12 09:54:03 +00008914 echo "$as_me:$LINENO: result: no" >&5
8915echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008916fi
8917
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008918# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008919echo "$as_me:$LINENO: checking size of time_t" >&5
8920echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8921if test "${ac_cv_sizeof_time_t+set}" = set; then
8922 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008923else
8924 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008925 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008926else
Martin v. Löwis11437992002-04-12 09:54:03 +00008927 cat >conftest.$ac_ext <<_ACEOF
8928#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008929#include "confdefs.h"
8930#include <stdio.h>
8931#include <time.h>
8932main()
8933{
8934 FILE *f=fopen("conftestval", "w");
8935 if (!f) exit(1);
8936 fprintf(f, "%d\n", sizeof(time_t));
8937 exit(0);
8938}
Martin v. Löwis11437992002-04-12 09:54:03 +00008939_ACEOF
8940rm -f conftest$ac_exeext
8941if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8942 (eval $ac_link) 2>&5
8943 ac_status=$?
8944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8945 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8947 (eval $ac_try) 2>&5
8948 ac_status=$?
8949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8950 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008951 ac_cv_sizeof_time_t=`cat conftestval`
8952else
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 echo "$as_me: program exited with status $ac_status" >&5
8954echo "$as_me: failed program was:" >&5
8955cat conftest.$ac_ext >&5
8956( exit $ac_status )
8957ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008958fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008959rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008960fi
8961
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008962fi
8963
Martin v. Löwis11437992002-04-12 09:54:03 +00008964echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8965echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8966
8967cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008968#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008969_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008970
Michael W. Hudson54241132001-12-07 15:38:26 +00008971
8972
Trent Mick635f6fb2000-08-23 21:33:05 +00008973# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008974ac_save_cc="$CC"
8975if test "$ac_cv_kpthread" = "yes"
8976then CC="$CC -Kpthread"
8977fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008978echo "$as_me:$LINENO: checking for pthread_t" >&5
8979echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008980have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008981cat >conftest.$ac_ext <<_ACEOF
8982#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008983#include "confdefs.h"
8984#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008985#ifdef F77_DUMMY_MAIN
8986# ifdef __cplusplus
8987 extern "C"
8988# endif
8989 int F77_DUMMY_MAIN() { return 1; }
8990#endif
8991int
8992main ()
8993{
Guido van Rossum12580492000-09-24 16:47:19 +00008994pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008995 ;
8996 return 0;
8997}
8998_ACEOF
8999rm -f conftest.$ac_objext
9000if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9001 (eval $ac_compile) 2>&5
9002 ac_status=$?
9003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9004 (exit $ac_status); } &&
9005 { ac_try='test -s conftest.$ac_objext'
9006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9007 (eval $ac_try) 2>&5
9008 ac_status=$?
9009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9010 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009011 have_pthread_t=yes
9012else
Martin v. Löwis11437992002-04-12 09:54:03 +00009013 echo "$as_me: failed program was:" >&5
9014cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009015fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009016rm -f conftest.$ac_objext conftest.$ac_ext
9017echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9018echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009019if test "$have_pthread_t" = yes ; then
9020 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009021 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9022echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9023 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9024 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009025else
9026 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009027 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009028else
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 cat >conftest.$ac_ext <<_ACEOF
9030#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009031#include "confdefs.h"
9032#include <stdio.h>
9033 #include <pthread.h>
9034 main()
9035 {
9036 FILE *f=fopen("conftestval", "w");
9037 if (!f) exit(1);
9038 fprintf(f, "%d\n", sizeof(pthread_t));
9039 exit(0);
9040 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009041_ACEOF
9042rm -f conftest$ac_exeext
9043if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9044 (eval $ac_link) 2>&5
9045 ac_status=$?
9046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9049 (eval $ac_try) 2>&5
9050 ac_status=$?
9051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9052 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009053 ac_cv_sizeof_pthread_t=`cat conftestval`
9054else
Martin v. Löwis11437992002-04-12 09:54:03 +00009055 echo "$as_me: program exited with status $ac_status" >&5
9056echo "$as_me: failed program was:" >&5
9057cat conftest.$ac_ext >&5
9058( exit $ac_status )
9059ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009060fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009061rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009062fi
9063
Trent Mick635f6fb2000-08-23 21:33:05 +00009064fi
9065
Martin v. Löwis11437992002-04-12 09:54:03 +00009066 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9067echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9068
9069cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009070#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009071_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009072
9073fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009074CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009075
Martin v. Löwis11437992002-04-12 09:54:03 +00009076echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9077echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009078# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9079if test "${enable_toolbox_glue+set}" = set; then
9080 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009081
Martin v. Löwis11437992002-04-12 09:54:03 +00009082fi;
Jack Jansene578a632001-08-15 01:27:14 +00009083
9084if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009085then
Jack Jansene578a632001-08-15 01:27:14 +00009086 case $ac_sys_system/$ac_sys_release in
9087 Darwin/*)
9088 enable_toolbox_glue="yes";;
9089 *)
9090 enable_toolbox_glue="no";;
9091 esac
9092fi
9093case "$enable_toolbox_glue" in
9094yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009095 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009096 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009097 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009098
9099cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009100#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009101_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009102
9103 ;;
9104*)
9105 extra_frameworks=""
9106 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009107 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009108 ;;
9109esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009110echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9111echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009112
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009113
9114case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009115 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009116 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009117 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009118 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9119 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009120 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009121 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009122 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009123 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9124 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009125esac
9126
Martin v. Löwis11437992002-04-12 09:54:03 +00009127echo "$as_me:$LINENO: checking for --enable-framework" >&5
9128echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009129if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009130then
Jack Jansenca06bc62001-08-03 15:32:23 +00009131 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009132 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009133 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009134 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009135
Martin v. Löwis11437992002-04-12 09:54:03 +00009136cat >>confdefs.h <<\_ACEOF
9137#define WITH_NEXT_FRAMEWORK 1
9138_ACEOF
9139
9140 echo "$as_me:$LINENO: result: yes" >&5
9141echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009142else
Martin v. Löwis11437992002-04-12 09:54:03 +00009143 echo "$as_me:$LINENO: result: no" >&5
9144echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009145fi
9146
Martin v. Löwis11437992002-04-12 09:54:03 +00009147echo "$as_me:$LINENO: checking for dyld" >&5
9148echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009149case $ac_sys_system/$ac_sys_release in
9150 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009151
Martin v. Löwis11437992002-04-12 09:54:03 +00009152cat >>confdefs.h <<\_ACEOF
9153#define WITH_DYLD 1
9154_ACEOF
9155
9156 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9157echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009158 ;;
9159 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 echo "$as_me:$LINENO: result: no" >&5
9161echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009162 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009163esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009164
Guido van Rossum0a516c91994-09-12 10:58:40 +00009165# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009166
Michael W. Hudson54241132001-12-07 15:38:26 +00009167
9168
9169
9170
Guido van Rossum0a516c91994-09-12 10:58:40 +00009171# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009172# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009173echo "$as_me:$LINENO: checking SO" >&5
9174echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009175if test -z "$SO"
9176then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009177 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009178 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009179 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009180 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009181 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009183echo "$as_me:$LINENO: result: $SO" >&5
9184echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009185# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009186# -- "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 +00009187# (Shared libraries in this instance are shared modules to be loaded into
9188# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009189echo "$as_me:$LINENO: checking LDSHARED" >&5
9190echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009191if test -z "$LDSHARED"
9192then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009193 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009194 AIX*)
9195 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009196 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009197 ;;
9198 BeOS*)
9199 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009200 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009201 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009202 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009203 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009204 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009205 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00009206 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009207 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009208 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +00009209 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009210 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009211 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9212 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009213 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009214 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9215 if test "$enable_framework" ; then
9216 # Link against the framework. All externals should be defined.
9217 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9218 else
9219 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009220 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009221 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009222 Darwin/*)
9223 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9224 if test "$enable_framework" ; then
9225 # Link against the framework. All externals should be defined.
9226 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9227 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009228 # No framework, use the Python app as bundle-loader
9229 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9230 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009231 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009232 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009233 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009234 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009235 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009236 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009237 then
9238 LDSHARED="cc -shared ${LDFLAGS}"
9239 else
9240 LDSHARED="ld -Bshareable ${LDFLAGS}"
9241 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009242 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009243 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009244 if test "$GCC" = "yes"
9245 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009246 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009247 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009248 SCO_SV*) LDSHARED="$(CC) -Wl,-G,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00009249 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009250 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009251 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009252 *) LDSHARED="ld";;
9253 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009254fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009255echo "$as_me:$LINENO: result: $LDSHARED" >&5
9256echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009257BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009258# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009259# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009260echo "$as_me:$LINENO: checking CCSHARED" >&5
9261echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009262if test -z "$CCSHARED"
9263then
Guido van Rossum07397971997-04-29 21:49:50 +00009264 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009265 SunOS*) if test "$GCC" = yes;
9266 then CCSHARED="-fPIC";
9267 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009268 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009269 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009270 else CCSHARED="+z";
9271 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009272 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009273 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009274 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009275 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009276 if test "$GCC" = "yes"
9277 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009278 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009279 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009280 SCO_SV*)
9281 if test "$GCC" = "yes"
9282 then CCSHARED="-fPIC"
9283 else CCSHARED="-Kpic -belf"
9284 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009285 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009286 IRIX*/6*) case $CC in
9287 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009288 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009289 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009290 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009291 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009292fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009293echo "$as_me:$LINENO: result: $CCSHARED" >&5
9294echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009295# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009296# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009297echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9298echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009299if test -z "$LINKFORSHARED"
9300then
Guido van Rossum07397971997-04-29 21:49:50 +00009301 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009302 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009303 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009304 LINKFORSHARED="-Wl,-E -Wl,+s";;
9305# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009306 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009307 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009308 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009309 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009310 # -u __dummy makes the linker aware of the objc runtime
9311 # in System.framework; otherwise, __objcInit (referenced in
9312 # crt1.o) gets erroneously defined as common, which breaks dynamic
9313 # loading of any modules which reference it in System.framework.
9314 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9315 # not used by the core itself but which needs to be in the core so
9316 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009317 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009318 if test "$enable_framework"
9319 then
9320 LINKFORSHARED="$LINKFORSHARED -framework Python"
9321 fi
9322 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009323 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009324 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009325 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009327 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9328 then
9329 LINKFORSHARED="-Wl,--export-dynamic"
9330 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009331 SunOS/5*) case $CC in
9332 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009333 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009334 then
9335 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009336 fi;;
9337 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009338 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009339fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009340echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9341echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009342
Michael W. Hudson54241132001-12-07 15:38:26 +00009343
Martin v. Löwis11437992002-04-12 09:54:03 +00009344echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9345echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009346if test ! "$LIBRARY" = "$LDLIBRARY"
9347then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009348 case $ac_sys_system in
9349 CYGWIN*)
9350 # Cygwin needs CCSHARED when building extension DLLs
9351 # but not when building the interpreter DLL.
9352 CFLAGSFORSHARED='';;
9353 *)
9354 CFLAGSFORSHARED='$(CCSHARED)'
9355 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009356fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009357echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9358echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009359
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009360# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9361# library (with --enable-shared).
9362# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009363# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9364# if it is not required, since it creates a dependency of the shared library
9365# to LIBS. This, in turn, means that applications linking the shared libpython
9366# don't need to link LIBS explicitly. The default should be only changed
9367# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009368
9369echo "$as_me:$LINENO: checking SHLIBS" >&5
9370echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9371case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009372 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009373 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009374esac
9375echo "$as_me:$LINENO: result: $SHLIBS" >&5
9376echo "${ECHO_T}$SHLIBS" >&6
9377
9378
Guido van Rossum627b2d71993-12-24 10:39:16 +00009379# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009380
9381echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9382echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9383if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009385else
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009387LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009388cat >conftest.$ac_ext <<_ACEOF
9389#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009390#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009391
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009392/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009393#ifdef __cplusplus
9394extern "C"
9395#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009396/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009397 builtin and then its argument prototype would still apply. */
9398char dlopen ();
9399#ifdef F77_DUMMY_MAIN
9400# ifdef __cplusplus
9401 extern "C"
9402# endif
9403 int F77_DUMMY_MAIN() { return 1; }
9404#endif
9405int
9406main ()
9407{
9408dlopen ();
9409 ;
9410 return 0;
9411}
9412_ACEOF
9413rm -f conftest.$ac_objext conftest$ac_exeext
9414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9415 (eval $ac_link) 2>&5
9416 ac_status=$?
9417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9418 (exit $ac_status); } &&
9419 { ac_try='test -s conftest$ac_exeext'
9420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9421 (eval $ac_try) 2>&5
9422 ac_status=$?
9423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9424 (exit $ac_status); }; }; then
9425 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009426else
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 echo "$as_me: failed program was:" >&5
9428cat conftest.$ac_ext >&5
9429ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009430fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009431rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9432LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009433fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009434echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9435echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9436if test $ac_cv_lib_dl_dlopen = yes; then
9437 cat >>confdefs.h <<_ACEOF
9438#define HAVE_LIBDL 1
9439_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009440
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009441 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009443fi
9444 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009445
9446echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9447echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9448if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9449 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009450else
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009452LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009453cat >conftest.$ac_ext <<_ACEOF
9454#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009455#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009456
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009457/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009458#ifdef __cplusplus
9459extern "C"
9460#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009461/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 builtin and then its argument prototype would still apply. */
9463char shl_load ();
9464#ifdef F77_DUMMY_MAIN
9465# ifdef __cplusplus
9466 extern "C"
9467# endif
9468 int F77_DUMMY_MAIN() { return 1; }
9469#endif
9470int
9471main ()
9472{
9473shl_load ();
9474 ;
9475 return 0;
9476}
9477_ACEOF
9478rm -f conftest.$ac_objext conftest$ac_exeext
9479if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9480 (eval $ac_link) 2>&5
9481 ac_status=$?
9482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9483 (exit $ac_status); } &&
9484 { ac_try='test -s conftest$ac_exeext'
9485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9486 (eval $ac_try) 2>&5
9487 ac_status=$?
9488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9489 (exit $ac_status); }; }; then
9490 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009491else
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 echo "$as_me: failed program was:" >&5
9493cat conftest.$ac_ext >&5
9494ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009495fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009496rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9497LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009498fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009499echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9500echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9501if test $ac_cv_lib_dld_shl_load = yes; then
9502 cat >>confdefs.h <<_ACEOF
9503#define HAVE_LIBDLD 1
9504_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009505
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009506 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009507
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009508fi
9509 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009510echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9511echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9512if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009514else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009515 ac_func_search_save_LIBS=$LIBS
9516ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009517cat >conftest.$ac_ext <<_ACEOF
9518#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009519#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009520
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009521/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009522#ifdef __cplusplus
9523extern "C"
9524#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009525/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 builtin and then its argument prototype would still apply. */
9527char sem_init ();
9528#ifdef F77_DUMMY_MAIN
9529# ifdef __cplusplus
9530 extern "C"
9531# endif
9532 int F77_DUMMY_MAIN() { return 1; }
9533#endif
9534int
9535main ()
9536{
9537sem_init ();
9538 ;
9539 return 0;
9540}
9541_ACEOF
9542rm -f conftest.$ac_objext conftest$ac_exeext
9543if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9544 (eval $ac_link) 2>&5
9545 ac_status=$?
9546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9547 (exit $ac_status); } &&
9548 { ac_try='test -s conftest$ac_exeext'
9549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9550 (eval $ac_try) 2>&5
9551 ac_status=$?
9552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9553 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009554 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009555else
Martin v. Löwis11437992002-04-12 09:54:03 +00009556 echo "$as_me: failed program was:" >&5
9557cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009558fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009559rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009560if test "$ac_cv_search_sem_init" = no; then
9561 for ac_lib in rt posix4; do
9562 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9563 cat >conftest.$ac_ext <<_ACEOF
9564#line $LINENO "configure"
9565#include "confdefs.h"
9566
9567/* Override any gcc2 internal prototype to avoid an error. */
9568#ifdef __cplusplus
9569extern "C"
9570#endif
9571/* We use char because int might match the return type of a gcc2
9572 builtin and then its argument prototype would still apply. */
9573char sem_init ();
9574#ifdef F77_DUMMY_MAIN
9575# ifdef __cplusplus
9576 extern "C"
9577# endif
9578 int F77_DUMMY_MAIN() { return 1; }
9579#endif
9580int
9581main ()
9582{
9583sem_init ();
9584 ;
9585 return 0;
9586}
Martin v. Löwis11437992002-04-12 09:54:03 +00009587_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009588rm -f conftest.$ac_objext conftest$ac_exeext
9589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9590 (eval $ac_link) 2>&5
9591 ac_status=$?
9592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9593 (exit $ac_status); } &&
9594 { ac_try='test -s conftest$ac_exeext'
9595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9596 (eval $ac_try) 2>&5
9597 ac_status=$?
9598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9599 (exit $ac_status); }; }; then
9600 ac_cv_search_sem_init="-l$ac_lib"
9601break
9602else
9603 echo "$as_me: failed program was:" >&5
9604cat conftest.$ac_ext >&5
9605fi
9606rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9607 done
9608fi
9609LIBS=$ac_func_search_save_LIBS
9610fi
9611echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9612echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9613if test "$ac_cv_search_sem_init" != no; then
9614 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009615
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009616fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009617 # 'Real Time' functions on Solaris,
9618 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009619
9620# checks for system dependent C++ extensions support
9621case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9623echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9624 cat >conftest.$ac_ext <<_ACEOF
9625#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009626#include "confdefs.h"
9627#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009628#ifdef F77_DUMMY_MAIN
9629# ifdef __cplusplus
9630 extern "C"
9631# endif
9632 int F77_DUMMY_MAIN() { return 1; }
9633#endif
9634int
9635main ()
9636{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009637loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 ;
9639 return 0;
9640}
9641_ACEOF
9642rm -f conftest.$ac_objext conftest$ac_exeext
9643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9644 (eval $ac_link) 2>&5
9645 ac_status=$?
9646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9647 (exit $ac_status); } &&
9648 { ac_try='test -s conftest$ac_exeext'
9649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9650 (eval $ac_try) 2>&5
9651 ac_status=$?
9652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9653 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009654
Martin v. Löwis11437992002-04-12 09:54:03 +00009655cat >>confdefs.h <<\_ACEOF
9656#define AIX_GENUINE_CPLUSPLUS 1
9657_ACEOF
9658
9659 echo "$as_me:$LINENO: result: yes" >&5
9660echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009661else
Martin v. Löwis11437992002-04-12 09:54:03 +00009662 echo "$as_me: failed program was:" >&5
9663cat conftest.$ac_ext >&5
9664echo "$as_me:$LINENO: result: no" >&5
9665echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009666fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009667rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009668 *) ;;
9669esac
9670
Guido van Rossum70c7f481998-03-26 18:44:10 +00009671# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9672# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009673# BeOS' sockets are stashed in libnet.
9674case "$ac_sys_system" in
9675IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009676*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009677echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9678echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9679if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9680 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009681else
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009683LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009684cat >conftest.$ac_ext <<_ACEOF
9685#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009686#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009687
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009688/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009689#ifdef __cplusplus
9690extern "C"
9691#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009692/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 builtin and then its argument prototype would still apply. */
9694char t_open ();
9695#ifdef F77_DUMMY_MAIN
9696# ifdef __cplusplus
9697 extern "C"
9698# endif
9699 int F77_DUMMY_MAIN() { return 1; }
9700#endif
9701int
9702main ()
9703{
9704t_open ();
9705 ;
9706 return 0;
9707}
9708_ACEOF
9709rm -f conftest.$ac_objext conftest$ac_exeext
9710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9711 (eval $ac_link) 2>&5
9712 ac_status=$?
9713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9714 (exit $ac_status); } &&
9715 { ac_try='test -s conftest$ac_exeext'
9716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9717 (eval $ac_try) 2>&5
9718 ac_status=$?
9719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9720 (exit $ac_status); }; }; then
9721 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009722else
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 echo "$as_me: failed program was:" >&5
9724cat conftest.$ac_ext >&5
9725ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009727rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9728LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009729fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009730echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9731echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9732if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009733 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009734fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009735 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009736echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9737echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9738if test "${ac_cv_lib_socket_socket+set}" = set; then
9739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009740else
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009742LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009743cat >conftest.$ac_ext <<_ACEOF
9744#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009745#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009746
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009747/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009748#ifdef __cplusplus
9749extern "C"
9750#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009751/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 builtin and then its argument prototype would still apply. */
9753char socket ();
9754#ifdef F77_DUMMY_MAIN
9755# ifdef __cplusplus
9756 extern "C"
9757# endif
9758 int F77_DUMMY_MAIN() { return 1; }
9759#endif
9760int
9761main ()
9762{
9763socket ();
9764 ;
9765 return 0;
9766}
9767_ACEOF
9768rm -f conftest.$ac_objext conftest$ac_exeext
9769if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9770 (eval $ac_link) 2>&5
9771 ac_status=$?
9772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9773 (exit $ac_status); } &&
9774 { ac_try='test -s conftest$ac_exeext'
9775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9776 (eval $ac_try) 2>&5
9777 ac_status=$?
9778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9779 (exit $ac_status); }; }; then
9780 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009781else
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 echo "$as_me: failed program was:" >&5
9783cat conftest.$ac_ext >&5
9784ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009786rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9787LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009789echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9790echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9791if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009792 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009793fi
9794 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009795;;
9796esac
9797case "$ac_sys_system" in
9798BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009799echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9800echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9801if test "${ac_cv_lib_net_socket+set}" = set; then
9802 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009805LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009806cat >conftest.$ac_ext <<_ACEOF
9807#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009808#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009809
Guido van Rossumad678af1998-10-02 14:42:15 +00009810/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009811#ifdef __cplusplus
9812extern "C"
9813#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009814/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009815 builtin and then its argument prototype would still apply. */
9816char socket ();
9817#ifdef F77_DUMMY_MAIN
9818# ifdef __cplusplus
9819 extern "C"
9820# endif
9821 int F77_DUMMY_MAIN() { return 1; }
9822#endif
9823int
9824main ()
9825{
9826socket ();
9827 ;
9828 return 0;
9829}
9830_ACEOF
9831rm -f conftest.$ac_objext conftest$ac_exeext
9832if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9833 (eval $ac_link) 2>&5
9834 ac_status=$?
9835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9836 (exit $ac_status); } &&
9837 { ac_try='test -s conftest$ac_exeext'
9838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9839 (eval $ac_try) 2>&5
9840 ac_status=$?
9841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9842 (exit $ac_status); }; }; then
9843 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009844else
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 echo "$as_me: failed program was:" >&5
9846cat conftest.$ac_ext >&5
9847ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009848fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009849rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9850LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009851fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009852echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9853echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9854if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009855 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009856fi
9857 # BeOS
9858;;
9859esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009860
Martin v. Löwis11437992002-04-12 09:54:03 +00009861echo "$as_me:$LINENO: checking for --with-libs" >&5
9862echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9863
Guido van Rossuma68acba1996-07-31 17:36:39 +00009864# Check whether --with-libs or --without-libs was given.
9865if test "${with_libs+set}" = set; then
9866 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009867
9868echo "$as_me:$LINENO: result: $withval" >&5
9869echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009870LIBS="$withval $LIBS"
9871
9872else
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 echo "$as_me:$LINENO: result: no" >&5
9874echo "${ECHO_T}no" >&6
9875fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009876
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009877# Determine if signalmodule should be used.
9878
9879
Martin v. Löwis11437992002-04-12 09:54:03 +00009880echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9881echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9882
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009883# Check whether --with-signal-module or --without-signal-module was given.
9884if test "${with_signal_module+set}" = set; then
9885 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009886
Martin v. Löwis11437992002-04-12 09:54:03 +00009887fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009888
9889if test -z "$with_signal_module"
9890then with_signal_module="yes"
9891fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009892echo "$as_me:$LINENO: result: $with_signal_module" >&5
9893echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009894
9895if test "${with_signal_module}" = "yes"; then
9896 USE_SIGNAL_MODULE=""
9897 SIGNAL_OBJS=""
9898else
9899 USE_SIGNAL_MODULE="#"
9900 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9901fi
9902
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009903# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009904
Barry Warsawc0d24d82000-06-29 16:12:00 +00009905USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009906
Martin v. Löwis11437992002-04-12 09:54:03 +00009907echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9908echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9909
Guido van Rossumec2f0731997-01-22 20:54:01 +00009910
9911# Check whether --with-dec-threads or --without-dec-threads was given.
9912if test "${with_dec_threads+set}" = set; then
9913 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009914
9915echo "$as_me:$LINENO: result: $withval" >&5
9916echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009917LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009918if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009919 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009920fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009921else
Martin v. Löwis11437992002-04-12 09:54:03 +00009922 echo "$as_me:$LINENO: result: no" >&5
9923echo "${ECHO_T}no" >&6
9924fi;
9925
9926# Templates for things AC_DEFINEd more than once.
9927# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009928
9929
Martin v. Löwis11437992002-04-12 09:54:03 +00009930
9931
9932
9933
9934
9935echo "$as_me:$LINENO: checking for --with-threads" >&5
9936echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9937
Guido van Rossumec2f0731997-01-22 20:54:01 +00009938# Check whether --with-threads or --without-threads was given.
9939if test "${with_threads+set}" = set; then
9940 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009941
Martin v. Löwis11437992002-04-12 09:54:03 +00009942fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009943
Barry Warsawc0d24d82000-06-29 16:12:00 +00009944# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009945
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009946# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009947if test "${with_thread+set}" = set; then
9948 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009949
Martin v. Löwis11437992002-04-12 09:54:03 +00009950with_threads=$with_thread
9951fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009952
9953if test -z "$with_threads"
9954then with_threads="yes"
9955fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009956echo "$as_me:$LINENO: result: $with_threads" >&5
9957echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009958
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009959
Barry Warsawc0d24d82000-06-29 16:12:00 +00009960if test "$with_threads" = "no"
9961then
9962 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009963elif test "$ac_cv_pthread_is_default" = yes
9964then
Martin v. Löwis11437992002-04-12 09:54:03 +00009965 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009966#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009967_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009968
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009969 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009970 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009971#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009972_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009973
9974 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009975 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009976elif test "$ac_cv_kpthread" = "yes"
9977then
9978 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009979 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009980#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009981_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009982
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009983 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009984 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009985else
9986 if test ! -z "$with_threads" -a -d "$with_threads"
9987 then LDFLAGS="$LDFLAGS -L$with_threads"
9988 fi
9989 if test ! -z "$withval" -a -d "$withval"
9990 then LDFLAGS="$LDFLAGS -L$withval"
9991 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009992
9993 # According to the POSIX spec, a pthreads implementation must
9994 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009995 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9996echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9997 cat >conftest.$ac_ext <<_ACEOF
9998#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009999#include "confdefs.h"
10000#include <unistd.h>
10001 #ifdef _POSIX_THREADS
10002 yes
10003 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010004
10005_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10007 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010008 unistd_defines_pthreads=yes
10009else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010010 unistd_defines_pthreads=no
10011fi
10012rm -f conftest*
10013
Martin v. Löwis11437992002-04-12 09:54:03 +000010014 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10015echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010016
Martin v. Löwis11437992002-04-12 09:54:03 +000010017 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010018#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010019_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010020
Martin v. Löwis11437992002-04-12 09:54:03 +000010021 if test "${ac_cv_header_cthreads_h+set}" = set; then
10022 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10023echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10024if test "${ac_cv_header_cthreads_h+set}" = set; then
10025 echo $ECHO_N "(cached) $ECHO_C" >&6
10026fi
10027echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10028echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010029else
Martin v. Löwis11437992002-04-12 09:54:03 +000010030 # Is the header compilable?
10031echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10032echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10033cat >conftest.$ac_ext <<_ACEOF
10034#line $LINENO "configure"
10035#include "confdefs.h"
10036$ac_includes_default
10037#include <cthreads.h>
10038_ACEOF
10039rm -f conftest.$ac_objext
10040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10041 (eval $ac_compile) 2>&5
10042 ac_status=$?
10043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10044 (exit $ac_status); } &&
10045 { ac_try='test -s conftest.$ac_objext'
10046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10047 (eval $ac_try) 2>&5
10048 ac_status=$?
10049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10050 (exit $ac_status); }; }; then
10051 ac_header_compiler=yes
10052else
10053 echo "$as_me: failed program was:" >&5
10054cat conftest.$ac_ext >&5
10055ac_header_compiler=no
10056fi
10057rm -f conftest.$ac_objext conftest.$ac_ext
10058echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10059echo "${ECHO_T}$ac_header_compiler" >&6
10060
10061# Is the header present?
10062echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10063echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10064cat >conftest.$ac_ext <<_ACEOF
10065#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010066#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010067#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010068_ACEOF
10069if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10070 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10071 ac_status=$?
10072 egrep -v '^ *\+' conftest.er1 >conftest.err
10073 rm -f conftest.er1
10074 cat conftest.err >&5
10075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10076 (exit $ac_status); } >/dev/null; then
10077 if test -s conftest.err; then
10078 ac_cpp_err=$ac_c_preproc_warn_flag
10079 else
10080 ac_cpp_err=
10081 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010082else
Martin v. Löwis11437992002-04-12 09:54:03 +000010083 ac_cpp_err=yes
10084fi
10085if test -z "$ac_cpp_err"; then
10086 ac_header_preproc=yes
10087else
10088 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010089 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010092rm -f conftest.err conftest.$ac_ext
10093echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10094echo "${ECHO_T}$ac_header_preproc" >&6
10095
10096# So? What about this header?
10097case $ac_header_compiler:$ac_header_preproc in
10098 yes:no )
10099 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10100echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10101 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10102echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10103 no:yes )
10104 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10105echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10106 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10107echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10108 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10109echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10110esac
10111echo "$as_me:$LINENO: checking for cthreads.h" >&5
10112echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10113if test "${ac_cv_header_cthreads_h+set}" = set; then
10114 echo $ECHO_N "(cached) $ECHO_C" >&6
10115else
10116 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010118echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10119echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10120
10121fi
10122if test $ac_cv_header_cthreads_h = yes; then
10123 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010124#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010125_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010126
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010128#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010129_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010130
Martin v. Löwis11437992002-04-12 09:54:03 +000010131
10132cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010133#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010134_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010135
10136 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010137 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010138else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010139
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10141 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10142echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10143if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10144 echo $ECHO_N "(cached) $ECHO_C" >&6
10145fi
10146echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10147echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010148else
Martin v. Löwis11437992002-04-12 09:54:03 +000010149 # Is the header compilable?
10150echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10151echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10152cat >conftest.$ac_ext <<_ACEOF
10153#line $LINENO "configure"
10154#include "confdefs.h"
10155$ac_includes_default
10156#include <mach/cthreads.h>
10157_ACEOF
10158rm -f conftest.$ac_objext
10159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10160 (eval $ac_compile) 2>&5
10161 ac_status=$?
10162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10163 (exit $ac_status); } &&
10164 { ac_try='test -s conftest.$ac_objext'
10165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10166 (eval $ac_try) 2>&5
10167 ac_status=$?
10168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10169 (exit $ac_status); }; }; then
10170 ac_header_compiler=yes
10171else
10172 echo "$as_me: failed program was:" >&5
10173cat conftest.$ac_ext >&5
10174ac_header_compiler=no
10175fi
10176rm -f conftest.$ac_objext conftest.$ac_ext
10177echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10178echo "${ECHO_T}$ac_header_compiler" >&6
10179
10180# Is the header present?
10181echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10182echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10183cat >conftest.$ac_ext <<_ACEOF
10184#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010185#include "confdefs.h"
10186#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010187_ACEOF
10188if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10189 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10190 ac_status=$?
10191 egrep -v '^ *\+' conftest.er1 >conftest.err
10192 rm -f conftest.er1
10193 cat conftest.err >&5
10194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10195 (exit $ac_status); } >/dev/null; then
10196 if test -s conftest.err; then
10197 ac_cpp_err=$ac_c_preproc_warn_flag
10198 else
10199 ac_cpp_err=
10200 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010201else
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 ac_cpp_err=yes
10203fi
10204if test -z "$ac_cpp_err"; then
10205 ac_header_preproc=yes
10206else
10207 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010208 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010210fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010211rm -f conftest.err conftest.$ac_ext
10212echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10213echo "${ECHO_T}$ac_header_preproc" >&6
10214
10215# So? What about this header?
10216case $ac_header_compiler:$ac_header_preproc in
10217 yes:no )
10218 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10219echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10220 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10221echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10222 no:yes )
10223 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10224echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10225 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10226echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10227 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10228echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10229esac
10230echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10231echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10232if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10233 echo $ECHO_N "(cached) $ECHO_C" >&6
10234else
10235 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010236fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010237echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10238echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10239
10240fi
10241if test $ac_cv_header_mach_cthreads_h = yes; then
10242 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010243#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010244_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010245
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010247#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010248_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010249
Martin v. Löwis11437992002-04-12 09:54:03 +000010250
10251cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010252#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010253_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010254
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010255 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010256else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010257
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 echo "$as_me:$LINENO: checking for --with-pth" >&5
10259echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10260
10261# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010262if test "${with_pth+set}" = set; then
10263 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010264
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 echo "$as_me:$LINENO: result: $withval" >&5
10266echo "${ECHO_T}$withval" >&6
10267 cat >>confdefs.h <<\_ACEOF
10268#define WITH_THREAD 1
10269_ACEOF
10270
10271
10272cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010273#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010274_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010275
Martin v. Löwis130fb172001-07-19 11:00:41 +000010276 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010277 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010278else
Martin v. Löwis11437992002-04-12 09:54:03 +000010279
10280 echo "$as_me:$LINENO: result: no" >&5
10281echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010282
10283 # Just looking for pthread_create in libpthread is not enough:
10284 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10285 # So we really have to include pthread.h, and then link.
10286 _libs=$LIBS
10287 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10289echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10290 cat >conftest.$ac_ext <<_ACEOF
10291#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010292#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010293#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010294
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010295void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010296#ifdef F77_DUMMY_MAIN
10297# ifdef __cplusplus
10298 extern "C"
10299# endif
10300 int F77_DUMMY_MAIN() { return 1; }
10301#endif
10302int
10303main ()
10304{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010305
10306pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 ;
10308 return 0;
10309}
10310_ACEOF
10311rm -f conftest.$ac_objext conftest$ac_exeext
10312if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10313 (eval $ac_link) 2>&5
10314 ac_status=$?
10315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10316 (exit $ac_status); } &&
10317 { ac_try='test -s conftest$ac_exeext'
10318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10319 (eval $ac_try) 2>&5
10320 ac_status=$?
10321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10322 (exit $ac_status); }; }; then
10323
10324 echo "$as_me:$LINENO: result: yes" >&5
10325echo "${ECHO_T}yes" >&6
10326 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010327#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010328_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010329
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010330 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010331 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010332else
Martin v. Löwis11437992002-04-12 09:54:03 +000010333 echo "$as_me: failed program was:" >&5
10334cat conftest.$ac_ext >&5
10335
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010336 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010337 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10338echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10339if test "${ac_cv_func_pthread_detach+set}" = set; then
10340 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010341else
Martin v. Löwis11437992002-04-12 09:54:03 +000010342 cat >conftest.$ac_ext <<_ACEOF
10343#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010344#include "confdefs.h"
10345/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010346 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010347#include <assert.h>
10348/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010349#ifdef __cplusplus
10350extern "C"
10351#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010352/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 builtin and then its argument prototype would still apply. */
10354char pthread_detach ();
10355char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010356
Martin v. Löwis11437992002-04-12 09:54:03 +000010357#ifdef F77_DUMMY_MAIN
10358# ifdef __cplusplus
10359 extern "C"
10360# endif
10361 int F77_DUMMY_MAIN() { return 1; }
10362#endif
10363int
10364main ()
10365{
Guido van Rossumad678af1998-10-02 14:42:15 +000010366/* The GNU C library defines this for functions which it implements
10367 to always fail with ENOSYS. Some functions are actually named
10368 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010369#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010370choke me
10371#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010372f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010373#endif
10374
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 ;
10376 return 0;
10377}
10378_ACEOF
10379rm -f conftest.$ac_objext conftest$ac_exeext
10380if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10381 (eval $ac_link) 2>&5
10382 ac_status=$?
10383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10384 (exit $ac_status); } &&
10385 { ac_try='test -s conftest$ac_exeext'
10386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10387 (eval $ac_try) 2>&5
10388 ac_status=$?
10389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10390 (exit $ac_status); }; }; then
10391 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010392else
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 echo "$as_me: failed program was:" >&5
10394cat conftest.$ac_ext >&5
10395ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010397rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010398fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010399echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10400echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10401if test $ac_cv_func_pthread_detach = yes; then
10402 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010403#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010404_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010405
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010406 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010407 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010408else
Guido van Rossumad678af1998-10-02 14:42:15 +000010409
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010410 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10411 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10412echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10413if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10414 echo $ECHO_N "(cached) $ECHO_C" >&6
10415fi
10416echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10417echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10418else
10419 # Is the header compilable?
10420echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10421echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10422cat >conftest.$ac_ext <<_ACEOF
10423#line $LINENO "configure"
10424#include "confdefs.h"
10425$ac_includes_default
10426#include <atheos/threads.h>
10427_ACEOF
10428rm -f conftest.$ac_objext
10429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10430 (eval $ac_compile) 2>&5
10431 ac_status=$?
10432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10433 (exit $ac_status); } &&
10434 { ac_try='test -s conftest.$ac_objext'
10435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10436 (eval $ac_try) 2>&5
10437 ac_status=$?
10438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10439 (exit $ac_status); }; }; then
10440 ac_header_compiler=yes
10441else
10442 echo "$as_me: failed program was:" >&5
10443cat conftest.$ac_ext >&5
10444ac_header_compiler=no
10445fi
10446rm -f conftest.$ac_objext conftest.$ac_ext
10447echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10448echo "${ECHO_T}$ac_header_compiler" >&6
10449
10450# Is the header present?
10451echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10452echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10453cat >conftest.$ac_ext <<_ACEOF
10454#line $LINENO "configure"
10455#include "confdefs.h"
10456#include <atheos/threads.h>
10457_ACEOF
10458if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10459 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10460 ac_status=$?
10461 egrep -v '^ *\+' conftest.er1 >conftest.err
10462 rm -f conftest.er1
10463 cat conftest.err >&5
10464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10465 (exit $ac_status); } >/dev/null; then
10466 if test -s conftest.err; then
10467 ac_cpp_err=$ac_c_preproc_warn_flag
10468 else
10469 ac_cpp_err=
10470 fi
10471else
10472 ac_cpp_err=yes
10473fi
10474if test -z "$ac_cpp_err"; then
10475 ac_header_preproc=yes
10476else
10477 echo "$as_me: failed program was:" >&5
10478 cat conftest.$ac_ext >&5
10479 ac_header_preproc=no
10480fi
10481rm -f conftest.err conftest.$ac_ext
10482echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10483echo "${ECHO_T}$ac_header_preproc" >&6
10484
10485# So? What about this header?
10486case $ac_header_compiler:$ac_header_preproc in
10487 yes:no )
10488 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10489echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10490 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10491echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10492 no:yes )
10493 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10494echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10495 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10496echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10497 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10498echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10499esac
10500echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10501echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10502if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10503 echo $ECHO_N "(cached) $ECHO_C" >&6
10504else
10505 ac_cv_header_atheos_threads_h=$ac_header_preproc
10506fi
10507echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10508echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10509
10510fi
10511if test $ac_cv_header_atheos_threads_h = yes; then
10512 cat >>confdefs.h <<\_ACEOF
10513#define WITH_THREAD 1
10514_ACEOF
10515
10516
10517cat >>confdefs.h <<\_ACEOF
10518#define ATHEOS_THREADS 1
10519_ACEOF
10520
10521 THREADOBJ="Python/thread.o"
10522else
10523
Martin v. Löwis11437992002-04-12 09:54:03 +000010524 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10525 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10526echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10527if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10528 echo $ECHO_N "(cached) $ECHO_C" >&6
10529fi
10530echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10531echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010532else
Martin v. Löwis11437992002-04-12 09:54:03 +000010533 # Is the header compilable?
10534echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10535echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10536cat >conftest.$ac_ext <<_ACEOF
10537#line $LINENO "configure"
10538#include "confdefs.h"
10539$ac_includes_default
10540#include <kernel/OS.h>
10541_ACEOF
10542rm -f conftest.$ac_objext
10543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10544 (eval $ac_compile) 2>&5
10545 ac_status=$?
10546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10547 (exit $ac_status); } &&
10548 { ac_try='test -s conftest.$ac_objext'
10549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10550 (eval $ac_try) 2>&5
10551 ac_status=$?
10552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10553 (exit $ac_status); }; }; then
10554 ac_header_compiler=yes
10555else
10556 echo "$as_me: failed program was:" >&5
10557cat conftest.$ac_ext >&5
10558ac_header_compiler=no
10559fi
10560rm -f conftest.$ac_objext conftest.$ac_ext
10561echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10562echo "${ECHO_T}$ac_header_compiler" >&6
10563
10564# Is the header present?
10565echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10566echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10567cat >conftest.$ac_ext <<_ACEOF
10568#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010569#include "confdefs.h"
10570#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010571_ACEOF
10572if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10573 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10574 ac_status=$?
10575 egrep -v '^ *\+' conftest.er1 >conftest.err
10576 rm -f conftest.er1
10577 cat conftest.err >&5
10578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10579 (exit $ac_status); } >/dev/null; then
10580 if test -s conftest.err; then
10581 ac_cpp_err=$ac_c_preproc_warn_flag
10582 else
10583 ac_cpp_err=
10584 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010585else
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 ac_cpp_err=yes
10587fi
10588if test -z "$ac_cpp_err"; then
10589 ac_header_preproc=yes
10590else
10591 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010592 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010594fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010595rm -f conftest.err conftest.$ac_ext
10596echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10597echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010598
Martin v. Löwis11437992002-04-12 09:54:03 +000010599# So? What about this header?
10600case $ac_header_compiler:$ac_header_preproc in
10601 yes:no )
10602 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10603echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10604 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10605echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10606 no:yes )
10607 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10608echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10609 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10610echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10611 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10612echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10613esac
10614echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10615echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10616if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10617 echo $ECHO_N "(cached) $ECHO_C" >&6
10618else
10619 ac_cv_header_kernel_OS_h=$ac_header_preproc
10620fi
10621echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10622echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10623
10624fi
10625if test $ac_cv_header_kernel_OS_h = yes; then
10626 cat >>confdefs.h <<\_ACEOF
10627#define WITH_THREAD 1
10628_ACEOF
10629
10630
10631cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010632#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010633_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010634
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010635 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010636else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010637
Martin v. Löwis11437992002-04-12 09:54:03 +000010638 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10639echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10640if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10641 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010642else
Martin v. Löwis11437992002-04-12 09:54:03 +000010643 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010644LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010645cat >conftest.$ac_ext <<_ACEOF
10646#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010647#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010648
Greg Steinadf63d62000-07-05 10:38:09 +000010649/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010650#ifdef __cplusplus
10651extern "C"
10652#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010653/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010654 builtin and then its argument prototype would still apply. */
10655char pthread_create ();
10656#ifdef F77_DUMMY_MAIN
10657# ifdef __cplusplus
10658 extern "C"
10659# endif
10660 int F77_DUMMY_MAIN() { return 1; }
10661#endif
10662int
10663main ()
10664{
10665pthread_create ();
10666 ;
10667 return 0;
10668}
10669_ACEOF
10670rm -f conftest.$ac_objext conftest$ac_exeext
10671if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10672 (eval $ac_link) 2>&5
10673 ac_status=$?
10674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10675 (exit $ac_status); } &&
10676 { ac_try='test -s conftest$ac_exeext'
10677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10678 (eval $ac_try) 2>&5
10679 ac_status=$?
10680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10681 (exit $ac_status); }; }; then
10682 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010683else
Martin v. Löwis11437992002-04-12 09:54:03 +000010684 echo "$as_me: failed program was:" >&5
10685cat conftest.$ac_ext >&5
10686ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010687fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010688rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10689LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010690fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010691echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10692echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10693if test $ac_cv_lib_pthreads_pthread_create = yes; then
10694 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010695#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010696_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010697
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010698 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010699 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010700 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010701else
Greg Steinadf63d62000-07-05 10:38:09 +000010702
Martin v. Löwis11437992002-04-12 09:54:03 +000010703 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10704echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10705if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10706 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010707else
Martin v. Löwis11437992002-04-12 09:54:03 +000010708 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010709LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010710cat >conftest.$ac_ext <<_ACEOF
10711#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010712#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010713
Guido van Rossum49545951997-12-02 19:28:29 +000010714/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010715#ifdef __cplusplus
10716extern "C"
10717#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010718/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010719 builtin and then its argument prototype would still apply. */
10720char pthread_create ();
10721#ifdef F77_DUMMY_MAIN
10722# ifdef __cplusplus
10723 extern "C"
10724# endif
10725 int F77_DUMMY_MAIN() { return 1; }
10726#endif
10727int
10728main ()
10729{
10730pthread_create ();
10731 ;
10732 return 0;
10733}
10734_ACEOF
10735rm -f conftest.$ac_objext conftest$ac_exeext
10736if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10737 (eval $ac_link) 2>&5
10738 ac_status=$?
10739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10740 (exit $ac_status); } &&
10741 { ac_try='test -s conftest$ac_exeext'
10742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10743 (eval $ac_try) 2>&5
10744 ac_status=$?
10745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10746 (exit $ac_status); }; }; then
10747 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010748else
Martin v. Löwis11437992002-04-12 09:54:03 +000010749 echo "$as_me: failed program was:" >&5
10750cat conftest.$ac_ext >&5
10751ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010752fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010753rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10754LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010755fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010756echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10757echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10758if test $ac_cv_lib_c_r_pthread_create = yes; then
10759 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010760#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010761_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010762
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010763 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010764 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010765 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010766else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010767
Martin v. Löwis11437992002-04-12 09:54:03 +000010768 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10769echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10770if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10771 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010772else
Martin v. Löwis11437992002-04-12 09:54:03 +000010773 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010774LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010775cat >conftest.$ac_ext <<_ACEOF
10776#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010777#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010778
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010779/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010780#ifdef __cplusplus
10781extern "C"
10782#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010783/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010784 builtin and then its argument prototype would still apply. */
10785char __d6_pthread_create ();
10786#ifdef F77_DUMMY_MAIN
10787# ifdef __cplusplus
10788 extern "C"
10789# endif
10790 int F77_DUMMY_MAIN() { return 1; }
10791#endif
10792int
10793main ()
10794{
10795__d6_pthread_create ();
10796 ;
10797 return 0;
10798}
10799_ACEOF
10800rm -f conftest.$ac_objext conftest$ac_exeext
10801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10802 (eval $ac_link) 2>&5
10803 ac_status=$?
10804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10805 (exit $ac_status); } &&
10806 { ac_try='test -s conftest$ac_exeext'
10807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10808 (eval $ac_try) 2>&5
10809 ac_status=$?
10810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10811 (exit $ac_status); }; }; then
10812 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010813else
Martin v. Löwis11437992002-04-12 09:54:03 +000010814 echo "$as_me: failed program was:" >&5
10815cat conftest.$ac_ext >&5
10816ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010817fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010818rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10819LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010820fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010821echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10822echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10823if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10824 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010825#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010826_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010827
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010828 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010829 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010830 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010831else
Guido van Rossum49545951997-12-02 19:28:29 +000010832
Martin v. Löwis11437992002-04-12 09:54:03 +000010833 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10834echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10835if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10836 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010837else
Martin v. Löwis11437992002-04-12 09:54:03 +000010838 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010839LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010840cat >conftest.$ac_ext <<_ACEOF
10841#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010842#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010843
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010844/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010845#ifdef __cplusplus
10846extern "C"
10847#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010848/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010849 builtin and then its argument prototype would still apply. */
10850char __pthread_create_system ();
10851#ifdef F77_DUMMY_MAIN
10852# ifdef __cplusplus
10853 extern "C"
10854# endif
10855 int F77_DUMMY_MAIN() { return 1; }
10856#endif
10857int
10858main ()
10859{
10860__pthread_create_system ();
10861 ;
10862 return 0;
10863}
10864_ACEOF
10865rm -f conftest.$ac_objext conftest$ac_exeext
10866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10867 (eval $ac_link) 2>&5
10868 ac_status=$?
10869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10870 (exit $ac_status); } &&
10871 { ac_try='test -s conftest$ac_exeext'
10872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10873 (eval $ac_try) 2>&5
10874 ac_status=$?
10875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10876 (exit $ac_status); }; }; then
10877 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010878else
Martin v. Löwis11437992002-04-12 09:54:03 +000010879 echo "$as_me: failed program was:" >&5
10880cat conftest.$ac_ext >&5
10881ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010882fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010883rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10884LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010885fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010886echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10887echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10888if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10889 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010890#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010891_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010892
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010893 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010894 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010895 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010896else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010897
Martin v. Löwis11437992002-04-12 09:54:03 +000010898 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10899echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10900if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10901 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010902else
Martin v. Löwis11437992002-04-12 09:54:03 +000010903 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010904LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010905cat >conftest.$ac_ext <<_ACEOF
10906#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010907#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010908
Guido van Rossumb93a8621998-05-07 13:27:32 +000010909/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010910#ifdef __cplusplus
10911extern "C"
10912#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010913/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010914 builtin and then its argument prototype would still apply. */
10915char pthread_create ();
10916#ifdef F77_DUMMY_MAIN
10917# ifdef __cplusplus
10918 extern "C"
10919# endif
10920 int F77_DUMMY_MAIN() { return 1; }
10921#endif
10922int
10923main ()
10924{
10925pthread_create ();
10926 ;
10927 return 0;
10928}
10929_ACEOF
10930rm -f conftest.$ac_objext conftest$ac_exeext
10931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10932 (eval $ac_link) 2>&5
10933 ac_status=$?
10934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10935 (exit $ac_status); } &&
10936 { ac_try='test -s conftest$ac_exeext'
10937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10938 (eval $ac_try) 2>&5
10939 ac_status=$?
10940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10941 (exit $ac_status); }; }; then
10942 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010943else
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 echo "$as_me: failed program was:" >&5
10945cat conftest.$ac_ext >&5
10946ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010947fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010948rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10949LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010950fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010951echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10952echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10953if test $ac_cv_lib_cma_pthread_create = yes; then
10954 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010955#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010956_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010957
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010958 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010959 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010960 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010961else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010962
Martin v. Löwis130fb172001-07-19 11:00:41 +000010963 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010964fi
10965
Guido van Rossum627b2d71993-12-24 10:39:16 +000010966
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010967fi
10968
Guido van Rossum0be3e491997-05-22 20:33:33 +000010969fi
10970
Guido van Rossum49545951997-12-02 19:28:29 +000010971fi
10972
Guido van Rossumb93a8621998-05-07 13:27:32 +000010973fi
10974
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010975fi
10976
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010977
Michael W. Hudson54241132001-12-07 15:38:26 +000010978fi
10979
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010980
10981fi
10982
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010983fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010984rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10985fi;
10986fi
10987
10988
10989fi
10990
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010991
Michael W. Hudson54241132001-12-07 15:38:26 +000010992
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010993 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010994 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010995
10996cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010997#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010998_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010999
11000 fi
11001
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11003echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11004 if test "${ac_cv_pthread_system_supported+set}" = set; then
11005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011006else
11007 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011008 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011009else
Martin v. Löwis11437992002-04-12 09:54:03 +000011010 cat >conftest.$ac_ext <<_ACEOF
11011#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011012#include "confdefs.h"
11013#include <pthread.h>
11014 void *foo(void *parm) {
11015 return NULL;
11016 }
11017 main() {
11018 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011019 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011020 if (pthread_attr_init(&attr)) exit(-1);
11021 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011022 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011023 exit(0);
11024 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011025_ACEOF
11026rm -f conftest$ac_exeext
11027if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11028 (eval $ac_link) 2>&5
11029 ac_status=$?
11030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11033 (eval $ac_try) 2>&5
11034 ac_status=$?
11035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11036 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011037 ac_cv_pthread_system_supported=yes
11038else
Martin v. Löwis11437992002-04-12 09:54:03 +000011039 echo "$as_me: program exited with status $ac_status" >&5
11040echo "$as_me: failed program was:" >&5
11041cat conftest.$ac_ext >&5
11042( exit $ac_status )
11043ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011045rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011046fi
11047
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011048fi
11049
Martin v. Löwis11437992002-04-12 09:54:03 +000011050 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11051echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011052 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011053
11054cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011055#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011056_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011057
11058 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011059
11060for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011061do
Martin v. Löwis11437992002-04-12 09:54:03 +000011062as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11063echo "$as_me:$LINENO: checking for $ac_func" >&5
11064echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11065if eval "test \"\${$as_ac_var+set}\" = set"; then
11066 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011067else
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 cat >conftest.$ac_ext <<_ACEOF
11069#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011070#include "confdefs.h"
11071/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011072 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011073#include <assert.h>
11074/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011075#ifdef __cplusplus
11076extern "C"
11077#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011078/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011079 builtin and then its argument prototype would still apply. */
11080char $ac_func ();
11081char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011082
Martin v. Löwis11437992002-04-12 09:54:03 +000011083#ifdef F77_DUMMY_MAIN
11084# ifdef __cplusplus
11085 extern "C"
11086# endif
11087 int F77_DUMMY_MAIN() { return 1; }
11088#endif
11089int
11090main ()
11091{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011092/* The GNU C library defines this for functions which it implements
11093 to always fail with ENOSYS. Some functions are actually named
11094 something starting with __ and the normal name is an alias. */
11095#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11096choke me
11097#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011098f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011099#endif
11100
Martin v. Löwis11437992002-04-12 09:54:03 +000011101 ;
11102 return 0;
11103}
11104_ACEOF
11105rm -f conftest.$ac_objext conftest$ac_exeext
11106if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11107 (eval $ac_link) 2>&5
11108 ac_status=$?
11109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11110 (exit $ac_status); } &&
11111 { ac_try='test -s conftest$ac_exeext'
11112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11113 (eval $ac_try) 2>&5
11114 ac_status=$?
11115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11116 (exit $ac_status); }; }; then
11117 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011118else
Martin v. Löwis11437992002-04-12 09:54:03 +000011119 echo "$as_me: failed program was:" >&5
11120cat conftest.$ac_ext >&5
11121eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011122fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011123rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011125echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11126echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11127if test `eval echo '${'$as_ac_var'}'` = yes; then
11128 cat >>confdefs.h <<_ACEOF
11129#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11130_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011131
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011132fi
11133done
11134
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011135 fi
11136
Martin v. Löwis11437992002-04-12 09:54:03 +000011137 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11138echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11139if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11140 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011141else
Martin v. Löwis11437992002-04-12 09:54:03 +000011142 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011143LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011144cat >conftest.$ac_ext <<_ACEOF
11145#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011146#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011147
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011148/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011149#ifdef __cplusplus
11150extern "C"
11151#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011152/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011153 builtin and then its argument prototype would still apply. */
11154char usconfig ();
11155#ifdef F77_DUMMY_MAIN
11156# ifdef __cplusplus
11157 extern "C"
11158# endif
11159 int F77_DUMMY_MAIN() { return 1; }
11160#endif
11161int
11162main ()
11163{
11164usconfig ();
11165 ;
11166 return 0;
11167}
11168_ACEOF
11169rm -f conftest.$ac_objext conftest$ac_exeext
11170if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11171 (eval $ac_link) 2>&5
11172 ac_status=$?
11173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11174 (exit $ac_status); } &&
11175 { ac_try='test -s conftest$ac_exeext'
11176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11177 (eval $ac_try) 2>&5
11178 ac_status=$?
11179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11180 (exit $ac_status); }; }; then
11181 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011182else
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 echo "$as_me: failed program was:" >&5
11184cat conftest.$ac_ext >&5
11185ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011186fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011187rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11188LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011189fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011190echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11191echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11192if test $ac_cv_lib_mpc_usconfig = yes; then
11193 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011194#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011195_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011196
Martin v. Löwis130fb172001-07-19 11:00:41 +000011197 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011198 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011199 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011200fi
11201
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011202
Martin v. Löwis11437992002-04-12 09:54:03 +000011203 if test $posix_threads != "yes"; then
11204 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11205echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11206if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11207 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011208else
Martin v. Löwis11437992002-04-12 09:54:03 +000011209 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011210LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011211cat >conftest.$ac_ext <<_ACEOF
11212#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011213#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011214
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011215/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011216#ifdef __cplusplus
11217extern "C"
11218#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011219/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011220 builtin and then its argument prototype would still apply. */
11221char thr_create ();
11222#ifdef F77_DUMMY_MAIN
11223# ifdef __cplusplus
11224 extern "C"
11225# endif
11226 int F77_DUMMY_MAIN() { return 1; }
11227#endif
11228int
11229main ()
11230{
11231thr_create ();
11232 ;
11233 return 0;
11234}
11235_ACEOF
11236rm -f conftest.$ac_objext conftest$ac_exeext
11237if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11238 (eval $ac_link) 2>&5
11239 ac_status=$?
11240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11241 (exit $ac_status); } &&
11242 { ac_try='test -s conftest$ac_exeext'
11243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11244 (eval $ac_try) 2>&5
11245 ac_status=$?
11246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11247 (exit $ac_status); }; }; then
11248 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011249else
Martin v. Löwis11437992002-04-12 09:54:03 +000011250 echo "$as_me: failed program was:" >&5
11251cat conftest.$ac_ext >&5
11252ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011253fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011254rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11255LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011256fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011257echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11258echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11259if test $ac_cv_lib_thread_thr_create = yes; then
11260 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011261#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011262_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011263
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011264 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011265 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011266 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011267fi
11268
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011269 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011270
Martin v. Löwis130fb172001-07-19 11:00:41 +000011271 if test "$USE_THREAD_MODULE" != "#"
11272 then
11273 # If the above checks didn't disable threads, (at least) OSF1
11274 # needs this '-threads' argument during linking.
11275 case $ac_sys_system in
11276 OSF1) LDLAST=-threads;;
11277 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011278 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011279
11280 if test "$posix_threads" = yes -a \
11281 "$ac_sys_system" = "SunOS" -a \
11282 "$ac_sys_release" = "5.6"; then
11283
11284cat >>confdefs.h <<\_ACEOF
11285#define HAVE_PTHREAD_DESTRUCTOR 1
11286_ACEOF
11287
11288 fi
11289
Guido van Rossum627b2d71993-12-24 10:39:16 +000011290fi
11291
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011292# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011293
11294
11295echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11296echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011297# Check whether --enable-ipv6 or --disable-ipv6 was given.
11298if test "${enable_ipv6+set}" = set; then
11299 enableval="$enable_ipv6"
11300 case "$enableval" in
11301 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 echo "$as_me:$LINENO: result: no" >&5
11303echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011304 ipv6=no
11305 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011306 *) echo "$as_me:$LINENO: result: yes" >&5
11307echo "${ECHO_T}yes" >&6
11308 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011309#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011310_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011311
11312 ipv6=yes
11313 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011315else
Martin v. Löwis11437992002-04-12 09:54:03 +000011316
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011317 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 echo "$as_me:$LINENO: result: no" >&5
11319echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011320 ipv6=no
11321
11322else
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 cat >conftest.$ac_ext <<_ACEOF
11324#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011325#include "confdefs.h"
11326 /* AF_INET6 available check */
11327#include <sys/types.h>
11328#include <sys/socket.h>
11329main()
11330{
11331 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11332 exit(1);
11333 else
11334 exit(0);
11335}
11336
Martin v. Löwis11437992002-04-12 09:54:03 +000011337_ACEOF
11338rm -f conftest$ac_exeext
11339if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11340 (eval $ac_link) 2>&5
11341 ac_status=$?
11342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11343 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11345 (eval $ac_try) 2>&5
11346 ac_status=$?
11347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11348 (exit $ac_status); }; }; then
11349 echo "$as_me:$LINENO: result: yes" >&5
11350echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011351 ipv6=yes
11352else
Martin v. Löwis11437992002-04-12 09:54:03 +000011353 echo "$as_me: program exited with status $ac_status" >&5
11354echo "$as_me: failed program was:" >&5
11355cat conftest.$ac_ext >&5
11356( exit $ac_status )
11357echo "$as_me:$LINENO: result: no" >&5
11358echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011359 ipv6=no
11360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011361rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011362fi
11363
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011364if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11366echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11367 cat >conftest.$ac_ext <<_ACEOF
11368#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011369#include "confdefs.h"
11370#include <sys/types.h>
11371#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011372#ifdef F77_DUMMY_MAIN
11373# ifdef __cplusplus
11374 extern "C"
11375# endif
11376 int F77_DUMMY_MAIN() { return 1; }
11377#endif
11378int
11379main ()
11380{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011381struct sockaddr_in6 x;
11382x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 ;
11384 return 0;
11385}
11386_ACEOF
11387rm -f conftest.$ac_objext
11388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11389 (eval $ac_compile) 2>&5
11390 ac_status=$?
11391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11392 (exit $ac_status); } &&
11393 { ac_try='test -s conftest.$ac_objext'
11394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11395 (eval $ac_try) 2>&5
11396 ac_status=$?
11397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11398 (exit $ac_status); }; }; then
11399 echo "$as_me:$LINENO: result: yes" >&5
11400echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011401 ipv6=yes
11402else
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 echo "$as_me: failed program was:" >&5
11404cat conftest.$ac_ext >&5
11405echo "$as_me:$LINENO: result: no" >&5
11406echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011407 ipv6=no
11408fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011409rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011410fi
11411
11412if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011413 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011414#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011415_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011416
11417fi
11418
Martin v. Löwis11437992002-04-12 09:54:03 +000011419fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011420
11421ipv6type=unknown
11422ipv6lib=none
11423ipv6trylibc=no
11424
11425if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011426 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11427echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011428 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11429 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011430 case $i in
11431 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 cat >conftest.$ac_ext <<_ACEOF
11433#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011434#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011435
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011436#include <netinet/in.h>
11437#ifdef IPV6_INRIA_VERSION
11438yes
11439#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011440_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11442 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011443 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011444fi
11445rm -f conftest*
11446
11447 ;;
11448 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 cat >conftest.$ac_ext <<_ACEOF
11450#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011451#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011452
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011453#include <netinet/in.h>
11454#ifdef __KAME__
11455yes
11456#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011457_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11459 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011460 ipv6type=$i;
11461 ipv6lib=inet6
11462 ipv6libdir=/usr/local/v6/lib
11463 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011464fi
11465rm -f conftest*
11466
11467 ;;
11468 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 cat >conftest.$ac_ext <<_ACEOF
11470#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011471#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011472
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011473#include <features.h>
11474#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11475yes
11476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011477_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11479 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011480 ipv6type=$i;
11481 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011482fi
11483rm -f conftest*
11484
11485 ;;
11486 linux-inet6)
11487 if test -d /usr/inet6; then
11488 ipv6type=$i
11489 ipv6lib=inet6
11490 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011491 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011492 fi
11493 ;;
11494 solaris)
11495 if test -f /etc/netconfig; then
11496 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11497 ipv6type=$i
11498 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011499 fi
11500 fi
11501 ;;
11502 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011503 cat >conftest.$ac_ext <<_ACEOF
11504#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011505#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011506
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011507#include <sys/param.h>
11508#ifdef _TOSHIBA_INET6
11509yes
11510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011511_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11513 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011514 ipv6type=$i;
11515 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011516 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011517fi
11518rm -f conftest*
11519
11520 ;;
11521 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 cat >conftest.$ac_ext <<_ACEOF
11523#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011524#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011525
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011526#include </usr/local/v6/include/sys/v6config.h>
11527#ifdef __V6D__
11528yes
11529#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011530_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011531if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11532 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011533 ipv6type=$i;
11534 ipv6lib=v6;
11535 ipv6libdir=/usr/local/v6/lib;
11536 OPT="-I/usr/local/v6/include $OPT"
11537fi
11538rm -f conftest*
11539
11540 ;;
11541 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011542 cat >conftest.$ac_ext <<_ACEOF
11543#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011544#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011545
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011546#include <sys/param.h>
11547#ifdef _ZETA_MINAMI_INET6
11548yes
11549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011550_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11552 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011553 ipv6type=$i;
11554 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011555 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011556fi
11557rm -f conftest*
11558
11559 ;;
11560 esac
11561 if test "$ipv6type" != "unknown"; then
11562 break
11563 fi
11564 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011565 echo "$as_me:$LINENO: result: $ipv6type" >&5
11566echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011567fi
11568
11569if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11570 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11571 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11572 echo "using lib$ipv6lib"
11573 else
11574 if test $ipv6trylibc = "yes"; then
11575 echo "using libc"
11576 else
11577 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11578 echo "You need to fetch lib$ipv6lib.a from appropriate"
11579 echo 'ipv6 kit and compile beforehand.'
11580 exit 1
11581 fi
11582 fi
11583fi
11584
Jack Jansen7b8c7542002-04-14 20:12:41 +000011585# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011586echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11587echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011588
11589# Check whether --with-universal-newlines or --without-universal-newlines was given.
11590if test "${with_universal_newlines+set}" = set; then
11591 withval="$with_universal_newlines"
11592
11593fi;
11594
11595if test -z "$with_universal_newlines"
11596then with_universal_newlines="yes"
11597fi
11598if test "$with_universal_newlines" != "no"
11599then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011600
11601cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011602#define WITH_UNIVERSAL_NEWLINES 1
11603_ACEOF
11604
11605fi
11606echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11607echo "${ECHO_T}$with_universal_newlines" >&6
11608
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011609# Check for --with-doc-strings
11610echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11611echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11612
11613# Check whether --with-doc-strings or --without-doc-strings was given.
11614if test "${with_doc_strings+set}" = set; then
11615 withval="$with_doc_strings"
11616
11617fi;
11618
11619if test -z "$with_doc_strings"
11620then with_doc_strings="yes"
11621fi
11622if test "$with_doc_strings" != "no"
11623then
11624
11625cat >>confdefs.h <<\_ACEOF
11626#define WITH_DOC_STRINGS 1
11627_ACEOF
11628
11629fi
11630echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11631echo "${ECHO_T}$with_doc_strings" >&6
11632
Neil Schemenauera35c6882001-02-27 04:45:05 +000011633# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011634echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11635echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11636
Neil Schemenauera35c6882001-02-27 04:45:05 +000011637# Check whether --with-pymalloc or --without-pymalloc was given.
11638if test "${with_pymalloc+set}" = set; then
11639 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011640
Martin v. Löwis11437992002-04-12 09:54:03 +000011641fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011642
Neil Schemenauer16c22972002-03-22 15:34:49 +000011643if test -z "$with_pymalloc"
11644then with_pymalloc="yes"
11645fi
11646if test "$with_pymalloc" != "no"
11647then
Martin v. Löwis11437992002-04-12 09:54:03 +000011648
11649cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011650#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011651_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011652
11653fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011654echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11655echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011656
Barry Warsawef82cd72000-06-30 16:21:01 +000011657# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011658echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11659echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11660
Barry Warsawef82cd72000-06-30 16:21:01 +000011661# Check whether --with-wctype-functions or --without-wctype-functions was given.
11662if test "${with_wctype_functions+set}" = set; then
11663 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011664
Barry Warsawef82cd72000-06-30 16:21:01 +000011665if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011666then
11667
11668cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011669#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011670_ACEOF
11671
11672 echo "$as_me:$LINENO: result: yes" >&5
11673echo "${ECHO_T}yes" >&6
11674else echo "$as_me:$LINENO: result: no" >&5
11675echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011676fi
11677else
Martin v. Löwis11437992002-04-12 09:54:03 +000011678 echo "$as_me:$LINENO: result: no" >&5
11679echo "${ECHO_T}no" >&6
11680fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011681
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011682# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011683
Guido van Rossum98935bf2001-09-05 19:13:16 +000011684DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011685
Martin v. Löwis11437992002-04-12 09:54:03 +000011686echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11687echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11688
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011689# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011690if test "${with_sgi_dl+set}" = set; then
11691 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011692
11693echo "$as_me:$LINENO: result: $withval" >&5
11694echo "${ECHO_T}$withval" >&6
11695
11696cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011697#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011698_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011699
Guido van Rossume97ee181999-12-20 21:27:22 +000011700DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011701dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011702if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011703then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011704else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11705echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11706 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011707fi
11708DLINCLDIR=${dldir}
11709LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011710else
Martin v. Löwis11437992002-04-12 09:54:03 +000011711 echo "$as_me:$LINENO: result: no" >&5
11712echo "${ECHO_T}no" >&6
11713fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011714
Martin v. Löwis11437992002-04-12 09:54:03 +000011715echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11716echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011717
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011718# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011719if test "${with_dl_dld+set}" = set; then
11720 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011721
11722echo "$as_me:$LINENO: result: $withval" >&5
11723echo "${ECHO_T}$withval" >&6
11724
11725cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011726#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011727_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011728
Guido van Rossume97ee181999-12-20 21:27:22 +000011729DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011730dldir=`echo "$withval" | sed 's/,.*//'`
11731dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011732if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011733then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011734else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11735echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11736 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011737fi
11738DLINCLDIR=${dldir}
11739LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011740else
Martin v. Löwis11437992002-04-12 09:54:03 +000011741 echo "$as_me:$LINENO: result: no" >&5
11742echo "${ECHO_T}no" >&6
11743fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011744
Guido van Rossume97ee181999-12-20 21:27:22 +000011745# the dlopen() function means we might want to use dynload_shlib.o. some
11746# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011747
Thomas Wouters3a584202000-08-05 23:28:51 +000011748for ac_func in dlopen
11749do
Martin v. Löwis11437992002-04-12 09:54:03 +000011750as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11751echo "$as_me:$LINENO: checking for $ac_func" >&5
11752echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11753if eval "test \"\${$as_ac_var+set}\" = set"; then
11754 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011755else
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 cat >conftest.$ac_ext <<_ACEOF
11757#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011758#include "confdefs.h"
11759/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011760 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011761#include <assert.h>
11762/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011763#ifdef __cplusplus
11764extern "C"
11765#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011766/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011767 builtin and then its argument prototype would still apply. */
11768char $ac_func ();
11769char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011770
Martin v. Löwis11437992002-04-12 09:54:03 +000011771#ifdef F77_DUMMY_MAIN
11772# ifdef __cplusplus
11773 extern "C"
11774# endif
11775 int F77_DUMMY_MAIN() { return 1; }
11776#endif
11777int
11778main ()
11779{
Guido van Rossume97ee181999-12-20 21:27:22 +000011780/* The GNU C library defines this for functions which it implements
11781 to always fail with ENOSYS. Some functions are actually named
11782 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011783#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011784choke me
11785#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011786f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011787#endif
11788
Martin v. Löwis11437992002-04-12 09:54:03 +000011789 ;
11790 return 0;
11791}
11792_ACEOF
11793rm -f conftest.$ac_objext conftest$ac_exeext
11794if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11795 (eval $ac_link) 2>&5
11796 ac_status=$?
11797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11798 (exit $ac_status); } &&
11799 { ac_try='test -s conftest$ac_exeext'
11800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11801 (eval $ac_try) 2>&5
11802 ac_status=$?
11803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11804 (exit $ac_status); }; }; then
11805 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011806else
Martin v. Löwis11437992002-04-12 09:54:03 +000011807 echo "$as_me: failed program was:" >&5
11808cat conftest.$ac_ext >&5
11809eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011810fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011811rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011812fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011813echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11814echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11815if test `eval echo '${'$as_ac_var'}'` = yes; then
11816 cat >>confdefs.h <<_ACEOF
11817#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11818_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011819
Guido van Rossume97ee181999-12-20 21:27:22 +000011820fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011821done
Guido van Rossume97ee181999-12-20 21:27:22 +000011822
Michael W. Hudson54241132001-12-07 15:38:26 +000011823
Guido van Rossume97ee181999-12-20 21:27:22 +000011824# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11825# loading of modules.
11826
Martin v. Löwis11437992002-04-12 09:54:03 +000011827echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11828echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011829if test -z "$DYNLOADFILE"
11830then
11831 case $ac_sys_system/$ac_sys_release in
11832 AIX*) DYNLOADFILE="dynload_aix.o";;
11833 BeOS*) DYNLOADFILE="dynload_beos.o";;
11834 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011835 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011836 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011837 *)
11838 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11839 # out any dynamic loading
11840 if test "$ac_cv_func_dlopen" = yes
11841 then DYNLOADFILE="dynload_shlib.o"
11842 else DYNLOADFILE="dynload_stub.o"
11843 fi
11844 ;;
11845 esac
11846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011847echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11848echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011849if test "$DYNLOADFILE" != "dynload_stub.o"
11850then
Martin v. Löwis11437992002-04-12 09:54:03 +000011851
11852cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011853#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011854_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011855
11856fi
11857
Neil Schemenauer4e425612001-06-19 15:44:15 +000011858# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11859
Michael W. Hudson54241132001-12-07 15:38:26 +000011860
Martin v. Löwis11437992002-04-12 09:54:03 +000011861echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11862echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011863if test -z "$MACHDEP_OBJS"
11864then
Jack Jansene578a632001-08-15 01:27:14 +000011865 MACHDEP_OBJS=$extra_machdep_objs
11866else
11867 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011868fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011869echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11870echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011871
Guido van Rossum627b2d71993-12-24 10:39:16 +000011872# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011946
Fred Drake6b3cc522002-04-15 19:20:27 +000011947
Jack Jansen0b06be72002-06-21 14:48:38 +000011948
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011949
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011950
Martin v. Löwis244edc82001-10-04 22:44:26 +000011951for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011952 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011953 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000011954 hstrerror inet_pton kill killpg lchown link lstat mkfifo mknod mktime \
11955 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011956 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011957 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011958 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011959 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011960 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011961 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011962do
Martin v. Löwis11437992002-04-12 09:54:03 +000011963as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11964echo "$as_me:$LINENO: checking for $ac_func" >&5
11965echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11966if eval "test \"\${$as_ac_var+set}\" = set"; then
11967 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011968else
Martin v. Löwis11437992002-04-12 09:54:03 +000011969 cat >conftest.$ac_ext <<_ACEOF
11970#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011971#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011972/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011973 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011974#include <assert.h>
11975/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011976#ifdef __cplusplus
11977extern "C"
11978#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011979/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011980 builtin and then its argument prototype would still apply. */
11981char $ac_func ();
11982char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011983
Martin v. Löwis11437992002-04-12 09:54:03 +000011984#ifdef F77_DUMMY_MAIN
11985# ifdef __cplusplus
11986 extern "C"
11987# endif
11988 int F77_DUMMY_MAIN() { return 1; }
11989#endif
11990int
11991main ()
11992{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011993/* The GNU C library defines this for functions which it implements
11994 to always fail with ENOSYS. Some functions are actually named
11995 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011996#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011997choke me
11998#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011999f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012000#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012001
Martin v. Löwis11437992002-04-12 09:54:03 +000012002 ;
12003 return 0;
12004}
12005_ACEOF
12006rm -f conftest.$ac_objext conftest$ac_exeext
12007if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12008 (eval $ac_link) 2>&5
12009 ac_status=$?
12010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12011 (exit $ac_status); } &&
12012 { ac_try='test -s conftest$ac_exeext'
12013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12014 (eval $ac_try) 2>&5
12015 ac_status=$?
12016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12017 (exit $ac_status); }; }; then
12018 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012019else
Martin v. Löwis11437992002-04-12 09:54:03 +000012020 echo "$as_me: failed program was:" >&5
12021cat conftest.$ac_ext >&5
12022eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012023fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012024rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012025fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012026echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12027echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12028if test `eval echo '${'$as_ac_var'}'` = yes; then
12029 cat >>confdefs.h <<_ACEOF
12030#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12031_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012032
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012033fi
12034done
12035
Michael W. Hudson54241132001-12-07 15:38:26 +000012036
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012037# check for openpty and forkpty
12038
Martin v. Löwis11437992002-04-12 09:54:03 +000012039
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012040for ac_func in openpty
12041do
Martin v. Löwis11437992002-04-12 09:54:03 +000012042as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12043echo "$as_me:$LINENO: checking for $ac_func" >&5
12044echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12045if eval "test \"\${$as_ac_var+set}\" = set"; then
12046 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012047else
Martin v. Löwis11437992002-04-12 09:54:03 +000012048 cat >conftest.$ac_ext <<_ACEOF
12049#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012050#include "confdefs.h"
12051/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012053#include <assert.h>
12054/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012055#ifdef __cplusplus
12056extern "C"
12057#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012058/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012059 builtin and then its argument prototype would still apply. */
12060char $ac_func ();
12061char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012062
Martin v. Löwis11437992002-04-12 09:54:03 +000012063#ifdef F77_DUMMY_MAIN
12064# ifdef __cplusplus
12065 extern "C"
12066# endif
12067 int F77_DUMMY_MAIN() { return 1; }
12068#endif
12069int
12070main ()
12071{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012072/* The GNU C library defines this for functions which it implements
12073 to always fail with ENOSYS. Some functions are actually named
12074 something starting with __ and the normal name is an alias. */
12075#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12076choke me
12077#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012078f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012079#endif
12080
Martin v. Löwis11437992002-04-12 09:54:03 +000012081 ;
12082 return 0;
12083}
12084_ACEOF
12085rm -f conftest.$ac_objext conftest$ac_exeext
12086if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12087 (eval $ac_link) 2>&5
12088 ac_status=$?
12089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12090 (exit $ac_status); } &&
12091 { ac_try='test -s conftest$ac_exeext'
12092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12093 (eval $ac_try) 2>&5
12094 ac_status=$?
12095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12096 (exit $ac_status); }; }; then
12097 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012098else
Martin v. Löwis11437992002-04-12 09:54:03 +000012099 echo "$as_me: failed program was:" >&5
12100cat conftest.$ac_ext >&5
12101eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012103rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012105echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12106echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12107if test `eval echo '${'$as_ac_var'}'` = yes; then
12108 cat >>confdefs.h <<_ACEOF
12109#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12110_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012111
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012112else
Martin v. Löwis11437992002-04-12 09:54:03 +000012113 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12114echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12115if test "${ac_cv_lib_util_openpty+set}" = set; then
12116 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012117else
Martin v. Löwis11437992002-04-12 09:54:03 +000012118 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012119LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012120cat >conftest.$ac_ext <<_ACEOF
12121#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012122#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012123
Fred Drake8cef4cf2000-06-28 16:40:38 +000012124/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012125#ifdef __cplusplus
12126extern "C"
12127#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012128/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012129 builtin and then its argument prototype would still apply. */
12130char openpty ();
12131#ifdef F77_DUMMY_MAIN
12132# ifdef __cplusplus
12133 extern "C"
12134# endif
12135 int F77_DUMMY_MAIN() { return 1; }
12136#endif
12137int
12138main ()
12139{
12140openpty ();
12141 ;
12142 return 0;
12143}
12144_ACEOF
12145rm -f conftest.$ac_objext conftest$ac_exeext
12146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12147 (eval $ac_link) 2>&5
12148 ac_status=$?
12149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12150 (exit $ac_status); } &&
12151 { ac_try='test -s conftest$ac_exeext'
12152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12153 (eval $ac_try) 2>&5
12154 ac_status=$?
12155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12156 (exit $ac_status); }; }; then
12157 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012158else
Martin v. Löwis11437992002-04-12 09:54:03 +000012159 echo "$as_me: failed program was:" >&5
12160cat conftest.$ac_ext >&5
12161ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012162fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012163rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12164LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012165fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012166echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12167echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12168if test $ac_cv_lib_util_openpty = yes; then
12169 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012170#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012171_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012172 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012173fi
12174
12175fi
12176done
12177
Martin v. Löwis11437992002-04-12 09:54:03 +000012178
Fred Drake8cef4cf2000-06-28 16:40:38 +000012179for ac_func in forkpty
12180do
Martin v. Löwis11437992002-04-12 09:54:03 +000012181as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12182echo "$as_me:$LINENO: checking for $ac_func" >&5
12183echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12184if eval "test \"\${$as_ac_var+set}\" = set"; then
12185 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012186else
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 cat >conftest.$ac_ext <<_ACEOF
12188#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012189#include "confdefs.h"
12190/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012191 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012192#include <assert.h>
12193/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012194#ifdef __cplusplus
12195extern "C"
12196#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012197/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012198 builtin and then its argument prototype would still apply. */
12199char $ac_func ();
12200char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012201
Martin v. Löwis11437992002-04-12 09:54:03 +000012202#ifdef F77_DUMMY_MAIN
12203# ifdef __cplusplus
12204 extern "C"
12205# endif
12206 int F77_DUMMY_MAIN() { return 1; }
12207#endif
12208int
12209main ()
12210{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012211/* The GNU C library defines this for functions which it implements
12212 to always fail with ENOSYS. Some functions are actually named
12213 something starting with __ and the normal name is an alias. */
12214#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12215choke me
12216#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012217f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012218#endif
12219
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 ;
12221 return 0;
12222}
12223_ACEOF
12224rm -f conftest.$ac_objext conftest$ac_exeext
12225if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12226 (eval $ac_link) 2>&5
12227 ac_status=$?
12228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12229 (exit $ac_status); } &&
12230 { ac_try='test -s conftest$ac_exeext'
12231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12232 (eval $ac_try) 2>&5
12233 ac_status=$?
12234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12235 (exit $ac_status); }; }; then
12236 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012237else
Martin v. Löwis11437992002-04-12 09:54:03 +000012238 echo "$as_me: failed program was:" >&5
12239cat conftest.$ac_ext >&5
12240eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012241fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012242rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012243fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012244echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12245echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12246if test `eval echo '${'$as_ac_var'}'` = yes; then
12247 cat >>confdefs.h <<_ACEOF
12248#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12249_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012250
Fred Drake8cef4cf2000-06-28 16:40:38 +000012251else
Martin v. Löwis11437992002-04-12 09:54:03 +000012252 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12253echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12254if test "${ac_cv_lib_util_forkpty+set}" = set; then
12255 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012256else
Martin v. Löwis11437992002-04-12 09:54:03 +000012257 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012258LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012259cat >conftest.$ac_ext <<_ACEOF
12260#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012261#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012262
Fred Drake8cef4cf2000-06-28 16:40:38 +000012263/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012264#ifdef __cplusplus
12265extern "C"
12266#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012267/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012268 builtin and then its argument prototype would still apply. */
12269char forkpty ();
12270#ifdef F77_DUMMY_MAIN
12271# ifdef __cplusplus
12272 extern "C"
12273# endif
12274 int F77_DUMMY_MAIN() { return 1; }
12275#endif
12276int
12277main ()
12278{
12279forkpty ();
12280 ;
12281 return 0;
12282}
12283_ACEOF
12284rm -f conftest.$ac_objext conftest$ac_exeext
12285if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12286 (eval $ac_link) 2>&5
12287 ac_status=$?
12288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12289 (exit $ac_status); } &&
12290 { ac_try='test -s conftest$ac_exeext'
12291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12292 (eval $ac_try) 2>&5
12293 ac_status=$?
12294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12295 (exit $ac_status); }; }; then
12296 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012297else
Martin v. Löwis11437992002-04-12 09:54:03 +000012298 echo "$as_me: failed program was:" >&5
12299cat conftest.$ac_ext >&5
12300ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012301fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012302rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12303LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012304fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012305echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12306echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12307if test $ac_cv_lib_util_forkpty = yes; then
12308 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012309#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012310_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012311 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012312fi
12313
12314fi
12315done
12316
Jack Jansendd19cf82001-12-06 22:36:17 +000012317
Michael W. Hudson54241132001-12-07 15:38:26 +000012318# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012319
12320
12321
12322
12323
12324
Fred Drake8cef4cf2000-06-28 16:40:38 +000012325for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12326do
Martin v. Löwis11437992002-04-12 09:54:03 +000012327as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12328echo "$as_me:$LINENO: checking for $ac_func" >&5
12329echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12330if eval "test \"\${$as_ac_var+set}\" = set"; then
12331 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012332else
Martin v. Löwis11437992002-04-12 09:54:03 +000012333 cat >conftest.$ac_ext <<_ACEOF
12334#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012335#include "confdefs.h"
12336/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012337 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012338#include <assert.h>
12339/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012340#ifdef __cplusplus
12341extern "C"
12342#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012343/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012344 builtin and then its argument prototype would still apply. */
12345char $ac_func ();
12346char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012347
Martin v. Löwis11437992002-04-12 09:54:03 +000012348#ifdef F77_DUMMY_MAIN
12349# ifdef __cplusplus
12350 extern "C"
12351# endif
12352 int F77_DUMMY_MAIN() { return 1; }
12353#endif
12354int
12355main ()
12356{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012357/* The GNU C library defines this for functions which it implements
12358 to always fail with ENOSYS. Some functions are actually named
12359 something starting with __ and the normal name is an alias. */
12360#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12361choke me
12362#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012363f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012364#endif
12365
Martin v. Löwis11437992002-04-12 09:54:03 +000012366 ;
12367 return 0;
12368}
12369_ACEOF
12370rm -f conftest.$ac_objext conftest$ac_exeext
12371if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12372 (eval $ac_link) 2>&5
12373 ac_status=$?
12374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12375 (exit $ac_status); } &&
12376 { ac_try='test -s conftest$ac_exeext'
12377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12378 (eval $ac_try) 2>&5
12379 ac_status=$?
12380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12381 (exit $ac_status); }; }; then
12382 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012383else
Martin v. Löwis11437992002-04-12 09:54:03 +000012384 echo "$as_me: failed program was:" >&5
12385cat conftest.$ac_ext >&5
12386eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012387fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012388rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012389fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012390echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12391echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12392if test `eval echo '${'$as_ac_var'}'` = yes; then
12393 cat >>confdefs.h <<_ACEOF
12394#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12395_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012396
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012397fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012398done
12399
Michael W. Hudson54241132001-12-07 15:38:26 +000012400
Martin v. Löwis11437992002-04-12 09:54:03 +000012401
12402
12403
12404
12405
Martin v. Löwis1142de32002-03-29 16:28:31 +000012406for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012407do
Martin v. Löwis11437992002-04-12 09:54:03 +000012408as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12409echo "$as_me:$LINENO: checking for $ac_func" >&5
12410echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12411if eval "test \"\${$as_ac_var+set}\" = set"; then
12412 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012413else
Martin v. Löwis11437992002-04-12 09:54:03 +000012414 cat >conftest.$ac_ext <<_ACEOF
12415#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012416#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012417/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012419#include <assert.h>
12420/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012421#ifdef __cplusplus
12422extern "C"
12423#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012424/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012425 builtin and then its argument prototype would still apply. */
12426char $ac_func ();
12427char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012428
Martin v. Löwis11437992002-04-12 09:54:03 +000012429#ifdef F77_DUMMY_MAIN
12430# ifdef __cplusplus
12431 extern "C"
12432# endif
12433 int F77_DUMMY_MAIN() { return 1; }
12434#endif
12435int
12436main ()
12437{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012438/* The GNU C library defines this for functions which it implements
12439 to always fail with ENOSYS. Some functions are actually named
12440 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012441#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012442choke me
12443#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012444f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012445#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012446
Martin v. Löwis11437992002-04-12 09:54:03 +000012447 ;
12448 return 0;
12449}
12450_ACEOF
12451rm -f conftest.$ac_objext conftest$ac_exeext
12452if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12453 (eval $ac_link) 2>&5
12454 ac_status=$?
12455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12456 (exit $ac_status); } &&
12457 { ac_try='test -s conftest$ac_exeext'
12458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12459 (eval $ac_try) 2>&5
12460 ac_status=$?
12461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12462 (exit $ac_status); }; }; then
12463 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012464else
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 echo "$as_me: failed program was:" >&5
12466cat conftest.$ac_ext >&5
12467eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012468fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012469rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012470fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012471echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12472echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12473if test `eval echo '${'$as_ac_var'}'` = yes; then
12474 cat >>confdefs.h <<_ACEOF
12475#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12476_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012477
Martin v. Löwis1142de32002-03-29 16:28:31 +000012478else
Martin v. Löwis11437992002-04-12 09:54:03 +000012479 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012480fi
12481done
12482
12483
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
Martin v. Löwis1142de32002-03-29 16:28:31 +000012485for ac_func in getpgrp
12486do
Martin v. Löwis11437992002-04-12 09:54:03 +000012487as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12488echo "$as_me:$LINENO: checking for $ac_func" >&5
12489echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12490if eval "test \"\${$as_ac_var+set}\" = set"; then
12491 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012492else
Martin v. Löwis11437992002-04-12 09:54:03 +000012493 cat >conftest.$ac_ext <<_ACEOF
12494#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012495#include "confdefs.h"
12496/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012497 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012498#include <assert.h>
12499/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012500#ifdef __cplusplus
12501extern "C"
12502#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012503/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012504 builtin and then its argument prototype would still apply. */
12505char $ac_func ();
12506char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012507
Martin v. Löwis11437992002-04-12 09:54:03 +000012508#ifdef F77_DUMMY_MAIN
12509# ifdef __cplusplus
12510 extern "C"
12511# endif
12512 int F77_DUMMY_MAIN() { return 1; }
12513#endif
12514int
12515main ()
12516{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012517/* The GNU C library defines this for functions which it implements
12518 to always fail with ENOSYS. Some functions are actually named
12519 something starting with __ and the normal name is an alias. */
12520#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12521choke me
12522#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012523f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012524#endif
12525
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 ;
12527 return 0;
12528}
12529_ACEOF
12530rm -f conftest.$ac_objext conftest$ac_exeext
12531if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12532 (eval $ac_link) 2>&5
12533 ac_status=$?
12534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12535 (exit $ac_status); } &&
12536 { ac_try='test -s conftest$ac_exeext'
12537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12538 (eval $ac_try) 2>&5
12539 ac_status=$?
12540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12541 (exit $ac_status); }; }; then
12542 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012543else
Martin v. Löwis11437992002-04-12 09:54:03 +000012544 echo "$as_me: failed program was:" >&5
12545cat conftest.$ac_ext >&5
12546eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012547fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012548rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012549fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012550echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12551echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12552if test `eval echo '${'$as_ac_var'}'` = yes; then
12553 cat >>confdefs.h <<_ACEOF
12554#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12555_ACEOF
12556 cat >conftest.$ac_ext <<_ACEOF
12557#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012558#include "confdefs.h"
12559#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012560#ifdef F77_DUMMY_MAIN
12561# ifdef __cplusplus
12562 extern "C"
12563# endif
12564 int F77_DUMMY_MAIN() { return 1; }
12565#endif
12566int
12567main ()
12568{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012569getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012570 ;
12571 return 0;
12572}
12573_ACEOF
12574rm -f conftest.$ac_objext
12575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12576 (eval $ac_compile) 2>&5
12577 ac_status=$?
12578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12579 (exit $ac_status); } &&
12580 { ac_try='test -s conftest.$ac_objext'
12581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12582 (eval $ac_try) 2>&5
12583 ac_status=$?
12584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12585 (exit $ac_status); }; }; then
12586
12587cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012588#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012589_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012590
Martin v. Löwis11437992002-04-12 09:54:03 +000012591
Guido van Rossumf78abae1997-01-21 22:02:36 +000012592else
Martin v. Löwis11437992002-04-12 09:54:03 +000012593 echo "$as_me: failed program was:" >&5
12594cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012595fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012596rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012597
Guido van Rossum627b2d71993-12-24 10:39:16 +000012598fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012599done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012600
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012601echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12602echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12603if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012604 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012605else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012606 if test "$cross_compiling" = yes; then
12607 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12608echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12609 { (exit 1); exit 1; }; }
12610else
Martin v. Löwis11437992002-04-12 09:54:03 +000012611 cat >conftest.$ac_ext <<_ACEOF
12612#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012613#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012614#if HAVE_UNISTD_H
12615# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012616#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012617
Martin v. Löwis11437992002-04-12 09:54:03 +000012618#ifdef F77_DUMMY_MAIN
12619# ifdef __cplusplus
12620 extern "C"
12621# endif
12622 int F77_DUMMY_MAIN() { return 1; }
12623#endif
12624int
12625main ()
12626{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012627/* If this system has a BSD-style setpgrp which takes arguments,
12628 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12629 exit successfully. */
12630 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012631 ;
12632 return 0;
12633}
12634_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012635rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12637 (eval $ac_link) 2>&5
12638 ac_status=$?
12639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012640 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012641 { (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
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012646 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012647else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012648 echo "$as_me: program exited with status $ac_status" >&5
12649echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012650cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012651( exit $ac_status )
12652ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012653fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012654rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012655fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012656fi
12657echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12658echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12659if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012660
12661cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012662#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012663_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012664
12665fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012666
Martin v. Löwis11437992002-04-12 09:54:03 +000012667
Thomas Wouters3a584202000-08-05 23:28:51 +000012668for ac_func in gettimeofday
12669do
Martin v. Löwis11437992002-04-12 09:54:03 +000012670as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12671echo "$as_me:$LINENO: checking for $ac_func" >&5
12672echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12673if eval "test \"\${$as_ac_var+set}\" = set"; then
12674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012675else
Martin v. Löwis11437992002-04-12 09:54:03 +000012676 cat >conftest.$ac_ext <<_ACEOF
12677#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012678#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012679/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012681#include <assert.h>
12682/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012683#ifdef __cplusplus
12684extern "C"
12685#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012686/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012687 builtin and then its argument prototype would still apply. */
12688char $ac_func ();
12689char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012690
Martin v. Löwis11437992002-04-12 09:54:03 +000012691#ifdef F77_DUMMY_MAIN
12692# ifdef __cplusplus
12693 extern "C"
12694# endif
12695 int F77_DUMMY_MAIN() { return 1; }
12696#endif
12697int
12698main ()
12699{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012700/* The GNU C library defines this for functions which it implements
12701 to always fail with ENOSYS. Some functions are actually named
12702 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012703#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012704choke me
12705#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012706f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012707#endif
12708
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 ;
12710 return 0;
12711}
12712_ACEOF
12713rm -f conftest.$ac_objext conftest$ac_exeext
12714if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12715 (eval $ac_link) 2>&5
12716 ac_status=$?
12717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12718 (exit $ac_status); } &&
12719 { ac_try='test -s conftest$ac_exeext'
12720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12721 (eval $ac_try) 2>&5
12722 ac_status=$?
12723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12724 (exit $ac_status); }; }; then
12725 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012726else
Martin v. Löwis11437992002-04-12 09:54:03 +000012727 echo "$as_me: failed program was:" >&5
12728cat conftest.$ac_ext >&5
12729eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012730fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012731rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012732fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012733echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12734echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12735if test `eval echo '${'$as_ac_var'}'` = yes; then
12736 cat >>confdefs.h <<_ACEOF
12737#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12738_ACEOF
12739 cat >conftest.$ac_ext <<_ACEOF
12740#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012741#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012742#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012743#ifdef F77_DUMMY_MAIN
12744# ifdef __cplusplus
12745 extern "C"
12746# endif
12747 int F77_DUMMY_MAIN() { return 1; }
12748#endif
12749int
12750main ()
12751{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012752gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012753 ;
12754 return 0;
12755}
12756_ACEOF
12757rm -f conftest.$ac_objext
12758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12759 (eval $ac_compile) 2>&5
12760 ac_status=$?
12761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12762 (exit $ac_status); } &&
12763 { ac_try='test -s conftest.$ac_objext'
12764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12765 (eval $ac_try) 2>&5
12766 ac_status=$?
12767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12768 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012769 :
12770else
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 echo "$as_me: failed program was:" >&5
12772cat conftest.$ac_ext >&5
12773
12774cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012775#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012776_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012777
Martin v. Löwis11437992002-04-12 09:54:03 +000012778
Guido van Rossum627b2d71993-12-24 10:39:16 +000012779fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012780rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012781
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012782fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012783done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012784
Michael W. Hudson54241132001-12-07 15:38:26 +000012785
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012786echo "$as_me:$LINENO: checking for major" >&5
12787echo $ECHO_N "checking for major... $ECHO_C" >&6
12788cat >conftest.$ac_ext <<_ACEOF
12789#line $LINENO "configure"
12790#include "confdefs.h"
12791
12792 #if defined(MAJOR_IN_MKDEV)
12793 #include <sys/mkdev.h>
12794 #elif defined(MAJOR_IN_SYSMACROS)
12795 #include <sys/sysmacros.h>
12796 #else
12797 #include <sys/types.h>
12798 #endif
12799
12800#ifdef F77_DUMMY_MAIN
12801# ifdef __cplusplus
12802 extern "C"
12803# endif
12804 int F77_DUMMY_MAIN() { return 1; }
12805#endif
12806int
12807main ()
12808{
12809
12810 makedev(major(0),minor(0));
12811
12812 ;
12813 return 0;
12814}
12815_ACEOF
12816rm -f conftest.$ac_objext
12817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12818 (eval $ac_compile) 2>&5
12819 ac_status=$?
12820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12821 (exit $ac_status); } &&
12822 { ac_try='test -s conftest.$ac_objext'
12823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12824 (eval $ac_try) 2>&5
12825 ac_status=$?
12826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827 (exit $ac_status); }; }; then
12828
12829
12830cat >>confdefs.h <<\_ACEOF
12831#define HAVE_DEVICE_MACROS 1
12832_ACEOF
12833
12834 echo "$as_me:$LINENO: result: yes" >&5
12835echo "${ECHO_T}yes" >&6
12836
12837else
12838 echo "$as_me: failed program was:" >&5
12839cat conftest.$ac_ext >&5
12840
12841 echo "$as_me:$LINENO: result: no" >&5
12842echo "${ECHO_T}no" >&6
12843
12844fi
12845rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012846
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012847# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012848# for [no]getaddrinfo in netdb.h.
12849echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12850echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12851cat >conftest.$ac_ext <<_ACEOF
12852#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012853#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012854
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012855#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012856#include <sys/socket.h>
12857#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012858#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012859
Martin v. Löwis11437992002-04-12 09:54:03 +000012860#ifdef F77_DUMMY_MAIN
12861# ifdef __cplusplus
12862 extern "C"
12863# endif
12864 int F77_DUMMY_MAIN() { return 1; }
12865#endif
12866int
12867main ()
12868{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012869
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012870getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012871
Martin v. Löwis11437992002-04-12 09:54:03 +000012872 ;
12873 return 0;
12874}
12875_ACEOF
12876rm -f conftest.$ac_objext conftest$ac_exeext
12877if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12878 (eval $ac_link) 2>&5
12879 ac_status=$?
12880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12881 (exit $ac_status); } &&
12882 { ac_try='test -s conftest$ac_exeext'
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
12888
12889echo "$as_me:$LINENO: result: yes" >&5
12890echo "${ECHO_T}yes" >&6
12891echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12892echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012893if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 echo "$as_me:$LINENO: result: buggy" >&5
12895echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012896buggygetaddrinfo=yes
12897else
Martin v. Löwis11437992002-04-12 09:54:03 +000012898 cat >conftest.$ac_ext <<_ACEOF
12899#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012900#include "confdefs.h"
12901
12902#include <sys/types.h>
12903#include <netdb.h>
12904#include <string.h>
12905#include <sys/socket.h>
12906#include <netinet/in.h>
12907
12908main()
12909{
12910 int passive, gaierr, inet4 = 0, inet6 = 0;
12911 struct addrinfo hints, *ai, *aitop;
12912 char straddr[INET6_ADDRSTRLEN], strport[16];
12913
12914 for (passive = 0; passive <= 1; passive++) {
12915 memset(&hints, 0, sizeof(hints));
12916 hints.ai_family = AF_UNSPEC;
12917 hints.ai_flags = passive ? AI_PASSIVE : 0;
12918 hints.ai_socktype = SOCK_STREAM;
12919 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12920 (void)gai_strerror(gaierr);
12921 goto bad;
12922 }
12923 for (ai = aitop; ai; ai = ai->ai_next) {
12924 if (ai->ai_addr == NULL ||
12925 ai->ai_addrlen == 0 ||
12926 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12927 straddr, sizeof(straddr), strport, sizeof(strport),
12928 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12929 goto bad;
12930 }
12931 switch (ai->ai_family) {
12932 case AF_INET:
12933 if (strcmp(strport, "54321") != 0) {
12934 goto bad;
12935 }
12936 if (passive) {
12937 if (strcmp(straddr, "0.0.0.0") != 0) {
12938 goto bad;
12939 }
12940 } else {
12941 if (strcmp(straddr, "127.0.0.1") != 0) {
12942 goto bad;
12943 }
12944 }
12945 inet4++;
12946 break;
12947 case AF_INET6:
12948 if (strcmp(strport, "54321") != 0) {
12949 goto bad;
12950 }
12951 if (passive) {
12952 if (strcmp(straddr, "::") != 0) {
12953 goto bad;
12954 }
12955 } else {
12956 if (strcmp(straddr, "::1") != 0) {
12957 goto bad;
12958 }
12959 }
12960 inet6++;
12961 break;
12962 case AF_UNSPEC:
12963 goto bad;
12964 break;
12965 default:
12966 /* another family support? */
12967 break;
12968 }
12969 }
12970 }
12971
12972 if (!(inet4 == 0 || inet4 == 2))
12973 goto bad;
12974 if (!(inet6 == 0 || inet6 == 2))
12975 goto bad;
12976
12977 if (aitop)
12978 freeaddrinfo(aitop);
12979 exit(0);
12980
12981 bad:
12982 if (aitop)
12983 freeaddrinfo(aitop);
12984 exit(1);
12985}
12986
Martin v. Löwis11437992002-04-12 09:54:03 +000012987_ACEOF
12988rm -f conftest$ac_exeext
12989if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12990 (eval $ac_link) 2>&5
12991 ac_status=$?
12992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12993 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12995 (eval $ac_try) 2>&5
12996 ac_status=$?
12997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12998 (exit $ac_status); }; }; then
12999 echo "$as_me:$LINENO: result: good" >&5
13000echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013001buggygetaddrinfo=no
13002else
Martin v. Löwis11437992002-04-12 09:54:03 +000013003 echo "$as_me: program exited with status $ac_status" >&5
13004echo "$as_me: failed program was:" >&5
13005cat conftest.$ac_ext >&5
13006( exit $ac_status )
13007echo "$as_me:$LINENO: result: buggy" >&5
13008echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013009buggygetaddrinfo=yes
13010fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013011rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013012fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013013else
Martin v. Löwis11437992002-04-12 09:54:03 +000013014 echo "$as_me: failed program was:" >&5
13015cat conftest.$ac_ext >&5
13016
13017echo "$as_me:$LINENO: result: no" >&5
13018echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013019buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013020
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013022rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013023
13024if test "$buggygetaddrinfo" = "yes"; then
13025 if test "$ipv6" = "yes"; then
13026 echo 'Fatal: You must get working getaddrinfo() function.'
13027 echo ' or you can specify "--disable-ipv6"'.
13028 exit 1
13029 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013030else
Martin v. Löwis11437992002-04-12 09:54:03 +000013031
13032cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013033#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013034_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013035
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013036fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013037
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013038for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013039do
Martin v. Löwis11437992002-04-12 09:54:03 +000013040as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13041echo "$as_me:$LINENO: checking for $ac_func" >&5
13042echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13043if eval "test \"\${$as_ac_var+set}\" = set"; then
13044 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013045else
Martin v. Löwis11437992002-04-12 09:54:03 +000013046 cat >conftest.$ac_ext <<_ACEOF
13047#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013048#include "confdefs.h"
13049/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013050 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013051#include <assert.h>
13052/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013053#ifdef __cplusplus
13054extern "C"
13055#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013056/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013057 builtin and then its argument prototype would still apply. */
13058char $ac_func ();
13059char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013060
Martin v. Löwis11437992002-04-12 09:54:03 +000013061#ifdef F77_DUMMY_MAIN
13062# ifdef __cplusplus
13063 extern "C"
13064# endif
13065 int F77_DUMMY_MAIN() { return 1; }
13066#endif
13067int
13068main ()
13069{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013070/* The GNU C library defines this for functions which it implements
13071 to always fail with ENOSYS. Some functions are actually named
13072 something starting with __ and the normal name is an alias. */
13073#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13074choke me
13075#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013076f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013077#endif
13078
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 ;
13080 return 0;
13081}
13082_ACEOF
13083rm -f conftest.$ac_objext conftest$ac_exeext
13084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13085 (eval $ac_link) 2>&5
13086 ac_status=$?
13087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13088 (exit $ac_status); } &&
13089 { ac_try='test -s conftest$ac_exeext'
13090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13091 (eval $ac_try) 2>&5
13092 ac_status=$?
13093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13094 (exit $ac_status); }; }; then
13095 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013096else
Martin v. Löwis11437992002-04-12 09:54:03 +000013097 echo "$as_me: failed program was:" >&5
13098cat conftest.$ac_ext >&5
13099eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013100fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013101rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013103echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13104echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13105if test `eval echo '${'$as_ac_var'}'` = yes; then
13106 cat >>confdefs.h <<_ACEOF
13107#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13108_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013109
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013110fi
13111done
13112
Michael W. Hudson54241132001-12-07 15:38:26 +000013113
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013114# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013115echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13116echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13117if test "${ac_cv_header_time+set}" = set; then
13118 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013119else
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 cat >conftest.$ac_ext <<_ACEOF
13121#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013122#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013123#include <sys/types.h>
13124#include <sys/time.h>
13125#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013126
13127#ifdef F77_DUMMY_MAIN
13128# ifdef __cplusplus
13129 extern "C"
13130# endif
13131 int F77_DUMMY_MAIN() { return 1; }
13132#endif
13133int
13134main ()
13135{
13136if ((struct tm *) 0)
13137return 0;
13138 ;
13139 return 0;
13140}
13141_ACEOF
13142rm -f conftest.$ac_objext
13143if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13144 (eval $ac_compile) 2>&5
13145 ac_status=$?
13146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13147 (exit $ac_status); } &&
13148 { ac_try='test -s conftest.$ac_objext'
13149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13150 (eval $ac_try) 2>&5
13151 ac_status=$?
13152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13153 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013154 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013155else
Martin v. Löwis11437992002-04-12 09:54:03 +000013156 echo "$as_me: failed program was:" >&5
13157cat conftest.$ac_ext >&5
13158ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013159fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013160rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013161fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013162echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13163echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013164if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013165
13166cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013167#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013168_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013169
13170fi
13171
Martin v. Löwis11437992002-04-12 09:54:03 +000013172echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13173echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13174if test "${ac_cv_struct_tm+set}" = set; then
13175 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013176else
Martin v. Löwis11437992002-04-12 09:54:03 +000013177 cat >conftest.$ac_ext <<_ACEOF
13178#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013179#include "confdefs.h"
13180#include <sys/types.h>
13181#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
13183#ifdef F77_DUMMY_MAIN
13184# ifdef __cplusplus
13185 extern "C"
13186# endif
13187 int F77_DUMMY_MAIN() { return 1; }
13188#endif
13189int
13190main ()
13191{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013192struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013193 ;
13194 return 0;
13195}
13196_ACEOF
13197rm -f conftest.$ac_objext
13198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13199 (eval $ac_compile) 2>&5
13200 ac_status=$?
13201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13202 (exit $ac_status); } &&
13203 { ac_try='test -s conftest.$ac_objext'
13204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13205 (eval $ac_try) 2>&5
13206 ac_status=$?
13207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13208 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013209 ac_cv_struct_tm=time.h
13210else
Martin v. Löwis11437992002-04-12 09:54:03 +000013211 echo "$as_me: failed program was:" >&5
13212cat conftest.$ac_ext >&5
13213ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013214fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013215rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013216fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013217echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13218echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013219if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013220
13221cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013222#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013223_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013224
13225fi
13226
Martin v. Löwis11437992002-04-12 09:54:03 +000013227echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13228echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13229if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13230 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013231else
Martin v. Löwis11437992002-04-12 09:54:03 +000013232 cat >conftest.$ac_ext <<_ACEOF
13233#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013234#include "confdefs.h"
13235#include <sys/types.h>
13236#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
13238
13239#ifdef F77_DUMMY_MAIN
13240# ifdef __cplusplus
13241 extern "C"
13242# endif
13243 int F77_DUMMY_MAIN() { return 1; }
13244#endif
13245int
13246main ()
13247{
13248static struct tm ac_aggr;
13249if (ac_aggr.tm_zone)
13250return 0;
13251 ;
13252 return 0;
13253}
13254_ACEOF
13255rm -f conftest.$ac_objext
13256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13257 (eval $ac_compile) 2>&5
13258 ac_status=$?
13259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13260 (exit $ac_status); } &&
13261 { ac_try='test -s conftest.$ac_objext'
13262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13263 (eval $ac_try) 2>&5
13264 ac_status=$?
13265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13266 (exit $ac_status); }; }; then
13267 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013268else
Martin v. Löwis11437992002-04-12 09:54:03 +000013269 echo "$as_me: failed program was:" >&5
13270cat conftest.$ac_ext >&5
13271ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013273rm -f conftest.$ac_objext conftest.$ac_ext
13274fi
13275echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13276echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13277if test $ac_cv_member_struct_tm_tm_zone = yes; then
13278
13279cat >>confdefs.h <<_ACEOF
13280#define HAVE_STRUCT_TM_TM_ZONE 1
13281_ACEOF
13282
13283
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013284fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013285
Martin v. Löwis11437992002-04-12 09:54:03 +000013286if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13287
13288cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013289#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013290_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013291
13292else
Martin v. Löwis11437992002-04-12 09:54:03 +000013293 echo "$as_me:$LINENO: checking for tzname" >&5
13294echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13295if test "${ac_cv_var_tzname+set}" = set; then
13296 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013297else
Martin v. Löwis11437992002-04-12 09:54:03 +000013298 cat >conftest.$ac_ext <<_ACEOF
13299#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013300#include "confdefs.h"
13301#include <time.h>
13302#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013303extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013305
13306#ifdef F77_DUMMY_MAIN
13307# ifdef __cplusplus
13308 extern "C"
13309# endif
13310 int F77_DUMMY_MAIN() { return 1; }
13311#endif
13312int
13313main ()
13314{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013315atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013316 ;
13317 return 0;
13318}
13319_ACEOF
13320rm -f conftest.$ac_objext conftest$ac_exeext
13321if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13322 (eval $ac_link) 2>&5
13323 ac_status=$?
13324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13325 (exit $ac_status); } &&
13326 { ac_try='test -s conftest$ac_exeext'
13327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13328 (eval $ac_try) 2>&5
13329 ac_status=$?
13330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13331 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013332 ac_cv_var_tzname=yes
13333else
Martin v. Löwis11437992002-04-12 09:54:03 +000013334 echo "$as_me: failed program was:" >&5
13335cat conftest.$ac_ext >&5
13336ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013337fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013338rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013339fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013340echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13341echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013342 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013343
13344cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013345#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013346_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013347
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013348 fi
13349fi
13350
Martin v. Löwis11437992002-04-12 09:54:03 +000013351echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13352echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13353if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13354 echo $ECHO_N "(cached) $ECHO_C" >&6
13355else
13356 cat >conftest.$ac_ext <<_ACEOF
13357#line $LINENO "configure"
13358#include "confdefs.h"
13359$ac_includes_default
13360#ifdef F77_DUMMY_MAIN
13361# ifdef __cplusplus
13362 extern "C"
13363# endif
13364 int F77_DUMMY_MAIN() { return 1; }
13365#endif
13366int
13367main ()
13368{
13369static struct stat ac_aggr;
13370if (ac_aggr.st_rdev)
13371return 0;
13372 ;
13373 return 0;
13374}
13375_ACEOF
13376rm -f conftest.$ac_objext
13377if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13378 (eval $ac_compile) 2>&5
13379 ac_status=$?
13380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13381 (exit $ac_status); } &&
13382 { ac_try='test -s conftest.$ac_objext'
13383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13384 (eval $ac_try) 2>&5
13385 ac_status=$?
13386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13387 (exit $ac_status); }; }; then
13388 ac_cv_member_struct_stat_st_rdev=yes
13389else
13390 echo "$as_me: failed program was:" >&5
13391cat conftest.$ac_ext >&5
13392ac_cv_member_struct_stat_st_rdev=no
13393fi
13394rm -f conftest.$ac_objext conftest.$ac_ext
13395fi
13396echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13397echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13398if test $ac_cv_member_struct_stat_st_rdev = yes; then
13399
13400cat >>confdefs.h <<_ACEOF
13401#define HAVE_STRUCT_STAT_ST_RDEV 1
13402_ACEOF
13403
13404
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013405fi
13406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13408echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13409if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13410 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013411else
Martin v. Löwis11437992002-04-12 09:54:03 +000013412 cat >conftest.$ac_ext <<_ACEOF
13413#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013414#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013415$ac_includes_default
13416#ifdef F77_DUMMY_MAIN
13417# ifdef __cplusplus
13418 extern "C"
13419# endif
13420 int F77_DUMMY_MAIN() { return 1; }
13421#endif
13422int
13423main ()
13424{
13425static struct stat ac_aggr;
13426if (ac_aggr.st_blksize)
13427return 0;
13428 ;
13429 return 0;
13430}
13431_ACEOF
13432rm -f conftest.$ac_objext
13433if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13434 (eval $ac_compile) 2>&5
13435 ac_status=$?
13436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13437 (exit $ac_status); } &&
13438 { ac_try='test -s conftest.$ac_objext'
13439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13440 (eval $ac_try) 2>&5
13441 ac_status=$?
13442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13443 (exit $ac_status); }; }; then
13444 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013445else
Martin v. Löwis11437992002-04-12 09:54:03 +000013446 echo "$as_me: failed program was:" >&5
13447cat conftest.$ac_ext >&5
13448ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013450rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013451fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013452echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13453echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13454if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013455
Martin v. Löwis11437992002-04-12 09:54:03 +000013456cat >>confdefs.h <<_ACEOF
13457#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13458_ACEOF
13459
13460
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013461fi
13462
Martin v. Löwis11437992002-04-12 09:54:03 +000013463echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13464echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13465if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13466 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013467else
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 cat >conftest.$ac_ext <<_ACEOF
13469#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013470#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013471$ac_includes_default
13472#ifdef F77_DUMMY_MAIN
13473# ifdef __cplusplus
13474 extern "C"
13475# endif
13476 int F77_DUMMY_MAIN() { return 1; }
13477#endif
13478int
13479main ()
13480{
13481static struct stat ac_aggr;
13482if (ac_aggr.st_blocks)
13483return 0;
13484 ;
13485 return 0;
13486}
13487_ACEOF
13488rm -f conftest.$ac_objext
13489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13490 (eval $ac_compile) 2>&5
13491 ac_status=$?
13492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13493 (exit $ac_status); } &&
13494 { ac_try='test -s conftest.$ac_objext'
13495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13496 (eval $ac_try) 2>&5
13497 ac_status=$?
13498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13499 (exit $ac_status); }; }; then
13500 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013501else
Martin v. Löwis11437992002-04-12 09:54:03 +000013502 echo "$as_me: failed program was:" >&5
13503cat conftest.$ac_ext >&5
13504ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013505fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013506rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013507fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013508echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13509echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13510if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013511
Martin v. Löwis11437992002-04-12 09:54:03 +000013512cat >>confdefs.h <<_ACEOF
13513#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13514_ACEOF
13515
13516
13517cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013518#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013519_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013520
13521else
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013523fi
13524
Michael W. Hudson54241132001-12-07 15:38:26 +000013525
Martin v. Löwis11437992002-04-12 09:54:03 +000013526
13527echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13528echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13529if test "${ac_cv_header_time_altzone+set}" = set; then
13530 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013531else
Martin v. Löwis11437992002-04-12 09:54:03 +000013532 cat >conftest.$ac_ext <<_ACEOF
13533#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013534#include "confdefs.h"
13535#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013536#ifdef F77_DUMMY_MAIN
13537# ifdef __cplusplus
13538 extern "C"
13539# endif
13540 int F77_DUMMY_MAIN() { return 1; }
13541#endif
13542int
13543main ()
13544{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013545return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013546 ;
13547 return 0;
13548}
13549_ACEOF
13550rm -f conftest.$ac_objext
13551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13552 (eval $ac_compile) 2>&5
13553 ac_status=$?
13554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13555 (exit $ac_status); } &&
13556 { ac_try='test -s conftest.$ac_objext'
13557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13558 (eval $ac_try) 2>&5
13559 ac_status=$?
13560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13561 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013562 ac_cv_header_time_altzone=yes
13563else
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 echo "$as_me: failed program was:" >&5
13565cat conftest.$ac_ext >&5
13566ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013568rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013569fi
13570
Martin v. Löwis11437992002-04-12 09:54:03 +000013571echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13572echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013573if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013574
13575cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013576#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013577_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013578
13579fi
13580
Guido van Rossumda88dad1995-01-26 00:46:29 +000013581was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013582echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13583echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13584cat >conftest.$ac_ext <<_ACEOF
13585#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013586#include "confdefs.h"
13587
13588#include <sys/types.h>
13589#include <sys/select.h>
13590#include <sys/time.h>
13591
Martin v. Löwis11437992002-04-12 09:54:03 +000013592#ifdef F77_DUMMY_MAIN
13593# ifdef __cplusplus
13594 extern "C"
13595# endif
13596 int F77_DUMMY_MAIN() { return 1; }
13597#endif
13598int
13599main ()
13600{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013601;
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 ;
13603 return 0;
13604}
13605_ACEOF
13606rm -f conftest.$ac_objext
13607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13608 (eval $ac_compile) 2>&5
13609 ac_status=$?
13610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13611 (exit $ac_status); } &&
13612 { ac_try='test -s conftest.$ac_objext'
13613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13614 (eval $ac_try) 2>&5
13615 ac_status=$?
13616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13617 (exit $ac_status); }; }; then
13618
13619
13620cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013621#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013622_ACEOF
13623
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013624 was_it_defined=yes
13625
Guido van Rossumf78abae1997-01-21 22:02:36 +000013626else
Martin v. Löwis11437992002-04-12 09:54:03 +000013627 echo "$as_me: failed program was:" >&5
13628cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013630rm -f conftest.$ac_objext conftest.$ac_ext
13631echo "$as_me:$LINENO: result: $was_it_defined" >&5
13632echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013633
Martin v. Löwis11437992002-04-12 09:54:03 +000013634echo "$as_me:$LINENO: checking for addrinfo" >&5
13635echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13636if test "${ac_cv_struct_addrinfo+set}" = set; then
13637 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013638else
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 cat >conftest.$ac_ext <<_ACEOF
13640#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013641#include "confdefs.h"
13642
13643# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013644#ifdef F77_DUMMY_MAIN
13645# ifdef __cplusplus
13646 extern "C"
13647# endif
13648 int F77_DUMMY_MAIN() { return 1; }
13649#endif
13650int
13651main ()
13652{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013653struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013654 ;
13655 return 0;
13656}
13657_ACEOF
13658rm -f conftest.$ac_objext
13659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13660 (eval $ac_compile) 2>&5
13661 ac_status=$?
13662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13663 (exit $ac_status); } &&
13664 { ac_try='test -s conftest.$ac_objext'
13665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13666 (eval $ac_try) 2>&5
13667 ac_status=$?
13668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13669 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013670 ac_cv_struct_addrinfo=yes
13671else
Martin v. Löwis11437992002-04-12 09:54:03 +000013672 echo "$as_me: failed program was:" >&5
13673cat conftest.$ac_ext >&5
13674ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013676rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013677fi
13678
Martin v. Löwis11437992002-04-12 09:54:03 +000013679echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13680echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013681if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013682
13683cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013684#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013685_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013686
13687fi
13688
Martin v. Löwis11437992002-04-12 09:54:03 +000013689echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13690echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13691if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13692 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013693else
Martin v. Löwis11437992002-04-12 09:54:03 +000013694 cat >conftest.$ac_ext <<_ACEOF
13695#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013696#include "confdefs.h"
13697
13698# include <sys/types.h>
13699# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013700#ifdef F77_DUMMY_MAIN
13701# ifdef __cplusplus
13702 extern "C"
13703# endif
13704 int F77_DUMMY_MAIN() { return 1; }
13705#endif
13706int
13707main ()
13708{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013709struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013710 ;
13711 return 0;
13712}
13713_ACEOF
13714rm -f conftest.$ac_objext
13715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13716 (eval $ac_compile) 2>&5
13717 ac_status=$?
13718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13719 (exit $ac_status); } &&
13720 { ac_try='test -s conftest.$ac_objext'
13721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13722 (eval $ac_try) 2>&5
13723 ac_status=$?
13724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13725 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013726 ac_cv_struct_sockaddr_storage=yes
13727else
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 echo "$as_me: failed program was:" >&5
13729cat conftest.$ac_ext >&5
13730ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013731fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013732rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013733fi
13734
Martin v. Löwis11437992002-04-12 09:54:03 +000013735echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13736echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013737if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013738
13739cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013740#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013741_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013742
13743fi
13744
Guido van Rossum627b2d71993-12-24 10:39:16 +000013745# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013746
Michael W. Hudson54241132001-12-07 15:38:26 +000013747
Martin v. Löwis11437992002-04-12 09:54:03 +000013748echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13749echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13750if test "${ac_cv_c_char_unsigned+set}" = set; then
13751 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013752else
Martin v. Löwis11437992002-04-12 09:54:03 +000013753 cat >conftest.$ac_ext <<_ACEOF
13754#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013755#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013756$ac_includes_default
13757#ifdef F77_DUMMY_MAIN
13758# ifdef __cplusplus
13759 extern "C"
13760# endif
13761 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013763int
13764main ()
13765{
13766static int test_array [1 - 2 * !(((char) -1) < 0)];
13767test_array [0] = 0
13768
13769 ;
13770 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013771}
Martin v. Löwis11437992002-04-12 09:54:03 +000013772_ACEOF
13773rm -f conftest.$ac_objext
13774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13775 (eval $ac_compile) 2>&5
13776 ac_status=$?
13777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13778 (exit $ac_status); } &&
13779 { ac_try='test -s conftest.$ac_objext'
13780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13781 (eval $ac_try) 2>&5
13782 ac_status=$?
13783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013785 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013786else
13787 echo "$as_me: failed program was:" >&5
13788cat conftest.$ac_ext >&5
13789ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013790fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013791rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013792fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013793echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13794echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013795if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013797#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013798_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799
13800fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013801
Martin v. Löwis11437992002-04-12 09:54:03 +000013802echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13803echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13804if test "${ac_cv_prog_cc_stdc+set}" = set; then
13805 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013806else
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 ac_cv_prog_cc_stdc=no
13808ac_save_CC=$CC
13809cat >conftest.$ac_ext <<_ACEOF
13810#line $LINENO "configure"
13811#include "confdefs.h"
13812#include <stdarg.h>
13813#include <stdio.h>
13814#include <sys/types.h>
13815#include <sys/stat.h>
13816/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13817struct buf { int x; };
13818FILE * (*rcsopen) (struct buf *, struct stat *, int);
13819static char *e (p, i)
13820 char **p;
13821 int i;
13822{
13823 return p[i];
13824}
13825static char *f (char * (*g) (char **, int), char **p, ...)
13826{
13827 char *s;
13828 va_list v;
13829 va_start (v,p);
13830 s = g (p, va_arg (v,int));
13831 va_end (v);
13832 return s;
13833}
13834int test (int i, double x);
13835struct s1 {int (*f) (int a);};
13836struct s2 {int (*f) (double a);};
13837int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13838int argc;
13839char **argv;
13840#ifdef F77_DUMMY_MAIN
13841# ifdef __cplusplus
13842 extern "C"
13843# endif
13844 int F77_DUMMY_MAIN() { return 1; }
13845#endif
13846int
13847main ()
13848{
13849return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13850 ;
13851 return 0;
13852}
13853_ACEOF
13854# Don't try gcc -ansi; that turns off useful extensions and
13855# breaks some systems' header files.
13856# AIX -qlanglvl=ansi
13857# Ultrix and OSF/1 -std1
13858# HP-UX 10.20 and later -Ae
13859# HP-UX older versions -Aa -D_HPUX_SOURCE
13860# SVR4 -Xc -D__EXTENSIONS__
13861for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13862do
13863 CC="$ac_save_CC $ac_arg"
13864 rm -f conftest.$ac_objext
13865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13866 (eval $ac_compile) 2>&5
13867 ac_status=$?
13868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13869 (exit $ac_status); } &&
13870 { ac_try='test -s conftest.$ac_objext'
13871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13872 (eval $ac_try) 2>&5
13873 ac_status=$?
13874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13875 (exit $ac_status); }; }; then
13876 ac_cv_prog_cc_stdc=$ac_arg
13877break
13878else
13879 echo "$as_me: failed program was:" >&5
13880cat conftest.$ac_ext >&5
13881fi
13882rm -f conftest.$ac_objext
13883done
13884rm -f conftest.$ac_ext conftest.$ac_objext
13885CC=$ac_save_CC
13886
13887fi
13888
13889case "x$ac_cv_prog_cc_stdc" in
13890 x|xno)
13891 echo "$as_me:$LINENO: result: none needed" >&5
13892echo "${ECHO_T}none needed" >&6 ;;
13893 *)
13894 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13895echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13896 CC="$CC $ac_cv_prog_cc_stdc" ;;
13897esac
13898
13899echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13900echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13901if test "${ac_cv_c_const+set}" = set; then
13902 echo $ECHO_N "(cached) $ECHO_C" >&6
13903else
13904 cat >conftest.$ac_ext <<_ACEOF
13905#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013906#include "confdefs.h"
13907
Martin v. Löwis11437992002-04-12 09:54:03 +000013908#ifdef F77_DUMMY_MAIN
13909# ifdef __cplusplus
13910 extern "C"
13911# endif
13912 int F77_DUMMY_MAIN() { return 1; }
13913#endif
13914int
13915main ()
13916{
13917/* FIXME: Include the comments suggested by Paul. */
13918#ifndef __cplusplus
13919 /* Ultrix mips cc rejects this. */
13920 typedef int charset[2];
13921 const charset x;
13922 /* SunOS 4.1.1 cc rejects this. */
13923 char const *const *ccp;
13924 char **p;
13925 /* NEC SVR4.0.2 mips cc rejects this. */
13926 struct point {int x, y;};
13927 static struct point const zero = {0,0};
13928 /* AIX XL C 1.02.0.0 rejects this.
13929 It does not let you subtract one const X* pointer from another in
13930 an arm of an if-expression whose if-part is not a constant
13931 expression */
13932 const char *g = "string";
13933 ccp = &g + (g ? g-g : 0);
13934 /* HPUX 7.0 cc rejects these. */
13935 ++ccp;
13936 p = (char**) ccp;
13937 ccp = (char const *const *) p;
13938 { /* SCO 3.2v4 cc rejects this. */
13939 char *t;
13940 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013941
Martin v. Löwis11437992002-04-12 09:54:03 +000013942 *t++ = 0;
13943 }
13944 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13945 int x[] = {25, 17};
13946 const int *foo = &x[0];
13947 ++foo;
13948 }
13949 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13950 typedef const int *iptr;
13951 iptr p = 0;
13952 ++p;
13953 }
13954 { /* AIX XL C 1.02.0.0 rejects this saying
13955 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13956 struct s { int j; const int *ap[3]; };
13957 struct s *b; b->j = 5;
13958 }
13959 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13960 const int foo = 10;
13961 }
13962#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013963
Martin v. Löwis11437992002-04-12 09:54:03 +000013964 ;
13965 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013966}
Martin v. Löwis11437992002-04-12 09:54:03 +000013967_ACEOF
13968rm -f conftest.$ac_objext
13969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13970 (eval $ac_compile) 2>&5
13971 ac_status=$?
13972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13973 (exit $ac_status); } &&
13974 { ac_try='test -s conftest.$ac_objext'
13975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13976 (eval $ac_try) 2>&5
13977 ac_status=$?
13978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13979 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013980 ac_cv_c_const=yes
13981else
Martin v. Löwis11437992002-04-12 09:54:03 +000013982 echo "$as_me: failed program was:" >&5
13983cat conftest.$ac_ext >&5
13984ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013985fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013986rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013988echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13989echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013990if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013991
13992cat >>confdefs.h <<\_ACEOF
13993#define const
13994_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013995
13996fi
13997
Michael W. Hudson54241132001-12-07 15:38:26 +000013998
Guido van Rossumda88dad1995-01-26 00:46:29 +000013999works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014000echo "$as_me:$LINENO: checking for working volatile" >&5
14001echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14002cat >conftest.$ac_ext <<_ACEOF
14003#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014004#include "confdefs.h"
14005
Martin v. Löwis11437992002-04-12 09:54:03 +000014006#ifdef F77_DUMMY_MAIN
14007# ifdef __cplusplus
14008 extern "C"
14009# endif
14010 int F77_DUMMY_MAIN() { return 1; }
14011#endif
14012int
14013main ()
14014{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014015volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 ;
14017 return 0;
14018}
14019_ACEOF
14020rm -f conftest.$ac_objext
14021if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14022 (eval $ac_compile) 2>&5
14023 ac_status=$?
14024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14025 (exit $ac_status); } &&
14026 { ac_try='test -s conftest.$ac_objext'
14027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14028 (eval $ac_try) 2>&5
14029 ac_status=$?
14030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14031 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014032 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014033else
Martin v. Löwis11437992002-04-12 09:54:03 +000014034 echo "$as_me: failed program was:" >&5
14035cat conftest.$ac_ext >&5
14036
14037cat >>confdefs.h <<\_ACEOF
14038#define volatile
14039_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014040
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014041
Guido van Rossum627b2d71993-12-24 10:39:16 +000014042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014043rm -f conftest.$ac_objext conftest.$ac_ext
14044echo "$as_me:$LINENO: result: $works" >&5
14045echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014046
Guido van Rossumda88dad1995-01-26 00:46:29 +000014047works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014048echo "$as_me:$LINENO: checking for working signed char" >&5
14049echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14050cat >conftest.$ac_ext <<_ACEOF
14051#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014052#include "confdefs.h"
14053
Martin v. Löwis11437992002-04-12 09:54:03 +000014054#ifdef F77_DUMMY_MAIN
14055# ifdef __cplusplus
14056 extern "C"
14057# endif
14058 int F77_DUMMY_MAIN() { return 1; }
14059#endif
14060int
14061main ()
14062{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014063signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 ;
14065 return 0;
14066}
14067_ACEOF
14068rm -f conftest.$ac_objext
14069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14070 (eval $ac_compile) 2>&5
14071 ac_status=$?
14072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14073 (exit $ac_status); } &&
14074 { ac_try='test -s conftest.$ac_objext'
14075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14076 (eval $ac_try) 2>&5
14077 ac_status=$?
14078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14079 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014080 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014081else
Martin v. Löwis11437992002-04-12 09:54:03 +000014082 echo "$as_me: failed program was:" >&5
14083cat conftest.$ac_ext >&5
14084
14085cat >>confdefs.h <<\_ACEOF
14086#define signed
14087_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014088
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014089
Guido van Rossum7f43da71994-08-01 12:15:30 +000014090fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014091rm -f conftest.$ac_objext conftest.$ac_ext
14092echo "$as_me:$LINENO: result: $works" >&5
14093echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014094
Guido van Rossumda88dad1995-01-26 00:46:29 +000014095have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014096echo "$as_me:$LINENO: checking for prototypes" >&5
14097echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14098cat >conftest.$ac_ext <<_ACEOF
14099#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014100#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014101int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014102#ifdef F77_DUMMY_MAIN
14103# ifdef __cplusplus
14104 extern "C"
14105# endif
14106 int F77_DUMMY_MAIN() { return 1; }
14107#endif
14108int
14109main ()
14110{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014111return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 ;
14113 return 0;
14114}
14115_ACEOF
14116rm -f conftest.$ac_objext
14117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14118 (eval $ac_compile) 2>&5
14119 ac_status=$?
14120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14121 (exit $ac_status); } &&
14122 { ac_try='test -s conftest.$ac_objext'
14123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14124 (eval $ac_try) 2>&5
14125 ac_status=$?
14126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14127 (exit $ac_status); }; }; then
14128
14129
14130cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014131#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014132_ACEOF
14133
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014134 have_prototypes=yes
14135
Guido van Rossumf78abae1997-01-21 22:02:36 +000014136else
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 echo "$as_me: failed program was:" >&5
14138cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014139fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014140rm -f conftest.$ac_objext conftest.$ac_ext
14141echo "$as_me:$LINENO: result: $have_prototypes" >&5
14142echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014143
Guido van Rossumda88dad1995-01-26 00:46:29 +000014144works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014145echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14146echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14147cat >conftest.$ac_ext <<_ACEOF
14148#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014149#include "confdefs.h"
14150
14151#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014152int foo(int x, ...) {
14153 va_list va;
14154 va_start(va, x);
14155 va_arg(va, int);
14156 va_arg(va, char *);
14157 va_arg(va, double);
14158 return 0;
14159}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014160
Martin v. Löwis11437992002-04-12 09:54:03 +000014161#ifdef F77_DUMMY_MAIN
14162# ifdef __cplusplus
14163 extern "C"
14164# endif
14165 int F77_DUMMY_MAIN() { return 1; }
14166#endif
14167int
14168main ()
14169{
Guido van Rossum90eea071996-08-30 20:58:57 +000014170return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014171 ;
14172 return 0;
14173}
14174_ACEOF
14175rm -f conftest.$ac_objext
14176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14177 (eval $ac_compile) 2>&5
14178 ac_status=$?
14179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14180 (exit $ac_status); } &&
14181 { ac_try='test -s conftest.$ac_objext'
14182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14183 (eval $ac_try) 2>&5
14184 ac_status=$?
14185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14186 (exit $ac_status); }; }; then
14187
14188
14189cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014190#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014191_ACEOF
14192
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014193 works=yes
14194
Guido van Rossumf78abae1997-01-21 22:02:36 +000014195else
Martin v. Löwis11437992002-04-12 09:54:03 +000014196 echo "$as_me: failed program was:" >&5
14197cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014198fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014199rm -f conftest.$ac_objext conftest.$ac_ext
14200echo "$as_me:$LINENO: result: $works" >&5
14201echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014202
Guido van Rossumda88dad1995-01-26 00:46:29 +000014203if test "$have_prototypes" = yes; then
14204bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014205echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14206echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14207cat >conftest.$ac_ext <<_ACEOF
14208#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014209#include "confdefs.h"
14210#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014211#ifdef F77_DUMMY_MAIN
14212# ifdef __cplusplus
14213 extern "C"
14214# endif
14215 int F77_DUMMY_MAIN() { return 1; }
14216#endif
14217int
14218main ()
14219{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014220char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014221 ;
14222 return 0;
14223}
14224_ACEOF
14225rm -f conftest.$ac_objext
14226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14227 (eval $ac_compile) 2>&5
14228 ac_status=$?
14229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14230 (exit $ac_status); } &&
14231 { ac_try='test -s conftest.$ac_objext'
14232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14233 (eval $ac_try) 2>&5
14234 ac_status=$?
14235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14236 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014237 :
14238else
Martin v. Löwis11437992002-04-12 09:54:03 +000014239 echo "$as_me: failed program was:" >&5
14240cat conftest.$ac_ext >&5
14241
14242cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014243#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014244_ACEOF
14245
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014246 bad_prototypes=yes
14247
Guido van Rossum627b2d71993-12-24 10:39:16 +000014248fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014249rm -f conftest.$ac_objext conftest.$ac_ext
14250echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14251echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014252fi
14253
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014254# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014255echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14256echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14257cat >conftest.$ac_ext <<_ACEOF
14258#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014259#include "confdefs.h"
14260#include <sys/types.h>
14261#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014262#ifdef F77_DUMMY_MAIN
14263# ifdef __cplusplus
14264 extern "C"
14265# endif
14266 int F77_DUMMY_MAIN() { return 1; }
14267#endif
14268int
14269main ()
14270{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014271struct sockaddr x;
14272x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014273 ;
14274 return 0;
14275}
14276_ACEOF
14277rm -f conftest.$ac_objext
14278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14279 (eval $ac_compile) 2>&5
14280 ac_status=$?
14281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14282 (exit $ac_status); } &&
14283 { ac_try='test -s conftest.$ac_objext'
14284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14285 (eval $ac_try) 2>&5
14286 ac_status=$?
14287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14288 (exit $ac_status); }; }; then
14289 echo "$as_me:$LINENO: result: yes" >&5
14290echo "${ECHO_T}yes" >&6
14291
14292cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014293#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014294_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014295
14296else
Martin v. Löwis11437992002-04-12 09:54:03 +000014297 echo "$as_me: failed program was:" >&5
14298cat conftest.$ac_ext >&5
14299echo "$as_me:$LINENO: result: no" >&5
14300echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014301fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014302rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014303
Guido van Rossumda88dad1995-01-26 00:46:29 +000014304va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014305echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14306echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14307cat >conftest.$ac_ext <<_ACEOF
14308#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014309#include "confdefs.h"
14310
14311#ifdef HAVE_STDARG_PROTOTYPES
14312#include <stdarg.h>
14313#else
14314#include <varargs.h>
14315#endif
14316
Martin v. Löwis11437992002-04-12 09:54:03 +000014317#ifdef F77_DUMMY_MAIN
14318# ifdef __cplusplus
14319 extern "C"
14320# endif
14321 int F77_DUMMY_MAIN() { return 1; }
14322#endif
14323int
14324main ()
14325{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014326va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014327 ;
14328 return 0;
14329}
14330_ACEOF
14331rm -f conftest.$ac_objext
14332if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14333 (eval $ac_compile) 2>&5
14334 ac_status=$?
14335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14336 (exit $ac_status); } &&
14337 { ac_try='test -s conftest.$ac_objext'
14338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14339 (eval $ac_try) 2>&5
14340 ac_status=$?
14341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14342 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014343 :
14344else
Martin v. Löwis11437992002-04-12 09:54:03 +000014345 echo "$as_me: failed program was:" >&5
14346cat conftest.$ac_ext >&5
14347
14348
14349cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014350#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014351_ACEOF
14352
Guido van Rossumda88dad1995-01-26 00:46:29 +000014353 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014354
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014355fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014356rm -f conftest.$ac_objext conftest.$ac_ext
14357echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14358echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014359
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014360# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
14362
14363
14364echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14365echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14366if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14367 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014368else
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 cat >conftest.$ac_ext <<_ACEOF
14370#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014371#include "confdefs.h"
14372/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014373 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014374#include <assert.h>
14375/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014376#ifdef __cplusplus
14377extern "C"
14378#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014379/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014380 builtin and then its argument prototype would still apply. */
14381char gethostbyname_r ();
14382char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014383
Martin v. Löwis11437992002-04-12 09:54:03 +000014384#ifdef F77_DUMMY_MAIN
14385# ifdef __cplusplus
14386 extern "C"
14387# endif
14388 int F77_DUMMY_MAIN() { return 1; }
14389#endif
14390int
14391main ()
14392{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014393/* The GNU C library defines this for functions which it implements
14394 to always fail with ENOSYS. Some functions are actually named
14395 something starting with __ and the normal name is an alias. */
14396#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14397choke me
14398#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014399f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014400#endif
14401
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 ;
14403 return 0;
14404}
14405_ACEOF
14406rm -f conftest.$ac_objext conftest$ac_exeext
14407if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14408 (eval $ac_link) 2>&5
14409 ac_status=$?
14410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14411 (exit $ac_status); } &&
14412 { ac_try='test -s conftest$ac_exeext'
14413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14414 (eval $ac_try) 2>&5
14415 ac_status=$?
14416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14417 (exit $ac_status); }; }; then
14418 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014419else
Martin v. Löwis11437992002-04-12 09:54:03 +000014420 echo "$as_me: failed program was:" >&5
14421cat conftest.$ac_ext >&5
14422ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014423fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014424rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014425fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014426echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14427echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14428if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014429
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014431#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014432_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014433
Martin v. Löwis11437992002-04-12 09:54:03 +000014434 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14435echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014436 OLD_CFLAGS=$CFLAGS
14437 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014438 cat >conftest.$ac_ext <<_ACEOF
14439#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014440#include "confdefs.h"
14441
14442# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
14444#ifdef F77_DUMMY_MAIN
14445# ifdef __cplusplus
14446 extern "C"
14447# endif
14448 int F77_DUMMY_MAIN() { return 1; }
14449#endif
14450int
14451main ()
14452{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014453
14454 char *name;
14455 struct hostent *he, *res;
14456 char buffer[2048];
14457 int buflen = 2048;
14458 int h_errnop;
14459
14460 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014461
14462 ;
14463 return 0;
14464}
14465_ACEOF
14466rm -f conftest.$ac_objext
14467if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14468 (eval $ac_compile) 2>&5
14469 ac_status=$?
14470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14471 (exit $ac_status); } &&
14472 { ac_try='test -s conftest.$ac_objext'
14473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14474 (eval $ac_try) 2>&5
14475 ac_status=$?
14476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14477 (exit $ac_status); }; }; then
14478
14479 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014480#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014481_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014482
Martin v. Löwis11437992002-04-12 09:54:03 +000014483
14484cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014485#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014486_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014487
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 echo "$as_me:$LINENO: result: yes" >&5
14489echo "${ECHO_T}yes" >&6
14490
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014491else
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 echo "$as_me: failed program was:" >&5
14493cat conftest.$ac_ext >&5
14494
14495 echo "$as_me:$LINENO: result: no" >&5
14496echo "${ECHO_T}no" >&6
14497 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14498echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14499 cat >conftest.$ac_ext <<_ACEOF
14500#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014501#include "confdefs.h"
14502
14503# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014504
14505#ifdef F77_DUMMY_MAIN
14506# ifdef __cplusplus
14507 extern "C"
14508# endif
14509 int F77_DUMMY_MAIN() { return 1; }
14510#endif
14511int
14512main ()
14513{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014514
14515 char *name;
14516 struct hostent *he;
14517 char buffer[2048];
14518 int buflen = 2048;
14519 int h_errnop;
14520
14521 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014522
14523 ;
14524 return 0;
14525}
14526_ACEOF
14527rm -f conftest.$ac_objext
14528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14529 (eval $ac_compile) 2>&5
14530 ac_status=$?
14531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14532 (exit $ac_status); } &&
14533 { ac_try='test -s conftest.$ac_objext'
14534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14535 (eval $ac_try) 2>&5
14536 ac_status=$?
14537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14538 (exit $ac_status); }; }; then
14539
14540 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014541#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014542_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014543
Martin v. Löwis11437992002-04-12 09:54:03 +000014544
14545cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014546#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014547_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014548
Martin v. Löwis11437992002-04-12 09:54:03 +000014549 echo "$as_me:$LINENO: result: yes" >&5
14550echo "${ECHO_T}yes" >&6
14551
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014552else
Martin v. Löwis11437992002-04-12 09:54:03 +000014553 echo "$as_me: failed program was:" >&5
14554cat conftest.$ac_ext >&5
14555
14556 echo "$as_me:$LINENO: result: no" >&5
14557echo "${ECHO_T}no" >&6
14558 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14559echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14560 cat >conftest.$ac_ext <<_ACEOF
14561#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014562#include "confdefs.h"
14563
14564# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014565
14566#ifdef F77_DUMMY_MAIN
14567# ifdef __cplusplus
14568 extern "C"
14569# endif
14570 int F77_DUMMY_MAIN() { return 1; }
14571#endif
14572int
14573main ()
14574{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014575
14576 char *name;
14577 struct hostent *he;
14578 struct hostent_data data;
14579
14580 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014581
14582 ;
14583 return 0;
14584}
14585_ACEOF
14586rm -f conftest.$ac_objext
14587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14588 (eval $ac_compile) 2>&5
14589 ac_status=$?
14590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14591 (exit $ac_status); } &&
14592 { ac_try='test -s conftest.$ac_objext'
14593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14594 (eval $ac_try) 2>&5
14595 ac_status=$?
14596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14597 (exit $ac_status); }; }; then
14598
14599 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014600#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014601_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014602
Martin v. Löwis11437992002-04-12 09:54:03 +000014603
14604cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014605#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014606_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014607
Martin v. Löwis11437992002-04-12 09:54:03 +000014608 echo "$as_me:$LINENO: result: yes" >&5
14609echo "${ECHO_T}yes" >&6
14610
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014611else
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 echo "$as_me: failed program was:" >&5
14613cat conftest.$ac_ext >&5
14614
14615 echo "$as_me:$LINENO: result: no" >&5
14616echo "${ECHO_T}no" >&6
14617
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014618fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014619rm -f conftest.$ac_objext conftest.$ac_ext
14620
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014621fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014622rm -f conftest.$ac_objext conftest.$ac_ext
14623
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014625rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014626 CFLAGS=$OLD_CFLAGS
14627
14628else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014629
Martin v. Löwis11437992002-04-12 09:54:03 +000014630
14631for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014632do
Martin v. Löwis11437992002-04-12 09:54:03 +000014633as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14634echo "$as_me:$LINENO: checking for $ac_func" >&5
14635echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14636if eval "test \"\${$as_ac_var+set}\" = set"; then
14637 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014638else
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 cat >conftest.$ac_ext <<_ACEOF
14640#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014641#include "confdefs.h"
14642/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014643 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014644#include <assert.h>
14645/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014646#ifdef __cplusplus
14647extern "C"
14648#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014649/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 builtin and then its argument prototype would still apply. */
14651char $ac_func ();
14652char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014653
Martin v. Löwis11437992002-04-12 09:54:03 +000014654#ifdef F77_DUMMY_MAIN
14655# ifdef __cplusplus
14656 extern "C"
14657# endif
14658 int F77_DUMMY_MAIN() { return 1; }
14659#endif
14660int
14661main ()
14662{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014663/* The GNU C library defines this for functions which it implements
14664 to always fail with ENOSYS. Some functions are actually named
14665 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014666#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014667choke me
14668#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014669f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014670#endif
14671
Martin v. Löwis11437992002-04-12 09:54:03 +000014672 ;
14673 return 0;
14674}
14675_ACEOF
14676rm -f conftest.$ac_objext conftest$ac_exeext
14677if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14678 (eval $ac_link) 2>&5
14679 ac_status=$?
14680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14681 (exit $ac_status); } &&
14682 { ac_try='test -s conftest$ac_exeext'
14683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14684 (eval $ac_try) 2>&5
14685 ac_status=$?
14686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14687 (exit $ac_status); }; }; then
14688 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014689else
Martin v. Löwis11437992002-04-12 09:54:03 +000014690 echo "$as_me: failed program was:" >&5
14691cat conftest.$ac_ext >&5
14692eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014693fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014695fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014696echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14697echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14698if test `eval echo '${'$as_ac_var'}'` = yes; then
14699 cat >>confdefs.h <<_ACEOF
14700#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14701_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014702
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014703fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014704done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014705
Michael W. Hudson54241132001-12-07 15:38:26 +000014706
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014707fi
14708
Michael W. Hudson54241132001-12-07 15:38:26 +000014709
14710
14711
14712
14713
14714
Guido van Rossum627b2d71993-12-24 10:39:16 +000014715# checks for system services
14716# (none yet)
14717
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014718# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014719echo "$as_me:$LINENO: checking for __fpu_control" >&5
14720echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14721if test "${ac_cv_func___fpu_control+set}" = set; then
14722 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014723else
Martin v. Löwis11437992002-04-12 09:54:03 +000014724 cat >conftest.$ac_ext <<_ACEOF
14725#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014726#include "confdefs.h"
14727/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014728 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014729#include <assert.h>
14730/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014731#ifdef __cplusplus
14732extern "C"
14733#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014734/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014735 builtin and then its argument prototype would still apply. */
14736char __fpu_control ();
14737char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014738
Martin v. Löwis11437992002-04-12 09:54:03 +000014739#ifdef F77_DUMMY_MAIN
14740# ifdef __cplusplus
14741 extern "C"
14742# endif
14743 int F77_DUMMY_MAIN() { return 1; }
14744#endif
14745int
14746main ()
14747{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014748/* The GNU C library defines this for functions which it implements
14749 to always fail with ENOSYS. Some functions are actually named
14750 something starting with __ and the normal name is an alias. */
14751#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14752choke me
14753#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014754f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014755#endif
14756
Martin v. Löwis11437992002-04-12 09:54:03 +000014757 ;
14758 return 0;
14759}
14760_ACEOF
14761rm -f conftest.$ac_objext conftest$ac_exeext
14762if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14763 (eval $ac_link) 2>&5
14764 ac_status=$?
14765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14766 (exit $ac_status); } &&
14767 { ac_try='test -s conftest$ac_exeext'
14768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14769 (eval $ac_try) 2>&5
14770 ac_status=$?
14771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14772 (exit $ac_status); }; }; then
14773 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014774else
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 echo "$as_me: failed program was:" >&5
14776cat conftest.$ac_ext >&5
14777ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014778fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014779rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014780fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014781echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14782echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14783if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014784 :
14785else
Martin v. Löwis11437992002-04-12 09:54:03 +000014786
14787echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14788echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14789if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14790 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014791else
Martin v. Löwis11437992002-04-12 09:54:03 +000014792 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014793LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014794cat >conftest.$ac_ext <<_ACEOF
14795#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014796#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014797
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014798/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014799#ifdef __cplusplus
14800extern "C"
14801#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014802/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014803 builtin and then its argument prototype would still apply. */
14804char __fpu_control ();
14805#ifdef F77_DUMMY_MAIN
14806# ifdef __cplusplus
14807 extern "C"
14808# endif
14809 int F77_DUMMY_MAIN() { return 1; }
14810#endif
14811int
14812main ()
14813{
14814__fpu_control ();
14815 ;
14816 return 0;
14817}
14818_ACEOF
14819rm -f conftest.$ac_objext conftest$ac_exeext
14820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14821 (eval $ac_link) 2>&5
14822 ac_status=$?
14823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14824 (exit $ac_status); } &&
14825 { ac_try='test -s conftest$ac_exeext'
14826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14827 (eval $ac_try) 2>&5
14828 ac_status=$?
14829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14830 (exit $ac_status); }; }; then
14831 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014832else
Martin v. Löwis11437992002-04-12 09:54:03 +000014833 echo "$as_me: failed program was:" >&5
14834cat conftest.$ac_ext >&5
14835ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014837rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14838LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014839fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014840echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14841echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14842if test $ac_cv_lib_ieee___fpu_control = yes; then
14843 cat >>confdefs.h <<_ACEOF
14844#define HAVE_LIBIEEE 1
14845_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014846
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014847 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014848
Guido van Rossum627b2d71993-12-24 10:39:16 +000014849fi
14850
Michael W. Hudson54241132001-12-07 15:38:26 +000014851
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014852fi
14853
Michael W. Hudson54241132001-12-07 15:38:26 +000014854
Guido van Rossum7f253911997-05-09 02:42:48 +000014855# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014856echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14857echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14858
Guido van Rossum7f253911997-05-09 02:42:48 +000014859# Check whether --with-fpectl or --without-fpectl was given.
14860if test "${with_fpectl+set}" = set; then
14861 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014862
Guido van Rossum7f253911997-05-09 02:42:48 +000014863if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014864then
14865
14866cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014867#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014868_ACEOF
14869
14870 echo "$as_me:$LINENO: result: yes" >&5
14871echo "${ECHO_T}yes" >&6
14872else echo "$as_me:$LINENO: result: no" >&5
14873echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014874fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014875else
Martin v. Löwis11437992002-04-12 09:54:03 +000014876 echo "$as_me:$LINENO: result: no" >&5
14877echo "${ECHO_T}no" >&6
14878fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014879
Guido van Rossum7f43da71994-08-01 12:15:30 +000014880# check for --with-libm=...
14881
Guido van Rossum563e7081996-09-10 18:20:48 +000014882case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014883Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014884BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014885*) LIBM=-lm
14886esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014887echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14888echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14889
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014890# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014891if test "${with_libm+set}" = set; then
14892 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014893
Guido van Rossum7f253911997-05-09 02:42:48 +000014894if test "$withval" = no
14895then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014896 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14897echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014898elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014899then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014900 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14901echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14902else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14903echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14904 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014905fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014906else
Martin v. Löwis11437992002-04-12 09:54:03 +000014907 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14908echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14909fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014910
14911# check for --with-libc=...
14912
Martin v. Löwis11437992002-04-12 09:54:03 +000014913echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14914echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14915
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014916# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014917if test "${with_libc+set}" = set; then
14918 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014919
Guido van Rossum7f253911997-05-09 02:42:48 +000014920if test "$withval" = no
14921then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014922 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14923echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014924elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014925then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14927echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14928else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14929echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14930 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014931fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014932else
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14934echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14935fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014936
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014937# check for hypot() in math library
14938LIBS_SAVE=$LIBS
14939LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014940
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014941for ac_func in hypot
14942do
Martin v. Löwis11437992002-04-12 09:54:03 +000014943as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14944echo "$as_me:$LINENO: checking for $ac_func" >&5
14945echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14946if eval "test \"\${$as_ac_var+set}\" = set"; then
14947 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014948else
Martin v. Löwis11437992002-04-12 09:54:03 +000014949 cat >conftest.$ac_ext <<_ACEOF
14950#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014951#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014952/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014954#include <assert.h>
14955/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014956#ifdef __cplusplus
14957extern "C"
14958#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014959/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 builtin and then its argument prototype would still apply. */
14961char $ac_func ();
14962char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014963
Martin v. Löwis11437992002-04-12 09:54:03 +000014964#ifdef F77_DUMMY_MAIN
14965# ifdef __cplusplus
14966 extern "C"
14967# endif
14968 int F77_DUMMY_MAIN() { return 1; }
14969#endif
14970int
14971main ()
14972{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014973/* The GNU C library defines this for functions which it implements
14974 to always fail with ENOSYS. Some functions are actually named
14975 something starting with __ and the normal name is an alias. */
14976#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14977choke me
14978#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014979f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014980#endif
14981
Martin v. Löwis11437992002-04-12 09:54:03 +000014982 ;
14983 return 0;
14984}
14985_ACEOF
14986rm -f conftest.$ac_objext conftest$ac_exeext
14987if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14988 (eval $ac_link) 2>&5
14989 ac_status=$?
14990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14991 (exit $ac_status); } &&
14992 { ac_try='test -s conftest$ac_exeext'
14993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14994 (eval $ac_try) 2>&5
14995 ac_status=$?
14996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14997 (exit $ac_status); }; }; then
14998 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014999else
Martin v. Löwis11437992002-04-12 09:54:03 +000015000 echo "$as_me: failed program was:" >&5
15001cat conftest.$ac_ext >&5
15002eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015003fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015004rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015005fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015006echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15007echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15008if test `eval echo '${'$as_ac_var'}'` = yes; then
15009 cat >>confdefs.h <<_ACEOF
15010#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15011_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015012
Michael W. Hudson54241132001-12-07 15:38:26 +000015013else
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015015fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015016done
15017
Michael W. Hudson54241132001-12-07 15:38:26 +000015018
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015019LIBS=$LIBS_SAVE
15020
Guido van Rossumad713701997-07-10 22:42:38 +000015021# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000015022echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
15023echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
15024if test "${ac_cv_malloc_zero+set}" = set; then
15025 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015026else
15027 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015028 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000015029else
Martin v. Löwis11437992002-04-12 09:54:03 +000015030 cat >conftest.$ac_ext <<_ACEOF
15031#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000015032#include "confdefs.h"
15033#include <stdio.h>
15034#ifdef HAVE_STDLIB
15035#include <stdlib.h>
15036#else
15037char *malloc(), *realloc();
15038int *free();
15039#endif
15040main() {
15041 char *p;
15042 p = malloc(0);
15043 if (p == NULL) exit(1);
15044 p = realloc(p, 0);
15045 if (p == NULL) exit(1);
15046 free(p);
15047 exit(0);
15048}
Martin v. Löwis11437992002-04-12 09:54:03 +000015049_ACEOF
15050rm -f conftest$ac_exeext
15051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15052 (eval $ac_link) 2>&5
15053 ac_status=$?
15054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15057 (eval $ac_try) 2>&5
15058 ac_status=$?
15059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15060 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000015061 ac_cv_malloc_zero=nonnull
15062else
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 echo "$as_me: program exited with status $ac_status" >&5
15064echo "$as_me: failed program was:" >&5
15065cat conftest.$ac_ext >&5
15066( exit $ac_status )
15067ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000015068fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015069rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000015070fi
Guido van Rossumad713701997-07-10 22:42:38 +000015071fi
Guido van Rossum3065c942001-09-17 04:03:14 +000015072 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000015073echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
15074echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015075if test "$ac_cv_malloc_zero" = null
15076then
Martin v. Löwis11437992002-04-12 09:54:03 +000015077
15078cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015079#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015080_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015081
15082fi
15083
Guido van Rossumef2255b2000-03-10 22:30:29 +000015084# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015085if test "${ac_cv_header_wchar_h+set}" = set; then
15086 echo "$as_me:$LINENO: checking for wchar.h" >&5
15087echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15088if test "${ac_cv_header_wchar_h+set}" = set; then
15089 echo $ECHO_N "(cached) $ECHO_C" >&6
15090fi
15091echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15092echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015093else
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 # Is the header compilable?
15095echo "$as_me:$LINENO: checking wchar.h usability" >&5
15096echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15097cat >conftest.$ac_ext <<_ACEOF
15098#line $LINENO "configure"
15099#include "confdefs.h"
15100$ac_includes_default
15101#include <wchar.h>
15102_ACEOF
15103rm -f conftest.$ac_objext
15104if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15105 (eval $ac_compile) 2>&5
15106 ac_status=$?
15107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15108 (exit $ac_status); } &&
15109 { ac_try='test -s conftest.$ac_objext'
15110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15111 (eval $ac_try) 2>&5
15112 ac_status=$?
15113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15114 (exit $ac_status); }; }; then
15115 ac_header_compiler=yes
15116else
15117 echo "$as_me: failed program was:" >&5
15118cat conftest.$ac_ext >&5
15119ac_header_compiler=no
15120fi
15121rm -f conftest.$ac_objext conftest.$ac_ext
15122echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15123echo "${ECHO_T}$ac_header_compiler" >&6
15124
15125# Is the header present?
15126echo "$as_me:$LINENO: checking wchar.h presence" >&5
15127echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15128cat >conftest.$ac_ext <<_ACEOF
15129#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015130#include "confdefs.h"
15131#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015132_ACEOF
15133if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15134 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15135 ac_status=$?
15136 egrep -v '^ *\+' conftest.er1 >conftest.err
15137 rm -f conftest.er1
15138 cat conftest.err >&5
15139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15140 (exit $ac_status); } >/dev/null; then
15141 if test -s conftest.err; then
15142 ac_cpp_err=$ac_c_preproc_warn_flag
15143 else
15144 ac_cpp_err=
15145 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015146else
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 ac_cpp_err=yes
15148fi
15149if test -z "$ac_cpp_err"; then
15150 ac_header_preproc=yes
15151else
15152 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015153 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015154 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015156rm -f conftest.err conftest.$ac_ext
15157echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15158echo "${ECHO_T}$ac_header_preproc" >&6
15159
15160# So? What about this header?
15161case $ac_header_compiler:$ac_header_preproc in
15162 yes:no )
15163 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15164echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15165 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15166echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15167 no:yes )
15168 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15169echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15170 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15171echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15172 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15173echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15174esac
15175echo "$as_me:$LINENO: checking for wchar.h" >&5
15176echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15177if test "${ac_cv_header_wchar_h+set}" = set; then
15178 echo $ECHO_N "(cached) $ECHO_C" >&6
15179else
15180 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015181fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015182echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15183echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15184
15185fi
15186if test $ac_cv_header_wchar_h = yes; then
15187
15188
15189cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015190#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015191_ACEOF
15192
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015193 wchar_h="yes"
15194
Guido van Rossumef2255b2000-03-10 22:30:29 +000015195else
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015197
15198fi
15199
Michael W. Hudson54241132001-12-07 15:38:26 +000015200
Martin v. Löwis11437992002-04-12 09:54:03 +000015201
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015202# determine wchar_t size
15203if test "$wchar_h" = yes
15204then
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 echo "$as_me:$LINENO: checking for wchar_t" >&5
15206echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15207if test "${ac_cv_type_wchar_t+set}" = set; then
15208 echo $ECHO_N "(cached) $ECHO_C" >&6
15209else
15210 cat >conftest.$ac_ext <<_ACEOF
15211#line $LINENO "configure"
15212#include "confdefs.h"
15213#include <wchar.h>
15214
15215#ifdef F77_DUMMY_MAIN
15216# ifdef __cplusplus
15217 extern "C"
15218# endif
15219 int F77_DUMMY_MAIN() { return 1; }
15220#endif
15221int
15222main ()
15223{
15224if ((wchar_t *) 0)
15225 return 0;
15226if (sizeof (wchar_t))
15227 return 0;
15228 ;
15229 return 0;
15230}
15231_ACEOF
15232rm -f conftest.$ac_objext
15233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15234 (eval $ac_compile) 2>&5
15235 ac_status=$?
15236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15237 (exit $ac_status); } &&
15238 { ac_try='test -s conftest.$ac_objext'
15239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15240 (eval $ac_try) 2>&5
15241 ac_status=$?
15242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15243 (exit $ac_status); }; }; then
15244 ac_cv_type_wchar_t=yes
15245else
15246 echo "$as_me: failed program was:" >&5
15247cat conftest.$ac_ext >&5
15248ac_cv_type_wchar_t=no
15249fi
15250rm -f conftest.$ac_objext conftest.$ac_ext
15251fi
15252echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15253echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15254
15255echo "$as_me:$LINENO: checking size of wchar_t" >&5
15256echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15257if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15258 echo $ECHO_N "(cached) $ECHO_C" >&6
15259else
15260 if test "$ac_cv_type_wchar_t" = yes; then
15261 # The cast to unsigned long works around a bug in the HP C Compiler
15262 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15263 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15264 # This bug is HP SR number 8606223364.
15265 if test "$cross_compiling" = yes; then
15266 # Depending upon the size, compute the lo and hi bounds.
15267cat >conftest.$ac_ext <<_ACEOF
15268#line $LINENO "configure"
15269#include "confdefs.h"
15270#include <wchar.h>
15271
15272#ifdef F77_DUMMY_MAIN
15273# ifdef __cplusplus
15274 extern "C"
15275# endif
15276 int F77_DUMMY_MAIN() { return 1; }
15277#endif
15278int
15279main ()
15280{
15281static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15282test_array [0] = 0
15283
15284 ;
15285 return 0;
15286}
15287_ACEOF
15288rm -f conftest.$ac_objext
15289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15290 (eval $ac_compile) 2>&5
15291 ac_status=$?
15292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15293 (exit $ac_status); } &&
15294 { ac_try='test -s conftest.$ac_objext'
15295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15296 (eval $ac_try) 2>&5
15297 ac_status=$?
15298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15299 (exit $ac_status); }; }; then
15300 ac_lo=0 ac_mid=0
15301 while :; do
15302 cat >conftest.$ac_ext <<_ACEOF
15303#line $LINENO "configure"
15304#include "confdefs.h"
15305#include <wchar.h>
15306
15307#ifdef F77_DUMMY_MAIN
15308# ifdef __cplusplus
15309 extern "C"
15310# endif
15311 int F77_DUMMY_MAIN() { return 1; }
15312#endif
15313int
15314main ()
15315{
15316static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15317test_array [0] = 0
15318
15319 ;
15320 return 0;
15321}
15322_ACEOF
15323rm -f conftest.$ac_objext
15324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15325 (eval $ac_compile) 2>&5
15326 ac_status=$?
15327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15328 (exit $ac_status); } &&
15329 { ac_try='test -s conftest.$ac_objext'
15330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15331 (eval $ac_try) 2>&5
15332 ac_status=$?
15333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15334 (exit $ac_status); }; }; then
15335 ac_hi=$ac_mid; break
15336else
15337 echo "$as_me: failed program was:" >&5
15338cat conftest.$ac_ext >&5
15339ac_lo=`expr $ac_mid + 1`
15340 if test $ac_lo -le $ac_mid; then
15341 ac_lo= ac_hi=
15342 break
15343 fi
15344 ac_mid=`expr 2 '*' $ac_mid + 1`
15345fi
15346rm -f conftest.$ac_objext conftest.$ac_ext
15347 done
15348else
15349 echo "$as_me: failed program was:" >&5
15350cat conftest.$ac_ext >&5
15351cat >conftest.$ac_ext <<_ACEOF
15352#line $LINENO "configure"
15353#include "confdefs.h"
15354#include <wchar.h>
15355
15356#ifdef F77_DUMMY_MAIN
15357# ifdef __cplusplus
15358 extern "C"
15359# endif
15360 int F77_DUMMY_MAIN() { return 1; }
15361#endif
15362int
15363main ()
15364{
15365static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15366test_array [0] = 0
15367
15368 ;
15369 return 0;
15370}
15371_ACEOF
15372rm -f conftest.$ac_objext
15373if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15374 (eval $ac_compile) 2>&5
15375 ac_status=$?
15376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15377 (exit $ac_status); } &&
15378 { ac_try='test -s conftest.$ac_objext'
15379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15380 (eval $ac_try) 2>&5
15381 ac_status=$?
15382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15383 (exit $ac_status); }; }; then
15384 ac_hi=-1 ac_mid=-1
15385 while :; do
15386 cat >conftest.$ac_ext <<_ACEOF
15387#line $LINENO "configure"
15388#include "confdefs.h"
15389#include <wchar.h>
15390
15391#ifdef F77_DUMMY_MAIN
15392# ifdef __cplusplus
15393 extern "C"
15394# endif
15395 int F77_DUMMY_MAIN() { return 1; }
15396#endif
15397int
15398main ()
15399{
15400static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15401test_array [0] = 0
15402
15403 ;
15404 return 0;
15405}
15406_ACEOF
15407rm -f conftest.$ac_objext
15408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15409 (eval $ac_compile) 2>&5
15410 ac_status=$?
15411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15412 (exit $ac_status); } &&
15413 { ac_try='test -s conftest.$ac_objext'
15414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15415 (eval $ac_try) 2>&5
15416 ac_status=$?
15417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15418 (exit $ac_status); }; }; then
15419 ac_lo=$ac_mid; break
15420else
15421 echo "$as_me: failed program was:" >&5
15422cat conftest.$ac_ext >&5
15423ac_hi=`expr '(' $ac_mid ')' - 1`
15424 if test $ac_mid -le $ac_hi; then
15425 ac_lo= ac_hi=
15426 break
15427 fi
15428 ac_mid=`expr 2 '*' $ac_mid`
15429fi
15430rm -f conftest.$ac_objext conftest.$ac_ext
15431 done
15432else
15433 echo "$as_me: failed program was:" >&5
15434cat conftest.$ac_ext >&5
15435ac_lo= ac_hi=
15436fi
15437rm -f conftest.$ac_objext conftest.$ac_ext
15438fi
15439rm -f conftest.$ac_objext conftest.$ac_ext
15440# Binary search between lo and hi bounds.
15441while test "x$ac_lo" != "x$ac_hi"; do
15442 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15443 cat >conftest.$ac_ext <<_ACEOF
15444#line $LINENO "configure"
15445#include "confdefs.h"
15446#include <wchar.h>
15447
15448#ifdef F77_DUMMY_MAIN
15449# ifdef __cplusplus
15450 extern "C"
15451# endif
15452 int F77_DUMMY_MAIN() { return 1; }
15453#endif
15454int
15455main ()
15456{
15457static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15458test_array [0] = 0
15459
15460 ;
15461 return 0;
15462}
15463_ACEOF
15464rm -f conftest.$ac_objext
15465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15466 (eval $ac_compile) 2>&5
15467 ac_status=$?
15468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15469 (exit $ac_status); } &&
15470 { ac_try='test -s conftest.$ac_objext'
15471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15472 (eval $ac_try) 2>&5
15473 ac_status=$?
15474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15475 (exit $ac_status); }; }; then
15476 ac_hi=$ac_mid
15477else
15478 echo "$as_me: failed program was:" >&5
15479cat conftest.$ac_ext >&5
15480ac_lo=`expr '(' $ac_mid ')' + 1`
15481fi
15482rm -f conftest.$ac_objext conftest.$ac_ext
15483done
15484case $ac_lo in
15485?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15486'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15487echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15488 { (exit 1); exit 1; }; } ;;
15489esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015490else
15491 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15493echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15494 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015495else
Martin v. Löwis11437992002-04-12 09:54:03 +000015496 cat >conftest.$ac_ext <<_ACEOF
15497#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015498#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015499#include <wchar.h>
15500
15501long longval () { return (long) (sizeof (wchar_t)); }
15502unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015503#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015504#include <stdlib.h>
15505#ifdef F77_DUMMY_MAIN
15506# ifdef __cplusplus
15507 extern "C"
15508# endif
15509 int F77_DUMMY_MAIN() { return 1; }
15510#endif
15511int
15512main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015513{
Martin v. Löwis11437992002-04-12 09:54:03 +000015514
15515 FILE *f = fopen ("conftest.val", "w");
15516 if (! f)
15517 exit (1);
15518 if (((long) (sizeof (wchar_t))) < 0)
15519 {
15520 long i = longval ();
15521 if (i != ((long) (sizeof (wchar_t))))
15522 exit (1);
15523 fprintf (f, "%ld\n", i);
15524 }
15525 else
15526 {
15527 unsigned long i = ulongval ();
15528 if (i != ((long) (sizeof (wchar_t))))
15529 exit (1);
15530 fprintf (f, "%lu\n", i);
15531 }
15532 exit (ferror (f) || fclose (f) != 0);
15533
15534 ;
15535 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015536}
Martin v. Löwis11437992002-04-12 09:54:03 +000015537_ACEOF
15538rm -f conftest$ac_exeext
15539if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15540 (eval $ac_link) 2>&5
15541 ac_status=$?
15542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15545 (eval $ac_try) 2>&5
15546 ac_status=$?
15547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15548 (exit $ac_status); }; }; then
15549 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015550else
Martin v. Löwis11437992002-04-12 09:54:03 +000015551 echo "$as_me: program exited with status $ac_status" >&5
15552echo "$as_me: failed program was:" >&5
15553cat conftest.$ac_ext >&5
15554( exit $ac_status )
15555{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15556echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15557 { (exit 1); exit 1; }; }
15558fi
15559rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15560fi
15561fi
15562rm -f conftest.val
15563else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015564 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015565fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015567echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15568echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15569cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015570#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015571_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015572
Michael W. Hudson54241132001-12-07 15:38:26 +000015573
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015574fi
15575
Martin v. Löwis11437992002-04-12 09:54:03 +000015576echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15577echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015578# Check whether --enable-unicode or --disable-unicode was given.
15579if test "${enable_unicode+set}" = set; then
15580 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015581
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015582else
15583 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015584fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015585
15586if test $enable_unicode = yes
15587then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015588 # Without any arguments, Py_UNICODE defaults to two-byte mode
15589 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015590fi
15591
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015592
15593
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015594case "$enable_unicode" in
15595ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015596 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015597#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015598_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015599
15600 ;;
15601ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015602 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015603#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015604_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015605
15606 ;;
15607esac
15608
Michael W. Hudson54241132001-12-07 15:38:26 +000015609
Martin v. Löwis11437992002-04-12 09:54:03 +000015610
15611
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015612
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015613if test "$enable_unicode" = "no"
15614then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015615 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015616 echo "$as_me:$LINENO: result: not used" >&5
15617echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015618else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015619 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015620
15621cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015622#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015623_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015624
15625 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15626 then
15627 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015628
Martin v. Löwis11437992002-04-12 09:54:03 +000015629cat >>confdefs.h <<\_ACEOF
15630#define HAVE_USABLE_WCHAR_T 1
15631_ACEOF
15632
15633 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015634#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015635_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015636
15637 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15638 then
15639 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015640 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015641#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015642_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015643
15644 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15645 then
15646 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015647 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015648#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015649_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015650
15651 else
15652 PY_UNICODE_TYPE="no type found"
15653 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015654 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15655echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015656fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015657
15658# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015659echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15660echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15661if test "${ac_cv_c_bigendian+set}" = set; then
15662 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015663else
Martin v. Löwis11437992002-04-12 09:54:03 +000015664 # See if sys/param.h defines the BYTE_ORDER macro.
15665cat >conftest.$ac_ext <<_ACEOF
15666#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015667#include "confdefs.h"
15668#include <sys/types.h>
15669#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015670
Martin v. Löwis11437992002-04-12 09:54:03 +000015671#ifdef F77_DUMMY_MAIN
15672# ifdef __cplusplus
15673 extern "C"
15674# endif
15675 int F77_DUMMY_MAIN() { return 1; }
15676#endif
15677int
15678main ()
15679{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015680#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15681 bogus endian macros
15682#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015683
15684 ;
15685 return 0;
15686}
15687_ACEOF
15688rm -f conftest.$ac_objext
15689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15690 (eval $ac_compile) 2>&5
15691 ac_status=$?
15692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15693 (exit $ac_status); } &&
15694 { ac_try='test -s conftest.$ac_objext'
15695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15696 (eval $ac_try) 2>&5
15697 ac_status=$?
15698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15699 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015700 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015701cat >conftest.$ac_ext <<_ACEOF
15702#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015703#include "confdefs.h"
15704#include <sys/types.h>
15705#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015706
Martin v. Löwis11437992002-04-12 09:54:03 +000015707#ifdef F77_DUMMY_MAIN
15708# ifdef __cplusplus
15709 extern "C"
15710# endif
15711 int F77_DUMMY_MAIN() { return 1; }
15712#endif
15713int
15714main ()
15715{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015716#if BYTE_ORDER != BIG_ENDIAN
15717 not big endian
15718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015719
15720 ;
15721 return 0;
15722}
15723_ACEOF
15724rm -f conftest.$ac_objext
15725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15726 (eval $ac_compile) 2>&5
15727 ac_status=$?
15728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15729 (exit $ac_status); } &&
15730 { ac_try='test -s conftest.$ac_objext'
15731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15732 (eval $ac_try) 2>&5
15733 ac_status=$?
15734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15735 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015736 ac_cv_c_bigendian=yes
15737else
Martin v. Löwis11437992002-04-12 09:54:03 +000015738 echo "$as_me: failed program was:" >&5
15739cat conftest.$ac_ext >&5
15740ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015741fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015742rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015743else
Martin v. Löwis11437992002-04-12 09:54:03 +000015744 echo "$as_me: failed program was:" >&5
15745cat conftest.$ac_ext >&5
15746# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015747if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015748 # try to guess the endianess by grep'ing values into an object file
15749 ac_cv_c_bigendian=unknown
15750 cat >conftest.$ac_ext <<_ACEOF
15751#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015752#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015753short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15754short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15755void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15756short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15757short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15758void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15759#ifdef F77_DUMMY_MAIN
15760# ifdef __cplusplus
15761 extern "C"
15762# endif
15763 int F77_DUMMY_MAIN() { return 1; }
15764#endif
15765int
15766main ()
15767{
15768 _ascii (); _ebcdic ();
15769 ;
15770 return 0;
15771}
15772_ACEOF
15773rm -f conftest.$ac_objext
15774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15775 (eval $ac_compile) 2>&5
15776 ac_status=$?
15777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15778 (exit $ac_status); } &&
15779 { ac_try='test -s conftest.$ac_objext'
15780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15781 (eval $ac_try) 2>&5
15782 ac_status=$?
15783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15784 (exit $ac_status); }; }; then
15785 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15786 ac_cv_c_bigendian=yes
15787fi
15788if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15789 if test "$ac_cv_c_bigendian" = unknown; then
15790 ac_cv_c_bigendian=no
15791 else
15792 # finding both strings is unlikely to happen, but who knows?
15793 ac_cv_c_bigendian=unknown
15794 fi
15795fi
15796else
15797 echo "$as_me: failed program was:" >&5
15798cat conftest.$ac_ext >&5
15799fi
15800rm -f conftest.$ac_objext conftest.$ac_ext
15801else
15802 cat >conftest.$ac_ext <<_ACEOF
15803#line $LINENO "configure"
15804#include "confdefs.h"
15805int
15806main ()
15807{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015808 /* Are we little or big endian? From Harbison&Steele. */
15809 union
15810 {
15811 long l;
15812 char c[sizeof (long)];
15813 } u;
15814 u.l = 1;
15815 exit (u.c[sizeof (long) - 1] == 1);
15816}
Martin v. Löwis11437992002-04-12 09:54:03 +000015817_ACEOF
15818rm -f conftest$ac_exeext
15819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15820 (eval $ac_link) 2>&5
15821 ac_status=$?
15822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15823 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15825 (eval $ac_try) 2>&5
15826 ac_status=$?
15827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15828 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015829 ac_cv_c_bigendian=no
15830else
Martin v. Löwis11437992002-04-12 09:54:03 +000015831 echo "$as_me: program exited with status $ac_status" >&5
15832echo "$as_me: failed program was:" >&5
15833cat conftest.$ac_ext >&5
15834( exit $ac_status )
15835ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015837rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015838fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015839fi
15840rm -f conftest.$ac_objext conftest.$ac_ext
15841fi
15842echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15843echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15844case $ac_cv_c_bigendian in
15845 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015846
Martin v. Löwis11437992002-04-12 09:54:03 +000015847cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015848#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015849_ACEOF
15850 ;;
15851 no)
15852 ;;
15853 *)
15854 { { echo "$as_me:$LINENO: error: unknown endianess
15855presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15856echo "$as_me: error: unknown endianess
15857presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15858 { (exit 1); exit 1; }; } ;;
15859esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015860
Michael W. Hudson54241132001-12-07 15:38:26 +000015861
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015862# Check whether right shifting a negative integer extends the sign bit
15863# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015864echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15865echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15866if test "${ac_cv_rshift_extends_sign+set}" = set; then
15867 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015868else
Martin v. Löwis11437992002-04-12 09:54:03 +000015869
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015870if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015871 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015872else
Martin v. Löwis11437992002-04-12 09:54:03 +000015873 cat >conftest.$ac_ext <<_ACEOF
15874#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015875#include "confdefs.h"
15876
15877int main()
15878{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015879 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015880}
15881
Martin v. Löwis11437992002-04-12 09:54:03 +000015882_ACEOF
15883rm -f conftest$ac_exeext
15884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15885 (eval $ac_link) 2>&5
15886 ac_status=$?
15887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15890 (eval $ac_try) 2>&5
15891 ac_status=$?
15892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15893 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015894 ac_cv_rshift_extends_sign=yes
15895else
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 echo "$as_me: program exited with status $ac_status" >&5
15897echo "$as_me: failed program was:" >&5
15898cat conftest.$ac_ext >&5
15899( exit $ac_status )
15900ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015901fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015902rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15903fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015904fi
15905
Martin v. Löwis11437992002-04-12 09:54:03 +000015906echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15907echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015908if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015909then
Martin v. Löwis11437992002-04-12 09:54:03 +000015910
15911cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015912#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015913_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015914
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015915fi
15916
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015917# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015918echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15919echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15920if test "${ac_cv_have_getc_unlocked+set}" = set; then
15921 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015922else
Martin v. Löwis11437992002-04-12 09:54:03 +000015923
15924cat >conftest.$ac_ext <<_ACEOF
15925#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015926#include "confdefs.h"
15927#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015928#ifdef F77_DUMMY_MAIN
15929# ifdef __cplusplus
15930 extern "C"
15931# endif
15932 int F77_DUMMY_MAIN() { return 1; }
15933#endif
15934int
15935main ()
15936{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015937
15938 FILE *f = fopen("/dev/null", "r");
15939 flockfile(f);
15940 getc_unlocked(f);
15941 funlockfile(f);
15942
Martin v. Löwis11437992002-04-12 09:54:03 +000015943 ;
15944 return 0;
15945}
15946_ACEOF
15947rm -f conftest.$ac_objext conftest$ac_exeext
15948if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15949 (eval $ac_link) 2>&5
15950 ac_status=$?
15951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15952 (exit $ac_status); } &&
15953 { ac_try='test -s conftest$ac_exeext'
15954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15955 (eval $ac_try) 2>&5
15956 ac_status=$?
15957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15958 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015959 ac_cv_have_getc_unlocked=yes
15960else
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 echo "$as_me: failed program was:" >&5
15962cat conftest.$ac_ext >&5
15963ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015964fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015965rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015966fi
15967
Martin v. Löwis11437992002-04-12 09:54:03 +000015968echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15969echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015970if test "$ac_cv_have_getc_unlocked" = yes
15971then
Martin v. Löwis11437992002-04-12 09:54:03 +000015972
15973cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015974#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015975_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015976
15977fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015978
Martin v. Löwis0daad592001-09-30 21:09:59 +000015979# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015980echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15981echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15982if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15983 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015984else
Martin v. Löwis11437992002-04-12 09:54:03 +000015985 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015986LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015987cat >conftest.$ac_ext <<_ACEOF
15988#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015989#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015990
Guido van Rossum353ae582001-07-10 16:45:32 +000015991/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015992#ifdef __cplusplus
15993extern "C"
15994#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015995/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015996 builtin and then its argument prototype would still apply. */
15997char rl_pre_input_hook ();
15998#ifdef F77_DUMMY_MAIN
15999# ifdef __cplusplus
16000 extern "C"
16001# endif
16002 int F77_DUMMY_MAIN() { return 1; }
16003#endif
16004int
16005main ()
16006{
16007rl_pre_input_hook ();
16008 ;
16009 return 0;
16010}
16011_ACEOF
16012rm -f conftest.$ac_objext conftest$ac_exeext
16013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16014 (eval $ac_link) 2>&5
16015 ac_status=$?
16016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16017 (exit $ac_status); } &&
16018 { ac_try='test -s conftest$ac_exeext'
16019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16020 (eval $ac_try) 2>&5
16021 ac_status=$?
16022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16023 (exit $ac_status); }; }; then
16024 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016025else
Martin v. Löwis11437992002-04-12 09:54:03 +000016026 echo "$as_me: failed program was:" >&5
16027cat conftest.$ac_ext >&5
16028ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16031LIBS=$ac_check_lib_save_LIBS
16032fi
16033echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16034echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16035if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016036
Martin v. Löwis11437992002-04-12 09:54:03 +000016037cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016038#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016039_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016040
Martin v. Löwis0daad592001-09-30 21:09:59 +000016041fi
16042
Michael W. Hudson54241132001-12-07 15:38:26 +000016043
Martin v. Löwis0daad592001-09-30 21:09:59 +000016044# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016045echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16046echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16047if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16048 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016049else
Martin v. Löwis11437992002-04-12 09:54:03 +000016050 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016051LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016052cat >conftest.$ac_ext <<_ACEOF
16053#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016054#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016055
Martin v. Löwis0daad592001-09-30 21:09:59 +000016056/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016057#ifdef __cplusplus
16058extern "C"
16059#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016060/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016061 builtin and then its argument prototype would still apply. */
16062char rl_completion_matches ();
16063#ifdef F77_DUMMY_MAIN
16064# ifdef __cplusplus
16065 extern "C"
16066# endif
16067 int F77_DUMMY_MAIN() { return 1; }
16068#endif
16069int
16070main ()
16071{
16072rl_completion_matches ();
16073 ;
16074 return 0;
16075}
16076_ACEOF
16077rm -f conftest.$ac_objext conftest$ac_exeext
16078if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16079 (eval $ac_link) 2>&5
16080 ac_status=$?
16081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16082 (exit $ac_status); } &&
16083 { ac_try='test -s conftest$ac_exeext'
16084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16085 (eval $ac_try) 2>&5
16086 ac_status=$?
16087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16088 (exit $ac_status); }; }; then
16089 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016090else
Martin v. Löwis11437992002-04-12 09:54:03 +000016091 echo "$as_me: failed program was:" >&5
16092cat conftest.$ac_ext >&5
16093ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016094fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016095rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16096LIBS=$ac_check_lib_save_LIBS
16097fi
16098echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16099echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16100if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016101
Martin v. Löwis11437992002-04-12 09:54:03 +000016102cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016103#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016104_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016105
Guido van Rossum353ae582001-07-10 16:45:32 +000016106fi
16107
Jack Jansendd19cf82001-12-06 22:36:17 +000016108
Martin v. Löwis11437992002-04-12 09:54:03 +000016109echo "$as_me:$LINENO: checking for broken nice()" >&5
16110echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16111if test "${ac_cv_broken_nice+set}" = set; then
16112 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016113else
Martin v. Löwis11437992002-04-12 09:54:03 +000016114
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016115if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016116 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016117else
Martin v. Löwis11437992002-04-12 09:54:03 +000016118 cat >conftest.$ac_ext <<_ACEOF
16119#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016120#include "confdefs.h"
16121
16122int main()
16123{
16124 int val1 = nice(1);
16125 if (val1 != -1 && val1 == nice(2))
16126 exit(0);
16127 exit(1);
16128}
16129
Martin v. Löwis11437992002-04-12 09:54:03 +000016130_ACEOF
16131rm -f conftest$ac_exeext
16132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16133 (eval $ac_link) 2>&5
16134 ac_status=$?
16135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16138 (eval $ac_try) 2>&5
16139 ac_status=$?
16140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16141 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016142 ac_cv_broken_nice=yes
16143else
Martin v. Löwis11437992002-04-12 09:54:03 +000016144 echo "$as_me: program exited with status $ac_status" >&5
16145echo "$as_me: failed program was:" >&5
16146cat conftest.$ac_ext >&5
16147( exit $ac_status )
16148ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016149fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016150rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16151fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016152fi
16153
Martin v. Löwis11437992002-04-12 09:54:03 +000016154echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16155echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016156if test "$ac_cv_broken_nice" = yes
16157then
Martin v. Löwis11437992002-04-12 09:54:03 +000016158
16159cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016160#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016161_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016162
16163fi
16164
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016165# Look for subsecond timestamps in struct stat
16166echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16167echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16168if test "${ac_cv_stat_tv_nsec+set}" = set; then
16169 echo $ECHO_N "(cached) $ECHO_C" >&6
16170else
16171 cat >conftest.$ac_ext <<_ACEOF
16172#line $LINENO "configure"
16173#include "confdefs.h"
16174#include <sys/stat.h>
16175#ifdef F77_DUMMY_MAIN
16176# ifdef __cplusplus
16177 extern "C"
16178# endif
16179 int F77_DUMMY_MAIN() { return 1; }
16180#endif
16181int
16182main ()
16183{
16184
16185struct stat st;
16186st.st_mtim.tv_nsec = 1;
16187
16188 ;
16189 return 0;
16190}
16191_ACEOF
16192rm -f conftest.$ac_objext
16193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16194 (eval $ac_compile) 2>&5
16195 ac_status=$?
16196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16197 (exit $ac_status); } &&
16198 { ac_try='test -s conftest.$ac_objext'
16199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16200 (eval $ac_try) 2>&5
16201 ac_status=$?
16202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16203 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016204 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016205else
16206 echo "$as_me: failed program was:" >&5
16207cat conftest.$ac_ext >&5
16208ac_cv_stat_tv_nsec=no
16209fi
16210rm -f conftest.$ac_objext conftest.$ac_ext
16211fi
16212
16213echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16214echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16215if test "$ac_cv_stat_tv_nsec" = yes
16216then
16217
16218cat >>confdefs.h <<\_ACEOF
16219#define HAVE_STAT_TV_NSEC 1
16220_ACEOF
16221
16222fi
16223
Jack Jansen666b1e72001-10-31 12:11:48 +000016224# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016225echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16226echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16227if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16228 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016229else
Martin v. Löwis11437992002-04-12 09:54:03 +000016230 cat >conftest.$ac_ext <<_ACEOF
16231#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016232#include "confdefs.h"
16233#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016234#ifdef F77_DUMMY_MAIN
16235# ifdef __cplusplus
16236 extern "C"
16237# endif
16238 int F77_DUMMY_MAIN() { return 1; }
16239#endif
16240int
16241main ()
16242{
Jack Jansen666b1e72001-10-31 12:11:48 +000016243
16244 int rtn;
16245 rtn = mvwdelch(0,0,0);
16246
Martin v. Löwis11437992002-04-12 09:54:03 +000016247 ;
16248 return 0;
16249}
16250_ACEOF
16251rm -f conftest.$ac_objext
16252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16253 (eval $ac_compile) 2>&5
16254 ac_status=$?
16255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16256 (exit $ac_status); } &&
16257 { ac_try='test -s conftest.$ac_objext'
16258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16259 (eval $ac_try) 2>&5
16260 ac_status=$?
16261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16262 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016263 ac_cv_mvwdelch_is_expression=yes
16264else
Martin v. Löwis11437992002-04-12 09:54:03 +000016265 echo "$as_me: failed program was:" >&5
16266cat conftest.$ac_ext >&5
16267ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016268fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016269rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016270fi
16271
Martin v. Löwis11437992002-04-12 09:54:03 +000016272echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16273echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016274
16275if test "$ac_cv_mvwdelch_is_expression" = yes
16276then
Martin v. Löwis11437992002-04-12 09:54:03 +000016277
16278cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016279#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016280_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016281
16282fi
16283
Martin v. Löwis11437992002-04-12 09:54:03 +000016284echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16285echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16286if test "${ac_cv_window_has_flags+set}" = set; then
16287 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016288else
Martin v. Löwis11437992002-04-12 09:54:03 +000016289 cat >conftest.$ac_ext <<_ACEOF
16290#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016291#include "confdefs.h"
16292#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016293#ifdef F77_DUMMY_MAIN
16294# ifdef __cplusplus
16295 extern "C"
16296# endif
16297 int F77_DUMMY_MAIN() { return 1; }
16298#endif
16299int
16300main ()
16301{
Jack Jansen666b1e72001-10-31 12:11:48 +000016302
16303 WINDOW *w;
16304 w->_flags = 0;
16305
Martin v. Löwis11437992002-04-12 09:54:03 +000016306 ;
16307 return 0;
16308}
16309_ACEOF
16310rm -f conftest.$ac_objext
16311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16312 (eval $ac_compile) 2>&5
16313 ac_status=$?
16314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16315 (exit $ac_status); } &&
16316 { ac_try='test -s conftest.$ac_objext'
16317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16318 (eval $ac_try) 2>&5
16319 ac_status=$?
16320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16321 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016322 ac_cv_window_has_flags=yes
16323else
Martin v. Löwis11437992002-04-12 09:54:03 +000016324 echo "$as_me: failed program was:" >&5
16325cat conftest.$ac_ext >&5
16326ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016328rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016329fi
16330
Martin v. Löwis11437992002-04-12 09:54:03 +000016331echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16332echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016333
Jack Jansen666b1e72001-10-31 12:11:48 +000016334
16335if test "$ac_cv_window_has_flags" = yes
16336then
Martin v. Löwis11437992002-04-12 09:54:03 +000016337
16338cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016339#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016340_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016341
16342fi
16343
Guido van Rossum95713eb2000-05-18 20:53:31 +000016344# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
16345# Add sys/socket.h to confdefs.h
16346cat >> confdefs.h <<\EOF
16347#ifdef HAVE_SYS_SOCKET_H
16348#include <sys/socket.h>
16349#endif
16350EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016351echo "$as_me:$LINENO: checking for socklen_t" >&5
16352echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16353if test "${ac_cv_type_socklen_t+set}" = set; then
16354 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016355else
Martin v. Löwis11437992002-04-12 09:54:03 +000016356 cat >conftest.$ac_ext <<_ACEOF
16357#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016358#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016359$ac_includes_default
16360#ifdef F77_DUMMY_MAIN
16361# ifdef __cplusplus
16362 extern "C"
16363# endif
16364 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016366int
16367main ()
16368{
16369if ((socklen_t *) 0)
16370 return 0;
16371if (sizeof (socklen_t))
16372 return 0;
16373 ;
16374 return 0;
16375}
16376_ACEOF
16377rm -f conftest.$ac_objext
16378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16379 (eval $ac_compile) 2>&5
16380 ac_status=$?
16381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16382 (exit $ac_status); } &&
16383 { ac_try='test -s conftest.$ac_objext'
16384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16385 (eval $ac_try) 2>&5
16386 ac_status=$?
16387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16388 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016389 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016390else
Martin v. Löwis11437992002-04-12 09:54:03 +000016391 echo "$as_me: failed program was:" >&5
16392cat conftest.$ac_ext >&5
16393ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016395rm -f conftest.$ac_objext conftest.$ac_ext
16396fi
16397echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16398echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16399if test $ac_cv_type_socklen_t = yes; then
16400 :
16401else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016402
Martin v. Löwis11437992002-04-12 09:54:03 +000016403cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016404#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016405_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016406
16407fi
16408
Michael W. Hudson54241132001-12-07 15:38:26 +000016409
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016410#AC_MSG_CHECKING(for Modules/Setup)
16411#if test ! -f Modules/Setup ; then
16412# if test ! -d Modules ; then
16413# mkdir Modules
16414# fi
16415# cp "$srcdir/Modules/Setup.dist" Modules/Setup
16416# AC_MSG_RESULT(creating)
16417#else
16418# AC_MSG_RESULT(already exists)
16419#fi
16420
Michael W. Hudson54241132001-12-07 15:38:26 +000016421
16422
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016423for h in `(cd $srcdir;echo Python/thread_*.h)`
16424do
16425 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16426done
16427
Michael W. Hudson54241132001-12-07 15:38:26 +000016428
Jack Jansen0b06be72002-06-21 14:48:38 +000016429SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016430echo "$as_me:$LINENO: checking for build directories" >&5
16431echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016432for dir in $SRCDIRS; do
16433 if test ! -d $dir; then
16434 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016435 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016436done
Martin v. Löwis11437992002-04-12 09:54:03 +000016437echo "$as_me:$LINENO: result: done" >&5
16438echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016439
Guido van Rossum627b2d71993-12-24 10:39:16 +000016440# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016441ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
16442cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016443# This file is a shell script that caches the results of configure
16444# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016445# scripts and configure runs, see configure's option --config-cache.
16446# It is not useful on other systems. If it contains results you don't
16447# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016448#
Martin v. Löwis11437992002-04-12 09:54:03 +000016449# config.status only pays attention to the cache file if you give it
16450# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016451#
Martin v. Löwis11437992002-04-12 09:54:03 +000016452# `ac_cv_env_foo' variables (set or unset) will be overriden when
16453# loading this file, other *unset* `ac_cv_foo' will be assigned the
16454# following values.
16455
16456_ACEOF
16457
Guido van Rossumf78abae1997-01-21 22:02:36 +000016458# The following way of writing the cache mishandles newlines in values,
16459# but we know of no workaround that is simple, portable, and efficient.
16460# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016461# Ultrix sh set writes to stderr and can't be redirected directly,
16462# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016463{
16464 (set) 2>&1 |
16465 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16466 *ac_space=\ *)
16467 # `set' does not quote correctly, so add quotes (double-quote
16468 # substitution turns \\\\ into \\, and sed turns \\ into \).
16469 sed -n \
16470 "s/'/'\\\\''/g;
16471 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16472 ;;
16473 *)
16474 # `set' quotes correctly as required by POSIX, so do not add quotes.
16475 sed -n \
16476 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16477 ;;
16478 esac;
16479} |
16480 sed '
16481 t clear
16482 : clear
16483 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16484 t end
16485 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16486 : end' >>confcache
16487if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016488 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016489 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16490 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016491 else
16492 echo "not updating unwritable cache $cache_file"
16493 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016494fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016495rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016496
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016497test "x$prefix" = xNONE && prefix=$ac_default_prefix
16498# Let make expand exec_prefix.
16499test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016500
Martin v. Löwis11437992002-04-12 09:54:03 +000016501# VPATH may cause trouble with some makes, so we remove $(srcdir),
16502# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16503# trailing colons and then remove the whole line if VPATH becomes empty
16504# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016505if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016506 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16507s/:*\$(srcdir):*/:/;
16508s/:*\${srcdir}:*/:/;
16509s/:*@srcdir@:*/:/;
16510s/^\([^=]*=[ ]*\):*/\1/;
16511s/:*$//;
16512s/^[^=]*=[ ]*$//;
16513}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016514fi
16515
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016516DEFS=-DHAVE_CONFIG_H
16517
Martin v. Löwis11437992002-04-12 09:54:03 +000016518
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016519: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016520ac_clean_files_save=$ac_clean_files
16521ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16522{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16523echo "$as_me: creating $CONFIG_STATUS" >&6;}
16524cat >$CONFIG_STATUS <<_ACEOF
16525#! $SHELL
16526# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016527# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016528# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016529# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016530
Martin v. Löwis11437992002-04-12 09:54:03 +000016531debug=false
16532SHELL=\${CONFIG_SHELL-$SHELL}
16533_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016534
Martin v. Löwis11437992002-04-12 09:54:03 +000016535cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016536
Martin v. Löwis11437992002-04-12 09:54:03 +000016537## --------------------- ##
16538## M4sh Initialization. ##
16539## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016540
Martin v. Löwis11437992002-04-12 09:54:03 +000016541# Be Bourne compatible
16542if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16543 emulate sh
16544 NULLCMD=:
16545elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16546 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016547fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016548
Martin v. Löwis11437992002-04-12 09:54:03 +000016549# NLS nuisances.
16550# Support unset when possible.
16551if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16552 as_unset=unset
16553else
16554 as_unset=false
16555fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016556
Martin v. Löwis11437992002-04-12 09:54:03 +000016557(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16558 { $as_unset LANG || test "${LANG+set}" != set; } ||
16559 { LANG=C; export LANG; }
16560(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16561 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16562 { LC_ALL=C; export LC_ALL; }
16563(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16564 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16565 { LC_TIME=C; export LC_TIME; }
16566(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16567 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16568 { LC_CTYPE=C; export LC_CTYPE; }
16569(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16570 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16571 { LANGUAGE=C; export LANGUAGE; }
16572(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16573 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16574 { LC_COLLATE=C; export LC_COLLATE; }
16575(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16576 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16577 { LC_NUMERIC=C; export LC_NUMERIC; }
16578(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16579 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16580 { LC_MESSAGES=C; export LC_MESSAGES; }
16581
16582
16583# Name of the executable.
16584as_me=`(basename "$0") 2>/dev/null ||
16585$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16586 X"$0" : 'X\(//\)$' \| \
16587 X"$0" : 'X\(/\)$' \| \
16588 . : '\(.\)' 2>/dev/null ||
16589echo X/"$0" |
16590 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16591 /^X\/\(\/\/\)$/{ s//\1/; q; }
16592 /^X\/\(\/\).*/{ s//\1/; q; }
16593 s/.*/./; q'`
16594
16595# PATH needs CR, and LINENO needs CR and PATH.
16596# Avoid depending upon Character Ranges.
16597as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16598as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16599as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16600as_cr_digits='0123456789'
16601as_cr_alnum=$as_cr_Letters$as_cr_digits
16602
16603# The user is always right.
16604if test "${PATH_SEPARATOR+set}" != set; then
16605 echo "#! /bin/sh" >conftest.sh
16606 echo "exit 0" >>conftest.sh
16607 chmod +x conftest.sh
16608 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16609 PATH_SEPARATOR=';'
16610 else
16611 PATH_SEPARATOR=:
16612 fi
16613 rm -f conftest.sh
16614fi
16615
16616
16617 as_lineno_1=$LINENO
16618 as_lineno_2=$LINENO
16619 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16620 test "x$as_lineno_1" != "x$as_lineno_2" &&
16621 test "x$as_lineno_3" = "x$as_lineno_2" || {
16622 # Find who we are. Look in the path if we contain no path at all
16623 # relative or not.
16624 case $0 in
16625 *[\\/]* ) as_myself=$0 ;;
16626 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16627for as_dir in $PATH
16628do
16629 IFS=$as_save_IFS
16630 test -z "$as_dir" && as_dir=.
16631 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16632done
16633
16634 ;;
16635 esac
16636 # We did not find ourselves, most probably we were run as `sh COMMAND'
16637 # in which case we are not to be found in the path.
16638 if test "x$as_myself" = x; then
16639 as_myself=$0
16640 fi
16641 if test ! -f "$as_myself"; then
16642 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16643echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16644 { (exit 1); exit 1; }; }
16645 fi
16646 case $CONFIG_SHELL in
16647 '')
16648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16649for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16650do
16651 IFS=$as_save_IFS
16652 test -z "$as_dir" && as_dir=.
16653 for as_base in sh bash ksh sh5; do
16654 case $as_dir in
16655 /*)
16656 if ("$as_dir/$as_base" -c '
16657 as_lineno_1=$LINENO
16658 as_lineno_2=$LINENO
16659 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16660 test "x$as_lineno_1" != "x$as_lineno_2" &&
16661 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16662 CONFIG_SHELL=$as_dir/$as_base
16663 export CONFIG_SHELL
16664 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16665 fi;;
16666 esac
16667 done
16668done
16669;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016670 esac
16671
Martin v. Löwis11437992002-04-12 09:54:03 +000016672 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16673 # uniformly replaced by the line number. The first 'sed' inserts a
16674 # line-number line before each line; the second 'sed' does the real
16675 # work. The second script uses 'N' to pair each line-number line
16676 # with the numbered line, and appends trailing '-' during
16677 # substitution so that $LINENO is not a special case at line end.
16678 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16679 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16680 sed '=' <$as_myself |
16681 sed '
16682 N
16683 s,$,-,
16684 : loop
16685 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16686 t loop
16687 s,-$,,
16688 s,^['$as_cr_digits']*\n,,
16689 ' >$as_me.lineno &&
16690 chmod +x $as_me.lineno ||
16691 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16692echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16693 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016694
Martin v. Löwis11437992002-04-12 09:54:03 +000016695 # Don't try to exec as it changes $[0], causing all sort of problems
16696 # (the dirname of $[0] is not the place where we might find the
16697 # original and so on. Autoconf is especially sensible to this).
16698 . ./$as_me.lineno
16699 # Exit status is that of the last command.
16700 exit
16701}
16702
16703
16704case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16705 *c*,-n*) ECHO_N= ECHO_C='
16706' ECHO_T=' ' ;;
16707 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16708 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16709esac
16710
16711if expr a : '\(a\)' >/dev/null 2>&1; then
16712 as_expr=expr
16713else
16714 as_expr=false
16715fi
16716
16717rm -f conf$$ conf$$.exe conf$$.file
16718echo >conf$$.file
16719if ln -s conf$$.file conf$$ 2>/dev/null; then
16720 # We could just check for DJGPP; but this test a) works b) is more generic
16721 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16722 if test -f conf$$.exe; then
16723 # Don't use ln at all; we don't have any links
16724 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016725 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016726 as_ln_s='ln -s'
16727 fi
16728elif ln conf$$.file conf$$ 2>/dev/null; then
16729 as_ln_s=ln
16730else
16731 as_ln_s='cp -p'
16732fi
16733rm -f conf$$ conf$$.exe conf$$.file
16734
16735as_executable_p="test -f"
16736
16737# Sed expression to map a string onto a valid CPP name.
16738as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16739
16740# Sed expression to map a string onto a valid variable name.
16741as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16742
16743
16744# IFS
16745# We need space, tab and new line, in precisely that order.
16746as_nl='
16747'
16748IFS=" $as_nl"
16749
16750# CDPATH.
16751$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16752
16753exec 6>&1
16754
16755# Open the log real soon, to keep \$[0] and so on meaningful, and to
16756# report actual input values of CONFIG_FILES etc. instead of their
16757# values after options handling. Logging --version etc. is OK.
16758exec 5>>config.log
16759{
16760 echo
16761 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16762## Running $as_me. ##
16763_ASBOX
16764} >&5
16765cat >&5 <<_CSEOF
16766
16767This file was extended by $as_me, which was
16768generated by GNU Autoconf 2.53. Invocation command line was
16769
16770 CONFIG_FILES = $CONFIG_FILES
16771 CONFIG_HEADERS = $CONFIG_HEADERS
16772 CONFIG_LINKS = $CONFIG_LINKS
16773 CONFIG_COMMANDS = $CONFIG_COMMANDS
16774 $ $0 $@
16775
16776_CSEOF
16777echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16778echo >&5
16779_ACEOF
16780
16781# Files that config.status was made for.
16782if test -n "$ac_config_files"; then
16783 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16784fi
16785
16786if test -n "$ac_config_headers"; then
16787 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16788fi
16789
16790if test -n "$ac_config_links"; then
16791 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16792fi
16793
16794if test -n "$ac_config_commands"; then
16795 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16796fi
16797
16798cat >>$CONFIG_STATUS <<\_ACEOF
16799
16800ac_cs_usage="\
16801\`$as_me' instantiates files from templates according to the
16802current configuration.
16803
16804Usage: $0 [OPTIONS] [FILE]...
16805
16806 -h, --help print this help, then exit
16807 -V, --version print version number, then exit
16808 -d, --debug don't remove temporary files
16809 --recheck update $as_me by reconfiguring in the same conditions
16810 --file=FILE[:TEMPLATE]
16811 instantiate the configuration file FILE
16812 --header=FILE[:TEMPLATE]
16813 instantiate the configuration header FILE
16814
16815Configuration files:
16816$config_files
16817
16818Configuration headers:
16819$config_headers
16820
16821Report bugs to <bug-autoconf@gnu.org>."
16822_ACEOF
16823
16824cat >>$CONFIG_STATUS <<_ACEOF
16825ac_cs_version="\\
16826config.status
16827configured by $0, generated by GNU Autoconf 2.53,
16828 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16829
16830Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16831Free Software Foundation, Inc.
16832This config.status script is free software; the Free Software Foundation
16833gives unlimited permission to copy, distribute and modify it."
16834srcdir=$srcdir
16835INSTALL="$INSTALL"
16836_ACEOF
16837
16838cat >>$CONFIG_STATUS <<\_ACEOF
16839# If no file are specified by the user, then we need to provide default
16840# value. By we need to know if files were specified by the user.
16841ac_need_defaults=:
16842while test $# != 0
16843do
16844 case $1 in
16845 --*=*)
16846 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16847 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16848 shift
16849 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16850 shift
16851 ;;
16852 -*);;
16853 *) # This is not an option, so the user has probably given explicit
16854 # arguments.
16855 ac_need_defaults=false;;
16856 esac
16857
16858 case $1 in
16859 # Handling of the options.
16860_ACEOF
16861cat >>$CONFIG_STATUS <<_ACEOF
16862 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16863 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16864 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16865_ACEOF
16866cat >>$CONFIG_STATUS <<\_ACEOF
16867 --version | --vers* | -V )
16868 echo "$ac_cs_version"; exit 0 ;;
16869 --he | --h)
16870 # Conflict between --help and --header
16871 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16872Try \`$0 --help' for more information." >&5
16873echo "$as_me: error: ambiguous option: $1
16874Try \`$0 --help' for more information." >&2;}
16875 { (exit 1); exit 1; }; };;
16876 --help | --hel | -h )
16877 echo "$ac_cs_usage"; exit 0 ;;
16878 --debug | --d* | -d )
16879 debug=: ;;
16880 --file | --fil | --fi | --f )
16881 shift
16882 CONFIG_FILES="$CONFIG_FILES $1"
16883 ac_need_defaults=false;;
16884 --header | --heade | --head | --hea )
16885 shift
16886 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16887 ac_need_defaults=false;;
16888
16889 # This is an error.
16890 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16891Try \`$0 --help' for more information." >&5
16892echo "$as_me: error: unrecognized option: $1
16893Try \`$0 --help' for more information." >&2;}
16894 { (exit 1); exit 1; }; } ;;
16895
16896 *) ac_config_targets="$ac_config_targets $1" ;;
16897
16898 esac
16899 shift
16900done
16901
16902_ACEOF
16903
16904
16905
16906
16907
16908cat >>$CONFIG_STATUS <<\_ACEOF
16909for ac_config_target in $ac_config_targets
16910do
16911 case "$ac_config_target" in
16912 # Handling of arguments.
16913 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16914 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16915 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16916 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16917echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16918 { (exit 1); exit 1; }; };;
16919 esac
16920done
16921
16922# If the user did not use the arguments to specify the items to instantiate,
16923# then the envvar interface is used. Set only those that are not.
16924# We use the long form for the default assignment because of an extremely
16925# bizarre bug on SunOS 4.1.3.
16926if $ac_need_defaults; then
16927 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16928 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16929fi
16930
16931# Create a temporary directory, and hook for its removal unless debugging.
16932$debug ||
16933{
16934 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16935 trap '{ (exit 1); exit 1; }' 1 2 13 15
16936}
16937
16938# Create a (secure) tmp directory for tmp files.
16939: ${TMPDIR=/tmp}
16940{
16941 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16942 test -n "$tmp" && test -d "$tmp"
16943} ||
16944{
16945 tmp=$TMPDIR/cs$$-$RANDOM
16946 (umask 077 && mkdir $tmp)
16947} ||
16948{
16949 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16950 { (exit 1); exit 1; }
16951}
16952
16953_ACEOF
16954
16955cat >>$CONFIG_STATUS <<_ACEOF
16956
16957#
16958# CONFIG_FILES section.
16959#
16960
16961# No need to generate the scripts if there are no CONFIG_FILES.
16962# This happens for instance when ./config.status config.h
16963if test -n "\$CONFIG_FILES"; then
16964 # Protect against being on the right side of a sed subst in config.status.
16965 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16966 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16967s,@SHELL@,$SHELL,;t t
16968s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16969s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16970s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16971s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16972s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16973s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16974s,@exec_prefix@,$exec_prefix,;t t
16975s,@prefix@,$prefix,;t t
16976s,@program_transform_name@,$program_transform_name,;t t
16977s,@bindir@,$bindir,;t t
16978s,@sbindir@,$sbindir,;t t
16979s,@libexecdir@,$libexecdir,;t t
16980s,@datadir@,$datadir,;t t
16981s,@sysconfdir@,$sysconfdir,;t t
16982s,@sharedstatedir@,$sharedstatedir,;t t
16983s,@localstatedir@,$localstatedir,;t t
16984s,@libdir@,$libdir,;t t
16985s,@includedir@,$includedir,;t t
16986s,@oldincludedir@,$oldincludedir,;t t
16987s,@infodir@,$infodir,;t t
16988s,@mandir@,$mandir,;t t
16989s,@build_alias@,$build_alias,;t t
16990s,@host_alias@,$host_alias,;t t
16991s,@target_alias@,$target_alias,;t t
16992s,@DEFS@,$DEFS,;t t
16993s,@ECHO_C@,$ECHO_C,;t t
16994s,@ECHO_N@,$ECHO_N,;t t
16995s,@ECHO_T@,$ECHO_T,;t t
16996s,@LIBS@,$LIBS,;t t
16997s,@VERSION@,$VERSION,;t t
16998s,@SOVERSION@,$SOVERSION,;t t
16999s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
17000s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
17001s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
17002s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17003s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17004s,@MACHDEP@,$MACHDEP,;t t
17005s,@SGI_ABI@,$SGI_ABI,;t t
17006s,@CXX@,$CXX,;t t
17007s,@MAINOBJ@,$MAINOBJ,;t t
17008s,@EXEEXT@,$EXEEXT,;t t
17009s,@CC@,$CC,;t t
17010s,@CFLAGS@,$CFLAGS,;t t
17011s,@LDFLAGS@,$LDFLAGS,;t t
17012s,@CPPFLAGS@,$CPPFLAGS,;t t
17013s,@ac_ct_CC@,$ac_ct_CC,;t t
17014s,@OBJEXT@,$OBJEXT,;t t
17015s,@CPP@,$CPP,;t t
17016s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17017s,@LIBRARY@,$LIBRARY,;t t
17018s,@LDLIBRARY@,$LDLIBRARY,;t t
17019s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17020s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17021s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17022s,@INSTSONAME@,$INSTSONAME,;t t
17023s,@RUNSHARED@,$RUNSHARED,;t t
17024s,@LINKCC@,$LINKCC,;t t
17025s,@RANLIB@,$RANLIB,;t t
17026s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17027s,@AR@,$AR,;t t
17028s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17029s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17030s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17031s,@LN@,$LN,;t t
17032s,@OPT@,$OPT,;t t
17033s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17034s,@SO@,$SO,;t t
17035s,@LDSHARED@,$LDSHARED,;t t
17036s,@BLDSHARED@,$BLDSHARED,;t t
17037s,@CCSHARED@,$CCSHARED,;t t
17038s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17039s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017040s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017041s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17042s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17043s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17044s,@LDLAST@,$LDLAST,;t t
17045s,@THREADOBJ@,$THREADOBJ,;t t
17046s,@DLINCLDIR@,$DLINCLDIR,;t t
17047s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17048s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17049s,@LIBOBJS@,$LIBOBJS,;t t
17050s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17051s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17052s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17053s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17054s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17055s,@LIBM@,$LIBM,;t t
17056s,@LIBC@,$LIBC,;t t
17057s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17058s,@THREADHEADERS@,$THREADHEADERS,;t t
17059s,@SRCDIRS@,$SRCDIRS,;t t
17060CEOF
17061
17062_ACEOF
17063
17064 cat >>$CONFIG_STATUS <<\_ACEOF
17065 # Split the substitutions into bite-sized pieces for seds with
17066 # small command number limits, like on Digital OSF/1 and HP-UX.
17067 ac_max_sed_lines=48
17068 ac_sed_frag=1 # Number of current file.
17069 ac_beg=1 # First line for current file.
17070 ac_end=$ac_max_sed_lines # Line after last line for current file.
17071 ac_more_lines=:
17072 ac_sed_cmds=
17073 while $ac_more_lines; do
17074 if test $ac_beg -gt 1; then
17075 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17076 else
17077 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17078 fi
17079 if test ! -s $tmp/subs.frag; then
17080 ac_more_lines=false
17081 else
17082 # The purpose of the label and of the branching condition is to
17083 # speed up the sed processing (if there are no `@' at all, there
17084 # is no need to browse any of the substitutions).
17085 # These are the two extra sed commands mentioned above.
17086 (echo ':t
17087 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17088 if test -z "$ac_sed_cmds"; then
17089 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17090 else
17091 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17092 fi
17093 ac_sed_frag=`expr $ac_sed_frag + 1`
17094 ac_beg=$ac_end
17095 ac_end=`expr $ac_end + $ac_max_sed_lines`
17096 fi
17097 done
17098 if test -z "$ac_sed_cmds"; then
17099 ac_sed_cmds=cat
17100 fi
17101fi # test -n "$CONFIG_FILES"
17102
17103_ACEOF
17104cat >>$CONFIG_STATUS <<\_ACEOF
17105for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17106 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17107 case $ac_file in
17108 - | *:- | *:-:* ) # input from stdin
17109 cat >$tmp/stdin
17110 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17111 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17112 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17113 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17114 * ) ac_file_in=$ac_file.in ;;
17115 esac
17116
17117 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17118 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17119$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17120 X"$ac_file" : 'X\(//\)[^/]' \| \
17121 X"$ac_file" : 'X\(//\)$' \| \
17122 X"$ac_file" : 'X\(/\)' \| \
17123 . : '\(.\)' 2>/dev/null ||
17124echo X"$ac_file" |
17125 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17126 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17127 /^X\(\/\/\)$/{ s//\1/; q; }
17128 /^X\(\/\).*/{ s//\1/; q; }
17129 s/.*/./; q'`
17130 { case "$ac_dir" in
17131 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17132 *) as_incr_dir=.;;
17133esac
17134as_dummy="$ac_dir"
17135for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17136 case $as_mkdir_dir in
17137 # Skip DOS drivespec
17138 ?:) as_incr_dir=$as_mkdir_dir ;;
17139 *)
17140 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17141 test -d "$as_incr_dir" ||
17142 mkdir "$as_incr_dir" ||
17143 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17144echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17145 { (exit 1); exit 1; }; }
17146 ;;
17147 esac
17148done; }
17149
17150 ac_builddir=.
17151
17152if test "$ac_dir" != .; then
17153 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17154 # A "../" for each directory in $ac_dir_suffix.
17155 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17156else
17157 ac_dir_suffix= ac_top_builddir=
17158fi
17159
17160case $srcdir in
17161 .) # No --srcdir option. We are building in place.
17162 ac_srcdir=.
17163 if test -z "$ac_top_builddir"; then
17164 ac_top_srcdir=.
17165 else
17166 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17167 fi ;;
17168 [\\/]* | ?:[\\/]* ) # Absolute path.
17169 ac_srcdir=$srcdir$ac_dir_suffix;
17170 ac_top_srcdir=$srcdir ;;
17171 *) # Relative path.
17172 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17173 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17174esac
17175# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17176# absolute.
17177ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise4826582002-10-26 13:33:00 +000017178ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017179ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17180ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17181
17182
17183 case $INSTALL in
17184 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17185 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17186 esac
17187
17188 if test x"$ac_file" != x-; then
17189 { echo "$as_me:$LINENO: creating $ac_file" >&5
17190echo "$as_me: creating $ac_file" >&6;}
17191 rm -f "$ac_file"
17192 fi
17193 # Let's still pretend it is `configure' which instantiates (i.e., don't
17194 # use $as_me), people would be surprised to read:
17195 # /* config.h. Generated by config.status. */
17196 if test x"$ac_file" = x-; then
17197 configure_input=
17198 else
17199 configure_input="$ac_file. "
17200 fi
17201 configure_input=$configure_input"Generated from `echo $ac_file_in |
17202 sed 's,.*/,,'` by configure."
17203
17204 # First look for the input files in the build tree, otherwise in the
17205 # src tree.
17206 ac_file_inputs=`IFS=:
17207 for f in $ac_file_in; do
17208 case $f in
17209 -) echo $tmp/stdin ;;
17210 [\\/$]*)
17211 # Absolute (can't be DOS-style, as IFS=:)
17212 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17213echo "$as_me: error: cannot find input file: $f" >&2;}
17214 { (exit 1); exit 1; }; }
17215 echo $f;;
17216 *) # Relative
17217 if test -f "$f"; then
17218 # Build tree
17219 echo $f
17220 elif test -f "$srcdir/$f"; then
17221 # Source tree
17222 echo $srcdir/$f
17223 else
17224 # /dev/null tree
17225 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17226echo "$as_me: error: cannot find input file: $f" >&2;}
17227 { (exit 1); exit 1; }; }
17228 fi;;
17229 esac
17230 done` || { (exit 1); exit 1; }
17231_ACEOF
17232cat >>$CONFIG_STATUS <<_ACEOF
17233 sed "$ac_vpsub
17234$extrasub
17235_ACEOF
17236cat >>$CONFIG_STATUS <<\_ACEOF
17237:t
17238/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17239s,@configure_input@,$configure_input,;t t
17240s,@srcdir@,$ac_srcdir,;t t
17241s,@abs_srcdir@,$ac_abs_srcdir,;t t
17242s,@top_srcdir@,$ac_top_srcdir,;t t
17243s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17244s,@builddir@,$ac_builddir,;t t
17245s,@abs_builddir@,$ac_abs_builddir,;t t
17246s,@top_builddir@,$ac_top_builddir,;t t
17247s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17248s,@INSTALL@,$ac_INSTALL,;t t
17249" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17250 rm -f $tmp/stdin
17251 if test x"$ac_file" != x-; then
17252 mv $tmp/out $ac_file
17253 else
17254 cat $tmp/out
17255 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017256 fi
17257
Martin v. Löwis11437992002-04-12 09:54:03 +000017258done
17259_ACEOF
17260cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017261
Martin v. Löwis11437992002-04-12 09:54:03 +000017262#
17263# CONFIG_HEADER section.
17264#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017265
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017266# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17267# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017268#
17269# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017270ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17271ac_dB='[ ].*$,\1#\2'
17272ac_dC=' '
17273ac_dD=',;t'
17274# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17275ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17276ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017277ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017278ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017279
Martin v. Löwis11437992002-04-12 09:54:03 +000017280for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017281 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017282 case $ac_file in
17283 - | *:- | *:-:* ) # input from stdin
17284 cat >$tmp/stdin
17285 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17286 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17287 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17288 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17289 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017290 esac
17291
Martin v. Löwis11437992002-04-12 09:54:03 +000017292 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17293echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017294
Martin v. Löwis11437992002-04-12 09:54:03 +000017295 # First look for the input files in the build tree, otherwise in the
17296 # src tree.
17297 ac_file_inputs=`IFS=:
17298 for f in $ac_file_in; do
17299 case $f in
17300 -) echo $tmp/stdin ;;
17301 [\\/$]*)
17302 # Absolute (can't be DOS-style, as IFS=:)
17303 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17304echo "$as_me: error: cannot find input file: $f" >&2;}
17305 { (exit 1); exit 1; }; }
17306 echo $f;;
17307 *) # Relative
17308 if test -f "$f"; then
17309 # Build tree
17310 echo $f
17311 elif test -f "$srcdir/$f"; then
17312 # Source tree
17313 echo $srcdir/$f
17314 else
17315 # /dev/null tree
17316 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17317echo "$as_me: error: cannot find input file: $f" >&2;}
17318 { (exit 1); exit 1; }; }
17319 fi;;
17320 esac
17321 done` || { (exit 1); exit 1; }
17322 # Remove the trailing spaces.
17323 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017324
Martin v. Löwis11437992002-04-12 09:54:03 +000017325_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017326
Martin v. Löwis11437992002-04-12 09:54:03 +000017327# Transform confdefs.h into two sed scripts, `conftest.defines' and
17328# `conftest.undefs', that substitutes the proper values into
17329# config.h.in to produce config.h. The first handles `#define'
17330# templates, and the second `#undef' templates.
17331# And first: Protect against being on the right side of a sed subst in
17332# config.status. Protect against being in an unquoted here document
17333# in config.status.
17334rm -f conftest.defines conftest.undefs
17335# Using a here document instead of a string reduces the quoting nightmare.
17336# Putting comments in sed scripts is not portable.
17337#
17338# `end' is used to avoid that the second main sed command (meant for
17339# 0-ary CPP macros) applies to n-ary macro definitions.
17340# See the Autoconf documentation for `clear'.
17341cat >confdef2sed.sed <<\_ACEOF
17342s/[\\&,]/\\&/g
17343s,[\\$`],\\&,g
17344t clear
17345: clear
17346s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17347t end
17348s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17349: end
17350_ACEOF
17351# If some macros were called several times there might be several times
17352# the same #defines, which is useless. Nevertheless, we may not want to
17353# sort them, since we want the *last* AC-DEFINE to be honored.
17354uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17355sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17356rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017357
17358# This sed command replaces #undef with comments. This is necessary, for
17359# example, in the case of _POSIX_SOURCE, which is predefined and required
17360# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017361cat >>conftest.undefs <<\_ACEOF
17362s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17363_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017364
Martin v. Löwis11437992002-04-12 09:54:03 +000017365# Break up conftest.defines because some shells have a limit on the size
17366# of here documents, and old seds have small limits too (100 cmds).
17367echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17368echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17369echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17370echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017371rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017372while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017373do
Martin v. Löwis11437992002-04-12 09:54:03 +000017374 # Write a limited-size here document to $tmp/defines.sed.
17375 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17376 # Speed up: don't consider the non `#define' lines.
17377 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17378 # Work around the forget-to-reset-the-flag bug.
17379 echo 't clr' >>$CONFIG_STATUS
17380 echo ': clr' >>$CONFIG_STATUS
17381 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017382 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017383 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17384 rm -f $tmp/in
17385 mv $tmp/out $tmp/in
17386' >>$CONFIG_STATUS
17387 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17388 rm -f conftest.defines
17389 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017390done
Martin v. Löwis11437992002-04-12 09:54:03 +000017391rm -f conftest.defines
17392echo ' fi # egrep' >>$CONFIG_STATUS
17393echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017394
Martin v. Löwis11437992002-04-12 09:54:03 +000017395# Break up conftest.undefs because some shells have a limit on the size
17396# of here documents, and old seds have small limits too (100 cmds).
17397echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17398rm -f conftest.tail
17399while grep . conftest.undefs >/dev/null
17400do
17401 # Write a limited-size here document to $tmp/undefs.sed.
17402 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17403 # Speed up: don't consider the non `#undef'
17404 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17405 # Work around the forget-to-reset-the-flag bug.
17406 echo 't clr' >>$CONFIG_STATUS
17407 echo ': clr' >>$CONFIG_STATUS
17408 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17409 echo 'CEOF
17410 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17411 rm -f $tmp/in
17412 mv $tmp/out $tmp/in
17413' >>$CONFIG_STATUS
17414 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17415 rm -f conftest.undefs
17416 mv conftest.tail conftest.undefs
17417done
17418rm -f conftest.undefs
17419
17420cat >>$CONFIG_STATUS <<\_ACEOF
17421 # Let's still pretend it is `configure' which instantiates (i.e., don't
17422 # use $as_me), people would be surprised to read:
17423 # /* config.h. Generated by config.status. */
17424 if test x"$ac_file" = x-; then
17425 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017426 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017427 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017428 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017429 cat $tmp/in >>$tmp/config.h
17430 rm -f $tmp/in
17431 if test x"$ac_file" != x-; then
17432 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17433 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17434echo "$as_me: $ac_file is unchanged" >&6;}
17435 else
17436 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17437$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17438 X"$ac_file" : 'X\(//\)[^/]' \| \
17439 X"$ac_file" : 'X\(//\)$' \| \
17440 X"$ac_file" : 'X\(/\)' \| \
17441 . : '\(.\)' 2>/dev/null ||
17442echo X"$ac_file" |
17443 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17444 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17445 /^X\(\/\/\)$/{ s//\1/; q; }
17446 /^X\(\/\).*/{ s//\1/; q; }
17447 s/.*/./; q'`
17448 { case "$ac_dir" in
17449 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17450 *) as_incr_dir=.;;
17451esac
17452as_dummy="$ac_dir"
17453for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17454 case $as_mkdir_dir in
17455 # Skip DOS drivespec
17456 ?:) as_incr_dir=$as_mkdir_dir ;;
17457 *)
17458 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17459 test -d "$as_incr_dir" ||
17460 mkdir "$as_incr_dir" ||
17461 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17462echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17463 { (exit 1); exit 1; }; }
17464 ;;
17465 esac
17466done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017467
Martin v. Löwis11437992002-04-12 09:54:03 +000017468 rm -f $ac_file
17469 mv $tmp/config.h $ac_file
17470 fi
17471 else
17472 cat $tmp/config.h
17473 rm -f $tmp/config.h
17474 fi
17475done
17476_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017477
Martin v. Löwis11437992002-04-12 09:54:03 +000017478cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017479
Martin v. Löwis11437992002-04-12 09:54:03 +000017480{ (exit 0); exit 0; }
17481_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017482chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017483ac_clean_files=$ac_clean_files_save
17484
17485
17486# configure is writing to config.log, and then calls config.status.
17487# config.status does its own redirection, appending to config.log.
17488# Unfortunately, on DOS this fails, as config.log is still kept open
17489# by configure, so config.status won't be able to write to it; its
17490# output is simply discarded. So we exec the FD to /dev/null,
17491# effectively closing config.log, so it can be properly (re)opened and
17492# appended to by config.status. When coming back to configure, we
17493# need to make the FD available again.
17494if test "$no_create" != yes; then
17495 ac_cs_success=:
17496 exec 5>/dev/null
17497 $SHELL $CONFIG_STATUS || ac_cs_success=false
17498 exec 5>>config.log
17499 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17500 # would make configure fail if this is the last instruction.
17501 $ac_cs_success || { (exit 1); exit 1; }
17502fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017503
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017504
17505echo "creating Setup"
17506if test ! -f Modules/Setup
17507then
17508 cp $srcdir/Modules/Setup.dist Modules/Setup
17509fi
17510
17511echo "creating Setup.local"
17512if test ! -f Modules/Setup.local
17513then
17514 echo "# Edit this file for local setup changes" >Modules/Setup.local
17515fi
17516
17517echo "creating Makefile"
17518$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17519 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017520 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017521mv config.c Modules